Skip to content

Instantly share code, notes, and snippets.

/*
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
#include<stdio.h>
#include<conio.h>
#define arraysize 100//maximum array size
void negarr(void);//functiondeclare prototype
int main()
{
int arr[arraysize];//declare arraysize
int i,j;
#include <SoftwareSerial.h>
SoftwareSerial WinHtutBT(7, 6);
int i = 0;
void setup() {
Serial.begin(9600);
pinMode(2,OUTPUT);
pinMode(3,OUTPUT);
pinMode(4,OUTPUT);
@AungWinnHtut
AungWinnHtut / mmwrap.html
Created June 18, 2016 12:30 — forked from eimg/mmwrap.html
Inserting ZWSP between every syllables for better text wrapping for Myanmar text.
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>Break Wrap</title>
<style>
body {
background: #efefdd;
}
@mycodeschool
mycodeschool / BST_InorderSuccessor_CPP.cpp
Last active October 29, 2023 09:20
C++ program to find Inorder successor in a BST
/* 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
@eimg
eimg / mmwrap.html
Created June 15, 2012 10:50
Inserting ZWSP between every syllables for better text wrapping for Myanmar text.
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>Break Wrap</title>
<style>
body {
background: #efefdd;
}
@eimg
eimg / mmstrlen.php
Created May 31, 2012 12:03
Count no. of syllabes in a Myanmar Unicode string.
<?php
function mmstrlen($str) {
$standalones = array("ဤ", "၍", "ဪ", "၏", "၊", "။", "၌");
$consonants = array("က", "ခ", "ဂ", "ဃ", "င", "စ", "ဆ", "ဇ", "ဈ", "ည", "ဍ", "ဌ", "ဋ", "ဎ", "ဏ", "တ", "ထ", "ဒ", "ဓ", "န", "ပ", "ဖ", "ဗ", "ဘ", "မ", "ယ", "ရ", "လ", "ဝ", "သ", "ဟ", "ဠ", "အ");
$numbers = array("၀", "၁", "၂", "၃", "၄", "၅", "၆", "၇", "၈", "၉");
$len = mb_strlen($str, "UTF-8");
$count = 0;
for($i = 0; $i < $len; $i++) {