This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import time | |
import sys | |
import string | |
def generate_random_guess(chars): | |
return random.choice(chars) | |
def repeated_guesses(target): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Inspired by Linux version of the same https://gist.github.com/christopherperry/3208109 | |
@echo off | |
SET ARGUMENTS=%~1 | |
if "%ARGUMENTS%" == "" ( | |
GOTO EOF | |
) | |
SET "ARGUMENTS=%ARGUMENTS:""="%" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script adb+ | |
# Usage | |
# You can run any command adb provides on all your currently connected devices | |
# ./adb+ <command> is the equivalent of ./adb -s <serial number> <command> | |
# | |
# Examples | |
# ./adb+ version | |
# ./adb+ install apidemo.apk | |
# ./adb+ uninstall com.example.android.apis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function mmstrlen($str) { | |
$standalones = array("ဤ", "၍", "ဪ", "၏", "၊", "။", "၌"); | |
$consonants = array("က", "ခ", "ဂ", "ဃ", "င", "စ", "ဆ", "ဇ", "ဈ", "ည", "ဍ", "ဌ", "ဋ", "ဎ", "ဏ", "တ", "ထ", "ဒ", "ဓ", "န", "ပ", "ဖ", "ဗ", "ဘ", "မ", "ယ", "ရ", "လ", "ဝ", "သ", "ဟ", "ဠ", "အ"); | |
$numbers = array("၀", "၁", "၂", "၃", "၄", "၅", "၆", "၇", "၈", "၉"); | |
$len = mb_strlen($str, "UTF-8"); | |
$count = 0; | |
for($i = 0; $i < $len; $i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Break Wrap</title> | |
<style> | |
body { | |
background: #efefdd; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Shortcut Key creation | |
protected override bool ProcessCmdKey(ref Message msg, Keys keyData) | |
{ | |
if (keyData == (Keys.Control | Keys.T)) | |
{ | |
MessageBox.Show("What the Ctrl+T?"); | |
return true; | |
} | |
return base.ProcessCmdKey(ref msg, keyData); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
requestWindowFeature(Window.FEATURE_NO_TITLE); | |
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, | |
WindowManager.LayoutParams.FLAG_FULLSCREEN); | |
setContentView(R.layout.activity_cadet_ibook_anylist); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
See the instructions below | |
If you are still unable to use Eclipse to download the ADT plugin as a remote update site, you can download the ADT zip file to your local machine and manually install it: | |
Download the ADT Plugin zip file (do not unpack it): ADT-22.3.0.zip http://dl.google.com/android/ADT-22.3.0.zip | |
Start Eclipse, then select Help > Install New Software. | |
Click Add, in the top-right corner. | |
In the Add Repository dialog, click Archive. | |
Select the downloaded ADT-22.3.0.zip file and click OK. | |
Enter "ADT Plugin" for the name and click OK. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.spinnertest; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.ArrayList; | |
import java.util.List; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.view.View; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include<string> | |
using namespace std; | |
class Distance | |
{ | |
private: | |
int feet; | |
float inches; | |
public: | |
void getdist() |
OlderNewer