[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: 331
Thread images: 32

File: 1475178963201.jpg (3MB, 2120x3052px) Image search: [Google]
1475178963201.jpg
3MB, 2120x3052px
Previous thread: >>56870007

What are you working on, /g/?
>>
What is the best tool for generating c wrapper to c++ library?
>>
>>56872737
Step 1: Rewrite your library in C
Step 2: Oh happy day
>>
>>56872731
Is ocaml shit?
>>
I started taking a programming class here because all I've ever used to make anything is game maker

5 weeks in and we haven't reached if statements
I thought I was the retard
>>
>>56872717
C++ is what happens when you have too many cooks.
>>
>>56872731
first for C. Going through C Primer by Stephen Prata. So far, I really like. Read the first chapter last night, and I'm gonna read another 1 or 2 today.
>>
>>56872653
How about bottom right anon?
>>
>>56872755
loool just self-learn programming

https://docs.oracle.com/javase/tutorial/
>>
>>56872767
i don't like it, make the background more opaque if you find top right hard to read
>>
>>56872755
>>56872772 <-- This.
Assuming you're going to get some sort of credit for the class (uni credit or a piece of paper), just do whatever you need to get a good grade and do projects on your own time.
>>
>>56872731
How to send keystrokes to a foreground window from within a background thread in Python?
>>
Why do frameworks always use such stupid "zany" names?
>>
>>56872798
>>56872755

Yah thanks dudes, i learned a whole bunch of Java and python before, I just mean I never made a project using them

Our tutor makes us write shit like 'x = x - 1' for now but at least I'm being paid to go to the fucking thing
>>
>>56872747
no, sml and the caml dialects are all *fine.

I dont know of any big projects that have been done with them, but I had to do some CS projects in sml and have toyed with ocaml.

not my thing, but fine
>>
>>56872731
Is this really a college classroom?
Do people really believe that fucking frog is hate propaganda now?
>>
File: erroreclipseliquidfun.png (124KB, 882x867px) Image search: [Google]
erroreclipseliquidfun.png
124KB, 882x867px
>Decompile a .jar
>Try to export the .jar
>Get error message

What am I doing wrong?
I need to be able to edit the .jar, but it won't export properly, even before I've edited it.
>>
>>56872747
Modules are sick

>>56872978
Fuck off you fucking derailer
Nobody wants to see your fucking frog bullshit, nobody cares about "the suhjuwuhs" or "hate speech" or whatever.
They just don't like you and the faggots who post frogs.

You are all the fucking same and everybody fucking hates you.
>>
>>56873062
Nice derail.
>>
Is utf-8 a trademark?
>>
File: 1475180203068.jpg (81KB, 528x729px) Image search: [Google]
1475180203068.jpg
81KB, 528x729px
>>56873062
>>
>>56873048
>What am I doing wrong?
Using Eclipse
>>
>>56873048
fix your build path duh
>>
>>56873062

Thanks for correcting the record.
>>
>>56873131
For messing with .jars it's better than Android Studio.
I don't want to learn a third java ide
>>
File: C books.jpg (562KB, 2242x1400px) Image search: [Google]
C books.jpg
562KB, 2242x1400px
Which of these books are any good?
>>
>>56873157
>C
D E P R E C A T E D
>>
>>56873157
>rabinowitz
ironically considering reading jewish propaganda
>>
>>56873178
By what?

>>56873094 >>56873126 >>56873152
>>>/r9k/
Or kill yourself
>you can't or you would have done it already
>>
who
>typedef long long longer;
here?
>>
>>56873240
#define condom namespace std
using condom;
>>
>>56873157
K&R and Unix programming environment
>>
>>56873240
for (poo in loo)
>>
>>56873153
third?
So you basically learned all but the best IDE, congrats.
Besides learning IDE isn't like learning vim or something, it's not that long of a process, and in IntelliJ you can easily use Eclipse or NetBeans key bindings.
>>
>>56873271
fuck off shill

eclipse neon is fucking good
>>
>LLP64
Why is microsoft so shit at software?
>>
>>56873309
still better than google
>>
>>56873321
google uses LP64
>>
>>56873288
Yeah, it's not terrible I guess.
But it doesn't come close to IntelliJ and this is an objective fact.
Your error looks like it has something to do with project settings, that is what's included into project and what's not.
>>
>>56873309
Everyone is shit at software, because computer architecture is fundamentally shit. It's a wonder that anything works at all.
>>
File: landing_olscreen.png (106KB, 534x309px) Image search: [Google]
landing_olscreen.png
106KB, 534x309px
Today I finished coding a script that detects when an email is opened, through the injection of a 1px transparent gif in the body of the email than executes a script in the server when its requested by the email client. Yet, unfortunately, I found out GMail is now serving cached images in their emails. I think now it's only possible to know if the email reached that gmail account, but impossible to know how many times it was opened (or if it was opened at all).

Anyway, is it immoral to track emails in such a way? Couldn't it bee way too "Orwellian"? I'm kinda in a debate. But the information will be very useful to improve the service (it's not a spammy list, only a personalized email that is send to you every 1 month, only if you're client. also you can just unsubscribe)
>>
>>56873348
>through the injection of ...
>is it immoral
Yes
>>
>>56873348
it's immoral and makes you look like shit when the reader finds it
>>
>>56873348
This is a pretty widely used technique in email marketing, except using the normal images used in the emails layout.
>>
>>56873348
I don't understand how that's suppose to work.
>>
I've edited a .jar library, but when I try and use it, it's as if the original is being used.

What is this?
>>
>>56873441
>send an email with a 1px "invisible" pic in the body
>the pic is a remote url hosted on your server
>everytime a person loads the mail you can count a view through file access log
>>
>>56873348
Recently saw a service that does this. They charge you a fee and otherwise show a watermark in the footer.

They integrate it with gmail directly so you see "double ticks" to see when someone read it.

This is the link right here https://mailtrack.io/en/

what a bunch of scumbags
>>
>>56873441
.gif makes animation real
>>
>>56873445
define how you "use" it in "when I try and use it"
>>
this is why i tell mail to not load external content
plain text is superior anyway
>>
>>56873445
refresh/clean/build and check if it's using an old copy somewhere
>>
>>56873519
>this is why i tell mail to not load external content
How.
>>
>>56873348
>But the information will be very useful
It'll be even more useful if you sell it to the highest bidder.
>>
File: proc.webm (3MB, 599x599px) Image search: [Google]
proc.webm
3MB, 599x599px
Playing with Processing
>>
>>56873475
kek my adblocker blocked this
>>
File: dfjsiafdi.png (72KB, 533x727px) Image search: [Google]
dfjsiafdi.png
72KB, 533x727px
>>56873498
I delete the original file called gdx-liquidfun.jar, and copy in the one I've edited.

I click run, and the program runs like normal.

However, the console doesn't display the System.out.println(); test messages I've left in the gdx-liquidfun.jar file.

And when I try and access new methods that I've made, I get 'cannot resolve method,' meaning that it doesn't see the new methods I've created.

>>56873525
I've done all of these, and nothing's changed /:

I've been stuck on this for several days now. I'm losing so much productivity
>>
>>56873533
should be an easy option in whatever client you're using
>>
>>56873551
bad goy
>>
>>56873551
What lists are you using for adblocking?
>>
File: sdl benis.png (22KB, 608x452px) Image search: [Google]
sdl benis.png
22KB, 608x452px
>>56873542

Did you see my sdl tails, processing-san?
>>
>>56873564
I use gmail in browser.
>>
>>56873561
delete the meta-inf folder
>>
File: gtgwrg.png (265KB, 500x500px) Image search: [Google]
gtgwrg.png
265KB, 500x500px
>>56873542
>>
>>56873586
I did not, looks cute tho. I've never worked with SDL. How big is the code?
>>
>>56873542
what is this, anon? can you explain more
>>
>>56873618

Not very big, but I also did it ""wrong"". I've got to figure out how to use actual surfaces so I'm not pushing everything to the renderer.
>>
>>56873609
Here's a special one for you.

>>56873633
It's just a bunch of triangle with randomly generated colours. Mouse's horizontal position determines hue, vertical variation in hue, brightness and saturation.
>>
First person to guess what this is for gets a free puppy

void dsfsdfsdfsdf( CUserCmd * Cmd , CEntity * Local ) {

/* declare shit */
float m_flBestTarget = 35.f;
int m_iBestIndex = -1;
Vector m_vEnd;

if ( !Local ) return;

for( auto i = 1; i <= g_pEntList->GetHighestEntityIndex( ); i++ ) {

CEntity * Entity = ( CEntity* )g_pEntList->GetClientEntity( i );

if ( !Entity || Entity->GetTeam( ) == Local->GetTeam( ) || Entity->GetDormant( ) || Entity->GetHealth( ) <= 0 ) continue;

m_vEnd = Entity->GetBonePosition( 6 );

float flFOV = g_pMath->GetFOV( Cmd->ViewAngles , Local->GetEyePosition( ) , m_vEnd );

if( flFOV < m_flBestTarget ) {
m_flBestTarget = flFOV;
m_iBestIndex = i;
}

if ( m_iBestIndex != -1 ) {

Vector vDirection = m_vEnd - Local->GetEyePosition( );

g_pMath->VectorNormalize( vDirection );

Vector vAim;

g_pMath->VectorAngles( vDirection , vAim );

vAim.z = 0.0f;

if ( IsVisible( Local->GetEyePosition( ) , m_vEnd , Local , Entity ) ) {
if ( ( GetAsyncKeyState( VK_XBUTTON2 ) & 0x8000 ) && GetActiveWindow( ) == FindWindowA( "Valve001" , NULL ) ) {
g_pEngine->SetViewAngles( vAim );
}
}

}

}

}
>>
>>56873600
That doesn't change anything /:
>>
File: 4u.webm (274KB, 800x793px) Image search: [Google]
4u.webm
274KB, 800x793px
>>56873717
>>56873609
forgot pic
>>
>>56873718
Aimbot.
>>
>>56873718
filtered
>>
File: impossibly-cute-puppy-30.jpg (31KB, 200x165px) Image search: [Google]
impossibly-cute-puppy-30.jpg
31KB, 200x165px
>>56873756
>>
holy crap i didn't even notice the last line only has one book and one horse shoe
>>
File: 4u2.webm (18KB, 797x797px) Image search: [Google]
4u2.webm
18KB, 797x797px
>>56873735
another one
>>
>>56873781
>free
where's the FSF(TM) watermark
>>
>>56873718
some sort of hit detection thing for a fps
>>
I want to make an image board, wiki or something else, that works without internet, only on wifi, peer to peer. I found Zyre for desktop/mobile, but I can't find anything that works in a browser.

Do you know what can I use to send and listen broadcast messages on LAN from a browser?
>>
File: 2016-10-01-163230_925x798_scrot.png (108KB, 925x798px) Image search: [Google]
2016-10-01-163230_925x798_scrot.png
108KB, 925x798px
I don;t even understand the question
>>
>>56873858
lolnope
>>
>>56873865
>I don;t even understand the question
>>>/g/wdg
>>
>>56873889
I understand what its asking me but I don't understand the rules about doing so
>>
>>56873717
What did you program it in? That's honestly cool.
>>
>>56873865
Given a grid, represented as a 2-dimensional array of 1s and 0s (1s represent obstacles, 0s represent non-obstacles), and a rectangle placed on the grid with a given width, height, position, and orientation, is it possible for that rectangle to reach the edge of the grid passing through only non-obstacles?
>>
>>56873954
processing
>>
File: 4u3.webm (24KB, 797x797px) Image search: [Google]
4u3.webm
24KB, 797x797px
>>56873844
We're moving now
Make Epilepsy Great Again

>>56873954
Processing 3
>>
>>56873984
>MEGA
>>
>>56873908
the car can move horizontally or vertically

it can not pass through obstacles

if it can drive to the designated parking area, return true, else return false
>>
>>56874178
Not that guy but the question doesn't make much sense to me either
If I start on the left (assuming that 1s are occupied spaces), do I start on the higher or lower 0? (or do I test for both?)
This data set is so small that it's hard to even derive meaning from it, especially since the car is as almost as wide as the entire parking lot.
>>
>>56874178
Graph traversal algorithms time!
>>
I think i may be retarded. I need help learning how to find information.

If i need formal specifications of a particular file system, am i really expected to pay ISO twohundred bucks, else i can fuck off an write another fizzbuzz?
>>
>>56874226
you start so you're aligned with the spot obviously since you can only move forward/backwards along the long side of the car jeez
>>
>>56874305
or rather: file FORMAT, not file system
>>
Simulating a spring in my game
Im self taught, and im actually stuck in it
>>
>>56874361
What is the spring doing? (joining two things together, bouncing the planet, etc)
How are you doing it?
What part has you stuck?
>>
File: last.png (119KB, 1920x1080px) Image search: [Google]
last.png
119KB, 1920x1080px
Still working on my terminal, have some progress.

x is a cool character.
>>
in real life, if you want to figure out if you can put your dick into something, it's not hard to figure out

the car parking problem is similar and it's not hard to understand what they're asking

stop being retarded
>>
>>56874361
Doesn't sound like that should be terribly hard. Model it using Hooks law, or let a force be proportional to to the offset from rest
>>
I have a Java application with 100 balls (actually rectangles for the collision) that bounce of off the screen bounds, and each other

Now it has a for loop that loops 100 times (for each ball) and inside that loop another loop that loops 100 times.
So that it compares all balls to all other balls, so in total 10.000 loops.

Is there a better way to do this, so I don't have to check for collision 10.000 times?
>>
>>56874431
But anon, i always underestimate the girth of my dick.
>>
>>56874484
Look up broad-phase collision detection, even simple shit like grids can reduce it massively.
>>
How do I choose what fields to encapsulate in a data access object? Some configuration data is stored in a database and if I were to encapsulate every field in one configuration data access object the class would become enormous.

tl;dr how do I git gud with data access objects
>>
>>56874508
you're a big guy
>>
>>56874484
quadtrees
>>
Why isn't my quadrtatic equation programming working, it compiles but displays the solutions as "(-nan)ind" for both. Should the roots declared as doubles be floats? I am writing in C btw
#include <stdio.h>
#include <math.h>

int main()
{
double disc;
double a, b, c;
double root_1, root_2;

printf("Please input a value for A: \n");
scanf("%lf", &a);

printf("Please input a value for B: \n");
scanf("%lf", &b);

printf("Please input a value for C: \n");
scanf("%lf", &c);

/*Compute two roots, root_1 and root_2 for disc > 0.0*/

disc = pow(b, 2) - 4 * a * c;
root_1 = (-b + sqrt(disc)) / (2 * a);
root_2 = (-b - sqrt(disc)) / (2 * a);

printf("The solutions for your quadratic equation are %lf and %lf", root_1, root_2);


return 0;

}

>>
File: R6Z7R.png (9KB, 640x640px) Image search: [Google]
R6Z7R.png
9KB, 640x640px
>>56874484
sweep and prune algorithm
>>
>>56874534
try compiling it with
-Wall -pedantic

any warnings ?
>>
>>56874544
>>56874532
>>56874524
Thanks, I'll look into these.
>>
>>56874534
You're not being retarded and inputting a = 0, are you?
>>
>>56874544
seconding

though 100x100 you might be better off with just an n^2 algorithm

depends
>>
File: .png (59KB, 957x1005px) Image search: [Google]
.png
59KB, 957x1005px
>>56874534
I'm 100% sure you entered wrong numbers.
>>
>>56874534
man sqrt
RETURN VALUE
Upon successful completion, these functions shall return the square
root of x.

For finite values of x < -0, a domain error shall occur, and either a
NaN (if supported), or an implementation-defined value shall be
returned.
>>
/agdg/ was no help.
I'm trying to learn OpenGL. My code is: http://hastebin.com/ruvojuvuro.cpp
This compiles just fine, but it's cout'ing the error at line 113, about the vertex shader failing to compile. I'm using this tutorial: http://lazyfoo.net/tutorials/SDL/51_SDL_and_modern_opengl/index.php

Anyone know what I'm doing wrong?
>>
>>56874667
glGetShaderiv also provides compile error messages.
Pass a char buffer and print it to stdout.
>>
File: 1462665702455.png (54KB, 311x311px) Image search: [Google]
1462665702455.png
54KB, 311x311px
>>56874667
>/agdg/ was no help
What did you expect?
>>
>>56874661
>>56874639

Ah my b guys. Thanks. Carry on.
>>
>>56874667
i compiled your code.

after running, yield this

gVertexPos2DLocation error.

>>
>>56874709
I'm not entirely sure what you mean, since I can only pass GLints into glGetShaderiv, but I did try using glGetError, and it gives me error 1281: invalid value at line 116, where I call glAttachShader.

>>56874742
Yes, you're right, that's what I meant to say. The error at line 113 is NOT being written.
>>
File: 201511_1355_eceaf.png (198KB, 500x500px) Image search: [Google]
201511_1355_eceaf.png
198KB, 500x500px
I'm trying to compile glfw but i get external symbol linker errors and i believe i shouldn't have to make changes in a library to make it work...
>>
>>56874925
>i believe i shouldn't have to make changes in a library to make it work...
hah
>>
>>56874913
>>56874667
I fixed it. Turns out I had forgotten to call glCreateProgram.
>>
>>56874526
No enterprise programmers around?
>>
>>56875027
Well, seperate them logically into couple of classes. I don't really see what's the problem here.
>>
>>56875221
I just suck at OOP and design patterns in general. But thanks anyway. I'll just give it a go and see what happens.
>>
>>56874991
Now that I have it working, could someone recommend a book or tutorial for learning OpenGL? I like to make games, and I've been using SDL's renderer up until now. It's really easy, but it's pretty slow.
>>
>This computer science degree is all I have going for me right now and I'm failing an important class. What should I do?

I'm 22 and I've dropped out school for the last five years straight. I don't want to make it six.

I'm 3 weeks into my course and I already feel hopeless. I'm fucking ridden with anxiety because I there's already a big chance I could fail this course and put me behind schedule to graduate.

What got me in this mess is that I transferred from a different school with a very different curriculum.

Basically, I went from knowing how to create classes in Java to not knowing how to implement a simple fucking for-loop in Python.

HOW?

My lab professor is unhelpful as fuck and these people in class seem hostile as shit.

I have no idea what to do but I don't want to go back to changing people's oil for 12 dollars an hour.

Please help
>>
File: Screenshot_2016-10-01_16-08-28.png (175KB, 1920x1080px) Image search: [Google]
Screenshot_2016-10-01_16-08-28.png
175KB, 1920x1080px
Just starting a Wikipedia client for Emacs, and I am about to finish my Blackbox minor mode to censor words in some Emacs documents.
>>
>>56875357
http://learnopengl.com/
A while back I was learning OpenGL and I looked through bazillion tutorials. This one was the best I found.
>>
>>56875429
basic browing
>>
>>56875426
I'm sorry. How much programming do you know?
>>
>>56875430
Thanks anon.
I just wish OpenGL could be as simple and easy as SDL.
>>
I want to create a program that recognises the windows tabs that you have, then allows you to overlay a .png on each window.

It needs to remember what .png to put on each window.
Eg. Chrome has a dog.png overlay, Skype has a pig.png overlay, MyComputer has a fish.png overlay.
You need to be able to click through this.

What language should I use and learn?
I only know java and js.
>>
File: Carron.jpg (33KB, 600x480px) Image search: [Google]
Carron.jpg
33KB, 600x480px
>>56875430
>"awesome face" boxes
>>
>>56875506
C.
>>
>>56875426
Stop browsing 4chan is a good start. Then you buy a good entry level book where no previous programming experience is required on whatever programming language your university is teaching you. Stackoverflow probably has a FAQ/wiki question where the community has a recommended book list. Then the most important part is you actually doing every exercise in that book and not just read it.

Practical hands on approach is required if you want to learn. Oh and don't use a laptop to takes note in class. Use pen and paper. It should trigger your brain to remember shit.
>>
>>56875426
Don't give up hope anon.
It's just practice. Make some simple applications in your spare time to practice the course material.
>>
>>56875506

Why the fuck are you trying to do this?
>>
>>56875537
That information is classified.
>>
>>56875506
lmao what

but C or C++, maybe C# would work now days
>>
anyone have a way to get Cargo working with MSVC instead of Mingw/gcc on Windows? im sure it's not that hard to do but i havent bothered trying yet cause I'm not sure I'll even be using Rust for this project yet
>>56872747
no, it's a very nice language. you should try it
>>
>>56875429
>to censor words in some Emacs documents.
Why?
>>
When you're a beginner, how acceptable is it to see other people's code when doing your own as a reference?

Like "oh I want to do this, but how do I go about it?" etc., but not exactly equal of course
>>
>>56875610
It's probably best if you don't look at other people's implementations when starting out.

You'd benefit more from learning idioms and basic techniques that can be applied anywhere.

Once you wrote something that works, feel free to look at someone elses and see what they did differently.
>>
>>56875506
Anything that can access the windows API should be able to do this. I know for sure C# can because I've made something... kinda similar.
>>
>>56875628
Thanks man.
>>
>>56875556

Then I can't help, despite being an expert at the Win32 api.
>>
>>56875610
Looking at other people's code is a very good way to see "how the pros do it". You can actually learn a lot.
I would say at the very begining it won't give you much, but once you're comfortable with a language, this is a very good thing to do.
>>
>>56875506
I'm not sure what you are trying to do but dll injections and win32api will probably do the trick. You'll need to learn C, C++ or C# (yes you should be able to use platform invoke to accomplish this) and the workings of win32 api. Preferably C++ or C. I googled something quick for you to get an idea:
>http://www.fengyuan.com/article/wmprint.html
>>
>>56875429
emacs kernel and bootloader when?
>>
File: 1447354862669.jpg (62KB, 554x390px) Image search: [Google]
1447354862669.jpg
62KB, 554x390px
>>56875485
I was taking a MOOC on Java programming during the summer and I was able to implement fairly simple classes that worked in unison. Before that I had taken one introductory programming class at my old university which was also in Java. I somehow got bumped up to a second year class called Data Structures & Algorithms and it seems everyone is ahead of me. Not to mention they have taken two programming classes prior and have at least one year experience in Python which is the language we're supposed to use.

I know it sounds like I'm bitching, and I am, but I'm honestly willing to do whatever it takes to make it.
>>
>>56875532
Thanks man. I won't. I just needed to vent I guess.
>>
>>56875426
there is a lot of negativity in 4chan, particularly in these threads

as >>56875525 says, leave 4chan and read a book. python.org has one... it's quite good imo

python is fun and can help you build lots of things easily. use that as a motivator, which is what you need.
>>
>>56875708
First of all you should realize that there is no replacement for a missed year. University is a full time job. You should not be taking second year classes.
>>
>>56875659

GTP, at what point in your life did you decide "I am going to be an expert at the Win32 API"?
>>
>>56875606
I expressed myself like shit, it is a letterboxing-mode, you select a region, press the keybind and the region becomes letterboxed.

I use emacs at work and I want to hide some info to avoid snooping.
>>
>>56875506
>>56875537
>>56875556
seems quite obvious, seen that someone has been asking "how to make a virus" for a while...
IMO, that's the wrong approach, though :P

>>56875610
depends on the code. say you are learning C. want to take a look at the standard libs? yes. some random lib? no
>>
>>56875708
>Data Structures & Algorithms
It is in a lot of ways among the harder classes for newbie programmers.
To pass the course, every time you learn about a new data structure or algorithm in class, implement it yourself in python. Don't give up until you've done it, it'll feel like banging your head against a wall for a bit, "ahh what the fuck was the loop syntax again?!"... But you just have to stick it through somehow. Hopefully if you do it this way you'll be learning the algorithms and data structures in depth, and memorizing python syntax out of necessity as you code them up.
>>
>>56875735
I'll definitely do that. If I may ask, do you think it's possible to pass the course? I've effectively missed two lab assignments worth 7% of my total grade because I was being an idiot. I'm wondering if I should still try the lab assignments or put all my effort into learning python from the ground up from the resources you guys recommended?
>>
>>56875792
>I've already missed 7% of my grade I wonder if I should miss more
Hmm...
>>
>>56873718
garbage code desu
>>
>>56875708
>Data Structures & Algorithms
This class is not only designed to learn people about datastructures. It's also designed to weed out people not fit for programming and some universities put it very early into the education to save everyone money and time. I got it the second semester (4-6 months into the education). I only had a total of 10 weeks full time programming courses before I got this class.

We had two tracks. One track could choose Java as their main programming language the first 1.5 years. The other one did C. Since pointers are a natural thing in C it meant that people doing C were better prepared for this course. Some 80% from the Java track dropped out after taking this course. About 40% from the C track dropped out.
>>
hey guys i kniw i should or could post thos question in sqt but i know ruby posts in here more often and I quite trust her and you guys more than someone that might have. encountered mu same problem.

Alright so my friend was looking for a way to make money and bought some storage containers. Said he found a lot of computer stuff but that this one, he wasn't able to fix/figure out and so he gave it to me. I was given a macbook pro, the 2013 model, and it looks fine, I can replace the cables and such, but the same apple id problem has just come up. I no has.

So having said that and
>inb4 give it back jamal
is it still unpossible for me to recover any prospects of making this a useful device in my home? Could I somehow sodder in new parts, flash the bios and run a linux machine out of it without the problem of having to do so from inside the current runtime?
>>
>>56875850
>We had two tracks. One track could choose Java as their main programming language the first 1.5 years. The other one did C.
hmmmm
>Some 80% from the Java track dropped out after taking this course. About 40% from the C track dropped out.
hmmmmmmmm
>>
>>56875767
Probably around the time he decided to be a massive faggot
>>
>>56875767
Probably when he decided he wanted to become a hackhurr and make a keylogger to get his sister's nudes. Otherwise becoming an expert at win 32 api is not by choice.
>>
File: g_sorry_im_retarded.jpg (51KB, 478x320px) Image search: [Google]
g_sorry_im_retarded.jpg
51KB, 478x320px
>>56872731
I am practicing my coding in C# and am working on code that recursively calls itself to get the smallest number of an array.

I am wondering how do I recursively call this function while passing through ridVal with -1 array slots. Whenever I try to add somthing like

riddle(ridVal[ridVal.length -1]);
I get an argument error cannot convert from int to int[].

How do I pass a shorter version of ridVal through?
>>
>>56875792
>>56875810
Yeah what other courses are you taking at the same time? If you quit life for a while you might make it maybe. A huge maybe. Assignments don't typically get easier.
>>
>>56875896
In the end there were less than 40 people graduating of 200. It was a math heavy computer science bachelor. The dropout rate was so bad that the university eventually a decade later went full C# everywhere and made it pajeet friendly. Now I'm ashamed to display that university on my resume because it's no longer a sign of people knowing what they are doing.
>>
File: VkkHRvO.jpg (26KB, 365x550px) Image search: [Google]
VkkHRvO.jpg
26KB, 365x550px
>>56875927
I was anticipating that this class would take a lot of my time so I took no other science classes this semester. So English, History, and Econ. I'm going to brute force my way for a chance to pass but either way I'm not give up if I eventually fail. I won't accept that I'm not meant for programming
>>
>>56875979
>give people a choice they are not qualified to make
>one group is severely disadvantaged
sounds like a quality university
>>
>>56875924
>ridVal[ridVal.length -1]
Not sure how C# arrays work etc but here you select the last element in the array and that is certainly not an array in this case.
>>
>>56875998
There's actually a test developed to determine if you're meant for programming or not.
>>
>>56876005
Java was the hip shit back then everyone had to do. All universities did this except the top 10 world. My university was in the transition from going from a good one to a bad one.

Just like many universities use python now because it's hip. Not because it actually teaches you a good foundation.
>>
File: alg.jpg (62KB, 872x290px) Image search: [Google]
alg.jpg
62KB, 872x290px
>>56876045
>Not sure how C# arrays work etc but here you select the last element in the array and that is certainly not an array in this case.
I think you may be right and I'm retarded.

I am trying to write this psudocode out (I want to follow it in the debugger for a better understanding of the trace) and cant for the life of me understand how to
> else temp <- Riddle(A[n-2])
Do you just make a temp array, set it to 1 less the length of the one passed in the parameter and then copy the content of the array passed in sans the one on the end?
It feels like there has to be a better way!
>>
>>56875998
Starting over at year 1 next year might be an option. But never stop programming or you are going to forget. Keep doing a hobby project or something.
>>
>>56876005
Or could it be that, the people that picked C were actually the ones (mostly) that took this shit seriously.
And those that picked java, even if they would be forced to learn C they would drop out nevertheless, because they just came to CS cause they heard of $$$ or some shit like that.
That's my theory anyways.
Of course we're talking statistically. There are good, serious java devs as well as there are scriptkiddie-tier C devs.
>>
>>56875524
>>56875560
>>56875630
>>56875677
I might try C#, I still have nightmares from trying to make 3D games in c++ as my first experience programming.
>>
>>56876104
I went from Python in our Intro to Programming course, to C++ in our second programming course: OOP. That was a bit of a shock in terms of workload.
I'm sure if i hadn't had a little prior experience with C++, i wouldn't have made it.
>>
>>56876081
show met t his test plz.
>>
>>56875924
First of all. You can just set one breakpoint and then press "step through/over/into" to go to the next line etc.

Second. That's not how you'd normally do it C#. What you are doing is more of a functional programming approach. Something like this would be more normal:
int min = Int32.MaxValue;
foreach (int n : intArray) {
if (n < min) min = n;
}
return min;

(Excuse any mistakes I can't be bothered checking it.)

Third. If you insist on doing it recursively, I wouldn't try to pass in a shorter version of the array, but instead just add an index to the call to show how far into the array I am. If you do decide you want to make a shorter version of the array and pass it it, you're going to want to use Array.Copy. Something like this:
int[] shorter = new int[ridVal.Length - 1];
Array.Copy(ridVal, 1, shorter, 0, ridVal.Length - 1);

(Again, can't be bothered checking if it's correct.)

as per https://msdn.microsoft.com/en-us/library/z50k9bft(v=vs.110).aspx
>>
>>56876133
What distinguishes a scriptkiddie-tier dev?
>>
>>56876207
www.isitchristmas.com
>>
>>56876124
>Do you just make a temp array, set it to 1 less the length of the one passed in the parameter and then copy the content of the array passed in sans the one on the end?
>It feels like there has to be a better way!
If you intend to make a temporary array and not use pointers/iterators the underlying mechanism (standard library) will whether you like it or not create a new array and copy the elements over.
>>
>>56876214
whether the only language they know is Java. (to a lesser extent, other languages apply here). also if everything they write is copy-pasted
>>
>>56876207
https://blog.codinghorror.com/separating-programming-sheep-from-non-programming-goats/

This is where i heard about it.
>>
>>56872731
writing Go backend for a Go talk
every time I create a .go file I remember how fucking cool this language is

and don't start with the Go-Rust-meme language war, I don't fucking care about any autistic wars or judgments like "hurr durr my language is better 'cause this, that, 'cause I can wank more cocks concurrently"
>>
>>56876214
Writing scriptkiddie-tier code.
>>
>>56876262
danke

will post some code after i read this
>>
>>56872731
wtf why are they teaching kids about pepe?
r9k has become the new /b/
>>
I'm trying to research an algorithm to find whether or not a function is periodic the periodicity. I found the "tortoise and hare" algorithm but it looks like it'll only work if they land on the same address.
>>
>>56872850
cuz programmers/IT folk in general are retarded?
>>
>>56876257
Doesn't this make a scriptkiddie-tier C dev an oxymoron?
>>
I found this, did this years ago.

http://pastebin.com/63rYiScz
>>
>>56872737
extern "C"
{
}
>>
File: 1386947299446.gif (903KB, 300x200px) Image search: [Google]
1386947299446.gif
903KB, 300x200px
>>56876210
>>56876222
Thank you both for taking your time to answer my questions!
I'll look over what you posted and try to improve my code, and the way I code!
>>
I started working on a program to encode QR codes from scratch, but then I realized how complicated it would be with polynomial arithmetic and I gave up.

Also:
I want to include a c++ library in my program but the compiler won't find the header.

Even when I include the full path and have exported the library to the same folder as the file I'm trying to compile. What's wrong?
I don't have specific code to show, but I've tried this a few times in the past.
>>
>>56876217
What the fuck is wrong with people?
Surely, this would be a javascript one-liner printing NO if date isn't equal to DEC 25.

There's over 1000 lines of javascript in here not including the jquery boilerplate.

>>56876262
>if you're not born with the knowledge that C-style languages assign right to left, you're not gonna make it
i hate this test
>>
>>56876308
pretty cool

as a recent html noob myself, i appreciate this.
>>
Should I learn C#?
>>
>>56876298
how so? I only know a handful of C programmers who know a second language
>>
>>56876344
the .lib file is at the path? debugging make systems is a horror i rather let other people do
>>
>>56876345
>i hate this test
You missed the point. It says half the students came up with a consistent mental model of how assignments work, even if they were wrong. So if you consistently tried to assign left to right you'd be put in the "can program" box.

>>56876358
>Americans are so silly they can't even learn a second programming language.
>>
>>56876345
>if you're not born with the knowledge that C-style languages assign right to left, you're not gonna make it
How do you explain the correlation then?
>>
>>56876357
The syntax is nice. C# programming in visual studio is very pleasant. Linq is awesome. Can easily interface with C and C++ binaries. But if you should you learn it is up to you.
>>
>>56876357
no
>>
>>56876345
that's now how the test works. it doesn't test your specifical knowledge but your ability to form a consistent mental model. you could answer every question wrong and still score high on the test.
that's what makes the test interesting, imo
>>
>>56876382
>>56876391
What is the best language to get a job?
>>
>>56876410
English, I suppose
>>
>>56876410
Chinese, i've heard. Many international companies find Chinese speakers valuable.

Although i suppose, being the de facto lingua franca in the world, >>56876415 is correct.
>>
>>56876367
probably because they taught C (or a similar language) in those classes. there's also the knowledge that "=" means assignment and that variables can be assigned multiple times in C. and the "int" keyword alone probably makes it even more confusing. people who thought the same way that C programmers think did well here. if they switched to a language very unlike C, they'd probably show the same groups meant the reverse. a person who scored high on this test might be an incredible APL programmer.
>>
>>56876473
You didn't even read this article, did you?
>>
>>56872731

Is Zed Shaw C the hard way a good book to start with? I have previous experience with C, Assembly an a little python...

I'd really appreciate if you recommend me other books to learn from example/practice. I don't want anything too complicated my final goal is embedded software development
>>
>>56876532
no, start with k & r
>>
>>56876532
There is only one C book and it's K&R.
>>
>>56876532
>C the hard way
NO
>>
>>56876526
building a consistent mental model when you can't comprehend something at all indicates very little
>>
>>56876557
(this is also the reason there were people who just left questions blank)
>>
>>56876532
The only book you need is the C standard.
>>
>>56876273
why is creating a go file cool
>>
>>56876532
"Learn C the hard way" Is absolute garbage.
>>
>>56876596
dunno, like same reason for which doing package structure architecture makes you feel good
>>
>>56876557
On the contrary, it indicates a lot. Perhaps even more than if you have full comprehension.
>>
>>56876603
>>56876545

Could any of you guise explain why is it so bad? I'm halfway through I've found it helpful in some basic topics, and also very practical it feels like you set up from the bottom..
>>
>>56876603
why?
>>
>>56876587
not really true.

I'm not sure if there are any books about it, but setting up an environment in which to develop C is a beast unto its own.
>>
>>56876636
if it makes you understand C programming, just read it and leave other people's opinion out of it.
'cause, you know, it's other people's opinion, who gives a fuck
>>
>>56876658
I've not seen one (one) document that properly describes the C memory model except for the C standard. So you might as well stop wasting your time and read the C standard.
>>
>>56876636
http://rbt.asia/g/?task=search&ghost=yes&search_text=zed+shaw+tell

I can't be bothered to explain this over and over.
>>
>>56876636
>>56876649
It's "copy my poorly explained code: the book". It does a terrible job of explaining anything, and is filled with things that are factually wrong.

http://hentenaar.com/dont-learn-c-the-wrong-way
has details about those things which are factually wrong.
>>
>>56876557
>>56876473
>probably because they taught C (or a similar language) in those classes.
In the article it clearly says that subjects of the test were people that have never seen any code in their lives, and that it is targeted at exactly those people.
So if you have seen how the C assignment works then you're not eligible for the test.
>>
>>56876707

"The test was administered twice; once at the beginning, before any instruction at all, and again after three weeks of class. The striking thing is that there was virtually no movement at all between the groups from the first to second test. Either you had a consistent model in your mind immediately upon first exposure to assignment, the first hurdle in programming – or else you never developed one!"
>>
>>56876680
I'm not saying you are wrong in suggesting C standard. but it doesnt contain all of the information you will need to actually start writing C.

>compilers
>make
>debuggers
>valgrind
etc....
>>
ok, so what do after I learn a language's syntax and standard libary
how do I make a real program that isn't 100 LOC tier
something like st or bspwm
>>
>>56876704
Aint nobody gonna read all that nerd shit.
>reading a book about why not to read another book
>>
>>56876766
You have to find a niche and corner the market.
>>
>>56876766
You make a 200 LOC tier program. Then you make a 300 LOC tier program... And so on. Just do. Don't think.
>>
>>56876766
I find that the next step on the path to making useful programs is learning how to interact with the os and hardware.
This is almost always lacking in programming education until much too late.
>>
>>56876754
Well, that just proves the point..
Non-programmers-never-seen-code-before took the test, and half (or whatever) of them failed, and even after seeing code and learing about it they still were failing. The second test was just there to check how the test results correlate to ability to learn programming. It proved it to be pretty accurate, so you can now give the test to any non=programmer-never-seen-code-before guy, and if he fails, then he most likely won't be a good programmer.
>>
>>56876812
>programming
>don't think
>>
>>56876636
You are absolutely right. It IS indeed because it expects you learn from the bottom up rather than recursively, where you learn a word, prohibit the entailed structure from executing and then apply on return. It assumes that the efficiency is an application itself rather than an after thought of the matter.

People will call it bad because it doesn't give them that immediate satisfaction of "i've made a constructor" ( though, they could have it regardless ) whereas programming should be learned as "I have more than just numbers and letters now".

To touch on that a little more fairly, though, the book doesn't share with you the insights from any level above or below the language, so you end up with the understanding that you've done something efficiently but don't understand why. You could troubleshoot to solve that misunderstanding but could still ultimately end up with a similar answer using flawed reasoning, as in creating sorting algorithms. You could be making a quick sort and applying your operations in the wrong order, which increases the possibilities at compilation time, which increases entropy, creates strange threaded branches and bogs down an array pushing process by having it return mid expression because you gathered your variables out of order.

That kind of thing could create a false sense of understanding and create many more python scripters. I haven't really read the K&R book, unless it's the one that switched to ANSI C in the second edition, ( though it may have been the 3rd book I had open while reading ANSI C and 21st Century C ) but I do know that language designers model around the realities we already have experience with. It's the ones that do the fixing of the language that generally make efficiency changes on an interface that they have not presented, typically due to publishers or corporations asking them to keep to their logistics for fear that the facilitating system be considered too helpful.
>>
>>56876761
If you need all this, once you are done reading that book look up 21st century C.

It's literally covering everything anon here mentioned except for the basic syntax of the language.
>>
>>56876473 Raises an interesting point though. It is conceivable that the syntax of the questions is relevant to the ability to grasp a mental model. You could maybe change the syntax and a different subset of test takers might be favored, simply because a different visual syntax might spark different neural activity. Language influences the way we think.

Remember in algebra class when people had finally stopped panicking and figured out how to perform the steps to solve for x, and suddenly they were asked to solve for y and they were completely stumped.

I believe different thought patters favoring different languages and syntax is also why /dpt/ thinks that everyone elses programming language is shit, and why people keep confusing design paradigms with language constructs.
>>
Is it bad to use protobuf serialization for IPC? I have something spitting out around 10 messages a second. It will eventually run on an embedded system with limited resources.
>>
>>56876707
that's not what I'm saying. I'm saying these people did well in C, Java, C#, etc. classes after the test
>>
>Putnam and others found that novices’ misconceptions about the capabilities of computers could
have a massive negative impact on their success at programming [26]. Many of their subjects tried
to use meaningful names for their variables, apparently hoping that the machine would be able to
read and understand those names and so perceive their intentions.
>>
>>56877062
I did this in moving from Basic to Java. Then realized that I could still do it in Java, I just didn't know how to call the standard library. I also may have assumed a custom class that my hs basic teacher may have made for our projects.
>>
>Pennington looked at the way that expert programmers understand problem domains and programs
[24]. He found that, despite the admonition of the computer science establishment to construct
programs top down, experts build them bottom-up.
>>
File: 1265251399117.jpg (39KB, 450x268px) Image search: [Google]
1265251399117.jpg
39KB, 450x268px
>C++11
>create a lambda that sums two ints
>assign it to auto a and print it to the screen
>it compiles to std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)
what happened to c++?
>>
>>56877094
>I also may have assumed a custom class that my hs basic teacher may have made for our projects.
?
>>
>>56877062
>Putnam and others found that novices’ misconceptions about the capabilities of computers could
>have a massive negative impact on their success at programming [26]. Many of their subjects tried
>to use meaningful names for their variables, apparently hoping that the machine would be able to
>read and understand those names and so perceive their intentions.

>naming your variables full words
>expecting the computer to be able to read what you're calling your variables
literally retarded, yet people here do it all the time when naming their variables. just name it a letter, christ
>>
>>56876704
https://zedshaw.com/2015/09/28/taking-down-tim-hentenaar/

Man, Zed's one salty motherfucker
>>
File: nncmpp.png (11KB, 627x460px) Image search: [Google]
nncmpp.png
11KB, 627x460px
>>56872731
MPD client.
>>
>by default java runs .jars using a version of java.exe that doesn't open a command window
fucking why?
This just makes it harder for people to use/test/anything else .jars, but it also means that idiots can be tricked into running something that will by default be completely invisible
>>
>>56876262
Sounds like it tests whether people can reflect on the position/posited noun.

This is why I make sure to let people know right off that amount, value, quantity and number are all very different things when used in real math. An amount is aggregate, a value the result of a process, quantity an arbitrary value and numbers the meaningful aparatus through which we bridge the connection between our biological faculties and our logical ones.

Make sense?
>>
>>56877161
templates happened
>>
>>56877095
how can you build a program top-down? do you just not compile it until it's complete? or am I misunderstanding their definitions for top and bottom here (bottom = things lowest in the dependency tree)?
>>
>>56877001
I've actually read this aswell, and it is very helpful at least in pointing you in the right direction.
>>
>>56877253
>how can you build a program top-down? do you just not compile it until it's complete?
i did that for my derivative program. had to spend about half an hour fixing bugs but i got it working after having worked on it about 30 minutes a day for 5 days
>>
>>56877253
>how can you build a program top-down?
Start by laying out the overall structure, the classes, their methods, etc... without actually implementing any of the methods until you've laid out the entire program. I do it sometimes. You still want to implement and test each piece one by one though.
>>
>>56877169
Experienced programmers don't name their variables for the computer to read, you knob. They name them for themselves and other collaborators or future maintainers to read.
>>
Finally buying an iThing. I have experience doing Android dev and I'm good at quickly learning things. Is it worth getting into freelance iOS dev? How saturated is the market?
>>
>>56877169
>just name it a letter, christ
Found the non-programmer.
>>
>>56877169
>expecting the computer to be able to read what you're calling your variables
Your computer never reads your variable names, all it sees are 1's and 0's. Are you retarded?
>>
>>56876823
This very true. I still haven't gotten around to messing with ASM seriously because I can't find any good information on how to access hardware, out of windows, using only C. I feel like I don't have the "proper permissions". I know the hardware IDs can be grabbed using bash or checking the device manager aaaannnnndddd that I can write to any program that accepts input or outputs, albeit writing to is practically surgery, but you'd think a developers environment would leave the above-kernel interface as optional if one is expected to write code that will treat the advances in the tech as such and not as "error padding".

Like, I know this is why namespaces were created, but since C hasn't adopted any of these namespace practices why can't we have a little more hardware clarity? I can't imagine it's anything more than political bullshit like ">C89 can run on any intel/amd based processors".
>>
>>56877169
lmao i hope youre trolling else gtfo
>>
>>56877378
actually, all it sees are symbols which map to a memory offset table.
>>
business idea: learn japanese and use japanese characters in scheme programming to RP as an advanced futuristic hacker
>>
>>56877417
I fail to see the 'business' in this idea. Sounds fun though.
>>
I've just learned a new word.
https://en.wiktionary.org/wiki/invidia#Latin

I find this somewhat amusing.
>>
>>56877493
it's a meme from /brit/. you should join us! >>>/int/brit /brit/ has some of the best memes
>>
>>56877559
Explain this meme to me.
>>
>Later, Johnson-Laird put forward the theory that individuals reason by carrying out three funda-
mental steps [14]:
1. They imagine a state of affairs in which the premises are true – i.e. they construct a mental
model of them.
2. They formulate, if possible, an informative conclusion true in the model.
3. They check for an alternative model of the premises in which the putative conclusion is false.
If there is no such model, then the conclusion is a valid inference from the premises.


Did they just describe the scientific method?
>>
I've been writing Android games in Java.
I know some niche libraries and about game related code.

I know almost nothing else.
Is this a negative to employers? I assume that with the thousands of libraries, whatever task you're employed to do requires initial learning.

I don't have the interest to read a book or learn anything that I do not currently need to know.
>>
>>56877589
you say something that may or may not be a business idea, but is something you intend to do. such as, business idea: have a wank. or business idea: have a poo. you can also use it the same way it used to be used which is something like
business idea: have you and a friend each put 20 dollars in a box, sell him the box for 30 dollars, and you each walk away with 10 extra dollars
>>
>Be 14yo 'hacker'
>Change the family computers cursor icons to a blank transparent image
>Can't see cursor anymore
>Parents and sisters are upset the computer is broken
>I save the day by navigating using just the keyboard and fixing it
>The story of how I hacked the computer virus is now a legendary story that's mentioned several times a year by my family
>>
>>56877417
How much do you enjoy pressing alt+shift?
>>
>>56877168
Err I meant to say I may have taken his custom class from BASIC for granted in the Java class.
>>
>>56877655
And how did this become a meme?
>>
>>56877728
But basic doesn't have classes.
>>
>>56877253
It's building according to the structures and using only signatures. Prototyping, essentially. You may have heard it brought up while learning about something called "Test Driven Development".

Essentially you draw out a bunch of squares and fill them in with more little squares. Each square is a class/package or namespace and in them you describe the functions and classes to be used in the program. Then when you have your empty "buildings"/structures, you fill them and connect the more discrete processes together using streams and concurrency.

You're basically building the box for it all to fit in, including all the size limits in this one large box, then filling it with your things second to make sure you can even fit that many of those things in your box(es) and then you work out the operations between buffer and structure and then structure to structure.

That's top down, and it's usually done so to be bridled with other economic, political and natural factors like urgency.
>>
File: 1469995515113.png (32KB, 271x243px) Image search: [Google]
1469995515113.png
32KB, 271x243px
I want to regex a URL to make sure that the URL being parsed is a subdomain of the primary domain. For Wikipedia, it would be
https?://([a-zA-Z]{0,}[.]?)*wikipedia.org/?([a-zA-Z]{0,})?

How can I change this so that the far right-hand side of the regex will accept literally any number of characters of any type? Currently it terminates at any non-letter character (obviously) but I can't find anything for "subset of all characters" on any regex tutorial sites.
>>
Are you ready to statically compile a whole OS into your C++ programs /g/?
https://www.youtube.com/watch?v=t4etEwG2_LY
http://www.includeos.org/
>>
>>56877858
got it, I just had to make it
https?://([a-zA-Z]{0,}[.]?)*wikipedia.org/?.*
>>
>>56877858
.*
>>
>>56877858
>>56877891
What language is this anon, and what is it generally used for?
>>
>>56877749
the "business ideas" people proposed started gradually becoming less and less like actual business ideas
>>
>>56877891
>{0,}
*
>[.]
\.
>>
>>56877914
It's a regex (regular expression), it's a format for checking whether or not strings are in a particular format (for purposes such as normalization).
I don't know exactly how it works, but many languages offer a ton of really useful tools that work with regex (like replacing any instances where are regular expression is true or false), etc.
It also lets you catch a lot of errors before they happen, like folks inputting invalid file names
>>
>>56877773
Well that entity model then. I recall getting an object and calling the dot operator for a lot of functions like "change direction" and "setVisible".
>>
>>56877858
Your expression is pretty fucktarded. For instance:
>{0,}
Why? Why would you do this? This is literally *.
Why do you have the subdomain period in a character class? Why is it marked optional? Your expression matches
http://fuckwikipedia.org
since the period is optional.
https?://(\w+\.)*wikipedia.org(/.*)

Possibly domain names have a wider class than \w, but I don't care enough to check the spec. Presumably [-_\w] is a good start.
>>
>>56877977
>>56877811
lol I just got two trips in three consecutive posts.
>>
>Told that there were three groups and how they were distinguished, but not
told their relative sizes, we have found that computer scientists and other programmers have almost
all predicted that the blank group would be more successful in the course exam than the others:
“they had the sense to refuse to answer questions which they couldn’t understand” is a typical
explanation. Non-programming social scientists, mathematicians and historians, given the same
information, almost all pick the inconsistent group: “they show intelligence by picking methods to
suit the problem” is the sort of thing they say. Very few, so far, have predicted that the consistent
group would be the most successful. Remarkably, it is the consistent group, and almost exclusively
the consistent group, that is successful.
>>
>>56878022
trip trips
>>
>>56877977
Either i'm being stupid or you're talking about Visual Basic, not Basic. Although i didn't know VB had classes.
I'm certain Basic doesn't, though. It's too old and, well, basic.

Your story illustrates, though, why i don't like it when they try to make things easier for newbie programmers by giving them custom frameworks to work with.
>>
>>56872822
Oh I know how to do this except in java

use java.awt.Robot

consider spawning it from python with a batch script or something of that sort, I did that when working with CSGO triggerbots
>>
How do the libc headers even work? I've taken a look through a few, and 90% of it is preprocessor definitions and macros that don't seem to actually do anything
>>
>It now seems to us, although we are
aware that at this point we do not have sufficient data, and so it must remain a speculation, that
what distinguishes the three groups in the first test is their different attitudes to meaninglessness.
>>
>>56878295
There are all sorts of feature test macros and other shit trying to make the headers work on an many systems as possible.
They're a fucking mess, and you're probably better off not reading them.
>>
>Formal logical proofs, and therefore programs – formal logical proofs that particular computations
are possible, expressed in a formal system called a programming language – are
utterly meaningless
.
To write a computer program you have to come to terms with this, to accept that whatever you
might want the program to mean, the machine will blindly follow its meaningless rules and come to
some meaningless conclusion
>>
>. In the test the consistent group showed a pre-acceptance of this fact:
they are capable of seeing mathematical calculation problems in terms of rules, and can follow those
rules wheresoever they may lead. The inconsistent group, on the other hand, looks for meaning
where it is not. The blank group knows that it is looking at meaninglessness, and refuses to deal
with it.
>>
what is this guy doing
>>
>>56878359
yo momma bix nood
>>
Where are the heroes in Victorian literature? Is heroism still possible in the modern world, where epic conflict seems a thing of the past, and where material comfort and quotidian concerns preoccupy the masses?
>>
>>56878383
Can you please fuck off?
>>
>>56878011
thanks anon
>>
How do I calculate the entropy of a random series of bits? For example, what's the entropy of 11010010111110?
>>
>>56878422
The subdomain part should probably just be
([^/.]+\.)*

. The bit in brackets is "all characters except dot and slash".
>>
File: lotto.png (82KB, 641x765px) Image search: [Google]
lotto.png
82KB, 641x765px
Extracing lotto numbers from arbitrary text.
It's quite challenging, as some random dates in the same line can fuck you over.
>>
>>56878459
2^14 possible permutations
>>
File: lost in the sauce.jpg (92KB, 629x419px) Image search: [Google]
lost in the sauce.jpg
92KB, 629x419px
>>56878480
can someone explain to me how regular expressions can be so powerful but also be so quick?
>>
>>56878481
Yes, but that isn't entropy

This has nothing to do with passwords, btw
>>
>>56878511
>>56878511
>>56878511
>>56878511
>>
>>56878515
define entropy first then
>>
>>56878583
I suspect if he knew how to define entropy hew wouldn't be asking how to calculate it.
>>
>>56878583
The amount of unpredictability in the data, i.e. the theoretical minimum compressed size
>>
>>56878630
Well if someone asked me to guess a number I definitely wouldn't say 11010010111110, so it's pretty unpredictable.
>>
>>56878823
That's a contrived example. I need a way to estimate the upper bound of how much I can compress binary data
>>
Java is a training wheel language for learning OOP, for people who are afraid of memory management and pointers.
>>
>>56873718
looks like a bot that plays in an fps like world, or at least references a 3d simulation.
>>
>>56873865
Hint: I can understand it

NOT
>>
>>56874305
Formal specifications meaning the different constructors and their parameter listings or actual explicit language and code?

The former I don't think is a problem and may be an easy google with the right words, the latter might be worth 200 bucks.
>>
>>56879030
>Formal specifications meaning the different constructors and their parameter listings
What good does that do? That doesn't tell me how to implement the constructors.
>>
>>56875708
Okay you noob. Read this post and see if it makes sense.

Your computer is a box. Physically anyway. Now if we keep to this simple idea that it is a box the rest will make sense.

You have your box, and in this box you carry the potential to describe just about anything. To describe anything between distinct entities, you need a language. Once you have your language, you need a reasoning clause to carry your language. Java happens to be Enterprise Standards. Python happens to be the Interface.

When you learn the syntax to a language, you learn how to place "blocks" of information about the process as a way to describe limits and encapsulations, as well as operations. These blocks keep the current of information from being disrupted and allow you to keep a reliable track of it all. Shaking the machine in any physical sense won't damage the data as it is stored. And although breaking a side on the box may make the data inaccessible, the data is still not corrupted. Pointing at it, yelling at it, spitting at it, cussing at it, anything barring presenting another random electrical signal or inducing an electrical reaction using magnets or something will not mess with this data. Knowing that data will not change by any humanly physical means we have taken to pin point electrical charges to temporarily/"permanently" store any variety in the system. These varities exist and are referred to in/from data tables stored in memory as you already may have guessed.

That's about what they have in common. The difference in these boxes comes in the form of algorithms and data structures. Sometimes computers hold a lot of info and sometimes they hold none. The kind of info they hold is determined by the process, the kind of structure used for this data is also determined by the process. Now here is where it gets tricky so bare with me. Also, I may have to cont. post.
>>
>>56879094
A programmer can easily build up to that if he understands the system processes?

I'm saying if you need to work out some drivers you could black box the input output cycle or just look around for some open specifications and take a guess at the proprietary one.

Anyway, I was asking which you wanted.
>>
>>56879224
Considering that this is electricity and electricity is chemical, and chemicals have a weight and density, we can be sure that the data does in fact move, but we have placed some ingenious limits on the matter and can affront to move it more precisely. We do this by executing expressions that manage operations over the data. You already know that, though, so let's move on. Considering that electricity is chemical, you may be able to infer that chemicals interact with gravity and have a sort of "float"ing quality to them. Keeping this in mind, you'd think that tipping the box would move some of the data even only at the atomic level but they don't, and so our unsorted data table may be a mess to siphon through with having to return the wrong ones after pulling them out and then having to hold this one while you move that one up. Anyway, you get the picture. What we have then in place for this kind of thing is algorithms. These algorithms basically define a general direction for the flow of the data. Lemme start a new paragraph.

Okay, so you have an array that has electrical values that after compilation will be tantamount to [ 1, 3, 5, 7 ].

Tip the box to the right and the the values will stack up in descending order and will be most readily accessible from smallest to largest. If we tip it over to the other side, the laws of physics won't safely apply themselves here and we will keep our order, it will just appear reversed because we switched the Current top and bottom.

Well, what if we want to access data in an opposite way? Well, we have to set the traversal of the array and the access and mutation operations in an order that most cleanly follows the principles of the chosen algorithm. This means that the quick sort where I move all the big pieces to the end of the array involves picking up my current value with intent to move it further down the array if it just so happens to be a greater value than the subsequent element.
>>
>>56879243
Specifically i want the full specification for the MP3 format so i can implement a playback decoder.
>>
>>56879356
This then means that if my array works with direction, it should only work in one direction at a time and that direction should generally speaking be the direction of the process. Sometimes direction isn't always up down left right. Sometimes its a class act.

And yes the other students are always hostile towards normies. Just try to be meek, leave the schaudenfreude at home, and ask a lot of questions. Trust me, they already did the reading, will do it again this time. Just get all the info you can. Or come on here and ask more questions. So yeah, make it follow the general direction. Merge sorts literally work like binary tree traversals. Root, left branch, left branch position + 1, left branch position + 2, right branch.

It's just about seeing the process as a general tendency. Pick up heavy thing with legs, once heavy thing is hoisted continue piling on back. The general tendency here is that heavy things require an extra base and if things need piling do it after the basic foundation is set.

A lateral explanation for this would be get your heaviest elements to the end and then start piling on the smaller ones.

I don't want to supply you with something you can be a pedant about so I'll keep it this general for now.

But most basically, look at the general principle for the algo and then look for a way to grok the process in parts and try to assign the duty/role of those parts to the limited number of operations used in creating algorithms.

In the first quick sort the base foundation is moving the highest value(s) to the end and then the piling happens after that.

I mostly brought up the electricity and chemical nature of the data so you could try to imagine "doing" something to the box like leaning it over, kicking it, flattening it, cutting it, etc. and then try to imagine the data inside bouncing around if you can't yet simply supply an underlying action yourself.
>>
>>56879377
Have you tried using meld on two mp3s? You could take the similar lines and try them out as a wrapper.
>>
>>56879462
I don't even know what you're talking about, but you seem to be suggesting i perform science on files to reverse engineer and deduce the coding.

I have neither the patience nor skill to do that. The exacts specifications exist, and the patents have (mostly) run out.
>>
>>56878205
Thanks Anon, but I would prefer to avoid Java entirely.

My current approach is through Wscript (since it's a Python program designed for Windows only), with this function called in a thread:
def Keys():
time.sleep(15)
shell = win32com.client.Dispatch("WScript.Shell")
shell.AppActivate("AnyConnect Downloader")
shell.SendKeys("{TAB}")
shell.SendKeys("{ENTER}")


But for some reason it doesn't work.
Thread posts: 331
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.