420chan now has a web-based IRC client available, right here
Leave these fields empty (spam trap):
Name
You can leave this blank to post anonymously, or you can create a Tripcode by using the float Name#Password
A subject is required when posting a new thread
Subject
Comment
[*]Italic Text[/*]
[**]Bold Text[/**]
[~]Taimapedia Article[/~]
[%]Spoiler Text[/%]
>Highlight/Quote Text
[pre]Preformatted & Monospace text[/pre]
1. Numbered lists become ordered lists
* Bulleted lists become unordered lists
File

Sandwich

penis pump

Community Updates

420chan now supports HTTPS! If you find any issues, you may report them in this thread
how do you ''import'' classes from additional source folders? by Hedda Binningkit - Sun, 10 Apr 2016 22:18:23 EST ID:SWJfiJ9j No.35466 Ignore Report Reply Quick Reply
File: 1460341103195.png -(36306B / 35.46KB, 814x379) Thumbnail displayed, click image for full size. 36306
So I'm trying to get the hang of working with resources in Java.
the res folder is in my buildpath, but I don't seem to be able to access the ResourceLoader class from my src folder.
How do I do I make this work while keeping my res folder seperate from src?
>>
Hedda Binningkit - Mon, 11 Apr 2016 00:51:47 EST ID:SWJfiJ9j No.35467 Ignore Report Quick Reply
>>35466
UPDATE: found my answer after harassing a guy on Stack Overflow for a while.
>>
Martha Clindlefuck - Mon, 11 Apr 2016 01:10:22 EST ID:JhIhwAJD No.35468 Ignore Report Quick Reply
>>35467
I'm not sure what the guy on Stack Overflow said, but you probably want to keep all your source code in your src folder.

Make a package in src called utilities or something and put it in there.

Also, res should just be a regular folder, not a source folder.
>>
Hedda Binningkit - Tue, 12 Apr 2016 21:01:40 EST ID:SWJfiJ9j No.35481 Ignore Report Quick Reply
>>35468
>>35468
He kindly pointed out to me that if I wanted to use this method, the resource loader can't be in a default package.
As for making a res a regular folder w/ ResourceLoader in a utilities package, from what I understand that won't work for 2 reasons:

1.) the res folder won't be included in the jar if it's not in the buildpath, making the creation of OS specific installers necessary.

2.) if the ResourceLoader class is not in the same source-folder as the resources it's loading, the getClass().getResource() method ceases to work, making managing resources much more complicated.

Yes, I could move the resPkg package within res to src... but all it adds is a bunch of mostly irrelevant visual clutter to the src folder.
I fail to see the benefit, considering Java doesn't distinguish between the folders in it's build-path when it comes to import statements.

I'm pretty new to programming so I'd be more than happy to hear if there's a simpler way to do this in Java than with than solutions I've managed to find.
>>
Graham Chinnerwad - Tue, 12 Apr 2016 22:40:47 EST ID:JhIhwAJD No.35482 Ignore Report Quick Reply
>>35481
Here's a method from my last project, i'm not saying it is good, but it may help you:
http://pastebin.com/ZEb0HZPK

I have my ResourceManager class in a package called support and I have all my images in a folder called res/images/

It starts by trying to read the file in at "res/images/"
If running the project from your IDE it will look into your res folder that is at the root of your project directory
If running the project from a jar file it will look in the same directory as the jar file
If that fails, it will use the system class loader to try and get the resource as a stream
This will look inside your jar file for the requested resource
If that somehow fails, it just returns a default image

This has the added effect that people can change the images and sounds and whatever they want by placing a res folder with the items just outside of your jar file.
If you don't want that, you could do the check inside the jar file first.
>>
Charles Nashway - Thu, 14 Apr 2016 22:08:46 EST ID:vIbiteGg No.35488 Ignore Report Quick Reply
>>35482
Stop using java.io.File, OP. Use java.nio.file.Path for files on the local system and java.net.URL or URI for files in your jar or local system or network.


Proxying with VPNs by Hugh Pibbleshit - Mon, 15 Feb 2016 01:09:31 EST ID:UJlFtb13 No.35161 Ignore Report Reply Quick Reply
File: 1455516571314.gif -(44928B / 43.88KB, 250x190) Thumbnail displayed, click image for full size. 44928
There's some web stuff I want to scrape and I want to use some reliable on-demand proxies. PIA is a dirt cheap VPN provider which lets you use five simultaneous VPN connections. That's great except I don't know much about networking in general and I know nothing about configuring multiple VPNs for use on one host. What I'm envisioning is using one virtual machine with a bridged network adapter that will have five network interfaces and five proxies bound to those interfaces and then some custom API for scraper clients to start/stop/change connections. Or alternatively, a similar set up but one VM per scraper client. Before I go banging my head against a wall, I thought I should ask: is there an easy-mode solution?
>>
Alice Clayfoot - Thu, 24 Mar 2016 03:55:04 EST ID:9Rjcnadv No.35372 Ignore Report Quick Reply
>>35161
First of all what the fuck?
I have PIA and the application is super easy to configure. you just put in your username/password then choose a server. Also it's based on OpenVPN so if you wanted to add scripts into it you could use the actual openvpn application.
>>
Faggy Haffingdodge - Thu, 24 Mar 2016 13:02:42 EST ID:/Pyyujzg No.35373 Ignore Report Quick Reply
>>35372
>simultaneous VPN connections

Routing can be a bitch.
>>
Wesley Fivingdotch - Mon, 11 Apr 2016 19:19:34 EST ID:MIT/8+2O No.35469 Ignore Report Quick Reply
Tor isn't really designed for it and it's abusing the resource BUTTT: http://blog.databigbang.com/distributed-scraping-with-multiple-tor-circuits/

It does make scraping very easy if you spin up a bunch of tor instances...


General Programming by Frederick Fendledadge - Tue, 22 Mar 2016 15:52:36 EST ID:91ylubZX No.35358 Ignore Report Reply Quick Reply
File: 1458676356502.jpg -(1395657B / 1.33MB, 4640x2784) Thumbnail displayed, click image for full size. 1395657
Where can I learn how to program my android tablet to do speacialized things like respond to my voice (i.e. "Ok Google"). The current "version" of my OS doesn't allow it except for when I hit the app button but I wanna be able to do this from afar.
I also want to learn a way where the tab can read me entire pages so that I can listen to documents while I run, play guitar, drive without having to be reading them.
Simple (probably not) little things like that.
Where should I start /prog/? I only have basic knowledge of programming like HTML (Myspace img src codes) and MATLAB that I took in college.
>>
JS Embed Custom Canvas SS SRC CRSH - Tue, 22 Mar 2016 20:08:31 EST ID:tSOrTy4O No.35359 Ignore Report Quick Reply
>>35358
Download AIDE From The app store learn java first tho if u want then move on to Android Studio for WIndows. I have some basic Android Example Codes Below- BrU
>>
Here is a Droid Random Location Gen That uses the geo: protocol in the browser enjoy - Tue, 22 Mar 2016 20:12:45 EST ID:tSOrTy4O No.35360 Ignore Report Quick Reply
package com.mycompany.WBV2;
import android.content.Context;
import android.content.Intent;
import android.app.Activity;
import java.util.Random;
import java.util.*;
import android.app.*;
import android.os.*;
import android.content.*;
import android.widget.Button;
import android.net.Uri;
import android.net.*;
import java.net.*;
import android.view.*;
import android.view.animation.*;
Comment too long. Click here to view the full text.
>>
Here is somethin some other idiot wrote idk who - Tue, 22 Mar 2016 20:40:28 EST ID:tSOrTy4O No.35361 Ignore Report Quick Reply
package com.mycompany.WBV2;
import android.content.Context;
import android.content.Intent;
import android.app.Activity;
import java.util.*;
import android.app.*;
import android.os.*;
import android.content.*;
import android.widget.Button;
import android.net.Uri;
import android.net.*;
import java.net.*;
import android.view.*;
import android.view.animation.*;
Comment too long. Click here to view the full text.
>>
Nathaniel Hunningkidge - Fri, 25 Mar 2016 05:57:59 EST ID:Qf+zQsjx No.35374 Ignore Report Quick Reply
1458899879407.jpg -(1420233B / 1.35MB, 4640x2784) Thumbnail displayed, click image for full size.
>>35359
Does it matter which of the 3 Aide apps available?
>>
Albert Bardridge - Fri, 01 Apr 2016 21:37:43 EST ID:1LXegojn No.35432 Ignore Report Quick Reply
>>35358
Came across this link the other day looking up specs, not read more than the headline.
https://www.raspberrypi.org/blog/amazon-echo-homebrew-version/


java - printing out all higher values in a binary search tree by Cyril Blidgestone - Sun, 27 Mar 2016 19:54:43 EST ID:jhX9zOrD No.35395 Ignore Report Reply Quick Reply
File: 1459122883925.jpg -(68995B / 67.38KB, 1080x791) Thumbnail displayed, click image for full size. 68995
how would i go about writing a recursive method to print out all higher values of an input in a binary search tree?

i know i need to make a new list and add the values in as i get them but i have no idea how i should go about moving through the tree to find/add them.

any help would be hugely appreciated
>>
Faggy Soddlebury - Sun, 27 Mar 2016 21:53:22 EST ID:JhIhwAJD No.35404 Ignore Report Quick Reply
>>35395
You don't need to make a new list, that kind of defeats the purpose of making your method recursive.

Your method will start by being called on the root of your tree
if the value of the node is less then or equal to the supplied value, you will just call your method on the right node
otherwise you will call your method on the left node, then print the value of the node, then call your method on the right node
>>
Isabella Senkindale - Mon, 28 Mar 2016 13:02:59 EST ID:jhX9zOrD No.35408 Ignore Report Quick Reply
>>35404

i want to make the input an element to allow for greater versatility somewhere down the line. how can i compare a node to a generic type?
>>
Isabella Senkindale - Mon, 28 Mar 2016 14:08:26 EST ID:jhX9zOrD No.35409 Ignore Report Quick Reply
>>35408

nevermind i'm stupid, just wrote a simple compareTo method


Shell script by Phoebe Mabbledock - Fri, 25 Mar 2016 13:26:03 EST ID:677AANqx No.35375 Ignore Report Reply Quick Reply
File: 1458926763011.png -(54316B / 53.04KB, 807x808) Thumbnail displayed, click image for full size. 54316
Hello,
my friend, who is not good at programming, needs to programme a shell script for a university project. This is an "off-topic" class, but if he doesn't pass, he's out.

So I decided to help him and make it for him. I'm not familiar with shell also, so I decided to write here to ask for a piece of advice. I would be very glad, if u could look on the script expected output and tell what method I should use to programme it. I just need a skilled experienced eye to look at it, so I know the direction I should go.
Thank you, 420, you've been always very helpful, even though I only asked for adviced on drugs threads
5 posts and 1 images omitted. Click Reply to view.
>>
Charles Shakestone - Fri, 25 Mar 2016 21:04:40 EST ID:677AANqx No.35381 Ignore Report Quick Reply
>>35380
That means script will ignore all files and directories that match the regular expression FILE_ERE. This is another part I'm lost at.
>>
Charles Shakestone - Fri, 25 Mar 2016 21:12:19 EST ID:677AANqx No.35382 Ignore Report Quick Reply
>>35381
result=$(echo "$filename" | grep -e "$regex")

if [ -z "$result" ]; then
continue
fi
>>
Edwin Crimmerdit - Fri, 25 Mar 2016 21:50:31 EST ID:8MXN38zu No.35383 Ignore Report Quick Reply
>>35382
I thought it had to work everywhere, those square-brackets in place of 'test' aren't always available.
>>
Edward Peshgold - Sat, 26 Mar 2016 05:06:17 EST ID:S+TDDgvB No.35384 Ignore Report Quick Reply
>>35383
It's POSIX defined syntax. If it's not available, the system can go screw itself. nb
>>
Edwin Crimmerdit - Sat, 26 Mar 2016 13:32:02 EST ID:8MXN38zu No.35387 Ignore Report Quick Reply
Do you think you could post your script? I wouldn't mind seeing it.


Perapera colors automatically? by Beatrice Cellerstire - Sun, 20 Mar 2016 16:57:06 EST ID:U+wWNs50 No.35338 Ignore Report Reply Quick Reply
File: 1458507426362.png -(38278B / 37.38KB, 580x191) Thumbnail displayed, click image for full size. 38278
I want to have/make a Firefox add-on/greasemonkey-script/anything that will automatically give any and all Chinese characters there perapera colors RIGHT WHEN THEY APPEAR ON SCREEN, without me having to hover over them.
>>
Beatrice Blythelock - Mon, 21 Mar 2016 01:52:59 EST ID:akyQCFxb No.35344 Ignore Report Quick Reply
Javascript (so Greasemonkey) can do this for you. Simply parse the UTF text, find the Chinese characters you're looking for, and colorize them in the DOM.


Open Source version of Speed-Reading Add-On. by Beatrice Cellerstire - Sun, 20 Mar 2016 16:54:38 EST ID:U+wWNs50 No.35337 Ignore Report Reply Quick Reply
File: 1458507278362.jpg -(123735B / 120.83KB, 500x750) Thumbnail displayed, click image for full size. 123735
So I'm a fan of increasing my reading speed. I found this proprietary add-on (therefore likely a botnet) called Bee-line Reader.

"BeeLine Reader makes reading faster and easier by using a color gradient that guides your eyes from the end of one line to the beginning of the next. With BeeLine Reader, you can finish your work faster—and with less eyestrain."
-http://www.beelinereader.com/

The way it works is that when you click the Bee-line Reader button in your browser, then it makes the article your reading have a slowly evolving color for your text. The first character's color will have an RGB value of (0, 0, 0), but the very next character will have an RGB value of (1, 0, 0) and this will largely increase until the Red value reaches 255, and goes back down to zero, and then the Blue value will rise to 255 and go back down to zero, all the while, the Green value doesn't move much at all.

Since it comes with a faggy 30-day trial period, I've been trying to reverse engineer it's process. I'm not very smart in areas of programming, but with Vim I was able to create a macro that created all 255 Red values going up, and the other 255 Red values going down, and doing the same for the other 255+255 Blue values, resulting in a basic grid, where I just need to figure how to insert text I actually want to read into it, except that for some reason my basic grid doesn't seem to work at all.

This is what my grid looks like:
http://pastebin.com/QdgCA4Vf

And this is the failed attempt of an html page that results:
http://pastebin.com/Y1AR5BUG
Comment too long. Click here to view the full text.
>>
Whitey Greenlock - Sun, 20 Mar 2016 17:10:01 EST ID:5q2tULje No.35339 Ignore Report Quick Reply
>>35337
Welcome back, If you say you're not smart in the area of programming do you mean you don't want to learn doing it yourself and want somebody here to write it for you?
Then good luck.

Otherwise what language are you most comfortable with?

Approaches that would work
  • greasemonkey
  • native browser plugin
  • a patch for the rendering engine of your application
  • a proxy injecting tags into your, for instance html document
  • write your own document reader from scratch
>>
Whitey Greenlock - Sun, 20 Mar 2016 17:36:15 EST ID:5q2tULje No.35340 Ignore Report Quick Reply
I just have been thinking about CSS wizardy some people are doing, it makes me suspect that your task might be doable with just CSS.
>>
Beatrice Cellerstire - Sun, 20 Mar 2016 17:57:08 EST ID:U+wWNs50 No.35341 Ignore Report Quick Reply
>>35339
>If you say you're not smart in the area of programming do you mean you don't want to learn doing it yourself and want somebody here to write it for you?
No. I want to learn. I don't much about any languages. I kindof, sortof, not-really understand perl, hence the scalars of $character.
I made my grid with a vim macro and vim's incremental character increase and decrease, but I didn't mention that, because I didn't think it was helpful to understanding my goal.
>>
Whitey Greenlock - Sun, 20 Mar 2016 19:53:21 EST ID:5q2tULje No.35342 Ignore Report Quick Reply
>>35341
Then the approach where you're using a proxy to modify the html/css will probably the most realistic to accomplish. You might have to come up with something smart in css to handle line breaks correctly.
I can't help you with the CSS part, so you probably better wait for somebody who knows this stuff to come along, I also don't use perl, so...

But curious effect, overall. A thing for my in the back of the head bucket list, thanks.
>>
Hedda Sassleway - Sun, 20 Mar 2016 21:08:46 EST ID:L86Q0Yqk No.35343 Ignore Report Quick Reply
I don't know what you're trying to read, but if it's anything academic, and it has exercises to test your knowledge of said material then if you want to "increase the speed" what you do is this:

  • Open to random chapter. Attempt the first exercises you find.
  • If pass, continue doing exercises.
  • If stumped, research the problem until you can solve it.
  • Go back to 2 and continue doing exercises.

This is how you fly though something like Concrete Mathematics by Knuth or Algorithms by Rivest et all. It also teaches you a valuable skill which is researching, since you will be confronted with things in life that require knowing how to efficiently look them up.


I'm loosing free space on my C disk by Archie Wissleditch - Sat, 19 Mar 2016 14:13:01 EST ID:vJwJn+Nz No.35331 Ignore Report Reply Quick Reply
File: 1458411181106.gif -(18920B / 18.48KB, 364x229) Thumbnail displayed, click image for full size. 18920
Loosing space on C disk without any reason.
For example, I had 50GB of free soace, but a week later it's now 30GB.
And no, I'm not downloading large files on my C disk and nobody besides me is using the computer.
>>
Jenny Geblingville - Sat, 19 Mar 2016 14:36:48 EST ID:cIMAz082 No.35332 Ignore Report Quick Reply
>>35331
losing*, not a programming issue*
http://bfy.tw/4px2
>>
Caroline Turveyforth - Sun, 20 Mar 2016 01:07:03 EST ID:akyQCFxb No.35334 Ignore Report Quick Reply
When certain installers (usually Microsoft's own) run, they will create a Hiberfile on your main system drive. You can check and see if the Hiberfile is there by seeing if "\hiberfil.sys" exists. If it does, you can use the command "powercfg -h off" into an Administrator command-prompt (this will also disable your computer's ability to use the Hibernate feature, however Sleep mode will still be available).

Additionally, Windows Update takes a lot of space after you've installed updates (it's slow to remove things afterwards). You can free up disk space by using the built-into-Windows utility "Disk Cleanup". Find it in your Start Menu, and if you're on Windows 10, select "Clean up System FIles" from the main page of Disk Cleanup. Check all of the checkboxes that you feel comfortable checking, and press Ok to delete all of that stuff.
>>
Martha Pellysit - Sun, 20 Mar 2016 06:59:20 EST ID:ko7fvnPN No.35335 Ignore Report Quick Reply
1458471560675.gif -(849606B / 829.69KB, 200x200) Thumbnail displayed, click image for full size.
>When certain installers (usually Microsoft's own) run, they will create a Hiberfile on your main system drive.
>>
Sophie Sangerbury - Sun, 10 Apr 2016 08:57:53 EST ID:9hqrgAcE No.35456 Ignore Report Quick Reply
>>35334
>When certain installers (usually Microsoft's own) run, they will create a Hiberfile on your main system drive.
No, Hiberfile.sys is only used for hibernation, and never exceeds the size of your RAM.

Windows update does install a lot of temporary files. In win7/2008 R2, these are removed with the Disk Cleanup tool, but only if the system is properly updated. This update is KB 2852386.

OP, if that's a screenshot from your PC, do upgrade from Vista.... It was pretty notorious for exactly this...


Salary Info by Reuben Chinnerkurk - Fri, 18 Mar 2016 23:51:09 EST ID:FVJtOGTr No.35326 Ignore Report Reply Quick Reply
File: 1458359469053.jpg -(598493B / 584.47KB, 1280x2048) Thumbnail displayed, click image for full size. 598493
Post on HN discussing salaries as these shit soul sucking tech corps try and suppress all salary info to lowball new hires https://news.ycombinator.com/item?id=11312984

Mainly covers Amazon, lol what a shit company. Everybody's salary decreases over time.


Video Converter for VOB format by Sidney Fettingkatch - Sat, 27 Feb 2016 05:06:49 EST ID:USrMMBaO No.35239 Ignore Report Reply Quick Reply
File: 1456567609293.jpg -(23215B / 22.67KB, 270x270) Thumbnail displayed, click image for full size. 23215
I have many old video clips with good quality and VOB format, but the thing is that when I'm trying to convert it by changing into other format, the video is loosing it's quality.....
Is there any way to change the VOB format without loosing the good quality?
I tryed all video converters......
P.S. The clips are with good quality, even better then the ones that are on youtube(with shit quality).
1 posts omitted. Click Reply to view.
>>
Hamilton Deddlelick - Sat, 27 Feb 2016 12:44:34 EST ID:Ky+8GJE7 No.35243 Ignore Report Quick Reply
I can't recommend anything exact, but look into encoding settings and make sure you're using high settings.

https://en.wikipedia.org/wiki/Digital_video#Overview_of_basic_properties looks like a good read.
>>
Charlotte Billinghall - Sat, 27 Feb 2016 19:17:12 EST ID:VGSxNfUt No.35244 Ignore Report Quick Reply
>>35243
I know everything about that shit, I just can't understand that why VOB is getting broken, when I'm turning it into other format?
>>
Nicholas Novingspear - Sun, 28 Feb 2016 16:43:53 EST ID:wL4Vt2hP No.35248 Ignore Report Quick Reply
VOB videos ripped directly from DVDs should be just MPEG2 videos. It should be extremely possible to convert a VOB losslessly into another MPEG video container.

In fact, if you take the .vob file and rename it to .mpg, many video players will recognize that and play the file. And there, now you've just "converted it" without changing its quality at all.
>>
Esther Donnertatch - Mon, 29 Feb 2016 18:12:37 EST ID:u71jfrBv No.35254 Ignore Report Quick Reply
Try DVDVideoSoft Free Studio. It sounds like terrible adware but it's a really solid suite of converters with no spyware/malware, only a few nag screens for the paid version of the product. The MP4 Video Converter component can convert from/to most formats (not just MP4) and has a lot of options for specifying bitrate, output format, etc.
>>
Jarvis Demblebitch - Fri, 18 Mar 2016 09:42:59 EST ID:F8AlOujT No.35321 Ignore Report Quick Reply
hey OP i just had the same problem, try xmedia recode or SUPER. im not sure anymore which one worked but i got it converted to avi


USB Interface by Lydia Dassleworth - Mon, 14 Mar 2016 07:17:27 EST ID:/Jvp0U/F No.35298 Ignore Report Reply Quick Reply
File: 1457954247437.png -(217403B / 212.31KB, 350x352) Thumbnail displayed, click image for full size. 217403
Hey /prog/,

I want to make a custom Novation Launchpad thingy to learn new stuff, but I'm wondering about the communication with a computer. I thought Bluetooth would be good, but the device would have to be powered by an external source. So naturally, USB comes into the picture, which would act as a power supply and means of communication.

I'm not sure whether it is good to use an intermediary board like Arduino or RPi or skip it altogether and wire the usb interface myself.

Speaking of which, how do I go about writing drivers for this stuff? I would like it to be usable both for Linux/Windows.
>>
John Hennerkudge - Mon, 14 Mar 2016 17:45:53 EST ID:5q2tULje No.35301 Ignore Report Quick Reply
Although it's not clear what your intentions are I'm pretty sure that is what you need:
https://github.com/FMMT666/launchpad.py
>>
Jenny Murdway - Mon, 14 Mar 2016 19:38:36 EST ID:EariAHdk No.35302 Ignore Report Quick Reply
>Speaking of which, how do I go about writing drivers for this stuff?

You're not going to write drivers for anything, so don't worry about that. Refer to the documentation and/or existing source code to learn how to talk to a USB device.


w3schoolsd by we - Wed, 09 Mar 2016 12:04:39 EST ID:tSOrTy4O No.35292 Ignore Report Reply Quick Reply
File: 1457543079540.png -(589890B / 576.06KB, 1366x768) Thumbnail displayed, click image for full size. 589890
<script>
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
(function() {
var gads = document.createElement('script');
gads.async = true;
gads.type = 'text/javascript';
var useSSL = 'https:' == document.location.protocol;
gads.src = (useSSL ? 'https:' : 'http:') +
'//www.googletagservices.com/tag/js/gpt.js';
var node = document.getElementsByTagName('script')[0];
node.parentNode.insertBefore(gads, node);
})();
</script>
<script type='text/javascript'>
Comment too long. Click here to view the full text.
>>
Rebecca Subblefuck - Wed, 09 Mar 2016 18:40:23 EST ID:EOjNoGEY No.35293 Ignore Report Quick Reply
Gotta keep it one thread bro. You know this.


<<Last Pages Next>>
0 1 2 3 4 5 6 7 8 9 10 11
Report Post
Reason
Note
Please be descriptive with report notes,
this helps staff resolve issues quicker.