Leave these fields empty (spam trap):
Name
You can leave this blank to post anonymously, or you can create a Tripcode by using the format Name#Password
Subject
Comment
[i]Italic Text[/i]
[b]Bold Text[/b]
[spoiler]Spoiler Text[/spoiler]
>Highlight/Quote Text
[pre]Preformatted & Monospace Text[/pre]
[super]Superset Text[/super]
[sub]Subset Text[/sub]
1. Numbered lists become ordered lists
* Bulleted lists become unordered lists
File

Sandwich


420chan is Getting Overhauled - Changelog/Bug Report/Request Thread (Updated July 26)

silly java question

View Thread Reply
- Wed, 18 Jan 2017 04:54:58 EST zKC23xNi No.36465
File: 1484733298660.jpg -(83487B / 81.53KB, 480x600) Thumbnail displayed, click image for full size. silly java question
Hi sorry if the question may sound dumb but i must do a for each in a class, with an arraylist which is placed in another class and i am unable to do that because it seems that arraylists are visible only in their class and if i do a get method i can't do the for each
thanks in advance
4 posts omitted. Click View Thread to read.
>>
Charles Blazzlekotch - Thu, 19 Jan 2017 17:10:57 EST VE+xmvqo No.36474 Reply
>>36472
You type like a fag and your shit's all unix.
>>
Charlotte Crullerfuck - Sat, 21 Jan 2017 14:38:35 EST sGFR0zid No.36478 Reply
>>36471

This is a Java thread, we're only talking about Java.

Help me with Java

View Thread Reply
- Wed, 11 Jan 2017 08:49:00 EST VyheDnFA No.36448
File: 1484142540583.jpg -(14021B / 13.69KB, 259x194) Thumbnail displayed, click image for full size. Help me with Java
I must learn java and i study it since october but i really didn't understand much
i have some skills with assembly (IJVM) and C but i find Java really hard
do you have any tips or books to suggest me?
>>
Hedda Dundlepan - Wed, 11 Jan 2017 14:45:20 EST sGFR0zid No.36449 Reply
If you want an "intro to programming book that is also a good introduction to Java" you could try "Java: An Introduction to Problem Solving and Programming," which was not bad except for the dozens of weird typos my copy had. If you want a "I am already decent at programming and I want something that talks to me at my level" book, I'd suggest "Core Java."
>>
Lydia Blythebanks - Sat, 21 Jan 2017 11:36:47 EST QFj3NJQM No.36477 Reply
>>36448
Create an Android app, doesn't matter if idea exists already. I recommend gang of four design patterns book.
>>
Cyril Dartfuck - Thu, 02 Mar 2017 23:01:48 EST vJcy7jWV No.36584 Reply
1488513708392.png -(625396B / 610.74KB, 512x512) Thumbnail displayed, click image for full size.
>>36449
Thanks for the Core Java recommendation, took a bit of searching to find the right one but it's exactly was I looking for.
nb 'cause I'm new here and unsure what warrants a bump.

Storing lists as the factorized form of single numbers

View Thread Reply
- Wed, 04 Jan 2017 17:30:26 EST zu3jfUuo No.36440
File: 1483569026042.png -(30588B / 29.87KB, 317x332) Thumbnail displayed, click image for full size. Storing lists as the factorized form of single numbers
I was dealing with a SQL database earlier today and I was frustrated because I couldn't make a column hold a list of values in every possible row. I ended up just doing one-hot encoding (and adding 20 columns full of sparse binary data in the process) but I had a thought: what if you use all prime numbers as index values, then simply multiply them together to produce a single BIGINT value. Then, when retrieving data from the database, you simply factorize the value and the prime numbers it yields will tell you what members of the list are present in that row's entry. Like:

userID | movelist
1 -------| 1914

When I want to retrieve the move list for user 1, I'd just:
>SELECT movelist FROM db WHERE userID 1;
which yields 1914. Then I take this number and factorize it yielding [2, 3, 11, 29]. My movelist table looks like this:

index | move
2 ------| jump
3 ------| punch
5 ------| kick
7 ------| eat
11 ----| slash
13 ----| talk
17 ----| scream
19 ----| cry
23 ----| crush
29 ----| fly

I go through the list I generated by factorization and retrieve the details of each move. I eliminated 9 columns of data while only adding a factorization function (the movelist table would exist regardless). In large databases this can save you TONS of space. Now yes, you can only use the first 15 prime numbers before getting larger than BIGINTs can hold, but that's still 14 columns you can eliminate. There might even be a way to utilize different sets of the first 15 primes and store lists of indefinite length.

So my question is, can anyone think of a downside to this that I'm missing? I can't find anything about this on the net. Does it have a name?
3 posts and 1 images omitted. Click View Thread to read.
>>
Oliver Fandock - Tue, 10 Jan 2017 11:04:16 EST 9QSfnS0r No.36446 Reply
Using prime factorization this way is borderline retarded.

Srsly use bitfields.
1 ------| jump
2 ------| punch
4 ------| kick
8 ------| eat
16 ----| slash
32 ----| talk
64 ----| scream
128 ----| cry
256 ----| crush
512 ----| fly

People back in the day would have hit you over the head for that, now cpu cycles are cheap, but not that cheap.
The only advantage your method has is you can store multiple references to the same move in the same value, but as it looks you don't want to do this anyway.

And second if you are concerned about space savings don't use sql.
>>
Oliver Fandock - Tue, 10 Jan 2017 11:11:11 EST 9QSfnS0r No.36447 Reply
Also your method won't save any space versus bitfields because of the pigeonhole principle.

free video editors

View Thread Reply
- Sat, 26 Mar 2016 10:37:10 EST 6MSbhuhv No.35385
File: 1459003030988.gif -(2772899B / 2.64MB, 500x281) Thumbnail displayed, click image for full size. free video editors
can you suggest a good free video-editing software
(thats not too full of itself like Vegas or Adobe)
for Windows?
6 posts and 1 images omitted. Click View Thread to read.
>>
Hollunder Velvetglie - Sun, 10 Apr 2016 13:08:23 EST ZGfcy/cU No.35457 Reply
1460308103380.png -(883500B / 862.79KB, 1600x900) Thumbnail displayed, click image for full size.
>>35405
try Hitfilm.
It's free and can do everything the big ones can.
Runs much faster in my experience
and has even 3D-effects and every little plaything you'll need for prefessional editing.

But you'll have to register to get a free key.

(Key will be provided to your hitfilm-account. Just so you don't go insane like I did, while trying to unlock it!)
>>
Henry Pittbanks - Sat, 07 May 2016 17:13:13 EST UGUCRnOo No.35576 Reply
>>35427
>
>It's not widely used for this purpose, but Blender is the only open source cross-platform video editing software that's worth a damn.
>

Seconding this. Linux user here, I used to use Kdenlive, eventually got mighty sick of it crashing. Blender is rock solid.
>>
Fermented Sodapops - Sun, 08 Jan 2017 09:02:54 EST YoqtmZw1 No.36445 Reply
1483884174446.jpg -(170616B / 166.62KB, 1920x1080) Thumbnail displayed, click image for full size.
>>35457
best idea!

Makes me wonder why schools and univerities in this area keep wasting their money
on Vegas, Corel and other expensive and clunky crap!

Only thing that REALLY pisses me off about HF is the terrible way Hitfilm uses Slow-Mo-Effects!

Scrape a Web Page Help

View Thread Reply
- Sun, 25 Dec 2016 21:54:57 EST W/zS63TD No.36409
File: 1482720897775.jpg -(15813B / 15.44KB, 365x137) Thumbnail displayed, click image for full size. Scrape a Web Page Help
Okay I don't care how inefficient the solution is, but my situation is complicated because here is my page:
https://www.numbeo.com/cost-of-living/rankings_current.jsp

And you type a city into that search bar, and assuming you type something that matches exactly their entry -> you hit enter -> it takes you to a different URL page.

So if it was simple, I would just do it by url, but now I need to actually simulate typing and hitting enter, as well as handing that url direct
10 posts omitted. Click View Thread to read.
>>
Phineas Crabbleforth - Sat, 31 Dec 2016 14:20:20 EST tZM6suYH No.36435 Reply
>>36433
While you're being a stuck up cunt, why don't your greasy edgelord fingers and crack open a fucking book?
>>
Thomas Fanville - Mon, 02 Jan 2017 12:10:40 EST tMBsUfyx No.36439 Reply
>>36433
>implying that's what you get if you search it on youtube

software engineers

View Thread Reply
- Mon, 31 Aug 2015 21:30:52 EST L/We2WuN No.34527
File: 1441071052066.jpg -(51758B / 50.54KB, 960x774) Thumbnail displayed, click image for full size. software engineers
is anyone hear a software engineer or studying it? im starting collage and am think about studying it because of the high pay. an i have some questions.

>what skills do you need
>what was the biggest surprise about your work, something you did not expect.
>how are bonuses earned
>whats the shittest part about your job.
>what do you do day by day, like whats your day at work look like.
34 posts and 5 images omitted. Click View Thread to read.
>>
Eugene Sickleridge - Mon, 28 Nov 2016 15:56:10 EST o7NpBz5X No.36336 Reply
>>35486
So I'm kind of surprised to see someone trying to sell functional programming on here. Maybe you just haven't been around much yet, but "software people" do not want to use a functional programming language. Yes it would make them better programmers for learning it and would solve (or allow the automated solution of) many of their problems, but there is not an ice cube's chance in hell that anything other than Java, Microsoft's languages, C++, and other related atrocities will be used in the vast majority of applications. The reasons for this are social and political. Is it terrible that formal program verification is not being used on vehicles and in implants where program failure could cost human lives? Yes, but you would be better off not wasting your own life in trying to save all those lives lost to memory leaks.

There are limited real-world uses of functional languages in finance and in academia they are much more prevalent. Mathematicians and computer scientists do that stuff all the time. I do use Python for a lot of things myself, so I'm not a total fanatic when it comes to functional programming, but even Python would be an improvement over the state of things in commercial software development right now.
>>
Samuel Dadgenine - Sun, 01 Jan 2017 16:56:09 EST e7bTcYy7 No.36437 Reply
>>36336
Idk man, Scala hits a nice sweet spot for a functional language in a production environment because its compatible with existing java libraries. My employer switched to it a long years ago.
>>
Matilda Hassleham - Sun, 01 Jan 2017 18:55:03 EST D7/rI9fU No.36438 Reply
>>36437
Yeah but you still have to touch Java and are therefore living in sin.

where to start?

View Thread Reply
- Tue, 15 Nov 2016 21:01:50 EST fItQgQqz No.36297
File: 1479261710490.jpg -(32631B / 31.87KB, 447x456) Thumbnail displayed, click image for full size. where to start?
i have no experience with programming besides basic ugly HTML and would really like to get deep into it (not for career purposes, just curious) and was wondering what are good resources that you used/wish you had when you started? i'm really really trying to grasp this stuff but i feel like it keeps slipping right though my fingers
11 posts and 1 images omitted. Click View Thread to read.
>>
George Fiblingchut - Mon, 26 Dec 2016 03:50:03 EST mfkLzG/S No.36412 Reply
>>36407
>a meme

There are 2 languages.

Fortran based and LISP based.

If you learn one of them you know them all, Clojure, Java, C, Haskell, guess which lang they are from?
>>
Charlotte Hundlewell - Wed, 28 Dec 2016 11:43:57 EST FNUGTkco No.36418 Reply
1482943437588.jpg -(60780B / 59.36KB, 529x529) Thumbnail displayed, click image for full size.
>>36412

Scotty, give me maximum pretentiousness.
>>
Henry Pickspear - Thu, 29 Dec 2016 20:39:18 EST 29ygicdt No.36432 Reply
>>36307

was expecting you to say "practice", made me lol

Makefile problem

View Thread Reply
- Wed, 28 Dec 2016 13:47:24 EST 677AANqx No.36419
File: 1482950844378.png -(5817B / 5.68KB, 225x225) Thumbnail displayed, click image for full size. Makefile problem
Hello,
I`ve been trying to make a project on unix, but yesterday I ran to a problem I just simply cannot solve.
I work on windows mostly and am Makefile noob.

I have everything installed up. But makefile yields: ".lib/arduino.a" no file or directory.
I figured out it must be some logical mistake in makefile; that it wants arduino.a before it is compiled.

Could anyone help me out?

Makefile: http://pastebin.com/QNGT1XNm
Readme: http://pastebin.com/ZtEA3SqW
Directory structure: http://pastebin.com/JLe8XNRB
7 posts omitted. Click View Thread to read.
>>
Molly Casslelock - Wed, 28 Dec 2016 16:52:35 EST kEUrK4GZ No.36428 Reply
>>36427
If you read through the makefile and did everything you were told to do, one likely possibility is that you're using the wrong version of something. The makefile is copyrighted 2013, so look into that.
>>
Thomas Greenhood - Wed, 28 Dec 2016 19:10:25 EST 9QSfnS0r No.36430 Reply
If you are tired of writing your Makefile by hand try out platformio.
It creates project files based on imported libraries via a few command line commands.
>>
Nathaniel Dradgework - Thu, 29 Dec 2016 14:21:32 EST sGFR0zid No.36431 Reply
1483039292221.jpg -(166021B / 162.13KB, 1332x1776) Thumbnail displayed, click image for full size.
>>36425

>I changed it to "lib/arduino" and it got further. I still get error, but different one.

tfw PROGRESS :)

c++

View Thread Reply
- Thu, 22 Dec 2016 14:24:32 EST Jf4pElwU No.36392
File: 1482434672770.jpg -(6913B / 6.75KB, 182x251) Thumbnail displayed, click image for full size. c++
Anyone that can explain how to return the value after the change?

#include<iostream>
#include<conio.h>
#include<algorithm>
using namespace std;
class Pyre
{
public:
float width;
float depth;
float height;

float change(float, float);
};

float Pyre::change(float side1, float side2)
{
cout<<side1<<side2<<endl<<endl;
std::swap(side1,side2);
cout<<side1<<side2<<endl<<endl;

}

int main()
{
Pyre pyr;
pyr.width = 50;
pyr.depth = 50;
pyr.height = 100;
Comment too long. Click here to view the full text.
9 posts omitted. Click View Thread to read.
>>
Hannah Soblingwater - Fri, 23 Dec 2016 10:47:44 EST 9QSfnS0r No.36402 Reply
>>36401
If you just use assignment instead of std::swap you'll override the left hand side but leave the right hand side as it is.
Be aware that using Pyramid Pyramid::change(float &side1, float &side2)
will just use the memory location of whatever you pass into that function, even it doesn't belong to the current instance of Pyramid.
This defeats the purpose of making it a method.

you could as well use
pyr.depth = pyr.height;
pyr.height = pyr.width;
pyr.width = pyr.depth;

for the same result.


>>36400
>what can i use instead of swap then if i need to change the base (50,50) with the height (100) with just calling one method. the base still needs to be a square after the switch and only one called method is allowed.

That's even easier, but what should happen if the base isn't already a square?

You could do this, in case of the area staying constant

float Pyramid::constantAreaSide() {
return (float)pow(2,0.5)*Pyramid().baseArea();
}
void Pyramid::change() {
float oldHeight = height;
height = constantAreaSide();
width = oldHeight;
depth = oldHeight;
}
Comment too long. Click here to view the full text.
>>
Hannah Soblingwater - Fri, 23 Dec 2016 10:54:35 EST 9QSfnS0r No.36403 Reply
it should be

float Pyramid::constantAreaSide() {
return (float)pow(Pyramid().baseArea(), 0.5);
}

Finding Code Behind Submit Button

View Thread Reply
- Sun, 18 Dec 2016 17:06:59 EST W/zS63TD No.36384
File: 1482098819204.jpg -(5336B / 5.21KB, 268x121) Thumbnail displayed, click image for full size. Finding Code Behind Submit Button
This is all I have:
<tr><td align="center">
<input type="submit" value="Find me a scale!"><br>
</td></tr>

I don't web dev, so where do I start to look? I'm assuming if it's JS then I can find it at least. Here's the page in question
http://www.scales-chords.com/scalefinder.php
3 posts and 2 images omitted. Click View Thread to read.
>>
John Gedgechatch - Mon, 19 Dec 2016 11:04:38 EST bjMQSk50 No.36389 Reply
1482163478712.jpg -(208301B / 203.42KB, 1117x765) Thumbnail displayed, click image for full size.
>>36387
Here you go, other posters were right. Doesn't appear to be JS, just a standard form and GET submit to the same PHP page/script.

In this case, you won't be able to get the code for the actual processing of the form, as the PHP is executed on the server before you see the results. It's not like JS where you can freely view the source in your dev tools.
>>
Thankful OP - Tue, 20 Dec 2016 05:09:02 EST F+scHBch No.36390 Reply
Blast! It's PHP! And I would've gotten away with it too if it weren't for you meddling web-devs and your server-side scripts.
*shakes first*
*induces cringe*
*too far? probably*
/me kills self
>>
Ebenezer Goodfield - Tue, 20 Dec 2016 07:13:51 EST eKgr8qwE No.36391 Reply
>>36390
If you wanted to be a real scrub you could enumerate all possible inputs, write a script to try them all then scrape the results. The info is probably out there somewhere else anyway.

Just saw they have an 'API' [ http://www.scales-chords.com/api/ ] so maybe they are open to sharing the data with you? Email the guy who runs the site and ask.


ES6 is fucking retarded

View Thread Reply
- Tue, 18 Oct 2016 01:48:29 EST IWfbDUK4 No.36246
File: 1476769709316.png -(72298B / 70.60KB, 893x933) Thumbnail displayed, click image for full size. ES6 is fucking retarded
Since I know you're all script-faggots, what's the best way to get a Javascript job? Have all the nerds already taken them? Should I kill myself now that I've devoted over a year of my life to this twisted language? Thanks /prog/, go fuck yourself.
11 posts and 1 images omitted. Click View Thread to read.
>>
Ernest Crunkinforth - Fri, 16 Dec 2016 12:04:45 EST KPocSsNJ No.36376 Reply
>>36369
Why no, I do not want to opt in to someone's advertising opportunity. Thanks for asking.
>>
Beatrice Bunspear - Sun, 18 Dec 2016 11:46:00 EST +Ue5tBQC No.36382 Reply
>>36376
It's free real estate tutorials. Just use a disposable mail.
>>
Cedric Dashstodge - Mon, 19 Dec 2016 10:56:47 EST 6AJt8tju No.36388 Reply
>>36382
Are they better than the thousands of other video tutorials and books on the topic I can get without giving an email?

I doubt it.

Moving an object along a line in java w/ slick2d

View Thread Reply
- Sat, 17 Dec 2016 19:22:56 EST SWJfiJ9j No.36378
File: 1482020576040.jpg -(100637B / 98.28KB, 439x249) Thumbnail displayed, click image for full size. Moving an object along a line in java w/ slick2d
I'm trying to make a missile commander game.
When you shoot your missile, it spawns at it's starting x/y and needs to move in a straight line towards the co-ordinate where the mouse was clicked.
How would I go about generating a list of the x/y coordinates between these two points in a straight line?
Thanks in advance.
>>
Hannah Dockletit - Sat, 17 Dec 2016 19:38:00 EST WLOo3E7i No.36379 Reply
>>36378
given your starting point (x0, y0) and you mouse click point (xM, yM), you just take x percent of the starting point and (1 - x) percent of the ending point.

so a point 45% between your starting point and your mouse click would be (x, y) where:
x = (x0 * (1 - 0.45)) + (xM * 0.45);
y = (y0 * (1 - 0.45)) + (yM * 0.45);

depending how many points you need, just generate them in a loop.
>>
Betsy Donkinkare - Sat, 17 Dec 2016 20:00:37 EST SWJfiJ9j No.36380 Reply
1482022837040.jpg -(52373B / 51.15KB, 640x475) Thumbnail displayed, click image for full size.
>>36379
this worked really well! thank you!
have an ancap meme as a reward.

New to C++

View Thread Reply
- Mon, 12 Dec 2016 00:11:42 EST bQwdXCse No.36361
File: 1481519502615.jpg -(37105B / 36.24KB, 433x455) Thumbnail displayed, click image for full size. New to C++
I recently bought a "C++ for dummies" book and although some of the aspects are confusing I am able to write pretty simplistic programs and arduino code.

Anyone else new to programming? Any suggestions on books?
9 posts and 3 images omitted. Click View Thread to read.
>>
Killian - Sat, 17 Dec 2016 15:01:40 EST bQwdXCse No.36377 Reply
>>36373
Sometimes what you + just isn't financially what I want... That's why our group has declined to accept any gifts from stargate +ing technology builders...

Your technology, your wholes in time space are too dangerious and if some of you had it your way you'd be pushing other peoples buttons all day wishing someone would find an innocence body their only to death it while 100% space +ing rapid growth mutants beg for the space of moment 1 + praying that moment one never sees all the innocence rapidgrowth mutants death.

So what ever.
>>
Martin Sesslebury - Sat, 17 Dec 2016 20:35:57 EST V5hbNNkO No.36381 Reply
>>36377
Get off the Internet, Terry Davis. You're drunk and crazy.

Report Post
Reason
Note
Please be descriptive with report notes,
this helps staff resolve issues quicker.