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

  1.   (new thread)
  2. [ No File]
  3. (for post and file deletion)
/pr/ - Programming
  • Supported file types are: C, CSS, DOC, DOCX, GIF, H, JAVA, JPG, PDF, PNG, SVG, SWF, TXT
  • Maximum file size allowed is 10000 KB.
  • Images greater than 200x200 pixels will be thumbnailed.
  • Currently 470 unique user posts. View catalog

  • Blotter updated: 2011-01-12 Show/Hide Show All

Movies & TV 24/7 via Channel7: Web Player, .m3u file. Music via Radio7: Web Player, .m3u file.

WebM support has been added on a trial basis. Please check this thread for more info.

Nattajerk 11/09/07(Wed)10:31 No. 6 [Reply] [First 100 posts] [Last 50 posts] Stickied
6

File Structure_and_Interpretation_of_Computer_Programs.pdf - (2.21MB , Structure and Interpretation of Computer Programs.pdf )

I heart /pr/

lets start with a book thread. I have some cached learning.


110 posts and 87 images omitted. Click Reply to view.
>>
Neckbearded Basement Dweller 14/08/10(Sun)04:57 No. 4553

>>4448
It might be, but..
>>2849
Well said.




Newbie Thread patchouli!!SyAQpmZGyw 13/05/26(Sun)19:31 No. 3818 [Reply] Stickied
3818

File 136958949722.jpg - (25.15KB , 293x324 , bjarne2.jpg )

What's this? Just a compiled list of resources silly!
(Also, check out the book thread, lots of lovely stuff)
Ask newbie/where to begin questions in this thread!
~


Language Agnostic:
http://www.gskinner.com/RegExr/
http://www.autoshop101.com/forms/h14.pdf
https://www.khanacademy.org/cs

Editors:
http://www.codeblocks.org/ (great IDE for C/C++ and supports many libraries, cross platform)
http://notepad-plus-plus.org/ (good for scripting languages)
http://www.gnu.org/software/emacs/ (great editor with large learning curve)
Message too long. Click here to view the full text.


19 posts and 2 images omitted. Click Reply to view.
>>
Neckbearded Basement Dweller 14/04/28(Mon)02:31 No. 4426

>>4262
this
>>4266
And
private static synchronized void initRNG() {
if (randomNumberGenerator == null)
randomNumberGenerator = new Random();
}

And

public double nextDouble() {
return (((long)(next(26)) << 27) + next(27))
/ (double)(1L << 53);
}
Message too long. Click here to view the full text.




Neckbearded Basement Dweller 13/10/11(Fri)23:41 No. 4156 [Reply]
4156

File 138152768546.jpg - (85.38KB , 587x551 , 138119478561.jpg )

Is... is it ok if I just skip C and move right on to C++?
I... seem to find it easier reading cpp code than C, without all those enums, links, arrow operators, and shit.


20 posts and 2 images omitted. Click Reply to view.
>>
Neckbearded Basement Dweller 14/08/16(Sat)00:45 No. 4564

>>4563
Well the only think that changes using C is the code that runs in server side, the response is a html document


>>
Neckbearded Basement Dweller 14/08/16(Sat)07:55 No. 4565

OP here. Been a while since I started this, didn't think itnstill dxisted lol.
Anyway I learned both. Of course I didn't *really* learn them, I'm in the process. But I learnedn the basics of both and I'm using them both (though mostly c++) so I actually *learn*


>>
Neckbearded Basement Dweller 14/09/02(Tue)20:48 No. 4576

If you have no programming background, honestly just jump in with something easier like Python. Easier doesn't mean worse or not useful, I think with Python the time you go from 'what is programming' to making something actually useful and not just textbook example code is a lot shorter.

From there you can honestly pick up whichever, I do feel it's advised though. C gives you a good base to really figure out what's going on and if you have any intention of looking at something like x86 eventually, I'd consider it.

Just start man.




feh a shit nigger 14/08/28(Thu)01:08 No. 4569 [Reply]
4569

File 140918089256.png - (695.93KB , 1366x768 , 2014-08-27-170529_1366x768_scrot.png )

why the fuck does feh do this?
any better alternatives other than qiv or sxiv?

The problem might be an extension to my non tiling wm, which gives it basic twm abilities. Anyways, in the extension, I set it to get rid of window borders for all windows, but even if I command "feh -x file.jpg", it will still do this.


2 posts omitted. Click Reply to view.
>>
Neckbearded Basement Dweller 14/08/29(Fri)03:51 No. 4573

Post the image here.


>>
nigger 14/08/29(Fri)20:11 No. 4574
4574

File 140933589730.jpg - (62.06KB , 640x483 , sleeping pizza.jpg )

>>4573


>>
Neckbearded Basement Dweller 14/08/30(Sat)05:44 No. 4575

>>4574
It works for me with feh v2.12-1.




tilda tabs nigger 14/08/29(Fri)03:40 No. 4572 [Reply]
4572

File 140927640081.png - (183.90KB , 1366x768 , 2014-08-28-194015_1366x768_scrot.png )

how to get rid of those ugly tabs in the tilda program in the top?




Terminology and ranger i need halp 14/08/08(Fri)03:09 No. 4544 [Reply]
4544

File 140746015548.png - (35.14KB , 1366x768 , 2014-08-07-190518_1366x768_scrot.png )

Hey guys, I have a problem and I know is not /pr/ related but I have nnowhere else to go to.

The problem is that my file manager ranger won't display images on my terminal called Terminology, even though i set it in the rc.conf to preview images.
w3m-img does work in Terminology as show in pic related, I don't know what is the problem even though it works in other w3m-img friendly terminals like xterm, xvt, kterm, etc.

Please halp.


>>
sage sage 14/08/14(Thu)04:56 No. 4561

>>4544
go back to niggertits, /g/ would love to help you


>>
Neckbearded Basement Dweller 14/08/23(Sat)19:42 No. 4568

Have you set draw borders to true?




3,5 Bucket Problem Noah Fischel 14/06/21(Sat)03:09 No. 4492 [Reply]

So I'm in the running to get an internship with Zappos, and the guy I interviewed with said that I had to write a program (ANY CODING LANGUAGE) to solve a problem (that I can't even solve on paper). It's sort of like the 3,5 Bucket problem. But there's more to it. Instead of getting 4 gallons in the 5 gallon bucket, I have to get 31 in the 86, 41 in the 75, and 59 in the 309. Theres only 3 legal moves:
Fill the Bucket
Empty the Bucket
Pour Bucket X into Y.

Could anyone maybe help me figure out this problem?

here's the link to the website that describes it, along with the prompt at the bottom.

http://challenge.zappos.biz/unlv-april-2014/index.html#problem


>>
Neckbearded Basement Dweller 14/06/21(Sat)10:13 No. 4493

Why do you want a job you're not qualified to perform?

By the way, I find this degree of sophistication surprising for a website about fucking shoes.


>>
Neckbearded Basement Dweller 14/06/21(Sat)10:31 No. 4494

>>4492

Yes, we could help you figure out this problem.

You start with the fact that there is no solution in this particular case, because none of the three buckets end up being empty nor full in the end, which means that “magic happens” and magic is not allowed.

Now you simply have to write something that will prove it. And no, no code; you are required to write that one and it would be a disservice to do that for you.


>>
Neckbearded Basement Dweller 14/08/23(Sat)04:33 No. 4567

Couple of hints :
You can only produce volumes that follow the form n*gcd(v1,v2) where v1 and v2 are the bucket volumes.
This means that target volume must be
t_v mod gcd(v1,v2) = 0.
From there the only moves that make sense are filling B1 up if it's empty, emptying B2 if it's filled and if none of the above transfering B1->B2.
Same thing for the other route(B2->B1)
Run both cycles alternatively until one of them hits the solution and you've got it in O(2*short path).

I know this is outdated as hell but someone could use the reference.




Java Beginner Lamoa 14/08/06(Wed)06:17 No. 4541 [Reply]
4541

File 140729862373.jpg - (72.60KB , 500x500 , Front.jpg )

Hi guys, I just discovered /pr/ and I think this is really great. Im a first year I.T. student,and right now we're at Netbeans Java in our programming class. Im really a beginner and before taking college I have no idea about programming but I really like it.
Can you give any tips and advice on how to be a great programmer and how can I improve my logic skills.


>>
Not+A+Douche 14/08/06(Wed)06:33 No. 4542

Do yourself the biggest favor and jump all into programming!
Think of real world objects as classes and do little write-ups of the code that would be necessary to use those objects in a program.
Subscribe to a legitimate programming site where people actually go to discuss their problems like www.dreamincode.net.
Also start on projects that you and the people around you need. An example is my wife wanted a desktop application that would tell her when to go to bed if she wanted to wake up at a certain time. Even if there are already pieces of software that do an idea. WRITE IT YOURSELF!
Read over source code, see what methodology people use to solve problems. It will help you when you run into a similar problem.
Above all believe in yourself, this is one of the few professions where all of the skills can be learned, the only thing you need to bring to the table is your intellect and your imagination.
Above everything learn what the different languages are good at. They all have different strengths and weaknesses. There is no silver bullet language that is good at everything.
Happy Coding. And watch out for the bugs!


>>
Neckbearded Basement Dweller 14/08/18(Mon)03:42 No. 4566

>>4542
This.

I was in almost exactly the same position as you, OP. Barely finished my BSc.

Now I'm finally going all into it.




Colorscheme jerker 14/07/29(Tue)07:18 No. 4534 [Reply]
4534

File 140661111262.png - (252.31KB , 1366x768 , 2014-07-28-231738_1366x768_scrot.png )

Which looks better?

Also, Colorscheme thread.


5 posts and 2 images omitted. Click Reply to view.
>>
ice!.RAPE.curg 14/08/12(Tue)15:43 No. 4554

left, mainly becuase pink and red are bad for prolonged reading
also, the left has more contrast between background and foreground

also if you want a different font, i suggest looking into the different Lucidia ones


>>
CodeNoob 14/08/13(Wed)06:34 No. 4557

>>4552
does it not support ctrl+arrow keys? i thought that was a windows global thing


>>
Neckbearded Basement Dweller 14/08/13(Wed)08:22 No. 4558

>>4557
>ctrl-arrows
Doesn't work on rxvt either. It could be bash's fault, though.




I Before E Except After C Algorithm(Python) Neckbearded Basement Dweller 13/12/28(Sat)23:47 No. 4261 [Reply]
4261

File 138827083071.jpg - (68.80KB , 620x880 , wrong ie.jpg )

So I was challenged today to prove this graphic I shared on Facebook and ended up disproving it by a lot with a simple python program. As with any good scientist, I would like some people to:
1. Try it with different (>100000 words) wordlists to see if my results hold up that when "I" and "E" are both in a word the I before E rule is followed roughly 75% of the time.
2. Make sure the algorithm is correct.
Enjoy!
SOURCE: https://docs.google.com/viewer?a=v&pid=sites&srcid=ZGVmYXVsdGRvbWFpbnxoYXNlcmVubGFuZXNoZXJzdHVkaW9zfGd4OjUyM2YxYzU0YjZmYWE2N2U


3 posts omitted. Click Reply to view.
>>
Neckbearded Basement Dweller 14/01/18(Sat)10:42 No. 4277

Another big problem is that the rule only describes words where the "ei"/"ie" spell the sound "ee" as in "bee". There really are very few exceptions.


>>
Neckbearded Basement Dweller 14/04/20(Sun)15:05 No. 4412

>>4265
We almost wrote the same pieces of code.

(use (srfi 1 13)) (let ((words (string-split (with-input-from-file "en_US.txt" read-string)))) (map (lambda (pattern) (cons pattern (fold (lambda (h t) (if (string-contains-ci h pattern) (add1 t) t)) 0 words))) '("ei" "ie" "cei" "cie")))


>>
Neckbearded Basement Dweller 14/08/09(Sat)06:53 No. 4548

>>4265
So the 'except after C' part IS bullshit?




Delete post []
Password  
Report post
Reason