Skip to content

Instantly share code, notes, and snippets.

View shelling's full-sized avatar

shelling shelling

View GitHub Profile
(setq h (make-hash-table :test 'equal))
(message "%s" h)
(puthash 'hello "world" h)
(message "%s" h)
(message "%s" (gethash 'hello h))
require "mkmf"
$libs += " -lstdc++ "
create_makefile("human")
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char*
itos(int value) {
char* result = malloc(sizeof(char)*100);
sprintf(result, "%d", value);
return result;
}
@shelling
shelling / anagrams.pl
Last active August 29, 2015 14:04
common questions
#!/usr/bin/env perl
use Modern::Perl;
use Data::Dumper;
use Test::More;
sub hash {
my ($string) = shift;
my $hash = {};
for my $c (split(//, $string)) {
#!/usr/bin/env ruby
require "parslet"
require "pp"
class SimpleParser < Parslet::Parser
rule :top do
integer
end
#!/usr/bin/env perl6
use v6;
grammar Simple {
rule TOP {
^ <integer> $
};
token integer {
%html {
%head {
}
%body {
}
}
require 'formula'
class Github < Formula
homepage 'https://github.com/ingydotnet/git-hub'
url 'https://github.com/ingydotnet/git-hub/archive/perl5-advent-2013.tar.gz'
sha1 'd63e11687579c22e708d327245d0451c981b5904'
head 'https://github.com/ingydotnet/git-hub.git'
def install
system 'make'
#include <stdio.h>
#include <stdlib.h>
#include <hdf5.h>
double **
Plain_init(int x, int y) {
double **plain = malloc(sizeof(double*)*x);
double *space = malloc(sizeof(double)*x*y);
for (int i = 0; i < x; i++) {
plain[i] = space + i * y;
本對照表已經移到 https://github.com/g0v/tisa-map/blob/master/pod/cpc%3C-%3Estd.txt
請至該處取得新版本
--------------------------------------------------------------------------------
CPC841 | 6201電腦軟體設計業
CPC842 |
CPC843 | 6202電腦系統整合服務業
CPC844 | 6209其他電腦系統設計服務業
CPC845+849 | 6312資料處理、網站代管及相關服務
--------------------------------------------------------------------------------
CPC83104** | 7729其他運輸工具設備租賃業