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> | |
using namespace std; | |
class BST | |
{ | |
struct node | |
{ | |
int data; | |
node* left; |
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
/* C++ program to find Inorder successor in a BST */ | |
#include<iostream> | |
using namespace std; | |
struct Node { | |
int data; | |
struct Node *left; | |
struct Node *right; | |
}; | |
//Function to find some data in the tree |
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
/* | |
ADXL335 | |
note:vcc-->5v ,but ADXL335 Vs is 3.3V | |
The circuit: | |
5V: VCC | |
analog 1: x-axis | |
analog 2: y-axis | |
analog 3: z-axis | |
*/ | |
const int xpin = 1; // x-axis of the accelerometer |
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 <SoftwareSerial.h> | |
SoftwareSerial WinHtutBT(7, 6); | |
int i = 0; | |
void setup() { | |
Serial.begin(9600); | |
pinMode(2,OUTPUT); | |
pinMode(3,OUTPUT); | |
pinMode(4,OUTPUT); |
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
<?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
#!/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
:: 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
import random | |
import time | |
import sys | |
import string | |
def generate_random_guess(chars): | |
return random.choice(chars) | |
def repeated_guesses(target): |