[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: 45
File: trop.png (1 MB, 1280x720) Image search: [Google]
trop.png
1 MB, 1280x720
On time edition
Previous thread:
>>54339493
>>
>Fagposting
Delete this shit and kill yourself.
>>
File: 1462195553898.png (90 KB, 963x866) Image search: [Google]
1462195553898.png
90 KB, 963x866
Hey /dpt/,
We've started a slack group with the aim of organizing the studying of books related to CS/math/philosophy.
This Sunday we finished past projects and are starting some new ones, namely:
1)SICP
2)Networking
3)Goedel, Escher, Bach
4)Set Theory
5)Logic II
https://docs.google.com/spreadsheets/d/1A_zbRf7YoiY_454INuLXEuSuW3ro0rZtaGJtnIb4XNw here's the schedule.
If you're interested, then leave your email here (making a fake one is recommended, needed only for an activation) and I'll send an invite.
>>
File: FizzBuzz.png (13 KB, 578x461) Image search: [Google]
FizzBuzz.png
13 KB, 578x461
Who /lisp/?
>>
REAL THREAD:

>>54347773
>>54347773
>>54347773
>>
>>54347837
>real
>late duplicate
pick one
>>
File: Type Iteration.png (10 KB, 568x217) Image search: [Google]
Type Iteration.png
10 KB, 568x217
Why don't more languages have CTFE?
Why don't more languages treat types like compile time values?
>>
>>54347813
Botnet belongs on >>>/reddit/
>>
>>54347826
You post that every single day, do you even program?
>>
Nth for rust
>>
File: ;D.png (57 KB, 800x334) Image search: [Google]
;D.png
57 KB, 800x334
>>54347900
Ugly version attached
>>
File: swift_calculator.webm (1 MB, 744x1336) Image search: [Google]
swift_calculator.webm
1 MB, 744x1336
r8 my calculator /dpt/
>>
>>54347813
what's the slack domain, faggot?
>>
Is that Software Engineer manga worth reading?
Or is it basically "HIGH IMPACT SEXUAL TYPING" over and over?
>>
>>54347938
Default colour scheme is weird, especially the white

Black&red looks nice
>>
>>54347948
post-faustians
it's in the screenshot
>>
>>54347938
passing grade for class
not pretty enough for deployment
>>
>>54347813
Are you studying all those books at the same time?
Why?
>>
>>54347813
> Goedel

It's spelled Gödel and pronounced girdle
>>
>>54347874
>>54347919
D is so pretty

>>54347938
I remember you posting this here months ago. You've made some nice progress.
>>
>>54348011
He posts that constantly. It's an a_tist's respite - a place where a_tists can get together and talk about "intellectual" things.
>>
File: 1462095344908.jpg (47 KB, 640x640) Image search: [Google]
1462095344908.jpg
47 KB, 640x640
am i to be understanding to you
the pajeet meme with poo in loo
is be racism to ward indians or nationalism against india?
>>
>>54348026
the first is pretty, the second isn't
>>
>>54347813
[email protected]
>>
>>54348034
Go away, Pajeet.
>>
>>54347813
hey fag no one cares
>>
I want to speed up my psuedo-random number generator.

Would I gain anything by running the actual number scrambling through SSE2 intel intrinsics, or is that just for vector math that can be parallelized?
>>
>>54348011
No, anyone joining can choose what group he wants to follow.
>>
>>54347953
It's really bad.
>>
>>54348056
sent ;)
>>54348015
ok
>>54348011
you only have to do at least one
most people are in two or three
the group is big enough to split up a bit
>>
>>54348063
code or gtfo
>>
>>54347762

Casting isn't proper C and also isn't necessary but unfortunately is necessary to interface with C++.

Better to be safe than sorry.
>>
How do I learn D?
>>
File: D.jpg (42 KB, 512x512) Image search: [Google]
D.jpg
42 KB, 512x512
>>54348124
Step 1) Open your mouth
>>
File: 1395616790718.jpg (31 KB, 225x350) Image search: [Google]
1395616790718.jpg
31 KB, 225x350
>>54348026
>You've made some nice progress.
Thanks anon, it's almost over finally!
>>
>>54348124
become a trap
>>
>>54348169
u beat me to it
>>
>>54348169
What now?
>>
File: Dlicious.jpg (840 KB, 1580x3422) Image search: [Google]
Dlicious.jpg
840 KB, 1580x3422
>>54348211
Say aaaaaaaaaaaaaaaaaaaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHH
>>
>>54347962
Actually the default color is the Black&Red.

There will be like 50 colors on Version 1.0
>>
>>54348237
Fucking nazis
>>
>>54348237
>>54348326
How do we stop them?

I'm honestly appealed these humans are allowed to exist. It's very intolerant.
>>
File: IMG_2892.jpg (123 KB, 728x518) Image search: [Google]
IMG_2892.jpg
123 KB, 728x518
>>54347979
>not pretty enough for deployment
what am I missing anon? pls halp
>>
>>54348237
I love Deadalnix, he gives no fucks
>>
>>54348368
maybe bevel the buttons
the color schemes seem to clash to me
other than that, i just know it when i see it. like i couldn't draw the perfect woman, but when i see a girl, i know instantly if she's pretty or ugly.
>>
>>54348124
https://wiki.dlang.org/Books
>>
>>54348368
>>54348442 me again
but, i'm just some random person on the internet my tastes may not be the popular opinion.
>>
Google will give me correct answers if I type in "what is the weather outside?" or "how hot is it?" but apparently the programmers never took into consideration the possibility of adding the word "fuck" in random places, like "how fucking hot is it?"

How many NLP algorithms can be broken by arbitrarily adding the word "fuck" into the test datasets?

Also. It is 82 degrees outside. Fuck me.
>>
File: 124125235464.png (830 KB, 792x792) Image search: [Google]
124125235464.png
830 KB, 792x792
>>54348442
>maybe bevel the buttons
Thanks for the advice, I will try that

> the color schemes seem to clash to me
There will be plenty of color themes, like 50 on the release, I will be studying some nice color combinations.

> other than that, i just know it when i see it. like i couldn't draw the perfect woman, but when i see a girl, i know instantly if she's pretty or ugly.
if it has a pussy it's fine
>>
File: bequiet.gif (500 KB, 500x297) Image search: [Google]
bequiet.gif
500 KB, 500x297
>>54348497
has it ever occurred to you that google is intentionally ignoring you because you're being rude
>>
>>54348497
>82 degrees
>fuck me
Thats a beautiful day. You from Canada?
>>
>>54348497
>ruby artisan
>immature
Who would've thunk?
>>
File: 070109_odonnell.jpg (18 KB, 382x322) Image search: [Google]
070109_odonnell.jpg
18 KB, 382x322
>>54348525
>if it has a pussy it's fine
>>
>>54348497
>not using superior celsuses
Do you at least use the metric system?
>>
>>54348122
>but unfortunately is necessary to interface with C++
Trying to write C code which will compile as C++ is a fool's errand.
>>
>>54348576

It's possible still because of backwards compatibility and I would seriously not be surprised at all the people doing it until a future standard of C/C++ breaks backwards compatibility off completely.
>>
>>54348613
>It's possible still because of backwards compatibility
C and C++ are completely different languages.
C99 and C11 added shitloads of useful features that C++ doesn't have. Even in C89, there are bunch of fucking land mines which would cause C code to compile as C++ code with different semantics.
>>
>>54348551
No, but I'm in a border(ish) town. Problem is it went from like mid 50s to low 80s over the weekend.

>>54348557
Hey, if I'm thinking "it's fucking hot" while sitting at a bus stop, I might as well satisfy my curiosity and see if Google knows how to parse the many uses of the word fuck. It's a very flexible word, and people should use it more often.

>>54348573
Like any red blooded American, I use both metric and imperial as they are applicable. Metric for precise, scientific measurements, and Imperial for day to day use. Also, Kelvin > Celsius.
>>
>>54348655

I'm not saying that it's good but that it is possible even now to carve out a subset of C and C++ which will work with both compilers with same behavior and not necessarily same code.
>>
going to go take a shit
back in 10
>>
>>54348694
Why on earth would you do that? There is absolutely no advantage to doing that over writing C normally, and you don't get to use any of the useful C99 features.
>>
>>54348497
>82
Try 92 with humidity.
>>
>>54348781

One of the many reasons, aside from Diane Feinstein, that I do not wish to live in California. Even if it means I can't get a job at a lot of tech companies.
>>
>>54348807
Shit you're right. I've thought about living in California and never realized it would be just as shit weather-wise.
>>
’

Whats the name of this codification of special characters?
>>
>>54348827
I am thankful for the existence of Seattle, where I can get almost as good of job offerings as silicon valley, without the shit weather, shit people, and shit governance (in California, you can't have too many "evil features" on your rifle).
>>
>>54348829
ask a female coder.
>>
>>54348940
/dpt/ consists of nothing but female coders...
>>
File: 1437519264846.jpg (115 KB, 640x960) Image search: [Google]
1437519264846.jpg
115 KB, 640x960
>>54348940
>>54348954
Pic related is me
>>
>>54348954

I'm not female.
>>
http://pastebin.com/SSPqDr7L

I'm not trying to do anything fancy as I'm in the process of reteaching myself how to code in Java since my classes next semester only deals with this language and my university abandoned c++ years ago. Going to eventually convert everything into a GUI instead of using a command line.
>>
>>54348978
Yeah but you like to post trap pics of yourself on 8ch
>>
>>54348745
well, that took longer than expected.
anyway, i'm back.
>>
>>54348986
unfunny and about as productive as discussing "which programming language to learn first"
>>
>>54349040

I actually have not posted any images of myself on 8ch. I just post a shit ton of ponies there.
>>
>>54348978
Nobody cares about your gender. We don't even care who you are. We are only interested in content. Kill youself, tripfag.
>>
>>54349066
What?
>>
>>54348829
Escape characters.
>>
>>54348807
>humid
>California
best not to pretend you know what you're talking about
>>
File: tumblr_n41fhyJXVP1r8r4eko1_500.png (152 KB, 500x383) Image search: [Google]
tumblr_n41fhyJXVP1r8r4eko1_500.png
152 KB, 500x383
>>54349108
it was too obvious of a bait
>>
>>54349151
I was more referring to the heat.

>>54349075
Mmhmm, content. And what content have you produced lately, Anon?
>>
>>54349181
I'm not trying to bait anyone. I'm an honest man I swear.
>>
>>54349186
Ruby, you contribute nothing to this general or this board, you have no right to talk.
>>
>>54349203

Eh, I've helped a few noobies figure out what the fuck is wrong with their program before...
>>
>>54349202
you can do x >= 50 && x <= 60 to check if x is between 50 and 60 inclusive
>>
>>54349203
naw he talks about programming more than people complain about trip fags
>>
>>54349202

>honest
>"if (age == 50 || age == 51 ..."1
>wrote "if (age > 65)" and "else if (age < 40)"
>can't put the concept of '>', '<', and || to make things drastically shorter.
>do the same thing for the dice roll
>>
>>54349274
Put your trip back on, cancer.
>>
>>54348745
>not shitposting while shitting
i shiggy diggy, niggy
>>
>>54349359
I don't have one c:
>>
>>54349370
there was some fag who codes on his phone while on the shitter. wonder if he's lurking
>>
>>54347813

>>54348885
>>
>>54349402
wow
>>
>>54349256
Thank you for the serious response
>>
hey faggots, theres nothign to program anymore , everything has been made already, so you can stop trying
>>
>>54349427
sent ;)
>>
>>54349559
"no"
>>
>>54349559
Where's my perfect waifu program?
>>
>>54349559
bullshit!
write a program that coverts code written in one language to another like google translate does for spoken/written human languages
COBOL to Java
Haskell to Perl
Ruby to brainfuck
>>
>>54349613
it's been done
>>
>>54349632
lies
>>
>>54349657
google it senpai
its called a transpiler
>>
improved my 8ch scraper

now it
1. categorizes downloads by thread and board
2. is easy to change between boards, just one variable
3. Doesn't break on 503 or 404 errors

http://pastebin.com/7THXs9uk
>>
Hello.
>>
>>54349679
state ur busines........
>>
>>54349672
Why don't you go back?
>>
>>54349664
no. none of these take in one code and translate to others.
some allow you to write in this and compile to that.
i saying take any code and convert it to another code. NOT write this code that compiles to that code.
once you understand the difference, get back to me. then write the converter in assembly. nice start. now make a universal translator that recognizes pasted language and outputs in any of all other languages.
>>
>>54349679
>>
>>54348325
What does the Space Cowboy theme look like?
>>
>>54349758
Are you retarded?
>I'm saying it will convert it to another language, not compile to another language
autism
>>
File: shame.jpg (72 KB, 500x375) Image search: [Google]
shame.jpg
72 KB, 500x375
>>54349788
misusing the autism meme
>>
>>54349808
>meme
>>
>>54349690

dude weed
>>
>>54349819
is ur name elliot
>>
File: for shame.gif (833 KB, 500x316) Image search: [Google]
for shame.gif
833 KB, 500x316
>>54349788
>misusing the autism meme
>>
>>54349697
I just use it for namely for certain images that might be on specific boards that may be deleted quickly
don't really like 8ch, although I guess in some ways it is better than 4chan
my guess is at some point we'll have an exodus over there.
>>
Been thinking of adding functions to my lang shitty meme lang from a while ago.
It would be pretty easy, just have a stack somewhere, add push and pop commands, and a ret command, jumping back to the callee line... maybe not.
>>
>>54348829
>this codification of special characters
You mean HTML entities? I bet 50% of web devs don't even know that.
>>
>>54349831

No god damn it, and I told you it wasn't last time, either.

I'm not the only turbo-nerd that likes negresses, you know.
>>
File: spaceCowboy.png (523 KB, 1536x2048) Image search: [Google]
spaceCowboy.png
523 KB, 1536x2048
>>54349766
it's the first scheme of the webm
> pic related

post you're space cowboy theme I'm curious
>>
>>54347938
How long have you been working on this shit senpai? Don't you think it's time to move on to another app?
>>
>>54349959
why make a calculator when there is a of them million out there
>>
>>54349973
It's my final project for graduation so I'm putting some time on it. Next month is the presentation so it will be finally over, I already have some ideas for the next apps.
>>
>>54350013
Ah okay, that makes sense. They're letting you make a calculator app for your graduation project though? Is this for a communitty college or something?
>>
>>54350006
million of shitty 100MB broken calculators with ads, I'm just making something nice, open source, no ads, light (19MB) and well programmed. Cool way to learn Swift too.
>>
>>54347762
What's wrong with casting the return value of malloc? Some of us like floats.
>>
>>54350039
>19MB
>for a calculator app

I wrote a calculator in 12KB.
I bet 99% of your binaries is just boilerplate cocoa garbage.
>>
>>54350036
The calculator is just a part of the project, I will be presenting some research on Swift and iOS development too, pretty different stuff.
>>
>>54350064
UIKit takes most of that space, for an iOS app it's pretty light though.
>>
>>54350078
On android, you'd be pretty hard pressed to find a 6MB+ app unless it's a game.
How the fuck is 20MB acceptable for a trivial app?
>>
>>54350039
>>54350064
>>54350078

Does iOS not support dynamic linking?
>>
>>54350148
Why would it? It's a bad "feature" that just keeps things from being unstable. Sure it's bloated, but if everything ships with its own libraries, there are never any dependency issues. It's not a problem if your platform isn't slow as hell.
>>
File: wew.png (373 KB, 2048x1536) Image search: [Google]
wew.png
373 KB, 2048x1536
>>54350101
idk but I suspect StackViews brings some bloat, at least it allows some sexy multitasking.

Now really, you can't find a nicer calculator than mine for less than 20MB (at least in the App Store)
>>
>>54350201
the multitasking is part of the app and not a native feature of iOS?

you can't make this shit up, holy shit
>>
>>54347813
it's against the rule to advertise
>>
>>54350225
It's "native" but of course you need to tell how the UI elements will behave when compressed/squeezed... Apple made StackViews to make that easier but I suspect it's kinda bloated (really slow on 32-bit devices if you let it's spacing on "fill proportionally")...
>>
I don't get why working with external libraries in python is so user-unfriendly when the language itself is meant to be high-level.
>>
>>54350242
Not if you pay hiroshima nagasaki for the privilege. In that case, a dedicated moderator will run the ad for you.
>>
File: thedreamers.jpg (148 KB, 1280x960) Image search: [Google]
thedreamers.jpg
148 KB, 1280x960
/python/

I have string
z = 'Shitposting is bad, '

and array/list with 20 strings from 'a1' to 'a20'
tab = ['a1',...,'a20']


I would like to make function that would return

'Shitposting is bad, a1, a2,..., a20'


Is it possible this way?

I was trying with for i in tab, but it would iterate whole tab and result would be 'Shitposting is bad, a20'
>>
>>54349959
>>54350201
your calculator is shit.
>>
>>54350353
Use D
writefln("%-(%s, %)", tab);
>>
>>54350189

Surely, at least the iOS standard libraries, which are controlled by Apple, should be dynamically linked, to save on both storage space and RAM usage, the former of which being severely limited on iOS devices.
>>
File: 12994958946.jpg (86 KB, 500x447) Image search: [Google]
12994958946.jpg
86 KB, 500x447
>>54350369
Thanks anon
>>
>>54350439
i made all that up buddy
>>
>>54350353
z + ', '.join(tab)


>>54350438
now that's what i call shitposting
>>
>>54350320
But that's no where close to true. pip install and import and you don't have to do anything else. It's brain dead.
>>
>>54350460
Honest suggestion my friend
>>
>>54350444
if you expect people to only praise your work, then you might aswell just kill yourself right now.
>>
>>54350507
I literally don't care anon, I'm here just for the feedback/shitposting, also I'm apparently the only iOS developer here so I'm helpless
>>
>>54350507
if you expect people to appreciate your coming into a thread, nonconstructively shitting all over everyone, and then telling them to commit suicide, you might as well get the fuck out
>>
>>54350552
you literally do care, you care enough to comment and ask for feedback
>>
>>54350462
I've tried that and it didn't work, and worse, it's useless when the script is supposed to run on someone else's computer. I guess that's what virtualenv is for, but that doesn't exactly work easily either
>>
>>54350564
didn't read >>>/reddit/
>>
>>54350596
keep your browser history to yourself buddy
>>
>>54350604
stay mad
>>
>>54350604
kek'd out loud
>>
>>54350564
Kill yourself, redditard.
>>
>>54350575
I mean I don't care about people "not praising" my work, I'm here for the useful feedback that I get sometimes.
>>
>>54350609
>mad
https://www.youtube.com/watch?v=En__V0oEJsU
>>
>>54350650
lmao
>>
>>54347762
Stop this programming fag meme.
>>
>>54350579
Yeah, virtualenv can be tricky if you don't understand it. But unless you are using some ancient version of python there's no way pip should ever break.
>>
>>54350579
Graduate to a real language, such as rust.
>>
I'm still struggling to understand binary trees. I have a very rough, basic implementation of them here: http://pastebin.com/RNv4PwFu

What I'm wondering about is the insert function. This insert function works:

void insert ( int nkey, struct node **n ) {
/* inserts a key value into the binary search tree */
if ( (*n) != 0 ) {
nkey >= (*n)->key ? insert(nkey, &(*n)->right) : insert(nkey, &(*n)->left);
} else {
(*n) = malloc( sizeof(struct node) );
(*n)->key = nkey;
(*n)->right = 0;
(*n)->left = 0;
return;
}
}


While this does not:

void insert ( int nkey, struct node *n ) {
/* inserts a key value into the binary search tree */
if ( (n) != 0 ) {
nkey >= (n)->key ? insert(nkey, (n)->right) : insert(nkey, (n)->left);
} else {
(n) = malloc( sizeof(struct node) );
(n)->key = nkey;
(n)->right = 0;
(n)->left = 0;
return;
}
}


The only difference between the two functions is that one uses a pointer to a pointer to a node, and the other uses a pointer to a node. But with the former, everytime the node is referred to, it is dereferenced at least once, so I thought that the latter function would work. Independently, I made a bunch of programs to test every instance of the node n from the former with the latter, and I'm fairly sure all the expressions are equivalent. But one seems to work and the other does not.

Please help. It's working, but I really want to know why.
>>
File: deniseQt.gif (3 MB, 420x213) Image search: [Google]
deniseQt.gif
3 MB, 420x213
>>54350460
Thank you
>>
>>54350886
Because in the second one, you're only modifying the local variable 'n'. It makes to changes to the pointer to node outside of the function.
>>
>>54351220
You shouldn't bother with this densefaggot, he was given the explanation several times and still doesn't get it.
>>
File: mainmenuripples-nosound.webm (610 KB, 316x562) Image search: [Google]
mainmenuripples-nosound.webm
610 KB, 316x562
rate my start screen edition
>>
>>54350871
I already know C and Java as far as "real languages" go, I don't know rust because nobody fucking uses it
>>
>>54351296
>No functionality with a clean UI

Kid you'll do just fine in the startup biz.
>>
>>54351314
>clean UI
thanks famalam
I haven't thought of a game idea yet so I've just been working on the start screen
>>
>>54351296
> why is the resolution so low?
> get prettier icons and fonts
> what kind of game is it?
> what language are you using?

I rate it 4/10 right now
>>
>>54351352
The desktop launcher is intentionally low just so it fits on my tiny shitty res 13" screen. It's native res on your phone.
I made the icons in a couple minutes in gimp as placeholders, will definitely swap.
>what kind of game
There isn't one yet.
>what language
meme Java, for Android. My last game was in C though if that scores any notafaggot points.
>>
>>54351389
post your last game
>>
File: shittygame.webm (2 MB, 640x360) Image search: [Google]
shittygame.webm
2 MB, 640x360
>>54351417
Bare in mind it's completely from scratch (minus game assets, a friend made menu assets), also the level complete text was added the night before the due date lol

Also it's not intended to be played by anyone, just a silly final project for intro to programming with C class
>>
>>54347813
[email protected]
>>
>>54351448
neat stuff anon!
>>
>>54351538
thanks famalam
>>
In C++ if I have a class that has a pointer to a pointer such as private member
 singleLinkedList<T> ** hash_array; 


when calling the destructor is the correct way to deallocate the memory as
 delete[] *hash_array 


or should I use a double pointer there as well, or no pointer at all?
>>
>>54351641

int var yourLife = "shit";
delete(yourLife);

>>
File: 1384433572560.png (239 KB, 421x433) Image search: [Google]
1384433572560.png
239 KB, 421x433
>>54351669
that's not very nice :(
>>
>>54347762
Weebs are pathetic as fuck. Can't you separate your hobbies and your childish cartoon habbits? Does everything have to be in an anime package for you to want it? Children.
>>
>>54351300
Lmao butthurt pajeet!
>>
>>54351220
oh shit, I get it. I'm passing in a pointer by value, as opposed to by reference, right? I've made a copy of the pointer, so it doesn't matter that I dereference it, since I'm going to the wrong place.
>>54351264
fuck u brah imma make it, YOU see
>>
File: ??????????.gif (294 KB, 242x333) Image search: [Google]
??????????.gif
294 KB, 242x333
What is the difference between this:

boost::asio::io_service::work work( io_service );


and this:
boost::shared_ptr< boost::asio::io_service::work > work(new boost::asio::io_service::work( io_service ));


Not really sure what the advantage of the second one would be.
>>
>>54351731
> gtfo of my /g/ reeeeeeeeeeeee
>>
>>54351767
>C++
>>
>>54351786
More like:
>boost
>>
What the FUCK is this Rust meme, and how come it has lasted so long?
>>
File: Clipboard01.png (16 KB, 634x296) Image search: [Google]
Clipboard01.png
16 KB, 634x296
>>54347762
char *string = "3456";
for (char *i = string; i != '\0'; i++)
{
putchar(*i);
}

I'm pretty drunk right now, but why the fuck isn't it working?
>>
>>54351824
you want
*i != '\0', which is also written as *i
>>
>>54351823
The best language ever made, cursed by its creators with the mark of the CoC.
>>
got my wallhax working senpai!
>>
>>54351824
>i != '\0'
you want (*i) != '\0' there

youre reading past your string because your condition is never met
>>
File: 4505022808.jpg (98 KB, 1366x768) Image search: [Google]
4505022808.jpg
98 KB, 1366x768
Is it possible to disable internet access for a project in Visual Studio? I need to debug my application without turning off the wifi.
>>
>>54351857
Why isn't occlusion testing done server-side anyway?
>>
>>54351870
wouldn't it eventually be met after he loops through all of his memory, it overflows and get set back to 0?
>>
>>54351870
>>54351850
thanks
>>
>>54351877
add it to your firewall
>>
>>54351499
sent ;)
>>
File: Capture.png (56 KB, 513x501) Image search: [Google]
Capture.png
56 KB, 513x501
guys how do i make the black panel go down and fill the bottom?

public class DrawApp extends JPanel{

private JRadioButton redButton;
private JRadioButton yellowButton;
private JRadioButton blueButton;
private JRadioButton eraserButton;
private JButton clearButton;
private JPanel control;
private ArrayList<Point> pointList;
private int clickCount;
private Color penPaint;

public DrawApp() {
setLayout(new FlowLayout());
control = new JPanel();
control.setBackground(Color.BLACK);
add(control,BorderLayout.SOUTH);

clickCount = 0;
pointList = new ArrayList<>();
redButton = new JRadioButton("Red");
yellowButton = new JRadioButton("Yellow");
blueButton = new JRadioButton("Blue");
eraserButton = new JRadioButton("Eraser");
clearButton = new JButton("Clear Drawing");
control.add(redButton);
control.add(yellowButton);
control.add(blueButton);
control.add(eraserButton);
control.add(clearButton);


}
>>
>>54351911
my guess is that you have to add another JPanel and position it at the bottom
>>
>>54351927
i did add a jpanel behind those buttons, im just wondering if i have to use some other layout or if there is some quick method
>>
>>54351893
Ehh, it doesn't appears in the allowed apps list, but ty.
>>
>>54347938
Those flags slightly annoy me for some reason.

The design of the calculator looks "flat" if you can call it that way,then you have those flags that give an impression of depth.
It makes me feel like they don't belong there
>>
>>54351885
The OS would kill the program way before that
>>
>>54352010
I presume so yeah. Also, even if it didn't, it would only overflow and set to 0 if the computer had as much member as the pointer's max value
>>
>>54351880
cs:go is like the only game that does it server side.
>>
File: 1458679968630.jpg (293 KB, 389x326) Image search: [Google]
1458679968630.jpg
293 KB, 389x326
>>54351786
>>54351814
I expected this.
>>
File: what_its_like_to_use_C.png (468 KB, 936x550) Image search: [Google]
what_its_like_to_use_C.png
468 KB, 936x550
Currently programming to this
https://www.youtube.com/watch?v=cbkkCUw_Spo
>>
anyone written their own file explorer? Must be pretty easy, right? like very easy, since you can request all files in a directory from the command line in literally ever language
>>
File: 1462153965759.gif (2 MB, 416x414) Image search: [Google]
1462153965759.gif
2 MB, 416x414
Generating lots of xml/nzb files.
Currently made 130,000 with 20,000 left. 24~ hours its been going so far.
>>
>>54352222
Well yeah, the actualy work of it would be whatever face you use. It's not really much of anything if you make a CLI file explorer (without ncurses etc of course)
>>
>>54352222
Tell that to the Thunar devs
>>
>>54352302
>>54352288
OK... obviously yes there is a lot of difficulty (and a huge timesink) to be found in it depending on how good you want it to be
>>
I have 2 hours and a half to make a paint program. How fucked am I?
>>
>>54352373
in what lang? do you have to use a specific library? it's definitely doable
>>
>>54352396
java, im actually kind of half done with making buttons right now but i gotta figure out how to make the mouse draw. Im gonna use maybe an arraylist for that, but i also need a button that clears the screen so Im searching up how to do that
>>
>>54352421
>>what lib??
Does java have something standard that you're using? Perhaps that is more difficult than the few libraries I know. Also, I'd recommend storing pixels and changing them upon clicks, and clearing the screen simply by setting all pixels to white, rather than something like having an arraylist of all the coordinates that have been drawn on.
>>
>>54352442
>lib
anything like swing awt and util
>>
>>54352421
he's fucked without strong knowledge of his java lib, takes me hours on hours to figure out how to do things.

also how would you draw without an arraylist of pixels?

also for the other guy a reset button can be done by overwriting with a color easily enough
>>
>>54352421
penup
pendown
onclick
secColor
etc... should be outlined in your assignment
surely there's a youtube tutorial
oh wait, there it is https://www.youtube.com/watch?v=OOb1eil4PCo
this fuck is wasting time on 4chan rather than google/SO/java documentation
sure to fail class, and life
>>
>>54352421
have an area, if mouse is in that area and button pressed, put the pixel in the array
this is in the update method

then have a draw method which draws the "pixels" in the array


so a clear of the array will correspond with nothing being drawn
>>
>download source files for 'tcc'
>./configure
>make
tccrun.c: In function ‘rt_get_caller_pc’:
tccrun.c:487:33: error: ‘mcontext_t {aka struct __mcontext}’ has no member named ‘gregs’
*paddr = uc->uc_mcontext.gregs[REG_EIP];

>has no member named
>>HAS NO MEMBER NAMED
>LITERALLY ERROR IN THE SOURCE CODE
I'm fucking done
>>
>>54352499
setColor*
and here's a better video too
https://www.youtube.com/watch?v=235mse79MCw
>>
>>54352513
This happens on rolling release distros too.
>vlc segfaults on startup now
>>
What exactly is node.js used for? is it just server-side scripting?
>>
>>54352513
Sucks when it happens, but it's not like you can't fix it quickly yourself
>>
>>54352549
>About Node.js®
>As an asynchronous event driven JavaScript runtime, Node is designed to build scalable network applications.

>>54352557
I MIGHT be able to dig into the code and find out how to fix an error relating to a member of a struct that I literally have no idea what they are for. But even if I could, should I really be expected to?
>>
>>54352549
any personal work with javascript is done through node too usually
like for decrypting gson or just computer maintainance work
>>
Are web apps a bubble economy the way web dev is?
>>
>>54351767
it's easier to pass the thread around between objects and allows objects to store the thread. doesn't strike me as great design without seeing the rest of the code, what is concurrent should easily be so or you will open pandora's box of undebuggable runtime errors.

but seriously why not std::async or std::thread and std::shared_ptr. I guess if you already have boost installed it doesn't really matter.
>>
got eclipse open on main, folders and browser split share second screen.
what is a decent yet affordable 3rd monitor for vertical display, for reading reference books? looking for CHEAP 17"-24" i guess but needs to have some way to make it stand vertically
>>
>>54352846
>why doesn't java have a 'for each' loop?

It does.
>>
>>54352846
1. it does. for (type var : list) { ... }
2. holy shit
3. this is why you don't learn python first
>>
>>54352846
https://docs.oracle.com/javase/1.5.0/docs/guide/language/foreach.html
>>
>>54347874
Idris has both :3
>>54349613
you're literally just describing compilers
>>54352846
java sucks but you sound like a web dev man baby
none of those are the actual problems in java
>>
>>54352913
you don't have to create an iterator you fucking dense retard, read the actual article in >>54352873
>>
File: 1368638532828.jpg (25 KB, 292x261) Image search: [Google]
1368638532828.jpg
25 KB, 292x261
>>54352846
>Why does it need a semicolon at the end of every line

nigga......
>>
ok I'll admit defeat

I think there's a good chance I am wrong so I wont push it further
>>
I'm surprised the javjeet new how to delete a post.
>>
In reterospect, I really shouldn't have listened to /g/ about the job search since most of the people here are NEETs who use Arch and code in haskell

Web dev may be dying but dat engineering and web app develoment are the shit right now and I should just do what I have the most experience with and work in node.js

As computers get ever faster, shit like C is going to lose more and more of its foundation. Already the gaming industry has been taken over by scripting languages and a lot of the computational heavy-lifting is being handled server-side
>>
>>54352978
meanwhile, moore's law, transistor size, processor speed and disk capacity has ground to a complete halt and software will only become slower and slower from this point forward

I can't wait for compiled languages to make comeback once everyone realized just how stupid it is to write your desktop applications in coffeescript.
>>
>>54352863
IDK, Anon
But I don't want you to leave empty handed, since >>54352866
kind of stole the thread with the stupidest question I’ve since this year. So I got you some tiddies! YAY!
Hopefully one of the senpais can help you. But it's been iffy today.
>>
>>54353012
uh, thanks...
>>
>>54352978
>getting career advice from a chinese cartoon board
kek

>haskell
nope

>I should just do what I have the most experience with
then do it faggot, we meme that shit because /wdg/ threads are for fags

>C is going to lose more and more of its foundation
C++ is where it's at, and it's niche is already well established. It's clearly not used for everything.

>gaming industry has been taken over by scripting languages
>trying to get a job in game development
enjoy your shit hours, shit pay, and eventually outsourcement by a chink you cuck.


basically you're just a huge faggot.
>>
>>54353028
Fuck! Sorry for the typos and link to wrong stupid faggot. Enjoy the bewbs, though!
>>
File: Ca9DxSuWwAAbnQX.jpg (53 KB, 499x499) Image search: [Google]
Ca9DxSuWwAAbnQX.jpg
53 KB, 499x499
Fuck, after looking for 12+ hours I haven't found a solution so I'll ask you /g/ents.
I need to run a method asynchronously (awaited, so it doesn't blocks), and that method can raise an exception. I need that exception to go up to the caller, but I can't figure it out.
C# btw:
Caller method on the UI:
private async void ExceptionTask_Click(object sender, RoutedEventArgs e)
{
try
{
await myTest.Raise();
}
catch (Exception err)
{
HandleError(err.Message);
}
}

Little bastard that doesn't propragates the exception.
public async Task Raise()
{
await Task.Factory.StartNew(() =>
{
throw new ArgumentOutOfRangeException("Dun goofed");
});
}
>>
>>54353124
http://stackoverflow.com/questions/5983779/catch-exception-that-is-thrown-in-different-thread

?
>>
so i have a question. how do i find/remove invisible water marks on a PDF for a book.
>>
>>54353211
also i don't need to remove it but if there is a way of making a copy with out it that works just as well. i just need PDF of book without water mark.
>>
>>54353208
Checking...
>>
File: atomica_unicode.png (78 KB, 499x798) Image search: [Google]
atomica_unicode.png
78 KB, 499x798
Got some new tweaks in today and finally got that fucking unicode arrow to work.

FLACs also properly tag now. Next up, lightweight toaster notifications for track changes and maybe automatic album art retrieval from the internet if it's not in the folder already.

Any suggestions for good features to add?
>>
>>54347762
fag
>>
File: fa9ec7d66a.png (21 KB, 892x362) Image search: [Google]
fa9ec7d66a.png
21 KB, 892x362
>>54353208
>>54353292
I couldn't even catch it ;_;
>>
>>54353534
just have a result type like Either<ArgumentOutOfRangeException, string> desu
Thread replies: 255
Thread images: 45

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.