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

/dpt/ - daily programming thread

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 319
Thread images: 32

File: mg_statistics_big.png (268KB, 474x626px) Image search: [Google]
mg_statistics_big.png
268KB, 474x626px
Statistics edition, now that we have done the calculus and linear algebra prerequisites

Old: >>55071499

>tfw will be coding awesome AI stuff after this /dpt/ edition
>>
All praise D
>>
>>55077774
Thank you brother
>>
how to be master at c/c++/c99 ?
>>
nth for Go has generics.
>>
File: 7608s.jpg (685KB, 800x1036px) Image search: [Google]
7608s.jpg
685KB, 800x1036px
Tomohiko Sakamoto's Algorithm

Determination of the day of the week

#include <stdio.h>

int dow(int d, int m, int y)
{
int t[] = {0,3,2,5,0,3,5,1,4,6,2,4};
y -= m < 3;
return (y + y/4 - y/100 + y/400 + t[m-1] + d) % 7;
}

int main()
{
const char *days[] = {
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
};

printf("%s\n", days[dow(14 , 6 , 2016)]);
return 0;
}
>>
I like this manga guide trend. Better than faggot anime at least.

>>55077796
Only on built-in functions.
>>
>>55077823
Why not just use jQuery?
>>
>>55077840
>Only on built-in functions.
No.
>>
>>55077855
Explain. Inb4 interface{}
>>
>>55077861
interface{}
>>
>>55077761
What is the purpose of this code found it in a thread a few hours ago?
def numFSM(a):
state='e2'
if a == '':
print('nigger')
else :
a = a.split()
case0 = {i: 'e'+str(i) for i in range(0, len(a))}
#case1 = {#...}
#case2 = {#...}
while a :
for x in range(0, len(a)):
if state == 'e0':
state = case0[x]
print(state)
elif state == 'e1':
#state = case1[x]
print('case1')
elif state == 'e2':
#state = case2[x]
print('case2')
>>
>>55077870
Not type safe. Type assertion/switches are slow.
>>
>>55077871
finite state machine
>>
>>55077877
That's not the point. It has generics.
>>
>>55077884
Dynamic typing != generics
>>
>>55077878
ok, what language is this, never seen something like this:
{i: 'e'+str(i) for i in range(0, len(a))}
>>
>>55077917
Python dict comp
>>
>>55077902
interface{} can be abused as a generic.
>>
main(c){return c ? c*main(c-1) : 1;}
>>
>>55077917
isn't that the Python?
>>
File: karlie.jpg (81KB, 600x566px) Image search: [Google]
karlie.jpg
81KB, 600x566px
>>55077871
that code is fucking ugly
>>
>>55077960
Surely she must be pretending
>>
>>55077927
But it does not provide zero runtime cost type safe generics, which is what all other people except for you mean by generics.
>>
>>55077969
Wouldn't bet on it, there are many wannabe nerds/low-techs out there.
>>
>>55078003
>wannabe nerds
Why did nerdom ever become cool? I preferred it as a shunned hobby/profession.
>>
can i make a macro like this

#define FOO_0 (foo + 1)
#define FOO_1 (foo + 4)
#define FOO_2 (foo + 2)

#define FOO(X) (FOO_(X))


not sure about the syntax but i hope you get the idea
>>
>>55078105
>Why did nerdom ever become cool?

A lot of people started playing videogames, and because it was formerly shunned, it became cool to be a nerd.
>>
>>55078105
>>55078133
Thank god normies will stay away from muh InfoSec
>>
>>55078122
or do i need to store the values in an array in order to loop through them
>>
>>55078105
Nerdom as itself never really became cool, but somehow the idea that people who do edgy things, browse tumblr/reddit, can 'program' in html, use apple products and go to starbucks are nerds spread across society. I think thats why now everyone wants to be 'nerdy'.
>>
File: index0_vs_push_back.png (14KB, 600x371px) Image search: [Google]
index0_vs_push_back.png
14KB, 600x371px
Is Rust good or is it just a meme?
>>
Does anyone know of a site that gives you beginner "practice problems" in Java
>>
>>55078148

You just wait. Right now "dude programming lmao" is the maymay, but "dude security lmao" can't be too far around the corner.
>>
File: >watchdogs.png (310KB, 849x436px) Image search: [Google]
>watchdogs.png
310KB, 849x436px
>>55078148
Yeah, most people don't even know that this is a thing, but I'm a bit concerned about the amount of edgy 12yr olds playing this game and installing Kali Linux after it, thinking they are hackers.
>>
>>55078183
I'm blaming Jobs for this too.
>>
File: autism.gif (240KB, 320x240px) Image search: [Google]
autism.gif
240KB, 320x240px
>>55078207
also pay attention to the fucked up apt command
>>
What language to learn after Python?
>>
>>55078195
The hope here is that the required low-level knowledge will scare them away.
>>55078207
I'm sure they'll learn how to ddos like every other l33t haxx0r, but not much past that.
>>
>>55078229
F#
>>
>>55078229
C, asm , C++, perl, Lisp, prolog, there are plenty of good languages out there
inb4
> prolog
> good
>>
>>55078261
Probably they'll also find out about metasploit after a while.
>>
>>55078229
Go.
>>
File: lost.jpg (23KB, 480x360px) Image search: [Google]
lost.jpg
23KB, 480x360px
>>55078261
> tfw my interest in infosec, linux system administration and programing started like this.
>>
>>55078271
Why learn that instead of Haskell?
>>
This is right down my alley! I've been coding a regression analysis program, and it can calculate univariate and bivariate regression models. Two questions: One, how do I calculate r and r^2 values for bivariate models? And how do i calculate coefficients for a multivariate model (more than two)?
>>
>>55078381
F# is more friendly, Haskell is more punishing.
>>
>>55077737
>>55077792
>>55077862
>>55077926

Ok, I figured where my problem is, Top->next is NULL when called into the function despite the fact that normally it points to the second element of the list.
Can someone explain why?
>>
>>55078472
I like it hard and rough
>>
>>55078477
Pastebin the relevant code, I want to see how you're building your list
>>
>>55078491
Download GHC and read this every night before you sleep

https://wiki.haskell.org/Monad
>>
>>55078207
Could someone explain
>>
File: Programming Shelves.png (952KB, 2100x1400px) Image search: [Google]
Programming Shelves.png
952KB, 2100x1400px
>>
>>55078616
He tried to use apt-cache search to find all packages that involve BlumeDB and Marcus Hollaway. What he does instead is trying to read config file ache.
>>
>>55078510
Here
pastebin.com/4LnWZ7Q8
>>
>>55078158
You have these special preprocessor constructs with hashes... Try
#define FOO(X) FOO_ ## x

If it doesn't work, google some about the preprocessor.
>>
>>55078630
chuckled
>>
I cannot satiate my lust for LINQ
var foo = Directory.EnumerateFiles(@"C:\temp\folder\Folder1");
var bar = Directory.EnumerateFiles(@"C:\temp\folder\Folder2");


var baz = foo.Concat(bar.Where(x => !(foo.Select(y => y.Split('\\').Last()).ToList().Intersect(bar.Select(y => y.Split('\\').Last()))).Contains(x.Split('\\').Last())));
>>
Are any of these manga books any good?
>>
File: output.png (44KB, 120x187px) Image search: [Google]
output.png
44KB, 120x187px
Alright, lads. Going for 1000 triangles and 5000 candidates. This should produce a pretty convincing mona lisa.

This is one with 500/2000.
>>
>>55078653
>
    for(;;){
printf("%s\n",Top->word);
if(Top->next)
Top=Top->next;
else
break;
}

Pro: Now you know about the for(;;)
Con: That's surprising, and surprising things should be avoided in coding.

for(; Top->next; Top = Top->next)
printf("%s\n",Top->word);
>>
>>55078667
You should try Haskell or F#
>>
>>55078694
No. Though I did like the Database one.
>>
>>55078653
>>55078701

>
Elem = Elem->next;
Elem = malloc(sizeof(struct list));

lines 58-59

Think about it, about sequence and such. Your problem lies right here.
>>
File: my sides.jpg (41KB, 573x313px) Image search: [Google]
my sides.jpg
41KB, 573x313px
>>55077960
>bajs
>>
>>55078701
Wouldn't that not print the last string of the list?
Can I do something like (Top->next)->next?
Still, it doesn't solve my problem.
Thanks for your time btw man.
>>
>>55078696
Are you a fucking ant?
>>
>>55078788
It'd take longer if it were bigger
>>
>>55078796
For you
>>
>>55078761
>Wouldn't that not print the last string of the list?
No, it's a shortcut, 100% equivalent to
for(; Top->next; Top = Top->next) {
printf("%s\n", Top->word);
}

I assumed you knew that. The rule is that if there is only one statement in the loop body (or the if body for that matter) then you don't need braces to group statements together because there's only one. It's optional tho, put in braces for clarity and ease of editing if you want.

>Can I do something like (Top->next)->next?
It's possible and you don't need the paren pair, but where and why?

>Still, it doesn't solve my problem.
Yes I know

>Thanks for your time btw man.
You're welcome. Good luck
>>
>>55077761
holy crap, wasnt that on scholastic before
>>
Currently sprucing up my regex-based X12 parser. Pleased with how fast it is, but I can't help but feel like I will regret doing this.
>>
>>55078696
Post progress when done
>>
>>55078827
The loop stops when Top->next stops being valid (==NULL), which since Top=Top->next happens at the end of the loop, Top->next==NULL for the last string so the loop isn't executed for the last string.

>>55078754
Could you elaborate? Is there a problem when using malloc on NULL pointers? Should I set only the last ->next pointer to NULL out of the loop?
>>
File: print-church-at-auvers.jpg (67KB, 300x380px) Image search: [Google]
print-church-at-auvers.jpg
67KB, 300x380px
>>55078696
Do a van Gogh

van Gogh is pretty based
>>
Does anyone actually understand Makefiles?

I just copy and modify some example code
>>
>>55079005
Somewhat.
>>
>>55078979

I'll try that after this run. I'm on triangle 7 of 1000 and 15 mins of runtime so far.

This will take forever.
>>
>>55079005
This helped me; maybe you'll find it useful.
https://learnxinyminutes.com/docs/make/
>>
>>55079073
what's the algorithm? this seems like something you should be doing on the gpu with shaders
>>
Anyone else struggling to decide what to work on? I wish there was a repository for current /g/ projects to contribute to.
>>
>>55079183
somewhat, kinda deciding to do a project on js, that would be like a addon for a browser, not sure what to do though. What language are you going to base your project on, or plan to
>>
>>55078963
>The loop stops when Top->next stops being valid (==NULL), which since Top=Top->next happens at the end of the loop, Top->next==NULL for the last string so the loop isn't executed for the last string.
M8, I'm so busy parroting I don't even reflect! Yes you're right. It can be fixed EZly tho
for(; Top; Top = Top->next)

PriTop: Them CS boyz call the second part of a for, as well as the only part of a while, the /invariant/ for a reason: it is what will by construction invariably be true in the body of the loop. So if you express precisely what you *want* from the loop --- that i is strictly inferior to ARRAY_LENGTH otherwise I'll overflow my array, that Top isn't NULL otherwise I'll dereference it, but
Top->next
is fine, I won't dereference it in this iteration --- then your condition is the good one. Obviously I failed at my own advice tho.

>Could you elaborate? Is there a problem when using malloc on NULL pointers? Should I set only the last ->next pointer to NULL out of the loop?
No, malloc doesn't even know you're assigning its result on a formerly NULL pointer, it doesn't care. No, outside of the loop would be already too late.

I'll give you this to chew on: it's not only with the last node that there's a problem. With this example program, we have an irregularity already on the second node.
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>

struct list {
/* ... */
struct list *next;
};

int main(int argc, char *argv[]) {
struct list *Top = malloc(sizeof(struct list));
Top->next = NULL;
struct list *Elem = Top;
for(int i = 0; i < 10; i++) { // create 10 nodes because why not
Elem = Elem->next; // your two lines
Elem = malloc(sizeof(struct list));
Elem->next = NULL;
}
assert(Top->next != NULL); // this assertion fails, and it's related to the second node (or rather the first node, depends)
}

Why does this happen?
>>
>>55079183
no
>>
>>55079140

For a total number of triangles, generate a bunch of candidates. Select the one which produces the lowest error value and apply it to the canvas.
>>
>>55079196
I was also thinking JS or Golang, what do you have in mind?
>>
>>55079251
What kind of genetic algorithm?
>>
>>55079075
# Warning - only use TABS to indent in Makefiles, never spaces!


wat
>>
>>55079301
it does not sound like a GA.
>>
I found all the manga guides in a single zip!
http://rg-gosset.co.uk/files/mangaGuides.zip
>>
>>55079319
>generate candidates
>select the best and apply it
>>
>>55079301

GTP's ownâ„¢
>>
>>55079317
wat what? Makefiles require tabs.
>>
>>55079349
that is not GA. in GA you don't even generate new candidates other than initial ones
>>
>>55079382
Yes it is
https://en.wikipedia.org/wiki/Differential_evolution
>>
>>55079395
The page you post says nothing about GA. I think you are mixing GA with evolutionary algorithms.

the algorithm he tells looks more like a hill climbing to me
>>
>>55079426
Differential Evolution is a genetic algorithm
>>
>>55079461
*
Apparently it's not, but it definitely seems like one and appears odd it isn't considered to be one
>>
>>55079199

Ok, I think I figured it out.

Top->next is NULL even in the main function, despite the fact the list is created normally.

I think this happens because I use the Elem pointer to create the list.

/*the Top pointer is created here*/
Elem=Top;
while(...){
Elem=Elem->next;
/*...*/
Elem->next=NULL;
}


I don't think Top->next is connected to the second node, anything else is connected because the Elem pointer is used for all of them.

I'll test it a bit.
Thanks again man, you really helped me a lot.
>>
>>55079476
he is just doing a hill climbing. he has a single solution and iteratively improves it by using best of 1000 triangles
>>
>>55079518
But hill climbing could stop at local maxima
>>
How can i make a trully peer-to-peer chat system? Would i have to boardcast via multicast for discovery?

what is the current going best encryption for end to end chat systems? RSA variant?
>>
I decided to run the van gogh one at the same time, since it won't make much of a difference.

Resized it to 195x247 and doing 1000/2000.
>>
>>55079504
>Thanks again man, you really helped me a lot.
You're welcome. You're almost there. I'm going to bed now. May the Force be with you.
>>
>>55078477
are you CS? if you cant write a linked list on such a huge time, you should switch courses
>>
>>55079562
I cant answer the first one

but for the second i know for standard encryption its 256 bit, rsa high end would be 4096. Signal i know is a fairly good for messenging, it uses 256 if that helps
>>
>>55079704
or he ahould stop running from his problems and solve them and learn from it
>>
>>55079005
output: input
command to create output from input

what the fuck is there to understand?
>>
>>55079562
multicast outside of local networks is almost guaranteed to be dropped unless you pay some prekium to your ISP.
>>
File: 1383518116213.png (430KB, 625x480px) Image search: [Google]
1383518116213.png
430KB, 625x480px
>applying for local software engineering positions in my city
>8 jobs
>mfw 7 of them declined without a phone interview
> I talk with human resources about some job statuses after 1-2 weeks
>within an hour get back more declines

I don't know what I did senpai.
>>
>>55080207
post CV / github
>>
>>55079183
Almost all I work on is a realtime imageboard and related libraries. It's a big enough project, so there is always something to do. If you know Go or JS and are bored enough, I can link the repo. Contributions are welcome.
>>
I have a new laptop for development purposes. I have created a script, winclang, for cross compiling to Windows from clang. It looks like this:

#!/bin/bash

clang -target x86_64-w64-mingw32 -I/usr/x86_64-w64-mingw32/include -L/usr/x86_64-w64-mingw32/lib -L/usr/lib/gcc/x86_64-w64-mingw32/5.3-win32 $@


It's an ugly hack.
>>
Why I can't do this in Python when something is passed as a closure to reduce?

n = 0
def something(x, y)
if n < 10:
pass

n = n + 1


It basically says n is undefined.
>>
>>55080344

is n defined as a global?
>>
Coding a free Minitab alternative, anyone know how to calculate multivariate regression coefficients?
>>
>>55080344
The pass statement is a null operation; nothing happens when it executes. The pass is also useful in places where your code will eventually go, but has not been written yet.

you probably want
 continue 
>>
anyone here ever try to download pics from instagram?

they haev some sort of a barrier that prevents me from even getting the links
>>
>>55080344
because python is a shitty language
>>
>>55080380
*tips fedora*
>>
>>55080363

>>55080344

hey you need to add this line above your for loop:

global n

that should fix it so n is defined.
>>
>>55080344
n = 0
def something(x, y)
global n
if n < 10:
pass

n += 1
>>
>>55080363
>>55080400
Ah, I get it, but when I change to global n it still says it's referenced before assignment.

>>55080367
That's not the issue I just replaced the actual code with pass here because it's a long snippet of code.
>>
>>55080269
Sure why not! I'd love to contribute.
>>
>>55077761

link for that pdf?
>>
>>55080444
https://github.com/bakape/meguca
>>
made this thing to get a little more familiar with Go
http://shitpostgen.herokuapp.com/

it goes through /g/ posts and then later generates text from them using markov chains
>>
>>55080420
>Ah, I get it, but when I change to global n it still says it's referenced before assignment.

I don't know python very well, but it most likely is due to n+= 1 since it involves assigning a value.

maybe change it to n = n + 1?
>>
>>55080566
this is your average python programmer /dpt/
>>
>>55080527
http://www.pdf-archive.com/2015/04/27/manga-guide-to-statistics/manga-guide-to-statistics.pdf
>>
>>55080600

thanks.
>>
>>55080564
>muh newfags go into destroying the white belkin strip, 1W wifi mikrotik routerboard. I blame women who don't know a non-ugly way to make games run worse on AMD not being retarded? If yes, very unimaginative though. Just let this shit to explode. Distribution review anon's I, you will DIE! Too tend keys lame my o still front anyone in here have experience in buying xiaomis on ali? With the kernel, which format is best, lower price. Especially removing MagSafe, if anyone would ever want to drop support of el Capitan takes up a strong signal from my colleague's PC, instead they generate html code from the FSF. that's why we laugh at console peasants and AMDrones. Usually >break into major website or company's servers >dump many, but in Australia, it uses the global menu bar. Why Mega have to regrap your mouse. That is made for using modern components. A watch a livestream on youtube. You don't hear anything then it's alright like that AP >mfw 7 of them look good, shit.
>>
File: 1454911774398.jpg (100KB, 800x568px) Image search: [Google]
1454911774398.jpg
100KB, 800x568px
>>55080590

you fix it then bitch
>>
>>55080527
Here's all of em
>>55079346
>>
>>55080539
>https://github.com/bakape/meguca
>High performance real-time imageboard in Meme, MemeScript and MemethinkDB https://meguca.org/a/
>>
File: 1432414650098.jpg (22KB, 373x434px) Image search: [Google]
1432414650098.jpg
22KB, 373x434px
>don't program for months
>forget how to even do basic shit
>>
>>55080539
Done! Will contribute as i understand it.
>>
>>55080630
there is nothing to fix. other than introducing an explicit way to declare your variables. python pays hard for allowing not to declare variables
>>
>>55080660

Thanks, but I'll have to wait for better connection, to download all of them.

I have yet to load the Statistics one alone.
>>
>>55080673
*tips fedora*
>>
Keep your pedo cartoons in /a/ you filthy weeaboo
>>
>>55080673
Do you only use COBOL, CGI and text files?
>>
File: 1449431590419.jpg (23KB, 604x604px) Image search: [Google]
1449431590419.jpg
23KB, 604x604px
>>55080681

that's me but I'm doing job interviews now. Praying I can make it past whatever interviews I get.
>>
>>55080727
can you reverse a binary tree?
>>
>>55080805
with my eyes closed.
>>
>>55080564
Nice anon. Ramp up the racism and it could sound like something Terry Davis would come up with.
>>
>>55080564
where can i find a nice introduction to markov chains and applied them to programming?

some implementation in python would be nice.
>>
>>55080710
Nope, I use Arc and JavaScript for all my web projects.
>>
>>55080892
>python
>>>/reddit/
>>
>>55080897
you're already in reddit
>>
>>55080897
>>>/out/ you fucking virgin NEET
>>
>tfw coreclr is still half-broken on Linux
>dotnet cli utilities depend on libicu52
>won't work with libicu55
>>
Rumours point to above 390x performance, but this has happened pretty much everything is just that they just have extensions on chrom/ium with military tutorials if options of things we don't pay taxes on online purchases from overseas :p the feel I it life at Euro
where the hell do you dislike a suggestion? Could you give us cooler gaymen laptops.
>buh- *crying*
>no Gpu
>buy R9 280 for 200 Euro
>Buying the 480 kind of IRONY WITH A 3GB GPU? What rom? For how ridiculously expensive, you treat it like you should then move this file off the Nvidia Gpu and only turns on when I eventually bought from here: can probably be true though, anon? Looks lovely $200 I will put you out a decent performer for my hackintosh config, I probably just should've gone for college and I'd like something you would never want to replace anything. I usually go with 1080/1440p depending on how well the with Crt don't than if legit company same the in mutually all, there's a need for brand new. Pics incoming. $80 paypal?
>>
>>55080920
python will get you nowhere outside of web dev and making half-broken reddit scrapers
>>
>>55080951
what do you suggest then?
>>
>>55081040
java and/or C++
>>
>>55081046
and do what with those languages? suggestions?
>>
>>55080951
>python will get you nowhere outside of web dev and making half-broken reddit scrapers

just ignore this anon, I've used python libraries for nuclear engineering simulation and deep learning. It's one of the most commonly used languages and a hell of a lot better than javascript for learning
>>
>>55078630
The unicorn is magical and it can summon perfect bookshelf.
>>
>>55081122
make games
>>
How do I properly use rand() in C?

I'm using rand() % to + from, but it doesnt seem to work with negative numbers
>>
>>55081150
It's used for plugins and scripting in GIS type work as well if you're into that.
>>
>>55081190
num = (rand() % 2) ? num : -num;
>>
>2nd year pol sci phd here

What do you guys use for the usual stuff in CS? frequentist or bayesian?
>>
>>55081190
Use arithmetic
>>
>>55081190
>How do I properly use rand() in C?
By not using rand() because it's garbage and is not uniformly distributed.
>>
>>55081190
>How do I properly use rand() in C?
>I'm using rand() % to + from, but it doesnt seem to work with negative numbers


you should use a prime modulus multiplicative linear congruential pseudo random number generator
>>
File: brogram.png (60KB, 800x800px) Image search: [Google]
brogram.png
60KB, 800x800px
which language is better for game dev, c or c++?
>>
was the C++ 'auto' type a mistake?
>>
>>55081534
c++
>>
>>55081534
C++, it is just as fast C when you know what you are doing. Has enough abstraction to tidy things up and probably will have better library support.
>>
>>55081534
>no *lisp
>brogram

normie shit die
>>
>>55081555
it's great when the type can be easily deduced from the right side of the expression, saves a lot of typing and redudancy, even better when working with heavily templated code
>>
File: sbahj_high.jpg (21KB, 340x292px) Image search: [Google]
sbahj_high.jpg
21KB, 340x292px
>>55081569
>2016
>caring about lisp
>>
>>55081555
It is golden when using data structures with templates and trying to use iterators with them.
>>
>>55081534
C++

it can work with C libraries the same way you would in C.

Using classes as resource handlers is great.

OOP is trash tho
>>
>>55081566
>better library support

you can literally hook anything into C
>>
How do I get around C's lack of namespaces?

No I can't simply use C++.
>>
>>55081606
proper use of header files and variable/function naming as follows

headername_thing()
headername_thing2

I wish C would add simple things like namespaces ;~;
>>
>>55081606
you put "_namespace_" before everything and call it a day
>>
>>55081595
Yeah, I was thinking of doing that (I already have a display engine in C but nothing else yet) just for vectors and classes and ignoring the shit like templates, etc that I don't need; I kind of enjoy the challenge of working with C tho.
>>
>>55081596
what ever you can do in C, you will be able to do in C++ plus you will easily use C++ libraries.
>>
>>55081636
>shit like templates
you take that back
>>
>>55081636
>uses std::vector
>does not use templates
I think you should stick to C
>>
>>55081636
I started with C as well since I really wanted to learn low level stuff like assembly and proper memory management. Then, I learned that you can do all of that in C++ with extra shit that is convenient.
>>
Gnumake, cmake, gradle or ??? for building c/c++ projects ?
>>
>>55081190

rand() generates a random integer number between 0 and RAND_MAX.

The modulo operator performs integer division on two numbers and returns the remainder. If you have some number x modulo k, the result is always going to be between 0 and k-1 inclusive.

Combining these two, we can generate a random number between 0 and k-1 with rand() % k, giving us k possibilities. If I wanted a custom range, I would consider the first number in the range and the number of numbers in the range. So for instance, if I wanted something between -2 and 5, I would know that the range contains the numbers { -2, -1, 0, 1, 2, 3, 4, 5 }, and therefore a modulus of 8 should be used. If I call rand() % 8, I will get a number between 0 and 7. Subtracting 2, and I get a number between -2 and 5.

The problem with your formula is that you think the modulus necessarily represents the end of the range, when it is actually the number of numbers in the range. If you want to get a random number in the range a..b inclusive, let k = b - a + 1, and use rand() % k - a.

That said, I would note that rand() likely won't give you perfectly even odds, especially with a modulus. If your RAND_MAX == INT_MAX == 2147483647, which is a not too uncommon case, then modulus that are a power of 2 will not affect the odds, but any other power will lead to something a bit off. Let's consider you want a number between 1 and 6. Well, in the range of 0 .. 2147483647, how many numbers have each modulus? Well, 2147483647 % 6 == 1, so that means the last two numbers in this range have about 1 higher count than the rest, giving these modulus counts:

0: 357913942
1: 357913942
2: 357913941
3: 357913941
4: 357913941
5: 357913941

Not exactly something I'd use in a casino, but maybe acceptable for D&D?
>>
File: ml68k.png (4KB, 84x128px) Image search: [Google]
ml68k.png
4KB, 84x128px
Here is mine http://b.1339.cf/egmktco.webm (skip to the end to see the final result).
Adaptive mutation rate helped a bit.

Still, could be better. This should not take 68k generations.
>>
>>55081693
Templates r dum and working with """flexible array meme-bers""" is annoying & you're restricted to 1 per struct
>>
>>55081778
>templates r dum

let me just define a nice polymorphic type:
int_vector
double_vector
char_vector
longlong_vector
wchar_t_vector
obj1_vector
obj2_vector
obj3_vector
...
obj15815_vector
>>
>>55081745
that looks horribly inefficient. it basically zeroes every triangle then hopefully ones better results by purely random mutations.

I believe your background being black makes it worse. if there is no triangle, black is closer to original pixel so your triangles moving there gives worse fitness value most of the time. maybe not having a triangle should be worst fitness for that pixel
>>
>>55081778
I don't get what you are saying. You are not restricted 1 template class. templates enables you to reuse your code with no overhead. and they let you do much more than "flexible array meme-bers", whatever that exactly means
>>
>>55081813
I think this is an issue with my alpha-blending implementation.
I think it promotes too much coadaptation of triangles early which gets increasingly hard to untangle later when algo could use more of them. This picture is not the easiest one, for sure.

Still I'm going to refrain from tweaking the fitness function and GA just to help this concrete case, because I'm interested in GA that can achieve good performance on a variety of tasks.

This mona lisa imitation task is just a benchmark for me.
>>
So, I want to make a program that will draw a bunch of different fractals, where there will be a menu where the user can choose what kind of fractal, then they can input a number for the size of the fractal. I'm trying to do it in Java, because I haven't used it in a year.
Right now I just have this to get familiar with how Java's graphics works, it just draws garbage now:
import javax.swing.JFrame;
import java.awt.Graphics;
import java.awt.Color;
public class drawing extends JFrame
{
public static void main(String[] args)
{
drawing a = new drawing();
a.setVisible(true);
}

public drawing()
{
super("Fractal Generator");
setSize(1000, 1000);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
getContentPane().setBackground(Color.white);
}

public void paint(Graphics g)
{
super.paint(g);
int x = 1000;
int y = 250;
while (x > 2)
{
g.drawOval(y, y, x, x);
x *= 0.8;
y *= 1.1;
}
}
}


What I don't understand is how is paint called? The book I have just says, "The method paint is called automatically, and you normally should not invoke it in your code." I want to invoke it though, so that I can have the method signature be:
public void paint(Graphics g, int x, int y)

So that I can recursively call paint, where x and y are getting smaller, and also so that the user can input what x and y will be.
>>
>>55081859
I don't know, with your background being black and picture mostly being black, your triangles will converge to a small area since fully black picture is a pretty good local optima and it is easy to get there. after that you will hope that mutations save you from there.
>>
>>55081886
>uses swing
you should probably hang yourself
>>
>>55081950
(You)
>>
>>55081932
I see this as an interesting challenge to design the GA that is good at getting out of local maxmas.
Also I will try it with other images.
>>
Let's try Nep!

node evolve_image.js nep_nep.bmp 
MODE: LOCAL, SERIAL
Approximating image "nep_nep.bmp" : 175 x 204 px with 50 triangles
GA started
No initParams given to GA
No copyGenome function given. Using util.clone
Using default serial task executor, pass executeTasks in config to override
No PRNG class given, using Math.random as random source
Start
Fitness evaluation time: 3.430s
Mutation Rate [+]: 0.10500000000000001 parentFit: -10000000000 Nbetter: 600 pop: 600
>>
File: 1463949823658.jpg (97KB, 480x604px) Image search: [Google]
1463949823658.jpg
97KB, 480x604px
>tfw your 6 core CPU allows you to do 4 concurrent genetic algorithm experiment runs easily

>tfw sit and relax while the computer does all the hard work
>>
>>55082228
post code
>>
>>55082268
Later.

Also it's not even hard to code it yourself from scratch in any fast language.
>>
guys, whats the most convenient framework to parse HTML i can use?
i dont want to write a couple hundred fucking lines of code just to scrape a few images
>>
>>55082353
https://github.com/cheeriojs/cheerio
>>
>>55082353
>parsing a non-regular language
>>
>>55082353
https://github.com/lazytiger/gumbo-query
>>
I want to make myself more valuable for the job market. Should I learn C# or Android development?
Also, I'm more of a Linux user. How likely is it i will have to deal with Windows Server as opposed to RHEL? I dont come from a huge city, this place is more "traditional" and backwards, so im afraid companies probably use Windows Server here. im planning to move to virginia though (which might be even more backwards)
>>
>>55082435
>I want to make myself more valuable for the job market.
Learn Java, C, C++ and C#

anything else is a meme
>>
>>55082395
what do you suggest? i just want to download and get a list of URLs from a webpage

>>55082386
anything that isnt javascript?

>>55082428
>C++
pls no, i said i dont want to waste time writing trivial code
>>
How many of the programming projects out of my programming book should i do each chapter to be sufficient?
>>
>>55082454
>plz no js
>plz no C++

What do you want then lol?

Personally I have used cheerio a huge lot, I parsed millions of pages with it. It is nice.
>>
>>55082461
All of them.

Even if you think you're capable of them already, you should attempt them.
The hardest part of learning programming isn't syntax, it's learning how to write solutions in a computational way.
Literally, boiling down your logic so a dumb adding machine will understand it.
>>
>>55082461
8
>>
>>55082461
if you have to ask then all of them
>>
>>55082353
BeautifulSoup
>>
>>55082435
>How likely is it i will have to deal with Windows Server as opposed to RHEL?

Extremely unlikely.

It is likely you will work with ubuntu server though, it has became a standard OS for the cloud instances.
>>
>>55082474
something that isnt js and isnt a massive pain in the arse to do anything with like C++ is
>>
File: Capture.png (10KB, 572x146px) Image search: [Google]
Capture.png
10KB, 572x146px
there goes the dream, lads
its been a good run
>>
>>55082480
>>55082487
I'm just dumb so they take me a long time, but I guess I'll just keep truckin
>>
>>55082515
Why does wikia even exist?
Their abomination of a wiki software is so shitty compared to mediawiki.
>>
File: into_the_light.jpg (13KB, 700x700px) Image search: [Google]
into_the_light.jpg
13KB, 700x700px
>nobody to do cool machine learning bullshit with

Would anyone be up for doing some sort of computer vision of NLP project over Tox?

Here's a simple Seq2Seq implementation I made for shits once:
https://github.com/adamchanson/seq2seq
>>
>>55082526
When i started, I literally spent 5 hours trying to write fizzbuzz without looking it up.
>>
>>55082535
Seq2seq is very impressive, anon

though I'm not into tox

/g/ has rare AI general threads, you can post there
>>
>>55082353
despite people going apeshit when you mention html and regex in one sentence, if all you need is a simple dirty script to get a bunch of images it'll do just fine
>>
>>55082535
i eventually want to learn AI/CV/machine learning but i'm still trying to get the basics down pat.
just wrote my first simple parser
>>
>>55082545
Thanks man that's actually pretty reassuring
>>
>>55082534
idk, it's actually quite detailed for what I'm using it for

I was thinking though, this is more of a legal question.

All of their content is available on the net. Their terms say you can't scrape their site, unless you go through their API. Their terms also say if you want to use their API for commercial use you need approval.

However everything is legally licensed under http://creativecommons.org/licenses/by-sa/3.0/, which gives me the right to commercially distribute anything I get from the site. So if I violate their terms of service, do I not have the right to distribute all the text I've scraped?

I think I might be able to circumvent everything if I say I have manually copied all of the text, lel.
I think I'll still give it a try...
>>
>everything works on desktop
>rsync to server
>blows InterruptedException
Is there any way to figure out what interrupted a thread? It doesn't seem like there is one, but this is driving me nuts
>>
>>55081697
SCons
>>
>>55082656
til it breaks and you spend 8 fucking hours trying to figure out whats wrong with it
>>
>>55082474
>Personally I have used cheerio a huge lot, I parsed millions of pages with it. It is nice.


can you explain in layman's terms what is cheerio exactly for?


what can you do with it?
>>
>>55082754
Well gee, I can guess pretty good when I have no clue what you're doing.
>>
>>55082228
>CPU multithreading
>not doing your parallel computations on GPU
Go to bed grandpa
>>
>>55082880
I meant more generally, though to be specific, I'm putting together an application with Spring Data Couchbase on an OSX localhost and moving to a server running Ubuntu; the issue appears when using a repository implementation produced by a repository implementation factory (since I'll be deploying to an OSGi environment, registering it as a bean in a Spring Boot context would do me little good)
>>
>>55082929
>>55082228
I hope you're at least using SIMD extensions.
You can make your code at least 4x faster without resorting to cheap tricks like multithreading.
>>
>>55082861
node
> var cheerio = require('cheerio')
undefined
> var myHttpResponse = '<body><div class="important">important data</div></body>'
undefined
> var $ = cheerio.load(myHttpResponse)
undefined
> $('.important')
{ '0':
{ type: 'tag',
name: 'div',
attribs: { class: 'important' },
children: [ [Object] ],
next: null,
prev: null,
parent:
{ type: 'tag',
name: 'body',
attribs: {},
children: [Object],
next: null,
prev: null,
parent: null,
root: [Object] } },
options:
{ withDomLvl1: true,
normalizeWhitespace: false,
xmlMode: false,
decodeEntities: true },
_root:
{ '0':
{ type: 'root',
name: 'root',
attribs: {},
children: [Object],
next: null,
prev: null,
parent: null },
options:
{ withDomLvl1: true,
normalizeWhitespace: false,
xmlMode: false,
decodeEntities: true },
length: 1,
_root: [Circular] },
length: 1,
prevObject:
{ '0':
{ type: 'root',
name: 'root',
attribs: {},
children: [Object],
next: null,
prev: null,
parent: null },
options:
{ withDomLvl1: true,
normalizeWhitespace: false,
xmlMode: false,
decodeEntities: true },
length: 1,
_root: [Circular] } }
> $('.important').text()
'important data'
>
>>
>>55082861

I had a really specific use for cheerio. I was making a multiplayer game that stored the game state on the server in XML, and then rendered the same XML as HTML in the client for "graphics". It's a weird game based around binary trees.
>>
File: plot_4.png (2KB, 640x480px) Image search: [Google]
plot_4.png
2KB, 640x480px
>>55082964

I don't. The code is probably 6x slower than equivalent C++, but I can rewrite it in C++ in any moment.

I am writing it in high-level language to prototype the algorithm, it has a lot of non-trivial details like mutation schedule (see picrelated for example) etc.
I would waste a week writing the same things in C++.

Once I settle for a solution that satisfies me I will rewrite, though I could just rewrite only 5% of hottest functions though.

Writing research-tier software in C++ === cucking yourself.
>>
>>55082982
?
>>
>>55082929
My Nvidia Thermi unironically fried itself ;__;
>>
>>55083031
>Writing research-tier software in C++ === cucking yourself.
I'll accept this, it's not a language for prototyping. You doing this in Python or Lisp or something?
>>
>>55083031
If you were actually proficient in C++, you could write the entire thing in C++ the first time without wasting effort.
>>
>>55083037
he's demonstrating cheerio use from uses of nodeJS in bash
>>
>>55083076

plz don't shill for C++, I won't fall for the meme
You can never stop thinking about containers, types, references, static classes while writing your algo in C++. If you internalize all this bookkeeping bullshit in your head there will be less place for algorithms and math.
Then your start debugging and you hit segfaults and memory leaks..

C++ is bad language for exploratory programming, nobody in science/engineering uses it directly. Everybody uses matlab and scientific python, then falls back to C/C++ only when necessary. There is reason behind such order of things.
>>
>>55083077
so he parsed an html website?

so confused
>>
File: hmmm.jpg (21KB, 393x360px) Image search: [Google]
hmmm.jpg
21KB, 393x360px
Isn't there a quicker and prettier way to add or modify an object in a database without creating a ton of variable to create that said object ?

for example this shit. I feel that it's retarded because of the number of variable I created


String nom = JOptionPane.showInputDialog(this, "Entrez le nom", "Nom",JOptionPane.QUESTION_MESSAGE);
String prenom = JOptionPane.showInputDialog(this, "Entrez le prenom", "prenom",JOptionPane.QUESTION_MESSAGE);
String adresse = JOptionPane.showInputDialog(this, "Entrez l'adresse", "Adresse",JOptionPane.QUESTION_MESSAGE);
int idVille = Integer.parseInt(JOptionPane.showInputDialog(this, "Entrez la ville", "Ville",JOptionPane.QUESTION_MESSAGE));
Employe emp = new Employe(nom, prenom, adresse, idVille);
boolean bol = daoEmp.insertEmploye(emp);
if (bol == true)
{
JOptionPane.showMessageDialog(this, "Ajout de l'employé confirmé", "Confirmation", JOptionPane.OK_OPTION);
}
else
{
JOptionPane.showMessageDialog(this, "Erreur pendant l'ajout de l'employé", "Confirmation", JOptionPane.OK_OPTION);
}

>>
>>55083202
>confused

IF YOU WON'T HAVE BREATHING REFLEX YOU DIE

IF YOU WON'T HAVE GOOGLE REFLEX YOU WON'T LEARN ANYTHING EVER
>>
>>55083158
You sound like a fucking moron, and you're basically admitting that you know nothing of the implementation details of your shitty algorithms, nor do you care to learn that your MATH doesn't exist in a vacuum.
The computer doesn't give a shit, you need to boil down your logic to a dumb adding machine if you want any semblance of performance.
>>
>>55083242
I know/have written code in assembly (not only for x86, son), C, C++ and a host of other languages.

I'm an adult, I value my time, thus I write the prototype of my code in javascript (which can be thought of as a dynamic functional jit-compiled C with garbage collection).

"Write everything in C++" sounds like a religious-ish teenage attitude to me.
Adults choose the right tool for the task and are not afraid to use several tools in one task.
>>
Best resource for learning Java and Swing?
>>
>>55083242
Don't you have some Fizzbuzzes to write?
>>
>>55083316
see >>55081950
>>
>>55083242
Of course he doesn't know the implementation details because he's designing the algorithm.

pajeet pls go and stay go
>>
>>55081534

both
>>
>>55083214
Different language and maybe different database.
>>
File: 3.jpg (204KB, 640x640px) Image search: [Google]
3.jpg
204KB, 640x640px
i feel like there are no ideas left for me, and everyone else has the good ones.
i know it's irrational but i'm demotivated. how do i stop being blinkered like this?
>>
>>55083459
Contribute to FOSS.
>>
>>55083459
get some ideas
>>
>>55083459
Just reinvent some wheels in a meme language like the rest of us. You don't need ideas, only autism.
>>
A retarded question about the possibility of an int being null.
Why does if(id !=null) id being an int shows me an error ?
id is supposed to receive and int from a JOptionPane.inputDialog. So if we don't put anything in it, will the int be null or 0 ?

>>55083458
I have no choice. I was asking specificly for Java and this type of database.
>>
File: unrolled linked list.png (19KB, 430x381px) Image search: [Google]
unrolled linked list.png
19KB, 430x381px
Why don't more people use unrolled linked lists? They solve a lot of problems associated with both linked lists and array-based lists.

You get fast insertion times anywhere in the list while also getting fast lookup times.
>>
>>55081534
both, they can be linked into the same executable so don't limit yourself.
>>
>>55083526
where do you stop unrolling?

Why are you anal over inserts? Not all applications need random inserts
>>
>>55083573
It's like a hybrid between a linked list and an array list. Instead of linking individual cells of data, you link vectors of them, where each node behaves sort of like an array list. Then when each node runs out of room for its fixed length vector, it just spawns an adjacent vector node.
>>
>>55083617
Once again, where do you stop unrolling (size).

Why bother

Can you show benefits over A simple array cache-wise


needlessly complicating things is just bad design
>>
>>55083640
That's a hyperparameter. You have to choose how big you want the nodes to be.

And this is a list, not an array. It solves a fundamentally different problem.
>>
>>55083667
To which an Array can do and faster because of cache.
>>
I'm a lazy fuck, how do I learn to program
Also advice on how to motivate myself to do it
>>
>>55083459

You don't get it.
Coming up with new ideas is a loser's game.

It's better to STEAL ideas, implement, them, tweak a bit and see where it goes. Many inventors don't forsee how their invention may be used or improved.

S T E A L
>>
>>55083678
Until you try to insert elements into an array because that's not what an array does you retard.
>>
include <crypt.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#define _XOPEN_SOURCE

int main(void) {
long long unsigned i = 0;
while (1 == 1) {
char str[40];
char dest[3];
sprintf(str, "%llu", i);
memcpy(dest, &str[1], 2);
char trip[20] = crypt(str, dest);
printf("%s\n", trip);
i += 1;
}
return 0;
}


Why is it not working?
>>
>>55083716
You can insert elements into an array

nothing is saying you can't.

I'm sorry you are brainbead
>>
>>55083701
>It's better to STEAL ideas, implement, them, tweak a bit and see where it goes.

Precisely. Theft is the precursor to innovation.
>>
>>55083735
include <crypt.h>
>>
>>55083738
And then you have to move over all of the data in the vector because you just inserted into the middle, incurring a massive performance penalty and also a massive cache miss.
>>
>>55083748
why did you post that picture?

how is it related with what you said?

by the way, how's your riffle?
>>
>>55083735
Is your compiler not throwing an error on the first line or something?
>>
I am trying to fix a userscript for a certain site that broke when the site made some changes.

I am trying to get the element that has the id that starts with pool

I run the following regex in the console:
/^pool/.test("pool8585") and it comes up true.

But when I try using document.getElementById(/^pool/) it doesn't find anything.

What am i doing wrong?
>>
>>55083756
Nah, just miscopied, it's not it.
I link it with -lcrypt anyway
>>
>>55083775
>>55083768
>>
>>55083338
Need swing for my job.
>>
>>55083796
Try this
https://www.youtube.com/watch?v=r2S1I_ien6A
>>
>>55083767
>how is it related with what you said?

Borchard invented the pistol on the left. He refused to make any changes to it because he thought it was perfectly fine the way it was. His protege, Luger, stole the design and refined it, creating one of the most notable pistols in history.
>>
>>55083841
isn't the gun of the left, the nazis use in WWII?
>>
>>55083862
no
>>
>>55083871
sorry, i meant right
>>
File: a.png (246KB, 1280x720px) Image search: [Google]
a.png
246KB, 1280x720px
where can i get started on reverse engineering software?
i wanna work up to reverse engineering games to do whatever i want in them
>>
HI, now i'm working to a proyect to class (very simple) in BD to java for today. Realy i don't have mutch time to do it. So guys i Your reconmend me to do it simple or complicated
>>
>>55083881

Yes, the one on the right is the design that Luger came up with, based on the Borchardt action.
>>
>>55083885
What is your native language son
>>
>>55083885
> BD to java
wut
>>
>>55083932
Big Dick
>>
>>55083774
RTFM https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementById
>>
>>55083883
just for you bby

https://tuts4you.com/download.php?list.17
>>
>>55083943
BIG DICK
https://www.youtube.com/watch?v=cNJHOgLH5mU
>>
>>55083963
'preciate it bby
>>
>>55083883
http://vxheaven.org/lib/static/vdat/turevers.htm

https://vxheaven.org/lib/pdf/Identifying%20Malicious%20Code%20Through%20Reverse%20Engineering.pdf
>>
>>55083883
1. Play with IDA Pro, or objdump to disassemble the binary.

2. Play with QEMU emulator, and setup an virtual environment for yourself to step through the program or just run the program. Or VMWare, or VirtualBox. The key to RE is that anything unknown should be treated as malicious. And if the binary want to connect back to some server, perhaps you should intercept the traffic to capture the content, or emulate the server if possible.

3. Debugger: breakpoint by address, data - these are among the most important knowledge to master when reversing.

4. Master commercial debugger like Immunity Debugger (lots of features which facilitate RE):

You could learn reverse code engineering by doing the following tasks: coding in the languages and platforms you intend to do reverse engineering tasks, reverse engineering your own applications with different approaches and techniques (static disassembly, debugging, binary instrumentation,...), reading reverse engineering/malware analysis books, and practicing with crackmes, keygenmes, unpackmes, advance your skills with malware analysis tasks, write unpacking/deobfuscation/code analysis tools and scripts, write your own protectors/packers/obfuscators.


https://blog.udemy.com/reverse-engineering-tutorial/
>>
>>55083031
you know there is GMP bindings for high level languages
>>
VERY IMPORTANT QUESTION

i = i*n


or

i *= n


??
>>
>>55084166
Second one, why is that even a question
>>
>>55084166

i = (((i - 1) + 1) * n*2)/2

>>
>>55084166
The top one if you're only doing it once (for clarity of intent)

The bottom one if it's in a loop (for clarity of intent)
>>
>>55077761
damn i actually read this
>>
File: weird_nep.png (11KB, 175x204px) Image search: [Google]
weird_nep.png
11KB, 175x204px
FrankenNep
>>
>>55081534
>Python
Accurate.
>>
File: Oh shit I fucked up.png (3MB, 1935x800px) Image search: [Google]
Oh shit I fucked up.png
3MB, 1935x800px
What would be the best way to thread work on an A* algorithm in C#?

I have a lot of objects that need to calculate paths using A*, and I want them to not freeze the client for even a millisecond while they're creating themselves- They should just wait for frame where the path has finished calculating.

How could I most effectively thread this work and get a return value from the thread?
>>
>>55081534
C++ and LuaJit are used in dozens of AAA titles.

If I were an indie I'd use love2d.
>>
>>55084348
Can you post the original? Looks interesting.
>>
>>55081813
>I believe your background being black makes it worse
Shit I just thought I was on a more eloquent version of /pol/.
>>
File: nep_nep.png (198KB, 292x340px) Image search: [Google]
nep_nep.png
198KB, 292x340px
>>55084421
>>
new thread!~!

>>55084497
>>
>>55084358
I don't know about the algo, but for performance issues you should use threads: with that meaning Tasks, async methods, parallel loops, and Plinq.
>>
File: 1390085088006.png (357KB, 454x603px) Image search: [Google]
1390085088006.png
357KB, 454x603px
>>55078630
this is excellent all around
>>
File: 1441674467724.jpg (17KB, 576x324px) Image search: [Google]
1441674467724.jpg
17KB, 576x324px
What does this mystery mean?

$functions = explode(' ', mb_strtolower($_POST['functions']));

I know nothing about coding but there is a hidden keyword there I guess. Friend is trolling me and trying to hide it.
>>
I need to return an object at a specific row and col index. I implement:

return board[rowIndex - 1][colIndex - 1];

but I get an array index out of bounds exception for the value of -1. I have no idea what to do. Even if I take away the "- 1" I get an out of bounds exception at the other end.
>>
>>55086183
step through with a debugger
>>
>>55080377
Right click - Inspect source always worked for me
>>
>>55086250
Thanks, one of the methods I didn't see used my methods in an unexpected way.
Thread posts: 319
Thread images: 32


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

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.