-  [WT]  [PS]  [Home] [Manage]

  1.   (new thread)
  2. (for post and file deletion)
  • Supported file types are: GIF, JPG, PNG, TXT
  • Maximum file size allowed is 5120 KB.
  • Images greater than 200x200 pixels will be thumbnailed.
  • Currently 369 unique user posts. View catalog

  • Blotter updated: 2010-08-30 Show/Hide Show All

Donate to 7chan to keep us going another month: Goal $20/200 Due 9/1 Check IRC for Paypal info
Or donate using Alertpay
Amount (USD)

File 125962830970.png - (82.75KB , 256x256 , 124406518613.png )
6612
The official /pr/ classroom sticky. FoRM ## Mod ## 09/11/30(Mon)16:45 No. 6612 Stickied [Reply] [Last 50 posts]

I've been reading through the recent thread about collaboratively learning a language, and it piques my interest. It gave me the idea to organize this shit to actually help /pr/ learn a new language.

Basically, people post assignments in this thread for the language we're trying to learn. Those assignments will be coded in a file called answer(question number).txt, uploaded here. Once the answer to a given assignment is confirmed correct, the assignment will be officially CLOSED and all other answers to the assignment after its closing (identified by a post by me indicating the assignment is closed) will be deleted.

Follow me so far?

For example, Assignment #1 is to display the words Hello, World. You would then post answer1.txt with the correct code and if it was verified correct I would post about it.

----THREAD RULES----
#1 - This thread is a no-troll zone. All completely off-topic posts will be deleted and may result in a ban.
#2 - DO NOT post your code in the Message section of the post. All answers go in the accompanying .txt file.
#3 - Names/tripcodes are urged in this thread to clear up any confusion.
#4 - The language we are going to be doing assignments in is C. That was the overall consensus I got. If you disagree with this and want to do another language, don't worry, other languages will be included in this later on.
#5 - Remember, we are learning a language here. Hints and tips on the assignment post are allowed and encouraged. Also, no extreme-difficulty assignments allowed. I'll be in charge of what is okay and what is not okay.

Message too long. Click here to view the full text.

76 posts and 25 images omitted. Click Reply to view.
>>
IRC Anonymous 10/08/28(Sat)12:33 No. 9641

Options are these: 1 download opera (build in irc client) ,2 download the firefox plugin (chatzilla) 3 download a irc client (google:"irc client free").

Btw this is pointers explained: http://boredzo.org/pointers/



File 128345296662.jpg - (9.17KB , 400x267 , hand_reaching_clouds.jpg )
9687
Anonymous 10/09/02(Thu)11:42 No. 9687 [Reply]

Halp /pr/.

I'm not a good programmer, but am forced to pull out some code, as the dorm network just got updated. Good bye fixed IPs, welcome DHCP that must DHC every 4 hours. This kills my SSH, and and any streaming that happens to be under way at the moment. It's generally a big pain in the ass.
Now, I've noticed, if I am like a haw waiting the time out and relogin precisely when it happens, I can keep my downloads.

So, I figure I use some crude shell script to fire wget, using its capability to --post-data, repeating madly around the time the connection is supposed to time out.

This is the part that should refresh my interwebs.

wget --no-check-certificate --post-data auth_user^=tek000^&auth_pass^=FUCKOY^&rediurl^=http%3A%2F%2Fgoogle%2Ecom https://auth.kotinet.fi:8001

It doesn't work.

My current lead is, that https://auth.kotinet.fi:8001 should be replaced with something like https://auth.kotinet.fi:8001/auth.php -url to the script to which the html form is submitted. In the source code of the login page, there is no url to any script, just action="", so it must be defaulted at the httpd.conf or what ever ISS calls its equivalent.

How could I obtain the name of the default script? google doesn't find anything (as its not mentioned in the login page source, it isn't visited by the google crawler either).

So, my last straw: is there any widely used names for the cgi-program?
Message too long. Click here to view the full text.

>>
Anonymous 10/09/02(Thu)16:26 No. 9690

Have you tried index.php, etc?
I suppose you could also see it with Wireshark, since HTTPS doesn't encrypt URLs.

>>
Anonymous 10/09/03(Fri)04:47 No. 9692

Kinda in the same vein >9690 said, but a little easier: Use Firefox and install HttpFox or other similar utility. This will let you look at the HTTP traffic. You can then login to your school network and then look at exactly what is taking place.

You should fuck with them back and change your hostname and MAC address every day.

>>
Anonymous 10/09/03(Fri)07:27 No. 9693

http://sectools.org/packet-crafters.html

http://sectools.org/web-scanners.html

Use a combination of these + wireshark to get what you want.



File 128341482673.jpg - (42.50KB , 340x471 , mtg.jpg )
9683
Magic the gathering Anonymous 10/09/02(Thu)01:07 No. 9683 [Reply]

I realize this is pro, I have posted here helping people before. But I need math help and don't know where else to go, and don't know where to begin working it out for myself, so please hear me out.
So there is a shuffled deck of 60 cards.
Within it are 4 of card A and 4 of card B.
Scenario 1:
I draw 7 cards. What are the chances of seeing 1 or more of card A AND 1 or more card B.
Then, if I only have 1 or more A OR 1 or more B I draw another card. What are the chances of it being B if I already had A OR A if I already had B?
Scenario 2.
I draw 7 cards, get either 1 or more A OR 1 or more B or neither. Shuffle the cards back in and draw 6 cards then follow as in Scenario 1.

>>
Anonymous 10/09/02(Thu)04:13 No. 9684

More of a probability question than a programming question. I'd check this page: http://www.kibble.net/magic/magic10.php

Basically the probability of pulling 1 card out of 4 from a 60 card deck is ~39.9% chance, pulling two cards out of a set of eight from 60 goes down to 20% and so on. From there you can reduce the total number of cards, and chances of remaining cards down, fairly simple. I'd setup a formula in excel or something, would be easier to visualize.

>>
Anonymous 10/09/02(Thu)19:44 No. 9691

>>9684
It's not quite that simple though.
It's not 2 out of 8 from 60.
It's 1 out of four and 1 out of four again, but thank you, I will check the link



File 128294121484.jpg - (48.38KB , 530x530 , 20090212202535!Glider_rubik.jpg )
9626
Anonymous 10/08/27(Fri)13:33 No. 9626 [Reply]

hey, oldfag here.
nice to see that the classroom sticky still exists.

anyway, /i/ is long gone and i need to /r/.
metasploit express

figured this would be the most appropriate board for it.

>>
Anonymous 10/09/02(Thu)12:13 No. 9689

Q. Why should people purchase Metasploit Express when they can use Metasploit for free?

A: They have nothing better to do than burn 3k per license on retards. If 'professionals' need an easier method than the 'point-click-root' msf offers already, they're doing it wrong.

Lets see what the FAQ says:
"Metasploit Express goes above and beyond by delivering a full graphical user interface, automated exploitation capabilities, complete user action audit logs, combined with an advanced penetration testing workflow."

I have news for you op: It's called msfweb, autopwn, /.msf3/logs or even http://blog.happypacket.net/, and uhhh marketing speak? Win to HDM for gettin real paid, but fail to op, learn2rtfm.

Then again, I hear you can't teach an oldfag new tricks..



File 128338673161.jpg - (8.68KB , 300x300 , 41MNKH9MXTL__SL500_AA300_.jpg )
9682
Bourne Shell Anonymous 10/09/01(Wed)17:18 No. 9682 [Reply]

So I'm attempting to learn shell scripting, and I was advised to start out with Bourne Shell, then going to bash. Looking for a good resource if anyone knows any

>>
Nattajerk 10/09/02(Thu)10:20 No. 9685

type "help" in the shell, basically.

although as far as books go, im not sure



File 128283247262.jpg - (48.94KB , 348x308 , windows-logo.jpg )
9614
OS Anonymous 10/08/26(Thu)07:21 No. 9614 [Reply]

Hello /pr/ I dont know if this is the right place to ask this but I require assistance writing my own OS. I need someone who is proficient in C++. I also have some other projects that I also need help on

8 posts and 1 image omitted. Click Reply to view.
>>
Anonymous 10/09/01(Wed)13:40 No. 9680

>>9676
>You're retarded
Maybe, but I've written an OS. Have you?

>>
Anonymous 10/09/01(Wed)13:47 No. 9681

>>9680
Only for a hypothetical machine, together with it's emulator.

>>
Anonymous 10/09/02(Thu)11:57 No. 9688

>>9681
Ah, you must be an expert then



File 128310663338.jpg - (218.42KB , 1257x1257 , post.jpg )
9653
Anonymous 10/08/29(Sun)11:30 No. 9653 [Reply]

Just sharing my simple public domain PHP script for dumping images, since xChan doesn't seem to support 7chan's "4 images per post" feature.

It doesn't have HTTPS support though :( If someone knows how to fix that, that'd be awesome

Also if someone's bored enough to port it to Python and share it, that would be a nice bonus as well, since I've been meaning to learn Python and I find looking at other people's code is the best way.

>>
Nattajerk 10/08/29(Sun)18:35 No. 9658

i have one made in Perl, somewhere. ill post it later

>>
Nattajerk 10/09/01(Wed)11:18 No. 9678

this is omgwtfidied's version, with a bit of tweaking for new 7chan. some other anonymous poster also helped with this when i was trying to get it to work (he did the regex)

it only supports 1 image, and requires curl to run

http://pastebin.com/Lvq9JdtF

>>
Nattajerk 10/09/01(Wed)11:32 No. 9679

http://pastebin.com/yTsXNfY2

and here is mine in perl, still requires curl - its kind of messy, i think it works...

i really dont remember, usually if im dumping its not enough t load anthing up. and if it is. then im too lazy to do it.

i remember having this working in say though, and i also tested it on a few threads in cake,

you would invoke it by calling the program

./program.pl -b [board] -t [threadnumber]



File 128336029383.jpg - (7.76KB , 261x218 , c_for_speed.jpg )
9674
Anonymous 10/09/01(Wed)09:58 No. 9674 [Reply]

question here, what is a good mobile c ide, like if I wanted to program on a school computer so that I could run it off my usb drive. Is there a way to configure Dev-C++ to run off a usb or is there one for this purpose

>>
Anonymous 10/09/01(Wed)10:03 No. 9675

install cygwin on your usb

>>
Nattajerk 10/09/01(Wed)11:13 No. 9677

I believe Minge is portable

Dev-C++ is also portable,
as is Code::Blocks, but i believe it requires a bit of tweaking.
http://forums.codeblocks.org/index.php?topic=7100.0;wap2



File 128296643920.jpg - (22.81KB , 382x400 , AlbinoBallPythonWHSnP2_U48.jpg )
9633
Victor 10/08/27(Fri)20:34 No. 9633 [Reply]

Python is a easy language. It can do in 1 line what takes C++ 3 or 4 lines to do. Why isn't it more widely used in the gaming industry?

Is it a reluctance to change? Or something else?

7 posts and 1 image omitted. Click Reply to view.
>>
Anonymous 10/08/31(Tue)03:01 No. 9665

It kinda is. CPP (eve online) use it extensively for scripting. Look up stackless python. However, for everything else where python could be used, lua is the standard, and it does a mighty fine job.

>>
Anonymous 10/09/01(Wed)04:14 No. 9670

It's too slow for things like graphics, physics, sound calculations etc.

But it's perfect for in-game scripting like logic routines, and AI.

>>
Anonymous 10/09/01(Wed)07:15 No. 9671

>>9670

lol depends on the quality of the graphics.



File 128131054024.jpg - (30.11KB , 254x380 , coin-flip.jpg )
9413
Anonymous 10/08/08(Sun)16:35 No. 9413 [Reply]

OK... semi-stupid question.

Let's say I wrote, as an academic exercise, a program to generate random bits. An electronic coin flipper.

Thanks to the magic of binary you can make this a random number generator by collecting buckets of random bits.

Now, if the underlying algorithm I used to generate those random bits is flawed, then the bits are nonrandom, and thus anything derived from them (such as say, a password generator) is nonrandom.

This got me to thinking... a lot of research makes use of randomly generated numbers and random number generators.

How the hell do you verify a RNG is working correctly? I mean, obviously, you can't be 100% certain, but how does one reasonably assure themselves a data set is sufficiently random?

(If you want to have a one on one convo/private, feel free to email the ironically named throwaway email.)

4 posts and 1 image omitted. Click Reply to view.
>>
Anonymous 10/08/24(Tue)09:32 No. 9593

To be more rigorous, you want the entropy of the next bit (in the information theoretic sense) to be as high as possible.

http://en.wikipedia.org/wiki/Entropy_%28information_theory%29

Check out Shannon's paper "A Mathematical Theory of Communication". It managed to launch an entire field of study in just over 50 pages.

>>
Anonymous 10/08/31(Tue)15:12 No. 9666

You could do a fourier transform of a string of outputs and see if anything sticks out. Also a bunch of signal processing stuff, I am guessing.

>>
Anonymous 10/08/31(Tue)15:13 No. 9667

Also, do a histogram to see what the distribution is like. Doesn't tell if it is random, but does give an idea of what you RNG looks like.



Delete post []
Password  
Report post
Reason