Skip to content

Instantly share code, notes, and snippets.

View nodeobject.c
#include "Python.h"
#include "structmember.h"
typedef struct {
PyObject_HEAD
PyObject *value;
PyObject *left;
PyObject *right;
} PyNodeObject;
@louisom
louisom / ncafroc.py
Created Mar 26, 2017
國藝會爬蟲
View ncafroc.py
# -*- coding: utf-8 -*-
import collections
import csv
import requests
from lxml import etree
JOB_PAGE_URL = 'http://www.ncafroc.org.tw/platform/jobs.aspx?nowPage={page}&id=&msg2=new#A1'
JOB_ID_URL = 'http://www.ncafroc.org.tw/platform/jobs-single.aspx?id={id}'
View main.c
#include <stdio.h>
int main() {
{
int i = 10;
}
printf("%d\n", i);
}
View gist:f1bcb40f563b8ae875e907ec1f7bee44
請您回覆--學務長有約時間
收件匣
x
高應科大學務處 <daoffice01@kuas.edu.tw>
17:28 (7 分鐘前)
寄給 我
各位105學生議員大家好:
學務長想了解在議會FB公版中,對於議會指導老師之不同意之觀點與緣由,因此事可能涉及懲處,想請各位先表達意見,
@louisom
louisom / semi.c
Created Nov 27, 2016
Example semihosting code for Cortex-M4 stm32f429
View semi.c
#include <stdint.h>
static int semihost_call(int service, void *opaque)
{
register int r0 asm("r0") = service;
register void *r1 asm("r1") = opaque;
register int result asm("r0");
asm volatile("bkpt 0xab"
: "=r" (result) : "r" (r0), "r" (r1));
return result;
@louisom
louisom / cs_nctu_notify.py
Created Oct 25, 2016
看看交大資工的公告有沒有變化, 有的話就會播歌提醒你Q_Q
View cs_nctu_notify.py
# -*- coding: utf-8 -*-
import subprocess
from selenium import webdriver
compare_path = '/tmp/compare.png'
qq_path = '/tmp/qq.png'
webdriver.DesiredCapabilities.PHANTOMJS[
'phantomjs.page.customHeaders.accept-language'] = 'zh-TW;q=0.8'
@louisom
louisom / .config
Created Oct 2, 2016
f9 kernel .config
View .config
#
# Automatically generated make config: don't edit
# F9 Microkernel Configurations
#
#
# Platform
#
# CONFIG_BOARD_STM32F4DISCOVERY is not set
CONFIG_BOARD_STM32F429DISCOVERY=y
@louisom
louisom / ll.c
Created Sep 30, 2016
sysprog21_w2_qa from louielu
View ll.c
#include <stdio.h>
#include <stdlib.h>
typedef struct list {
int data;
struct list *next;
} LIST;
LIST *append( LIST *, int );
View ecp_array_pointer.c
/*
* This program coding from Expert C Programming.
* In page 214 "Play Around with Array/Pointer Arguments
* to show that C's array/pointer in arguemtns
*/
#include <stdio.h>
char ga[] = "abcdefghijklmnopqrstuvwxyz";
View gg.java
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*; //引用處理事件的event套件
import java.util.ArrayList;
public class ScrollEX extends JFrame{
ImageIcon ii = new ImageIcon("image/P4137All.jpg");