é£ããã¦ã¿ã
question:1194699919
回答 3 ã«é£ããã¦ã¿ãã
åçãã¹ã
t120o4l4v15@3 cdefgab<c
空è¡ãç¡è¦ããå ´å
t120o4l4v12@3 ffdga-a-b-g-dd-o3o2o8d-b-o8o1fdcb-aa-dg-fa-dga-b-db-a-dgdb-ga-b-eddgdgb-a-b-a-cdgg-a-b-gd-b- d-gg-o8o7o6o2o2eg-cg-a-g-gd-b-g-o6d-gg-a-eb-g-dcgb-eo5d-b-g- bba-dco6cacgo1ea-g-caa-o2fa-dcabb-dcb-agbcb-g-a-abggggga-g-ca-g cabdao8gca-fg-a-dcb-a-abbcaab-abca-g-cd-o1o3ea-g-bco7g-o6gabcg-a-bage bg-efg-bcdfb-o8o8o8b-a-fo2ceab cga-abca-gcaa-cab-a-gg-cb-g-b-b-a-a-b-ca-cb-baa-a-d-b-a-d-g-o4 caco1o7fg-a-abgcb-gacb-g-o0fcb-a-cgba-cb-b-egg-ca-b-b- fa-cbagco8go8cb-a-fa-a-b-a-a-go7a-feo1cgacbaab-agbcda-bagb-gcba-afa-o8 cabcacda-dfggbco1o2o4a abcaa-b-ggab-g-o2o1o7fo2g-a-o7gbaa-cb-o8gafcga-baca-bagagba-bbea- cgbga-b-b-aab-g-bgb-g-ba-o3g-g-g-a-b-o7a-fg-a-bcba-b-a-b-a-a-a-gag-b-d-o1 gabg-d g-ao5ba-a-g-g-bcgcga-g-o6o8o1a-g-gceg-g-g-bacacao6o5gaea-g-a-ca-ggafca-a-ao0
é£ç¶ç©ºè¡ããã©ãã¯ã®åºåãã¨ããå ´å
t120o4l4v12@3 ffdga-a-b-g-dd-o3o2o8d-b-o8o1fdcb-aa-dg-fa-dga-b-db-a-dgdb-ga-b-eddgdgb-a-b-a-cdgg-a-b-gd-b- d-gg-o8o7o6o2o2eg-cg-a-g-gd-b-g-o6d-gg-a-eb-g-dcgb-eo5d-b-g- ; t120o4l4v12@3 bba-dco6cacgo1ea-g-caa-o2fa-dcabb-dcb-agbcb-g-a-abggggga-g-ca-g ; t120o4l4v12@3 cabdao8gca-fg-a-dcb-a-abbcaab-abca-g-cd-o1o3ea-g-bco7g-o6gabcg-a-bage bg-efg-bcdfb-o8o8o8b-a-fo2ceab cga-abca-gcaa-cab-a-gg-cb-g-b-b-a-a-b-ca-cb-baa-a-d-b-a-d-g-o4 ; t120o4l4v12@3 caco1o7fg-a-abgcb-gacb-g-o0fcb-a-cgba-cb-b-egg-ca-b-b- fa-cbagco8go8cb-a-fa-a-b-a-a-go7a-feo1cgacbaab-agbcda-bagb-gcba-afa-o8 cabcacda-dfggbco1o2o4a ; t120o4l4v12@3 abcaa-b-ggab-g-o2o1o7fo2g-a-o7gbaa-cb-o8gafcga-baca-bagagba-bbea- cgbga-b-b-aab-g-bgb-g-ba-o3g-g-g-a-b-o7a-fg-a-bcba-b-a-b-a-a-a-gag-b-d-o1 ; t120o4l4v12@3 gabg-d g-ao5ba-a-g-g-bcgcga-g-o6o8o1a-g-gceg-g-g-bacacao6o5gaea-g-a-ca-ggafca-a-ao0
æ±ææºã¯ McAfee SiteAdvisor ã ã£ã!!
Mozex 1.9.5 が動かないã®ã Make Link 3.0.2 が動かないã®ããMcAfee SiteAdvisor ã Array ã¯ã©ã¹*1ãæ±æãã¦ããã®ãåå ã ã£ãã
McAfee SiteAdvisor ã¯ãèµ·åããã㨠https://sadownload.mcafee.com/products/sa/firefox/search.dat ããã¦ã³ãã¼ãããã®ã ããå®ã¯ãã®ä¸èº«ã¯ JavaScript ã¹ã¯ãªããã§ãããã eval ãããã¨ã§ã¹ã¯ãªãããæ¡å¼µãã¦ããã
ãããããã® search.dat ã¯ã°ãã¼ãã«ç©ºéãæ±æãã¾ãã£ã¦ãããä¸ã§ã Mozex ã Make Link ãåããªãåå ã«ãªã£ã¦ããã®ãã次ã®é¨åã ã
Array.prototype.inArray = function (value) { var i; for (i=0; i < this.length; i++) { if (this[i] === value) { return true; } } return false; };
ããã«ãããfor...in å½ä»¤ã®çµæãå¤ãã£ã¦ãã¾ãã
ä¾
ary = new Array(); ary["apple"] = 100; ary["orange"] = 120; for (var i in ary) { alert(ary[i]); }
å®è¡çµæ
100 120 function (value) { var i; for (i=0; i < this.length; i++) { if (this[i] === value) { return true; } } return false; }
ã¾ã£ãããå°ã£ãããã ã (ï½Ï´â¯)
ã¨ãã訳ã§ãMcAfee SiteAdvisor 㯠ãã¤ã(/--)/ ââ ããã
*1:JavaScript ã§ã¯ããªãã¸ã§ã¯ãã¨è¡¨ç¾ããã®ãæ£ããï¼
Make Link 3.0.2 ãåããªã
Mozex 1.9.5 ã¨åæ§ Make Link 3.0.2 ãåããªãã
調ã¹ã¦ã¿ãã¨ãåããªãç®æãåæ§ã ã
info['title'] = getPageDescription( window.content.document ); } if (useEntities) { for (i in info) { info[i] = info[i].replace(/&/g, "&") // âãã
ããã¾ãåæ§ã«æ¸ãæãã¦ã¿ãã¨ãæ£å¸¸ã«åãããã«ãªã£ãã
info['title'] = getPageDescription( window.content.document ); } if (useEntities) { for (var i = 0; i < info.length; i++) { // âãã info[i] = info[i].replace(/&/g, "&")
ããã
--- makelink.js.ORG 2007-03-31 00:39:06.000000000 +0900 +++ makelink.js 2007-10-27 19:27:06.000000000 +0900 @@ -141,7 +141,7 @@ info['title'] = getPageDescription( window.content.document ); } if (useEntities) { - for (i in info) { + for (var i = 0; i < info.length; i++) { info[i] = info[i].replace(/&/g, "&") .replace(/</g, "<") .replace(/>/g, ">")
åå ï¼
å¥ã®ãã·ã³*1ã§ãåãç¾è±¡ãèµ·ããã®ã§ããããã¡ã¤ã«ãå£ãã¦ããå¯è½æ§ã¯ä½ããããã§ä»ã®æ¡å¼µæ©è½ãå½±é¿ãã¦ããã®ãã¨æãç¡å¹åã¨åèµ·åãç¹°ãè¿ãã¦ããã¨ãã©ããã McAfee SiteAdvisor ãã¤ã³ã¹ãã¼ã«ï¼æå¹ã«ãã¦ããã¨ãåé¡ãèµ·ãããã¨ãããã£ãã
è¡çªãããããªæ¡å¼µæ©è½ã§ã¯ãªãã¨æãã®ã§ããã£ã±ã Firefox ã®ãã°ãªã®ããªãâ¦â¦ï¼
P.S.
ã¡ãªã¿ã«ãMcAfee ã«問い合わせ Web フォームããç¾è±¡ãå ±åããã¨ã以ä¸ã®ãããªåçãé ãã*2ã
[email protected] wrote:
大å¤ç³ã訳ãããã¾ããã
ãå©ç¨ããã ãã¦ããã¾ããMcAfee SiteAdvisorãã«ã¤ãã¾ãã¦ã¯ã
ãµãã¼ã対象å¤ã®è£½åã¨ãªãã¾ãã
*1:OS 㯠Windows 2000 ã
*2:ãããªããåãåãã製ååã®é¸æè¢ã«å ¥ãããªã <(ï½^´)>
æªè³ªåçè ã®æé¤
question:1192856662
ä»åãæªè³ªåçè
ãæé¤ããç®çã§åçè
ããã¯ã¦ãªè³ªåè
ãã«éå®ããããid:amagami ãããããéåæããã§ã¯ãªããã¨ããご意見ãé ãããã¾ããid:goldwell ããããã¯ããã¤ã¢ãªã¼å¸æ°ãã«éå®ãã¦ã¯ã©ããã¨ããご意見ãé ããã
以åããã対象ã¦ã¼ã¶ã¼ãä¸ç¨®é¡ã§ã¯ãªãè¤æ°ç¨®é¡é¸æãããã¨æã£ã¦ããã®ã ããè¤æ°é¸æãå¯è½ã«ãªãã°ãã¯ã¦ãªè³ªåè
ãorããã¤ã¢ãªã¼å¸æ°ãçã¨ãã¦æªè³ªåçè
ãæé¤ãã¤ã¤éæªè³ªåçè
ãåçå¯è½ã«ããç®çã§ãå©ç¨ã§ããã®ã§ã¯ãªããã¨æã£ãã
ããã§ãã¢ã¤ãã¢ã追å ãããã¨ããã®ã ããæ¢ã«そのようなアイデアã追å ããã¦ããã®ã§ãæ®ãå°ãªãã¢ã¤ãã¢ãã¤ã³ã*1ã§æ ªãè³¼å
¥ãã¦ãããã
*1:æ ªãéç¨ããæè½ã¯ãªãããã (ï¾â`)ã£ã¦ããããããããå²ããï¼ãã¤ã³ããå¢ããï¼ç®çã§è³¼å ¥ãã¦ãããããããªããã ãã©ã(^^;
matrix ã©ã¤ãã©ãªã¼ã®ä½¿ãæ¹
question:1191841779
matrix ライブラリーã®ä½¿ãæ¹ãå°ãããã£ãã®ã§ãããã使ã£ã¦æ¸ãç´ãã¦ã¿ãã
require 'matrix' class Vector2 < Vector DIMENSION = 2 def self.[](*array) self.Raise ErrDimensionMismatch if array.size != DIMENSION super end def self.elements(array, copy = true) self.Raise ErrDimensionMismatch if array.size != DIMENSION super end def rotate(angle) cos = Math.cos(angle) sin = Math.sin(angle) mat = Matrix[[cos, -sin], [sin, cos]] mat * self # .class == Vector...orz end end x = 13.0 y = 6.0 angle_degree = 47.0 angle = angle_degree * Math::PI / 180.0 # convert degrees into radians p Vector2[x, y].rotate(angle) # => Vector[4.47785647109746, 13.5995882814242] p Vector2.elements([x, y]).rotate(angle)# => Vector[4.47785647109746, 13.5995882814242]
復帰å¤ã Vector ã¯ã©ã¹ã®ã¤ã³ã¹ã¿ã³ã¹ã«ãªã£ã¦ãã¾ãã®ãçã(ï¾â`)â¦â¦*1
*1:ã¯ã©ã¹åã決ãæã¡ã«ããã®ã¯æ¢ãã¦æ¬²ããã
é¢æ°ã¸ã®ãã¤ã³ã¿ã¼ã®åºåï¼C++ ç·¨ï¼
fptostr.c ããC++ ã§æ¸ãç´ãã¦ã¿ãã
ããã§ããCHAR_BIT ã 4 ã®åæ°ã®å ´åã«ãã対å¿ãã¦ããªããã¨ããå¶éã¯ç¡ããªã£ãã
fptostr.cpp
#include <bitset> #include <cstring> #include <limits> #include <string> #include <iostream> typedef int (*funcptr_t)(); std::string fptostr(funcptr_t p) { static const char *xdigits = "0123456789abcdef"; const int bom = 1; const bool is_little_endian = *reinterpret_cast<const char *>(&bom) == 1; const std::size_t u_char_bits = std::numeric_limits<unsigned char>::digits; const std::size_t funcptr_t_bits = sizeof(funcptr_t) * u_char_bits; const std::size_t funcptr_t_digits = (funcptr_t_bits+3)/4; const std::bitset<funcptr_t_bits> mask = 0xf; unsigned char cary[sizeof(p)]; std::memcpy(cary, &p, sizeof(p)); std::bitset<funcptr_t_bits> bits; if ( is_little_endian ) { bits = cary[sizeof(p)-1]; for ( int i = sizeof(p)-2; i >= 0; --i ) { bits <<= u_char_bits; bits |= cary[i]; } } else { bits = cary[0]; for ( int i = 1; i < sizeof(p); ++i ) { bits <<= u_char_bits; bits |= cary[i]; } } std::string str; str.reserve(2+funcptr_t_digits); str.insert(str.begin(), xdigits[(bits & mask).to_ulong()]); for ( int i = 1; i < funcptr_t_digits; ++i ) { bits >>= 4; str.insert(str.begin(), xdigits[(bits & mask).to_ulong()]); } return str.insert(0, "0x"); } int main() { static const funcptr_t fps[] = { reinterpret_cast<funcptr_t>(main) , reinterpret_cast<funcptr_t>(fptostr) , NULL }; for ( int i = 0; fps[i]; ++i ) { std::cout << "----\n" << "(void*) => " << (const void *)fps[i] << "\n" << "fptostr => " << fptostr(fps[i]) << "\n"; } }
å®è¡ä¾ï¼i386/FreeBSD 6.2/g++ 3.4.6ï¼
---- (void*) => 0x8048d6c fptostr => 0x08048d6c ---- (void*) => 0x8048ad8 fptostr => 0x08048ad8
å®è¡ä¾ï¼i686/CYGWIN_NT-5.1/g++ 3.4.4ï¼
---- (void*) => 0x4014d6 fptostr => 0x004014d6 ---- (void*) => 0x401150 fptostr => 0x00401150
å®è¡ä¾ï¼i686/Windows XP/Visual Studio 2005ï¼
---- (void*) => 00401250 fptostr => 0x00401250 ---- (void*) => 00401000 fptostr => 0x00401000
é¢æ°ã¸ã®ãã¤ã³ã¿ã¼ã®åºåï¼åçç·¨ï¼
question:1185077855
åçã 1 件ããä»ããªãã¦æ®å¿µãããããã³ã¡ã³ãæ¬ã¸ã®æ¸ãè¾¼ã¿ãå«ãã¦ãprintf ç³»é¢æ°ã§å¤ææå®å"%p"ã使ãæ¹æ³ããåºãªãã£ãã®ã§ããã¯ãé¢æ°ã¸ã®ãã¤ã³ã¿ã¼ã void ã¸ã®ãã¤ã³ã¿ã¼ã¸å¸¸ã«å¤æã§ããã¨æã£ã¦ãã人ã¯å¤ãã®ã§ã¯ãªããã¨æãããã
4.13
質å: å æ¬çãªæ±ç¨ãã¤ã³ã¿åã¯ä½ããé¢æ°ã¸ã®ãã¤ã³ã¿ã void * ã«çªã£è¾¼ãã ãã³ã³ãã¤ã©ã«ãããããã
åç: âå æ¬çãªæ±ç¨ãã¤ã³ã¿åâã¯åå¨ããªããvoid * ã«ä¿éããã¦ãããã¨ã¯ãªãã¸ã§ã¯ãï¼ããªãã¡ãã¼ã¿ï¼ãæããã¤ã³ã¿ãæ ¼ç´ã§ãããã¨ã ãã ãé¢æ°ãã¤ã³ã¿ã void * ã«å¤æãããã¨ã¯ç§»æ¤æ§ãé«ããªããï¼ãã·ã³ã«ãã£ã¦ã¯é¢æ°ãã¤ã³ã¿ã¯é常ã«å¤§ãããã©ã®ãã¼ã¿ãã¤ã³ã¿ããã大ãããï¼
ã¾ããä»æã®ãã·ã³ãªãå®éå¤æã§ããå¦çç³»ã¯å¤ãã®ã ãããã©ãå¤æã§ããªãå ´åã«ã使ããæ¹æ³ï¼ããã°ã©ã ï¼ãèãã¦ã¿ãã
ãã ãã次㮠2 ç¹ã®å¶éãããã
- CHAR_BIT ã 4 ã®åæ°ã®å ´åã«ãã対å¿ãã¦ããªã
- è¤éãªã¨ã³ãã£ã¢ã³ã«ã¯å¯¾å¿ãã¦ããªã*1
fptostr.c
#include <limits.h> #include <string.h> #include <stdio.h> #if (CHAR_BIT & 3) != 0 # error error: fptostr requires (CHAR_BIT & 3) == 0 to be compiled #endif #define FUNCPTR_DIGITINBYTE (CHAR_BIT>>2) typedef int (*funcptr_t)(); #define FUNCPTR_STRSIZE (2+sizeof(funcptr_t)*FUNCPTR_DIGITINBYTE) #define FUNCPTR_BYTETOSTR(cary,ci,c,di,sp) \ do { \ c = cary[ci]; \ for ( di = 0; di < FUNCPTR_DIGITINBYTE; ++di ) { \ *sp = xdigits[c & 0xf]; \ c >>= 4; \ --sp; \ } \ } \ while ( 0 ) int fptostr(funcptr_t p, char str[], size_t len) { static const char *xdigits = "0123456789abcdef"; const int bom = 1; const int is_little_endian = *(const char *)&bom == 1; unsigned char cary[sizeof(p)]; unsigned char c; char *sp; int ci, di; if ( !str || len <= FUNCPTR_STRSIZE ) return -1; memcpy(cary, &p, sizeof(p)); sp = str; *sp = '0'; ++sp; *sp = 'x'; sp = str + FUNCPTR_STRSIZE; *sp = '\0'; --sp; if ( is_little_endian ) { for ( ci = 0; ci < sizeof(p); ++ci ) { FUNCPTR_BYTETOSTR(cary, ci, c, di, sp); } } else { for ( ci = sizeof(p)-1; ci >= 0; --ci ) { FUNCPTR_BYTETOSTR(cary, ci, c, di, sp); } } return 0; } int main() { char fpstr[FUNCPTR_STRSIZE+1]; static const funcptr_t fps[] = { (funcptr_t)main , (funcptr_t)printf , (funcptr_t)fptostr , NULL }; int i; printf("FUNCPTR_DIGITINBYTE = %d\n", FUNCPTR_DIGITINBYTE); printf("FUNCPTR_STRSIZE = %d\n", FUNCPTR_STRSIZE); for ( i = 0; fps[i]; ++i ) { printf("----\n"); printf("%%p => %p\n", (const void *)fps[i]); if ( fptostr(fps[i], fpstr, sizeof(fpstr)) != 0 ) return 1; printf("fptostr => %s\n", fpstr); } return 0; }
å®è¡ä¾ï¼i386/FreeBSD 6.2/gcc 3.4.6ï¼
FUNCPTR_DIGITINBYTE = 2 FUNCPTR_STRSIZE = 10 ---- %p => 0x8048660 fptostr => 0x08048660 ---- %p => 0x80483b0 fptostr => 0x080483b0 ---- %p => 0x804852c fptostr => 0x0804852c
å®è¡ä¾ï¼i686/CYGWIN_NT-5.1/gcc 3.4.4ï¼
FUNCPTR_DIGITINBYTE = 2 FUNCPTR_STRSIZE = 10 ---- %p => 0x40118b fptostr => 0x0040118b ---- %p => 0x401310 fptostr => 0x00401310 ---- %p => 0x401050 fptostr => 0x00401050
å®è¡ä¾ï¼i686/Windows XP/Visual Studio 2005ï¼
FUNCPTR_DIGITINBYTE = 2 FUNCPTR_STRSIZE = 10 ---- %p => 00401160 fptostr => 0x00401160 ---- %p => 00401219 fptostr => 0x00401219 ---- %p => 00401000 fptostr => 0x00401000