This file contains 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
From f374a87d833e734520e46b19d0d5c53e10c10c96 Mon Sep 17 00:00:00 2001 | |
From: Wei Hu <[email protected]> | |
Date: Sat, 26 Dec 2009 03:59:33 -0500 | |
Subject: [PATCH] Use [] to flip pages. | |
--- | |
po/ibus-pinyin.pot | 4 ++-- | |
po/zh_CN.po | 8 ++++---- | |
setup/ibus-pinyin-preferences.ui | 4 ++-- | |
src/PinyinEngine.cc | 4 ++-- |
This file contains 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
/* A simple inotify example from https://www.ibm.com/developerworks/linux/library/l-ubuntu-inotify/ */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <errno.h> | |
#include <sys/types.h> | |
#include <sys/inotify.h> | |
#define EVENT_SIZE ( sizeof (struct inotify_event) ) | |
#define BUF_LEN ( 1024 * ( EVENT_SIZE + 16 ) ) |
This file contains 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
/* | |
gcc a.c -g -o a | |
objdump -S a > a.s | |
*/ | |
typedef int (*func_t)(); | |
static int f(int arg) { | |
int a = 0, b = 1, c = 2; |
This file contains 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 Data.Array.ST; import Control.Monad.ST; import Data.Array | |
import Control.Monad | |
import Data.List | |
numbers = [3, 4, 9, 14, 15, 19, 28, 37, 47, 50, 54, 56, 59, 61, 70, 73, 78, 81, 92, 95, 97, 99] | |
sources = reverse $ init numbers | |
{- Dynamic programming: build a table for |
This file contains 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
Git tricks | |
http://blog.nelhage.com/2010/08/navigating-the-linux-kernel/ | |
Linux Kernel Linked List Explained | |
http://isis.poly.edu/kulesh/stuff/src/klist/ | |
ipv6 | |
http://hiroshi1.hongo.wide.ad.jp/hiroshi/papers/yoshifuji_Mar2003.pdf | |
Why SYSCALL_DEFINE macros |
This file contains 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
# Based on slim.service | |
[Unit] | |
Description=Auto Login X | |
Requires=dev-tty7.device | |
After=dev-tty7.device systemd-user-sessions.service | |
[Service] | |
ExecStart=/bin/su wh5a -l -c "/bin/bash --login -c startx >/dev/null 2>&1" | |
Restart=always |
This file contains 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
# ------------------- | |
# Background Information | |
# | |
# In this problem, you will build a planner that helps a robot | |
# find the shortest way in a warehouse filled with boxes | |
# that he has to pick up and deliver to a drop zone. | |
#For example: | |
# | |
#warehouse = [[ 1, 2, 3], | |
# [ 0, 0, 0], |
This file contains 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
# ----------- | |
# User Instructions | |
# | |
# The point of this exercise is to find the optimal | |
# parameters! You can write a twiddle function or you | |
# can use any other method | |
# that you like. Since we don't know what the optimal | |
# parameters are, we will be very loose with the | |
# grading. If you find parameters that work well, post | |
# them in the forums! |
This file contains 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
// MP 2: Due Sunday, Dec 16, 2012 at 11:59 p.m. PST | |
#include <wb.h> | |
#define wbCheck(stmt) do { \ | |
cudaError_t err = stmt; \ | |
if (err != cudaSuccess) { \ | |
wbLog(ERROR, "Failed to run stmt ", #stmt); \ | |
return -1; \ | |
} \ | |
} while(0) |
This file contains 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
// MP 4 Reduction | |
// Given a list (lst) of length n | |
// Output its sum = lst[0] + lst[1] + ... + lst[n-1]; | |
// Due Tuesday, January 15, 2013 at 11:59 p.m. PST | |
#include <wb.h> | |
#define BLOCK_SIZE 512 //@@ You can change this | |
#define wbCheck(stmt) do { \ |
OlderNewer