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
#include <iostream> | |
using namespace std; | |
int main() { | |
long long int n; | |
long long int m; | |
long long int a; | |
cin >> n; | |
cin >> m; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <math.h> | |
// The source of this code is http://kasonblog.blogspot.tw/2012/04/10810-ultra-quicksort-uva-online-judge.html | |
// and its realted information http://program-lover.blogspot.tw/2008/10/mergesort.html | |
// or http://programming-study-notes.blogspot.tw/2013/12/uva-10810-ultra-quicksort.html | |
// or http://www.tuicool.com/articles/ANb6Fv |
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
function download_follow_link { | |
URL=$1 | |
DIRPATH=$(echo "$URL" | sed s-ftp://--) | |
DIRPATH=$(echo ${DIRPATH%/*}) | |
BASEURL=$(echo "$DIRPATH" | cut -d '/' -f1) | |
wget -m $URL | |
SYMLINKS=$(find $DIRPATH -type l) | |
for SYMLINK in $SYMLINKS | |
do |
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
var page = require('webpage').create(); | |
var system = require('system'); | |
var map_result = { | |
"Reference Sequence" : "mouse_mm10(UCSC)", | |
"Known SNP/Indel" : "dbSNP138", | |
"leftReadsInput" : "36730566", | |
"leftReadsMapped" : "35130795 (95.6% of input)", | |
"leftReadsOfThese" : "9607 ( 0.0%) have multiple alignments (11204 have >1)", | |
"rightReadsInput" : "36730566", |
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
use Mojolicious::Lite; | |
use Text::Markdown qw/markdown/; | |
get '/' => sub { | |
my $self = shift; | |
$self->render('index'); | |
}; | |
get '/markdown' => sub { | |
my $self = shift; |
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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.ck</groupId> | |
<artifactId>bioweb</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<name>bio</name> | |
<description></description> | |
<properties> | |
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
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
WITH RECURSIVE node_rec(id, name, parent, type) as ( | |
-- Non-recursive term | |
( | |
select id, name, parent, type from node where id = 566 | |
) | |
UNION ALL | |
-- Recursive Term | |
-- Here I use 'UNION ALL' statement so that the duplicate result will be included. | |
-- You can choose to use 'UNION' instead of 'UNION ALL' to get distinct data. | |
( |
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
-- Show current sequence val | |
select currval('nodefolder_id_seq'::regclass); | |
-- Let insert the data with currval as value | |
BEGIN; | |
insert into node (name,parent,type, project_id) | |
values ('TEST_Name',null,1,currval('nodefolder_id_seq'::regclass)); | |
COMMIT; | |
-- Reference |
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
// Source: http://stackoverflow.com/questions/10490570/call-angular-js-from-legacy-code | |
var scope = angular.element($('#todoList')[0]).scope() | |
// The original behavior of click will add up a variable with 1 and show it on the view, but it fact it doesn't update the veiw until | |
// user click the UI to trigger this function | |
scope.clikc(); | |
// If I do it in this way, the result will the same with my expect | |
scope.$apply(function() { | |
scope.click(); | |
}); |
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
[alias] | |
tree = "forest --pretty=format:\"%C(red)%h %C(magenta)(%ar) %C(blue)%an %C(reset)%s\" --style=15 --reverse --all" |
OlderNewer