[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
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: 26
File: wow dude.jpg (178 KB, 934x1000) Image search: [Google]
wow dude.jpg
178 KB, 934x1000
old thread: >>53541936

What are you working on, /g/?
>>
File: 1457869672782.png (178 KB, 1280x720) Image search: [Google]
1457869672782.png
178 KB, 1280x720
>>53549267
Where's that webm of that tranny getting his delusional head stomped when you need it?
>>
File: golly.jpg (156 KB, 660x440) Image search: [Google]
golly.jpg
156 KB, 660x440
Jeez, oh man! Am I first?
>>
>>53549267
Teaching my wife's son COBOL
>>
Going to re ask this one here

>>53549281
>>
>>53549313
>wife's son
>>
File: 1447791570888.jpg (41 KB, 360x360) Image search: [Google]
1447791570888.jpg
41 KB, 360x360
>>53549313
You could try a bit harder than that.
>>
>>53549267
import faggot
print kill you're self
>>
File: output.webm (3 MB, 640x480) Image search: [Google]
output.webm
3 MB, 640x480
Does opengl have some kind of text primitives?
Because I tried drawing text with GL_LINES and failed hard.
>>
>>53549402
>text primitives?
pullin me leg ther m8?
>>
>>53549402
>OGL
>anything but barebones
good laff
>>
>>53549402
Simply create a texture with glyphs (a'la bitmap fonts), then generate UVs for them and draw that instead or go a step further and use libttf.
>>
>>53549402
>>53549463
How do I become as cool and smart as you?
>>
>>53549597
fucking lots of bitches and smoking lots of crack
>>
>>53549597
get good
>>
File: Capture.png (189 KB, 685x618) Image search: [Google]
Capture.png
189 KB, 685x618
>>53549619
Is that like pair programming?
>>
>>53549641
this beta jap culture makes me irrationally angry
>>
>>53549641
wh-
y
do
we-
eb-
s
th-
in-
k
th-
is
is
le-
gi-
bl-
e?
>>
>>53549768
Because they aren't retarded and editing the bubble would be more work than it's worth.
>>
>>53549787
we-
ll
be
ho-
ne-
st,
ho-
w
mu-
ch
lo-
ng-
er
do-
es
it
ta-
ke
yo-
u
to
re-
ad
th-
is

than it takes you to read this?
>>
>>53549805
Not much longer at all. Also notice in the picture the shortest word is three, meanwhile you made yours two.
>>
>>53549787
Because the manga is designed for text to be written vertically, not horizontally, and it's a tradeoff between size, wordwrapping, and legibility. What does that have to do with programming though, other than your irrational hatred which you let everyone know about every thread.

Back on topic, why do programmers break their lines as X characters? Is using a scrollbar more work than it's worth? It seems to me that fancy typesetting and alignment of broken lines is a lot harder to maintain than simply letting the line go on as long as it needs to.
>>
>>53549805
it only starts cutting words off past 6 letters, and then the shortest cut-off word is 3 letters, so the actual equivalent of your post is:

well
be
honest,
how
much
longer
does
it
take
you
to
read
this

which isn't much longer at all
>>
Trying to learn Spring for Java. Need a project to actually cement my knowledge and have something to put on my resume.

Of course all the Java projects on github are mostly for Android phones so the search isn't working out as I had hoped.
>>
>>53549267
A script that can auto generate cover letters and also throw in keywords in certain places.

I find that I send so many cover letters that it's something worth automating.

Right now it just inserts the company name, location, and job title. I want it to also be able to include keywords like "I'm very comfortable working in X language with Y framework in a SCRUM/AGILE environment"
>>
>>53549919

>all the Java projects on github are mostly for Android phones

Because that's all it's good for.
>>
>>53550014
Yeah probably but most of the places i've seen that have asked for it are using it for some kind REST based web stuff or something.

I'm just trying to broaden out since it looks like a lot of enterprise java uses Spring but on the same token there's not a lot of enterprise java open source projects that I've found yet.
>>
What if we made a game in Powershell?
>>
File: 3x3.jpg (11 KB, 268x188) Image search: [Google]
3x3.jpg
11 KB, 268x188
Hullo, /dpt/
So I am trying to make a 3x3 puzzle in JavaScript. The rough setup would be:

onTileClick {
if top = blank space then move up;
else if left = blank space then move left;
and so on...
}

but the thing is I'm having problems on how to apply it to each particular tile when clicked. I'm running out of logic for this. I know the solution could be googled easly, but I learn better by squeezing spoilers little by little. Pic related
>>
>>53550079
C and you got a deal.
>>
>>53550090
either convert mouse coordinates to board coordinates on click or retrieve the tile id from the sender object
>>
>>53550090
The easiest way to do this would be to make each tile it's own DOM element and attach onClick listeners to them individually.
>>
>>53550093

The Powershell idea was mostly a joke. Like... let's make .NET hack.

I don't have any good ideas for games, and if I did, I'd be implementing them in C++14, not C.
>>
>>53550258
How do I become a C++ master?
>>
>forced to use Swing in this one course
i feel sorry for every one of you faggots who has to do anything involving interface god fucking damn can anything get more boring?
>>
>>53550090
Write a findTileById() function. It doesn't matter if it's an expensive O(n) function, it's just a 3x3 puzzle.
>>
>>53550284
After you're finished Swing, learn a bit of Qt. You'll end up not hating interfaces again.
>>
>>53550314
I'll look into it if I ever feel like doing something with a GUI on my own. Figure the day will come
>>
>>53550223
>>53550234
>>53550304
Thanks fellow JavaScripteurs. I am trying them at the moment. Long live /dpt/ ! How long u guys doing JS?
>>
>>53550269

You don't. Not even Bjarne is a C++ master, and he made the damn language.
>>
>>53550355
Wish I hadn't done it at all.
>>
File: whyyoufuckstick.jpg (8 KB, 342x44) Image search: [Google]
whyyoufuckstick.jpg
8 KB, 342x44
newfag here on /g/, can someone please tell me why my fucking simple as fuck python script is fucked?

def moon(string):
print(string)
x = input("What is the closest moon to earth called?")
if(x == 'Mun' or 'Moon'):
print('well done, good sir! Next question!')
elif(x == 'shitlord'):
print('fag')
else:
print('you bad at dis')

moon('ready')

?pic related is what happens
>>
>>53550406
>if(x == 'Mun' or 'Moon'):

That should be:
if(x == 'Mun' or x == 'Moon'):
>>
File: code.jpg (37 KB, 540x238) Image search: [Google]
code.jpg
37 KB, 540x238
>>53550406
no damn formatting

>pic
>>
>>53550414
ooooooooooh, shit. Thanks...I should be more perceptive.
>>
>>53550429
You should lurk more before posting you fucking retard.
>>
>>53550429
Alternatively you could:
if(x in ['Mun', 'Moon']):


So it checks if the list contains what's in x.
>>
>>53550434
yeah fair enough
>>53550436
thanks, ill need to try both systems in the near futur
>>
man 2 is so much better than man 3.
man 3 sucks balls.
>>
>>53550367
>tfw you're better than bjarne
>>
>>53550355
About a year now, although I messed around with it way back in middle school when I was starting out. The language is exactly as awful as people say it is, but if you avoid the bad parts it can be alot of fun.
>>
File: wIBBG2R.webm (2 MB, 480x360) Image search: [Google]
wIBBG2R.webm
2 MB, 480x360
Ask your much beloved programming literate anything (IAMA)

>>53549313
>cobol
>not ABAP
meh

>>53549402
>Does opengl have some kind of text primitives?
no

>>53550269
http://www.cppgm.org/

>>53550406
>>53550414
if x in ("Mun", "Moon"):
>>
>>53550647
Suggest to me a smallish project doable in the C programming language.
>>
File: dragoncolors.gif (599 KB, 794x795) Image search: [Google]
dragoncolors.gif
599 KB, 794x795
>>53550654
A program that will read any file as a binary file to transform its bytes into audio samples. You could then listen to "song" of any file (could be fun with
program < /dev/random
)

https://en.wikipedia.org/wiki/Audio_bit_depth
>>
>>53550714
Sounds too hard.
>>
>>53550714
Do you remember dialup modems and fax machines? Do you remember that godawful sound they make?
>>
I've just started tracking users on my company's website. Is it bad that I've chosen to ignore DNT requests? I track our customers using only their UA and IP - it's good enough for the business requirements.

Just wanted to tell someone.
>>
>>53550730
Are you on unix ? it's quite easy with alsa

http://www.alsa-project.org/alsa-doc/alsa-lib/_2test_2pcm_min_8c-example.html#a6
>>
File: Screenshot_20160318_195803.png (1 KB, 67x72) Image search: [Google]
Screenshot_20160318_195803.png
1 KB, 67x72
Wrote one of those tile swapping games

solved state is
1 | 2 | 3
---------
4 | | 6
---------
7 | 8 | 9


now I can't solve it
someone please tell me there aren't unsolvable configuration in this and I'm just a retard
>>
File: test.webm (1 MB, 320x320) Image search: [Google]
test.webm
1 MB, 320x320
how do I learn to bash skript
>>
>>53550855
If you don't move pieces outside of the allowed moves then it will be solvable by simply reversing the moves.
>>
>>53550855
There are unsolvable configurations.
In math terms, you can only do even permutations. That is, it's impossible to swap any 2 tiles.
>>
>>53550855
wait no I solved it never mind

anyone know any more of those kinds of puzzles?

>>53550872
That's not how I wrote shuffling though

char[3][3] randomise(in char[3][3] input)
{
char[3][3] output = input;

for (int y = 0; y < 3; y++)
for (int x = 0; x < 3; x++)
if (uniform(0, 2) == 1) // pick either randomly
swap(output[x][y], output[next(x)][y]);
else
swap(output[x][y], output[x][next(y)]);

return output;
}

int next(int x) { return ++x < 3 ? x : 0; }


if you number the grid
1 | 2 | 3
---------
4 | 5 | 6
---------
7 | 8 | 9

it could swap 2 and 8 for example, or 1 and 3

in retrospect I have absolutely no idea why I wrote it like that
>>
>>53550866
what is this, food fetish stuff? a fuggin shovel though??
>>
>>53550866
it's been a while since I've had a boner I didn't want
>>
>>53550916
This will produce solvable states iff you do an even number of swaps.
>>
>>53550934
Wait, no, you need an even number of swaps not involving the blank tile.
>>
Hey /dpt/ give me some direction if you can. So Im in my final year of Int Relations at uni but I have no delusions of finding a job (working on a book thats irrelevant). Ive got one more elective left and I want to maximize its use. Since theres no point chasing science/maths related stuff, I was looking at something comp sci related.

Was wondering what programming was like, how accessible it is and whether or not its worth dumping a lot of my free time into.
>>
>>53550855

From the configuration
1 2 3
4 _ 6
8 9 7


To the configuration
1 2 3
4 _ 6
7 8 9


The problem can be solved in the following steps:

Move 6 left
Move 7 up
Move 9 right
Move 8 right
Move 4 down
Move 6 left
Move 7 left
Move 9 up
Move 8 right
Move 7 down
Move 6 right
Move 4 up
Move 7 left
Move 8 left
Move 9 down
Move 6 right
>>
bool is_adjacent(point a, point b)
{
return (abs(a.x - b.x) + abs(a.y - b.y)) == 1;
}

r8
>>
>>53550916
https://www.youtube.com/watch?v=GXJOVoyZcXQ
>>
>>53550855
read first chapter of "think like a programmer"
>>
>>53550943
Urgh, its not that simple at all. Swapping the empty spot with an adjacent tile is an even permutation, swapping it with a tile that is a 2 squares away is an odd permutation.

I'm going to stop thinking about this now.
>>
>>53550991
Why are you so epic? Whats your daily diet consist of? No sarcasm, mang. I Kinda adore you
>>
>>53551065
it's called autism
>>
>>53551065

It's not that difficult a puzzle, and I've had to deal with a few similar puzzles back when I played Runescape, which used a 5x5 tile puzzle (although the method of solving it is pretty much the same any size). Basically, you solve all rows except the last two (which, since you already had the first row solved, was fine), then solve the last two piecewise (divide into left and right side). In the case of this one, it's just "get the 7 and 8 in the right spot, and the 9 will slide back into place."

As for my diet... I eat a dead animal every day. Today was meatballs and fried ramen.
>>
>know D pretty well
>want to learn another 'we want to replace C++ but never will' language for meme purposes
>Go has no generics
>rust's syntax is goofy looking for no reason
>D is literally perfect
I know of only one way to motivate myself to bother
1-4 learn go
5-9 learn rust
>>
>all this left over course literature from my CS studies


is natural language processing worth getting into as just a hobby?
>>
>>53551236
>rust package is 120mb
what the fucking shit? I have literally 3 D compilers installed right now and they don't add up to half of that
>>
>>53551276
>write a generator that takes /dpt/ as an input and generates shitposts
it's worth getting into just for that
>>
ethereum is going down the drain

ahahahahah fucking cucks, i've been saying it all along that ethereum is SHIT
>>
>>53551276
it's hard to get good results out of it, you could do it if you're interested in it but there are other things you could be doing like game dev or whatever
>>
>>53551290
to the moooooooooooooooooooooooooon!
>>
>>53551288
That was one of the things I had in mind


n-gram models seem fun and easy and relate to a lot of web stuff
>>
>>53549267
is this going to be a regular thing?
is there really one dedicated autist who intends to photoshop hime's face onto traditional /dpt/ pics?
>>
>>53551360
>is there really one dedicated autist who intends to photoshop hime's face onto traditional /dpt/ pics?
yes

and he always posts the lowercase "old thread:" followed by "What are you working on, /g/?"
>>
>>53551360
>traditional /dpt/ pics
weeb...
>>
>>53551408
The meaning of 'traditional' doesn't change if you don't like something.
>>
Who the fuck keeps making threads at 300 posts?
>>
>>53551278

Rust has a dependency on LLVM. No idea how big that is.
>>
>>53551433
the obsessive trap fag
>>
>>53551453
one of those D compilers I have installed is LDC
>>
>>53551408
Kill yourself and fuck off.
>>
>>53550714
>>53550730
aplay can already do that since it can read on the standard input.

Yet, if you want portability, go the SDL route. I already did a similar program as a CD player (the input could be either a true CD driver or a CD image).
>>
>>53550736
but it's
A E S T H E T I C
E
S
T
H
E
T
cetera
>>
>>53551510
fuck off meme boy
you're the reason vaporwave is dead
>>
>>53551541
It's dead because it's shit. The meme was all that kept it going.
>>
>>53551541
it's deliberate
in 20 more years it'll be vaporvaporwavewave and AESTHETIC^2
>>
>>53551236
Swift m8
open sores as well
>>
Is there a way to call an instance variable in another class without making a method that returns it?
>>
>>53551236
Syntax is a far smaller problem than the lack of generics.
>>
>>53551741
Oh dear. I should probably specify that I mean in Java.

Thanks in advance.
>>
>>53551751
yeah but it's also a problem D doesn't have (well, not to the same extent as rust anyway)

the :: is pretty much a deal breaker for me desu
it's just so hideous

Is there any actual reason to learn rust if I know D? I pretty much just wanted to learn it so I could compare it to D
>>
>>53551741
>>53551755

This is literally what the "public" keyword is for.
>>
I need to read in a bunch of user options from a file, and set the appropriate variable to the value they specify.

They should be able to put the options in any order, and should be able to add comments and blank lines.

What's the best way to do this? I've just been using blank lines so far.
>>
File: Koala.jpg (763 KB, 1024x768) Image search: [Google]
Koala.jpg
763 KB, 1024x768
What's the best way/book to learn C++, /g/?
>>
>>53551879
>What are you working on, /g/?
Trying to fight through this hangover so I can go to work. After work I'm going to take back my 400 or so empties that are polluting my closet, then get more beer.
>>
>>53551741
Java doesn't have friend classes?

The 'pure OO' answer is to restructure your code so you don't need to do this.

If you don't want it to be public, you could do package visibility.
>>
>>53551879
Didn't mean to reply to you. Fuck you.
>>
>>53551853
I understand that, but that doesn't actually help me use something.

Say I have a constructor in one class that names 4 strings, and I want to refer to them in another class. How would I go about doing that?
>>
>>53551943
show us the code
>>
Rate my prime number calculator. Is there a more efficient way of doing this?

#include <stdio.h>

/* Assess if p is a prime number by dividing it by all numbers from 2 to p-1 */

int main(){

int p = 0;
int div = 0;
int prime = 1;

printf("Enter number: ");
scanf("%i", &p);


for(div=2; div <= (p-1);)
if(p%div == 0){
printf("Not a prime number");
prime = 0;
break;}
else
++div;

if(prime==1)
printf("Prime number");

return 0;
}
>>
File: 1456522578409.png (565 KB, 785x453) Image search: [Google]
1456522578409.png
565 KB, 785x453
>>53550866
>>
>>53552139
That is pretty fucking terrible.
>>
>>53552040
import java.util.*;
public class customer
{

String name;
String address;
String phone;
String custID;
public customer(String nameIn, String addressIn, String phoneIn, String id)
{
name = nameIn;
address = addressIn;
phone = phoneIn;
custID = id;
}

public double chargeForDamages()
{
Scanner in = new Scanner(System.in);

double charge;
System.out.println("Please enter damage charge amount");
charge = in.nextDouble();
return charge;

}

public void call()
{


System.out.println("Hello, " + name + " This is a courtesy call made out to " + phone + " to inform you that you have a overdue video rental.");
}
}


basically, I want to make reference to these 4 variables in other classes.
>>
>>53552139
You = stupid fuck
>>
>>53552171
put 'public' in front of the ones you want to be visible outside
i.e.
public String name;

etc
>>
>>53552187
>>53552187
Thank you, I appreciate it, but...how do I invoke them?
>>
>>53550919
it's pretending to be retarded for youtube bucks
>>
>>53552217
in your other class
customer foobar = new customer("John", "123 Fake St.", "12345678", "0987654321");

System.out.println(foobar.address); // prints 123 Fake St.
>>
>>53552139
Ok, for a start you only need to check divisors up to sqrt(p). Second you only need to check prime divisors. Go google Sieve of Eratosthenese.

Oh also
>Didn't indent the body of main
>div <= (p-1) instead of div < p
>++div in the loop body rather than the for statement
>No explicit block on the loop
>Closing brace on same line as last statement
>if(prime==1)

This code is a mess, did you come from Python perchance?
>>
>>53549313
ur funny
>>
>>53552277
Also real prime testing algorithms typically do some kind of pseudo primality test first (if the test fails, its definantly not prime, if it succeeds you don't know either way) which speeds things up a shit ton.
>>
>>53552344
Definantly? Really?
>>
>>53552392
defiantly
>>
>>53552392
I do math not English ok?
>>
>>53551475
>the cancer of /g/
>>
>>53551431
Embrace the new tradition.
>>
https://www.gnome.org/outreachy/

:^)
>>
File: Penguins.jpg (760 KB, 1024x768) Image search: [Google]
Penguins.jpg
760 KB, 1024x768
>>53551879
Bump.
>>
>>53552277
>This code is a mess, did you come from Python perchance?
Yes, I learned a bit of Python before starting with C, though I have only been programming in C for about a week.

>No explicit block on the loop
Could you give me an example of one?
>>
>>53552601
Explains some things.
Your code looks like you wrote Python and then added braces to things to fix the problems. You want to be adding braces to pretty much everything.
for(div=2; div < p; ++div) {
if(p%div == 0){
printf("Not a prime number");
prime = 0;
break;
}
}
>>
I want to try out programming but not sure what I want to begin with. What is the most beginner friendly language to start out with, and where do I start?
>>
Learning about piping in C, anyone have a good resource they recommend?
>>
>>53552890
Python or JavaScript.
>>
> only 3/8 test cases pass
How many i supposed to make my nlog(n) solution run faster ):
The problem wants me to get the highest number add it to a sum, subtract the highest number by 1. Then repeat. Currently using a maxheap
>>
>>53552242
>>53552171
Isn't Java standard to capitalize classnames?
>>
>>53553520
yes, eclipse usually yells at you for it
>>
>>53553520
yes

also the curly brace style is the one used in C#, but for some reason a lot of schools use that style for java
>>
>>53553556
the google style for java is an absolute mess, I don't understand why people use it.
>>
>>53553556
Allman braces is best braces.
>>
>>53550406
if x == 'Mun' or x == 'Moon':
>>
>https://sites.google.com/site/jailanguageprimer/

is it just me or does it look like shit
>>
>>53549313
cuckbol
>>
Is C# worth learning?
>>
>>53554192
No, go for Java instead.
>>
Can this be optimized?

        void LoadEvents() {
string[] files = System.IO.Directory.GetFiles(filepath).ToArray();
int filecount = files.Length;
Array.Resize(ref alarms, filecount);
displaybox.Items.Clear();

for (int i = 0; i <= filecount - 1; i++) {
string[] file = ReadFile(files[i]).Split(new string[] {Environment.NewLine}, StringSplitOptions.None);
alarms[i].realname = file[0].Trim();
alarms[i].type = file[1].Trim();
alarms[i].thedate = Convert.ToDateTime(file[2].Trim());
alarms[i].active = Convert.ToBoolean(file[3].Trim());

if (alarms[i].active == true) {
alarms[i].name = alarms[i].realname + " - ON";
}
else{
alarms[i].name = alarms[i].realname + " - OFF";
}
displaybox.Items.Add(alarms[i].name);
}
}
>>
>>53554282
> == true
>>
>>53554282
looks like c#, why not use a generic list instead of resizing the array?

also, why not store the alarm you're accessing temporarily, change the values and overwrite the index with your new object? Saves having to access the array in every step.
>>
>>53554236
this
>>
>>53554372
>looks like c#, why not use a generic list instead of resizing the array?
Isn't an array more lightweight and faster?

>also, why not store the alarm you're accessing temporarily, change the values and overwrite the index with your new object? Saves having to access the array in every step.

Not sure what exacly you mean, but that array is where all the data is stored while the program is running, it's not just there to populate the displaybox.
>>
>>53554192
Absolutely, but it depends on what you want out of it.
>>
>>53554282

 if (alarms[i].active == true) {
alarms[i].name = alarms[i].realname + " - ON";
}
else{
alarms[i].name = alarms[i].realname + " - OFF";
}

is the same as
alarms[i].name = alarms[i].realname + " - " +(alarms[i].active) ? "ON" : "OFF";

not an optimization though
>>
>>53551916
>keeping empties in your closet
underage confirmed, 4chan is 18+
>>
Hey, autists.

How do I set the file value of an input tag in JavaScript using the Chrome API?

You can't normally set the file value of an input tag using JavaScript due to security reasons, but surely you can do it with an extension API.

document.querySelector('[type="file"]').value = 'this throws an error'; 
>>
>>53554827
I have a two bedroom apartment. One is for the computer, one is the bedroom. The closet is a good place for the empties because there isn't much else in there, I keep my clothes in the living room closet so they don't smell like cigarette smoke.

Eat dicks, fuckboi.
>>
>>53551801
learn rust if you intend to use rust

the only thing it has over D is actual memory safety. also a bit better library design and documentation
>>
>>53555024
>smoking indoors
>storing empties in your closet instead of taking them out

absolutely disgusting dogg
>>
what's the three episode rule of trying out new languages?
>>
>>53555353
nice numbers, fizzbuzz numbers only
>install
>make a fizzbuzz
>uninstall
>>
How do i go from VIsual c++ Command line to GUI what do you recommend me ?
inb4
>Just use foo language XDD
>Install bar ;)
>>
File: Animation.gif (983 KB, 429x281) Image search: [Google]
Animation.gif
983 KB, 429x281
There was a guy on here that suggested diego's book on webgl, so I decided to check it out and it's help me understand some stuff I didn't really get. So I'm working on a video game idea I have and the attached gif shows my progress.
>>
>>53549267
markdown->latex program in scheme
>>
File: 1440681123843.png (80 KB, 211x176) Image search: [Google]
1440681123843.png
80 KB, 211x176
>>53555490
SEND HELP /g/
>>
>>53555490
learn MFC or ATL/WTL

or Qt or Wx
>>
>>53555699
What would you personally recommend me
MFC or Qt?
>>
>>53555725
not him but qt. At least you can try to be portable that way
>>
>>53555081
I work full time, I don't always have time to take them back. Besides, when they pile up the return is great. Gonna be $40.
And yeah I smoke beside the window; air purifier in there as well. Anything else?
>>
>>53555803
Alright thanks i'll try with Qt
>>
>>53555803
Another thing now how would i go from my command line code to qt gui? I have to rewrite everything right? Any guideline to port them?

Been reading and trying qt for some days but don't know about porting from my command line program to qt gui, also searched and nothing
>>
>>53555896
Hopefully you kept the business logic and display logic of your program separate. Then, its just a matter of rewriting the display code to work with qt.
>>
>>53555613
>webgl
>video game
epic
>>
>>53555613
nice raytracer, mate!
>>
which one is the best?
class Test:
def __init__(self):
self.a = 0
self.b = 0
self.c = 0
self.d = 0

OR
class Test:
def __init__(self):
self.a = self.b = self.c = self.d = 0
>>
>>53555951
>tfw i have a greenlight game on steam made in open GL
>>
Lets collab on an android app and make money
>>
>>53556255
the latter
>>
>>53556255
the former
>>
File: CPlusPlus.jpg (36 KB, 433x455) Image search: [Google]
CPlusPlus.jpg
36 KB, 433x455
>>53549267
>>53549267
Hi guys.
im a high school student.i program Pascal and i got an invitation to participate against teams of universities in the ACM ICPC national selection. the thing is, im not even that good. i have 4 days to fully learn C++ and understand the implementation of advanced algorithms, especially DP.
4 days. can i do it guys?
>>
>>53556267
webgl is shit though
>>
>>53556417
No.
>>
>>53556417
no. also underage v&
>>
>>53556417
>m a high school student
goodbye
>>
>>53556255
self.a, self.b, self.c, self.d = 0, 0, 0, 0
>>
>>53556255
neither
>>
>>53556441
>>53556447
being in high school doesn't necessarily make you under 18
>>
>>53556436
>>53556441
>>53556447
rude :/
>>
>>53556255
either
>>
>>53556255
which ever you prefer
>>
i only know C# and i have to develop an application in Python, i don't even know which version of it to use, much less which platform, OS or anything. what's a good place to start?

also, python is so fucking ugly and it's hard to read with its identation system
>>
>>53556496
That's AWESOME dude.

programming competitions are fun!

i would suggest you to take a look at these:

https://www.codechef.com/wiki/tutorials
http://codeforces.com/
>>
Imagine i have this vector:
std::vector<std::vector<int> > test;


how can i know the size of test without using the test.size()?

cause looping through a giant array its always calling that method and that takes time. :\
>>
Lets collab together guys seriously lets program something
>>
>>53556417
I can help you understand DP :)
>>
>>53556618
i'll make the logo
>>
>>53556569

I already program on codeforces. my rating is pretty low (1200) , but my main problem right now is mastering c++, I know the basic syntax, loops and conditions but all the libraries and predefined function will take time to master.

thanks man I appreciate it
>>
>>53556617
const int size = test.size();
for(int i = 0; i < size; ++i)
>>
File: kek.png (3 KB, 245x70) Image search: [Google]
kek.png
3 KB, 245x70
>>53556617
>not writing your own data structures for C++ programs that do not link to C++ standard library
It's like you want to be called pleb
>>
>>53556632

that would be great
>>
>>53556658
thats nice bruh.

then check this: http://codeforces.com/blog/entry/15643
>>
>>53556693
>trusting the compiler and not writing your C++ meta templates for a simple program like hello world!
plebs i swear
>>
>>53556672
 warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

i thing the size( ) method is a
 size_t 
type
>>
>>53556758
put the value in an int or unsigned int if you know it will fit so you can get better performance
>>
I'm writing a content generator that fools Google search robots into ranking my pages higher. That's not an easy task...
>>
File: 14321349231350.png (538 KB, 603x453) Image search: [Google]
14321349231350.png
538 KB, 603x453
Been learning Python vigorously since the new year.

Starting to grasp it.
Post some code I can read or some hints that will aid me.

Thank you, and back to work.
>>
>>53556918
https://docs.oracle.com/javase/tutorial/
>>
>>53556918
        globals()
.update({ "______":
lambda x: globals()
.update(( dict([[x]
*2])))}), ______(((
"Just")))
,______(( "another"
)),______ ("Python"
),______( "Hacker")
];print ( " ".join(
[(Just),( (another)
),(Python ),Hacker]
));______

>>
File: 1457550501120-1.jpg (344 KB, 780x520) Image search: [Google]
1457550501120-1.jpg
344 KB, 780x520
Working on my file manager with torrent support. I started over again because I fucked up some stuff.
>>
>>53557044
Don't forget to add mail support.
>>
>>53557195
I'm planning to send a daily status report by mail.
>>
seriously guys seriously lets collab and make a program together please
>>
>>53557231
Okay
What kind of program?
What language? (Not C++, Lua or Pyshit)
What license? (AGPLv3+ ofc)
>>
>>53557231
you need a leader but then it's going to be like "help anon for free" and no one is going to put much work into it
>>
>>53557231
Business application
Java
lets make cash
>>
>>53557251
it should be in C++ with BSD license you dick

>>53557259
retarded memers won't/can't use java
>>
>>53557280
fuck C++
>>
>>53557280
no thanks
>>
>>53557289
fuck C/python/lisp/haskell etc
>>
>>53557280
I can use any language and am willing to program any kind of program that will make us money
>>
>>53557305
We should do C#, IMO
>>
>>53557317
fuck no

C++ or java
>>
>>53557325
fuck C++

fuck java
>>
>>53557342
fuck C#
>>
>>53557289
>>53557290
>>53557305
>>53557325
>>53557342
>>53557349
Guys seriously stop arguing and lets make some deals we can do this
>>
how to translate this vector to C?
std::vector<std::vector<int> > values;


?
>>
>>53557325
>>53557366
going java is shit. the fucking out of you number by divisors. go google style for "free" and also:
>didn't much beloved
programmers using and i'm just so hideous
>>
fuck <every programming language except my personal favorite>
>>
>>53550757
everyone ignores DNT. Don't feel bad. They should be using disconnect. DNT was an idea that was never going to fly anyways.
>>
>>53557372
double (*matrix)[N] = malloc(sizeof(double[N][N]));
>>
File: 1458312697295.jpg (38 KB, 600x380) Image search: [Google]
1458312697295.jpg
38 KB, 600x380
could we make an ethereum clone or something? like a distributed paid-for webshit service provider
>>
>>53557406
>disconnect
Useless
>>
>>53550866
it's not one of those languages you learn. In my exp. You just start using it for shit when you need it. Or try and write a cli app or something.
>>
>>53557424
Any alternatives?
>>
>>53557451
ublock, the build in firefox list, umatrix
>>
>>53557474
already using ublock, I'll check out umatrix. Thx
>>
>>53557491
Remember to add more filters to ublock. The default ones are not enough.

Also use CanvasBlocker, Decentraleyes, Google search link fix and https everywhere
>>
>anime
>java
>full on nerd look
>nigger music
this guy is literally /dpt/
twitch.tv/sanjaro
>>
>>53557615
Only OSGTP listens to nigger music. We listen to Touhou OST.
>>
>>53551801
Only if you want to feel permanent rage. You will spend like 2 month to learn it properly and understand how it works so you wouldn't fight with compiler.
Syntax is very different from c/c++/..., but they made it the way it exists not because they are hipsters or something, it helps to avoid a lot of problems according to them.
2-3 years and Rust would be fully usable, I think.
>>
Why do the majority of software companies still use shit languages?

It's like a hospital still using ether to anesthetize people.

I keep getting messages from recruiters trying to get me to take jobs using Java and Python.
>>
File: browser.png (47 KB, 250x250) Image search: [Google]
browser.png
47 KB, 250x250
tweaking browser #112. the thread preview window no longer gets covered up by other windows. that's been annoying me for a long time.
>>
>>53557719
Because software companies are run by 'change is bad' managers.
>>
>>53557754
How can so many managers get away with fucking up the companies they work in for so long?
>>
>>53556617
>
vector::size()

Obvious baseless assumption which happens to be wrong: it is clear that a vector must somehow know its own size, otherwise it can't implement half of its methods, so the complexity of the method can't be but constant. Thus,
the performance gain you're making by caching size here >>53556672
is negligible, and it is also a good source of bugs, in case you change the size of the vector while iterating, for example. Maybe you were asking for iterators? At least you should look into them. Finally, remember that if premature optimisation is bad, clueless premature optimisation is even worse.
>>
>>53550757
webcancer being cancerous as usual
>>
Dear lord someone help me. Trying to do c++ polymorphism for the first time and I have no idea what the fuck is going on.
>>
>>53550757
You are ethically obligated to refuse to do it or quit.
>>
>>53549641
https://www.youtube.com/watch?v=1Y2zo0JN2HE
>>
>>53557795
Because the only person higher than a manager is the owner. Managers care about making as much $ in the shortest amount of time. Owners care about keeping the boat afloat by making sure there's a steady amount of cash flow and hauling in new clients.
TL;DR managers only care about short term. Owners care about long term.
>>
>>53557825
fuck off back to stackoverflow
>>
>>53557887
Why the fuck hire managers then? They're completely at odds with long term survival of the business, by your description.
>>
>>53557719
nothing wrong with java, in fact it happens to be possibly THE best programming language currently in existence, epic fag memer
>>
>>53557908
that's because his description is wrong
managers are assholes but they can have different goals for companies, not only short term
that was just some bullshit he pulled out of his ass
>>
>>53557929
The JVM is alright. Java the language is shit. Piss off, Pajeet.
>>
>>53557963
the only complaints against java you can come up with are based on inane personal preferences or misunderstandings

python is a terrible language but idiots can get things done with it so it's still useful for businesses
>>
>>53557645
>Only OSGTP listens to nigger music.

What nigger music?
Thread replies: 255
Thread images: 26

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.