sudo apt-get update
sudo apt-get install git
cd ~
git clone --recursive https://github.com/CartoDB/cartodb20.git
/** | |
* Generates number of random geolocation points given a center and a radius. | |
* @param {Object} center A JS object with lat and lng attributes. | |
* @param {number} radius Radius in meters. | |
* @param {number} count Number of points to generate. | |
* @return {array} Array of Objects with lat and lng attributes. | |
*/ | |
function generateRandomPoints(center, radius, count) { | |
var points = []; | |
for (var i=0; i<count; i++) { |
public class PalindromeMaker { | |
public String make(String baseString) throws Exception{ | |
int[] hash= new int[26]; | |
for(int i=0;i<baseString.length();i++){ | |
char ch=baseString.charAt(i); | |
if(ch<'A' || ch>'Z') throw new Exception("Wrong Input"); | |
hash[ch-'A']++; | |
} | |
boolean check=false; | |
StringBuilder begin=new StringBuilder(); |
sudo apt-get update
sudo apt-get install git
cd ~
git clone --recursive https://github.com/CartoDB/cartodb20.git
import java.util.Arrays; | |
class Solution { | |
public int solution(int K, int[] A) { | |
Arrays.sort(A); | |
return getKC(K, A); | |
} | |
public int getKC(int K, int[] A) { |
import sys | |
import cv | |
class FaceDetect(): | |
def __init__(self): | |
cv.NamedWindow ("CamShiftDemo", 1) | |
device = 0 | |
self.capture = cv.CaptureFromCAM(device) | |
capture_size = (320,200) | |
cv.SetCaptureProperty(self.capture, cv.CV_CAP_PROP_FRAME_WIDTH, capture_size[0]) |
//***************************************************************************** | |
/// @file | |
/// @brief | |
/// Arduino SmartThings Shield LED Example | |
//***************************************************************************** | |
#include <SoftwareSerial.h> //TODO need to set due to some weird wire language linker, should we absorb this whole library into smartthings | |
#include <SmartThings.h> | |
#define PIN_THING_RX 3 |
RDBMS-based job queues have been criticized recently for being unable to handle heavy loads. And they deserve it, to some extent, because the queries used to safely lock a job have been pretty hairy. SELECT FOR UPDATE followed by an UPDATE works fine at first, but then you add more workers, and each is trying to SELECT FOR UPDATE the same row (and maybe throwing NOWAIT in there, then catching the errors and retrying), and things slow down.
On top of that, they have to actually update the row to mark it as locked, so the rest of your workers are sitting there waiting while one of them propagates its lock to disk (and the disks of however many servers you're replicating to). QueueClassic got some mileage out of the novel idea of randomly picking a row near the front of the queue to lock, but I can't still seem to get more than an an extra few hundred jobs per second out of it under heavy load.
So, many developers have started going straight t
/* Getopt for GNU. | |
NOTE: getopt is now part of the C library, so if you don't know what | |
"Keep this file name-space clean" means, talk to [email protected] | |
before changing it! | |
Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001 | |
Free Software Foundation, Inc. | |
This file is part of the GNU C Library. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public |
All updates now moved over to https://github.com/dconnolly/Chromecast-Backgrounds
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\