Skip to content

Instantly share code, notes, and snippets.

View LanKuDot's full-sized avatar
😫
Working on new project

Kun-Yi Li LanKuDot

😫
Working on new project
View GitHub Profile
private void CheckCalculated()
{
var sample = _splineFollower.result;
var playerPosition = player.transform.position;
var calculatedPosition =
sample.position +
sample.right * _splineMotion.offset.x +
sample.up * _splineMotion.offset.y;
Debug.Log(Vector3.Distance(playerPosition, calculatedPosition));
# This .gitignore file should be placed at the root of your Unity project directory
#
# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore
#
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/[Ll]ogs/
ForegroundColour=208,208,208
BackgroundColour=21,21,21
CursorColour=253,157,79
Black=21,21,21
BoldBlack=80,80,80
Red=172,65,66
BoldRed=194,94,94
Green=183,232,74
BoldGreen=196,224,137
Yellow=244,191,117
/* Receive the controlling message, turning on/off and pwm, and
* than set the corresponding pin.
*/
#include <LWiFi.h>
#define SSID "AP_SSID"
#define PASSWD "AP_PASSWD"
#define TCP_IP "192.168.xxx.xxx"
#define TCP_PORT 5000
[alias]
st = status -s
lg = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
log-between = log --decorate --pretty=format:\"%C(yellow)%h%C(reset) %C(bold cyan)%>(15)%an%C(reset) %C(bold green)(%ad)%C(reset) %s%C(bold yellow)%d%C(reset)\" --date=format-local:\"%Y-%m-%d %H:%M\"
log1 = log --oneline
pushfwl = push --force-with-lease
commend = commit --amend
cm = commit
stag = tag -s
diffw = diff --word-diff
int abs(int x)
{
return (x ^ (x >> 31)) - (x >> 31);
}
/**
* Return an array of size *returnSize.
* Note: The returned array must be malloced, assume caller calls free().
*/
int* findClosestElements(int* arr, int arrSize, int k, int x, int* returnSize) {
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
int main(){
float fl;
double dou;
union data{
/* Declare array of char pointers */
char *argvList[ MAX_ARGVS ];
/* Parse the input */
void GetArgumentList( char *inputBuffer, char *argvs[] )
{
char *token;
/* The initial number of arguments is 0 */
int numOfArgvs = 0;
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <omp.h>
#define MAX 10
void Count_sort( int *, int, int );
int main ( int argc, char *argv[] )
read -p "Please input the filename(no extension): " filename
echo -e "Setting envirnoment"
export PATH="/home/pumpkin/sde/bin:$PATH"
echo -e "\nTransform assembly code to object file: $filename.o"
sde-as "$filename".s -g -o "$filename".o
echo -e "\nLine object file to image file: $filename.image"
sde-ld "$filename".o -Ttext 0x00008000 -o "$filename".image