マイクロソフトの資料から引用。
The __thiscall calling convention is used on member functions and is the default calling convention used by C++ member functions that do not use variable arguments. Under __thiscall, the callee cleans the stack, which is impossible for vararg functions. Arguments are pushed on the stack from right to left, with the this pointer being passed via register ECX, and not on the stack, on the x86 architecture.
The __thiscall calling convention is used on member functions and is the default calling convention used by C++ member functions that do not use variable arguments.
__thiscall呼び出し規約は、メンバー関数に利用され、可変長でない引数をとらないメンバー関数でデフォルトの呼び出し規約です。
Arguments are pushed on the stack from right to left, with the this pointer being passed via register ECX, and not on the stack, on the x86 architecture.
x86互換機では、引数は右から左にスタックにプッシュし、thisポインタはスタックではなくECXレジスタを通して渡されます。
vararg member functions use the __cdecl calling convention.
可変長の引数をとるメンバ関数は__cdecl呼び出し規約を利用します。
All function arguments are pushed on the stack, with the this pointer placed on the stack last
全ての引数はスタックに積まれ、thisポインタは最後にスタックに詰まれます。
(訳注:__cdeclは呼び出し側がスタックを綺麗にする。引数は右から左へ積む。)
class CSuper{public: virtual int Get() = 0;};
class CSub : public CSuper{private: int i; public: CSub(int v){i = v;} ~CSub{} virtual int Get(){return i}};
int main(int argc, char **argv){
FILE *in = fopen("input.txt", "r");
FILE *out = fopen("output.txt", "w");
char buff[1024];
int m; //出題元の値
int b; //バッファ
int c; //釣り
int num = 0; //枚数
if(!in || !out) return -1;
fgets(buff, sizeof(buff), in);
m = atoi(buff);
c = 1000 - m;
if(b = c / 500){
num += b;
c = c - b * 500;
}
if(b = c / 100){
num += b;
c = c - b * 100;
}
if(b = c / 50){
num += b;
c = c - b * 50;
}
if(b = c / 10){
num += b;
c = c - b * 10;
}
if(b = c / 5){
num += b;
c = c - b * 5;
}
if(b = c / 1){
num += b;
c = c - b * 1;
}
class ISub1 : virtual public IClass{
public:
virtual
~ISub1(){}
int m_v1;
virtual
int Get1() = 0;
};
class ISub2 : virtual public IClass{
public:
virtual
~ISub2(){}
int m_v2;
virtual
int Get2() = 0;
};
class CSub : public ISub1, public ISub2{
public:
virtual
int Get1(){
return m_v1;
}
virtual
int Get2(){
return m_v2;
}
virtual
int Get(){
return m_1;
}
};
うまくうごいたー。
-----
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Owner>"C:\Documents and Settings\Owner\My Documents\Vi
sual Studio 2008\Projects\test_test\Release\test_test.exe"
+++++++++[>++++++++>+++++++++++>+++++<<<-]>.>++.+++++++..+++.>-.------------.<++
++++++.--------.+++.------.--------.>+.
Hello, world!
C:\Documents and Settings\Owner>
static unsigned char data[100000];
memset(data, 0, sizeof(data));
const wchar_t *pstr = wstr.c_str();
unsigned int ptr = 0, c = 0;
unsigned int length = wstr.length();
for(; c < length; c++){
switch(pstr[c]){
case L'>': ptr++; break;
case L'<': if(ptr) ptr--; break;
case L'+': data[ptr]++; break;
case L'-': data[ptr]--; break;
case L'.': out << data[ptr] << std::flush; break;
case L'[':
if(!data[ptr]){
unsigned int m = 0;
while(1){
switch(pstr[++c]){
case L'[': m++; break;
case L']': if(!m--) goto out1;
}
}
out1:;
} break;
case L']':
if(data[ptr]){
unsigned int m = 0;
while(1){
switch(pstr[--c]){
case L'[': if(!m--) goto out2;
case L']': m++; break;
}
}
out2:;
} break;
case L',': break; //TODO:
}
}
var popup_html = p.document.getElementsByTagName("html").item(0);
var popup_body = p.document.getElementsByTagName("body").item(0);
var i, len = d.styleSheets.length;
for(i = 0; i < len; ++i){
var sheet = p.document.createStyleSheet();
sheet.disabled = d.styleSheets[i].disabled;
sheet.cssText = d.styleSheets[i].cssText;
}
var list = create(p.document);
■ マシン
OS: Windows XP Home Edition Service Pack 3 (build 2600) (Japanese)
IE(Trident): 7.0.5730.13
CPU: 1 of INTEL (Intel(R) Pentium(R) M processor 1.73GHz)
RAM: 502MB (159MB Free)
FlashPlayer: 9.0.124.0
FireWall: Trend Micro Personal Firewall
true
false
true
-----
public class HelloWorld {
public static void main(String[] args){
String a = "やらないか?";
String b = "やらないか?";
System.out.println(a == b);
StringBuffer c = new StringBuffer("test");
StringBuffer d = new StringBuffer("test");
StringBuffer e = c;
JavaScriptならば多分trueのはず。だけれどもJavaはfalse
-----
public class HelloWorld {
public static void main(String[] args){
String a = new String("test");
String b = new String("test");
window.onload = function(){
var canvas = document.getElementById("base");
var width = canvas.width, height = canvas.height;
var c = canvas.getContext("2d");
var size = 10;
var x = size, y = size;
var speed_x = 3, speed_y = 2;
window.onload = function(){
var canvas = document.getElementById("base");
var width = canvas.width, height = canvas.height;
var c = canvas.getContext("2d");
function check(x, y){
var ret = 0;
var len = Math.min(x.length, y.length);
for(var i = 0; i < len; ++i){
if(x.charAt(i) == y.charAt(i)){
++ret;
}else{
break;
}
}
return ret;
}
function mmmmax(x_, y_){
var x, y, x_len, y_len;
if(x_.length > y_.length){
x = y_; y = x_;
}else{
x = x_; y = y_;
}
x_len = x.length; y_len = y.length;
var max = 0;
for(var i = 0; i < x_len; ++i){
var current_max = x_len - i;
var func = function(a, b){
var ret = check(x.substring(a), y.substring(b));
if(ret == current_max){
return ret;
}
if(max < ret){
max = ret;
}
};
if(current_max > max){
var ret;
for(var j = 0; j < i; ++j){
ret = func(j, y_len - current_max);
if(ret) return ret;
}
for(var j = 0; j < y_len - current_max + 1; ++j){
ret = func(i, j);
if(ret) return ret;
}
}else{
break;
}
}
Sar File Unpack Error: C:\Documents and Settings\Owner\デスクトップ\Sleipnir\unicode\bin\..\smartinstaller\SmartInstaller Run Once\plugins/MP.sar
MP のインストールに失敗しました。
ブラッディーマンデイでman in the middle attackを話していたが、
これは常にプロセスやらを監視していれば気づくと思うんだがなあ。
自分のパソコンに監視用のドライバを入れれば良いと思うお。
リング0で動作するから、簡単に見つけれそうだが。
まあ、完全にWindowsクラックですが。
>>1172は実装した。
ずっと押しているときにShiftとかの押されたメッセージがいっぱい発生するが、前回のステータスが含まれているので、それを使って華麗にスルー。
他のキーはそのまま書き込んでいるので、ずっと押しているとログが長くなる長くなる・・・
SetThreadPriorityで書き込みスレッドの優先度をTHREAD_PRIORITY_IDLEにしているので、
>Base priority of 1 for IDLE_PRIORITY_CLASS, BELOW_NORMAL_PRIORITY_CLASS, NORMAL_PRIORITY_CLASS, ABOVE_NORMAL_PRIORITY_CLASS, or HIGH_PRIORITY_CLASS processes, and a base priority of 16 for REALTIME_PRIORITY_CLASS processes.
ということだそうです。
発見。
-----
def ** (other)
if other.kind_of?(Integer)
x = self
if other <= 0
x = self.inverse
return Matrix.identity(self.column_size) if other == 0
other = -other
end
z = x
n = other - 1
while n != 0
while (div, mod = n.divmod(2)
mod == 0)
x = x * x
n = div
end
z *= x
n -= 1
end
z
elsif other.kind_of?(Float) || defined?(Rational) && other.kind_of?(Rational)
Matrix.Raise ErrOperationNotDefined, "**"
else
Matrix.Raise ErrOperationNotDefined, "**"
end
end
typedef struct tagACCEL {
#ifndef _MAC
BYTE fVirt; /* Also called the flags field */
WORD key;
WORD cmd;
#else
WORD fVirt; /* Also called the flags field */
WORD key;
DWORD cmd;
#endif
} ACCEL, *LPACCEL;
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Owner>cd "C:\Documents and Settings\Owner\デスクトップ
\"
C:\Documents and Settings\Owner\デスクトップ>gcc
gcc: no input files
C:\Documents and Settings\Owner\デスクトップ>gcc -o test.exe test.cpp
C:\DOCUME~1\Owner\LOCALS~1\Temp/cc1A8umX.o:test.cpp:(.text+0xd): undefined refer
ence to `std::string::size() const'
C:\DOCUME~1\Owner\LOCALS~1\Temp/cc1A8umX.o:test.cpp:(.text+0x60): undefined refe
rence to `std::string::operator[](unsigned int) const'
C:\DOCUME~1\Owner\LOCALS~1\Temp/cc1A8umX.o:test.cpp:(.text+0x9e): undefined refe
rence to `std::string::operator[](unsigned int) const'
C:\DOCUME~1\Owner\LOCALS~1\Temp/cc1A8umX.o:test.cpp:(.text+0xcc): undefined refe
rence to `std::string::operator[](unsigned int) const'
C:\DOCUME~1\Owner\LOCALS~1\Temp/cc1A8umX.o:test.cpp:(.text+0x133): undefined ref
erence to `std::cout'
C:\DOCUME~1\Owner\LOCALS~1\Temp/cc1A8umX.o:test.cpp:(.text+0x138): undefined ref
erence to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <s
td::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char
const*)'
C:\DOCUME~1\Owner\LOCALS~1\Temp/cc1A8umX.o:test.cpp:(.text+0x140): undefined ref
erence to `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, st
d::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)'
C:\DOCUME~1\Owner\LOCALS~1\Temp/cc1A8umX.o:test.cpp:(.text+0x148): undefined ref
erence to `std::ostream::operator<<(std::ostream& (*)(std::ostream&))'
C:\DOCUME~1\Owner\LOCALS~1\Temp/cc1A8umX.o:test.cpp:(.text+0x171): undefined ref
erence to `std::ios_base::Init::Init()'
C:\DOCUME~1\Owner\LOCALS~1\Temp/cc1A8umX.o:test.cpp:(.text+0x18c): undefined ref
erence to `std::ios_base::Init::~Init()'
collect2: ld returned 1 exit status
C:\Documents and Settings\Owner\デスクトップ>gcc -o test.exe test.cpp libstdc++
gcc: libstdc++: No such file or directory
C:\Documents and Settings\Owner\デスクトップ>gcc -o test.exe test.cpp libstdc++
gcc: libstdc++: No such file or directory
C:\Documents and Settings\Owner\デスクトップ>gcc -o test.exe test.cpp -llibstdc+
+
C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot fin
d -llibstdc++
collect2: ld returned 1 exit status
C:\Documents and Settings\Owner\デスクトップ>gcc -o test.exe test.cpp -lstdc++
C:\Documents and Settings\Owner\デスクトップ>gcc -o test.exe test.cpp -lstdc++
test.cpp: In function `int main(int, char**)':
test.cpp:8: error: no matching function for call to `getline(std::istream&, std:
:string)'
C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/basic_s
tring.h:2362: note: candidates are: std::basic_istream<_CharT, _Traits>& std::ge
tline(std::basic_istream<_CharT, _Traits>&, std::basic_string<_CharT, _Traits, _
Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::al
locator<char>]
C:\Documents and Settings\Owner\デスクトップ>gcc -o test.exe test.cpp -lstdc++
C:\Documents and Settings\Owner\デスクトップ>gcc -o test.exe test.cpp -lstdc++
C:\Documents and Settings\Owner\デスクトップ>gcc -o test.exe -O3 test.cpp -lstdc
++
C:\Documents and Settings\Owner\デスクトップ>gcc -o test.exe -O3 -Wall test.cpp
-lstdc++
The Spanner - Detecting browsers javascript hacks http://www.thespanner.co.uk/2009/01/29/detecting-browsers-javascript-hacks/
-----
//Firefox detector 2/3 by DoctorDan
FF=/a/[-1]=='a'
//Firefox 3 by me:-
FF3=(function x(){})[-5]=='x'
//Firefox 2 by me:-
FF2=(function x(){})[-6]=='x'
//IE detector I posted previously
IE='\v'=='v'
//Safari detector by me
Saf=/a/.__proto__=='//'
//Chrome by me
Chr=/source/.test((/a/.toString+''))
■ マシン
OS: Windows XP Home Edition Service Pack 3 (build 2600) (Japanese)
IE(Trident): 7.0.5730.13
CPU: 1 of INTEL (Intel(R) Pentium(R) M processor 1.73GHz)
RAM: 502MB (154MB Free)
FlashPlayer: 10.0.12.36
FireWall: Trend Micro Personal Firewall
原因がよく分からなかったので書き直した。
-----
(function(){
var a = document.getElementsByTagName("a"), s = "";
for(var i = 0; i < a.length; ++i){
if(a[i].href.match(/\.(?:png|jpg|jpeg)$/i))
s += a[i].href + "\n";
}
var t = document.createElement("textarea");
t.value = s;
document.getElementsByTagName("body")[0].appendChild(t);
})();
javascript:(function(){var a = document.getElementsByTagName("a"), s = "";for(var i = 0; i < a.length; ++i){if(a[i].href.match(/\.(?:png|jpg|jpeg)$/i))s += a[i].href + "\n";}var t = document.createElement("textarea");t.value = s;document.getElementsByTagName("body")[0].appendChild(t);})();
javascript:(function(){var a = document.getElementsByTagName("a"), s = "";for(var i = 0; i < a.length; ++i){if(a[i].href.match(/\.(?:png|jpg|jpeg)$/i))s += a[i].href + "\n";}var t = document.createElement("textarea");t.value = s;document.getElementsByTagName("body")[0].appendChild(t);t.focus();t.select();})();
-----
微調整
typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
#define mp make_pair
template<class T> void pv(T a, T b) { for (T i=a; i!=b; ++i) cout << *i << " "; cout << endl; }
template<class T> void pvp(T a, T b) { for (T i=a; i!=b; ++i) cout << "(" << i->first << ", " << i->second << ") "; cout << endl; }
int n,m,ptr[100010],next[100010],zu[100010];
int N;
int A[100010];
int ans;
int saki(int u) {
int ret=A[u],tmp;
for (int i=ptr[u]; ~i; i=next[i]) {
tmp = saki(zu[i]);
if (tmp > 0) ret += tmp;
}
ans = max(ans, ret);
return ret;
}
int main() {
//freopen("committee.in", "r", stdin);
int u,v;
int root=0;
scanf("%i", &N);
n = N; m = 0; memset(ptr, ~0, n<<2);
for (u=0; u<N; ++u) {
scanf("%i%i", &v, &A[u]);
if (v--) {
next[m] = ptr[v]; ptr[v] = m; zu[m] = u; ++m;
} else {
root = u;
}
}
#include <cstdio>
#include <algorithm>
using namespace std;
int N, M, X[2][100010];
int greedy(int k, int d) {
int prv = X[k][0], cnt = 1;
for (int i = 1; i < M; i++) {
if (X[k][i] <= prv + d) continue;
prv = X[k][i];
cnt++;
}
return cnt;
}
int main() {
scanf("%d%d", &N, &M);
for (int i = 0; i < M; i++) scanf("%d%d", &X[0][i], &X[1][i]);
#include <cstdio>
#include <algorithm>
using namespace std;
int N, M, X[2][100010];
int greedy(int k, int d) {
int prv = X[k][0], cnt = 1;
for (int i = 1; i < M; i++) {
if (X[k][i] <= prv + d) continue;
prv = X[k][i];
cnt++;
}
return cnt;
}
int main() {
scanf("%d%d", &N, &M);
for (int i = 0; i < M; i++) scanf("%d%d", &X[0][i], &X[1][i]);
for (int k = 0; k <= 1; k++) {
for (int i = 0; i < M; i++) {
for (int j = i; j < M; j++) {
int d = X[k][j] - X[k][i];
if (greedy(0, d) + greedy(1, d) <= N) ans = min(ans, d);
}
}
}
>The opening process can duplicate the handle as many times as required, but after it is opened, the named pipe instance cannot be opened by another client.
死んでしまえ!
std::pair<bool, unsigned long long int> GetHash(const wchar_t *str){
typedef std::pair<bool, unsigned long long int> rettype;
std::size_t len = std::wcslen(str);
unsigned long long int v = 0x0123456789ABCDEFLL;
for(std::size_t i = 0; i < len; ++i){
v = v * 137 + str[i] * 581;
}
return rettype(true, v);
}
std::pair<bool, unsigned long long int> GetHash(const char *str){
typedef std::pair<bool, unsigned long long int> rettype;
>If hNamedPipe was not opened with FILE_FLAG_OVERLAPPED, the function does not return until a client is connected or an error occurs. Successful synchronous operations result in the function returning a nonzero value if a client connects after the function is called.
えー。
(function(){
var id = "";
var password = "";
var start = 1, end = 260;
var servername = ""
var CreateHTTPObject = function(){
return new ActiveXObject("Msxml2.ServerXMLHTTP.6.0");
};
var Utility = {
GetSearchString: function(obj){
var vec = [];
for(var i in obj){
if(obj.hasOwnProperty(i)){
vec.push(i + "=" + obj[i]);
}
}
return vec.join("&");
},
forEach: function(vec, func){
vec = [].concat(vec);
var len = vec.length;
for(var i = 0; i < len; ++i){
if(func(vec[i])){
return;
}
}
},
DecodeHTML: function(str){
return str.replace(/&([a-zA-Z]+);/g, function($1, $2){
return ({
amp: "&",
quote: "\"",
gt: ">",
lt: "<"
})[$2];
});
}
};
var html = http.responseText;
if(html.match(/<h2>エラーが発生しました<\/h2>/) && html.match(/<li>error<\/li>/)){
return null;
}else{
var lines = html.split("\n");
var src = Downloader.GetSource(lines);
var qid = Downloader.GetQuestionId(lines);
var id = page;
var language = Downloader.GetLanguage(lines);
var point = Downloader.GetPoint(lines);
var uptime = Downloader.GetUpTime(lines);
var results = Downloader.GetResults(lines);
var fso = new ActiveXObject("Scripting.FileSystemObject");
var data = fso.OpenTextFile("data.txt");
while(!data.AtEndOfLine){
var buff = data.ReadLine();
buff.match(/^([^:]+)\s?:(.+)(\.[^.]+)$/);
var from = RegExp.$2 + RegExp.$3, to = "ひぐらしのなく頃に BGM\\" + RegExp.$1 + RegExp.$3.toLowerCase();
fso.CopyFile(from, to);
var file = fso.GetFile(to);
file.Attributes = 0;
}
これは、定数だけれども、最適化しないのか。
-----
int main(int argc, char **argv){
unsigned int sum = 0;
for(unsigned int i = 0; i < 300; ++i){
for(unsigned int j = 0; j < 300; ++j){
sum += i + j;
}
}
なんかGoogleChromeの方がevalが遅いという話が以前あったが、
an overview of TraceMonkey ✩ Mozilla Hacks – the Web developer blog http://hacks.mozilla.org/2009/07/tracemonkey-overview/
の二番目の奴だとGoogleChromeの方がFx4より早い。
まあ、Fxはpre betaだから?まあChromeもbetaだが。
64bits版OS使っているから、64bits版MinGWにしたら64bitsバイナリしか吐かないので(コマンドラインで変えられると思うが)、32bits版を入れて試す。
別に64bitsバイナリを吐く32bits or 64bits gccの開発を行っているわけではないんだよね?
---
>The mingw-w64 project is a complete runtime environment for gcc to support binaries native to Windows 64-bit and 32-bit operating systems.
問:以下のソースを全く同じ動作をするコードを書け。(定数時間)
-----
auto CTest1::TestFunction(unsigned int a, unsigned int b)->unsigned int{
unsigned int ret = 0;
for(unsigned int i = a; i <= b; ++i){
ret += i;
}
return ret;
}
-----
俺には書けなかった・・・
TestFunction(0xfffffffe, 0xfffffffe);
TestFunction(n, 0xffffffff);
あたりを再現できるかが肝心だな。
多分無理だと思うのだが。
class ITest{
public:
virtual auto TestFunction(unsigned int a, unsigned int b)->unsigned int = 0;
};
class CTest1 : public ITest{
public:
virtual auto TestFunction(unsigned int a, unsigned int b)->unsigned int;
};
class CTest2 : public ITest{
public:
virtual auto TestFunction(unsigned int a, unsigned int b)->unsigned int;
};
auto CTest1::TestFunction(unsigned int a, unsigned int b)->unsigned int{
unsigned int ret = 0;
for(unsigned int i = a; i <= b; ++i){
ret += i;
}
return ret;
}
auto CTest2::TestFunction(unsigned int a, unsigned int b)->unsigned int{
if(a <= b){
//普通
unsigned int n = b - a + 1;
unsigned int s = a + b;
if(n & 1){
//項数が奇数
return (s >> 1) * n;
}else{
//項数が偶数
return (n >> 1) * s;
}
}else{
//まず来ない
return 0;
}
}
[ Note: if a program could assign a pointer of type T** to a pointer of type const T** (that is, if line #1
below were allowed), a program could inadvertently modify a const object (as it is done on line #2). For
example,
int main() {
const char c = ’c’;
char* pc;
const char** pcc = &pc; // #1: not allowed
*pcc = &c;
*pc = ’C’; // #2: modifies a const object
}
―end note ]
[ Example:
struct B {
int f();
};
struct L : B { };
struct R : B { };
struct D : L, R { };
int (B::*pb)() = &B::f;
int (L::*pl)() = pb;
int (R::*pr)() = pb;
int (D::*pdl)() = pl;
int (D::*pdr)() = pr;
bool x = (pdl == pdr); // false
―end example ]
本の虫: 今まで知らなかったswitch文の仕様 http://cpplover.blogspot.com/2010/07/switch.html
-----
これは酷い。
-----
void f( int const value )
{
int i = 0 ;
switch( value )
for ( ; i != 10 ; ++i )
{
case 1 : case 2 :
std::cout << "value is 1 or 2" << std::endl ;
continue ;
void f( int const value ){
std::cout << value << std::endl;
int i = 0;
switch(value){
for(; i < 3; ++i){
case 0: std::cout << "test" << std::endl;
case 1: std::cout << "google" << std::endl;
}
break;
libs\math\build\..\src\tr1\cyl_bessel_jf.cpp:17:1: warning: visibility attribute
not supported in this configuration; ignored
libs\math\build\..\src\tr1\cyl_bessel_jf.cpp:17:1: warning: visibility attribute
not supported in this configuration; ignored
libs\math\build\..\src\tr1\cyl_bessel_jf.cpp:17:1: warning: visibility attribute
not supported in this configuration; ignored
libs\math\build\..\src\tr1\cyl_bessel_jf.cpp:17:1: warning: visibility attribute
not supported in this configuration; ignored
libs\math\build\..\src\tr1\cyl_bessel_jf.cpp:17:1: warning: visibility attribute
not supported in this configuration; ignored
libs\math\build\..\src\tr1\cyl_bessel_jf.cpp:17:1: warning: visibility attribute
not supported in this configuration; ignored
libs\math\build\..\src\tr1\cyl_bessel_jf.cpp:17:1: warning: visibility attribute
not supported in this configuration; ignored
libs\math\build\..\src\tr1\cyl_bessel_jf.cpp:17:1: warning: visibility attribute
not supported in this configuration; ignored
libs\math\build\..\src\tr1\cyl_bessel_jf.cpp:17:1: warning: visibility attribute
not supported in this configuration; ignored
libs\math\build\..\src\tr1\cyl_bessel_jf.cpp:17:1: warning: visibility attribute
not supported in this configuration; ignored
libs\math\build\..\src\tr1\cyl_bessel_jf.cpp:17:1: warning: visibility attribute
not supported in this configuration; ignored
libs\math\build\..\src\tr1\cyl_bessel_jf.cpp:17:1: warning: visibility attribute
not supported in this configuration; ignored
["DOM functions can be deleted", function () { delete Node.prototype.appendChild; var retVal = !document.appendChild; /* Restore for next iteration */Node.prototype.appendChild = backupAppendChildFunc; return retVal; } ],
あ。
これは駄目だった。
-----
["Cached DOM functions require a 'this' object", function () { var g = document.getElementById; try { var res = g("demobody"); return false; /* this-less invoke should be illegal */ } catch (ex) { } return true; } ],
// New ECMAScript 5 capabilities
["ES5 direct-prototype-access", function () { return Object.getPrototypeOf(document.createElement('div')) == HTMLDivElement.prototype; } ],
["DOM objects can be 'locked' with ES5 preventExtensions", function () { var d = document.createElement('div'); Object.preventExtensions(d); d.extensionVal = "test"; return (d.extensionVal != "test"); } ],
["DOM properties (ES5 accessors) created on appropriate prototypes", function () { return Node.prototype.hasOwnProperty("nodeName"); } ],
["'Get' function of accessor properties can be executed", function () { return document.nodeName == "#document"; } ],
["'Set' function of accessor property can be executed", function () { document.body.lastChild.data = ""; return document.body.lastChild.data == ""; } ],
["DOM accessors can be deleted", function () { delete Element.prototype.tagName; var retVal = document.body.tagName === undefined; /* Restore for next iteration */Object.defineProperty(Element.prototype, "tagName", backupTagNamePropDesc); return retVal; } ],
John Resig - ECMAScript 5 Strict Mode, JSON, and More http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/
---
>Additionally, attempts to introduce new variables through an eval will be blocked.
-----
amachangの高速化の手法が使えなくなるね。
-----
var _d = document;
eval("var document = _d;");
-----
のパターンの奴。まあ、strict modeを使わなければいいだけの話だが。
>Access to arguments.caller and arguments.callee now throw an exception. Thus any anonymous functions that you want to reference will need to be named, like so:
な、なんだって!
>>2783
>A user agent must ignore a declaration with an invalid property name or an invalid value. Every CSS 2.1 property has its own syntactic and semantic restrictions on the values it accepts.
と明記されている。
class X { };
class C {
class X { };
static const int number = 50;
static X arr[number];
};
X C::arr[number]; // ill-formed:
// equivalent to: ::X C::arr[C::number];
// not to: C::X C::arr[C::number];
C:\Users\Owner\AppData\Local\Temp\ccSkrfSI.o:main.cpp:(.text+0x34): undefined re
ference to `__gxx_personality_sj0'
C:\Users\Owner\AppData\Local\Temp\ccSkrfSI.o:main.cpp:(.text+0x51): undefined re
ference to `_Unwind_SjLj_Register'
C:\Users\Owner\AppData\Local\Temp\ccSkrfSI.o:main.cpp:(.text+0x12c): undefined r
eference to `_Unwind_SjLj_Unregister'
C:\Users\Owner\AppData\Local\Temp\ccSkrfSI.o:main.cpp:(.text+0x167): undefined r
eference to `_Unwind_SjLj_Resume'
collect2: ld returned 1 exit status
SELECT classdata.name1, classdata.name2, MAX(class.year * 10 + (class.term - 1) * 5) FROM classdata, class WHERE classdata.id = class.classdata_id AND class.year = 2011 AND class.term = 1 GROUP BY class.classdata_id
SQL怖い><
SELECT sikepuri.*, teacher.name AS teacher_name, classdata.name1 AS classdata_name1, classdata.name2 AS classdata_name2, COUNT(DISTINCT teacher.id) AS teacher_count, COUNT(DISTINCT classdata.id) AS classdata_count FROM sikepuri_link LEFT JOIN teacher ON sikepuri_link.teacher_id = teacher.id, sikepuri, classdata WHERE sikepuri_link.sikepuri_id = sikepuri.id AND sikepuri_link.classdata_id = classdata.id AND classdata.id = :classdata_id
SELECT sikepuri_downlog.sikepuri_id AS sikepuri_id, COUNT(*) AS down_count, sikepuri.title AS sikepuri_title, sikepuri.creater AS sikepuri_creater FROM sikepuri_downlog, sikepuri WHERE 1310266968 <= sikepuri_downlog.time AND sikepuri_downlog.time <= 1310276968 AND sikepuri_downlog.sikepuri_id = sikepuri.id GROUP BY sikepuri_downlog.sikepuri_id ORDER BY down_count DESC
SELECT sikepuri_downlog.sikepuri_id AS sikepuri_id, COUNT(*) AS down_count, sikepuri.title AS sikepuri_title, sikepuri.creater AS sikepuri_creater, classdata.name1, COUNT(DISTINCT classdata.id) AS classdata_count FROM sikepuri_downlog, sikepuri LEFT JOIN sikepuri_link ON sikepuri.id = sikepuri_link.sikepuri_id LEFT JOIN classdata ON sikepuri_link.classdata_id = classdata.id WHERE 1310266968 <= sikepuri_downlog.time AND sikepuri_downlog.time <= 1310276968 AND sikepuri_downlog.sikepuri_id = sikepuri.id GROUP BY sikepuri_downlog.sikepuri_id ORDER BY down_count DESC, sikepuri_id ASC
6.3 Timers — HTML5 http://www.w3.org/TR/html5/timers.html#dom-windowtimers-settimeout
---
If the currently running task is a task that was created by the setTimeout() method, and timeout is less than 4, then increase timeout to 4.
-----
4ms以下の場合は4msになるらしい。これはいい情報だ。
SMTPの仕様に従っていない、SMTPもどきサーバー。 by Ruby
-----
require 'socket'
require 'kconv'
def log(*str)
str.each{|s|
print s.to_s.tosjis
}
end
class String
def startwith(str)
self.slice(0, str.length) === str
end
end
gs = TCPServer.open(25)
addr = gs.addr
addr.shift
printf("server is on %s\n", addr.join(':'))
while true
Thread.start(gs.accept) do |s|
log s, " is accepted.\n"
s.write "220 OK\r\n"
line = s.gets
if line.startwith('EHLO')
s.write "502 ERR\r\n"
line = s.gets
end
if !line.startwith('HELO')
s.write "500 ERR\r\n"
s.close
return
end
s.write "250 OK\r\n"
while !(line = s.gets).startwith('DATA')
s.write "250 OK\r\n"
log line
end
s.write "354 ENTER\r\n"
log line
while !((line = s.gets) === ".\r\n")
log line
end
s.write "250 OK\r\n"
if !(line = s.gets).startwith('QUIT')
s.write "500 ERR\r\n"
s.close
return
end
s.write "221 CLOSE\r\n"
def log(*str)
str.each{|s|
print s.to_s.tosjis
}
end
class String
def startwith(str)
self.slice(0, str.length) === str
end
end
gs = TCPServer.open(25)
addr = gs.addr
addr.shift
printf("server is on %s\n", addr.join(':'))
while true
Thread.start(gs.accept) do |s|
log s, " is accepted.\n"
s.write "220 OK\r\n"
line = s.gets
if line.startwith('EHLO')
s.write "502 ERR\r\n"
line = s.gets
end
if !line.startwith('HELO')
s.write "500 ERR\r\n"
s.close
return
end
s.write "250 OK\r\n"
while !(line = s.gets).startwith('DATA')
s.write "250 OK\r\n"
log line
end
s.write "354 ENTER\r\n"
log line
body = []
while !((line = s.gets) === ".\r\n")
log line
body.push line
end
s.write "250 OK\r\n"
if !(line = s.gets).startwith('QUIT')
s.write "500 ERR\r\n"
s.close
return
end
s.write "221 CLOSE\r\n"
log s, " is done.\n"
s.close
if body.length != 0
key = nil
bodystr = ''
body.each do |line|
if line.startwith 'To:'
key = line[/\d{10,}/]
break
end
end
lambda do
state = 0
body.each do |line|
if state == 0 && line == "\r\n"
state = 1
elsif state == 1
bodystr << line.chomp << "\n"
end
end
end.call
Net::HTTP.post_form(
URI.parse('http://jbbs.livedoor.jp/bbs/write.cgi/computer/38153/1307542890/'),
{
'DIR' => 'computer',
'BBS' => '38153',
'KEY' => key,
'TIME' => Time.now.to_i.to_s,
'NAME' => '',
'MAIL' => '',
'MESSAGE' => bodystr.toeuc
}
) if key != nil && !bodystr.empty?
end
end
end
SELECT down_table.sikepuri_id AS sikepuri_id, down_table.down_count AS down_count, sikepuri_table.sikepuri_title AS sikepuri_title, sikepuri_table.sikepuri_creater AS sikepuri_creater, sikepuri_table.sikepuri_kind AS sikepuri_kind, sikepuri_table.classdata_id AS classdata_id, sikepuri_table.classdata_name1 AS classdata_name1, sikepuri_table.classdata_count AS classdata_count FROM (SELECT sikepuri_id, COUNT(*) AS down_count FROM sikepuri_downlog GROUP BY sikepuri_id) AS down_table, (SELECT sikepuri.id AS sikepuri_id, sikepuri.title AS sikepuri_title, sikepuri.kind AS sikepuri_kind, sikepuri.creater AS sikepuri_creater, classdata.id AS classdata_id, classdata.name1 AS classdata_name1, COUNT(DISTINCT classdata.id) AS classdata_count FROM sikepuri LEFT JOIN sikepuri_link ON sikepuri.id = sikepuri_link.sikepuri_id LEFT JOIN classdata ON sikepuri_link.classdata_id = classdata.id GROUP BY sikepuri.id) AS sikepuri_table WHERE down_table.sikepuri_id = sikepuri_table.sikepuri_id
Apply for WoSign Digital Certificates online: SSL Certificates| Code Signing Certificates| EV SSL Certificates | OV SSL Certificates | DV SSL Certificates | 2048bits Web Server Certificate, Support all types of browsers and servers, and support with Chinese in certificate subject, Support IDN domain names ! https://buy.wosign.com/free/
-----
中国製の無料SSL証明書発行サイトらしい
Think-Silicon/GLOVE: GLOVE (GL Over Vulkan) is a software library that acts as an intermediate layer between an OpenGL application and Vulkan https://github.com/Think-Silicon/GLOVE