[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


Thread replies: 364
Thread images: 40

File: 1458075586890.jpg (166KB, 595x842px) Image search: [Google] [Yandex] [Bing]
1458075586890.jpg
166KB, 595x842px
Old thread: >>53679663

What are you working on, /g/?
>>
>>53687586
Who is this cute? I would marry her.
>>
>>53687586
Two perl hashes of hashes to be combined later for a report that didn't need them but I had to make anyway so that I could send that data to my coworker to front-end in php so he could feel he contributed to the project. FML.
>>
>>53687678
http://safebooru.org/index.php?page=post&s=view&id=727065
3 secobds in iqdb
>>
>>53687678
>her
>>
putStrLn "Haskell is fun!"
>>
>>53687586
kill yourself
>>
>>53687776
She is whoever she chooses to be! Every part of her is a woman including her girl penis!
>>
>>53687586
YOU DIDN'T WAIT UNTIL THE BUMP LIMIT WAAHHHHH I'M GONNA POST A DUPLICATE THREAD NOW AND SPAM IT ALL OVER YOUR THREAD WAAAAAAAAAAHHHHHHHH
>>
>>53687845
kill yourself idiot
>>
>>53687586
trying to figure out how neural networks work, so I wrote one, and figured I'd try and teach it addition

currently it takes two single-digit numbers, and produces 4

always 4

I don't know why
>>
>>53687916
Calm your autism, fag.
>>
What IDE to use on Linux for C++?
>>
>>53688091
emacs
>>
>>53688072
just channeling the trap fag and his (probably samefag) butt buddy from a few threads ago
>>
>>53687874
Cross dressing doesn't mean you identify as female! Stop putting people into your binary gender boxes!
>>
>>53688091
vim, nano gedit . . .
>>
>>53688161
he said 'IDE' not 'autist text editor'
>>
>>53688091
CLion.
>>
>>53688172
But an IDE is an autist text editor, you're not writing shopping lists up in netbeans.
>>
>>53688091
>Linux
>IDE
>C++
ahahhahahahahahaha faggot
>>
Hey guys!

how do I post my code like this>>53687845
?
>>
>>53688091
Emacs
Kate
>>
>>53688185
Fuck off nigger.
>>
>>53688220
Read the rules and FAQ like the site told you to.
>>
>>53688257
Thank you for that mature, thoughtful reply. Individuals like yourself raise the collective quality of this find board.
>>
>>53688220
wrap it in
{code} {\code}

with the braces replaced by brackets.
>>
Ok, Atom it is!
>>
>>53688275
Your post raped the thread inside out.
>>
Guys I have another problem

I started using case instead of if statements like I was suggested in the last thread, and now my scanner is acting weird.

Its supposed to ask for a number, do what the number says after the user inputted it, and then go back to the beginning and ask for a number again

its just taking one input, executing the code, and then not asking again

heres part 1 of the code:

package o;

import java.util.Scanner;
import java.util.ArrayList;

public class DictionaryTester {


public static void main( String args[]){
ArrayList<WordDef> dictionary = new ArrayList<WordDef>();
WordDef w1 = new WordDef("Amicable","Friendly");
dictionary.add(w1);
WordDef w2 = new WordDef("Bemused","Puzzled");
dictionary.add(w2);
WordDef w3 = new WordDef("Colloquial","Characteristic of informal language");
dictionary.add(w3);
WordDef w4 = new WordDef("Deleterious","Harmful to living things");
dictionary.add(w4);
WordDef w5 = new WordDef("Egregious","Reprehensible");
dictionary.add(w5);

Scanner sc = new Scanner(System.in);
menu();

int result = sc.nextInt();
switch (result){

case 1: System.out.println("Enter the word you would like to add.");
sc.nextLine();
String word = sc.next();
System.out.println("Enter the words definition.");
sc.nextLine();
String definition = sc.next();
dictionary.add (new WordDef(word,definition));
break;


case 2: boolean a = false;
System.out.println("Enter the word you would like to remove.");
sc.nextLine();
String word1 = sc.next();
for (int i = dictionary.size()-1; i>=0; i--){
if (dictionary.get(i).equals(word1));
a = true;
dictionary.remove(word1);

if (a== false){
System.out.println("There is no such word!");
}
}
break;
>>
>>53688091
that depends on how much you're willing pay, goy
>>
>>53688305
part 2
    case 3:    boolean b = false;
System.out.println("Which word's definition would you like to change?");
String findWord= sc.next();
for (int i = dictionary.size()-1; i>=0; i--){
if (dictionary.get(i).getWord().equalsIgnoreCase(findWord));
System.out.println("What is the new definition?");
b = true;
String newDef = sc.next();
dictionary.get(i).setDefinition(newDef);
}
if (b==false){
System.out.println("There is no such word!");
}

break;

case 5: for (int i = dictionary.size()-1; i>=0; i--){
System.out.println(dictionary.get(i).getWord() + "- " + dictionary.get(i).getDefinition());
}
}

}


public static int menu(){
System.out.println("To add a new word to the dictionary, enter '1'. To remove a word from the dictionary, enter '2', To change the definition of a word, enter '3'. To get the definition of a word, enter '4'. To display all the words of the dictionary and get a total count, enter '5'. To exit this menu, enter '6'.");
Scanner scan = new Scanner(System.in);
int x = scan.nextInt();
return x;
}
}
>>
>>53687586
https://www.youtube.com/watch?v=pvAsqPbz9Ro
trying to learn to Java... what y'all working on?
>>
>>53688324
nothing
>>
>>53688305
which part of the code you posted is supposed to do it all again?
>>
>>53688305
You need a while loop.
>>
>>53688343
the switch result I though

before when I was doing if statements I had a
while (return != 6){

but that didnt work either
>>
>>53688364
just tried this >>53688372
but didnt work :/
>>
>>53688305
>>53688326
>>53688372
aww hell naw dog
>>
>>53688372
it lacks the proper use of the default case.
>>
>>53688305
>>53688326
I'm not sure if serious. You have no iteration to ask for input again. Also this code is messy as fuck
>>
>>53688395
What exactly "didn't work"? Did you get an error or did the program not behave as expected?
>>
>>53688300
>using browser as IDE
i hope you're just trolling
>>
>>53688343
>>53688364
>>53688372
>>53688395
>>53688410
>>53688406
>>53688400
>>53688418

actually the while look made it ask again but only for the input given

like if input one, it asks for a word and definite n etc, and when I put in the stuff, it just asks me what word I want to put in again instead of the number

not sure if this makes sense I'm sick in bed with a fever right now and its hard to think straight so sorry
>>
>>53688434
Don't sick and code, it will be bad for you in the present and your future self will be confused as fuck. I hope you feel better.
>>
>>53688335
oh no no no, goy. do not skimp on your ide! that simply will not do. can I interest you in one of our starter packs?
>>
>>53688434
Your while loop is obviously in the wrong place. Post your code with the while loop and we can point out your mistake.
>>
>>53688450
thanks anon. Ill appreciate your concern and Im gonna take it slow I just can't afford to not hand this in soon. :/
>>
>>53688462
heres the first bit where the while loop is, lmk if you want the whole thing
package o;

import java.util.Scanner;
import java.util.ArrayList;

public class DictionaryTester {


public static void main( String args[]){
ArrayList<WordDef> dictionary = new ArrayList<WordDef>();
WordDef w1 = new WordDef("Amicable","Friendly");
dictionary.add(w1);
WordDef w2 = new WordDef("Bemused","Puzzled");
dictionary.add(w2);
WordDef w3 = new WordDef("Colloquial","Characteristic of informal language");
dictionary.add(w3);
WordDef w4 = new WordDef("Deleterious","Harmful to living things");
dictionary.add(w4);
WordDef w5 = new WordDef("Egregious","Reprehensible");
dictionary.add(w5);

Scanner sc = new Scanner(System.in);
menu();

int result = sc.nextInt();
while (result != 6){
switch (result){

case 1: System.out.println("Enter the word you would like to add.");
sc.nextLine();
String word = sc.next();
System.out.println("Enter the words definition.");
sc.nextLine();
String definition = sc.next();
dictionary.add (new WordDef(word,definition));
break;


case 2: boolean a = false;
System.out.println("Enter the word you would like to remove.");
sc.nextLine();
String word1 = sc.next();
for (int i = dictionary.size()-1; i>=0; i--){
if (dictionary.get(i).equals(word1));
a = true;
dictionary.remove(word1);

if (a== false){
System.out.println("There is no such word!");
}
}
break;
>>
>>53688485
Notice how
sc.nextInt()
is outside the while loop. That means it'll never re-prompt the user for another integer to put in result.

Try this:
int result = 0;
while (result != 6) {
result = sc.nextInt();
/* rest of your code */
}
>>
>>53688049
Have you tried to randomly modify weights? Looks like a bug.
>>
Moved from MATLAB to VB to python and now to C++ (I had a fucked up learning curve).

using namespace std;

or
std::cout 


Does it even make a difference? Do I ever need to not use the std namespace?
>>
int script(string exec){
system(exec.c_str());
return 0;
}

string execute = "python script";
bool firstrun = true;
bool finished = true;
future <int> future;
future_status status;

while (true) {

if (finished){
future = async (script, execute);
finished = false;
}

status = future.wait_for(chrono::milliseconds(0));
cout << (int)status<<(int)future_status::ready <<endl; //testing values

if (status == future_status::ready){
finished = true;
}


if (firstrun){ //wait for the script to finish if first run of script
future.wait();
firstrun = false;
}

//do extra stuff asynchronously while script runs
}


Help a nigga out, been stuck at this for a while. Basically what I'm trying to do is to run a script asynchronously while I run the c++ program. However, the script only runs if it not in use. The issue i'm having is that the second time the script is run
status == future_status::ready
fails and then I get locked out f(because
finished = true
never occurs and I can't run the script again. How the fuck can I fix this?
>>
>>53688515
>int result = 0;
>while (result != 6) {
> result = sc.nextInt();
thanks!

it worked in that now I can input other number but this is whats happening

it isn't asking me to choose a number I just am just inputting them, and when I choose 3, 3 wont stop

i tried moving the break but it didnt stop it D:
>>
>>53688518
I figured out why it was doing it

basically for the fitness function, I was adding the signal to the correct answer and subtracting the signal to the incorrect answers, so it figured out that the best way to proceed was to pick one particular number and give it the strongest possible signal, and all the other ones zero

I don't know how to fix it
neural networks are hard
>>
>>53688565
You shouldn't use
using namespace std;
because it defeats the purpose of a namespace, namely to prevent namespace pollution.

Better is to use
using std::cout
. You should place this in a function definition the name does not enter into global scope.
>>
>>53688326
You have two scanners on System.in for some reason. One's scoped locally in the menu() method and the other one's scoped inside your Main function.

A better way to do this (and to make sure you only have one scanner on your System.in) is to scope the scanner privately (so declare it before you enter main) and then instanciate it before you do anything. That way you can access the scanner from anywhere in this class without having to pass the scanner around inside your methods

But yeah, your scanner isn't working right because you have two.
>>
>>53688591
Remove the semi-colon at the end of
if (dictionary.get(i).getWord().equalsIgnoreCase(findWord));
>>
>>53688604
But how often will I come across different namespaces? Going the extra length now might save me a lot of time in the future, or on the hand - completely waste it.
>>
>>53688634
thanks! trying right now

>>53688657
i get an error that says ; expected at the end
>>
>>53688666
>But how often will I come across different namespaces?
Often. Modestly-sized projects will have different namespaces.

But that's besides the point. Let's say you have a variable called map. Well, at first you might not have any issues. Later, however, you might include a header file that defines a variable/class/function called std::map. Because you are using namespace std, you now have to go back and change your variable names.
>>
>>53688686
Noticed another problem: you need braces around whatever is supposed to be in your if statement. That said, I'm not sure why your gettting the error. Post the code in case 3:
>>
Where did everything go wrong?
>>
>>53688738
you mean curly braces after this I assume? >>53688657


heres case 3

its a bit of a mess
>>
>>53688852
Jesus fuck, indent your code. Eclipse does it for you: select it all and Ctrl+Shift+F. You'll like it much better.
>>
>>53688832
As soon as you got interested in programming.
>>
>>53688634
>scope the scanner privately (so declare it before you enter main) and then instanciate it before you do anything
embarrassingly enough, I don't think I can figure out how to do this
>>
>apply to company
>they want me to answer a few open ended questions about shit I've worked on
Do I just make my answers as long as I want? I want to give detail on what I did to show that I know what I'm doing, but I ended up writing a page of shit and I don't want them to say tl;dr and throw it in the trash.
>>
>>53688969
it would be epic and reddit-friendly if at the end you put
>tl'dr: I rock!
:^)
>>
I've been asked to build a system where the client has hundreds of files which they want to dole out to subscribers in a controlled manner.

For example, if subscriber A just made a new subscription, then A can access the first 3 files in some sorted heirarchy.

Meanwhile, subscriber B has been subscribed for three months, so the first three items are now inaccessible to B, however B can access items 4 - 6 (for month 2) and items 7 - 9 (for month 3)

How retarded does this sound? Does it sound easy? I haven't thought about it too hard and was thinking my client could upload the desired files to a server and place them in subdirs. Then I'd write a program which takes care of user registration and records who's been subcribed for how long and then grants access according to their duration of subscription and which content they've paid for.

Right.

So essentially I guess I could put all the files from all the directories into autoindex (this is just theory it'd be nicer looking than that) and write an http server which manages users and their permission to access directories.

I supposed if I was using nodejs with express for example I could just write a piece of middleware code which intercepts requests and checks the requesting user's permissions against their privileges.

???
>>
>>53687586
>>53684826
Same person with another cmake question. Is there any way to declare an executable in advance, then define its composition etc later? To allow targeting libraries for linking.

Keep writing my way into catch 22s. Can't have both and would rather not duplicate code unnecessarily.
>>
What cloud storage software does /dpt/ use?


Dropbox keeps eating my files and its pissing me off. (Save on desktop, then open on laptop, instead of downloading the new file it instead deletes the file on dropbox)

About to make my own NAS unless anyone has a better solution
>>
>>53689161
>cloud
personally I use a usb
>>
>>53689161
>le cloud
I just store my shit on my home server, for which I have SSH access.
>>
>>53689161

I've started using Onedrive because I get it free. Works really well for my needs.. but then I've never tried it outside Windows.
>>
>>53689170
Not too bad a solution either, but it is nice not having to plug it in. Of course this isn't sUp3R l33t hacker encrypted private bullshit, this is just general files i'm working on. I don't care about the cloud-botnet circlejerk.

>>53689185
Looks like compatibility with linux is sketchy...
>>
>>53689211
>not having to plug it in
normally I do it while I'm waiting for my computer to start
not like it takes that long
>>
>>53689118
>Is there any way to declare an executable in advance, then define its composition etc later?

I'm not following your question. What do you mean by "declare an executable in advance"?
>>
>>53689231

"while i'm waiting"... Wtf?

In the day of SSD and linux abound who has to wait anymore.
>>
>>53689250
Does your computer take less than 1 second to start?

you have enough time to plug a usb in

you memeing fuck
>>
>>53689297
he uses fucking linux, probably some "bloat-free" shit distro
>>
can anything serious be done using Blockly exclusively?
>>
>>53689317
>"bloat-free" = shit

It is arch, but who gives a shit this isn't the argument... WHAT DO YOU PEOPLE USE AS A CLOUD SERVICE?

Dropbox sucks, OneDrive is dodgy on linux, Google Drive is okay, but storage is a bit low.

Either A usb keychain or B turn a shitty laptop into a NAS it looks like.
>>
>>53689352
I use Dropbox and have never had the problem you describe.
>>
>>53689244
My mind is working poorly lately, so I'll just show what I mean.

if(USE_SYSTEM_ZLIB)
find_package(zlib)
if(ZLIB_FOUND)
include_directories(galib "${ZLIB_INCLUDE_DIRS}" zopfli/src/zopfli)
else()
unset(USE_SYSTEM_ZLIB)
endif()
endif()
if (NOT USE_SYSTEM_ZLIB)
set(ZLIB_SOURCE zlib/adler32.c zlib/compress.c zlib/crc32.c zlib/deflate.c zlib/infback.c zlib/inffast.c zlib/inflate.c zlib/inftrees.c zlib/trees.c zlib/uncompr.c zlib/zutil.c)
include_directories(galib zlib zopfli/src/zopfli)
endif()

add_executable(pngwolf
pngwolf.cxx
galib/ga/GA1DArrayGenome.C
galib/ga/GAAllele.C
galib/ga/GABaseGA.C
galib/ga/gabincvt.C
galib/ga/GAGenome.C
galib/ga/GAIncGA.C
galib/ga/GAParameter.C
galib/ga/GAPopulation.C
galib/ga/garandom.C
galib/ga/gaerror.C
galib/ga/GAScaling.C
galib/ga/GASelector.C
galib/ga/GAStatistics.C
${ZLIB_SOURCE}
zopfli/src/zopfli/blocksplitter.c
zopfli/src/zopfli/cache.c
zopfli/src/zopfli/deflate.c
zopfli/src/zopfli/gzip_container.c
zopfli/src/zopfli/hash.c
zopfli/src/zopfli/katajainen.c
zopfli/src/zopfli/lz77.c
zopfli/src/zopfli/squeeze.c
zopfli/src/zopfli/tree.c
zopfli/src/zopfli/util.c
zopfli/src/zopfli/zlib_container.c
zopfli/src/zopfli/zopfli_lib.c)

if(USE_SYSTEM_ZLIB)
target_link_libraries(pngwolf "${ZLIB_LIBRARIES}")
endif()


Ideally the last block could be part of the first, but either it does not yet know what "pngwolf" means, or ZLIB_SOURCE is not properly set at the time it is parsed.
>>
>>53689352
i don't use any cloud service, fag
>>
>>53689352

>WHAT DO YOU PEOPLE USE AS A CLOUD SERVICE?

pomf

But I mostly use local storage.
>>
>>53689376
One option is to define ${ZLIB_LIBRARIES} in the first if statement. If it doesn't execute, the variable will be empty and no linking will occur.
>>
Any good 4chan clients for emacs?
>>
File: bird.png (31KB, 581x556px) Image search: [Google] [Yandex] [Bing]
bird.png
31KB, 581x556px
How can I make my own robot?
Like I would like to make machines controlled by my computer. Even something as simply as controlling the voltage to a motor to speed it up or turn it off would be good building blocks, but how the fuck do I such a thing?

Is there some kind of adapter to allow such voltages to be sent or not from a computer?
>>
File: 123123123123.png (328KB, 514x571px) Image search: [Google] [Yandex] [Bing]
123123123123.png
328KB, 514x571px
Tfw dying inside trying to make this shunting yard algorithm with C++.
>>
>>53689516
What you want is a Raspberry Pi.
>>
Good youtube series for beginner java?
>>
>>53689626
>Youtube series
No. Just no.
>>
>>53689626
Just buy a book
>>
>>53689635
this

>>53689626
https://docs.oracle.com/javase/tutorial/
>>
File: Capture.png (32KB, 1242x219px) Image search: [Google] [Yandex] [Bing]
Capture.png
32KB, 1242x219px
can anyone shed some light on whats going on in this snippet?
>>
>>53689706
Memes. Lots and lots of memes.
>>
>>53689520
jeez i only did it very mildly and my tendon feels a bit fucked now
>>
>>53689723

I did it too hard and now my hand fell off.
>>
>>53689635
why?
>>
>>53689706
Builds two rooms, connects them with a door and returns it?
>>
>>53689706
A pointer to a function in a namespace is building rooms.
>>
>>53689706
https://en.wikipedia.org/wiki/Factory_method_pattern

>>53689733
it avoids having to make a gorillion different constructors with one for each type of maze
>>
>>53689746
I don't understand what you're saying.
>>
>>53689735
i meant in the declaration

>>53689736
so it's a pointer to the
MazeGame::CreateMaze
static function? i'm confused as to which one is the class -- Maze pr
MazeGame
>>
>>53689733
I have yet to find a good Youtube tutorial on anything
>>
>>53689755
>CreateMaze
creates a maze

>buildRoom
builds a room

>buildDoor
builds a door

>getMaze
gets the maze
>>
>>53689757
From what I can see mazebuilder is the class and mazegame::createmaze is a function that returns the assembled maze.
>>
>>53689788
the slide made a note that mazebuilder is an interface

is mazegame the namespace of createmaze, and would that mean that maze is teh class createmaze belongs to?
>>
Anybody else /program naked/ here? It just gets so hot.
>>
>>53688599
>>53689584
Arduino
>>
to anyone who cares:

I finally finished my dictionary!

I decided to give up on using cases and I figured it out with if statements

thanks for all the help though, couldnt have done it without you!
>>
>>53689807
Seems that way. Whatever those build functions are they are contained in mazebuilder though.
>>
>>53689834
cheers

C++ is definitely quite a bit harder to understand than Java and C. going to download the lynda tutorial on it now.
>>
>>53689810
t-shirt and undies is my work attire

the t-shirt might come off during the hottest parts of the summer
>>
>>53689810
>not writing driver code while wearing a skirt
>>
>>53689818
your code is disgusting
>>
>>53690172
it looks better now

look

package k;
import java.util.ArrayList;

import java.util.Scanner;


public class DictionaryTester1 {

public static int menu(){
Scanner sc = new Scanner(System.in);
System.out.println("To add a new word to the dictionary, enter '1'. To remove a word from the dictionary, enter '2', To change the definition of a word, enter '3'. To get the definition of a word, enter '4'. To display all the words of the dictionary and get a total count, enter '5'. To exit this menu, enter '6'.");
return sc.nextInt();

}


public static void main( String args[]){
Scanner sc = new Scanner(System.in);

ArrayList<WordDef1> dictionary = new ArrayList<WordDef1>();
WordDef1 w1 = new WordDef1("Amicable","Friendly");
dictionary.add(w1);
WordDef1 w2 = new WordDef1("Bemused","Puzzled");
dictionary.add(w2);
WordDef1 w3 = new WordDef1("Colloquial","Characteristic of informal language");
dictionary.add(w3);
WordDef1 w4 = new WordDef1("Deleterious","Harmful to living things");
dictionary.add(w4);
WordDef1 w5 = new WordDef1("Egregious","Reprehensible");
dictionary.add(w5);


int result = menu();
while (result != 6){
if (result == 1){
System.out.println("Enter the word you would like to add.");
String word = sc.next();
System.out.println("Enter the words definition.");
String definition = sc.next();
dictionary.add (new WordDef1(word,definition));
}
if (result == 2){
boolean a=false;
System.out.println("Enter the word you would like to remove");
String word = sc.next();
for(int i= dictionary.size()-1; i>=0; i--){
if(dictionary.get(i).getWord().equals(word)){
dictionary.remove(i);
a=true;
}
}

if(a== false){
System.out.println("There is no such word!");
}
}
>>
File: 1458262852119.gif (350KB, 500x282px) Image search: [Google] [Yandex] [Bing]
1458262852119.gif
350KB, 500x282px
>>53690192
>>
>>53690192
if (result == 3){
boolean a=false;
System.out.println("Which word's definition would you like to change?");
String word= sc.next();
for(int i= dictionary.size()-1; i>=0; i--){
if (dictionary.get(i).getWord().equals(word)){
System.out.println("What is the new definition?");
a=true;
String newDef = sc.next();
dictionary.get(i).setDefinition(newDef);
}
}
if (a==false){
System.out.println("There is no such word!");
}
}
if(result == 4){
boolean a=false;
System.out.println("Which word's definition would you like to see?");
String word = sc.next();

for(int i = dictionary.size()-1; i>=0; i--){
if(dictionary.get(i).getWord().equals(word)){
System.out.println(word + "- " + dictionary.get(i).getDefinition());
a=true;

}
}

if(a==false){
System.out.println("There is no such word!");
}
}

if(result == 5){
System.out.println("There are" + dictionary.size() + " words in this dictionary at the moment.");
for(int i=dictionary.size()-1; i>=0; i--){
System.out.println(dictionary.get(i).getWord() + "- " + dictionary.get(i).getDefinition());
}
}
result = menu();

}
}

}
>>
>>53687586
Stop this programming fag meme.
>>
>>53690192
>>53690208
it's '''better''''
but its not good.
your indentation is ass, which is weird, because every fucking program does it automaticlaly now

the only reason i can think of is ur fucking using notepad or microsoft word
>>
File: ZoCd1km.gif (650KB, 647x363px) Image search: [Google] [Yandex] [Bing]
ZoCd1km.gif
650KB, 647x363px
>>53690206
its not that bad!
>>
>>53690238
I do ctrl A ctrl I in eclipse and it looks fine

maybe just when I paste it here it looks weird

is there any other way i can make it look better? or simpler even
>>
File: tay-racist-tweet-2.jpg (21KB, 624x277px) Image search: [Google] [Yandex] [Bing]
tay-racist-tweet-2.jpg
21KB, 624x277px
kek did you guys see tay, microsoft's ML chat bot
>>
>>53690271
>He didn't participate in the "/pol/ educates Tay" threads
>>
>>53690260
just pastebin it please
>>
>>53690291
sorry, here
http://pastebin.com/j96Y44nE
>>
>>53689763
https://www.youtube.com/watch?v=2Op3QLzMgSY&list=PL8FE88AA54363BC46

You can go fuck yourself now.
>>
File: tay-hitler_o4kq62.jpg (29KB, 365x609px) Image search: [Google] [Yandex] [Bing]
tay-hitler_o4kq62.jpg
29KB, 365x609px
>>53690288
i missed it, sadly
>>
Why is everyone on /g/ on edge all the time?
>>
>>53690348
The Jews anon, they're always out to get you
>>
>>53690348
I used to smoke a lot of weed when I was younger and it drastically altered my brain chemistry.
>>
>>53690348
Kernel and firmware programming makes you go crazy after awhile.
>>
>>53690348
coffee abstinence
>>
>>53690298
http://pastebin.com/jnE9H81x
slightly better
your shit was so inconsistent it made me sick
also switch WOULD be better
but you couldnt figure it out and im not gonna actually rwite your code for u
>>
>>53690374
>implying any of /g/ does any actual programming, let alone kernel programming
>>
>>53690396
Of course we do, check out the kernel I'm working on right now
https://www.kernel.org
>>
>>53690396
What is actual programming?
>>
>>53690391
>http://pastebin.com/jnE9H81x
Jesus, that code is horrible. Go back to programming 101.
>>
>>53690391
thanks.

what was inconsistent about it?
>>
>>53690415
fizzbuzz, averaging 2 ints, a safe way to getchar()
>>
>>53690415
Like the other dude said, things like kernel and firmware programming are the only real programming.

Web/gaming things are for little kids.
>>
>>53690436
>It's not real programming because I say so
Okay.
>>
>>53690429
sometimes you die x=y and sometimes x = y and sometimes x==y and sometimes x == y sometimes if ( and other times if(
also if a line is too long (like your menu) cut it up IN SOME WAY so it is legible

your actual code is garbage too but like IT JUST WERKS
>no fucking comments
good job
>>
>>53690452
>>53690452
oh I see what you mean ok thanks

HEY btw, I went back and redid by Case program and everything works EXCEPT that it keeps going, if you know what I mean

like ill input 2, and it will remove the word, but then go right to 3 (changing a definition)

how can I fix this?
heres the code btw
http://pastebin.com/pcndTYcZ
>>
writing a tic-tac-toe bot in Haskell
>>
Taking an introductory course in php at uni. I have to write a program that you pick food and a quantity from a drop down and total the costs. The Food and cost of each item is in an array but is it just me or does php become a convoluted mess after a short while?
>>
>>53690452
>>53690555
nvm I figured it out

I just have to break; at the end, after all the curly braces
>>
>>53690587
>php
why?
>>
>>53690605
yes! you have to break out if youre done lol
your shit looks all fucked up again now and im not going to fix it for you
try to make it look nicer yourself
i really think youre just trolling me
beECAUSE YOU DID THE EXACT SAME THING
>>
File: php masterrace.png (2MB, 1598x1585px) Image search: [Google] [Yandex] [Bing]
php masterrace.png
2MB, 1598x1585px
>>53690611
>>
>>53690637
>i really think youre just trolling me
lol sorry, what happened was you posted me a better version of my other code, using the if statements, and this case code is code I had before in a different class

Im going through and fixing it now, lol

thanks for all the help, appreciate it!
>>
>>53690571
let us know if you succeed
>>
File: You kids wanna try D.jpg (44KB, 512x512px) Image search: [Google] [Yandex] [Bing]
You kids wanna try D.jpg
44KB, 512x512px
>>
>>53690652
ok good
and comment your code!!
some parts were ???-tier
>>
>>
>>53690820
will do
>>
>>53690611
Required for the IT minor I'm going for. Not exactly a fun course I chose willingly.
>>
File: 1458971503276.jpg (66KB, 540x476px) Image search: [Google] [Yandex] [Bing]
1458971503276.jpg
66KB, 540x476px
>>53690856
This looks like fun. Let's do this.
>>
File: dt951113dhc0.gif (68KB, 1200x364px) Image search: [Google] [Yandex] [Bing]
dt951113dhc0.gif
68KB, 1200x364px
>>
File: dt_c110511.gif (177KB, 1200x374px) Image search: [Google] [Yandex] [Bing]
dt_c110511.gif
177KB, 1200x374px
>>
File: rMd3sf8.jpg (944KB, 4032x3024px) Image search: [Google] [Yandex] [Bing]
rMd3sf8.jpg
944KB, 4032x3024px
http://stackoverflow.com/questions/35632959/remove-exception-unwind-functions-from-android-ndk-shared-objects/36210959#36210959

someone gave an answer

he wrote it on a napkin, lolwut?!

so is there a way to get around it with android NDK?
>>
File: when the D hits you.jpg (23KB, 512x512px) Image search: [Google] [Yandex] [Bing]
when the D hits you.jpg
23KB, 512x512px
>>53690791
YES
>>
>>53690905
based on a true story
>>
File: 1458971698487.jpg (88KB, 540x476px) Image search: [Google] [Yandex] [Bing]
1458971698487.jpg
88KB, 540x476px
>>53690890
>>
>>53690955
dubs of truth
>>
File: 1458971503276.jpg (74KB, 540x476px) Image search: [Google] [Yandex] [Bing]
1458971503276.jpg
74KB, 540x476px
>>53690890
>>
File: dt951114dhc0.gif (74KB, 1200x364px) Image search: [Google] [Yandex] [Bing]
dt951114dhc0.gif
74KB, 1200x364px
>>53690905
>>53690941
>>
>>53691003
the origin of firefox
>>
File: temp.jpg (155KB, 810x714px) Image search: [Google] [Yandex] [Bing]
temp.jpg
155KB, 810x714px
>>53690890
>>
File: dt951117dhc0.gif (77KB, 1200x364px) Image search: [Google] [Yandex] [Bing]
dt951117dhc0.gif
77KB, 1200x364px
management, Dilbert gets it...
Adams is a fcking genius, cuz true stuff is the funniest stuff. y'all should read his autobiography.
>>
>>53691003
kek
>>
http://blog.dilbert.com/post/141490448161/the-belgium-analogy

wait what the shit
>>
>>53691086
The man's very right-wing
>>
>>53691086
Has he not heard of reducto ad Hitlerum? Literally everyone and everything has been compared to Hitler at this point and all it does is make Jews cry.
>>
>>53691119
B A S E D

>>53691127
>reducto ad Hitlerum
fucking lmao
What was wrong with 'godwin's law'?
>>
>>53691119
>Taking a stance against liberals comparing anybody and everybody to a man that killed millions of people and tried to subjugate a continent is right wing
The exact same logic he is describing can be applied to right wingers comparing Sanders to Stalin. Since the dawn of man politicians and their supporters have compared their opposition to the absolute most extreme path their ideology can lead, obviously ignoring that Hitler was a socialist.
>>
>>53691146
Godwin's Law only applies to online forums over the course of a period of time. ad Hitlerum is just, comparing people to Hitler and Nazis frivolously.
>>
let's be real, trump would be a better president than hillary
>>
>>53691271
Too bad she is going to win because America is a progressivist dictatorship now.
>>
>sqlite3 spells "foreign key" as "foriegn key"
What the fucking fuck is this stupid shit? are the devs 12 years old?
>>
>>53691442
typical web/crudfags
>>
>>53687586
Got any good free resources on C++ programming?
>>
>>53691904
http://en.cppreference.com/w/
>>
Pls rate my shitty python script

Just change "num" to something and run the script again

val0 = [1, 0, 1, 1, 0, 1, 1, 1, 1, 1]
val1 = [1, 0, 0, 0, 1, 1, 1, 0, 1, 1]
val2 = [1, 1, 1, 1, 1, 0, 0, 1, 1, 1]
val3 = [0, 0, 1, 1, 1, 1, 1, 0, 1, 1]
val4 = [1, 0, 1, 0, 0, 0, 1, 0, 1, 0]
val5 = [1, 1, 0, 1, 1, 1, 1, 1, 1, 1]
val6 = [1, 0, 1, 1, 0, 1, 1, 0, 1, 1]

num = "1234567890"

result = ""

for i in num:
a = int(i)
if val0[a] == 1:
result += " -- "
else:
result += " "
result += " "

print result
result = ""

for i in num:
a = int(i)
if val1[a] == 1:
result += "| "
else:
result += " "
if val2[a] == 1:
result += "|"
else:
result += " "
result += " "

print result
result = ""

for i in num:
a = int(i)
if val3[a] == 1:
result += " -- "
else:
result += " "
result += " "

print result
result = ""

for i in num:
a = int(i)
if val4[a] == 1:
result += "| "
else:
result += " "
if val5[a] == 1:
result += "|"
else:
result += " "
result += " "

print result
result = ""

for i in num:
a = int(i)
if val6[a] == 1:
result += " -- "
else:
result += " "
result += " "

print result

>>
>>53691956
python/10
which means its SHIT
>>
>>53692058
this
>>
File: high res tired pepe.png (137KB, 904x864px) Image search: [Google] [Yandex] [Bing]
high res tired pepe.png
137KB, 904x864px
How do you guys do marathon coding sessions?

Seems like I can only work in sputters of 20-30 minutes and then it's back to browsing 4chan for an hour or playing vidya like an uninspired pleb.
>>
File: eppu.png (146KB, 480x506px) Image search: [Google] [Yandex] [Bing]
eppu.png
146KB, 480x506px
>>53692313
I masturbate and then go back to coding.
>>
>>53692313

For personal projects, I tend to be motivated by the joy of programming. So I can work on something for hours just because I like it.

For school projects, I tend to be motivated by a survival instinct. If I do not get this assignment done, I will fail the class. If I fail the class, I may have to repeat it, or I may get put on academic probation, or I may even get kicked out. If I get kicked out, my career prospects will be dropped because I really only have a bachelor's degree, and no one wants to hire someone who dropped out of grad school. I may end up not getting a job, my student loans will come, I will have no money to pay for them, and I will starve. Granted, I would probably find a way to adapt in this situation, but I would rather not have to think about that.

A couple of months ago, I was working on a class assignment, and spent all day working, forgetting to eat dinner. I went to sleep at around 3 in the morning, and woke up 3 hours later, vomiting all over the floor, despite not having eaten since breakfast. As it turns out, despite the effectiveness of this mentality, it may not be the healthiest. One should never skip a meal for work.
>>
>>53690251
Yes it is that bad.
>>
>>53692313
once i get going i usually just get in the flow for a few hours

but it can take quite some time for me to get started and i procrastinate a lot, like "just one more youtube video" or get distracted with ""playtesting"" the game i'm working on
>>
>>53687586
>having teamwork assignment
>6 ppl total
>no one answers his emails and probably working on the project alone
>be paranoid 2 or 3 ppl already did it and will take credit for it and accuse everyone else of not participating
>I have already done the whole project (since its easy, just a tetrsi game in Java with simple gui)
>>
>>53692339
best practice ever, even when I started work I code for a while then go to the wc and jack off and go back to coding
>>
Would it not be better for the lingua franca of programming to be some language with a larger alphabet than English, to provide a larger pool of value names to choose from?
>>
>>53693105
>6 ppl to do a tetris game
how do they expect you to make it this way
this is stupid
>>
>>53693169
nothing is stopping you from using UTF-8 characters in most modern languages.
>>
>>53693201
My manager stops me >_>

He'd make me go back to using Java if he could.
>>
>>53693169
ばか = "お前"
>>
>>53693265
Exactly! Shorter, so it's easier to read, and less likely to go past the edge of the screen. Much quicker to type, too.
>>
>>53688091
QtCreator

>>53689161
github for code, pomf for screenshots, and megasync for warez.
>>
>>53693291
using non-latin languages is one thing, but that still doesn't add a "larger pool of value names" because you're still typing everything as a word.

in the case of complex mathematical formulas, nothing is stopping you from expressing them using their proper mathematical symbols, the only problem is that you'd have to pull out your symbol picker every time you want to make a change.,
>>
Trying to learn Qt as a GUI framework.

Holy shit their memory management is horrible. It's very hard to allocate objects inside other objects (or stack allocate in general). Implicit delete calls everywhere, unable to override the memory management to not use new/delete, etc.

Plus I found a memory leak in the library very quickly. Calling QMainWindow::menuBar() without setting a custom menubar constructs a brand new default constructed QMenuBar. This default constructed menubar is never destroyed, even when it's parent QMainWindow is.
>>
>>53693425
wrap it
>>
>>53693291
>shorter
>easier to read

Y dn't ndrstnd hw rdng wrks.
>>
>>53693467
Except words in Japanese or Chinese use fewer characters per word. Deleting vowels in English is not comparable at all.
>>
>>53693492
they also have a lot more characters
>>
>>53693510
That's exactly the point.

It might seem like that makes it harder to read from a native english speakers perspective but it really doesn't
>>
>>53693492
People read by recognizing patterns, not by parsing individual letters.
>>
>>53693558
Your not just doing random sequences of characters in either language. You are just using 2 or 3 (out of a larger set) rather than 6 or 7 (out of a smaller set) to form your patterns.
Your patterns are just denser if you use a larger character set.
>>
class Item {
constructor(options={}) {
this.seller = ko.observable(options.seller).extend({ notify: 'always' });

this.seller.subscribe(x => alert('foo ' + x));
}
}

class Model {
constructor() {
this.items = ko.observableArray([]);

this.add = function() {
var item = new Item();

item.seller.subscribe(x => alert('bar ' + x);

this.items.push(item);
}
}
}

ko.applyBindings(new Model());


Struggling with a knockout.js problem. Can anyone tell me why this alerts foo but not bar? It doesn't make sense to me that it's ignoring the subscription, even if I remove the one that alerts foo.
>>
>>53693608
Forcing native English speakers to program in Chinese will make them less productive.
>>
>>53693665
I'm not saying that, I'm saying there is benifits to leting Chinese programers program in Chinese.
>>
>>53693674
if your codebase isn't in english, I want absolutely nothing to do with your sloppy chink code
>>
>>53693652
Knockout works with ECMA6 classes?
>>
I don't have a fucking clue what I'm doing.

MainWindow::MainWindow() {
// Default menuBar() leaks memory
auto menuBar = new QMenuBar;
auto fileMenu = menuBar->addMenu("&File");
auto quitButton = fileMenu->addAction("&Quit");
QObject::connect(quitButton, SIGNAL(triggered(bool)),
this, SLOT(close()));

setMenuBar(menuBar);

auto textEdit = new QTextEdit("Foo");
textEdit->setReadOnly(true);
setCentralWidget(textEdit);

statusBar()->showMessage("Success");
}


Why the fuck do I need Q_OBJECT in my class header. Why is connect a static function on QObject, why can't I go this->connect(quitButton, SIGNAL(triggered(bool)), SLOT(close())); why do I need SIGNAL/SLOT macros anyway. What the fuck is going on?
>>
>>53693721
ES6 classes are just syntactic sugar over top of the normal way to do objects in JavaScript. For example his Item class is equivalent to
function Item(options={}) {
this.seller = ko.observable(options.seller).extend({ notify: 'always' });

this.seller.subscribe(x => alert('foo ' + x));
}
>>
>>53693652
>item.seller.subscribe(x => alert('bar ' + x);

You're missing a ) there.
>>
>>53693687
>sloppy chink code
lmao
>>
>>53693756
>Why the fuck do I need Q_OBJECT in my class header.
So that the moc compiler can take it as a Qt object when generating the C++ code for your program.

>why can't I go this->connect(quitButton, SIGNAL(triggered(bool)), SLOT(close()));
Because you're not connecting to the MainWindow directly, merely to the button that's part of the window.
>>
>>53693756
>Why the fuck do I need Q_OBJECT in my class header
Because Qt uses: http://doc.qt.io/qt-5/moc.html. As of Qt 5 you can use C++11 lambdas as a slot instead.
>>
>>53693756
It's not that bad once you get used to it.. It's just different, but at the end of the day Qt is still pretty good
>>
I feel dumb for not being able to think up neat algorithms by myself. Should I give up on programming?
>>
>>53693927
Depends, what algorithms?
>>
>>53693867
That's just from copy-pasting to make it concise enough to post. The original source has the correct number of parentheses.
>>
>>53693927
What kinda algorithms?
>>
>>53693948
>>53693939
I'm working with the Newton-Raphson Iteration Technique right now. I understand it but I could never have thought it up by myself.
>>
>>53693896
>>53693911
If I take Q_OBJECT out it still works. I think I'll leave it out until something doesn't work without it.

Turns out there is a target->connect(sender, senderSignal, targetSlot); that is exactly what I want. I'm either blind or retarded or both. Can't do it the other way (sender->connect(senderSignalSignal, target, targetSlot) but that wouldn't make as much sense anyway. The sender shouldn't be caring about the targets.

As always, the GUI designer is a clusterfuck, what's new. I think I'll stick to defining everything in code.
>>
Reading up on combinatorics
>>
>>53693975
>If I take Q_OBJECT out it still works. I think I'll leave it out until something doesn't work without it.
It'll turn to shit once you run QMake again. Read this: https://woboq.com/blog/new-signals-slots-syntax-in-qt5.html. The new syntax allows for compile time validation for the connect method.
>>
File: out.png (95KB, 1920x1080px) Image search: [Google] [Yandex] [Bing]
out.png
95KB, 1920x1080px
I'm working on an audio transcoding library, basically a wrapper interface around various audio encoding/decoding libraries. I've got FLAC decoding working and now I'm working on Opus encoding.

Basically, I take the decoded FLAC frame, convert all the samples to floats, pass them through libsoxr to resample, encode them into Opus packets using libopus, and then write the packets using liboggz.

I've finally got it to the point of creating a valid file that's audible, but the audio produced is strobed and slowed down. Pic related shows what the waveform looks like. The code is too unwieldy to be worth posting, but could anyone help me guess what's going on?
>>
>>53693969
At the level where you learnt about Newton-Raphson you're not really supposed to be able to formulate your own not completely shit algorithms unless given a stupid amount of time
>>
>>53694090
I guess that's somewhat consoling. I just hope algorithms are a skill that isn't completely off limits to people (like myself) who don't have the greatest mathematical intuition.
>>
>>53694140
It's not, just keep making sure you are understanding the algorithms you learn for now. That said actually coming up with new and more effective algorithms than what's currently available will never be easy, that's what people do in research after all.
>>
>>53694001
Nah, it still works fine because my class does not declare any additional slots/signals.

Confused that this works:
    this->connect(quitButton, &QAction::triggered, [this]{close();});

But this doesn't:
    this->connect(quitButton, &QAction::triggered, &QMainWindow::close);

unless I use the QObject::connect version with parameters.
>>
>>53694175
latter takes a this parameter in the call, former has the this parameter bound in a closure
>>
>>53694175
>
[this]{close();}

takes no argument
>
&QMainWindow::close

takes a QMainWindow* as an argument.
How is that confusing?
Look at the error message.
>>
>>53694207
Yes but it can get the this pointer from, well, the this pointer in the connect() function.

I guess that would need some dynamic casting though. Guessing that's why it's not supported (innocuous looking code an few orders of magnitude slower than the alternatives).
>>
>>53694228
the former lambda takes no arguments
[this]{close();}();
the latter takes one argument, this
(&QMainWindow::close)(this);

try this (from functional)

this->connect(..., std::bind(&QMainWindow::close, this))
>>
>>53694223
At first I thought that the argument it needs is given to the function in the this pointer.

QObject::connect(quitButton, &QAction::triggered, this, &QMainWindow::close);

Has all the same parameters in a different order and works just fine. But then I realised that the value of "this" can change when multiple inheritance gets involved. So yeah, makes sense why it (doesn't) work now.
>>
>>53694246
that sounds like it's just an overload for member functions

it would still have to explicitly call
QMainWindow::close(this, ...)
or this.*QMainWindow::close
>>
>>53694287
Yeah it probably does a std::bind internally. I was just confused as to why it couldn't do that for this->connect but could for Static::connect(this). But yeah, "(void*)(base*)this != (void*)this" bites my logic in the ass again.
>>
>>53694315
no, it probably just has an overload that calls it directly but my point is that you can't just replace a lambda that takes no arguments with a function that takes one argument

a [this] lambda has the this parameter in a closure, it doesn't get called with the this parameter
>>
>>53694315
Right, QMainWindow doesn't want to bother with the types of its child classes. Even if the cast
(Derived*)this
were the identity because there's no multiple inheritance, you still have to know Derived.
Note that a member function pointer doesn't store a this pointer, it can also be created in a place where there's no this:
struct Class {
int mem_fn() {};
};

int main() {
cout << &Class::mem_fn << "\n";
return 0;
}

It's just a pointer.
>>
>>53694385
Member function pointer are not "just a pointer". In the case of virtual functions they are a vtable offset, if you jumped to that and started executing you'd hit the null page and segfault.
>>
>>53694440
i'll point you in a minute
>>
>>53689516
http://www.maerivoet.org/website/software/arduino/manuals/electronics/robot-builders-bonanza.pdf
>>
is there a clean way in C# to check which condition broke first in a multiconditional statement, i.e
if(a != 1 || b != 1)
>>
>>53694739
are you doing the same logical combination like && or ||?
>>
>>53694739
Sounds like you need

if (a != 1)
{
// your shit code here
}
else if (b != 1)
{
// more of your shit code here
}
>>
>>53694739

if (a != 1 || b != 1){
if (a != 1){
console.write("a doesn't equal 1);
} else {
console.write("b doesn't equal 1");
}
}
>>
>>53694911

"
>>
File: images.png (3KB, 310x163px) Image search: [Google] [Yandex] [Bing]
images.png
3KB, 310x163px
Can /prog/ recommend a good book on SQL which includes relational database theory? I can do basic CRUD operations and joins but I just started working with databases and want to go balls deep.
>>
>>53691956
lines = '''\
-- -- -- -- -- -- -- --
| | | | | | | | | | | | | |
-- -- -- -- -- -- --
| | | | | | | | | | | | |
-- -- -- -- -- -- --
'''.split('\n')
numbers = [[a[i:i + 6] for a in lines] for i in range(0, len(lines[0]), 6)]

def print_numbers(text):
print '\n'.join(''.join(numbers[int(c)][i] for c in text) for i in range(len(numbers[0])))

print_numbers('123456789')
>>
>>53694908
>>53694911
ignore these faggots

>>53694907

what i mean is like if you've got

if (a != 1 && b && c && d > 3)
you can do this (dunno c# syntax)
list<bool> condition { a != 1, b, c, d > 3 };
if (condition.fold(&&))
; // no failure
else
condition.find(false); // failed condition
>>
>>53694931
Im using an or operator atm in a while statement, i just want to check which one triggered the break without making it messy, thanks, ill try to implement what you wrote.
>>
>>53694987
that works too, simply change the && to || in the fold
in C# I don't know what the fold function is, it might be called accumulate or something else

you also probably can't literally do (&&/||)
you might have to do a functor/delegate that returns || of 2 bools
>>
This might sound retarded, but is it possible to compress a stream with gzip?
>>
>>53695014
oh, if you're doing || then there isn't "one" that triggered the break - they all have to be false
>>
>>53695135
you could but you would need to have already received the stream data in its full size before you could apply a compression algorithm to it.
>>
>>53694987
you could do something like this
while (true) {
if (a != 1) {
Console.WriteLine("First condition broke");
break;
} else if (b != 1) {
Console.WriteLine("Second condition broke");
break;
}

// loop code
}
>>
>>53695135
>>53695147
Yes, gz was designed so it's possible. try
gzip -f < /dev/urandom
>>
>>53695165
I'm trying to avoid the extra lines to keep it looking clean, i know that concept will work but i don't want to write two lots of the same code in both conditions.

I want to know which one broke it so i can apply that information for future use.
>>
>>53695190
Ok, so just confirming, what you want is this:

if (a || b || c || d) {
// remember which one was true
break;
}


if that's the case you want something like this
bool[] statuses = { a, b, c, d };
ShouldBrake = statuses.Aggregate(false, (a,b) => a || b);
// Aggregate is LINQ
if (ShouldBrake) {
// statuses.Find(x => x == true); // first
// statuses.Select(x => x == true); // all
}
>>
>>53695231
Select might not be right, hang on
whatever filter is in linq
>>
>>53695266
you want Where or FindAll (all statuses that were true) or Find (one status that was true)
>>
>>53695231
Yeah pretty much, im cruising through the aggregate documentation atm. I think it'll do the trick.
>>
File: Capture.png (75KB, 921x627px) Image search: [Google] [Yandex] [Bing]
Capture.png
75KB, 921x627px
I'm writing my own "standard library" for C++ so I can generate smaller binaries that don't link against stdlibc++ :3
>>
>>53695287
C++ compilers have shitty inlining for higher order functions
>>
>>53695183
Seems like it buffers the first 32Kib of data or something lik that. Not surprising for a compression algorithm tho.
sudo pacman -S pv
pv -qL 4096 </dev/urandom | gzip | pv >/dev/null

The total byte count is at 0 for the first 8 seconds, then it jumps to 32Ki.
>>
>>53695190
Okay, how about this
while (true) {
conditions = new bool[] { a != 1, b != 1 };
if (conditions.Any(i => i)) {
Console.WriteLine("Condition {0} broke", conditions.TakeWhile(i => !i).Count());
break;
}
}
>>
>>53688228
>>53688213
>>53688161
>>53688102
>building a large complicated system using a text editor
And people wonder why most Linux software is a buggy glitchy mess. This is why Windows dominates the market.

I'm not even trolling. Do you not realize why devs don't want to drop all this software that helps them code just because it's "the Linux way"?
>>
>>53695381
oh yeah, but won't that count the number of faults?

for reference:
Any is Aggregate(false, ||)
All is Aggregate(true, &&)

false is the identity for || - (b || false) == b
true is the identity for && - (b && true) == b
>>
>>53695467
it'll count the number of faults before the first condition that returned true, so you get the index of that condition

if you want all the conditions that failed you'd have to take a slightly different approach
>>
>>53695402
emacs is a lisp vm.
>>
>>53695544
I misunderstood what .takewhile(...).count(...) did
You could report all broken conditions without much of a change

Are you planning on adding other conditions that aren't <var> != 1?
>>
File: emacslogo.png (32KB, 302x260px) Image search: [Google] [Yandex] [Bing]
emacslogo.png
32KB, 302x260px
>>53695402
>>building a large complicated system using a text editor
Why does it have to be complicated?
>using anything besides an enhanced text editor and some build tools
Hell, there are people who fare well using only Acme. How about the market is just dumb?

>I'm not even trolling. Do you not realize why devs don't want to drop all this software that helps them code just because it's "the Linux way"?
If anything, the Windows way is the one which reinvents the wheel unnecessarily, thereby breaking compatibility with any general feature citizens would like to have. By that I mean anything besides language-specific stuff, like themes, personalized keybindings, adroit interface shortcuts, etc. Look at the number of different vimkbd plugins users have to make to adapt different IDEs to their prefered keybinding style (which I, as a follower of the Church of Emacs, respect). Emacs, just like Lisp languages, is a common ground, provided by the Saints as a means for us to build our own systems more easily. Lisp is Freedom, anything else is slavery.

>>53695564
Exactly.

Emacs's old glory days are still not forgotten, in the lost paradise of the MIT AI lab. FU Symbolics Inc. Infidels repent!
>>
>not knowing /g/ is a crosddreser / gay ERP and dating board under the guise of a technology one
newfags pls go
>>
>>53695707
>>>/lgbt/
>>
>>53695752
back to hackerforumz pls
>>
>>53695752
>implying there's anything with being bent or gender fluid
>>
>>53695877
>yfw avatar: legend of xir learns gender bending
>>
>>53695877
>>53695801
Someone needs to stomp some sense into you mentally ill brainwashed cumqueens.
>>
>>53693756
You are leaking memory because you are not assigning a parent, like this:

auto menuBar = new QMenuBar(this);
auto textEdit = new QTextEdit("Foo", this);


Also, don't be an autist, that's how signals and slots works.
>>
test
>>
>>53696036
not your sandbox
>>
I have a pointer to an std::vector of pointers.
How do I delete() the classes inside the vector and then delete the vector?
It seems like
for( X x : Y ) { delete( x );} delete(Y);
should work but I'm swimming in memory leaks.
>>
>>53696065
for (auto x : *y) delete x; delete y;
>>
>>53696065
>for( X x : Y ) { delete( x );} delete(Y);
No one's gonna kill you if you post actual code that can be run, instead of Xs and Ys which we can only assume are pointers. Also, you mean memory leaks and not compile-time or run-time failures? Are you using Valgrind?
>>
>>53696086
you can also do auto& and then there's potential optimisation
>>
>>53696092
Yeah, valgrind reporting memory leaks.
for( Game:Match * match: * matches ) {
\tdelete( match );
}
delete( matches );
>>
>>53696176
"Game:Match"?
Game::Match?
>>
>>53696204
Yes. Sorry I'm in a VNC right now and it's really hard to type.
>>
>>53696176
That's kind of odd, given that what you do seems enough. Does that portion of code get run everytime it is necessary? Also why do you dynamically allocate the vector? Post Valgrind output.

I tried that to check quicly:
#include <vector>
using std::vector;

int main() {
auto y = new vector<int*>{};
y->push_back(new int{});
y->push_back(new int{});
y->push_back(new int{});
y->push_back(new int{});
for (auto x: *y) delete x;
delete y;
}

I got
==3695== HEAP SUMMARY:
==3695== in use at exit: 72,704 bytes in 1 blocks
==3695== total heap usage: 9 allocs, 8 frees, 72,800 bytes allocated
==3695==
==3695== LEAK SUMMARY:
==3695== definitely lost: 0 bytes in 0 blocks
==3695== indirectly lost: 0 bytes in 0 blocks
==3695== possibly lost: 0 bytes in 0 blocks
==3695== still reachable: 72,704 bytes in 1 blocks
==3695== suppressed: 0 bytes in 0 blocks
==3695== Rerun with --leak-check=full to see details of leaked memory
==3695==
==3695== For counts of detected and suppressed errors, rerun with: -v
==3695== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

I assume the 72,704 bytes are the stack, so it's normal. Also even HelloWorld has it.
>>
>>53696176
>>53696221
the error is somewhere else
delete is being called on every element
and then on the vector
>>
>>53696221
At least copy paste some portion of your actual code, there's no way we are coming to any meaningful conclusion given fictitious code mate.
>>
>>53696240
Let me add: that's fine and even necessary iff the vector was dynamically allocated (
new vector<Game::match>()
), otherwise it will cause a segmentation fault. Which is it, junior?
>>
>>53696249
http://pastebin.com/bFqfy6yy
http://pastebin.com/c5Kpn8dW
http://pastebin.com/vmyHqZDu
http://pastebin.com/cTN5wzuy
>>
>>53696330
How did you terminate the program?

Also, I think you are freeing the querys quite consciously, so I can't spot the first leak... Wait no! this calloc is called in Mod::Mod which I don't find, so there's that.

If I may, you should probably not use calloc'd buffers in C++, given that they are quite unsafe, you've guessed it. There are multiple instances of probable buffer overflow in your code. I'd rather you use an std::string, use
str.c_str()
to get a null-terminated C-style array, and sleep well knowing that the string frees itself automatically. (also the char array is bound to the string, see http://en.cppreference.com/w/cpp/string/basic_string/c_str).

For the other leaks, yes, you're not deleting the mods vector in http://pastebin.com/cTN5wzuy at line 44, what do you expect?

As for the safer alternative: maybe you return a dynamically allocated vector for performance? Don't. Since you're using C++11 (I think), the vector class is perfectly equipped to "move" itself in such situations. Try googling "C++ move semantics", I'm too lazy to do it myself. You can do
std::vector<Game::Match*> getMatchesByStatus(...)
Like you don't care. As for the Matches or Mods being dynamically allocated:
1. There's no apparent reason, you could just put them directly in the vector;
2. If you plan on having other classes which inherit from those, use a
unique_ptr
, which can't be copied and deletes itself automatically.
>>
>>53696588
Addendum:
Ok, so we have Mods which are leaked by the vector<Mods*> leak, so their destructor is never called, so the calloc'd stuff they hold leaks. Turtles all the way down.

Also just in case:
str.c_str()
is const char, I know, but I was thinking about modifying the string itself with
operator+
or
istringstream
or what have you, so that it safely builds the query, which we can then pass to sql_stuff.

Also: this doesn't protect you from sql injections thru modid.
>>
>>53696588
>>53696666

>hitler dubs right into 69 6 satan trips

do not listen to this man
>>
Still being a total noob with Qt.

I have a "MenuBar" class that inherits QMenuBar, and constructs a bunch of menus/submenus/actions/etc. Should the consumer of my MenuBar class have navigate through the tree of menus if it wants to connect() to a signal? Or should I just re-export all the actions as signals on the MenuBar class itself?
>>
>>53696789
Long posts get favored by 4chan's counting algo, you laconic untermensch SIEG HEIL
>>
I'm trying to create a Board class(with 2d array) and i'd like to create a class named Tile, the constructor of Tile would have x and y as parameter in Java mind you.

When in the Board class, how do I pass a single x and y(element I suppose) to the constructor of Tile?
>>
>>53696944
Just pass them as ints and arguments to the Tile constructor? How is that not satisfactory?
>>
>>53696944
Yep, the fact that you're in the Board class doesn't stop you from accessing Tile's constructor or public methods
>>
>>53696975
I suppose i'm misunderstanding then, I did that and when printing in the constructor of the target class(Tile) I get the entire array.

Am I misunderstanding and is this supposed to happen and if I would want the x,y of a single element I'd need to use a selector?
>>
>>53697005
What the fuck? I don't understand a word in this post. You mean a print statement in the constructor of Tile? Your problem is that multiple Tile objects are constructed?
>>
test
>>
>>53697042
>>Your problem is that multiple Tile objects are constructed?

Yes, so say I made the 2d array in Board and would print it, you'd see a 10 by 10 array.

Then I pass it to the Tile class in which i'd 'expect' only a single element when printing but instead I get the same >entire< array.

So what i'm not understanding is, am I passing an element incorrectly to the Tile class or am I supposed to make a selector in Tile that'd select only a single element?

Because what I want is Board with a 10 by 10 array and Tile with only 1 of the elements at a time.
>>
File: modedemploidpt.png (81KB, 855x746px) Image search: [Google] [Yandex] [Bing]
modedemploidpt.png
81KB, 855x746px
>>53697083
If you're so enthusiastic about finding the possibilities of the medium, create the new thread.

Faggot
>>
>>53697100
It's still not clear to me how you are passing things. Poast code. But yes if you iterate the SAME array from within Board and within Tile, it won't automagically select itself.
>>
File: happystallman.jpg (58KB, 645x430px) Image search: [Google] [Yandex] [Bing]
happystallman.jpg
58KB, 645x430px
>>53697109
This pic of the Greatest Programmer Of All Times will do.
>>
>>53697142
I'm sorry if it looks bad, first time i'm posting code.

class Board(){
private Tile[][] field;

public Board(){

int[][] field = new int[10][10];

for (int x = 0; x < field.length; x++) {

for (int y = 0; y < field[0].length; y++) {
new Tile(x,y);
}

System.out.println("");
}
}
}


Tile Class
public class Tile {    
private int x;
private int y;


public Tile(int x, int y){
this.x = x;
this.y = y;
System.out.printf("%8d" + x,y);
}
}
>>
>>53697239
I'm aware i'm literally passing the entire array but I don't know how i'd pass a single element(it's x and y) as a tile is an element in a 2d array/board.
>>
>>53697239
Why do you have "Tile[][] field" and "int[][] field"? Also you're not storing the created tiles in the array:

[...]
for (int y = 0; y < field[0].length; y++) {
field[x][y] = new Tile(x,y);
}
>>
File: 1453651138545.jpg (57KB, 601x577px) Image search: [Google] [Yandex] [Bing]
1453651138545.jpg
57KB, 601x577px
>>53697109
>anime is not programming related
>>
>>53697293
it literally isn't tho
>>
>>53697239
>
            for (int y = 0; y < field[0].length; y++) {
new Tile(x,y);
}

your average java programmer
>>
>>53696588
>>53696666
Thanks for the help hitlersatan. I forgot my Match constructor copied out the Mods so I thought that deleting Match further down was also deleting mods.
The nation memory leaks were caused by forgetting to reimplement the Nation deconstructor after I was wrangling some code.

I'm going to switch to smart_ptrs for a lot of things. Refactoring code is scary.
>>
File: 39431.png (306KB, 593x540px) Image search: [Google] [Yandex] [Bing]
39431.png
306KB, 593x540px
>>53697306
>anime
>programming

>>>>>>not related
>>
#include <iostream>
using namespace std;


int main(){
int n;
int sum;
cin >> n;
int *array = new int[n];
for(int i=0; i<=n; i++){
cin >> array[i];
}
for(int i=0; i<=n; i++){
sum += array[i];
}
cout << sum;
return 0;
}


what's wrong with this? it's for the hackerrank 'simple array sum' problem. output for some 1-10 integers input is seemingly random numbers like 993233136
>>
>>53697330
le smug anime shitpost xDD
>>
>>53697239
>
class Board(){

That's not valid syntax. You've clearly not even ran the code you're posting, that's not the way to go.
>>
>>53697336
array[n] is out of bounds.
sum is not initialized
>>
>>53697336
You didnt initialize sum
>>
File: 24231.jpg (54KB, 500x500px) Image search: [Google] [Yandex] [Bing]
24231.jpg
54KB, 500x500px
>>53697336
><=n
>=
>>
>>53697290
>>Why do you have "Tile[][] field"
Because the tile is supposed to have the properties of a field or so I thought.

>>"int[][] field"
Aren't you supposed to say field is an array of integers because if I remove that entire declaration and then loop like you just showed i'd have passed null to the class?

Could you show me the declaration of field in your solution? Because i'm quite confused although I do get you're turning the elements of field into the object new tile.

>>53697310
I was translating variables and forgot to add passing to the object. Very funny.
>>
>>53697357
It's supposed to be public class Board(){}, i'm well aware of that, I can't edit something I already posted and I know you're not supposed to use the word self-explanatory but if you noticed the tile class I did add it there so it's just a mistake on my end, sorry.
>>
>>53697412
>I was translating variables and forgot to add passing to the object.
>Very funny.
Yes, that sentence is very funny
>>
>>53697427
I was more shocked by the parentheses. Assuming that your main just instantiates a Board, that's fine, you have a complete program which can be discussed and you're welcome.
>>
>>53697476
Maybe still: copy paste stuff from somewhere where its syntax has been automatically verified instead of writing directly into 4chan.
>>
>>53697476
Yea it looks like a method, it's just bad formatting, I kinda quickly jotted it down without looking at it properly, it's entirely my fault but worry not, it's working as far as the syntax and compiler go.
>>
>>53697412
Good point: the "field" attribute, the one which is of type Tile[][] is null at this point. What you should do is initialise it, that's what constructors are for:
        private Tile[][] field;

public Board(){
field = new Tile[10][10];

for (int x = 0; x < field.length; x++) {
for (int y = 0; y < field[0].length; y++) {
field[x][y] = new Tile(x, y);
}
}
}
>>
>>53697545
Also:
if you just instantiate things into the void, like
something;
new Tile(...);
something else;

They will stop existing at "something else" so creating them was pointless. (more precisely: they will become unreachable and will soon be garbage-collected)
>>
>>53697545
should java get its own general. or maybe it should go to stupid questions?
>>
NEW THREAD:

>>53697617
>>53697617
>>53697617
>>
Guys I know c and I want to make something , do you know any projects I can contribute?
>>
>>53697545
Right that makes a lot more sense however now i'm again sending the entire array into the new tile.

To select a single element my next step should be to create a setter so that I can make an object out of one element for later use or a getter to just get a single element?

>>53697583
That's also a good point, how would you avoid that?
>>
>>53697647
>That's also a good point, how would you avoid that?
don't be an idiot and don't do that?
>>
>>53697647
>i'm again sending the entire array into the new tile.
No you're not: you're creating 100 new Tiles, one for each (x,y) pair, see? Do you understand that the Tile constructor is actually called 100 times on 100 different Tile objects?

>To select a single element my next step should be to create a setter so that I can make an object out of one element for later use or a getter to just get a single element?
Each of these elements IS an object. Is it not what you want? Yes you can pretty much make a setter which returns one of the Tile objects in the Tile objects array...

Now maybe you don't want to have 100 fixed Tile objects?

Also what is your source? I feel like it is not teaching you very well...

>how would you avoid that?
Not write this when it is not what you want, and do something with the object you instantiate. It's perfectly valid, it's just uncommon.
>>
>>53697793
Thanks you've given me clarity on my issues, honestly i'm in school and we're working on a project.

It's in OOP of course but i'm trying to mend with the way a groupmate wrote his code and I got confused somewhere along the way but I once again understand.

But essentially i'm learning java in school and they pretty much gave us a crash course through it, other than that it's self practice etc.

By 100 fixed tile objects you mean what exactly? My goal is to place different objects in the array and I think i'll do that by using a text file as map.
>>
>>53697963
Right, I understand
>100 fixed objects
Unhappy choice of expression on my part. As it is now, each Board instance will hold 100 different Tile objects thru it's "field", and they will exist exactly as long as the Board exists. There will be no need to create some on-the-fly, hence "fixed".

Now, assuming all of this is what you intended, and knowing what your final goal is, let's see:
You know how you're going to parse the text file, right? Scanner so-and-so...
>different objects
differing in what? Do you intend to write and use classes that extend Tile, or just distinguish between a wall Tile and a door Tile (whatever's on your map) based on an attribute of the Tile class? In both cases, your "field" need not change its type, nor it's initialisation (
field = new Tile[10][10];
) so that's a step forward.
A bit of thinking (maybe you don't need it to complete the assignment): should each tile really be passed its coordinates? At some point, they had to be used to reach it, so some other code should know them, right? We could take advantage of that, moreso since adding two ints in Tile is a waste of memory.
>>
Qt is kind of cool now I'm getting the hang of it.
I mean, it's memory management is a clusterfuck, it's got years of backwards compatibility bullshit and it's trying hard to lock you into it's own walled garden, but other then that it's really nice.
>>
>>53698150
Thanks for helping me by the way, I really appreciate your own intitiative to help me even beyond that.

But you could adjust it on the fly couldn't you? I mean as of now there's a 100 tiles but we can just adjust the value of the row and column or is that not the kind of dynamics that meet the definition of 'on the fly'?

>You know how you're going to parse the text file, right? Scanner so-and-so...
Yes I do.

>differing in what? Do you intend to write and use classes that extend Tile, or just distinguish between a wall Tile and a door Tile (whatever's on your map) based on an attribute of the Tile class?
Since i'll place an object on the coordinates of a tile i'd need to have them inherit the properties of a tile.
A door behaves differently from a key(example of the objects) however they still lie on a tile which is why they're indeed extending Tile.

>A bit of thinking (maybe you don't need it to complete the assignment): should each tile really be passed its coordinates?

I would think so yes as a player stands on a tile and has it's coordinates, then before a player moves it'll check it's neighbours therefore needing the coordinates.

Checking for neighbours here is necessary so that the player knows if he's allowed to walk on a tile or not since a tile could be/have a wall or door.
>>
>>53689516
That's what microcontrollers are for. Depending on the input actuators(motors, heaters, relays, etc.), you might need to condition the output of the micro to meet the input requirements.

>>53689584
A raspberry pi would be needed for more "intelligent" tasks, like processing images or sound, storing data, doing server things, etc.
>>
>>53698304
>Thanks for helping me by the way, I really appreciate your own intitiative to help me even beyond that.
You're welcome. It's Easter Holidays in Western Switzerland anyway, so I got this to do and that's about it. You need some more help or not? I'm available.

>But you could adjust it on the fly couldn't you? I mean as of now there's a 100 tiles but we can just adjust the value of the row and column or is that not the kind of dynamics that meet the definition of 'on the fly'?
What value? The one in an attribute, or a variable?

>>You know how you're going to parse the text file, right? Scanner so-and-so...
>Yes I do.
Fantastic!

>>differing in what? Do you intend to write and use classes that extend Tile, or just distinguish between a wall Tile and a door Tile (whatever's on your map) based on an attribute of the Tile class?
>Since i'll place an object on the coordinates of a tile i'd need to have them inherit the properties of a tile.
>A door behaves differently from a key(example of the objects) however they still lie on a tile which is why they're indeed extending Tile.
Agreed, I'll take that as a yes. You can write those classes quite right away, I would say.

1/2
>>
>>A bit of thinking (maybe you don't need it to complete the assignment): should each tile really be passed its coordinates?
>I would think so yes as a player stands on a tile and has it's coordinates, then before a player moves it'll check it's neighbours therefore needing the coordinates.
>Checking for neighbours here is necessary so that the player knows if he's allowed to walk on a tile or not since a tile could be/have a wall or door.
Yes, but the player does:
board.getTile(my_x, my_y);

To get that tile. This meets what I was thinking of as him already knowing the coordinates. Therefore, if I was you, I would just use that fact, and not burden the Tile class with x and y as attributes, you can just have player do the calculation and Basta, we're not designing a library so fuck clean interfaces.

Thread's gonna die, mind if we go to gitter.im? Maybe you need an account, it's free, and we can copypaste code there.

Also you need to do most design decisions, since your school kind of let's you down, right? Then maybe we can try one or two more advanced things...
>>
>>53695612
>Why does it have to be complicated?
Why does GCC have to be complicated? The kernel? X?
>How about the market is just dumb?
"Everyone else is an idiot". Narcissism at work.

OK, moving on. Window reinvented the wheel, sure okay. But the wheel was built to be reinvented. Imagine a world that still used wagon wheels made of wood. But it didn't break compatibility. If you want your VIM-style shortcuts, then you have plugins, you said it yourself. Proper IDE's are extensible and flexible.

I'm still not clear what's wrong with a tool built to make dev work easier. Intellisense, code highlighting, code completion, or more specific stuff like the "find all references" feature, ridiculously useful for tracing calls to a function. Mousing over variable names during runtime to check values. All stuff that's made my life easier as a coder.
>>
>>53698575
Let's do gritter.im, i've yet to see what that is but i'll make an account there, no problem, what's the code?
>>
File: 1457991823077.jpg (538KB, 1275x1650px) Image search: [Google] [Yandex] [Bing]
1457991823077.jpg
538KB, 1275x1650px
>>53698629
>Why does GCC have to be complicated? The kernel? X?
All
shit
>>
>>53698629
>coder
Leave
>>
File: rpamphet.png (113KB, 993x723px) Image search: [Google] [Yandex] [Bing]
rpamphet.png
113KB, 993x723px
>>53698629
>Proper IDE's are extensible and flexible.
Just like Emacs.


>>Why does it have to be complicated?
>Why does GCC have to be complicated? The kernel? X?
So? Their developers manage it with a standard text editor and a build system, no need for walled-garden IDEs.

>I'm still not clear what's wrong with a tool built to make dev work easier. Intellisense, code highlighting, code completion, or more specific stuff like the "find all references" feature, ridiculously useful for tracing calls to a function. Mousing over variable names during runtime to check values. All stuff that's made my life easier as a coder.
All those are useful, but I tend to think that if C# IDEs, C++ IDEs like VS, All Java IDEs had a common ground and code base, it would be simpler for users who seek to change a particular aspect of the interface they see every day, which is mainly a text box, mind you, to customize it to their hearts content. It does break compatibility because each plugin is different in their configuration interface. I tend to go by pic related, and it's not possible at this point. All of this reinventing the wheel comes from vendors wanting to create proprietary software, which is evil.
>>
>>53698763
https://gitter.im/lourkeur/CeciNestPas1Board
>>
>>53698820
Wait, maybe I'm dumb for making it private if there's no way to request being added. If that's the case, try CeciNestPas2Board
>>
>>53698793
source: https://panicz.github.io/pamphlet/
>>
>>53698857
>>53698820
I think it did work as I did say something, did you not see what I said?
>>
>>53698926
Which one? I don't see anything. Maybe that's because this is Flash-based, wait (I'm on GNU/Linux so my plugin is MASSIVELY out of date and disables itself by default because of that)
>>
>>53698785
>>Narcissism at work.
>>53698793
>Just like Emacs.
Is this supposed to be an argument for why I should use emacs? I don't see one.

So everyone wants choice. I get that. But the side effect of that is that we have tons and tons of IDEs because nobody can settle on one to pour all of our effort into. Eclipse, QTCreator, Code::Blocks, Gnome Builder. If they're not slow, they're crash-prone. If they're not crash-prone, they're just un-intuitive and a PITA to use.
>>
>>53699033
And I want to propose my horse in this race, the eldest, Emacs. But the original argument is that you were trashing text editor. Is Emacs a text editor or an IDE, and what's the difference?
>>
>>53699081
*text editors, you get the point. also >>53697617
>>
>>53699033
You don't belong here.
Thread replies: 364
Thread images: 40
[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.
If a post contains illegal content, please click on its [Report] button and follow the instructions.
This is a 4chan archive - all of the content originated from them. If you need information for a Poster - you need to contact them.
This website shows only archived content and is not affiliated with 4chan in any way.
If you like this website please support us by donating with Bitcoin at 1XVgDnu36zCj97gLdeSwHMdiJaBkqhtMK