This is sad. A person with self-love issues shouldn't be treated like this
You realise this didn't actually happen?
Of course I do. It's just that I find it sad that there are people who seriously find this attitude funny.
Load more comments
どこの国出身?何歳?
トルコ人18歳ガール✌️ついこの間高校卒業したんでJKブランド使えなくて悲しいです
ゼロに等しいです。てか普通にゼロです。
Load more comments
百合はいいぞ
Ok but this isn't the best post over this sub…
Hobies help a lot!
Money.
I'd never ever want to work in Japan, but I'm going to go there and live some fulfilling 4 years as a student. Now all I'm doing is saving up money and studying hard to get admitted.
Splice is a good service that takes auto backups. I also do frequent manual backups to Google Drive
Ahh yes, the classical Japanese author 出口先生… My favorite
One reason I don't see mentioned in much detail here:
In C/C++, arrays are stored as contiguous blocks of memory, the size of which has to be provided at creation. So, you might see something like
int arr[5];
Which means "allocate space for 5 integers, and put the starting location in the variable arr"
Technically in this case it's happening on the stack so it's not "allocated" in the same way, so just don't think about that
Now, C/C++ has two special operators which do not exist in Python: & (address of) and * (dereference).
&foo, as the name suggests, gives you the memory address of the variable foo. Suppose it returns 12304568 - that means that foo's contents are located at the 12304568th byte in memory.
*foo gets the value at an address. *(12304568) would look at the 12304568th byte in memory and fetch whatever is there.
Not really, since we haven't specified a type, and that address is probably out of bounds and would cause a segmentation fault, so don't think about that either.
The code *(&foo) is equivalent to just foo, since we get the address of foo and then get whatever is at that address (the contents of foo).
We could also do something like *(&foo + 1). Here, we get the address of foo, then look one unit over, and find whatever's at that location. The unit depends on the type of foo, and scales so that there's no overlap. If foo is an int, then we look 4 bytes over to find the next int. If foo is a double, then we look 8 bytes over to find the next double.
So, remember that I said that arr contains the starting location of our block of memory. This means that if we use *arr, we can check whatever is at the first int in our array. We can also look one int over with *(arr + 1). We can do this all the way up until *(arr + 5), where we're no longer looking in our specially-allocated block of memory - we might cause a segmentation fault here.
So, what are the elements of our array?
*(arr + 0)
*(arr + 1)
*(arr + 2)
*(arr + 3)
*(arr + 4)
As you might have caught on, this operation is so common that C/C++ has a special syntax for it. arr[n] is (in most compilers) exactly equivalent to *(arr + n)
If arrays were 1-indexed in C, then we wouldn't have this symmetry - either arr[n] would be equivalent to *(arr + n - 1), or *arr might produce a segmentation fault. Yuck.
Now, I'm just using C for syntax, but the same thing happens under-the-hood in just about every modern programming language I've ever heard of (and the ones I haven't) - even in cases like Python where we don't have direct access to the pointer arithmetic which makes it work. Exceptions to the rule usually break the first rule of symmetry I mentioned - in those languages, arr[n] (or similar subscripting syntax) is equivalent to *(arr + n - 1) (or similar dereferencing syntax).
Now, something Python-specific, which is a natural extension of all this, is negative indexes. Did you know in Python that you can use arr[-1] to get the last element of a list? We really have 10 names for a 5-element list in Python:
arr[0]; arr[-5]
arr[1]; arr[-4]
arr[2]; arr[-3]
arr[3]; arr[-2]
arr[4]; arr[-1]
If you know anything about modular arithmetic, this should seem nice to you: each name is congruent mod the length of the list. That is:
-5 % 5 == 0
-4 % 5 == 1
-3 % 5 == 2
-2 % 5 == 3
-1 % 5 == 4
You could also think of it as sticking the elements of the list end-to-end, with 0 in the middle:
-5 -4 -3 -2 -1 [0 1 2 3 4]
a b c d e [a b c d e]
This symmetry is also broken if we have 1-indexed arrays.
I wish I could give you an award. Until then, take this 🎖️
Ngl as a girl I only kinda started wearing skirts last year and I indeed did the twirly thing and it was nice. But a windy day with a skirt?? Now that thing scares me
I can't understand why Stealth is considered a sexy name
Honestly this is so well done and adorable
きっとそれが正解
What is it like to have a life so good that you’re upset about the race of a fictional character who is also a fictional creature?
Actually I am not exactly upset over the thing and I do not have that much of a fulfilling life. I'm just sick from seeing this discussion over every social media I'm using.
So your solution is to discuss it more?
I just wanted to express my opinion. And maybe have some decent discussion rather than a series of ad hominem's.
Load more comments
Is this a Popular or Unpopular opinion? Please reply to this comment with either 'popular' or 'unpopular'
Current Votes:
| Popular | Unpopular |
|---|---|
| 18 | 48 |
unpopular
Granted. You walk outside and there is your dad, holding a pack of cigarettes. "Dad!" you cry. "I missed you so much! Where were you all this time?"
With a deep sigh, he says "The line at the store was no joke!"
You say "wow, so you were waiting in line all these years?". He answers "the line at the store was no joke."
"ha, yeah dad", you say, "you said that. But I'm so happy to finally see you, you can say it again for all I care".
He dad-jokes like he used to do: "the line at the store was no joke". You laugh and roll your eyes.
"well dad, come in! Take a seat so we can catch up!" you say, as you go back inside. He follows you and sits awkwardly on a kitchen chair, still clutching his pack of cigarettes. "you want something to drink?"
He looks at the table. "The line at the store was no joke"
"y-yes dad. I believe you. No need to keep saying it. I've coffee in the pot, it's still warm I think, you want some?"
In a dry tone, he repeats "the line at the store was no joke".
You start getting worried. What's the matter with him? "Dad?" you say, "are you okay?". You kneel down next to his chair to take a better look at him. You notice the pack of cigarettes in his hand looks weird, as if it's part of his arm.
"the..." your father starts. You look at his face. He looks frightened. "the line. At the store. Was. No. JOKE!" and as he speaks, his eyes start glowing red...
This is actually scary
Yes!! After long weeks of obvious NTA posts, I can finally say that YTA with great joy.
Glad to hear that
Total beginner here. I've done no more than to print hello world and add up numbers on python. Recently I've began a desk job at a travel agency. My boss apparently has a problem with getting the data from the booking websites. They are using three different sites to get customers for their cruise tours and they get individual emails when a new customer books a tour but the proccess of adding every new customer manually to an Excel sheet is tiring and more importantly sometimes there are customers that get missed for whatever reason caused by this procedure. Essentially, what I want to achieve is something like this:
Program:
Downloads the data automatically in Excel form from the online booking systems (the sites have the function)
Gathers them in a single Excel file, with separate pages for websites
Sends it to a specified email, at a specified time, everyday, automatically
This seems easy to do, but is it really? How can I, as an eager novice in programming, make this?
Figure out how to do each part independently and then glue them together. How do you download something in Python? How do you manipulate Excel files? How do you email something?
You did a good job breaking it down.
Check out Automate the Boring Stuff With Python.
Thank you!
What I always do is break it up in pieces and look each piece up.
Like try to look up how to auto download a file
Then look up how to read excel files and just screw around with it till you understand it
Then find the best way to doe your calculations
Then find out how to write to an excel file mess around with it
And then find out how to mail a file
Afterwards you will need some kind of server or pc that is running all the time so you can run the program there
You might want to make a separate program for the timing with maybe a config file so other people don't have to go through your scripts and have that program run your excel program thing
Sorry that I wasn't able to directly help you but I hope this was close enough
P.S. might wanna see if there's something in excel to do this
P.S. 2 fun challenge I'm also pretty new with programming and stuff so I'm gonna try this but it will take a while so don't expect anything from me for a while unless you don't need it straight away
That actually helps a lot! I couldn't break my project down to smaller pieces due to my lack of knowledge, but this seems like a neater workflow. Thank you! (And I'm not expecting anything from you in any way, but I'd be really glad if you would share your method with me in case you make this)
Load more comments
Honestly, as an artist, I'm pretty much annoyed at people who share their artworks EVERYWHERE like 20 different Facebook groups and 5 subreddits and a dozen of Twitter art retweet accounts. But at the end those people seem to be gaining new followers and friends from this. I also want my art to be seen and recognized, but I want to do this without disturbing people. Any ideas about how to do this?