第一回WEB学会シンポジウムの様子が動画で記録されているようなのでメモしておく.
http://www.ustream.tv/recorded/2731784
http://www.ustream.tv/recorded/2733140
http://www.ustream.tv/recorded/2733639
仕事しながら聞いていたけど,割と堪能した.
わざわざ行かなくても大丈夫だった.
青岸
6 年前
ソーシャルメディアとか人狼とか計算社会科学を研究している研究者による適当なブログ.
process = rt.exec(command);
exitValue = process.waitFor();
private void exec(String command, StringBuffer stdOutput){
process = rt.exec(command);
readOutput(stdOutput, process.getInputStream());
exitValue = process.waitFor();
}
private void readOutput(final StringBuffer buf, final InputStream is) {
Runnable runner = new Runnable(){
@Override
public void run() {
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
String line;
try{
while((line = br.readLine()) != null){
buf.append(line);
buf.append("\n");
System.out.println(">"+line);
}
}catch(IOException e){
}
}
};
Thread th = new Thread(runner);
th.start();
}
<html>
<head>
<img style="position:absolute; top: -1000px;" src="./dummy.gif">
<script type="text/javascript" src="http://www.google.com/jsapi?key=<i>YOURKEY</i>"></script>
<script type="text/javascript" src="./js/jquery"></script>
<script type="text/javascript">
<!--
google.load("gdata", "1");
function PRINT(src){
$("#message").html($("#message").html()+"<br>"+src);
}
function logMeIn() {
scope = "http://www.google.com/calendar/feeds/";
var chk = google.accounts.user.checkLogin(scope);
start();
}
function setupService(){
calendarService = new google.gdata.calendar.CalendarService('<i>APPLICATION-NAME</i>');
}
var calendarService;
function start(){
/*
* Retrieve all calendars
*/
setupService();
var feedUrl = 'http://www.google.com/calendar/feeds/default/allcalendars/full';
var handleError = function(error) {
PRINT(error);
}
calendarService.getAllCalendarsFeed(feedUrl, callback, handleError);
}
// The callback method that will be called when getAllCalendarsFeed() returns feed data
function callback(result) {
var entries = result.feed.entry;
for (var i = 0; i < entries.length; i++) {
var calendarEntry = entries[i];
var calendarTitle = calendarEntry.getTitle().getText();
PRINT('Calendar title = ' + calendarTitle);
}
}
//-->
</script>
</head>
<body>
<div id="message">
</div>
</body>
<input type="submit" value="login" onclick="logMeIn()">
</html>
scope = "http://www.google.com/calendar/feeds/";
var token = google.accounts.user.login(scope);
calendarService.getAllCalendarsFeed(feedUrl, callback, handleError);
Error: Request via script load timed out. Possible causes: feed URL is incorrect; feed requires authentication
/////////////////////////////////////////////////
// User definition
$auth_users = array(
// Username => password
'username' => 'password'
);
/////////////////////////////////////////////////
// Authentication method
$auth_method_type = 'pagename'; // By Page name
//$auth_method_type = 'contents'; // By Page contents
/////////////////////////////////////////////////
// Read auth (0:Disable, 1:Enable)
$read_auth = 1;
$read_auth_pages = array(
// Regex Username
'#ページ名#' => 'ユーザ名',
);
'#^ページ名$#' => 'ユーザ名',
<html>
<head>
<img style="position:absolute; top: -1000px;" src="./dummy.gif">
<script type="text/javascript" src="http://www.google.com/jsapi?key=YOURKEY"></script>
<script type="text/javascript" src="./js/jquery"></script>
<script type="text/javascript">
<!--
google.load("gdata", "1");
function PRINT(src){
$("#message").html($("#message").html()+"<br>"+src);
}
$(document).ready(function(){
/* Loads the Google data JavaScript client library */
/*
* Retrieve all calendars
*/
// Create the calendar service object
var calendarService = new google.gdata.calendar.CalendarService('GoogleInc-jsguide-1.0');
// The default "allcalendars" feed is used to retrieve a list of all
// calendars (primary, secondary and subscribed) of the logged-in user
var feedUrl = 'http://www.google.com/calendar/feeds/default/allcalendars/full';
// Error handler to be invoked when getAllCalendarsFeed() produces an error
var handleError = function(error) {
PRINT(error);
}
// Submit the request using the calendar service object
calendarService.getAllCalendarsFeed(feedUrl, callback, handleError);
});
// The callback method that will be called when getAllCalendarsFeed() returns feed data
function callback(result) {
// Obtain the array of CalendarEntry
var entries = result.feed.entry;
for (var i = 0; i < entries.length; i++) {
var calendarEntry = entries[i];
var calendarTitle = calendarEntry.getTitle().getText();
PRINT('Calendar title = ' + calendarTitle);
}
}
//-->
</script>
</head>
<body>
<div id="message">
</div>
</body>
</html>
<img style="position:absolute; top: -1000px;" src="./dummy.gif">
CalendarService myService = new CalendarService("Mashup Sample Application - 1.0");
myService.setUserCredentials(userName, password);
URL postUrl = new URL("http://www.google.com/calendar/feeds/default/allcalendars/full");
Query query = new Query(postUrl);
query.setAuthor(userName);
query.setMaxResults(Integer.MAX_VALUE);
CalendarFeed calendarFeed = myService.getFeed(postUrl, CalendarFeed.class);
for(CalendarEntry entry:calendarFeed.getEntries()){
for(Link link:entry.getLinks()){
if(link.getType().equals("application/atom+xml") && link.getRel().equals("alternate")){
//カレンダーURLに対する処理
String url = link.getHref();
CalendarQuery query = new CalendarQuery(new URL(url));
//ここでqueryを投げれば各エントリーが取得可能
}
}
}
Runtime rt = Runtime.getRuntime();
int cpuNum = rt.availableProcessors();
URL postUrl = new URL("http://www.google.com/calendar/feeds/default/private/full");
CalendarService myService = new CalendarService("Mashup Sample Application - 1.0");
myService.setUserCredentials(userName, password);
Query myQuery = new Query(postUrl);
myQuery.setAuthor(userName);
CalendarFeed myResultsFeed = myService.query(myQuery, CalendarFeed.class);
for(CalendarEntry entry:myResultsFeed.getEntries()){
//Entry firstMatchEntry = myResultsFeed.getEntries().get(0);
ListwhenList = entry.getRepeatingExtension(When.class);
System.out.println("Titie: " + entry.getTitle().getPlainText());
for(When when: whenList){
System.out.println(when.getStartTime());
System.out.println(when.getEndTime());
}
//System.out.println("Publish: " + CalendarTools.toDateTime(publish));
\begin{enumerate}
\setlength{\parskip}{0cm} % 段落間
\setlength{\itemsep}{0cm} % 項目間
\item ほげほげ
\item ほげほげ
\end{enumerate}
mysql> show create table table名
SSD | HDD | RamDisk | Sequential Read | 253.2 MB/s | 69.57 MB/s | 4049 MB/s | Sequential Write | 205.1 MB/s | 65.89 MB/s | 2287 MB/s | Random Read 512KB | 179.3 MB/s | 41.45 MB/s | 2489 MB/s | Random Write 512KB | 201.3 MB/s | 52.80 MB/s | 1721 MB/s | Random Read 4KB | 20.3 MB/s | 0.814 MB/s | 47.49 MB/s | Random Write 4KB | 56.63 MB/s | 2.138 MB/s | 45.75 MB/s |
---|
rho = exp(-1.0/((double)period));
rho = 0.0001*rint(10000.0*rho);
deviation=baseline*amplitude
gauss = deviation*sqrt(1.0-rho*rho);
dvdnd=baseline+gauss*[normal getDoubleSample]
dvdnd = baseline + rho*(dvdnd - baseline) + gauss*[normal getDoubleSample];
gafrequency | pmutation | newfrac | RiskNeutral価格との偏差 | |
---|---|---|---|---|
低条件 | 100 | 0.01 | 0.05 | 6.52 |
中条件 | 50 | 0.02 | 0.10 | 6.94 |
高条件 | 25 | 0.04 | 0.20 | 6.84 |