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
$.event.add(window, "load", function() { | |
$("#" + act).animate({top: '48%', }, 2000 ); | |
}); |
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 Header = { | |
addFade: function( selector ) { | |
var cls = "fake-hover"; | |
$('<span class="' + cls + '"></span>') | |
.css("display", "none") | |
.prependTo( $(selector) ); | |
$(selector + " a").bind( "mouseenter", function() { | |
$(selector + " ." + cls).fadeIn( "slow" ) | |
}); | |
$(selector + " a").bind( "mouseleave" , function() { |
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
xnorm = ZERO ; | |
for (i = 0; i < n5; i++) if ( xnorm < fabs (x [i]) ) xnorm = fabs (x [i]) ; | |
for (; i < n; i += 5) | |
{ | |
if ( xnorm < fabs (x [i] ) ) xnorm = fabs (x [i] ) ; | |
if ( xnorm < fabs (x [i+1]) ) xnorm = fabs (x [i+1]) ; | |
if ( xnorm < fabs (x [i+2]) ) xnorm = fabs (x [i+2]) ; | |
if ( xnorm < fabs (x [i+3]) ) xnorm = fabs (x [i+3]) ; | |
if ( xnorm < fabs (x [i+4]) ) xnorm = fabs (x [i+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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
void | |
print_vec(double *v, int n) { | |
int i; | |
for (i = 0; i < n; i++) { | |
printf("vec_%d = %.4f\n", i + 1, v[i]); | |
} |
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
SDFILE=("3PK" "BRYBND" "BARD" "WATSON" "ALLINIT" "ALLINITC" "ALLINITU") | |
for (( i = 0; i < ${#SDFILE[@]}; i++ )) | |
do | |
echo ${SDFILE[$i]} | |
echo -e "\n${SDFILE[$i]}\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" >> $LOG | |
date >> $LOG | |
sdcg_descent ${SDFILE[$i]} 2>&1 >> $LOG | |
done |
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 foo = { | |
bar: 10, | |
baz: function(num, callback) { | |
callback(num * num); | |
}, | |
qux: function(num, callback) { | |
var self = this; | |
this.baz(num, function(res) { | |
callback(res + self.bar); | |
}); |
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> | |
int | |
integrate | |
( | |
int a, | |
int b, | |
double (*f)(double *, int), | |
int n | |
) |
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> | |
double | |
integrate( | |
double a, | |
double b, | |
double (*f)(double) | |
){ | |
int i, size = 1000; | |
double area = 0., d = (b - a) / size; |
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> | |
#define return printf("Hello world");return | |
int | |
main() { | |
return 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
let url = 'http://www.tepco.co.jp' | |
let indexj = '/cc/press/index-j.html' | |
let res = webapi#http#get(url.indexj) | |
if res.header[0] != 'HTTP/1.1 200 OK' | |
echo 'Oops! Something wrong.' | |
endif | |
let data = iconv(res.content, 'utf-8', &encoding) | |
for list in split(data, '\n') | |
if list =~ '<dd><a href="' | |
if matchstr(list, '<dd><a href=".\+">\zs.\+\ze<\/a><\/dd>') |