#🍁・general-2
1 messages · Page 133 of 1
It's more "complicated"
And that too
They want to see you work a bit harder than just use 2 of the same colors next to each other, lol
You could also give him more answers, right?
55k, 57k, 57.1k.
color codes of all of them
Cómo han viajado a Europa hasta ahora? Qué se necesita? Sólo el pasaporte?
it depends on your country's passport
Oh apparently it's something called the Schengen Agreement
yes
''U.S. citizens may enter for up to 90 days for tourist or business purposes without a visa. Your passport should be valid for at least three months beyond the period of stay''
You don't even need a visa to enter EU?
@shrewd pendant funcionó 
Que funcionó?
The bot is already processing a Wolfram|Alpha query for this server.
Try again in a moment.
=wolf derivative (tan(x))^(1/x)
AAAAAAaaaaaaaaa
I feel like someone is stalking me on minecraft
Every time I log up into this server there's this guy who wants to buy a claimed land of mine
Even after I told them it's not for sale
;-;

(I had already told the guy that my land was not for sale before the screenshot was taken)
10k sounds awesome, but I know they want to buy it because it's close to the spawn, like it's located in a nice spot
that's why I know I can set up a shop that could succeed
No deberías estar estudiando? Jajaka
I finished studying like one hour ago
yes, you have to buy it, but if you don't want to we can just use a non-premium server
Premium servers are for fancy people 
What is it?
Geografía y ciencias de la computación
actualmente no trabajo
o
estoy dedicándome a mis estudios casi totalmente
y al tiempo libre lo dedico a cosas relacionadas con desarrollo de software
Qué admirable. Tú eres muy sabio. 👍🏻
eh, no sé si tanto 😓 pero intento aprender todo lo que pueda aprender, y no rechazar nada
gracias ofc :3c
context: there's this cjeff guy who wants to buy a land I claimed on a minecraft server, and he's offering me a lot of money for it since it's a great spot close to the spawn.
He waited for me to log into the server, and he answered the how have you been question without realizing I didn't say anything

I'm lmattius btw
I've already told them it's not for sale like 4 times
and he keep on offering more and more money
He realized what I realized when I claimed that place
Is he offering you real world money @median trail ?
🆙 | Portager leveled up!
I would take it, lol
Tell him to wire you $1000 USD jajaja 🤑
I understand how that might be frustrating though
In all seriousness
@proud tide https://youtu.be/j7ImxMo57U8
Agachate y conocelo si lees esto
@median trail what do you use as currency in that Minecraft server?
it's called money too
yeah but what
or it's money literally
i thought you were using a resource as currency
i don't know... diamonds for example
squero dinero
no, it's just imaginary money that you can only use on the server
yeah sad to say i cannot help with that
Don't you just count up all the weights?
y cuánto pesa H?
H=1
entonces es 87?
4x12 + 7x1 + 2x16?
no entiendo eso, ama
oops, I don't know where that 4 came from
😄
omg this new fucking interface


i emoted to my own fucking comment instead of editing
that’s a big F
🆙 | Nilfirith has given @glass dragon a reputation point!
why doesn’t anyone ever rep me
maybe you never help anybody
maybe you never emote to your own comments instead of editing them
i always help people
damnit eclipse, I did all that work for nothing
fuck sake eclipse
I said the answer


Oi eclipse look at ur dm I’m gonna send you something
okie
📝 | User profile card for [TNWO] Bizzle

F
📝 | User profile card for [TNWO] Bizzle
not much of a difference but yeah
Just started New Vegas. Any ideas what skills should I develop first?
You're gonna end up being the strongest person in the wasteland no matter what you choose
So choose whatever suits you the most
It is hard.
Life is.
@grim lava no puedo esta tarde, Deli
ok, está bien karina, y mañana? sabés si podés?
Yo creo que mañana sí
hermoso
I got 100/100 on the first chapter test UWU @ashen mist
starting off like this really sets the tone
📝 | User profile card for Keb
@median trail congrats!!! Bien hecho
@median trail congrats!!! Bien hecho
@median trail congrats!!! Bien hecho
@median trail congrats!!! Bien hecho
Sweaty bastard
I like your hair
by the way, you can post pictures of yourself in #👚・outfit-skincare which stands for (outfit of the day)
Oooh! Alright
I think you have to have a role to see that channel. I just gave it to you if necessary
paco? who on earth would call a person paco if you are not from Spain?
Hugo and Luis are acceptable in my opinion
loulou is so cute awwwwww
drowns in French cuteness
Do people not say paco outside of Spain?
no
that's not a thing outside Spain
Well in my country we use that word to mean Police but other than that I don't know
Is there a short form of Francisco then?
Huh
that may change in every country 
I wonder how they came to be called that if nobody says Paco then?
yeah it's weird
Maybe they used to say it? Duck Tales is quite old now
It was on when I was a kid
And I’m old af
maybe
We still say it, and I dont see that changing any time soon xD
In fact, the big burd from sesame street was called "paco pico" here xD
And this is true
@queen trail it's about finding the color code for a resistor of 57080K ohms
wait
let me turn the photo
I like it, I learned the color code using a phrase
Big Boys Race Our Young Girls But Violet Gray Wins
How is called the science where you are studying about that?
It's called physics
what is the science you are studying called?*
I'm majoring in systems engineering at university :)
what is the science you are studying called?*
@median trail the tittle is called "computer engineer" but it's really focused on the branch of the computer science.
you mean my degree?
No, I'm talking about me.
Al menos aquí "computer engineer" es lo que edsel está haciendo
Are you in phys 2/EandM edsel? @median trail or like circuit analysis
Ah gotcha
help me
I need headset recommendations
I don't want it to be "gamer". Just very durable because I need it to study
Most cheap headsets will work for what you want
don't treat it bad and it should last
I like the USB ones personally
Cuál es el problema?
You know how theres three types of decimal numbers? And there's one that has both numbers that aren't repeated and numbers that are? (Like, say, 4.21888888...)
I need to figure out how to turn them into fractions
Irrational numbers continue forever (1/3 and pi for example) when in decimal form
@junior thicket this might help with the irrational numbers: https://www.basic-mathematics.com/converting-repeating-decimals-to-fractions.html
I was actually talking about "ultimely periodic numbers", apparently?
But I figured it out
thank you
@kind flax 1/3 is not irrational
irrational numbers cannot be expressed as the quotient of two integers
has nothing to do with whether or not the decimals repeat
1/3 (0.3333...) goes on forever, but is rational because 1 and 3 are integers
pi is not rational because you can't express pi as a/b, where a and b are both integers
Anyone familiar with object detection? Trying to do some pretty simple stuff, but looking for some better methods
Using python btw
And OpenCV currently
It's working basically
But only on white or alpha layer images
white or alpha layer images
if what you're doing is detecting contours, that's how you're supposed to do it - you need to process your images to grayscale (or more precisely a single 8-bit channel), then do the detections you want
I have not worked with the Python bindings, only Java, and I don't remember much of it, but the usual rules for computer vision are "do whatever that works"
when I used it I had to juggle with all sorts of filters
but applying a threshold was the most important iirc
if you want to actually detect objects, then you need to do ML instead lol
Well currently it does convert the image to grayscale first. But regardless of that it still highlights contours that are not part of the object I need. What I want to do is kind of object detection, but I don't want to know what object is there. I want to extract the vertices of the object relative to the image. It seems like this is the only way.
that's not ML if that's what you're asking
No
no, that was done with a regular camera and blob detection
Very nice
but I was doing my own background substraction
That part sounds the most interesting imo lol
background substraction?
Yes
did you ask in Creative Coders? there are probably people who have done similar things, and small details always matter for these things
I haven't yet
Yes
that was because it was a video, I would set the "original" image and then the next frames would check the difference
Ah okay
that can get really tricky as well
Just for some background. This project is for my computational creativity class and we're trying to implement a system that will take a photo of space for input and output and constellation with a name.
So we're trying to maintain/create a "knowledge base" of shapes for the system
So far this seems like a very naïve approach, but this is the most immediate thing we have come up with.
you want to detect which costellation is?
No we want it to "create" a constellation out of nothing
ah, I see
The biggest issue is creating a sense of autonomy
protip: you can use an image editor first to check what filters would work better lol
I used to do that, applying adjustment layers in Photoshop and changing blend modes, etc.
OpenCV does some magic but those algorithms do the same, so if you want for example "a black and white image that covers X type of things", you could see in an editor first how well it would change the image
That's a good idea! I'll have to mention that to my group
Por qué no tiene los subtítulos en español el Disney+
Creo que aún no lo habilitan en otras regiones, en mi país aún no lo habilitan.
oh, el nuevo switch de Java 13 se ve bien
String someName = switch(number) {
case 1, 2:
// línea
yield "Manusaurio";
case 3:
// línea
yield "Manuyardo";
default:
// línea
yield "Manubastardo";
}```
vs el viejo java case 1: case 2: ... = ... break;horrible
I'm using this to remember how Cisco packet tracer commands work @ashen mist
draft
No me gusta memorizar cosas
read that as rubber as first... then remembered that can mean draft as well
If you use them a lot, you will remember most of the common ones. Like password encryption and enabling a secret you should do on every switch/router/ you ever setup*
But you do now?*
Nope
Hopefully. It's important*
Recién empezó la clase así que no sé qué tan lejos han avanzando
I just meant that if they are teaching about layer 2 ports they should explain what the "layer 2" part means. *
Ah sí
@ashen mist no
Wat
why
Ok, el modelo OSI es un modelo de referencia para los protocolos de las redes
Y básicamente divide los protocolos en 7 capas
Capa 1 es la capa física, o sea trata de las conexiones físicas y cómo se transmite la información y los datos a través del medio físico
Eh
Bueno, te mando un recurso porque no lo voy a explicar muy bien ajaja
Me sorprende que te hayan dicho algo de layer 2 ports sin explicar qué es Layer 2 y todo eso
yo tmb.
I don't understand why we have a general config mode and some specific ones
Supongo que puedo explicarlo en inglés
En vez de buscar todos estos nombres en español ajajaja
Ok
Edsel, cómo funciona el sistema de correos en tu país
Ponés un sobre en el buzón o algo así, y alguien se encarga de ello, no?
O sea, de alguna forma la carta llega a su destino
Pero vos no tenés que preocuparte por exactamente cómo llega el sobre
O sea, si el sobre va en un auto o en un tren o en avión
En qué calle va a viajar, detalles así
Lo que haces es escribir tu carta, ponerla en el sobre, escribir la dirección del recipiente
Hay un protocolo de entregar un sobre a la oficina de correos, no?
"escriban la dirección, incluyan X e Y información, usen un sello, lo que sea"
Al sistema de correo no le importa qué hay en tu sobre (siempre que no sea una bomba o algo peligroso jaja)
Y, al entregar tu sobre, no tenés que pensar en los detalles de cómo va a viajar el sobre
La oficina de correos va a decidir cómo llega, en qué auto, etc
Y, yendo un poco más dentro del tema, el conductor del auto va a tomar una ruta para llegar a destino X
yes
Puede tomar carretera A, calle B, lo que sea
A la oficina de correos no le importa qué ruta toma el conductor, siempre que las cartas lleguen a tiempo
El conductor puede cambiar la ruta por el tráfico, tal vez quiere pasar un rato en la tienda para comer algo durante el viaje, no importa
Vos no sabés qué hace el conductor
Y no te importa
Y finalmente tu recipiente recibe el sobre
Nota que el sobre lleva su nombre, lo abre, y lee el contenido
El punto es que, durante ese viaje de los datos, cada participante se preocupa por una parte de todo lo que pasa
Vos tenés que escribir la carta y usar el protocolo de entregar un sobre a la oficina de correos
Sí
La oficina de correos tiene que decidir cuando el sobre va a salir y con qué método de transportación
El que se encarga de la transportación tiene que decidir la ruta exacta y todos esos detalles
Y el recipiente de tu carta tiene que leerla y procesar la información
En las redes, pasa algo así
Las aplicaciones en tu computadora quieren enviar datos a otras aplicaciones u otras computadoras
Oh I see
Esas computadoras pueden estar en tu propia red, en otro país, en donde sea
They want to talk to each other?
that sounds cute
Hay protocolos de enviar datos en cada pasl
Paso
O sea, hay protocolos para enviar datos entre un cable, entre dos computadoras en la misma red, entre dos redes diferentes
Y cuando una aplicación quiere enviar datos, esa aplicación no sabe exactamente cómo esos datos van a llegar al destino
La aplicación va a decir "ok, quiero enviar datos, y voy a usar protocolo X". Y protocolo X va a usar otro protocolo para tomar el siguiente paso, y sigue así
Y a cada protocolo no le importa qué información envía el protocolo anterior
Hmmm interesting
A la oficina de correos no le importa qué querés decir a tu amigo
Tampoco al conductor del auto con los sobres
oops
En el modelo OSI, hay un concepto que se llama "encapsulation"
Cada capa del modelo OSI provee servicios para recibir y enviar datos
La oficina de correos provee servicios de recibir y entregar sobres, el conductor provee servicios de recibir y entregar cosas en su auto, las carreteras y calles proveen servicios del flujo de tráfico
Cada capa del modelo provee servicios para la capa de arriba, y pide servicios de la capa de abajo
O sea, vos pedís servicios de la oficina de correos (una capa abajo), la oficina de correos pide servicios del conductor del auto, el auto pide servicios de la carretera
La carretera deja que el conductor pueda viajar con el correo. El conductor deja que la oficina de correos pueda mantener su sistema de correo, y la oficina te deja mandar cartas a tus amigos
I'm really impressed. Your Spanish is very clean
En el modelo OSI, capa 7 (la capa más arriba) pide servicios de capa 6 cuando quiere enviar datos, capa 6 pide servicios de capa 5 para transferir los datos de capa 7 (pero a capa 5 no le importa los datos de capa 7)
Y siguiendo así, capa 5 pide servicios de capa 4, ... , Y al fin, capa 2 pide servicios de capa 1
Jaja gracias(?
Son los lugares donde los datos entran y salen
like the road that the person who receives the package from the post office takes?
Ehh, más como la ubicación de la oficina de correos
Porque hay muchas oficinas
Por ejemplo, los ethernet ports son un ejemplo
Mantienen una conexión entre dos máquinas, y así la información fluye
so... ethernet ports are roads?
Son como una puerta física
O sea, la puerta de tu casa
La puerta de la casa de tu amigo
hmmmmm so what are the roads? the media of the network?
Aaaaaa wait
you mean ethernet port
not like the copper cable we plug there
ah yes I get it
Yeah the port
oh okay
Ojalá estos artículos expliquen el tema mejor que yo jaja
Quise usar un ejemplo para empezar, pero me temo que te ha confundido más jaja
no, I got what you mean
Basically every layer uses the other to transmit data, and none of the layers care of the data that's being transmitted
and they do it using protocols
that's just a fancy way to say "standarization of a process that's always the same"
is that correct?
hahahaha I missed the station I wanted to be in? because of paying attention to discord
I'm now waiting again
Lo siento :(
No no, it's not your fault
You taught me something
And I really appreciate it
OwO
Y cada capa tiene protocolos para transmitir información. Esos protocolos usan contenedores para los datos
Así que dentro el contenedor de capa 1 está toda la información de capa 2, que tiene la información de capa 3, que tiene la información de capa 4, etc etc
Eso como esos muñecas rusas
Abrís una, y dentro hay otra más pequeña
@median trail you missed your stop?
yes @abstract scaffold I wasn't sure if I could use station there 😁
"Layer 2 port" se refiere a las interfaces que capa 2 usa para transmitir y recibir información
Station es más como el lugar completo, o sea los edificios de la estación,
En una estación puede haber muchas líneas de tren , por ejemplo
using station there sounds a bit weird.
just be short and succint "I was basically distracted that I missed my stop"
oh ok
Sí, se usa "stop" para eso. (parada?)
... take sounds weird
"I got off at the right stop"
^that's better
I went to New york by train.
Si hablás de la acción de abordar el tren, diría "go on the train". "He got on the train just in time"
Or "board"
"he boarded the train"
Por eso dicen "all aboard!!"
im going loco
@median trail a more formal way for "getting off the train" is
"I alighted at the right stop"
This word I tend to hear on the train announcements etc...
e.g.: "Next stop, Central. Please alight on the right, in the direction of travel."
This might be more British though
@past harbor ayudame en android xfavor 
@gusty ermine wolf no está, tiene que estudiar por sus exámenes
@glass dragon help me pls
what have u done so far?
Wouldn't you just multiply each term by dividend/dividend so you can add them together?
Or is there a faster way?
nothing, i dont know how to do it
multiply both sides by (x+3)(2x-1) and see where that leads you
aight
aighht
so we have a quadratic now
gonna put it in the quadratic formula
is it
x = 4
and x = -1 ?
@abstract scaffold
ok
so what do you think you need to do with those solutions?
are they both valid?
what's wrong?
👍
so whenever you see questions like that. multiply the denominators out and you get polynomials instead
Restating things in a form you can solve
and it's much easier to work with polynomials than things like hyperbolas
My calc professor called it "massaging the equation"
either method works
method 2 may be safer, since you don't have to clarify why your solutions work.
but it's always good to sense check by subbing them back in ur original eqn
wait is this calculus?
i wouldn't say it's calc
algebra?
it's just algebra
yeah thats what i thought
yeaaa
yeah. they did. just got stuck at the initial step
^
Ok cool
@eager wagon pero necesito su ayuda
no sabes como puedo contactar con el tengo examen manana

I have my calc 2 midterm in like 20 mins guys - wish me luckkkkk
L
calc 2 was the hardest class I took in math
calculus was just a striggle for me for some reason
what even is calculus
we do do it
but like
we aren't told what it is
like we dont have separate classes for different maths
its all bundled into one
at least i think we do it
maybe not
it's all about slopes and the area of a shape defined by a curve
slopes = differentiation and areas = integration
hmm
maybe not
idk
The '9-1' Edexcel specification for GCSE Maths, examined from summer 2017.
if its not here
then i dont do it
Man what a test
Holy moly
I’m not sure about this one 😬
Ugh
When you int by parts and get an even harder looking integral, but to solve it you just have to by parts it again.... even though all signs point not to
So then you waste like 30 mins trying the fuckin double/half/etc angle formulas and other garbage but it’s just wrong
And then the test is over and u feel like a big l0ser
Meanwhile you have like 9 other questions to attend to
just get it right lOl
I don’t know how to do the thing 😔
the thing
=tex \int e^{(2\theta)(\sin(3\theta)d\theta)}
=tex \int({e}^{2\theta})({sin({3\theta})}) {d\theta}
L
I just hope he’s a lenient grader
I mean as a review, he literally just said “go through the chapters we covered and practice like all of the practice problems”
What kinda review is that
I mean like
I wasn’t expecting it to be that hard and sneaky.... like “here’s a by parts question, can you show it?” Not like “here’s a by parts question (but secretly there’s another hidden by parts that you just have to fuggin guess)”
Derivatives to me are more about rates of change rather than just "calculating slope". Calculating slopes of tangent lines is one application, but there's more to it than that
completion 90/90 
@grizzled hedge yeah, when you see an exponential and a trig multiplied together, it's standard integration by parts, but like the "repeat case" where using IBP twice will "get you back where you started, but with the sign flipped"
Or any two functions multiplied together and other integration techniques like u-sub don't work, then use by parts.
Integration can be tricky.
When I was in year twelve, integration by parts and partial fractions never really got to my head, it was only when I was in first year of uni when I started to get the hang of it
Exp and trig together are classic integrals that I've just done a billion of them to know what to do
So I always know I get the "repeat case"
Yeah I didn’t really think of that trick of moving the two like integrals to one side, then making the coefficient one in front of the integral to solve
This:
Kinda neat haha
Yeah, that's what I call the "repeat case", move to lhs(left hand sidE)
Since it looks like you just "repeated" back to the start and gone nowhere, but the sign is different or the coefficient is different on each side, so it actually helped
Right
Yeah, you learn from mistakes. This shit ain't easy
Yeah
Like you learn the rules and basic techniques, but there’s so much that just requires experience with solving em
Sometimes you just got to pull shit out of your arse, as seen in MIT integration bees
Jaja i see 🤔
MIT integration bee is my favourite sport
one of the integrals in the pdf file, I did a different way. I get an equivalent solution, despite it looking different.
red and blue curve exactly the same. green which is the soln in the pdf you can see is off by a constant, thus equivalent.
i could've approached it a different way. so yeah, there's no one way of doing an integral.
or you know, add and subtract 1 on the numerator?
@past storm jaja
that feeling when you study for the next class in class
@gusty ermine Dime
this exercise was part of the test
and I had to find the resistance from A to B
to C*
Those are all resistors? That's a weird way to label them lol
this is the symbol that I learned
Yes, those are
it's just that my professor told us that the resistor in your image is like the old way to represent them
I haven't used that feature yet
it looks like a sentinel from The Matrix now
Discord Status hasn't registered the incident yet
lol no no no
There will always be things that I learned that will change
it's just the way it is
anyways... that's a pretty fun schematic you have there
true
finding the resistance will be fun
it was difficult to solve haha
how old are you wolf, if you don't mind me asking?
I'll be 34 at the end of March
ok
I was an Electrical Engineering major
The only way I could solve it was by looking at the nodes and realizing which resistors are in parallel or in series(?
Ohhhhhh
so that's why It caught my attention
Electronics has a focus on low voltage circuitry and things like ICs
Electrical is more along the lines of medium to high voltage... you know, like the wiring in your house
I see, interesting :)
It's been awhile though
I used to build stuff like crazy. That's an old hobby for me
is majoring in some branch of engineering worth it in the US?
ow
If you have a serious interest and feel like it would be something you're interested in then yeah. I mean... you can make a good amount of money in electrical / electronic positions
you really have to want it though
school isn't cheap
That being said, there are other cheaper paths as well, like certifications
hmmmm... I see
I'm a bit skeptical about certifications though
But I can understand why they are useful
Este trozo de papel dice que soy un experto
Uwu
what is this UwU" I keep seeing
It's an emoji that's popular amongst internet users because people use it to represent a blushing face, but I use it to shitpost and make fun of those who use it non ironically
OK thanks. I needed it spoken in old internet 🙂
let's solve it
that was gotten from my whatsapp stories
como los problemas de mates en plan "3 + 0 x 5 = ?"
vi algún boomer (uno de verdad) que respondió "si lo calculas como el ordenador son 3, pero si lo calculas como un ser humano son 15"
@ashen mist do you want to play minecraft uwu
y ejercicio 3?
@median trail yes
do you have an account?
👀
Te llamas edsel di meo en la vida real?
Sí
Jaja bueno
No puedo ahora :( @median trail
let's solve it
@median trail 6 people.

@past harbor an cambiado mi examen puedes ayudarme con java de android
no entiendo los fragmentos ni como hacen clic
Por qué?
every command is too wordy
Los fragmentos son trozos / partes que puedes ir pegando sobre los layouts de tus actividades. Son muy útiles ya que puedes reutilizarlos en donde quieras sin necesidad de crear cincuenta mil actividades.
Tienes que tener en cuenta que los fragments son "partes" que vas pegando sobre los layouts de actividades, para que puedas pegarlos en algún trozo de la actividad te recomiendo que uses un ScrollView y le des un "id". Yo suelo llamarlos "content_fragment". Los fragments al formar parte de la actividad, no pueden encargarse de administrar, por lo que se tendrá que comunicar con la actividad.
Por ejemplo, cuando creas un fragmento de tipo Lista como es el RecyclerView, necesitas de un Listener. Este escuchador servirá para decirle a su padre (a su actividad), oye me han tocado dicha posición, es ésta, tómala y encárgate tú de hacer lo que tengas que hacer con ella, ya sea abrir una nueva actividad, mostrar un diálogo, etc.
Para tener este escuchador, tendrás que crear una interfaz:
private MiFragmentItemListener miEscuchador;
public interface MiFragmentItemListener {
// Puedes pasarle datos del Fragment a la actividad por parámetros, ya sea una posición, un texto, o lo que tú quieras.
void miEscuchador(int posicionItem);
}
// Sirve para pegar ese escuchador al fragmento
@Override
public void onAttach(Context context) {
super.onAttach(context);
if (context instanceof MiFragmentItemListener) {
miEscuchador = (MiFragmentItemListener) context;
} else {
throw new RuntimeException(context.toString()
+ " must implement MiFragmentItemListener");
}
}
// Desenlaza ese escuchador
@Override
public void onDetach() {
super.onDetach();
miEscuchador = null;
}
Ya cuando quieras usar ese escuchador de ese fragmento, simplemente lo debes de implementar en la actividad
public class MainActivity extends AppCompatActivity implements MiFragmento.MiFragmentItemListener
Y pones el método, y ya.
@gusty ermine
@past harbor sí, dame unos minutos para arrancar mi computadora
Voy buscando lo que tengo que estudiar, y lo que no entienda te digo
Ok
Entonces cada vez que alguien toque una posición de ese Recycler, el fragmento dirá algo como "Uy, alguien me ha tocado un dato. Toma, Main, aquí lo tienes, encárgate tú de él", @gusty ermine
Le pasará la posición del dato tocado y ya en la main haces lo que te dé la gana
Todo lo que sea trabajar con datos, siempre a la actividad, jamás al fragmento
Él sólo se tiene que quedar escuchando y pasar datos cuando alguien interactúe con él
do you think I can learn how to use JFrame to design interfaces in Java in just one week?
@ashen mist Ya estoy
En mi teoría dice esto, quería asegurarme que es cierto
dice que py no puede realizar asignaciones en línea
[a=b=c=3], [if((a = nextRecord()) = !null)]
es cierto?
= !null no tiene sentido, debería decir != None pero igual, creo que hay que decir a = nextRecord(); if a != None: o más sencillamente, a = nextRecord(); if a:
Gracias
"Py no declara variables para usarlas pero sí que hay que inicializar"
o sea no puedes hacer esto?
para usaras?
ah
sí, y python sabe que num tiene que ser un int, ya que le diste el valor de 5
"Py te permite crear clases y objetos pero no limita el acceso a sus propiedades o métodos"
qué sentido tiene que sea un poo pero te deje acceder a propiedades privadas?
si intentás decir int x; o int x = 5, te grita
Espero que no me grite en el examen y me acuerde 😄
no te preocupes por la explicación, sólo quería saber si realmente
se trabaja así o..?
leí que usan una cosa llamada
property
y después trabajan con las propiedades "privadas"
sin realmente acceder a ellas
se puede acceder a ellas, pero hay maneras de decir "hey, no debés usar esto como una función o propiedad pública"
Private methods are those methods that should neither be accessed outside the class nor by any base class. In Python, there is no existence of Private methods that cannot be accessed except inside a class. However, to define a private method prefix the member name with double underscore “__”.
o sea, __funcionprivada
qué sentido tiene que sea un poo pero te deje acceder a propiedades privadas?
Raymond Hettinger definía a Python como un lenguaje "for consenting adults", ni siquiera el doble underscore te asegura algo privado
ah sí, eso fue la explicación graciosa "somos todos adultos acá" o algo así
sí, no te lo asegura, sino que es como una costumbre(?
Vale, gracias
Los "tipos de datos" dicen que hay enteros, enteros largos, decimales o coma flotante y que depende de el intérprete y la plataforma la capacidad que puedes almacenar
es cierto o?
ni idea?
eso es cierto en Python 2
no combinaron los enteros y los enteros largos hace mucho tiempo?
mmmm python
en Py3 los enteros son unbound
pueden ser infinitos hasta que se te acabe la memoria
¿Los operadores numéricos son estos? No estoy seguro de la división entera
+ SUMA
- RESTA
* MULTIPLICACIÓN
/ DIVISIÓN
// DIVISIÓN ENTERA
** EXPONENCIACIÓN
% MÓDULO
cambia según la versión?
acordate de que en realidad es floor division más que integer division
2 // 1.5 te devuelve un float
sí, con / y //, si uno de los operandos es un float, la respuesta es un float también
Entendido
5 // 2 te da 2, pero 5 // 2.0 te da 2.0
no te da 2.5, eso puede ser confuso
pero 5 / 2.0 sí te da 2.5
& AND
| OR
/\ XOR
NOT ~
<< DESPLAZAMIENTO IZQUIERDA
>> DESPLAZAMIENTO DERECHA
No entiendo los 3 últimos
cómo los utilizas?
o sea, ni sé de qué van
mientras que 5 / 2 te da 2
esos son los operadores bitwise
o sea, el número 5 en binary se ve como 00000101 (4 + 1). <<, o el desplazamiento izquierda hace que esos bits se deslicen a la izquierda
así que si todos los bits de 5 van una posición a la izquierda, tenés 00001010 (hay que añadir otro 0 a la derecha), lo que vale 10 (8 + 2)
así que 5<<1 dice "mueve los bits de 5 una posición a la izquierda"
o, para decirlo en una manera más general, a<<b significa "mueve los bits de a a la izquierda por b posiciones"
lo que es interesante es que ya que se trata del binario, el desplazamiento izquierda de n posiciones multiplica el número por 2^n
y el desplazamiento derecha de n posiciones divide el número por 2^n
si querés más ejemplos (5 es 0000 0101 en binario, y 8 es 0000 1000 en binario)
0000 0101 # un 5 normal
0000 1010 # 5 << 1 = 10
0001 0100 # 5 << 2 = 20
0000 0010 # 5 >> 1 = 2 porque 5 / 2 = 2 (hay que redondearlo, y notá cómo el 1 de la derecha despareció)
0000 0001 # 5 >> 2 = 1 porque 5 / 4 = 1
0000 1000 # un 8 normal
0010 0000 # 8 << 2 = 32, o sea 8 * 2^2
0000 0010 # 8 >> 2 = 2, o sea 8 / 2^2 = 8/4 = 2
Muchísimas gracias
Dicen que en Py los String se pueden representar como 'String' o "String"
cuál es la diferencia?
o es lo mismo
oh, no te expliqué lo de ~
bueno, con 'String', podés incluir " en tu string sin usar secuencias de escape(?
por ejemplo, si querés usar " en un String de forma "String", tenés que decir /", no?
mystring = "digo \"hola\""
Sí
si usás la forma de 'String', podés decir mystring = 'digo "hola"'
y creo que funciona al revés también, o sea si tu string va en forma de "String", podés incluir ' sin secuencias de escape
y si tu string va en forma de 'String', hay que usar la secuencia de escape \' para incluir un '
\n es newline. técnicamente es otro carácter, y no sé cómo explicar la diferencia
pero en un sistema de windows, se usa \r\n para ir a una nueva línea, mientras que en unix se usa sólamente \n
vera is the real mvp
Ah, okay
si querés más información (la cual probablemente no es importante para tu examen), hay una explicación acá https://stackoverflow.com/questions/1761051/difference-between-n-and-r
okay, regresando al tema de ~ en cuanto a los operadores bitwise
~ cambia los valores bit de tu número. o sea, los 0 se convierten en 1, y los 1 se convierten en 0
en inglés se llama "bitwise not"
voy a copiar el ejemplo de wikipedia porque me da flojera teclear todo jaja
NOT 0111 (decimal 7)
= 1000 (decimal 8)
el wiki de python nos da esta explicación Returns the complement of x - the number you get by switching each 1 for a 0 and each 0 for a 1. This is the same as -x - 1.
por eso, si decís ~5 en python, te da -6
y si usás ~ otra vez, tenés tu número original (porque deshacés los cambios anteriores)
esta página puede resultar útil https://wiki.python.org/moin/BitwiseOperators
Gracias
En cuanto a las cadenas, no entiendo esto
'''cadena'''
ejecuté esto pero rompe
dice en la teoría que te permite varias líneas
quizás sea idiota y no sepa cómo va
cómo lo usaste?
print('''cadena''')
no sé cómo va esto lmao
puse
print('''hola, soy juan. test''')
y sólo imprime hola

funciona para mí jaja
tf
bueno, sí podés usar ''' para fácilmente crear cadenas de múltiples líneas, por ejemplo
tu ejemplo desde un fichero funciona para mí también
estás usando la versión correcta de tu fichero?
o sea, guardaste tus cambios?
jaja
de primeras nunca va, ns por qué 😄
Dicen que * es para crear una copia de lo que sea
de una variable o cómo?
wat
sí
also, eso es una tupla
o hay que acceder a una componente?
ah lmao
en la teoría pone
"array de cadenas"
xDD
gracias por decirme
tu editor te odia
LOL acabo de darme cuenta de que no imprimió nada
[] es una lista, la versión de array en python
{} puede ser un conjunto o un diccionario

dictionaries
I love them
btw, lo que hace a una tupla no son los paréntesis, sino las comas
(sin símbolos que encierren, las comas sólo tienen el efecto de alterar el orden de evaluación, y dan claridad)
so
oh wait, no repetí la lista lmao
>>> a = 1, 2, 3
>>> type(a)
<type 'tuple'>```
y también se vuelven necesarias cuando lo que querés es pasar una tupla, pero podría ser interpretado como diferentes argumentos, ej, algo(1, 2, 3) en vez de algo((1, 2, 3))
{} se usan para crear tanto los conjuntos como los diccionarios
creo que la mayoría de las terminales te dejan copiar con ctrl shift c
algo así
yeah idk por qué estoy capturando la pantalla jajajaja
gracias por recordármelo
ok
esto es divertido
nunca tomé una clase oficial de python así que es genial repasar estas cosas
capitalize
funciona así?
porque he visto que sólo capitaliza la primera letra
no toda la cadena
creo que podrías estar buscando .upper()
o .title(), hacen cosas diferentes
capitalize para mayúscula inicial, luego minúsculas,
upper para todas mayúsculas,
title para mayúscula al comienzo de cada palabra
tengo que aprender capitalize, center, rjust, ljust, count, find, upper, strip, split, splitlines, len, join, format y lower
por qué te hacen memorizar eso lol :C
o sea, de hecho
>>> dir(str)
['__add__', '__class__', '__contains__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__len__', '__lt__', '__mod__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmod__', '__rmul__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'format_map', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill']```
sólo usé upper()
>>> micadena = "hola, mundo"
>>> micadena.capitalize()
'Hola, mundo'
>>> micadena.upper()
'HOLA, MUNDO'
>>> micadena.title()
'Hola, Mundo'
>>>
Lo que hace es coger la longitud de la cadena
y repartir los espacios entre los dos lados?
o sea, la cadena es 6 y puse 8
pone uno delante y otro detrás
parece que pone la cadena en el medio de un espacio de longitud 8 (o lo que pongas como el argumento)
ya que tu cadena mide 6 y querés ponerla en el centro de un espacio que mide 8, puede caber un espacio a cada lado
pero no hay que limitarte con solamente los carácteres de espacios como filler
podés usar otro carácter
a ver, esto es interesante cuando usás upper, capitalize, y title en una cadena con números
>>> cadena2 = "2hola, 2mundo"
>>> cadena2.title()
'2Hola, 2Mundo'
>>> cadena2.capitalize()
'2hola, 2mundo'
>>> cadena2.upper()
'2HOLA, 2MUNDO'
y no te olvides de lower
>>> "HOLA".lower() 'hola'
>>> "fruta".center(9, "-")
'--fruta--'
>>> "fruta".center(10, "-") # no cabe perfectamente en el medio
'--fruta---'
gracias
de nada
no sólo los espacios, creo
es como el trim?
creo que sí
espacios, \t, \n, \r, esas cosas también
no sé si hay más que elimina
>>> cadena = '\n\r\t cosa\n \r \r\t'
>>> cadena.strip()
'cosa'
estoy intentando usar split y splitlines pero no tengo ni idea de cómo van
si querés eliminar whitespace en sólo un lado, podés usar rstrip() y lstrip()
estoy mirando mis apuntes pero añadí que ni el profesor
>>> cadena = ' cosa '
>>> cadena.rstrip()
' cosa'
>>> cadena.lstrip()
'cosa '
ok, lo que split hace es desintegrar tu cadena depende del separador
y te da una lista de las partes de la cadena entre del separador
A ver
necesitás aprender lo que hacen los métodos de str sin argumentos, wolf? o tenés que aprender qué argumentos pueden recibir?
por ejemplo
>>> "1 2 3 5".split()
['1', '2', '3', '5']
por defecto, el separador es whitespace (espacios, \t, \n, \r, esas cosas)
tengo esto
split(caracter) / splitlines() / len(cadena) / join(cadena) / format(valores)
>>> "a#b#c#d".split('#')
['a', 'b', 'c', 'd']
puedo usar otro carácter para desintegrar la cadena
exacto
y si tu separador no existe en tu cadena, conseguís una lista con un solo elemento - tu cadena original
si querés regex, import re (?)
>>> "abc".split('d')
['abc']
hay otro argumento de split, al parecer
pero nunca lo usé
https://www.w3schools.com/python/ref_string_split.asp
el segundo argumento determina cuántas separaciones va a hacer
splitlines
estoy aprendiendo muchas palabras en español sobre programación hoy
also, el argumento de split no tiene que ser un solo carácter
>>> "abcd".split('bc')
['a', 'd']
sí
@icy pollen no tenemos palabra para yield, pls help us
splitlines toma tu cadena y te da una lista de cada línea en tu cadena
>>> cadena = "linea1\nlinea2\nlinea3"
>>> cadena.splitlines()
['linea1', 'linea2', 'linea3']
bueno, también lo tuyo
sí, podés hacerlo así también





no