This file contains hidden or 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 <stdio.h> | |
#include <stdlib.h> | |
// to make chart[100][1000] in function | |
void main() | |
{ | |
int **chart = (int**)calloc(100, sizeof(int*)); | |
for (int i = 0; i < 100; i++) { | |
chart[i] = (int*)calloc(1000, sizeof(int)); | |
} |
This file contains hidden or 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 <CoDrone.h> | |
int mode = 0; // 0 none 1 start 2 running | |
int index = 0, fly = 0; | |
int throttleCount = 0; | |
int yy[800], tt[800], rr[800], pp[800]; | |
void setup() { | |
CoDrone.begin(115200); |
This file contains hidden or 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 <CoDrone.h> | |
void setup(){ | |
CoDrone.begin(115200); | |
CoDrone.AutoConnect(NearbyDrone); | |
CoDrone.FlightEvent(TakeOff); | |
PITCH = 60; | |
CoDrone.Control(); | |
delay(1500); | |
PITCH = 0; |
This file contains hidden or 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
def args_func(first, second, *args, **kwargs): | |
print("first: ", first) | |
print("second: ", second) | |
for arg in args: | |
print("*argv 인자 ", arg) | |
for key, value in kwargs.items(): | |
print("*kwargs %s -> %s" % (key, value)) | |
args_func(5, "구구", 12,34,56,ff=99,name="HJ",club="catdog") |
This file contains hidden or 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 <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
typedef struct student { | |
int id; | |
char name[20]; | |
student *next; | |
}student; | |
int main() { | |
// 예제 1 |
This file contains hidden or 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
#define _CRT_SECURE_NO_WARNINGS | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <time.h> | |
//student 구조체 정의 | |
typedef struct student { | |
char name[100]; //이름 |
This file contains hidden or 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
/* // 1번 | |
#include <stdio.h> | |
int arr[105][105] = {0,}; // 배열 크기는 넉넉하게 0으로 초기화 | |
int main(void) | |
{ | |
int n, m; | |
scanf("%d %d", &n, &m); // 입력 | |
This file contains hidden or 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 <stdio.h> | |
#include <stdlib.h> | |
typedef struct node{ | |
char value; | |
struct node* parent; | |
struct node* left, *right; | |
}node; | |
typedef node* p_node; | |
void inorder(p_node node){ |
This file contains hidden or 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 <stdio.h> | |
char inp[100]; | |
char st[100]; | |
int top = 0; | |
void push(char c){ | |
st[top++] = c; | |
} | |
char pop(){ | |
if( top == 0 ) return -1; | |
return st[--top]; |
This file contains hidden or 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 serial #Serial imported for Serial communication | |
import time #Required to use delay functions | |
ArduinoSerial = serial.Serial('/dev/cu.usbmodem1421',9600) #Create Serial port object called arduinoSerialData | |
time.sleep(2) #wait for 2 secounds for the communication to get established | |
print (ArduinoSerial.readline()) #read the serial data and print it as line | |
print ("Enter 1 to turn ON LED and 0 to turn OFF LED") | |