This file contains hidden or 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
using System; | |
namespace Twitter340 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
for (int mikanPrice = 1; mikanPrice <= 340; mikanPrice++) | |
{ |
This file contains hidden or 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 <iostream> | |
#include <string> | |
class A { | |
public: | |
A(const char* str) { m_str = str; } | |
virtual ~A() {} | |
virtual void Foo(int n, int m) { | |
printf("A %d %d %hs\n", n, m, m_str.c_str()); |
This file contains hidden or 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 <string.h> | |
// For specify int | |
template <int N> | |
class Buffer { | |
public: | |
Buffer() { | |
m_buf[0] = 0; | |
} |
This file contains hidden or 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 <vector> | |
class IDumpable { | |
public: | |
virtual void Dump() = 0; | |
}; | |
// For inheritance | |
template <class T> |
This file contains hidden or 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> | |
// As generics | |
template <class T> | |
class List { | |
public: | |
List() { | |
m_count = 0; | |
} | |
void Add(const T& t) { |
This file contains hidden or 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
#!/bin/bash | |
if [ $# -ne 1 ]; then | |
echo "Usage: git-commit-size.sh <commit hash>" 1>&2 | |
exit 1 | |
fi | |
HASH=$1 | |
ITEM_LIST="`git diff-tree -r -c -M -C --no-commit-id $HASH`" |
This file contains hidden or 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 s = ""; | |
for(var i = 1; i <= 255; i++){ | |
var c = String.fromCharCode(i); | |
s += c; | |
if(c == '@')s += '' | |
} | |
$('#tweet-box-home-timeline').html( | |
"<div>255chars</div>" | |
+ "<div>" + s + "</div>" | |
+ "<div>#280characters</div>"); |
This file contains hidden or 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
// style | |
var style = (function () {/* | |
.toc{ | |
border: 1px solid #aaa; | |
padding: 4px 12px; | |
margin-bottom: 12px; | |
position: relative; | |
padding-top: 30px; | |
} | |
.toc-title{ |
This file contains hidden or 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
setInterval(function(){ | |
if($('.spinner').length == 0 && $('.work-record-edit-balloon .submit-button').length > 0){ | |
console.log("click"); | |
$('.work-record-edit-balloon .submit-button')[0].click(); | |
} | |
else{ | |
console.log("wait"); | |
} | |
}, 500); |
This file contains hidden or 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
#!/bin/bash | |
# | |
# Ref article: http://blog.clock-up.jp/entry/2017/03/07/ccache | |
# | |
# system information | |
uname -a | |
cat /etc/system-release | |
cat /proc/cpuinfo |
NewerOlder