Skip to content

Instantly share code, notes, and snippets.

View moomdate's full-sized avatar
🍋
~/.profile

moomdate moomdate

🍋
~/.profile
  • bangkok
View GitHub Profile
#include <stdio.h>
#include <string.h>
#define lineLR 2 // 0xa,0d
#define maxSizeInLine 41
#define sectorSize maxSizeInLine*4
#define maxLine 97
char data[maxLine][maxSizeInLine]; // line * char num
char buffer;
int maxString = 50;
var header = Array(); var jsonData = {};
$("html body table tbody tr td table tbody tr td font a").each(function (i, v) {
header[i] = $(this).attr("href");
})
for (var i = 0; i < header.length; i++) {
var data = header[i];
var courseId = data.split("=")[3].split("&")[0];
var courseCode = data.split("=")[4].split("&")[0];
//var courseId = data.split("a");
if (courseCode.length > 3) {
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(A0, INPUT);
}
float u, y;
int p = 0;
void loop() {
u = (float)analogRead(0) * 5;
#define BAUD 9600
#include <avr/io.h>
#include <util/delay.h>
#include <util/setbaud.h>
void uart_init(void) {
UBRR0H = UBRRH_VALUE;
UBRR0L = UBRRL_VALUE;
#if USE_2X
UCSR0A |= _BV(U2X0);
#include<stdio.h>
#include<string.h>
#include <stdlib.h>
#define EndSign ':'
#define MarkMaxBufferPage 20
void searchName(char * fileName); // search file
void filterPageToArray(int pS,int pE); // data string to num array
int getEndSign(int startAt); //get position of end string
int MarkerPage[MarkMaxBufferPage]; // buffer
void printfPageOfMarker(); // print lst
#include<stdio.h>
#include<string.h>
#include <stdlib.h>
#define EndSign ':'
#define MarkMaxBufferPage 20
int searchName(char * fileName); // search file
void filterPageToArray(int pS,int pE); // data string to num array
int getEndSign(int startAt); //get position of end string
int MarkerPage[MarkMaxBufferPage]; // buffer
void printfPageOfMarker(char *); // print lst
// Example By ArduinoAll
// more info https://www.arduinoall.com/b/141
#include <SoftwareSerial.h>
#include <Servo.h>
byte countByte = 0;
byte byteTemp[3];
byte tt;
int serAng = 90;
int serAngy = 90;
int ppx = 0;
#include <SoftwareSerial.h>
#include <Servo.h>
#include <PWM.h>
byte countByte = 0;
int byteTemp[4];
bool change = false;
int tt = 0;
int serAng = 90;
int serAngy = 90;
#include<string.h>
#include<stdio.h>
#define true 1
#define flase 0
typedef int bool;
bool isPalindrome(char*);
void findPalindrome(char * dataInput);
int main(){
char * input = "1123456";
"use strict";
const line = require("@line/bot-sdk");
const express = require("express");
const config = require("./config.json");
const axios = require("axios");
// create LINE SDK client
const client = new line.Client(config);
const app = express();