Leave these fields empty (spam trap):
Name
You can leave this blank to post anonymously, or you can create a Tripcode by using the float Name#Password
A subject is required when posting a new thread
Subject
Comment
[*]Italic Text[/*]
[**]Bold Text[/**]
[~]Taimapedia Article[/~]
[%]Spoiler Text[/%]
>Highlight/Quote Text
[pre]Preformatted & Monospace text[/pre]
1. Numbered lists become ordered lists
* Bulleted lists become unordered lists
File

Sandwich


java script environment by Rebecca Blatherlock - Wed, 28 May 2014 21:27:55 EST ID:qg3wSIMo No.31821 Ignore Report Reply Quick Reply
12.jpg -(80085 B, 666x69) Thumbnail displayed, click image for full size. 80085
how do i set up a java script environment
11 posts omitted. Click Reply to view.
>>
Ebenezer Cammleforth - Sat, 02 Aug 2014 18:45:05 EST ID:FZosnFQ9 No.32177 Ignore Report Quick Reply
1407019505157.jpg -(501086 B, 662x1000) Thumbnail displayed, click image for full size. 501086
>>31966

>The idea of running a bunch of random stuff off the Internet as root is pretty upsetting.

What the fuck are you babbling about, you dildo?

Do you think that node.js runs client-side js code sent by a user?

Please kill yourself.
>>
Thomas Cuzzletutch - Mon, 04 Aug 2014 12:47:17 EST ID:2PLGUfus No.32186 Ignore Report Quick Reply
>>32177
>JavaScript anything
>Secure

Fuck you.
>>
Phoebe Hezzletut - Mon, 04 Aug 2014 17:01:04 EST ID:LRgXFCUp No.32187 Ignore Report Quick Reply
>>32177
It can. I actually have a project where I do just that.
I would however never consider running user submitted js server-side.

But realistically I think he meant node.js packages by "random stuff off the internet", to which I agree. Others have posted solutions to the root "problem".
>>
Jenny Fopperfidge - Tue, 05 Aug 2014 03:55:53 EST ID:xp53+oHk No.32198 Ignore Report Quick Reply
1407225353418.png -(19375 B, 512x512) Thumbnail displayed, click image for full size. 19375
>>32187

>It can. I actually have a project where I do just that.

It's not default behavior, and it has nothing to do with node.js. You could write a PHP (or Perl, or Python, or bash CGI etc.) program that accepted client-side js and called rhino or v8 to run it. So what?

>But realistically I think he meant node.js packages by "random stuff off the internet", to which I agree.

Sorry, that's not any less retarded. Unless you run Windows or Mac OS X with absolutely no third-party software, you're running "random stuff off the internet" all the time. And, unlike node.js packages, source code is rarely available with the programs people run all the time. But I'm sure Basil compiles all of his own software, after auditing the source code, of course, and ensuring that the compiler he's using isn't backdoored. And that there's no malicious CPU microcode on his system.

Do web dev in Ruby? Hope you don't use any gems.
Python? Better not need anything outside of the standard library.
Go? Don't even get me started.

Even if you run a Linux distro, you're running binaries packaged by hundreds of people all over the world. And even if there are no malicious packagers among them, there are certainly some error-prone ones. Like the Debian packager who fucked up the key generation in openssl a few years ago.
>>
Wesley Pongerlure - Wed, 06 Aug 2014 05:57:39 EST ID:U3jBu9kq No.32205 Ignore Report Quick Reply
>>32198
Yes, I do run random stuff off the internet.
Most of that stuff does not listen to connections from internet, most (?) node.js programs do.
Those programs that do (openssh, nginx, iptables etc.) have a longer history and I would hope a rather strict code review before the code commits get deployed. In other word to get something malicious (either deliberately or be accident) running within these is hopefully hard. It happens, but it's relatively rare and it does get spotted.

On node.js (or rails/pip/cpan) however anyone is free to create a package (my understanding, correct me if I'm wrong), write a description of their liking and deploy the package easily. There is no official code review.

Bottom line is: There is no computing without trust any more. I hope I can trust some vendors, who do their job in keeping me safe. I however will never trust every packet in aforementioned systems, because that would require me to trust my servers to anyone who can write "node deploy".


C++ Program Structure by Matilda Soshfadging - Fri, 01 Aug 2014 19:13:07 EST ID:P9SUlxwZ No.32172 Ignore Report Reply Quick Reply
1406934787204.jpg -(45720 B, 626x768) Thumbnail displayed, click image for full size. 45720
Wait is the best way to structure a program so that as many classes as possible have access to some universal elements? In my case these elements are the SDL Renderers, Textures, Windows etc.

I started with having them all in a main engine class but now that I have got to working on the tiles and other things this approach is no longer feasible.

Recommendations?
>>
Matilda Cuvingpodge - Fri, 01 Aug 2014 21:38:45 EST ID:ldVzF+rJ No.32173 Ignore Report Quick Reply
What about having a constants.h file you include everywhere else?
>>
Whitey Sobblechire - Sat, 02 Aug 2014 13:17:48 EST ID:7alaund4 No.32174 Ignore Report Quick Reply
>Wait is the best way to structure a program so that as many classes as possible have access to some universal elements?

Don't structure your program this way in the first place?
>>
Charlotte Pazzletidging - Mon, 04 Aug 2014 20:32:07 EST ID:P9SUlxwZ No.32189 Ignore Report Quick Reply
1407198727800.jpg -(1605557 B, 1588x1900) Thumbnail displayed, click image for full size. 1605557
>>32173

That would work I think, but I have been told that globals are the devil. Am I wrong?

>>32174

I am new and clumsy at programming.
>>
Phineas Sindleletch - Mon, 04 Aug 2014 22:42:07 EST ID:xUAnupXV No.32193 Ignore Report Quick Reply
http://www.stroustrup.com/bs_faq2.html#object

Just look at other programs in C++ and see how they structure their programs.
>>
Nicholas Pittwell - Tue, 05 Aug 2014 19:40:12 EST ID:XXer/JVh No.32201 Ignore Report Quick Reply
It boils down to one .cpp file and one .h file for every class. You can use larger files with multiple classes where every file can work as a sort of standalone application (unix style) but thanks to java and it's clones that is a dying art.


Am I retarded? by Shitting Pavingridge - Mon, 04 Aug 2014 04:53:24 EST ID:9UeGRJru No.32184 Ignore Report Reply Quick Reply
1407142404043.png -(622 B, 121x20) Thumbnail displayed, click image for full size. 622
No matter the language, whether it be Python, JS, or HTML, I can understand simple shit, but at a certain point I just hit a wall. Am I too dumb to program, or do I just need to work harder?
>>
driven !FTPgBqDDy. - Mon, 04 Aug 2014 05:01:55 EST ID:n0FY79zE No.32185 Ignore Report Quick Reply
>>32184
What's the 'certain point'? Programming can be hard without having a specific. necessary application to work towards. Also, HTML doesn't really have a learning curve (it's kind of the gateway drug to programming nowadays), so I'm kind of curious as to what kind of brick wall you're hitting with it.. I mean, if you can't into HTML, I'm surprised you're even mentioning python and JS.

Not trying to be mean, you're probably just missing some crucial thing, so pls respond
>>
Phineas Sindleletch - Mon, 04 Aug 2014 22:39:10 EST ID:xUAnupXV No.32192 Ignore Report Quick Reply
Read SICP.
It's the book on how to program, still to this day. Teaches the full theory of programming without teaching you a language. Google "How to start SICP trek" by the Hacker School in Berlin and read it.

After go back to your python or other imperative language and realize "shit this is easy". The reason you can't understand anything is you are trying to learn a language, not programming itself.


Spellcheckers by David Pottingstone - Sat, 26 Jul 2014 06:43:56 EST ID:Hj+KGQ74 No.32124 Ignore Report Reply Quick Reply
1406371436733.jpg -(100598 B, 540x577) Thumbnail displayed, click image for full size. 100598
I am interesting in knowing how spell checkers work.
As for detecting a misspelled word, that's easy: you can just tokenise the input, and check that each token (word) is also present in the word list. If it is not found, then it's probably a typo.

The hard thing is probably to see what word could have been meant. If you type something wrong, most spell checkers can suggest the right spelling for you. How is this achieved? Let's assume there's a function that tries to match two words (one can be the word that you want to check, and the other can be a word from the word list). It will return if the word is an exact match, and if not, how good a match it is. This function can generate many mutations of the word to compare, by switching letters around, dropping or inserting letters, trying different letters, etc. Confidence in the match can be worked out depending on the combination of mutations.
It seems to me that this method would be very slow though, especially considering that a word list will inevitably have many thousands of words in it.

Do spellcheckers work in the way I described, or differently?
>>
James Haffingmatch - Sat, 26 Jul 2014 14:05:07 EST ID:isjh7MwE No.32128 Ignore Report Quick Reply
http://engineerbyday.wordpress.com/2012/01/30/how-spell-checkers-work-part-1/
>>
Betsy Niggerhood - Mon, 04 Aug 2014 00:58:29 EST ID:EOC1VTSz No.32182 Ignore Report Quick Reply
>>32128
That link (and part 2) don't say how to make the function fast. He leaves it as a hanging question at the end of part 2, implying that he'll address it in part 3, but there is no part 3.
>>
James Bunfuck - Mon, 04 Aug 2014 02:45:10 EST ID:isjh7MwE No.32183 Ignore Report Quick Reply
>>32182
Well make it work first and then make it work fast later!


Colorscheme by Jerker - Tue, 29 Jul 2014 00:14:38 EST ID:jaqLWMrW No.32135 Ignore Report Reply Quick Reply
1406607278508.png -(258370 B, 1366x768) Thumbnail displayed, click image for full size. 258370
Which looks better?

Also, Colorscheme Thread.
2 posts omitted. Click Reply to view.
>>
Hedda Secklenotch - Tue, 29 Jul 2014 20:29:08 EST ID:292Xzs1e No.32148 Ignore Report Quick Reply
Left fo sho. The font size is a bit small for my liking though. I also find increasing line height by a few px (some editors can, some can't) makes a huge difference in readability and eye strain, and you only lose one, maybe two lines depending on your screen real estate.
>>
Martha Sindleson - Wed, 30 Jul 2014 03:45:12 EST ID:xMDei66K No.32152 Ignore Report Quick Reply
The left. Also Zenburn is amazing. I have tried for years to like Solarized, but it just sucks so bad.
Also, here's a theme demo page
http://ace.c9.io/build/kitchen-sink.html
>>
Frederick Pittbury - Wed, 30 Jul 2014 05:06:18 EST ID:jaqLWMrW No.32154 Ignore Report Quick Reply
1406711178623.png -(87241 B, 1366x768) Thumbnail displayed, click image for full size. 87241
How about now, I background color be the same.
>>
William Turveyham - Wed, 30 Jul 2014 13:57:03 EST ID:qKBdQhVD No.32159 Ignore Report Quick Reply
>>32154
Left still appears to have a darker background, which I like, but I prefer the text coloring on the right. Not the colors I would've picked, though.
>>
Rebecca Fuckinghall - Sun, 03 Aug 2014 03:45:43 EST ID:9UeGRJru No.32181 Ignore Report Quick Reply
>>32154
Right.

Also if Sublime Text were a hooker I'd pay the $70 to have sex with it. Damn, it's a beautiful-looking program.


Best places to live with a degree in CS? by Basil Devingsed - Sun, 03 Aug 2014 02:12:13 EST ID:8CO5us37 No.32180 Ignore Report Reply Quick Reply
1407046333918.jpg -(95047 B, 800x594) Thumbnail displayed, click image for full size. 95047
I'm Canadian but Ottawa seems like a neat city to move to. Currently in bumfuck nowhere and will be done my degree in 2.5 years.


Code noob by Ernest Hemmlefuck - Tue, 15 Jul 2014 18:50:43 EST ID:N1gJl5zK No.32072 Ignore Report Reply Quick Reply
1405464643530.jpg -(212008 B, 521x737) Thumbnail displayed, click image for full size. 212008
So I'm a total beginner to coding. I just started learning java on code academy. So far its pretty simple.
After java I was planning on moving to C#.

My eventual goal is to make a unity game ive had in my head for years.

Any tips or advice for a new coder?
>>
Cornelius Craddlewatch - Wed, 16 Jul 2014 16:55:47 EST ID:iAWx5Owe No.32074 Ignore Report Quick Reply
Use variable names that mean something.

Learn a good formatting style for your language.

Utilizing Pseudo-code on a pad of paper can help create cleaner concepts and designs before ever typing something.
>>
Charles Bozzleheck - Wed, 16 Jul 2014 19:26:06 EST ID:d/kdxZu0 No.32075 Ignore Report Quick Reply
[h1 class="groovy]>>32072[/h1]
>>
Charles Bozzleheck - Wed, 16 Jul 2014 19:26:54 EST ID:d/kdxZu0 No.32076 Ignore Report Quick Reply
[h1 class="groovy"]>>32075[/h1]
>>
Sophie Nezzlefuck - Wed, 30 Jul 2014 11:39:57 EST ID:J1KthLSY No.32157 Ignore Report Quick Reply
>>32072
Try hard not to succumb to laziness and a "I'll fix this later" attitude. This struggle is eternal, embrace it. Try to approach all problems as challenges where good style awards more points than "it's working but I'm not sure how": try to get a clear understanding of what you're doing instead of blindly jumping in to write code (but don't forget that reading can't teach you how to program, only programming can). In fact, a clear understanding of what you're doing on the conceptual level is essential, because you have to turn that abstract algorithm into unambiguous orders for the computer to perform. There can be no magic or miracles between any of the steps.

Try to remember that you're trying to learn the idea of programming. Languages (with their specific pros, cons and kinks) are just a material you use to communicate to the computer what you want to do. If you've advanced on this path far enough, you'll know that a specific language can be learned in a short time.

As you progress, read your old code every once in a while: you'll notice stuff that is awkward or just plain bad. Refactor often with your newfound understanding, and don't worry about sunk costs: if you wrote 2000 lines to do something and realize that it's not a very good approach, don't be afraid to scrap all of it and rewrite the thing in a better way. It might seem like writing that code was wasted time from the point of view of the project, but it wasn't actually wasted: you couldn't have figured out a better way and grown as a programmer without doing it the wrong way first!

Please don't be a tool and forget to:
-COMMENT YOUR CODE (seriously, if your project is more than a disposable helper script, you'll spend a lot of time going "what the fuck is happening here", even if you're the sole author. this is true even if you do comment your code, and is vastly amplified if you don't.)
-ADHERE TO PROJECT/LANGUAGE STYLE (might eliminate some typo induced teeth grinding. your favourite style is not the best, consistency of the code base is the best.)
-USE DESCRIPTIVE FUNCTION AND VARIABLE NAMES EVEN IF TH…
Comment too long. Click here to view the full text.
>>
Albert Sammlekid - Sat, 02 Aug 2014 20:11:21 EST ID:CmcHTLaD No.32178 Ignore Report Quick Reply
>>32157
I think you forgot to advise OP to comment his code.


Books about... by Isabella Pirryspear - Sat, 02 Aug 2014 17:38:21 EST ID:cppQ0lhn No.32175 Ignore Report Reply Quick Reply
1407015501211.png -(201844 B, 600x375) Thumbnail displayed, click image for full size. 201844
re-post from computers and tech... pic unrelated...
I want to understand my computer in and out. Hardware, firmware, boot managers, CLIs, UNIX and UNIX-like OSs, display/window/desktop managers, filesystems, programming languages, servers, networks... Which books will get me started? Should I be studying math?


I fail at programming by Molly Modgefod - Thu, 31 Jul 2014 13:00:52 EST ID:5kGtwHc6 No.32166 Ignore Report Reply Quick Reply
1406826052309.gif -(1044312 B, 250x300) Thumbnail displayed, click image for full size. 1044312
I have a project I need to finish in two months.
It's a Flappy Bird clone.
In java.
And I just don't get it. I have some idea about what I want in my prep-code, but it's not concise enough. I am not concise enough.
Furthermore I just can't use the fucking API, I try to read and understand it, I import it, try to make a reference after creating a new object from a class and BOoOoOM!
It explodes right in front of my face.
Why, what do I not understand?
>>
Wesley Fimbletot - Thu, 31 Jul 2014 21:27:09 EST ID:xtelIQ1k No.32167 Ignore Report Quick Reply
>Why, what do I not understand?

Debugging, among other things.
>>
Hamilton Billingham - Thu, 31 Jul 2014 22:51:36 EST ID:ZMQnkpih No.32168 Ignore Report Quick Reply
It's really difficult to answer non-specific questions. I think that you'd have more luck if you were to post your code and the specific error you are experiencing (rather than "Boooom").
>>
Eugene Smallwater - Fri, 01 Aug 2014 12:49:19 EST ID:+gSlvDXv No.32171 Ignore Report Quick Reply
>>32168

exactly this. share your code and errors, with us and we can try to help you. (and please use pastebin or something not just copy paste onto the board)
>>
Ebenezer Cammleforth - Sat, 02 Aug 2014 18:34:14 EST ID:FZosnFQ9 No.32176 Ignore Report Quick Reply
>>32166

Hamilton is right. Stop talking like a dipshit. We're not mind readers.

Also I lol'd at

>it's not concise enough. I am not concise enough.

If you want concise, you're using the wrong language.


C++ Header by Ian Hucklehet - Thu, 31 Jul 2014 04:38:16 EST ID:+7WhLoNb No.32164 Ignore Report Reply Quick Reply
1406795896091.png -(17319 B, 844x373) Thumbnail displayed, click image for full size. 17319
Hi!
Can someone help me here please, or explain how I have to include header files in c++?
So I have a project in where I use sqlite
lets say I have a class 'aaa' in aaa.cpp and the header aaa.h
I want to use sqlite in there, so I included sqlite.h in aaa.h
So when I want to use my database in a method in aaa.cpp it can't link it
I've never done anything with c/c++ so I'm confused by this whole header-thing, I've read it up but I don't know what I'm doing wrong.

thanks in advance!
>>
Hamilton Billingham - Thu, 31 Jul 2014 23:07:11 EST ID:ZMQnkpih No.32169 Ignore Report Quick Reply
If you were compiling with gcc you'd pass "-lsqlite3" to link to the sqlite3 library. It looks like you are using an IDE though?

You should also use angle brackets instead of double-quotes in your sqlite3 include line as it will search for the header in more places.
>>
Edwin Blaggleway - Fri, 01 Aug 2014 05:41:30 EST ID:5ZOtXjaq No.32170 Ignore Report Quick Reply
>>32169
yeah thanks!
I'm using dev-c++
I didn't know that I have to add the .c and .h file of sqilte to my project, but it works now.


Help with pointers in c by Martin Pittbanks - Mon, 28 Jul 2014 22:25:49 EST ID:KH9l0Yka No.32133 Ignore Report Reply Quick Reply
1406600749463.png -(21455 B, 806x110) Thumbnail displayed, click image for full size. 21455
I'm trying to write a program in which a user inputs his credentials, and then prints them out.
I think I have everything right except for the pointers.
I can't seem to figure out how to work with them.
Can someone point me in the right direction on what to do?
http://pastebin.com/YbuTtaTk
11 posts and 1 images omitted. Click Reply to view.
>>
Augustus Hashmidging - Tue, 29 Jul 2014 23:10:34 EST ID:KH9l0Yka No.32150 Ignore Report Quick Reply
>>32149
isn't getchar()==ans supposed to give the value of whatever the user has inputed to "ans".
i've used those exact lines in other programs and they haven't given me trouble
>>
Nell Honeydale - Wed, 30 Jul 2014 01:18:04 EST ID:ZMQnkpih No.32151 Ignore Report Quick Reply
>>32150
== is equality, it evaluates to true or false,
#include <stdio.h>

int main( void ) {
int a=1;
int b=2;
printf( "%d\n", a==a );
printf( "%d\n", a==b );
return 0;
}


I think you are looking to assign (single =), "ans = getchar();"
>>
Simon Worthingridge - Wed, 30 Jul 2014 17:51:44 EST ID:OU/QRZdo No.32160 Ignore Report Quick Reply
>>32151
thank you!

Does anyone know why when I enter the dob numbers, for example 09091993, the program only prints 9091993?
>>
Betsy Greenfoot - Wed, 30 Jul 2014 18:11:09 EST ID:vhgZIlcV No.32161 Ignore Report Quick Reply
>>32160
Because you save it as a whole number. It makes sense to print any number with no preceding zeroes. You can use printf formatting to tell it to pad the output with a character of your choosing. I think printf("%.8d", <dop>) should work.
>>
Beatrice Drezzlenet - Thu, 31 Jul 2014 03:03:01 EST ID:ZMQnkpih No.32163 Ignore Report Quick Reply
>>32160
You might want to use a string for that.


Python and encodings by Shit Brobberworth - Thu, 31 Jul 2014 02:56:59 EST ID:Hj+KGQ74 No.32162 Ignore Report Reply Quick Reply
1406789819931.png -(30245 B, 644x388) Thumbnail displayed, click image for full size. 30245
I am setting out to write a python program to parse a dictionary. I know the format of the dictionary file, and it will do nicely to take each line from the file and .split() it into tokens.

But something does not seem to like the UTF-8 characters I copy-paste into the terminal. I thought that python handles everything in Unicode internally?
What can I do to troubleshoot this problem?
>>
William Nushlit - Thu, 31 Jul 2014 12:09:45 EST ID:xh0Eouzb No.32165 Ignore Report Quick Reply
1406822985337.jpg -(14680 B, 320x290) Thumbnail displayed, click image for full size. 14680
are you using Python 2.7 or a 3.x version? (I've a sneaking suspicion that it's 2.7)

3.x - went entirely unicode, nothing to really worry about.
2.7 - you need to use the unicode() constructor for makin that shit compatible. This should help: https://docs.python.org/2/howto/unicode.html


<<Last Pages Next>>
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Report Post
Reason
Note
Please be descriptive with report notes,
this helps staff resolve issues quicker.