Skip to content

Instantly share code, notes, and snippets.

View hanjae-jea's full-sized avatar

Hanjae hanjae-jea

View GitHub Profile
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
//student 구조체 정의
typedef struct student {
char name[100]; //이름
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
typedef struct student {
int id;
char name[20];
student *next;
}student;
int main() {
// 예제 1
@hanjae-jea
hanjae-jea / mopa.py
Created December 17, 2017 16:59
mopa
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")
@hanjae-jea
hanjae-jea / CoDrone.cpp
Created September 13, 2017 12:13
코드론
#include <CoDrone.h>
void setup(){
CoDrone.begin(115200);
CoDrone.AutoConnect(NearbyDrone);
CoDrone.FlightEvent(TakeOff);
PITCH = 60;
CoDrone.Control();
delay(1500);
PITCH = 0;
@hanjae-jea
hanjae-jea / 0829.cpp
Last active August 30, 2017 03:32
0829.cpp
#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);
@hanjae-jea
hanjae-jea / hi.cpp
Last active May 28, 2017 09:45
calloc
#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));
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>벽돌깨기</title>
<script type="text/javascript">
var myBody = null;
var canvas = null;
var context = null;
var width_canvas = 0;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>벽돌깨기</title>
<script type="text/javascript">
var myBody = null;
var canvas = null;
var context = null;
var width_canvas = 0;
var GrandParent = $Class({
value: '할아버지'
});
var Parent = $Class({
value: '아버지',
getGrandFather: function(){
LOG(this.$super.value);
}
}).extend(GrandParent);
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support import expected_conditions as EC
import time
driver = webdriver.Firefox()
driver.get("https://www.packtpub.com/packt/offers/free-learning")