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
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.


VBA by Nell Dondlegold - Thu, 11 Feb 2016 15:58:13 EST ID:fJphNoau No.35142 Ignore Report Reply Quick Reply
File: 1455224293278.jpg -(108857B / 106.31KB, 500x707) Thumbnail displayed, click image for full size. 108857
Sup prog

Where can I go to learn VBA? My new office job requires me to use lots of excel/access programs and I'd like to learn the language so I could write some useful programs

Anywhere I can go to learn or should I just browse YouTube lessons
>>
Ernest Hussledotch - Fri, 12 Feb 2016 12:00:06 EST ID:5q2tULje No.35149 Ignore Report Quick Reply
Just a thought but maybe look for another job?

jk... for proprietary Microsoft stuff always look at their official documentation it's all on their website.
>>
Ernest Hussledotch - Fri, 12 Feb 2016 12:07:20 EST ID:5q2tULje No.35150 Ignore Report Quick Reply
Also I love the free courses of sololearn, I haven't done this one (since I don't need excel/vba ) but the C++, python, PHP and SQL ones were a live safer... The mobile apps especially.
http://www.sololearn.com/Course/Advanced-Excel/
>>
Alice Turveybury - Tue, 01 Mar 2016 02:07:16 EST ID:KOGv2Yu7 No.35255 Ignore Report Quick Reply
1456816036683.jpg -(23004B / 22.46KB, 500x256) Thumbnail displayed, click image for full size.
DICKS EVERYWHERE
>>
James Dippernerk - Wed, 02 Mar 2016 15:50:49 EST ID:5q2tULje No.35266 Ignore Report Quick Reply
>>35255
It's only a matter of time, srsly open source (not the "free" software RMS variant of it) has won. M$ have gone a long way from teaching their certificated tech worker crowds that Linux is evil. They even offer a Linux certificate and will be using a container based solution from conical to replace windows 10. I even think there's a strong possibility that I'll include a Linux kernel after that.


UNIX scripting help by Fanny Fillydock - Tue, 01 Mar 2016 02:16:48 EST ID:sLGpTrfW No.35256 Ignore Report Reply Quick Reply
File: 1456816608887.png -(138132B / 134.89KB, 480x513) Thumbnail displayed, click image for full size. 138132
I need a script for unix that uses sed to insert a line above certain keywords and print the output to a file. I can do this using the command line but I'm having trouble scripting in vim. can anyone help?
>>
Cornelius Fennergold - Tue, 01 Mar 2016 10:21:12 EST ID:X7dbwejq No.35258 Ignore Report Quick Reply
>>35256
Something like this?

echo 'farts' | sed 's/farts/toots\nfarts/g'
>>
Charles Miblinghore - Tue, 01 Mar 2016 11:57:33 EST ID:iaI5GEGa No.35259 Ignore Report Quick Reply
>>35258
I just need syntax for a script
>>
Martin Chabberspear - Tue, 01 Mar 2016 19:56:07 EST ID:X7dbwejq No.35261 Ignore Report Quick Reply
>>35259
Like this?

cat input_file | sed 's/\(keyword1\|keyword2\)/\nstuff to put before keyword\n\1/g' > output_file
>>
Martin Chabberspear - Tue, 01 Mar 2016 20:10:09 EST ID:X7dbwejq No.35262 Ignore Report Quick Reply
1456881009438.jpg -(60112B / 58.70KB, 530x707) Thumbnail displayed, click image for full size.
>>35261
Or like this?

#!/bin/bash

INFILE="$1"
OUTFILE="$2"

if [ "$INFILE" == '' ] || [ "$OUTFILE" == '' ]; then
echo 'Please specify an input file and an output file.'
exit 0
fi

cat "$INFILE" | sed 's/\(keyword1\|keyword2\)/\nstuff to put before keyword\n\1/g' > "$OUTFILE"
Comment too long. Click here to view the full text.
>>
Phineas Sittingville - Fri, 04 Mar 2016 13:54:04 EST ID:jD7NTaOL No.35273 Ignore Report Quick Reply
>>35256
I figured it out. my professor just gave shitty instructions on what he wanted


BASIC bitches by Frederick Havingwick - Mon, 15 Feb 2016 09:55:12 EST ID:v+xSbxsp No.35166 Ignore Report Reply Quick Reply
File: 1455548112204.jpg -(142590B / 139.25KB, 640x480) Thumbnail displayed, click image for full size. 142590
nah none of those

So I modded a cigar box to fit my kindle fire, then later added a small bluetooth keyboard and bam. instant laptop. It's the shit and I'm not ashamed of showing it off.

I got a BASIC programming app for it and it works great (a few minor bugs) and even came with some sweet code snippets and samples. However, I'm having trouble finding BASIC forums on the web. all I can find is VB shit and that's not going to help me.

specifically I'm having trouble with a do until loop with some if statments inside it.
for some reason the until doesnt register after the ifs. Can you use brackets\braces\parentheses? tried those a few ways and it wouldnt work

tldr:
BASIC (not VB) forums and such, where are they?

pic related. eyeball cover front cam. signet cigar box. removed mostof body but keptj bottom / top and clasp. hidden compartment under keyboard.
1 posts and 1 images omitted. Click Reply to view.
>>
Polly Giddlenot - Mon, 15 Feb 2016 14:05:52 EST ID:NoCscOac No.35169 Ignore Report Quick Reply
There are hundreds of incompatible BASIC dialects. If you want documentation, find out what the app implements.
>>
Eliza Marringtat - Tue, 16 Feb 2016 12:40:05 EST ID:5q2tULje No.35175 Ignore Report Quick Reply
Basic is senseless on a modern machine imho.
If you are doing it for sports get a Sharp PC-U6000 or one of the even older models and use that. It's more fun when you are restricted by 32kb of program memory :-)

If you are on a android tablet with a bluetooth keyboard install Termux and you can run python, php and even c++, and you have a full on vim with plugins and stuff.
>>
Eliza Marringtat - Tue, 16 Feb 2016 12:45:40 EST ID:5q2tULje No.35176 Ignore Report Quick Reply
If you need incentive: There is a whole bunch of system calls in these Sharp calculators where you can access the largely undocumented rom codes.
And there is a micro jack port which is used as a modem port to transfer between machines, props if you make a synth out of it.
>>
Eliza Marringtat - Tue, 16 Feb 2016 14:00:35 EST ID:5q2tULje No.35179 Ignore Report Quick Reply
Also, although I haven't tried there's MSX basic, with a quite active scene around them. Seriously if you code basic you do it on a vintage machine or at least an emulator.
And you learn it by reading the Handbook, as they are very simple languages (Different variants of BASIC) which you can learn to grasp in their entirety which is quite something considering the complexity of modern languages.
>>
Augustus Parrypen - Mon, 29 Feb 2016 10:11:18 EST ID:v+xSbxsp No.35252 Ignore Report Quick Reply
1456758678474.png -(273042B / 266.64KB, 400x600) Thumbnail displayed, click image for full size.
OP here. got the programming on the kindle thing figured out.
but now I have a new problem

turning on bluetooth isn't difficult, but takes like 8 swipes\taps and that's 6 too many for me. in the BASIC app, the code to turn on Bluetooth is "BT.OPEN", then, if your bluetooth isn't on, you are asked permission to turn it on. Simple! only 2 taps. HOWEVER, I can't for the life of me find a way to open a text file directly from the homescreen. (Though if you open it through the file explorer it will actually open it from the BASIC app by default, sweet!) I'm looking into getting android studio on my computer to just build my own simple apps like this, but it kind fo defeats the purpose of this project.

anybody know anything bout that?


<<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.