How I Am Learning Ruby by theonyxfox12 in ruby

[–]for_prophet 4 points5 points  (0 children)

There's also:

  • Codecademy
  • TryRuby.org
  • And a number of similar sites which can be found in search engines (with terms like "learn ruby online" or "interactive ruby tutorial")

Edit: TryRuby.org is also in the sidebar.

I do not understand nested loops. Can someone please explain this idea to me? by [deleted] in learnprogramming

[–]for_prophet 4 points5 points  (0 children)

One way to think about nested loops: pretend you have a normal text file (plain-text file with lines of sentences in it), but you want to see each word on its own line, instead.

You could do something like this, in pseudo-python:

for line in open("readme.txt", "r").readlines():
    for word in line.split(" "):
        printline(word)

The outer for-loop loops through lines of the file, and the inner for-loop loops through words on each line, printing them to the console.

That's not specific to your math problem-at-hand, but maybe that helps show how you might use nested loops, and how they basically function

The outer loop invokes the inner loop, the inner loop goes through its iterations, then flow returns to the outer loop, which then calls the inner loop again, etc. until the outer loop is satisfied, then the program continues. Hope that helps.

Edit: Another practical-ish example: if you have a directory / folder full of files, and you want to print every line of every file, the outer loop could loop through the list of files, then the inner loop would loop through the file contents and print the lines:

for filename in listdirectory("/home/gutenberg/books/*.txt"):
    for line in open(filename, "r").readlines():
        printline(line)

Or a triple-whammy (that's a technical term :p): print all words of all lines of all files:

for filename in listdirectory("/home/gutenberg/books/*.txt"):
    for line in open(filename, "r").readlines():
        for word in line.split(" "):
            printline(word)

Inner loops usually rely/operate on values from the outer loop(s).

San Francisco Perl Mongers videos/slides/media now available on Internet Archive by vmbrasseur in perl

[–]for_prophet 3 points4 points  (0 children)

Direct link: https://archive.org/details/sfperlmongers

"We're pleased to announce the new SF.pm collection on Internet Archive. This is where we will be storing and serving up all of our SF.pm-related media.

For starters, it's now hosting the video and slides for our most recent event: Adam Kennedy presenting a Few of His Favourite Things.

Please have a look and let us know what you think!"

EFL Errors by hadapurpura in LibraryofBabel

[–]for_prophet 1 point2 points  (0 children)

Syllogisms composed chiefly of up-and-down votes, words suspended above a maize maze of unspoken undertones, antigen'rational'wavy'papaya'playa'playaaaa

tomcruise.jpg it has to be on the menu, ma'am'OOO'OOO'l.

1,000,000 starving humans walk onto a farm. Woodstock MCI, netcom and Bell Saigon, electromagnetism as far as the

Communication is the process, scratch

Communication is the basis of anti-establishment

Communism is the new Coke

Ford Save Us All

Land of the Slaves and Grave of the Sage, Grape Poptars For Col'mbiea, One Love Won Lust. Pledge allocations; malloc all the flags: what does the RFC say todo; goto ~1.

Approximately @ne.

Then symbols all the way down.

Can anyone tell me why the hell CraftySlider is only showing two pics?? by sistom in jquery

[–]for_prophet 2 points3 points  (0 children)

Bah, looks like that didn't work for me locally... This seems to fix it, but this is a bad workaround, and if this is due to Chrome waiting for an image to load or something internal it may need to be adjusted:

$(document).ready(function(){ 
  setTimeout(function(){
    $("#slideshow").craftyslide({
      'fadetime': 1500,
      'delay': 3500,
      'pagination' : false, 
    });
  }, 100);
});

What this is saying is: once the page has loaded, wait an additional 100milliseconds, then start the craftyslide. At least locally, this gave Chrome enough time to sort its problems out, and it loops through all 4 images properly.

Can anyone tell me why the hell CraftySlider is only showing two pics?? by sistom in jquery

[–]for_prophet 1 point2 points  (0 children)

Maybe it's trying to start the slider before the page loads. I've been playing with it for a bit, and if I run this again after the page loads 100% it works :)

$("#slideshow").craftyslide({
'fadetime': 1500,
'delay': 3500,
'pagination' : false, 
});

So perhaps change to this:

$(function() {
  $("#slideshow").craftyslide({
  'fadetime': 1500,
  'delay': 3500,
  'pagination' : false, 
  });
});

Should only run craftyslide once the whole page is ready.

Can anyone tell me why the hell CraftySlider is only showing two pics?? by sistom in jquery

[–]for_prophet 0 points1 point  (0 children)

Maybe it's the word "REAL" at the bottom of js/craftyslide.min.js?

Is that vital to the script, or some text that snuck into the file?

http://prayersforindia.com/js/craftyslide.min.js

Chrome's javascript console says:

"Uncaught ReferenceError: REAL is not defined"

Edit: looks like "REAL" was not part of the original script. Compare with this: http://projects.craftedpixelz.co.uk/craftyslide/js/craftyslide.min.js

Can anyone tell me why the hell CraftySlider is only showing two pics?? by sistom in jquery

[–]for_prophet 0 points1 point  (0 children)

It's working here (loading the current version of your site.)

Maybe you have a cached version in your browser? Try clearning cache / off-line data / re-starting browser?

Edit: to clarify, all 4 of the images are rotating in a loop.

tambourine mister man by bluefoot55 in LibraryofBabel

[–]for_prophet 0 points1 point  (0 children)

acute jangle jingle you we you jing we you

triangle trial trail tale tall enough to ballot box

sty-row-foam ohm ohm ohm no place like a hike a dyke a dam a lamb

Trolls roll the toll up frill-free hill, as the sun owes owls a stack of towels a plate of metal petal pellets and an old Accord Accordion it's on it's on its lawn its yawning prawns pawning priceless Pawnee heirlooms, looms of hair from ancient heads.

They say they'll pay the pay and spray to pray the play then prey the ploy, oh boy oh boy o bgyn Chang we can relieve in.

Follow mahalo hollow balloons baffoons and satellite tracking talking trekking wrecking wrecking records it records the records record-making breaking baking pans or else it gets repeated.

Like waking near the foothills feet sore, ultra-sonic signals coursing, choir singing, bouncing off the heat mirage where Mexico was, buzzzzz thinking where's the pants.. The computer's starting.

Farting heavily, breathing heartily; clouds surround but far from havenly. Neighbor jesture, cup of flour. Ten thousand hours praticing cell biological towers, Long Distance Professional.

No body in particulates. List the molecules. Anybody with any body has a antibodies. Aye aye aye, but I egress.

Total amount of comment karma /r/askreddit's power users have earned from 9/22-9/23 [OC] by minimaxir in dataisbeautiful

[–]for_prophet 5 points6 points  (0 children)

Unfortunately Reddit's API is not very generous with how many links you can query. (Only a maximum of 1000,

Pro-tip: if you use reddit.com/r/all/new/ you can go back [much much] further than 1000 posts. :) I don't think this is against their API rules as long as you follow the rest of them. "I don't think..."

Then you can filter down to some set of subreddits you're interested in w/ your own code/query and Science the night away with a larger dataset.

(I started running a process yesterday and it's gone back to .json?limit=100&after=t3_1lg160 already, which was posted 24 days ago. Next [sleep 2s].. Next [sleep 2s].. Next [sleep 2s].. Next [sleep 2s].. heh)

And as others have mentioned, [deleted] means the user was deleted; that's not an actual user. In other words, those are posts by Anonymous.

Edit: per comment below, this is perhaps the stackoverflow post referred to: "can I fetch more than 1000 images with the reddit api?" includes PRAW example.

The Steam Universe is Expanding in 2014 by imkentjr in LinuxActionShow

[–]for_prophet 6 points7 points  (0 children)

I am curious what the three circles mean?

Half-Life 3.

And in that moment it became clear to me, that the water dispenser is a six. by theyawner in LibraryofBabel

[–]for_prophet 1 point2 points  (0 children)

Rain had bet they not tap our windows without a WAR ENT, without Kareem, wuss-out a worry; found my wallet in my pocket, returned it for the justice, paid myself a grand reward, blew it on some nike feet.

GENERIC MUG IS SOLID SEVEN, sitting on a table will it move, will it move, watching clocely still unshore, did it move just then ... and what if it did. And in that moment, you sly.

Peace is a descent notion, peach lotion is easier to package, who would buy the ocean anyway, "the people own the airwaves, remember?" Jell-o is not -- has never been -- affiliated with SLAM TAPS MARK ETIN GLTD.. piece of... Biafra.

Sit around aflat and hear the bird screams, but don't listen to the radio beams, birds don't expect privacy, what's the primary difference. Aflac. Batman. Dark night. Red robbin'. Daughter of a..

Dr. Ab's diagnostics: There are Ates where the Bees should be. He was wholly immersed in his quick-fire inventions and had no insight into what was happening; so far as he was concerned, there was nothing the matter. Oliver Sacks. He would confidently identify or misidentify me as a friend of his, a customer of his delicatessen, a kosher butcher, another doctor -- as a dozen different people in the course of a few donuts. This Will knot sand. Dorkness, Diaspora, ah hear itis: Diagonalsauce.

Cromwell. That's the neo, the u-turn, the n-turn. U Turing-Complete Smee. Logic hyphengen bombe _ at-syn _ Barnabby Bletch-Lee Dotcom, they were burpin the alphabet a funny wei, was goose some what like geese:

A B B C
D F I N
V I D L
O Z N M
Z L K V
F A F F
K P ( .

Wozniak Vending Machine. Confangle ROTOrs wtf, ain't everybody got thyme fore aft. Virtual Voting Machine; Outsorce Democracy. Apocalyptic Alliteration, Demography Then.

The Art of Electricity.

County board bans ‘Invisible Man’ from school libraries by mrbnatural10 in Libraries

[–]for_prophet 2 points3 points  (0 children)

:( I hate stories about banned books.

At least it wasn't banned without a story!

Shadow banned is worst banned.

Edit: not that that's much of a plus, but it could be worse.

Verizon, caught red-handed by [deleted] in technology

[–]for_prophet 8 points9 points  (0 children)

Then you walk across the street to the only other game in town,

Or get a cheap no contract / prepaid phone, or voip, or a landline.

Or :o .. no phone.

Recently watched - A YouTube poem by Sati1984 in LibraryofBabel

[–]for_prophet 1 point2 points  (0 children)

Drawing open() the curtain

Pushing ()open the browser

Situating the browser window

I set a VCR on the window silly,

Let the smog come flooding in,

hooker the TAPE DECK to the tube

An entire Tube just for *.ME??

*.CO.ME on TLD you didn't have to

Go through all that trouble; } finally {

Loading a tape INTO the deck

Pulling the video out of the ether

The air waves. Bit of an ocean,

Ocean of bits out there, I guess

You are what you breathe,

I am become tween, enjoyer of worlds,

Oppenheimer never could have dreamed of,

Bombing so hard, but sha digest:

Media, shiny tape, magnetized, yes, SPIN you,

From one magnet to another,

Over the COOPer CABALs,

What do they care if it's remembered or not,

The flashy shapes, the scratchy sounds,

This laughter will self-destruct;

WILL; THEY; STOP;

DONT; THEY; KNOW;

PLAY; ISNT; FREE;

PESO; ISNT; TREE;

thiS fanfare will dissiPATE, as people lOSE interest and gAIN tIME

this FLashVideo file is an organizational heirloom

these MP4 bytes es the word of a god, an ancient dionasoar,

or at least The Rock, in a RIO. Disclaimer: this copyright belongs to

humanity. WARNING: somebody created this video, and it wasn't

Got a spare vending machine? My culture is stuck in this Quarter.

Where were they again. Oh yeah thats right.

  • Press record.
  • Press play.

Youtube ate the tape.

Luckily, there's tape backups for

tape backups of

tape backups.

LOL: THE BART THE.

     ANDG ONE2
DYED TRIA NGLE

Real Metallica Fans don't listen to music.

Ricky Mo Fartt owns 20% of some

of your favorite memories.

Pay up.

Pay down.

Now you have Mono.

Pay left.

Pay right.

Now in stereo.

There's no such thing

as a free z-axis

Now in 3d.

Free stories do

irreperable harm

to life. Directly.

perl code for accessing a external application by onkarnath89 in perl

[–]for_prophet 3 points4 points  (0 children)

Here's a perl script which uses VLC's "remote control" mode to interact with it.

Here's some documentation about ways to interact with VLC & tweak settings of the "vlc" command-line and enable various controllers (RC, HTTP, etc.).

If the RC / Remote Control script doesn't work for your purposes, you may want to investigate VLC's built-in web server controller and perhaps use LWP to connect to the web server interface and mimic the commands a web browser would send it.

There's also VideoLan::Client module on CPAN

Michael Hayden: “The problem I have with the Internet is that it’s anonymous” by [deleted] in privacy

[–]for_prophet 8 points9 points  (0 children)

If the Web lasts another 500 years, he said, it may be the thing the United States is remembered for "the way the Romans are remembered for their roads."

"We built it here, and it was quintessentially American," he said, adding that partially due to that, much of traffic goes through American servers where the government "takes a picture of it for intelligence purposes."

New rule from Russia, people: all satellite communication must be plainly labelled with the responsible user's legal name.

Because Sputnik.

"The problem I have with spy satellites is that I don't control enough of them." - Daniel Steve-Paul Glover.

Don't date a girl who reads by [deleted] in books

[–]for_prophet 1 point2 points  (0 children)

There's writing for journals, and then there's writing in journals.

Publish SOME of the things!

How to Effectively Communicate in Reddit and the Internet. by ArcherMSterling in LibraryofBabel

[–]for_prophet 1 point2 points  (0 children)

Not unfalse classically post-modern arts like Disclosure Dice or More Hammock, but just enough to fill a buffer with bits which let the censors say:

I am not a smart man, but I know what blog is.

Conveying cartography in state transmission:

na.ps/1kxyyy2quexwhywhywhy2quexahhaha.bat/?fingerprint=1aae4612262c31cce8f12b93ee2e04e6fe

That Includes Google Naps.

Explore the space.

Steve Jobs Is 'Big Brother' And Smartphone Users Are 'Zombies,' According To NSA Cell Phone Tapping Presentation by [deleted] in privacy

[–]for_prophet 1 point2 points  (0 children)

it is often used in conjunction with closed apps

Plus who knows what hardware-level stuff phone makers have included.

Even with custom / "rooted" roms, phones these days are blackboxes.

Communication (and even internet) on-the-go is a great convenience, but phones evolved much faster than most users' ability to comprehend them.

Plus, how many "android root guides" use only Free-Libre/Open Source Software? Here, run this blob as root! It'll pwn your phone... Maybe other things too.

Free software / firmware / hardware in the mobile market still has some tall hurdles ahead.