programacionc | Unsorted

Telegram-канал programacionc - C / C++

2078

NO HACEMOS DEBERES NI RESOLVEMOS EJERCICIOS. Humilde templo de sabiduría en la disciplina de la programación. No grupo de personas resolviendo enunciados de primero de carrera. Cuando paséis código hacedlo a través de pastebin o similar.

Subscribe to a channel

C / C++

主管_林知遥✨ ha sido baneado! Razón: Baneo CAS.

Читать полностью…

C / C++

Soy fiel devoto de ese dicho

Читать полностью…

C / C++

Entonces prefieren recurrir a un programa que les contestara sin lo que ellos sienten que sera un agravio a sus personas

Читать полностью…

C / C++

Lo que pasa es que la mayoria siente que al preguntarle a otra persona se estan humillando y los veran mal por no saber X o Y

Читать полностью…

C / C++

Otro recurso más que llega hasta el tuétano.
https://grandidierite.github.io/looking-at-the-source-code-for-function-isalpha-isdigit-isalnum-isspace-islower-isupper-isxdigit-iscntrl-isprint-ispunct-isgraph-tolower-and-toupper-in-C-programming/

Читать полностью…

C / C++

uff joya hasta salio pentesting jaja ... yo solo queria saber como salio el mugroso 512 jaja

Читать полностью…

C / C++

A ver, aquí lo explica un poco.
https://blog.braincoke.fr/pentest/ctype-b-loc/

Читать полностью…

C / C++

en el otro grupo de c me dicen esto

no estas entendiendo ...

Hace el & con el lookup

no es

return ‘a’ & LOWER_BIT


Sino que hace:

return lookup[‘a’] & LOWER_BIT;

El 97 es el índice del array del lookup

voy a buscar eso je

Читать полностью…

C / C++

justo esa parte solo consigue el 512

el codigo esta muy enredado o no lo entiendo jeje

Читать полностью…

C / C++

y aca las 2 lineas que importan

define _ISbit(bit) ((bit) < 8 ? ((1 << (bit)) << 8) : ((1 << (bit)) >> 8))

_ISlower = _ISbit (1), /* lowercase. */

Читать полностью…

C / C++

# include <endian.h>
# if __BYTE_ORDER == __BIG_ENDIAN
# define _ISbit(bit) (1 << (bit))
# else /* __BYTE_ORDER == __LITTLE_ENDIAN */
# define _ISbit(bit) ((bit) < 8 ? ((1 << (bit)) << 8) : ((1 << (bit)) >> 8))
# endif

enum
{
_ISupper = _ISbit (0), /* UPPERCASE. */
_ISlower = _ISbit (1), /* lowercase. */
_ISalpha = _ISbit (2), /* Alphabetic. */
_ISdigit = _ISbit (3), /* Numeric. */
_ISxdigit = _ISbit (4), /* Hexadecimal numeric. */
_ISspace = _ISbit (5), /* Whitespace. */
_ISprint = _ISbit (6), /* Printing. */
_ISgraph = _ISbit (7), /* Graphical. */
_ISblank = _ISbit (8), /* Blank (usually SPC and TAB). */
_IScntrl = _ISbit (9), /* Control character. */
_ISpunct = _ISbit (10), /* Punctuation. */
_ISalnum = _ISbit (11) /* Alphanumeric. */
};
#endif /* ! _ISbit */

Читать полностью…

C / C++

pero es que en ctypes esta el islower

que podria hacer uno casero ... pero quiero entender que hace la biblioteca de c

Читать полностью…

C / C++

tal vez no deberías usar ctypes

Читать полностью…

C / C++

espera que pongo la operacion je

Читать полностью…

C / C++

¿Ese 512 de dónde sale?

Читать полностью…

C / C++

rescato tu pregunta de todo este flod jeje

qt es amor ... tienes gtk o wxwidget o directo con openGL je

Imgui no lo conosco pero se ve bien je

no se que opinen los demas je

Читать полностью…

C / C++

ya pero es mejor preguntar ... mira aca que joya de enlace mandaron uff

Читать полностью…

C / C++

no existen preguntas p...

si no p.. que no preguntan je :)

Читать полностью…

C / C++

uff este esta bien joya

muchas gracias je

Читать полностью…

C / C++

gracias lo leo con calma je

Читать полностью…

C / C++

Y también esta consulta en Stack Overflow
https://stackoverflow.com/questions/37702434/ctype-b-loc-what-is-its-purpose

Читать полностью…

C / C++

Pero es que 512 es 2 en little-endian de 16 bits, que es justo el _ISbit(1). Creo que eso es un truco mágico para hacer el array de búsqueda independiente del "endianness".

Читать полностью…

C / C++

"((1 << (bit)) << 8)"

Читать полностью…

C / C++

Pero eso no es la función islower como tal, sino una enumeración auxiliar. A lo mejor hay una función que combina algunos de esos bits para decir que '9' es tanto dígito decimal como hexadecimal y además imprimible, o que 'A' es mayúscula, alfabética e imprimible.

Читать полностью…

C / C++

Exacto, no es afectado por la locale también?

Читать полностью…

C / C++

A ver, fuera del rango ASCII de 7 bits desde luego no es conveniente.

Читать полностью…

C / C++

Todo, para más contexto.

Читать полностью…

C / C++

pongo todo el codigo interesante (20 lineas)

o nada mas las 2 lineas que importan je

?

Читать полностью…

C / C++

uff gracias por el dato ... uso gcc

Читать полностью…

C / C++

qt es amor ... tienes gtk o wxwidget o directo con openGL je

Читать полностью…
Subscribe to a channel