Wednesday, May 28, 2014

iphone - AVFoundation, how to turn off the shutter sound when captureStillImageAsynchronouslyFromConnection? - Stack Overflow

iphone - AVFoundation, how to turn off the shutter sound when captureStillImageAsynchronouslyFromConnection? - Stack Overflow: "Then I used third-party app to extract photoShutter.caf from Documents directory (DiskAid for Mac). Next step I opened photoShutter.caf in Audacity audio editor and applied inversion effect, it looks like this on high zoom:"




Tarjan's strongly connected components algorithm - Wikipedia, the free encyclopedia

Tarjan's strongly connected components algorithm - Wikipedia, the free encyclopedia: "The basic idea of the algorithm is this: a depth-first search begins from an arbitrary start node (and subsequent depth-first searches are conducted on any nodes that have not yet been found). As usual with depth-first search, the search visits every node of the graph exactly once, declining to revisit any node that has already been explored. Thus, the collection of search trees is a spanning forest of the graph. The strongly connected components will be recovered as certain subtrees of this forest. The roots of these subtrees are called the "roots" of the strongly connected components. Any node of a strongly connected component might serve as the root, if it happens to be the first node of the component that is discovered by the search."



'via Blog this'

Twenty Questions for Donald Knuth | | InformIT

Twenty Questions for Donald Knuth | | InformIT: "I know that my books still aren't terribly easy to fathom, even for geeks. But I could have made them much, much harder."



'via Blog this'

Monday, May 12, 2014

SpinFX: Persistence of Vision Poi and Phoenix LED Hoop by Lauren Shaw — Kickstarter

SpinFX: Persistence of Vision Poi and Phoenix LED Hoop by Lauren Shaw — Kickstarter: " Share 14 Tweet Embed
User customizable and reprogrammable LED flow toys. IR and Android wireless control. Create and add custom graphics, text and logos."



'via Blog this'

Phoenix Hoop - SpinFX LED Hoops

Phoenix Hoop - SpinFX LED Hoops:




NeoPixel Punk Collar - LED studs! - YouTube

NeoPixel Punk Collar - LED studs! - YouTube: ""



'via Blog this'
make -k Family && Family g++ Family.cpp -o Family Test Case #0...PASSED Test Case #1...PASSED Test Case #2...PASSED Test Case #3...PASSED Test Case #4...PASSED

Monday, May 05, 2014

setrlimit - Linux Command - Unix Command

setrlimit - Linux Command - Unix Command: "RLIMIT_CPU
CPU time limit in seconds. When the process reaches the soft limit, it is sent a SIGXCPU signal. "



'via Blog this'

Sunday, May 04, 2014

The Story of Sukhasiddhi | Khenpo Tsültrim Gyamtso Rinpoche | Teachings and Activities

The Story of Sukhasiddhi | Khenpo Tsültrim Gyamtso Rinpoche | Teachings and Activities: "o it
is on the basis of having a lot of suffering and difficulties that one is able to
practice the dharma very well. In order to meditate upon mahamudra, one
needs to have problems and difficulties. If one doesn't have problems, but is
just happy, one won't meditate and will just be distracted."



'via Blog this'

Saturday, April 26, 2014

swissmiss | Static Happiness

swissmiss | Static Happiness: "Static Happiness

“There is no such thing as static happiness. Happiness is a mixed thing, a thing compounded of sacrifices, and losses, and betrayals.”
- John Updike"



'via Blog this'

Monday, April 21, 2014

MC vs. StarDust - Quarterfinal Ro8 - WCS Europe 2014 Season 1 - StarCraft 2 - YouTube

MC vs. StarDust - Quarterfinal Ro8 - WCS Europe 2014 Season 1 - StarCraft 2 - YouTube: ""



'via Blog this'

HouseNumbers.cpp

I'm really digging algorithms lately!
*** 1.  Street Numbers ***

A computer programmer lives in a street with houses numbered consecutively
(from 1) down one side of the street. Every evening she walks her dog by


leaving her house and randomly turning left or right and walking to the
end of the street and back. One night she adds up the street numbers of
the houses she passes (excluding her own). The next time she walks the


other way she repeats this and finds, to her astonishment, that the two
sums are the same. Although this is determined in part by her house number
and in part by the number of houses in the street, she nevertheless feels


that this is a desirable property for her house to have and decides that
all her subsequent houses should exhibit it.

Write a program to find pairs of numbers that satisfy this condition.
To start your list the first two pairs are: (house number, last number):



         6         8
        35        49

- Your program must compute 10 of these pairs of numbers.
- Your program must run no longer than a few seconds.
- Please submit your source code and the results.
#include <iostream>

using namespace std;

class HouseNumbers {

public:
  void findHouseNumbers() {
        
    long currentNum = 5;
    long currentHigh = 6;
    long lowSum = 10;
    long highSum = 6;
    long numFound = 1;

    while (numFound < 11) {

      while (highSum < lowSum) {
        currentHigh++;
        highSum += currentHigh;
      }

      if (highSum == lowSum) {
        cout << "pair " << numFound << " found : currentNum=" << currentNum;
        cout << " currentHigh=" << currentHigh << " lowSum=" << lowSum;
        cout << " highSum=" << highSum << endl;
        numFound++;
      } else {
        highSum -= currentHigh;
        currentHigh--;
      }

      lowSum += currentNum;
      currentNum++;
      highSum -= currentNum;

    }
    return;
    
  }
};


int main() {
  HouseNumbers *h = new HouseNumbers();
  h->findHouseNumbers();
}