def foo(mylist):
    magic  = 0
    for i in range(len(mylist)-1):
...

Python Two loops on list

by Tafkas, October 20, 2011 03:19, 2 refactorings, tagged with loop, list

I want to apply some calcul...

693a4661eaa71435ce5ebe61de64c5a4 Talk
Class Student
  attr_accessor brain, explode, beer
  def initialize(brain, explode, beer)
...

Ruby Fun with School and Ruby

by https://www.google.com/accounts/o8/id?id=AItOawlnEdwkKfBeo4dr8z-lFGJGbJTlVlMWFgE, November 04, 2010 23:56, 1 refactoring, tagged with ruby, loop, student, school, beer

I am sure everyone has done...

55502f40dc8b7c769880b10874abc9d0 Talk
def create_something(min_value)
  loop do
    something = SomeClass.generate_random
...

Ruby loop a random generator unt...

by Alec Leitner, August 10, 2009 20:36, 5 refactorings, tagged with ruby, loop

This is my version of loopi...

72820eaf703cd07ba9bc6ecc09e5d81a Talk
[1]

{
...

Python Mapping confobject to objec...

by hyposaurus, June 01, 2009 13:21, 2 refactorings, tagged with loop

I am mapping objects (count...

D41d8cd98f00b204e9800998ecf8427e Talk
// routine for loading all grass sprites we can find
char buffer[32];
std::string setname = "jungle";
...

C++ Call sprintf_s only once

by Mizipzor, January 26, 2009 10:27, 6 refactorings, tagged with loop, C++, while, sprintf_s

Can this routine be done wi...

9e9bb40f93094055bd09193eb3bccbb8 Talk
$(document).ready(function(){
	// get the text file to be parsed
	$.get('test-data.txt', function(textData){
...

JavaScript Split text into unordered l...

by keif, January 23, 2009 17:10, 5 refactorings, tagged with javascript, loop, array, jquery, List

Using jQuery, I'm trying to...

802c73427a78116c398cfb6765be9c08 Talk
feed = RssParser.run("http://ws.audioscrobbler.com/1.0/user/me/recenttracks.rss")
  song1 = feed[:items][0][:title]
...

Ruby Think this needs a loop

by juo100@gmail.com, September 06, 2008 19:54, 3 refactorings, tagged with ruby, loop, noob

Im new to Ruby, I think it ...

B543a43dc8cb0aae562278484db60d25 Talk
<?php

$payload = array(array(
...

PHP Array and ForEach Loop

by goodespeler.myopenid.com, August 12, 2008 17:45, 1 refactoring, tagged with loop, array, foreach

Hi. I'm constructing an XML...

B04f7f475867f6b47a59b49dfabc0daf Talk
<?php
/*
 * This is a test of a rules based iterative algorithm...
...

PHP Rules Based Iterator

by James Stansfield, June 15, 2008 13:52, 1 refactoring, tagged with php, iterate, loop, array, rules

I had need for an iterative...

42e1363a474387e41af8f8219797e112 Talk
module Every
  @interval, @stopped = 0.0, true
  @numwords = {"one"=>1, "two"=>2, "three"=>3, "four"=>4, "five"=>5, "six"=>6, "seven"=>7, "eight"=>8, "nine"=>9,
...

Ruby Every repeat module

by Ryguy, June 13, 2008 18:38, 2 refactorings, tagged with ruby, loop

Loop a block of code every ...

Ba665f86f90a1982af7b9c857418fcdb Talk
def find_npa(dialed_nxx)
  
  nxx_819 = [ 205, 208, 210, 213, 243 ]
...

Ruby Array iteration

by Titanous, June 11, 2008 23:08, 2 refactorings, tagged with loop, array, iteration, each

I'm new to Ruby, so give me...

4b81fa52ec2103d12ecbd5993463b2b5 Talk
SCRIPT="gen_${1}.sql"
echo "--gen_${1}.sql" > $SCRIPT
typeset -i counter
...

Bash Slow bash for loop.

by furtive, February 07, 2008 19:57, 6 refactorings, tagged with speed, bash, loop

Here's a quick and dirty ba...

55502f40dc8b7c769880b10874abc9d0 Talk