[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
/dpt/ Daily Programming Thread, Saint IGNUcius Edition
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 255
Thread images: 31
File: 2gIImej.jpg (38 KB, 580x346) Image search: [Google]
2gIImej.jpg
38 KB, 580x346
Previous thread: >>53855925

What source code are you editing, gee? Remember that vi is the editor of the beast
>>
File: cute blushing anime girl.jpg (2 MB, 4998x4998) Image search: [Google]
cute blushing anime girl.jpg
2 MB, 4998x4998
first for CUTE anime girls

second for making my homework team in algorithms implement all their solutions in a non-psuedo language before reverting it back to psuedo code because we got F's on the last 3 assignments
>>
>autist me want to make web
What's the way to go these days?
Never bothered learning php.. So node.js is the meme for [current.year.] right?
Html5.. Css.. Node.js something else i should consider, db? Sql?
Guide me senpai
>>
Third for Swift and ObjectiveC are great. Prove me wrong
>>
>>53864335
Just die
>>
File: wdg vs dpt trump bernie poll.png (1 MB, 1045x776) Image search: [Google]
wdg vs dpt trump bernie poll.png
1 MB, 1045x776
never forget
>>
>>53864352
>>>>>>/wdg/
>>
>>53864352

/wdg/
>>
>>53864410
>>53864449
>can't even link a search

>>53864352
>>>/g/wdg/
>>
>>53864403
Cool sample size.
>>
>>53864335
hahahahah you fucking suck at programming and life in general
>>
>>53864403
>tfw wdg has more politically educated people than dpt
>>
How do I make a web gif so I can show you guys my app
>>
>>53864288
>/dpt/

GNU/\/DPT\/
>>
File: cute anime girl 4.jpg (22 KB, 704x480) Image search: [Google]
cute anime girl 4.jpg
22 KB, 704x480
>>53864472
>>53864395
too bad, nerds
>>
>>53864352
if you're looking for memes: clojurescript http://blog.testdouble.com/posts/2016-01-21-isomorphic-clojurescript.html
>>
how do I make windows executables on linux? (C)
>>
File: top kek.jpg (127 KB, 460x454) Image search: [Google]
top kek.jpg
127 KB, 460x454
>>53864476
>educated
>voting bernie
pick one
>>
>>53864491
Mono.

http://www.mono-project.com/
>>
>>53864491
here's an example compiling tinc: https://www.tinc-vpn.org/examples/cross-compiling-64-bit-windows-binary/
>>
>>53864495
Only University and College educated people vote Bernie he is the best one to pick
>>
>>53864531
he is the gayest one to pick
>>
>>53864531
>>
>>53864531
[citation needed]
>>
>>53864495
>>53864476
>>53864531
Can we not do this in /dpt/?

>>>/pol/

(Bernie a shit.)
>>
>>53864531
>only unemployed undergrads vote bernie he's a cuck
ftfy
>>
>>53864561
This is a free thread, free as in FREEDOM not free as in TAXATION
>>
File: GBzPEMQ.jpg (105 KB, 640x640) Image search: [Google]
GBzPEMQ.jpg
105 KB, 640x640
>>53864495
>voting trump
>>
>>53864603
free as in """"""""freedom"""""""" is communism
>>
>>53864495
>Bernie is communist
Why americans are so uneducated ?
>>
File: deport racism.jpg (21 KB, 455x323) Image search: [Google]
deport racism.jpg
21 KB, 455x323
>>53864625
i agree! duck frumptf!
>>
>>53864625
it's gonna be trump or hillary and you're retarded if you pick hillary

and trump is fucking good
>>
>>53864640
Aww, he's made a sign to hold up to help the border guards id him! What a cute little ayyy lmao
>>
>>53864631
Because conservatives don't believe in spending money on education. Just look at the two front runners in Cruz and Trump. They've both said they would get rid of the Department of Education if they were elected.
>>
>>53864677
I don't follow American politics too closely, but presumably they want to replace public education with private education.
>>
>>53864701
This and local control. They don't want a national curriculum.
>>
I want to make android apps that installs files to a specific path. I'm similar with Java but haven't found a tutorial of all the functions.

It be nice to make money from my expansion packs for games and shit.

I just got Android studio.

Some have a simple code to do that?
>>
>>53864677
because it's SHIT, like common core, trump wants to get rid of common core because it's obviously fucking disgusting garbage
>>
>>53864631
Nobody on that picture is communist

>>53864642
>denies humanity's role in climate change
>anti-vaxxer
>proposes to waste billions on a useless wall
>tax plan will lead to huge increase in debt
>wants to ban *legal* immigration of muslims
>"good"
>>
File: common core civics 2.jpg (33 KB, 770x330) Image search: [Google]
common core civics 2.jpg
33 KB, 770x330
>>53864701
no, they want to take regulation from the federal level to the state level. common core is a set of federal guidelines for education that was passed relatively recently, and it resulted in a bunch of people writing shitty textbooks and course plans that meet these guidelines. lots of people think it did more harm than good
>>
>>53864749
>karl marx isn't a communist
wew
>>
why do murricans vote presidents that don't even really seem to care about politics?
voting someone who's barely ever bringing up solid political arguments, neither in debates nor in speeches, seems kind of useless to me

your voting process resembles a cage of monkeys flinging shit at each other, not politics
>>
>>53864760
is there a source on this image
>>
Reminder that common core penalises students for doing maths correctly in a succinct fashion
>>
>>53864806
It's basically like if someone marked you down for doing
x += 3;
rather than
x = x + 3;
>>
File: common core english.jpg (326 KB, 620x826) Image search: [Google]
common core english.jpg
326 KB, 620x826
>>53864798
kid posted it on /b/ a while back
>>
>>53864760
>literally teaching people hardcore compartmentalization
Stay classy, USA.
>>
>>53864736
Here you go friend


public class ReadFileFromURL {

public static void
main(String[] args) {
System.out.print(
"Enter a URL: "
);
String URLString
= new Scanner(System.in).next();

try {
java.net.URL url
= new java.net.URL(URLString);

int count
= 0;
Scanner input
= new Scanner(url.openStream());

while (input.hasNext()) {
String line = input.nextLine();
count += line.length();
}

System.out.println(
"The file size is "
+ count
+ " characters"
);
} catch (java.net.MalformedURLException ex) {
System.out.println(
"Invalid URL"
);
} catch (java.io.IOException ex) {
System.out.println(
"I/O Errors: no such file"
);
}
}

>>
Is rust worth learning?
>>
>>53865063
no
>>
is Java worth learning
>>
>>53865116
no
>>
>>53865116
If you need a job.
>>
>>53865063
yes
>>
>>53865063
https://www.rust-lang.org/conduct.html
>>
>>53864931
Thanks anon. This helps alot.

I'm looking to make an app similar to this but for games, where the user downloads and runs the apk and the files are installed to the path. https://www.google.com/url?sa=t&source=web&rct=j&url=https://play.google.com/store/apps/details%3Fid%3Dcom.eipstudiosohio.Caustic3Demo%26hl%3Den%26referrer%3Dutm_source%253Dgoogle%2526utm_medium%253Dorganic%2526utm_term%253Dandroid%2Bcaustic%2Bpack%26pcampaignid%3DAPPU_1_Sr0CV6OfDauJjwTI5rXQDg&ved=0ahUKEwij7Nbm2PXLAhWrxIMKHUhzDeoQ8oQBCB4wAQ&usg=AFQjCNGKvE2C1fQg8mj2REZUiVr0ujNiWg
>>
File: C o C.png (6 KB, 505x74) Image search: [Google]
C o C.png
6 KB, 505x74
>>53865162
>it's still there
>>
How do idle games continually increase player's cash/resources/progress?
Say I have a 'cash' row in the users database, how would I go about giving all users say 10 coins every 24 hours?
Surely running something akin to a cronjob that traverses the whole table and updates all the rows seems slow as hell.
I have thought about tracking the last timestamp the user accessed my website, and calculating the resulting eventual amount of cash to give him the next time he comes back.
I hope that last sentence made sense.
>>
>>53865199
that fucking url
>>
2. Suppose that instead of always selecting the first activity to finish, we instead select the last activity to start that is compatible with all previously selected activities. Describe how this approach is a greedy algorithm, and prove that it yields an optimal solution.

>Selecting the last activity to start that is compatible with all previously selected activities is a greedy algorithm because, firstly, the choice you make doesn’t depend on the outcome of any subproblems. Secondly, because you will always only be selecting the last activity that starts, you will always only have one subproblem. Thirdly, this means that the greedy algorithm will allow you to select the optimal activity very quickly. These are all of the properties of greedy algorithms.

>Selecting the last activity to start that is compatible with all previously selected activities will always yield an optimal solution. There may be other equally optimal solutions, but no other solution will be more optimal. This is because selecting the last activity to start that is compatible with all previously selected activities does not give the resulting subproblem less time-space than if any other selection was made. This means it’s an optimal choice. Repeating this on the resulting subproblem will continue to result in optimal choices until no other activities can be selected. The optimal choice and optimal subproblem solutions combine to result in an optimal overall solution.

did i answer this well enough? the question doesn't strike me as him wanting me to actually write the algorithm, unless that's what he meant by 'prove'. also, did i prove it well enough? the problems referencing the activity selection problem https://en.wikipedia.org/wiki/Activity_selection_problem which we solved in class by greedily picking the first activity to end. the question brings up a reversal, ie picking the last activity to start
>>
>>53865228
>save time on exit
>check diff when starting
>calculate number off missed cycles
>>
>>53865199
I am pretty bored and would write the whole thing for you since it is a very small project
>>
Is there a way to detect whether or not an image is of a data table?

I'm working on a program for work that involves using OCR to read tables of alphanumeric data that are stored as images in PDF's. The tables may or may not have borders.

The tables I need are all in the same section of the PDF so I can easily dump every image in that section with something like XPDF, but I think that's wasteful since other images (graphs, figures) get mixed in and I would rather not waste time and money to process them.
>>
>>53865379
That would be cool. I can understand Java in sight reading but haven't learned the functions thoroughly. I've got Android studio installed.

I can edit things a little. Spam the code here I guess?
>>
>>53865439
>>
programming is great if you're legit smart and want to put your intellectual capacity to use
>>
>>53865668
Programming is so easy even a kid can learn Java the hardest languages of them all
>>
>>53865716
if it's so easy why are you whining that it's too hard to make good applications
>>
Are there any websites or resources that just display reams and reams of code examples without any instructional element?
>>
>>53865758
goggle images
>>
>>53865276
That's what I tried to say in my second last sentence.
But then I lose the ability to send notifications if, for instance, i want to email them about their new 10 coins they received.
Or any other thing I might want to do without them logging in to my website.
>>
>>53865818
just from time to time select people who hasn't logged on in a while, sent them a notification about new coins -> update database when (if) they log on.
>>
>>53865818
update everything once a day or something

it depends on what you want

you'll think of something
>>
>>53866068
but what if it doesn't SCALE
>>
Have any of you guys made any applications that made money
>>
>>53866084
even if he has millions of users it's not going to take much processing power to increment a coin variable or whatever he's doing
>>
>>53865818
I think you should go with the cronjob thing.
If it runs shit, optimize your database/statements.
>>
>>53862919
>vector<bool> has this dead wrong (according to Stroustrup) specialisation where it packs all bools into bytes, right?
>dead wrong (according to Stroustrup)
what

isn't it a perfectly valid optimization with today's machines where memory access is by far slower than doing bitwise operations

and here's confirmation >>53863013
>>
Which scheme is the easiest to embed into c++?
s7 looks pretty nice.
>>
>>53866523
meme
>>
>>53866523
why in the fuck would you
>>
>>53866829
muh macros
>>
>>53864531
>University and College
>educated people
Pick one. People who haven't lived in the real world yet shouldn't be able to vote.
>>
>>53866859
mate just use C++ to write C++ code and use system("...") to compile it
>>
>>53866886
All of this. Both choices are retarded, but Bernie is the worse choice.
>>
>>53866829
as a scripting language?
>>
>>53866523
Chicken or Guile
>>
Hi gee

I'm trying to learn programming, but I feel like a fucking idiot. I just can't seem to "remember" things.

I'm going through things like codecademy and the odin project. It just doesn't seem to be sticking.

Am I hopeless?
>>
>>53864531
>Only University and College educated people vote Bernie

In other words, ivory tower masturbation.
>>
File: lightstudy5.webm (155 KB, 610x378) Image search: [Google]
lightstudy5.webm
155 KB, 610x378
Positional lighting working, now I can start building the actual game.
>>
>>53867349
A lesson on memeacadamy runnin through a language's syntax is like having the process of riding a bike explained to you, but you've never actually touched a real bike. You won't be able to actually do it until you try, fail and practice.

Memeacadamy doesn't teach you anything, it just gives you a false sense of accomplishment. Congratulations you successfully swallowed every spoonful of goop that they guided into your mouth while making airplane sounds... Now you're a chef, go cook a banquet for 20.


Read a book, faggot.
>>
>>53867349
stick at it. Once you got some of the basics, you can start messing around with stuff. You'll remember stuff way better by playing with it.
>>
>>53867349
mnemosyne
>>
>>53867399
>but you've never even touched a real bike
>Read a book, faggot

That advice seems pretty contradictory, m8?

https://better-dpt-roll.github.io/
>>
>>53867450
Yes, because books don't have actual meaningful exercises that aren't copy paste, do they?
>>
File: test3.webm (980 KB, 640x400) Image search: [Google]
test3.webm
980 KB, 640x400
>>
>>53867377
fuck, thats cool
what language?
>>
>>53867476
It's better than memecademy, but it's still better to just pick a project and start programming.
>>
>>53867506
Agreed.
>>
>>53867399
Aye, I guess it's the same as people trying to learn a language and only using Rosetta stone. It doesn't really work well if you never practice.

Besides books, anything else I should look into? I'm not looking for a "BE A HACKER OVERNIGHT!" but something that I feel like I can really make progress on over a period of six months.
>>
>>53866332
No wonder optimizing space was a matter... in the C++98 standard! But it awfully broke the convention that every container should be dereferencable through the [] operator. That makes vector<bool> a special class with a misleading name, since it is not a container per se. Even worse, you could implement a class equivalent to vector<bool> with better optimizations if you take advantage of larger word sizes.

A interesting read on the subject: https://isocpp.org/blog/2012/11/on-vectorbool
>>
>>53867557
Maybe some online lecture recordings.
>>
>>53867506
No you are wrong first you have to pick up a programming book learn all the basics and do the the review questions and programming exercises to truly get it then after you attempt to do projects
>>
>>53867557
What I did sometimes was look at the online reference for new things and then write a simple program to implement them. It can be as simple as a recursive loop or something more complicated like creating a linked list or a heap.
>>
>>53867497
webgl
>>
>>53867492
nice shader
>>
>>53864288
How is everyone's maths skills? Those who use more than basic arithmetic, what topics do you usually cover?
>>
>>53867753
polytropic spectral analysis of real valued functions
>>
>>53867753
>How is everyone's maths skills?
null
>>
>>53867660
or you just google whatever problem you're having and learn the syntax that way
>>
>>53867753
I don't think I've ever used more than polynomials and sin/cos for circle shit in programming. I've gone through Calc 3, just never actually done anything that needed anything more complex.
>>
>>53867814
a.k.a. why do it the easy way when you can do it the hard way method
>>
>>53867753
You only need to know basic math skills of how to plug in a formula and use it in the real programming world.
>>
>>53864468
Nah, Bern victims just don't vote. Remsmber, you must be 18 to post here! :^)
>>
How do I contribute to an open source project?
>>
>>53864677
Hang on to common core then you fucking "progressive".
>>
>>53867739
Thanks!
It's my second ever shader.
>>
>>53867932
>common core

I'll be glad when that hateful communism-machine finally goes away.
>>
>>53867932
>>53867954
Common core is the true way to learn math
>>
>>53866085
...
>>
File: common core.jpg (237 KB, 1040x1292) Image search: [Google]
common core.jpg
237 KB, 1040x1292
>>53867994
>these right wing republican racists don't even know how to make ten
>>
>>53866085
yeah mine literally prints money
>>
>>53868019
I don't think I've even seen anything as retarded as that image.
>>
>>53868019
>Tell how to make
Is this from an American school?
>>
What is the proper way to generate a PRNG seed for a program which doesn't have to be cryptographically secure? Just using the time combined with some trash found in uninitialized variables seems unreliable.
>>
>>53868019
Why add 3? Why so arbitrary? why so intuitive as the question asked in there?
>>
>>53868090
unintuitive*
>>
>>53868019
...what the fuck is this picture...i've been on 4chan some 10 years now and seen some shit, but this is fucked mate
>>
>>53868046
>>53868074
>>53868090
>>53868113

C O M M O N - C O R E

DEPT OF EDUCATION
>>
>>53868090
Because that is the new way to do math. Want to add 93+88?

93+7 = 100
100 +81 = 181
>>
>>53868130
What's the common?
and what's the core?
>>
>>53868138
Faggots, this is the real way

93 + 88 => 91 + 90 => 181
>>
>>53868019
>>53868046
>>53868090
>>53868104
>>53868113
>>53868130
>>53868138
>>53868130
Honestly it makes more sense to think of math this way

I can't wait when there is common core for programming!
>>
>>53868090
>Why so arbitrary?
How is it arbitrary? When you subtract 2 out of 5 you get 3 - there is nothing arbitrary about that. And this is used to teach *everybody* to do arithmetic calculations faster not only kids who can figure out how to do mental math efficiently by themselves.
>>
>>53868138
nothing wrong with this, I do this intuitively
>>
>>53868141
it means the common core of education guidelines between all 52 states
>>
>>53868173
They actively penalise people who do know how to do the problem.
>>
>>53868171
How about you die in a fire

It's just a more convoluted way of teaching a simple concept
>>
>>53868138
I do this differently mentally.
93+88
for me it's

a= 3+8=11
b= 90+80=170
a+b
>>
>>53868261
mentally I do
8+3 = 11
11 + 170 = 181

Way fucking easier
>>
>>53868261
>two local variables just to add two numbers
>>
>>53868285
Meant for >>53868138
sorry
>>
Guys lets all take acid and lsd and program together in the same room
>>
>>53868177
I'm good at math and I never did it this way. I've never been good at mental math though.
>>
File: il_570xN.747726857_sike.jpg (103 KB, 570x760) Image search: [Google]
il_570xN.747726857_sike.jpg
103 KB, 570x760
I sidestep the problem by refusing to do mental math. I don't go anywhere without my trusty pocket abacus.
>>
>>53868302
let's do some trippy shaders senpai
>>
>>53868208
The problem isn't to sum two numbers, the problem is to learn the algorithm of summation that'll work on bigger numbers. So people who write "you can't make 10 out of 8 and 5" like the autists they are don't actually know how to solve the problem they were presented with.
>>
>>53868290
His way is doing addition - addition - addition

instead of addition - subtraction - addition

No reason to make it confusing
>>
>>53868312
How do you know how many to move?
>>
>>53868312
LONDON
>>
>>53868315
This will actually go into the exams, and people learn this stuff for tests and other stuff. People will lose marks for this.
>>
>>53868346
>People will lose marks for this
For not being able to reproduce what they were taught in class? I'm okay with this.
>>
I am trying to swap two numbers in java



int[] arr = {2,3}
public static int[] swap(int[] arr)
{
int temp = 0;
temp = arr[0];
arr[0] = arr[1];
arr[1] = temp;
return arr;

}

>>
>>53868374
Holy shit you're retarded.
Some of us want our kids to know how to add, not to know how to know how to add in theory the only correct (TM) way
>>
>>53868397
>Java
func swap(first, second int) (int, int) {
return second, first
}
>>
>>53868397
why not just do

public void swap(int &x, int &y){
int temp = x;
int x = y;
int y = temp;
}
>>
>>53868498
Did Java get pointers at some point?
>>
>>53868405
Its like answering questions on a java test using python. Or using C to build a website.

Some of us want our kids to learn different tools so they can decide which way they prefer to do things. The problem with kids is they won't decide so you have to teach them everything.
>>
>>53868498
This won't work in Java
>>
>>53868405
>want our kids to know how to add
And that's exactly what they are being taught: HOW to add.
>>
this works in C#, nice language Javafags
>>
>>53868531
>Some of us want our kids to learn different tools so they can decide which way they prefer to do things.

You are arguing against common core here.
>>
>>53864642
>and trump is fucking good

Typical low iq trump poster
>>
>>53864778
Have you even read the manifesto?

>>53864806
Common core is already on the way out
>>
>>53868397
arr => [arr[1], arr[0]]
>>
>>53868556
Do they not also teach the standard way to add?
>>
>>53864873
holy fuck

1984 is being used as a manual
>>
File: 2nd-amendment-assignment.jpg (256 KB, 610x455) Image search: [Google]
2nd-amendment-assignment.jpg
256 KB, 610x455
>>53868603

I don't bloody think sharia allows it. Per common core, there is ONE way to do something and you will be tested rigorously on that ONE WAY.

Not only that, but sometimes the information is outright false, and that is what your child will learn.
>>
>>53868397
you could save a line with
int temp = arr[0];

:^)
>>
>>53868586
Karl Marx was a great philosopher
>>
>>53868631
I see what you did there

Java is a good language
>>
Holy fucking shit, this one is ESPECIALLY bad.

Lord have mercy.
>>
>>53868641
I am not murrican what is so bad about this
>>
>>53868658

The 2nd amendment doesn't say anything about militia membership being necessary to own guns. It says that all people can own guns.
>>
>>53868641
>>53868624
>Common Core STANDARD
>responsible for content of textbooks

Here's the standards:
http://www.corestandards.org/ELA-Literacy/

Where does it say that textbooks must teach the Second Amendment as being a non-individual right? It's entirely general skills that students are supposed to have, shit like this:
>Cite specific textual evidence to support analysis of primary and secondary sources, connecting insights gained from specific details to an understanding of the text as a whole.

Blame your district for niggering out and contracting with a shitty textbook writer.
>>
>>53868723
Isn't it one of the first lines that the American people are obligated to overthrow it's government if it is to fall to corruption? Isn't that what a millitia does?
>>
>>53868723
>"A well regulated Militia, being necessary to the security of a free State, the right of the people to keep and bear Arms, shall not be infringed."

It's not as straightforward and clear as either you or this book present it. It actually sounds like it was formulated by a retarded person not familiar with the concept of ambiguity.
>>
>>53868725

I have no doubt it's part of the master communist plan. I can't find anything specific in the standards, but I'm not looking very hard.
>>
>>53868743
So why haven't the clappies done that yet? I'd say legal bribes is clear evidence of corruption.
>>
>>53868181
it's a grim dark future
>>
Should you learn a scripting language first before learning a higher level language?

Should Objects be taught first or should functional programming be taught first to beginner programming students
>>
>>53868748
>the right of the people to keep and bear Arms, shall not be infringed
>ambiguous
>the people
>their right
>arms
>not be infringed
>ambiguous

Not only is communism a scourge, it also makes you dumb.

>>53868743

A militia is certainly useful for that, but membership in a militia is not a prerequisite for owning firearms.
>>
>>53868775
Because your average capable American is happy enough with their life, luxuries, and liberty and would not be willing to throw that away.

If you've ever read Brave New World, The US seems to be really shaping up to that
>>
>>53868787
Begin with procedural C.
>>
>>53868790
>the right of the people to keep and bear Arms, shall not be infringed
If THAT was the entire content of the second amendment THEN it wouldn't be ambiguous. Holy fuck are you really that retarded?
>>
>>53867753
>what topics do you usually cover?
geometry, trigonometry, calculus, elementary algebra, linear algebra
>>
>>53868838
>If THAT was the entire content of the second amendment THEN it wouldn't be ambiguous.

It's additional text that doesn't change the meaning. The right contained therein is crystal clear.

If you can extract some ambiguity from it, then you are a retard (and probably a communist, to boot).
>>
>>53868771

>I have no doubt it's part of the master communist plan
>I can't find anything specific in the standards
>I'm not looking very hard

So you've confirmed that you're a retard and have literally no idea what you're talking about.

There are plenty of textbooks that go by the interpretation of the Second Amendment as an individual right. Especially considering that that interpretation was held up in DC v. Heller, a landmark Supreme Court case.

Cherrypicking shitty textbooks purchased by Bumfuck Independent School District isn't evidence of a conspiracy against the Second Amendment by education boards.
>>
File: smug anderson.jpg (19 KB, 358x276) Image search: [Google]
smug anderson.jpg
19 KB, 358x276
>>53868537
>>53868516
i know
>>
>>53868912
>So you've confirmed that you're a retard and have literally no idea what you're talking about.

I didn't say I was done yet. I'll piece this case together, and it will be bulletproof.
>>
daily
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>programming
thread
>>
How is F# for someone that likes the .NET stack? Should I learn something else for fun?
>>
>>53868994
what the fuck is programming? you dork
>>
>>53868019
I don't know what everybody is debating about
But if you give a computer the instructions to make the integer "10"
and it HAS to do it through getting the integer 8 and using addition to add it with 5 it will just tell you to fuck off
>>
File: prolog.png (11 KB, 510x76) Image search: [Google]
prolog.png
11 KB, 510x76
>>53869070

Prolog seems to agree.
>>
Oh boy, look at this non-programming argument going on. Might as well throw fuel on the flames...

Common core sucks because it gets rid of AP Calculus. When I went to high school, there were two math tracks -- algebra 1, geometry, algebra 2, and pre-calculus; and a second path for people who had more than 2 brain cells that has algebra 1 taught in the last year of middle school, and AP calculus taught in the senior year of high school. Meanwhile, the smart kids in some other countries got to go one year further, taking the same differential and integral calculus in their junior year, and multivariable calculus in their senior year. Common core makes Algebra 2 taught in the senior year.

If we're going to make everyone follow the same standard, we should be raising, not lowering the standard. Make everyone take differential calculus in high school, it's not that hard.
>>
>>53869127
Can confirm, was taught pre-calc in my senior year of high school
>>
>>53869127
i took ap ca
>>
>>53869127
i took ap calc 1 and 2. i dont think that's true
>Make everyone take differential calculus in high school
that's retarded
>>
now another shader fails after a simple change, compiles fine on shdr.bkcore.com, glGetShaderInfoLog says nothing. for fuck's sake?
>>
>>53869216
>>53869170
Common core applies to the current little buddies (4-8 year olds)
>>
>>53868723
I would say it's not exactly wrong. All able bodied men aged 18-45 are considered members of the reserve / unorganized militia.
>>
>>53869328

I know we're part of the unorganized militia, but that's not a requirement. If it were, then your frail little grandma wouldn't be able to have that .38 for protection.
>>
>>53869314
oh, guess they're fucked then. i'm reading the wiki page right now and it reads like an advertisement all the way through
>>
Still working on my imageboard server that I've spent way too long working on in comparison to what it's put out.
>>
>>53869309
apparently it's a driver bug. i can't have the same uniform declared in both shader stages despite:

>It is legal to have the same uniform defined in different shader stages.

>When you call glGetUniformLocation, it will return one location. When you update the uniform with a call to glUniform, the driver takes care of sending the value for each stage (vertex shader, geometry shader, fragment shader).

>This is because a GLSL program contains all of the shader stages at once. Programs do not consider uniforms in a vertex shader to be different from uniforms in a fragment shader.
>>
can someone redpill me on dynamic programming?
>>
>>53869607
meme
>>
Html is my favorite programming language
>>
>>53869651
have you thought about trying CSS
>>
>>53869658
I have and I also tried Php and I found it be such a beautifully well defined structure language much better than C+
>>
>>53868491
this has different behavior though
>>
>>53869676
Php is the pinacle of coding and is what all coding languages strive to be.
>>
>>53869607
There is no red pill. Just go to Wikipedia or pick up an algorithms textbook. Use dynamic programming wherever it may apply.

>>53869651
>>53869676
Could you post some tastier bait? This shit is too low quality.
>>
>>53869703
>confusing bait with sarcasm
pls no
>>
I am going to uni in the fall for cs and I have a couple years of experience programming in primarily C#. I just started my first big project but I'm wondering if I should write ditch OOP and write it in something like C. I want to be prepared for uni/real world situations, should I continue with OOP or write it in C.

It's something that could be done easily with either language but there will be a learning curve with C.
>>
>>53869692
The task is to swap two integers. Only reason the Java function is using an array is, because you can't have multiple returns in Java.
>>
>>53869651
plant
>>
>>53869400
I know that feeling. Been working on mine for almost 2 years. Slowly rewriting it from scratch in a different language now.
>>
File: IdiotBall.jpg (16 KB, 234x181) Image search: [Google]
IdiotBall.jpg
16 KB, 234x181
>>53869794
I haven't had to do that much, but I have been stuck on fixing shit. Dealing formatting HTML before/after it's parsed and figuring out how it should be stored and handle in the db before and after is either harder than it sounds like, or I'm retarded and going about it the wrong way.
>>
>>53869738
School and most jobs will expect you to be a good little sheep and use OOP.
>>
I'm learning C coming from OOP and I'm wondering how I would implement this data structure in C.

OOP Pseudo code

class WordList{
property: ListOfDefinitions[]
property: WordList[]
}

class Definition{
property: Word
property: Definition
}


Here is my Csuedo code

typedef struct {
char* item;
char* description;
word_list_item* next;
} word_list_item;


How can I get a structure that would contain multiple lists of word_list_items. Sorry if noob, I have only been writing in C for a week
>>
>>53869738
>>53869878
Not that you shouldn't ever use OOP, of course. It has its times and places. But if it's anything like my university you will be expected to do things like fill in an overengineered, poorly-designed OO ADT, which I suppose is a realistic working condition.
>>
>>53869929
>fill in an overengineered, poorly-designed OO ADT
i literally just had to do this a few days ago. i felt like i was doing a fill in the blank for a childrens book written by a mildly retarded person
>>
Why aren't you guys coding shitty apps right now making easy money
>>
>>53869882
C doesn't have OOP support. If you find yourself trying to use a bunch of data structures to solve problems you're doing it the wrong way. Learn pointers, memory management, function calls, passing arguments, avoiding undefined behavior.
>>
>>53870012
>using "code" as a verb
>>>/out/
>>
>>53870012
It's been a while since I used Java, and am completely unfamiliar with the Android API.
>>
>>53869882

Ignore this guy:
>>53870017

Data structures are key.
>>
>>53869845
No, it is hard, if you have no experience with this. I think I've restructured the database layout about 10 times, before I got it right.
>>
Should we move to 7chan's prog?
>>
>>53870017
how is typedef/struct in anyway undefined behavior
>>
>>53870038
So what go learn EASY money awaits you
>>
C++ question. Can't access a protected member of a base class in a friend class.
class A {
protected:
friend class Friend;
int x_a;
};

class B : public A {
protected:
friend class Friend;
int x_b;
};

class C : public B{
protected:
friend class Friend;
int x_c;
};

class Friend {
public:
void foo() {
C c;
c.x_a = 2; //error: x_a is protected
}
};


I know it's protected C++ but I told you he's a nice guy. What gives, how do I access x_a? I dont want a public set method because x_a should be set once then never changed. I can't set it in construction because C's are constructed in an array.
>>
>>53870310
did you forward declare Friend?
>>
>>53868397
If they're int's you can do it by swapping using bitwise xor.

temp ^= arr[0];
arr[0] ^= temp;
temp ^= arr[0];

But Java is a cancerous language,
>>
>>53867753
The most I've done is linear algebra for graphics stuff.
I suck at math in general.
>>
>>53870328
yes, forward declared above A. the method foo in Friend should be private also.
>>
Who has made an esoteric language and is it worth it to make one?
>>
>>53868019
Please tell me this isn't real.
>>
>>53870397
yes
>>
>>53870353
wait I sort of fucked writing that out but whatever it should be clear enough.
>>
>>53868138
That's not too bad.
>>53868019 is way more fucking retarded.
>>
>>53870464
That is a helper method, aside from formatting you've also only got one parameter for squareRoot while squareRootGuess takes an initial guess parameter
>>
>>53868138
9 + 8 = 17
(17 << 0) + (3 + 8)
181

That's how I'd do it in my head lmao
>>
File: 1429187196433.png (345 KB, 1920x1060) Image search: [Google]
1429187196433.png
345 KB, 1920x1060
Shaders are fun.
>>
what's the best language to learn data structures in? like trees, graphs, etc.

I think Java, right?
>>
>>53870588
C++
>>
Is there anything like RDoc for C?
>>
>>53870588
C#, java without all the disgruntling parts
>>
>>53870600
Doxygen
>>
>>53870588
>Java
>data structures
kek
C/C++
>>
>>53870625
Thanks mate
>>
>>53870588
sepples
>>
>>53870310
>>53870328
FFFFUUUUUUCCCCKKKK. I had a typo in the friend class declaration. Been staring at this for an hour.

Why do I never check the god damn basics first.
Thread replies: 255
Thread images: 31

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.