The forum is temporarily in read-only mode. You can read every thread, but new posts and registrations are paused for now. Leave a message on the Nostalgia wall · More information

Post your random thoughts/feelings etc

Started by Remus · Mar 19, 2011 · 42,572 replies

#34101
Programming can be really useful. I wanted to print a pdf in A4 pages but I wanted to cut those pages in half in order to make an A5 book. So that meant I had to print 2 pages per A4 page, in the order 1, 3, 4, 2 (and so on, 5, 7, 8, 6, etc). I would have to write all the pages individually to get it to print like this. Fortunately, with R I can create a function that will return to me all these numbers easily, with commas between them as well.

I haven't written the function yet, but I know I can do it and that's what I'll be doing today and maybe tomorrow, depending on how long it takes me. This will be really useful because I have a lot of stuff to print which I want to print in this pattern, and this can save me a lot of time.
#34102
Ithior said: ↑
Programming can be really useful. I wanted to print a pdf in A4 pages but I wanted to cut those pages in half in order to make an A5 book. So that meant I had to print 2 pages per A4 page, in the order 1, 3, 4, 2 (and so on, 5, 7, 8, 6, etc). I would have to write all the pages individually to get it to print like this. Fortunately, with R I can create a function that will return to me all these numbers easily, with commas between them as well.

I haven't written the function yet, but I know I can do it and that's what I'll be doing today and maybe tomorrow, depending on how long it takes me. This will be really useful because I have a lot of stuff to print which I want to print in this pattern, and this can save me a lot of time.

Already did the function. Ran into some trouble because I was making it more complicated than it had to be, but it was still pretty easy.

Edit: altered it even further so it can be used for different patterns, different start page and different last page.
You input something like this in the R console:
pages(first = 1, last = 10, pattern = c(1, 3, 4, 2))
And it returns:
"1, 3, 4, 2, 5, 7, 8, 6, 9, blank, blank, 10"
The "blank" is there to tell you you should put the number of a blank page there, otherwise it'll print pages you don't want. You can't simply omit these because then page 10 wouldn't be behind page 9. In fact, I'm going to add an option that allows you to keep the numbers instead of having the "blank" thing.
You can change the pattern to whatever you want, like c(1, 4, 5, 2, 3) for example.

Anyway, I don't think anyone here cares about this but I don't have anyone else to tell this to.
#34103
Ithior said: ↑
Already did the function. Ran into some trouble because I was making it more complicated than it had to be, but it was still pretty easy.

Edit: altered it even further so it can be used for different patterns, different start page and different last page.
You input something like this in the R console:
pages(first = 1, last = 10, pattern = c(1, 3, 4, 2))
And it returns:
"1, 3, 4, 2, 5, 7, 8, 6, 9, blank, blank, 10"
The "blank" is there to tell you you should put the number of a blank page there, otherwise it'll print pages you don't want. You can't simply omit these because then page 10 wouldn't be behind page 9. In fact, I'm going to add an option that allows you to keep the numbers instead of having the "blank" thing.
You can change the pattern to whatever you want, like c(1, 4, 5, 2, 3) for example.

Anyway, I don't think anyone here cares about this but I don't have anyone else to tell this to.

It's plenty interesting! I've done a fair bit of programming (being a computer science student and all), no R though. I haven't written much code this summer, so I might borrow this idea for a little exercise.

Also, why not take the blank page number as part of the command?
#34104
Pyrophosphate said: ↑
It's plenty interesting! I've done a fair bit of programming (being a computer science student and all), no R though. I haven't written much code this summer, so I might borrow this idea for a little exercise.

Also, why not take the blank page number as part of the command?

Good idea, I'll add that!
#34105
If it doesn't fit in four tweets or less, it's doesn't belong on Twitter.
#34106
Pyrophosphate said: ↑
It's plenty interesting! I've done a fair bit of programming (being a computer science student and all), no R though. I haven't written much code this summer, so I might borrow this idea for a little exercise.

Also, R is not very hard to learn. You won't use it to write programs or apps (unless you use special packages that create the necessary HTML code). It's mainly used to analyse data, for statistical stuff and to create graphs.
#34107
You Only Live One thousand times
#34108
Friday! Friday! Gotta get down on Friday!..

😉
#34109
PugofCrydee said: ↑
Friday! Friday! Gotta get down on Friday!..

😉

But it's only... Thursday :question:
#34110
Opaline said: ↑
But it's only... Thursday :question:

Not here on Spaceship Australia with Captain Tony on the bridge, we're way in the future, man
#34111
Combing a cat's tail is a mission in and of itself. You need to pin the little bugger for it.
#34112
kihira said: ↑
Not here on Spaceship Australia with Captain Tony on the bridge, we're way in the future, man

Will we like the future? What's it like?
#34113
Nanita said: ↑
Will we like the future? What's it like?

Partly cloudy with a maximum of 12C :perfect:
#34114
Nanita said: ↑
Will we like the future? What's it like?

Popular culture seems to believe it will include zombies. :bigsmile:
Not sure why though? :question:
#34115
kihira said: ↑
Not here on Spaceship Australia with Captain Tony on the bridge, we're way in the future, man

I know, just being stupid 😉
#34116
planemo said: ↑
Popular culture seems to believe it will include zombies. :bigsmile:
Not sure why though? :question:

Some believe Tony Abbott and his team Australia are zombies or reptiles.
#34117
Kiwong said: ↑
Some believe Tony Abbott and his team Australia are zombies or reptiles.

here's proof!
#34118
Politicians! *runs away and hides under the covers* 😮
#34119
Kiwong said: ↑
Some believe Tony Abbott and his team Australia are zombies or reptiles.

Actually he is a Neanderthal.
#34120
^Totally agree with you there, hoddesdon!



S_Spartan said: ↑
I was watching an ant the other day as it carried a piece of food back to the nest. The food was like 10 times bigger than the ant and the ant was really struggling. And I thought to myself, that is just like the average human except the ant doesn't have to pay taxes, get lured into debt, or spend years being educated so that it can prove that it is worthy of carrying food back to the nest.

Of course an ant's life is much more dangerous and fleeting than a human life but I'm sure that the ant has no concept of that, so...
^ My thoughts when I see wild animals are like yours.

I frequently watch birds fly around in the large trees in my backyard.

They are so god damn FREE!
They can go wherever they want, do whatever they want, whenever they want.
I look at them with such ferocious burning envy.

‹ Back to Off-Topic