tag:blogger.com,1999:blog-2373133211200089052024-02-08T14:19:18.795+09:00Deep Learning of & by & for the REALLY Nativenagatohttp://www.blogger.com/profile/18423439014202860313noreply@blogger.comBlogger50125tag:blogger.com,1999:blog-237313321120008905.post-8633579089658160732022-09-25T21:50:00.004+09:002022-11-02T10:55:07.200+09:00KeyBindings of & by & for the REALLY Native<h3>Windows Application</h3>
F11 : fullscreen<br><br>
<h3>VS Code</h3>
F12 : Go To Definition<br><br>
<a href="www.euractiv.com/section/politics/short_news/austria-to-organise-conference-on-quicker-repatriation-of-migrants">www.euractiv.com/section/politics/short_news/austria-to-organise-conference-on-quicker-repatriation-of-migrants</a>nagatohttp://www.blogger.com/profile/18423439014202860313noreply@blogger.com0tag:blogger.com,1999:blog-237313321120008905.post-1047860017784745992022-09-20T17:51:00.007+09:002022-09-28T19:53:17.855+09:00JavaScript of & by & for the REALLY Native<h3>Deno</h3>
Deno.readTextFile<br>
Deno.writeTextFile<br><br>
<h3>Node.js</h3>
fs.readFile<br>
rs.writeFile<br><br>
<a href="https://www.euractiv.com/section/politics/short_news/austria-to-organise-conference-on-quicker-repatriation-of-migrants">https://www.euractiv.com/section/politics/short_news/austria-to-organise-conference-on-quicker-repatriation-of-migrants</a>nagatohttp://www.blogger.com/profile/18423439014202860313noreply@blogger.com0tag:blogger.com,1999:blog-237313321120008905.post-2299150581025614582022-09-04T12:18:00.009+09:002022-09-28T19:50:49.881+09:00Command of & by & for the REALLY Native<h3>Command Prompt</h3>
code<br><br>
<a href="https://www.youtube.com/watch?v=blyAv3UkQuA">https://www.youtube.com/watch?v=blyAv3UkQuA</a>nagatohttp://www.blogger.com/profile/18423439014202860313noreply@blogger.com0tag:blogger.com,1999:blog-237313321120008905.post-21859929791516219962022-09-04T11:01:00.027+09:002022-09-28T19:50:36.565+09:00Script of & by & for the REALLY Native<h3>Batch</h3>
:: go to d drive<br>
/d<br><br>
<a href="https://amerika21.de/analyse/217586/usa-verantwortlich-illegale-einwanderung">https://amerika21.de/analyse/217586/usa-verantwortlich-illegale-einwanderung</a>nagatohttp://www.blogger.com/profile/18423439014202860313noreply@blogger.com0tag:blogger.com,1999:blog-237313321120008905.post-58596856646689502002022-07-01T19:57:00.127+09:002022-08-31T17:02:39.669+09:00Annoying Alien Expulsion Campaign v0.1<div id="app11"></div><script>
(()=>{"use strict";function e(e=0){const t=new Date;return t.setDate(t.getDate()-e),t.setHours(0,0,0,0),t}function t(e,t,o){this.updateKey=(...t)=>(this.key=e(...t),this),this.load=()=>t(window.localStorage.getItem(this.key)??o),this.save=e=>(window.localStorage.setItem(this.key,e),e),this.update=e=>this.save(e(this.load()))}function o(e,t,o={}){var r=document.createElement(e);return Object.assign(r,o),t.appendChild(r),r}function r(e,t){for(let r=0;r<t;r++)o("br",e)}function n(e,t,o,r){const n=e.createShader(o);e.shaderSource(n,r),e.compileShader(n),e.attachShader(t,n)}function a(e,t,r){this.tag=o(e,t),this.update=()=>r(this.tag),this.update()}function*i([e,t,o,r]){for(let n of[0,1,2,1,3,2])yield e+n%2*o,yield t+Math.floor(n/2)*r}function*l([[e,t],o]){let r=[[],[0,1,3],[1,2,5],[0,2,5,0,5,3],[3,7,6],[0,1,7,0,7,6],[1,2,3,2,6,3,2,5,6,5,7,6],[0,2,5,0,5,7,0,7,6],[7,5,8],[0,1,5,0,5,8,0,8,7,0,7,3],[1,2,8,1,8,7],[0,2,8,0,8,7,0,7,3],[3,5,8,3,8,6],[0,1,5,0,5,8,0,8,6],[1,2,3,2,8,3,3,8,6],[0,2,8,0,8,6]];for(let n=-1;n<9;n++)for(let a=-1;a<9;a++){let i=0;for(let[e,t]of o)e==a&t==n&&(i|=1),e==a+1&t==n&&(i|=2),e==a&t==n+1&&(i|=4),e==a+1&t==n+1&&(i|=8);for(let o of r[i])yield a+o%3*.5+.5-e,yield n+.5*Math.floor(o/3)+.5-t}}let f=[[20,16],[[480,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99]],[490,[500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599]],[45,[3400,3401,3402,3403,3404,3405,3406,3407,3408,3409,3410,3411,3412,3413,3414,3415,3416,3417,3418,3419,3420,3421,3422,3423,3424,3425,3426,3427,3428,3429,3430,3431,3432,3433,3434,3435,3436,3437,3438,3439,3440,3441,3442,3443,3444,3445,3446,3447,3448,3449,3450,3451,3452,3453,3454,3455,3456,3457,3458,3459,3460,3461,3462,3463,3464,3465,3466,3467,3468,3469,3470,3471,3472,3473,3474,3475,3476,3477,3478,3479,3480,3481,3482,3483,3484,3485,3486,3487,3488,3489,3490,3491,3492,3493,3494,3495,3496,3497,3498,3499]],[54,[3900,3901,3902,3903,3904,3905,3906,3907,3908,3909,3910,3911,3912,3913,3914,3915,3916,3917,3918,3919,3920,3921,3922,3923,3924,3925,3926,3927,3928,3929,3930,3931,3932,3933,3934,3935,3936,3937,3938,3939,3940,3941,3942,3943,3944,3945,3946,3947,3948,3949,3950,3951,3952,3953,3954,3955,3956,3957,3958,3959,3960,3961,3962,3963,3964,3965,3966,3967,3968,3969,3970,3971,3972,3973,3974,3975,3976,3977,3978,3979,3980,3981,3982,3983,3984,3985,3986,3987,3988,3989,3990,3991,3992,3993,3994,3995,3996,3997,3998,3999]],[32,[4181,4182,4183,4186,4187,4194,4195,4196]]]],u=[[[5,16],[[3,[2,7,8,11,12,13,14]],[4,[27,31,35,41]],[2,[64,66,67,68,70,74]],[151,[86,88,95,99]]]],[[5,16],[[504,[1,2,3,6,7,8,10,11,12,13,14,15,19]],[360,[28,33,35,36,37,38,39,40,44]],[365,[115,116,117,118,119]],[292,[142,143,144]],[255,[320,322,324]]]],[[7,16],[[3,[3,8,9,10,11,12,14,16,18,20,22,24,26,28,31,34,38,45]],[1,[71,83]],[3,[126,132,134,138,140,146]],[4,[248,253,254,259,267]],[151,[309,311,313,336,339,342]],[2,[404,412,414,415,416,417,418,420,426,465,472]]]],[[7,16],[[259,[2,9,44]],[131,[51,52,53,57,61,64,70,78]],[130,[107,108,109,114,115,116,117,120,121,123,125,129,131]],[132,[149,176,179]],[65,[226,228,233,235,240,242,274,278,280,286,287,293]],[66,[329,335,336,338,340,342]],[129,[355,362,370,372,373,374,375,376]],[63,[744,746,757,759,761]]]],[[7,16],[[491,[10,11,16,17,18,19]],[500,[58,59,64,71]],[419,[117,120,121,122,123,124]],[288,[176,180,182,188,189,195]],[432,[199,200,208,216,223]],[504,[247,248,253,259,266,274]],[288,[324,326,331,333,338,340]],[360,[363,370,372,373,374,375,376]],[264,[408,410,415,417]],[432,[525,527,529,531,532,534,536,538]],[232,[581,583,585,587]],[160,[608,617,619,621]],[304,[639,651]],[232,[690]],[151,[742,748,771,775]]]],[[7,16],[[0,[1,2,3,4,5,7,10,13,14,17,20,22,26,28,31,34,35,37,39,41,44,46]],[252,[51,53,59,66,71,72,74]],[381,[99,100,101,102,103,105,111,112,120]],[34,[218,220,222,224,227,230,233,235]],[26,[273,279,280,282,284,286,289,291]],[381,[329,335]],[115,[356,363,365,366,367,368,369]],[66,[400,401,403,404,407,408,410,411]],[375,[450,453]]]],[[8,16],[[0,[1,2,5,6,8,11,12,15,16,19,20,23,25,26,27,28,29,30,35,36,41,43,44,46,48,50,53,55,56,58,61,63]],[105,[66,69,70,75,76,79,83,84,87,90,93]],[123,[129,130,133,134,136,144,153]],[8,[240,242,245,247,248,250,253,255]],[16,[283,284,291,292,299,300]],[105,[425,430,432,434,437,439]],[24,[471,473,474,475,476,477,478,491,492,498,501]],[16,[555,556,560,567]],[295,[667,668]],[149,[777,778,781,782,785,786,789,790]],[367,[842,846]],[75,[913,917]]]]],c=[[[7,16],[[0,[2,3,4,8,12,15,19,22,26,29,33,36,40,44,45,46]]]],[[7,16],[[0,[3,10,17,24,31,38,45]]]],[[7,16],[[0,[1,2,3,4,5,12,19,22,23,24,25,26,29,36,43,44,45,46,47]]]],[[7,16],[[0,[1,2,3,4,12,19,22,23,24,25,33,40,43,44,45,46]]]],[[7,16],[[0,[1,4,8,11,15,18,22,23,24,25,26,32,39,46]]]],[[7,16],[[0,[1,2,3,4,5,8,15,22,23,24,25,33,40,43,44,45,46]]]],[[7,16],[[0,[2,3,4,8,15,22,23,24,25,29,33,36,40,44,45,46]]]],[[7,16],[[0,[1,2,3,4,5,12,19,26,33,40,47]]]],[[7,16],[[0,[2,3,4,8,12,15,19,23,24,25,29,33,36,40,44,45,46]]]],[[7,16],[[0,[2,3,4,8,12,15,19,23,24,25,26,33,40,45,46]]]]],s=["Cerebral Aneurysm Rupture Preventer","Reading Counter","Vim Cheat Sheet","Greek Letter Spelling","Vacation Color","Chromatic Scale"],h=parseInt(window.localStorage.getItem("ExterminateEquipment.ExclusiveLife")??"1"),p=parseInt(window.localStorage.getItem("ExterminateEquipment.ChemicalWeapon")??"1"),d=parseInt(window.localStorage.getItem("ExterminateEquipment.DamageUpAgainstAlien")??"1"),m=parseInt(window.localStorage.getItem("ExterminateEquipment.NativeRecovery")??"1"),g=new t((()=>"AlienExpulsion.ums"),parseInt,0).updateKey(),M=0;for(let t of s)for(let o=0;o<28;o++)M+=parseInt(window.localStorage.getItem(t+e(o))??"0");let w=()=>(M<g.load()&&g.update((()=>M)),M-g.load()),v=new t((()=>"AlienExpulsion.WhiteMeteorite"),parseInt,"0").updateKey(),y=new t((t=>"AlienExpulsion.WhiteMeteoriteStat"+e(t)),parseInt,"0"),A=0,E=1,L=1,S=h,T=h,x=0,R=0;function C(e){let t=Math.min(e,w());g.update((e=>e+t)),x+=e}let H=document.querySelector("#app11"),I=o("div",H,{style:"display:flex"}),b=o("canvas",I,{width:400,height:400}),F=o("div",I),$=new a("p",F,(e=>e.innerHTML=`Massacre Stamina: ${w().toFixed()}`)),k=new a("p",F,(e=>{let t=v.load()+[h,p,d,m].map((e=>e*(e+1)*(2*e+1)/6)).reduce(((e,t)=>e+t),0);e.innerHTML=`White Meteorite: ${v.load()} / ${t}`})),P=new a("p",F,(e=>e.innerHTML=`Expulsion Throughput: ${0==x?0:(R/x*100).toFixed(1)}`));o("p",F,{innerHTML:`Atk: ${p.toFixed()} ~ ${(p+d).toFixed()}`}),o("p",F,{innerHTML:`Recovery(for Native): ${m.toFixed()}`});let D=new a("p",F,(e=>e.innerHTML=`My(exclusive) Life: ${Math.ceil(S)} / ${h}`)),V=new a("p",F,(e=>e.innerHTML=`Rank: ${A}`)),_=new a("p",F,(e=>e.innerHTML=`Enemy's Life: ${Math.ceil(E)} / ${0==A?1:10*A}`));o("button",F,{innerHTML:"Attack",onclick:()=>Y(!0)}),o("button",F,{innerHTML:"Guard",onclick:()=>Y(!1)}),r(H,1);let q=function(e,t,r=[]){for(var n=0;n<4;n++){const i=o("tr",e);for(var a=7*n;a<7*n+7;a++){let e=t(a);r.push(o("td",i,{innerHTML:0==e?"":e}))}}return r}(o("table",H,{style:"color: green"}),(e=>y.updateKey(e).load()))[0];o("span",H,{innerHTML:"Reference: "}),function(e,...t){for(let n of t)o("a",e,{href:n,innerHTML:n}),r(e,1)}(H,"https://www.moj.go.jp/isa/policies/policies/rcc-support.html");let K=b.getContext("webgl"),W=K.createProgram();n(K,W,K.VERTEX_SHADER,"\n attribute vec4 attrVertPos;\n uniform vec4 uniCo;\n varying lowp vec4 vColor;\n void main() { \n gl_Position = attrVertPos * vec4(0.05, -0.05, 1, 1);\n vColor = uniCo * vec4(1.0/7.0, 1.0/7.0, 1.0/7.0, 1.0); }"),n(K,W,K.FRAGMENT_SHADER,"\n varying lowp vec4 vColor;\n void main() { gl_FragColor = vColor; }"),K.linkProgram(W),K.useProgram(W);let B=K.getUniformLocation(W,"uniCo"),G=K.createBuffer(),N=K.getAttribLocation(W,"attrVertPos");function U(e,t){K.bufferData(K.ARRAY_BUFFER,new Float32Array(t),K.STATIC_DRAW),K.uniform4fv(B,e),K.drawArrays(K.TRIANGLES,0,t.length/2)}function j(e,t,o,r,n){let a=n.toString().length-1;for(let l=0;l<=a;l++){let f=Math.floor(n/Math.pow(10,a-l))%10;for(let n of c[f][1][0][1])U(r,[...i([e+(8*l+n%7)*o,t+Math.floor(n/7)%7*o,o,o])])}}function O(){if(S<=0)return void U([7,4,4,1],[...i([-20,-20,40,40])]);for(let[e,t]of f[1]){let o=e%8,r=Math.floor(e/8)%8,n=Math.floor(e/64)%8;for(let e of t)U([o,r,n,1],[...i([e%20*2-20,Math.floor(e/20)%20*2-20,2,2])])}for(let[e,t]of[[[2,0,0,1],1],[[3,0,0,1],T/h],[[7,4,4,1],S/h]])U(e,[...i([-19,-19,10*t,1])]);let e=T-S;e>0&&j(-8,-19,.25,[7,4,4,1],e);let[[t,o],r]=u[A%u.length],n=Math.ceil(L)-Math.ceil(E);n>0&&j(6,-t/2-2,.25,[4,7,4,1],n);for(let[e,o]of[[[0,2,0,1],10],[[0,3,0,1],L/(0==A?.1:A)],[[4,7,4,1],E/(0==A?.1:A)]])U(e,[...i([-5,-t/2-2,o,1])]);if(E>0){let e=[...Array(o)].map((()=>[])),n=new Array(o);for(let[o,a]of r)for(let r of a){let a=r%t,i=Math.floor(r/t)%t,l=Math.floor(r/(t*t));e[l].push([a,i]);let f=[o%8,Math.floor(o/8)%8,Math.floor(o/64)%8,1];n[l]=f}for(let r=0;r<o;r++)null!=n[r]&&U(n[r],Array.from(l([[t/2,t/2],e[r]])))}}function Y(e){var t;L=E,T=S,S<=0?(A=0,E=L=1,S=h):E<=0?(++A,E=10*A):(C(10),e?E=Math.max(0,E-(p+d*Math.random())):S+=Math.min(m,h-S),E<=0?(t=0==A?1:A,w()>0&&(v.update((e=>e+t)),q.innerHTML=y.updateKey(0).update((e=>e+t))),R+=t):S-=Math.min(e?A:A/5,S),S<=0&&C(90)),[$,V,_,D,k,P].forEach((e=>e.update())),O()}K.enableVertexAttribArray(N),K.bindBuffer(K.ARRAY_BUFFER,G),K.vertexAttribPointer(N,2,K.FLOAT,!1,0,0),O()})();
</script>nagatohttp://www.blogger.com/profile/18423439014202860313noreply@blogger.com0tag:blogger.com,1999:blog-237313321120008905.post-66696412639880635072022-06-28T06:20:00.036+09:002022-08-22T18:27:29.263+09:00Vacation Dot v0.1<div id="app21"></div><script>
(()=>{"use strict";function t(t,e,n={}){var o=document.createElement(t);return Object.assign(o,n),e.appendChild(o),o}function e(e,n){for(let o=0;o<n;o++)t("br",e)}function n(t,e,n,o){const r=t.createShader(n);t.shaderSource(r,o),t.compileShader(r),t.attachShader(e,r)}function o(t){let e=t.createProgram();n(t,e,t.VERTEX_SHADER,"\n attribute vec4 attrVertPos;\n uniform vec4 uniCo;\n varying lowp vec4 vColor;\n void main() { \n gl_Position = attrVertPos * vec4(1, -1, 1, 1);\n vColor = uniCo * vec4(1.0/7.0, 1.0/7.0, 1.0/7.0, 1.0); }"),n(t,e,t.FRAGMENT_SHADER,"\n varying lowp vec4 vColor;\n void main() { gl_FragColor = vColor; }"),t.linkProgram(e),t.useProgram(e);let o=t.getUniformLocation(e,"uniCo"),r=t.createBuffer(),a=t.getAttribLocation(e,"attrVertPos");t.enableVertexAttribArray(a),t.bindBuffer(t.ARRAY_BUFFER,r),t.vertexAttribPointer(a,2,t.FLOAT,!1,0,0),this.drawTris=(e,n)=>{t.bufferData(t.ARRAY_BUFFER,new Float32Array(n),t.STATIC_DRAW),t.uniform4fv(o,e),t.drawArrays(t.TRIANGLES,0,n.length/2)},this.drawRects=(t,e,n,o)=>{this.drawTris(t,[0,1,2,2,1,3].flatMap((t=>[(e+t%2)/o*2-1,(Math.floor(n)+Math.floor(t/2))/o*2-1])))}}let r,a,l,i=new function(t,e,n){this.updateKey=(...t)=>(this.key=(t=>"Vacation Color"+function(t=0){const e=new Date;return e.setDate(e.getDate()-t),e.setHours(0,0,0,0),e}(t))(...t),this),this.load=()=>e(window.localStorage.getItem(this.key)??"0"),this.save=t=>(window.localStorage.setItem(this.key,t),t),this.update=t=>this.save(t(this.load()))}((t=>"Vacation Color"+function(t=0){const e=new Date;return e.setDate(e.getDate()-t),e.setHours(0,0,0,0),e}(t)),parseInt,"0"),u=0,s=320,c=new Array(16),f=0;function h(t){r=t,a=r*r,l=new Array(16*a)}h(8);let p=document.querySelector("#app21");t("span",p,{innerHTML:"Vacation Import: "});let d=t("input",p,{type:"text"});t("button",p,{innerHTML:"import",onclick:()=>{let[[t,e],n]=JSON.parse(d.value);h(t);for(let[t,e]of n){let n=[t%8,Math.floor(t/8)%8,Math.floor(t/64)%8,1];c[Math.floor(e[0]/a)]=n;for(let t of e)l[t]=n}E()}}),e(p,2),t("span",p,{innerHTML:"Vacation Export: "});let v=t("input",p,{type:"text"});t("button",p,{innerHTML:"export",onclick:()=>{let t=[],e=-1,n=[];l.forEach(((o,r)=>{if(null==o)return;let a=o[0]+8*o[1]+64*o[2];a!=e&&(n.length>0&&t.push(`[${e},[${n.join(",")}]]`),e=a,n=[]),n.push(r)})),n.length>0&&t.push(`[${e},[${n.join(",")}]]`),v.value=`[[${r}, 16], [${t.join(",")}]]`}}),e(p,2),t("span",p,{innerHTML:"Size: "});let w=t("input",p,{type:"text",value:"8",size:"4"});t("button",p,{innerHTML:"update",onclick:()=>h(parseInt(w.value))}),e(p,2),["multiply","marching squares"].forEach(((e,n)=>t("button",p,{innerHTML:e,onclick:()=>{u=n,E()}}))),e(p,2);let m=t("canvas",p,{width:s,height:s}),g=t("canvas",p,{width:160,height:160});e(p,2);let y=[];["R","G","B"].forEach((n=>{t("span",p,{innerHTML:n}),y.push(t("input",p,{type:"range",min:0,max:7,value:0})),e(p,1)})),e(p,1);let M=function(e,n,o=[]){for(var r=0;r<4;r++){const l=t("tr",e);for(var a=7*r;a<7*r+7;a++){let e=n(a);o.push(t("td",l,{innerHTML:0==e?"":e}))}}return o}(t("table",p,{style:"color: green"}),(t=>i.updateKey(t).load()));t("span",p,"Reference: "),function(n,...o){for(let r of o)t("a",n,{href:r,innerHTML:r}),e(n,1)}(p,"https://www.moj.go.jp/isa/publications/materials/syukkokumeirei.html");let T=(t,e)=>null==t==(null==e)&&(null==t||[0,1,2].every((n=>t[n]==e[n]))),R=()=>[...y.map((t=>parseInt(t.value))),1],b=(()=>{let t=m.getContext("webgl"),e=new o(t);return function(){t.clearColor(.5,.5,.5,1),t.clear(t.COLOR_BUFFER_BIT);for(let t=0;t<16;t++)if(null!=c[t])switch(u){case 0:for(let n=0;n<a;n++){let o=l[n+t*a];null!=o&&e.drawRects(o,n%r,n/r,r)}break;case 1:let n=[[],[0,1,3],[1,2,5],[0,2,5,0,5,3],[3,7,6],[0,1,7,0,7,6],[1,2,3,2,6,3,2,5,6,5,7,6],[0,2,5,0,5,7,0,7,6],[7,5,8],[0,1,5,0,5,8,0,8,7,0,7,3],[1,2,8,1,8,7],[0,2,8,0,8,7,0,7,3],[3,5,8,3,8,6],[0,1,5,0,5,8,0,8,6],[1,2,3,2,8,3,3,8,6],[0,2,8,0,8,6]];for(let o=-1;o<r+1;o++)for(let i=-1;i<r+1;i++){let u=0,s=0,c=[0,0,0,1];for(let e=0;e<a;e++){let n=l[e+t*a];if(null==n)continue;let f=e%r,h=Math.floor(e/r),p=f==i&h==o?1:f==i+1&h==o?2:f==i&h==o+1?4:f==i+1&h==o+1?8:0;if(p>0){u+=p,s++;for(let t=0;t<3;t++)c[t]+=n[t]}}if(s>0){for(let t=0;t<3;t++)c[t]/=s;e.drawTris(c,n[u].flatMap((t=>[(2*i+t%3+1)/r-1,(2*o+Math.floor(t/3)+1)/r-1])))}}}}})(),A=(()=>{let t=g.getContext("webgl"),e=new o(t);return function(){t.clearColor(.5,.5,.5,1),t.clear(t.COLOR_BUFFER_BIT);for(let t=0;t<16;t++){let n=c[t];null!=n&&e.drawRects(n,t%4,t/4,4)}}})();function E(){A(),b(),M[0].innerHTML=i.updateKey(0).update((t=>t+1))}let C=!1,L=-1;function H(t,e,n){let o=t=>Math.floor(t/e*n);return o(t.offsetX)+o(t.offsetY)*n}function S(){let t=L+f*a,e=l[t],n=c[f];l[t]=T(e,n)?void 0:n,E()}m.onmousedown=t=>{C=!0,L=H(t,s,r),S()},m.onmousemove=t=>{if(C){let e=H(t,s,r);e!=L&&(L=e,S())}},m.onmouseup=()=>C=!1,m.onmouseleave=()=>C=!1,g.onmousedown=t=>{let e=H(t,160,4),n=c[e],o=R();e!=f?null!=n?y.forEach(((t,e)=>t.value=n[e])):c[e]=R():c[e]=T(n,o)?void 0:o,f=e,E()},y.forEach((t=>t.onchange=()=>{let t=R();for(let e=0;e<a;e++){let n=e+f*a;null!=l[n]&&(l[n]=t)}c[f]=t,E()})),E(),g.dispatchEvent(Object.assign(new Event("mousedown"),{offsetX:0,offsetY:0}))})();
</script>nagatohttp://www.blogger.com/profile/18423439014202860313noreply@blogger.com0tag:blogger.com,1999:blog-237313321120008905.post-52467071100922026032022-05-07T22:12:00.030+09:002022-08-29T12:27:58.148+09:00Mass Destruct Annoying Alien Equipment <div id="app12"></div><script>
(()=>{"use strict";function e(e,t,n){this.updateKey=(...t)=>(this.key=e(...t),this),this.load=()=>t(window.localStorage.getItem(this.key)??n),this.save=e=>(window.localStorage.setItem(this.key,e),e),this.update=e=>this.save(e(this.load()))}function t(e,t,n={}){var i=document.createElement(e);return Object.assign(i,n),t.appendChild(i),i}function n(e,n){for(let i=0;i<n;i++)t("br",e)}function i(e,n,i){this.tag=t(e,n),this.update=()=>i(this.tag),this.update()}let a=new e((()=>"AlienExpulsion.WhiteMeteorite"),parseInt,100).updateKey(),o=[],s=document.querySelector("#app12");o.push(new i("p",s,(e=>e.innerHTML=`White Meteorite: ${a.load()}`)));let r=t("table",s);for(let n of["ExclusiveLife","ChemicalWeapon","DamageUpAgainstAlien","NativeRecovery"]){let a=new e((()=>`ExterminateEquipment.${n}`),parseInt,1).updateKey(),s=t("tr",r),c=()=>t("td",s);t("span",c(),{innerHTML:`${n}: `}),o.push(new i("span",c(),(e=>e.innerHTML=a.load()))),t("button",c(),{innerHTML:"add",onclick:()=>l(a,!0)}),t("button",c(),{innerHTML:"sub",onclick:()=>l(a,!1)})}function l(e,t){let n=e.load()+(t?1:-1),i=a.load()+(t?-n*n:(n+1)*(n+1));n>=1&&i>=0&&(a.save(i),e.save(n)),o.forEach((e=>e.update()))}n(s,1),t("span",s,{innerHTML:"Reference: "}),function(e,...i){for(let a of i)t("a",e,{href:a,innerHTML:a}),n(e,1)}(s,"https://cir.nii.ac.jp/crid/1574232260462402816")})();
</script>nagatohttp://www.blogger.com/profile/18423439014202860313noreply@blogger.com0tag:blogger.com,1999:blog-237313321120008905.post-87830351372044368572022-03-14T16:01:00.044+09:002022-09-04T20:15:30.274+09:00Agressive Special Fraud Detector<div id="app05"></div><script>
(()=>{"use strict";function e(e,t,n){this.updateKey=(...t)=>(this.key=e(...t),this),this.load=()=>t(window.localStorage.getItem(this.key)??n),this.save=e=>(window.localStorage.setItem(this.key,e),e),this.update=e=>this.save(e(this.load()))}function t(e,t,n={}){var r=document.createElement(e);return Object.assign(r,n),t.appendChild(r),r}function n(e,n){for(let r=0;r<n;r++)t("br",e)}function r(e,t=0){let n=parseInt(e);return isNaN(n)?t:n}let a=new e((e=>"Cerebral Aneurysm Rupture Preventer"+function(e=0){const t=new Date;return t.setDate(t.getDate()-e),t.setHours(0,0,0,0),t}(e)),parseInt,"0"),i=new e((e=>"Cerebral Aneurysm Rupture Preventer.Latest."+e),parseInt,"0"),o=[],s=document.getElementById("app05");t("span",s,{innerHTML:"Amount: "});let l=t("input",s,{type:"text",value:"1"});t("span",s,{innerHTML:" x 100"}),n(s,2);let u=t("table",s);["Exercise","Outdoor","Getting Up Early","Nap","Sleep Early","Rest","Non alcolol","Small Meal","Vegetarian Diet","High Fiber Foods","Low GI","High Protein","High Amino Acid Score","Unsaturated Fat Acid","Low Fat","Reading","Debug","Clean Up","Cutting Nails"].forEach((e=>{let n=t("tr",u),s=t("button",t("td",n),{innerHTML:e}),c=t("span",t("td",n)),d=t("span",t("td",n),{style:"color: green"});function h(t){let n=i.updateKey(e).load();this.cur=(new Date).getTime(),this.ms=this.cur-n,("red"==t||this.ms>3e4)&&(c.innerHTML=function(e){let t=e/1e3;for(let[e,n]of[["seconds",60],["minutes",60],["hours",24],["days",30.5],["months",12],["years",200]]){if(t<n)return t.toFixed()+" "+e;t/=n}}(this.ms)+" ago",c.style="color: "+t)}s.onclick=()=>{let e=new h("green");i.save(e.cur);let t=100*r(l.value,1)+Math.floor(5*Math.min(e.ms/1e3/60/60,40));d.innerHTML=t+r(d.innerHTML,0),o[0].innerHTML=a.updateKey(0).update((e=>e+t)),l.value=1},new h("red")})),n(s,1),function(e,n,r=[]){for(var a=0;a<4;a++){const o=t("tr",e);for(var i=7*a;i<7*a+7;i++){let e=n(i);r.push(t("td",o,{innerHTML:0==e?"":e}))}}}(t("table",s,{style:"color: green"}),(e=>a.updateKey(e).load()),o),n(s,1),function(e,...r){for(let a of r)t("a",e,{href:a,innerHTML:a}),n(e,1)}(s,"https://www.change.org/p/github-ban-github-for-russian-developers")})();
</script>nagatohttp://www.blogger.com/profile/18423439014202860313noreply@blogger.com0tag:blogger.com,1999:blog-237313321120008905.post-20923446319029093382021-09-18T17:08:00.021+09:002022-08-22T17:09:59.962+09:00Dashboard<div id="app10"></div><script>
(()=>{"use strict";function e(e,t,n={}){var r=document.createElement(e);return Object.assign(r,n),t.appendChild(r),r}function t(t,n){for(let r=0;r<n;r++)e("br",t)}function n(t,n,r=[]){for(var a=0;a<4;a++){const s=e("tr",t);for(var o=7*a;o<7*a+7;o++){let t=n(o);r.push(e("td",s,{innerHTML:0==t?"":t}))}}return r}let r=["Cerebral Aneurysm Rupture Preventer","Reading Counter","Vim Cheat Sheet","Chromatic Scale","Greek Letter Spelling"],a=new function(e,t,n){this.updateKey=(...e)=>(this.key=((e,t)=>e+function(e=0){const t=new Date;return t.setDate(t.getDate()-e),t.setHours(0,0,0,0),t}(t))(...e),this),this.load=()=>t(window.localStorage.getItem(this.key)??"0"),this.save=e=>(window.localStorage.setItem(this.key,e),e),this.update=e=>this.save(e(this.load()))}(((e,t)=>e+function(e=0){const t=new Date;return t.setDate(t.getDate()-e),t.setHours(0,0,0,0),t}(t)),parseInt,"0"),o=document.getElementById("app10");e("p",o,{innerHTML:"Total"}),n(e("table",o,{style:"color: green"}),(e=>r.map((t=>a.updateKey(t,e).load())).reduce(((e,t)=>e+t),0)));for(let t of r)e("p",o,{innerHTML:t}),n(e("table",o,{style:"color: green"}),(e=>a.updateKey(t,e).load()));t(o,1),function(n,...r){for(let a of r)e("a",n,{href:a,innerHTML:a}),t(n,1)}(o,"https://www.moj.go.jp/isa/publications/materials/seido01.html")})();
</script>nagatohttp://www.blogger.com/profile/18423439014202860313noreply@blogger.com0tag:blogger.com,1999:blog-237313321120008905.post-9881722553057464772021-09-06T15:53:00.013+09:002022-08-29T12:12:37.898+09:00Reading Native Speech Counter<div id="app04"></div><script>
(()=>{"use strict";function t(t,e,n={}){var a=document.createElement(t);return Object.assign(a,n),e.appendChild(a),a}function e(e,n){for(let a=0;a<n;a++)t("br",e)}let n=new function(t,e,n){this.updateKey=(...t)=>(this.key=(t=>"Reading Counter"+function(t=0){const e=new Date;return e.setDate(e.getDate()-t),e.setHours(0,0,0,0),e}(t))(...t),this),this.load=()=>e(window.localStorage.getItem(this.key)??"0"),this.save=t=>(window.localStorage.setItem(this.key,t),t),this.update=t=>this.save(t(this.load()))}((t=>"Reading Counter"+function(t=0){const e=new Date;return e.setDate(e.getDate()-t),e.setHours(0,0,0,0),e}(t)),parseInt,"0"),a=[],o=document.getElementById("app04"),i=t("textarea",o,{cols:"50",rows:"6"});e(o,2),t("button",o,{innerHTML:"add",onclick:()=>{a[0].innerHTML=n.updateKey(0).update((t=>t+i.value.replace(/\s/g,"").length)),i.value=""}}),e(o,2),function(e,n,a=[]){for(var o=0;o<4;o++){const s=t("tr",e);for(var i=7*o;i<7*o+7;i++){let e=n(i);a.push(t("td",s,{innerHTML:0==e?"":e}))}}}(t("table",o,{style:"color:green"}),(t=>n.updateKey(t).load()),a),e(o,1),function(n,...a){for(let o of a)t("a",n,{href:o,innerHTML:o}),e(n,1)}(o,"https://www.moj.go.jp/isa/applications/guide/tetuduki_taikyo_reisyo.html")})();
</script>nagatohttp://www.blogger.com/profile/18423439014202860313noreply@blogger.com0tag:blogger.com,1999:blog-237313321120008905.post-28164928518655277542021-08-11T18:21:00.040+09:002022-08-29T12:15:31.460+09:00Vim For Any Colored<div id="app03"></div><script>
(()=>{"use strict";function e(e,t,o={}){var r=document.createElement(e);return Object.assign(r,o),t.appendChild(r),r}function t(t,o){for(let r=0;r<o;r++)e("br",t)}let o={title:"English",lang:"en_us",lang_tag:"en",cursorMovement:{title:"Cursor movement",commands:{h:"move cursor left",j:"move cursor down",k:"move cursor up",l:"move cursor right",w:"jump forwards to the start of a word",W:"jump forwards to the start of a word (words can contain punctuation)",e:"jump forwards to the end of a word",E:"jump forwards to the end of a word (words can contain punctuation)",b:"jump backwards to the start of a word",B:"jump backwards to the start of a word (words can contain punctuation)",ge:"jump backwards to the end of a word",gE:"jump backwards to the end of a word (words can contain punctuation)",H:"move to top of screen",M:"move to middle of screen",L:"move to bottom of screen",zero:"jump to the start of the line",caret:"jump to the first non-blank character of the line",dollar:"jump to the end of the line",g_:"jump to the last non-blank character of the line",gg:"go to the first line of the document",G:"go to the last line of the document",fiveG:"go to line 5",gd:"move to local declaration",gD:"move to global declaration",fx:"jump to next occurrence of character x",tx:"jump to before next occurrence of character x",Fx:"jump to previous occurence of character x",Tx:"jump to after previous occurence of character x",semicolon:"repeat previous f, t, F or T movement",comma:"repeat previous f, t, F or T movement, backwards",closeCurlyBrace:"jump to next paragraph (or function/block, when editing code)",openCurlyBrace:"jump to previous paragraph (or function/block, when editing code)",centerCursor:"center cursor on screen",CtrlPluse:"move screen down one line (without moving cursor)",CtrlPlusy:"move screen up one line (without moving cursor)",CtrlPlusb:"move back one full screen",CtrlPlusf:"move forward one full screen",CtrlPlusu:"move back 1/2 a screen",CtrlPlusd:"move forward 1/2 a screen",percent:"move to matching character (default supported pairs: '()', '{}', '[]' - use <code>:h matchpairs</code> in vim for more info)"},tip:"Prefix a cursor movement command with a number to repeat it. For example, <kbd>4j</kbd> moves down 4 lines."},insertMode:{title:"Insert mode - inserting/appending text",commands:{i:"insert before the cursor",I:"insert at the beginning of the line",a:"insert (append) after the cursor",A:"insert (append) at the end of the line",o:"append (open) a new line below the current line",O:"append (open) a new line above the current line",ea:"insert (append) at the end of the word",ctrlPlush:"delete the character before the cursor during insert mode",ctrlPlusw:"delete word before the cursor during insert mode",ctrlPlusj:"begin new line during insert mode",ctrlPlust:"indent (move right) line one shiftwidth during insert mode",ctrlPlusd:"de-indent (move left) line one shiftwidth during insert mode",ctrlPlusn:"insert (auto-complete) next match before the cursor during insert mode",ctrlPlusp:"insert (auto-complete) previous match before the cursor during insert mode",ctrlPlusrx:"insert the contents of register x",ctrlPlusox:"Temporarily enter normal mode to issue one normal-mode command x.",Esc:"exit insert mode"}},editing:{title:"Editing",commands:{r:"replace a single character.",R:"replace more than one character, until <kbd>ESC</kbd> is pressed.",J:"join line below to the current one with one space in between",gJ:"join line below to the current one without space in between",gwip:"reflow paragraph",gTilde:"switch case up to motion",gu:"change to lowercase up to motion",gU:"change to uppercase up to motion",cc:"change (replace) entire line",C:"change (replace) to the end of the line",cDollar:"change (replace) to the end of the line",ciw:"change (replace) entire word",cw:"change (replace) to the end of the word",s:"delete character and substitute text",S:"delete line and substitute text (same as cc)",xp:"transpose two letters (delete and paste)",u:"undo",U:"restore (undo) last changed line",CtrlPlusr:"redo",dot:"repeat last command"}},markingText:{title:"Marking text (visual mode)",commands:{v:"start visual mode, mark lines, then do a command (like y-yank)",V:"start linewise visual mode",o:"move to other end of marked area",CtrlPlusv:"start visual block mode",O:"move to other corner of block",aw:"mark a word",ab:"a block with ()",aB:"a block with {}",at:"a block with <> tags",ib:"inner block with ()",iB:"inner block with {}",it:"inner block with <> tags",Esc:"exit visual mode"},tip1:"Instead of <kbd>b</kbd> or <kbd>B</kbd> one can also use <kbd>(</kbd> or <kbd>{</kbd> respectively."},visualCommands:{title:"Visual commands",commands:{greaterThan:"shift text right",lessThan:"shift text left",y:"yank (copy) marked text",d:"delete marked text",tilde:"switch case",u:"change marked text to lowercase",U:"change marked text to uppercase"}},registers:{title:"Registers",commands:{show:"show registers content",pasteRegisterX:"paste contents of register x",yankIntoRegisterX:"yank into register x",quotePlusy:"yank into the system clipboard register",quotePlusp:"paste from the system clipboard register"},tip1:"Registers are being stored in ~/.viminfo, and will be loaded again on next restart of vim.",tip2:{0:"last yank",title:"Special registers:",quote:"unnamed register, last delete or yank",percent:"current file name",hashtag:"alternate file name",asterisk:"clipboard contents (X11 primary)",plus:"clipboard contents (X11 clipboard)",slash:"last search pattern",colon:"last command-line",dot:"last inserted text",minus:"last small (less than a line) delete",equal:"expression register",underscore:"black hole register"}},marks:{title:"Marks and positions",commands:{list:"list of marks",currentPositionA:"set current position for mark A",jumpPositionA:"jump to position of mark A",yankToMarkA:"yank text to position of mark A",backtick0:"go to the position where Vim was previously exited",backtickQuote:"go to the position when last editing this file",backtickDot:"go to the position of the last change in this file",backtickBacktick:"go to the position before the last jump",colonjumps:"list of jumps",ctrlPlusi:"go to newer position in jump list",ctrlPluso:"go to older position in jump list",colonchanges:"list of changes",gcomma:"go to newer position in change list",gsemicolon:"go to older position in change list",ctrlPlusCloseSquare:"jump to the tag under cursor"},tip1:"To jump to a mark you can either use a backtick (<kbd>`</kbd>) or an apostrophe (<kbd>'</kbd>). Using an apostrophe jumps to the beginning (first non-blank) of the line holding the mark.",tip:""},macros:{title:"Macros",commands:{recordA:"record macro a",stopRecording:"stop recording macro",runA:"run macro a",rerun:"rerun last run macro"}},global:{title:"Global",commands:{helpForKeyword:"open help for keyword",saveAsFile:"save file as",closePane:"close current pane",K:"open man page for word under the cursor",colonTerminal:"open a terminal window"},tip1:"Run <kbd>vimtutor</kbd> in a terminal to learn the first Vim commands."},cutAndPaste:{title:"Cut and paste",commands:{yy:"yank (copy) a line",twoyy:"yank (copy) 2 lines",yw:"yank (copy) the characters of the word from the cursor position to the start of the next word",yiw:"yank (copy) word under the cursor",yaw:"yank (copy) word under the cursor and the space after or before it",yDollar:"yank (copy) to end of line",p:"put (paste) the clipboard after cursor",P:"put (paste) before cursor",dd:"delete (cut) a line",twodd:"delete (cut) 2 lines",dw:"delete (cut) the characters of the word from the cursor position to the start of the next word",diw:"delete (cut) word under the cursor",daw:"delete (cut) word under the cursor and the space after or before it",D:"delete (cut) to the end of the line",dDollar:"delete (cut) to the end of the line",x:"delete (cut) character"}},indentText:{title:"Indent text",commands:{greaterThanGreaterThan:"indent (move right) line one shiftwidth",lessThanLessThan:"de-indent (move left) line one shiftwidth",greaterThanPercent:"indent a block with () or {} (cursor on brace)",greaterThanib:"indent inner block with ()",greaterThanat:"indent a block with <> tags","3==":"re-indent 3 lines","=Percent":"re-indent a block with () or {} (cursor on brace)","=iB":"re-indent inner block with {}","gg=G":"re-indent entire buffer",closeSquarep:"paste and adjust indent to current line"}},exiting:{title:"Exiting",commands:{colonw:"write (save) the file, but don't exit",colonwsudo:"write out the current file using sudo",colonwq:"write (save) and quit",colonx:"write (save) and quit",colonq:"quit (fails if there are unsaved changes)",colonqbang:"quit and throw away unsaved changes",colonwqa:"write (save) and quit on all tabs"}},searchAndReplace:{title:"Search and replace",commands:{forwardSlashPattern:"search for pattern",questionMarkPattern:"search backward for pattern",backslashVpattern:"'very magic' pattern: non-alphanumeric characters are interpreted as special regex symbols (no escaping needed)",n:"repeat search in same direction",N:"repeat search in opposite direction",colonPercentForwardSlashOldForwardSlashNewForwardSlashg:"replace all old with new throughout file",colonPercentForwardSlashOldForwardSlashNewForwardSlashgc:"replace all old with new throughout file with confirmations",colonnoh:"remove highlighting of search matches"}},searchMultipleFiles:{title:"Search in multiple files",commands:{colonvimgrep:"search for pattern in multiple files",coloncn:"jump to the next match",coloncp:"jump to the previous match",coloncopen:"open a window containing the list of matches",coloncclose:"close the quickfix window"}},workingWithMultipleFiles:{title:"Working with multiple files",commands:{colone:"edit a file in a new buffer",colonbnext:"go to the next buffer",colonbprev:"go to the previous buffer",colonls:"list all open buffers",colonbd:"delete a buffer (close a file)",colonbnumber:"go to a buffer by index #",colonbfile:"go to a buffer by file",colonsp:"open a file in a new buffer and split window",colonvsp:"open a file in a new buffer and vertically split window",colonvertba:"edit all buffers as vertical windows",colontabba:"edit all buffers as tabs",ctrlPlusws:"split window",ctrlPluswv:"split window vertically",ctrlPlusww:"switch windows",ctrlPluswq:"quit a window",ctrlPluswx:"exchange current window with next one","ctrlPlusw=":"make all windows equal height & width",ctrlPluswh:"move cursor to the left window (vertical split)",ctrlPluswl:"move cursor to the right window (vertical split)",ctrlPluswj:"move cursor to the window below (horizontal split)",ctrlPluswk:"move cursor to the window above (horizontal split)",ctrlPluswH:"make current window full height at far left (leftmost vertical window)",ctrlPluswL:"make current window full height at far right (rightmost vertical window)",ctrlPluswJ:"make current window full width at the very bottom (bottommost horizontal window)",ctrlPluswK:"make current window full width at the very top (topmost horizontal window)"}},tabs:{title:"Tabs",commands:{colonTabNew:"open a file in a new tab",ctrlPluswT:"move the current split window into its own tab",gt:"move to the next tab",gT:"move to the previous tab",hashgt:"move to tab number #",colontabmove:"move current tab to the #th position (indexed from 0)",colontabc:"close the current tab and all its windows",colontabo:"close all tabs except for the current one",colontabdo:"run the <code>command</code> on all tabs (e.g. <code>:tabdo q</code> - closes all opened tabs)"}},diff:{title:"Diff",commands:{zf:"manually define a fold up to motion",zd:"delete fold under the cursor",za:"toggle fold under the cursor",zo:"open fold under the cursor",zc:"close fold under the cursor",zr:"reduce (open) all folds by one level",zm:"fold more (close) all folds by one level",zi:"toggle folding functionality",closeSquarec:"jump to start of next change",openSquarec:"jump to start of previous change",do:"obtain (get) difference (from other buffer)",dp:"put difference (to other buffer)",colonDiffthis:"make current window part of diff",colonDiffupdate:"update differences",colonDiffoff:"switch off diff mode for current window"},tip1:"The commands for folding (e.g. <kbd>za</kbd>) operate on one level. To operate on all levels, use uppercase letters (e.g. <kbd>zA</kbd>).",tip2:"To view the differences of files, one can directly start Vim in diff mode by running <kbd>vimdiff</kbd> in a terminal. One can even set this as <kbd>git difftool</kbd>."},words:{keyword:"keyword",file:"file",movement:"movement"},languages:{title:"Languages"},footer:"Checkout the source on"},r={Escape:"esc",0:"zero",1:"one",2:"two",3:"three",4:"four",5:"five",6:"six",7:"seven",8:"eight",9:"nine","!":"bang",'"+':"quotePlus",'"':"quote",$:"dollar","%":"percent","=":"=","^":"caret","~":"tilde","\\":"backslash","`":"backtick","[":"openSquare","{":"openCurlyBrace",";":"semicolon",":":"colon","]":"closeSquare","}":"closeCurlyBrace",_:"_",",":"comma","<":"lessThan",".":"dot",">":"greaterThan","/":"forwardSlash","?":"questionMark",zz:"centerCursor",":reg":"show",'"xy':"yankIntoRegisterX",'"xp':"pasteRegisterX",":marks":"list",ma:"currentPositionA","`a":"jumpPositionA","y`a":"yankToMarkA",":ju":":jumps",qa:"recordA",q:"stopRecording","@a":"runA","@@":"rerun",":h":"helpForKeyword",":sav":"saveAsFile",":clo":"closePane",":ter":":Terminal",":w !sudo tee %":":wsudo",":%s/Old/New/g":":%/Old/New/g",":%s/Old/New/gc":":%/Old/New/gc",":vim /pattern/ {`{file}`}":":vimgrep",":cope":":copen",":ccl":":cclose",":e file":"col1",":bn":":bnext",":bp":":bprev",":b#":":bnumber",":b file":":bfile",":sp file":":sp",":vs file":":vsp",":vert ba":":vertba",":tab ba":":tabba",":tabnew":":TabNew","#gt":"hashgt",":tabm":":tabmove",":diffthis":":Diffthis",":dif":":Diffupdate",":diffo":":Diffoff"},n=["cursorMovement","insertMode","editing","markingText","visualCommands","registers","marks","macros","global","cutAndPaste","indentText","exiting","searchAndReplace","searchMultipleFiles","workingWithMultipleFiles","tabs","diff"],a=new function(e,t,o){this.updateKey=(...e)=>(this.key=(e=>"Vim Cheat Sheet"+function(e=0){const t=new Date;return t.setDate(t.getDate()-e),t.setHours(0,0,0,0),t}(e))(...e),this),this.load=()=>t(window.localStorage.getItem(this.key)??"0"),this.save=e=>(window.localStorage.setItem(this.key,e),e),this.update=e=>this.save(e(this.load()))}((e=>"Vim Cheat Sheet"+function(e=0){const t=new Date;return t.setDate(t.getDate()-e),t.setHours(0,0,0,0),t}(e)),parseInt,"0"),i=!0,l=0,s=[],c=[],d=[],u=document.getElementById("app03"),h=e("select",u,{onclick:()=>g(h.value)});for(let t of n)e("option",h,{value:t,innerHTML:t});let m=e("button",u,{innerHTML:"default",onclick:()=>m.innerHTML=(i=!i)?"shuffle":"default"}),p=e("button",u,{innerHTML:"category",onclick:()=>g(h.value=n[Math.floor(Math.random()*n.length)])});t(u,2);let f=e("table",u);t(u,1);let w=function(t,o,r=[]){for(var n=0;n<4;n++){const i=e("tr",t);for(var a=7*n;a<7*n+7;a++){let t=o(a);r.push(e("td",i,{innerHTML:0==t?"":t}))}}return r}(e("table",u,{style:"color:green"}),(e=>a.updateKey(e).load()));function g(t){l=0,s=Object.entries(o[t].commands).map((([e,t])=>(Object.entries(r).forEach((([t,o])=>{return[o,(r=o,r.charAt(0).toUpperCase()+r.slice(1))].forEach((o=>e=e.replaceAll(o,t)));var r})),["ctrlPlus","CtrlPlus"].forEach((t=>e=e.replaceAll(t,"Ctrl+"))),[e,t]))),i&&function(e){for(let t=1;t<e.length;t++){let o=Math.random()*(t+1)|0;[e[t],e[o]]=[e[o],e[t]]}}(s),c=[],d=[],f.innerHTML="",s.forEach((([t,o])=>{let r=e("tr",f,{style:"color:red"});c.push(r),e("td",r,{innerHTML:o}),d.push(e("td",r))}))}t(u,1),e("span",u,{innerHTML:"License: "}),function(o,...r){for(let n of r)e("a",o,{href:n,innerHTML:n}),t(o,1)}(u,"https://github.com/rtorr/vim-cheat-sheet/blob/master/License.txt","https://www.kokuminto.jp/");let b=(()=>{let e=[],t=!1;return o=>r=>{let n=s[l][0],i=r.key;"Control"==i&&(t=o),o&&["","Shift","Control"].every((e=>e!=i))&&e.push(t?"Ctrl+"+i:i);let u=e.join("").endsWith(n.replaceAll("Ctrl+",""));(u||o&&"ArrowRight"==r.key)&&(c[l].style.color=u?"green":"gray",d[l].innerHTML=n,e=[],l++),o&&(w[0].innerHTML=a.updateKey(0).update((e=>e+(u?20:1))))}})();document.addEventListener("keydown",b(!0)),document.addEventListener("keyup",b(!1)),p.dispatchEvent(new Event("click"))})();
</script>nagatohttp://www.blogger.com/profile/18423439014202860313noreply@blogger.com0tag:blogger.com,1999:blog-237313321120008905.post-4496450285844189412021-08-08T04:00:00.032+09:002022-08-22T21:28:10.563+09:00Chromatic Scale<div id="app02"></div><script>
(()=>{"use strict";function e(e,t,n={}){var a=document.createElement(e);return Object.assign(a,n),t.appendChild(a),a}function t(t,n){for(let a=0;a<n;a++)e("br",t)}function n(t){e("p",p,{innerHTML:t})}let a=["sine","square","sawtooth","triangle"],o=[["Do","Re","Mi","Fa","Sol","La","Si","Do"],["C","D","E","F","G","A","B","C"]],i=[0,2,4,5,7,9,11,12],r=0,c=0,s=[],l=[],u=[],h=[],d=new function(e,t,n){this.updateKey=(...e)=>(this.key=(e=>"Chromatic Scale"+function(e=0){const t=new Date;return t.setDate(t.getDate()-e),t.setHours(0,0,0,0),t}(e))(...e),this),this.load=()=>t(window.localStorage.getItem(this.key)??"0"),this.save=e=>(window.localStorage.setItem(this.key,e),e),this.update=e=>this.save(e(this.load()))}((e=>"Chromatic Scale"+function(e=0){const t=new Date;return t.setDate(t.getDate()-e),t.setHours(0,0,0,0),t}(e)),parseInt,"0"),p=document.getElementById("app02");n("You can play some of the sound with the below 8 chromatic scales. And answer which was played."),a.forEach(((t,n)=>e("button",p,{innerHTML:t,onclick:()=>r=n}))),t(p,2),n("Volume of the played sound.");let f=e("input",p,{type:"range",min:"0",max:"1",step:"0.01",value:"0.5"});t(p,2),n("Types wave shape of the played sound.");let w=["DoReMi","CDE"].map(((t,n)=>e("button",p,{innerHTML:t,onclick:()=>s.forEach(((e,t)=>e.innerHTML=o[n][t]))})));t(p,2);let m=e("table",p);for(let y=0;y<8;y++){function M(e,t,n=""){e.innerHTML=t,""!=n&&(e.style.color=n)}let g=e("tr",m),b=(t,n={})=>e(t,e("td",g),n);function T(e){let t=b("span");return M(t,"0",e),t}s.push(b("button",{onclick:()=>{let e=y==c?H:l[c];e.innerHTML=(parseInt(e.innerHTML)+1).toString(),s.forEach((e=>e.disabled=!0)),u.forEach(((e,t)=>{M(e,""),t==c?M(e,"〇","green"):t==y&&M(e,"×","red")})),h[0].innerHTML=d.updateKey(0).update((e=>e+Math.max(20-2*Math.pow(y-c,2),0)))}}));let H=T("green"),E=T("red");l.push(E),u.push(b("span"))}e("br",p),function(t,n,a=[]){for(var o=0;o<4;o++){const r=e("tr",t);for(var i=7*o;i<7*o+7;i++){let t=n(i);a.push(e("td",r,{innerHTML:0==t?"":t}))}}}(e("table",p,{style:"color:green"}),(e=>d.updateKey(e).load()),h),e("br",p),e("button",p,{innerHTML:"Play",onclick:()=>{c=Math.floor(8*Math.random());let e=new(window.AudioContext||window.webkitAudioContext),t=e.createOscillator();t.type=a[r],[[260*Math.pow(2,i[c]/12),0],[0,2]].forEach((n=>t.frequency.setValueAtTime(n[0],e.currentTime+n[1])));let n=e.createGain();n.gain.value=f.value,t.connect(n).connect(e.destination),t.start(),s.forEach((e=>e.disabled=!1))}}),t(p,2),function(n,...a){for(let o of a)e("a",n,{href:o,innerHTML:o}),t(n,1)}(p,"https://en.wikipedia.org/wiki/Chromatic_scale","http://gaitsui.blog.fc2.com/"),w[0].dispatchEvent(new Event("click"))})();
</script>nagatohttp://www.blogger.com/profile/18423439014202860313noreply@blogger.com0tag:blogger.com,1999:blog-237313321120008905.post-58732974929185596172021-05-11T15:58:00.032+09:002022-08-22T21:09:31.866+09:00Greek Letter<div id="app01"></div><script>
(()=>{"use strict";function e(e,t,n={}){var a=document.createElement(e);return Object.assign(a,n),t.appendChild(a),a}function t(t,n){for(let a=0;a<n;a++)e("br",t)}let n=function(e){for(let t=1;t<e.length;t++){let n=Math.random()*(t+1)|0;[e[t],e[n]]=[e[n],e[t]]}return e}(["Α α,alpha","Β β,beta","Γ γ,gamma","Δ δ,delta","Ε ε,epsilon","Ζ ζ,zeta","Η η,eta","Θ θ,theta","Ι ι,iota","Κ κ,kappa","Λ λ,lambda","Μ μ,mu","Ν ν,nu","Ξ ξ,xi","Ο ο,omicron","Π π,pi","Ρ ρ,rho","Σ σ,sigma","Υ υ,upsilon","Φ φ,phi","Χ χ,chi","Ψ ψ,psi","Ω ω,omega"]),a=new function(e,t,n){this.updateKey=(...e)=>(this.key=(e=>"Greek Letter Spelling"+function(e=0){const t=new Date;return t.setDate(t.getDate()-e),t.setHours(0,0,0,0),t}(e))(...e),this),this.load=()=>t(window.localStorage.getItem(this.key)??"0"),this.save=e=>(window.localStorage.setItem(this.key,e),e),this.update=e=>this.save(e(this.load()))}((e=>"Greek Letter Spelling"+function(e=0){const t=new Date;return t.setDate(t.getDate()-e),t.setHours(0,0,0,0),t}(e)),parseInt,"0"),o=[],i=document.getElementById("app01");e("span",i,{innerHTML:"The text colors of each greek letter below changes by writing the collect spell of them."}),t(i,2);let l=e("table",i),r=e("tr",l);for(let[t,i]of n.map((e=>e.split(",")))){let n=e("span",e("td",r),{style:"color: #f00",innerText:t}),p=e("input",e("td",r),{type:"text"});4==r.childElementCount&&(r=e("tr",l)),o.push(p),p.onkeyup=()=>{let e=p.value==i;s[0].innerHTML=a.updateKey(0).update((t=>t+(e?20:1))),e&&(n.style.color="#0f0",p.disabled=!0,o[(o.indexOf(p)+1)%o.length].focus())}}t(i,1);let s=function(t,n,a=[]){for(var o=0;o<4;o++){const l=e("tr",t);for(var i=7*o;i<7*o+7;i++){let t=n(i);a.push(e("td",l,{innerHTML:0==t?"":t}))}}return a}(e("table",i,{style:"color: green"}),(e=>a.updateKey(e).load()));t(i,1),function(n,...a){for(let o of a)e("a",n,{href:o,innerHTML:o}),t(n,1)}(i,"https://en.wikipedia.org/wiki/Greek_alphabet","http://www.moj.go.jp/isa/applications/guide/tetuduki_index5.html")})();
</script>nagatohttp://www.blogger.com/profile/18423439014202860313noreply@blogger.com0tag:blogger.com,1999:blog-237313321120008905.post-19523200239655370682021-04-30T15:27:00.002+09:002021-08-23T18:17:12.588+09:00webgl cube<p>
<script crossorigin="anonymous" defer="" integrity="sha512-zhHQR0/H5SEBL3Wn6yYSaTTZej12z0hVZKOv3TwCUXT1z5qeqGcXJLLrbERYRScEDDpYIJhPC1fk31gqR783iQ==" src="https://cdnjs.cloudflare.com/ajax/libs/gl-matrix/2.8.1/gl-matrix-min.js">
</script>
<script>
window.onload = () => {
const gl = document.querySelector("#glCanvas").getContext("webgl");
const pg = gl.createProgram();
function attachShader(type, src) {
const shader = gl.createShader(type);
gl.shaderSource(shader, src);
gl.compileShader(shader);
gl.attachShader(pg, shader);
}
attachShader(gl.VERTEX_SHADER, `
attribute vec4 vaPos;
attribute vec4 vaCo;
uniform mat4 umMv;
uniform mat4 umProj;
varying lowp vec4 vCo;
void main() {
gl_Position = umProj * umMv * vaPos;
vCo = vaCo;
}`);
attachShader(gl.FRAGMENT_SHADER, `
varying lowp vec4 vCo;
void main() {
gl_FragColor = vCo;
}
`);
gl.linkProgram(pg);
const vaPos = gl.getAttribLocation(pg, 'vaPos');
const vaCo = gl.getAttribLocation(pg, 'vaCo');
const umMv = gl.getUniformLocation(pg, 'umMv');
const umProj = gl.getUniformLocation(pg, 'umProj');
function createBuffer(type, arr) {
const buf = gl.createBuffer();
gl.bindBuffer(type, buf);
gl.bufferData(type, arr, gl.STATIC_DRAW);
return buf;
}
const createArrayBuffer = (arr) => createBuffer(gl.ARRAY_BUFFER, new Float32Array(arr));
const createElementBuffer = (arr) => createBuffer(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(arr));
const mirrorXYZ = (f) => [0, 1, 2].flatMap(i => [0, 7].flatMap(j => f(i, j)));
const bufPos = createArrayBuffer(
mirrorXYZ((i, j) => [0, [1,2,4][i], [2,4,1][i], [3,6,5][i] ].map(k => k ^ j))
.flatMap(i => [i, i / 2, i / 4]).map(k => (k & 1) * 2 - 1.0));
const bufCo = createArrayBuffer(
[1, 2, 3, 4, 5, 6].flatMap(i => [i, i, i, i])
.flatMap(i => [i, i / 2, i / 4, 1]).map(i => (i & 1) * 1.0));
const bufIndices = createElementBuffer(
mirrorXYZ((i, j) => [0, 1, 2, 1, 3, 2].map(k => (k ^ j) + i * 8)));
var x = 0.0;
var y = 0.0;
window.addEventListener("keydown", event => {
switch (event.key) {
case "ArrowDown": y -= 0.1; break;
case "ArrowUp": y += 0.1; break;
case "ArrowLeft": x -= 0.1; break;
case "ArrowRight": x += 0.1; break;
default: return;
}
}, true);
function render(now) {
gl.clearColor(0.0, 0.0, 0.0, 1.0);
gl.clearDepth(1.0);
gl.enable(gl.DEPTH_TEST);
gl.depthFunc(gl.LEQUAL);
gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
const mMv = mat4.create();
mat4.translate(mMv, mMv, [x, y, -30.0]);
mat4.rotate(mMv, mMv, now / 1000, [0.0, 1.0, 1.0]);
const mProj = mat4.create();
mat4.perspective(mProj, 45 * Math.PI / 180, gl.canvas.clientWidth / gl.canvas.clientHeight, 0.1, 100.0);
function vertexAttrib(buf, va, nComponents) {
gl.bindBuffer(gl.ARRAY_BUFFER, buf);
gl.vertexAttribPointer(va, nComponents, gl.FLOAT, false, 0, 0);
gl.enableVertexAttribArray(va);
}
vertexAttrib(bufPos, vaPos, 3);
vertexAttrib(bufCo, vaCo, 4);
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, bufIndices);
gl.useProgram(pg);
gl.uniformMatrix4fv(umMv, false, mMv);
gl.uniformMatrix4fv(umProj, false, mProj);
gl.drawElements(gl.TRIANGLES, 36, gl.UNSIGNED_SHORT, 0);
requestAnimationFrame(render);
}
requestAnimationFrame(render);
}
</script>
<canvas height="480" id="glCanvas" width="640"></canvas>
<br />
<a href="https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Tutorial/Creating_3D_objects_using_WebGL">https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Tutorial/Creating_3D_objects_using_WebGL</a><br /><a href="https://catonif.github.io/cube/">https://catonif.github.io/cube/</a><br /><a href="http://www.moj.go.jp/isa/consultation/report/index.html">http://www.moj.go.jp/isa/consultation/report/index.html</a><br /></p>nagatohttp://www.blogger.com/profile/18423439014202860313noreply@blogger.com0tag:blogger.com,1999:blog-237313321120008905.post-27137068838837717072017-09-13T07:36:00.001+09:002017-09-14T09:17:26.112+09:00Learn sin curve<button id='button'>Learn</button><br/>
<div style='position:relative; width:400px; height:400px'>
<canvas id='canvas_actual' width='400' height='400' style='position:absolute'></canvas>
<canvas id='canvas_result' width='400' height='400' style='position:absolute'></canvas>
</div>
<script>
var range = (n, callback) => { for(var i = 0; i < n; i++) callback(i); };
var sum = (n, callback) => { var value = 0; range(n, (i) => { value += callback(i) }); return value; };
var arrays = (lengths, callback) => {
var n = lengths.length;
var array = new Array(n);
range(n, (i) => {
var m = lengths[i];
array[i] = new Array(m);
range(m, (j) => { array[i][j] = callback() }) });
return array; };
var layer = (n, m, callback) => {
var array = new Array(n);
range(n, (i) => {
array[i] = new Array(m);
range(m, (j) => { array[i][j] = callback() }); });
return array; };
var round = (value) => Math.round(value * 100) / 100;
var noise = (strength) => (Math.round(Math.random()) * 2 - 1) * Math.pow(Math.sin(Math.random() * Math.PI), 2) * strength;
var translate = (value) => (0.5 - value) * 400;
var toInt = (value) => (value*255)|0;
var rgb = (r, g, b) => 'rgb(' + toInt(r) + ',' + toInt(g) + ',' + toInt(b) + ')';
var byId = (id) => document.getElementById(id);
var getClearedContext2D = (id) => {
var ctx = byId(id).getContext('2d');
ctx.clearRect(0, 0, 400, 400);
return ctx; };
var drawPath = (ctx, callback) => {
ctx.beginPath();
callback();
ctx.closePath(); };
var ratio = 100;
var n0 = 20;
var n1 = 5;
var n2 = 20;
var prop = (x, w, b) => {
var h = arrays([n0,n1,n2], () => { return 0 });
range(n0, (i) => { h[0][i] += Math.tanh(w[0][i][0]*x[0] + b[0][i]) });
range(n1, (i) => { h[1][i] += Math.tanh(sum(n0, (j) => { return w[1][i][j]*h[0][j] }) + b[1][i]) });
range(n2, (i) => { h[2][i] += Math.tanh(sum(n1, (j) => { return w[2][i][j]*h[1][j] }) + b[2][i]) });
return h; };
var backProp = (y, b, n, w, x, m) => {
range(n, (i) => {
var value = b[i]
range(m, (j) => value += w[i][j] * x[j]);
value = Math.tanh(value);
var sign = Math.sign(y[i] - value);
var grad = sign * (1 - Math.pow(value, 2));
range(m, (j) => w[i][j] += x[j] * grad / ratio);
b[i] += grad / ratio;
}); };
byId('button').onclick = () => {
var w = [
layer(n0, 1, () => { return noise(1) }),
layer(n1, n0, () => { return noise(1) }),
layer(n2, n1, () => { return noise(1) }),
layer(1, n2, () => { return noise(1) }) ];
var b = arrays([n0, n1, n2, 1], () => { return 0 });
var ctx = getClearedContext2D('canvas_actual');
var ctx2= getClearedContext2D('canvas_result');
for(var i = 0; i < 240000; i++) {{
var x = [Math.random()];
var y = [Math.sin(x[0] * Math.PI * 2) * 0.3];
x[0] += noise(0.05);
y[0] += noise(0.05);
var h = prop(x, w, b);
backProp(y, b[3], 1, w[3], h[2], n2);
backProp(h[2], b[2], n2, w[2], h[1], n1);
backProp(h[1], b[1], n1, w[1], h[0], n0);
backProp(h[0], b[0], n0, w[0], x, 1);
if(i % 100 == 0) {
drawPath(ctx, () => {
ctx.arc(x*400, translate(y), 1, 0, 2 * Math.PI); });
ctx.fillStyle = "rgb(128,128,128)";
ctx.fill(); } }
if(i % 10000 == 9999) {
range(100, (j) => {
var x = [j / 100.0];
var h = prop(x, w, b);
var y = Math.tanh(sum(n2, (j) => { return w[3][0][j]*h[2][j] }) + b[3][0]);
drawPath(ctx2, () => {
ctx2.arc(j*4, translate(y), 1, 0, 2 * Math.PI); });
ctx2.fillStyle = 'hsl(' + (i/1000) + ',100%,50%)';
ctx2.fill(); });
}
}
}
</script>nagatohttp://www.blogger.com/profile/18423439014202860313noreply@blogger.com0tag:blogger.com,1999:blog-237313321120008905.post-20248826444245747512017-09-11T09:35:00.002+09:002017-09-11T21:17:34.126+09:00Learn weights from data matrix X and label vector y.Learn weights from data matrix X and label vector y.<br/>
<button id='button'>Learn</button><br/>
actual: y = (0.1, 0.2, 0.1, 0.3) x + 0~0.3<br/>
result: <span id='result'></span><br/>
<div style='position:relative; width:400px; height:400px'>
<canvas id='canvas_result' width='400' height='400' style='position:absolute'></canvas>
<canvas id='canvas_actual' width='400' height='400' style='position:absolute'></canvas>
</div>
<script>
var byId = (id) => document.getElementById(id);
var getClearedContext2D = (id) => {
var ctx = byId(id).getContext('2d');
ctx.clearRect(0, 0, 400, 400);
return ctx; };
var round = (value) => Math.round(value * 100) / 100;
var translate = (value) => (1 - value) * 400;
var toInt = (value) => (value*255)|0;
var rgb = (r, g, b) => 'rgb(' + toInt(r) + ',' + toInt(g) + ',' + toInt(b) + ')';
byId('button').onclick = () => {
var wActual = [0.1, 0.2, 0.1, 0.3];
var w = [0, 0, 0, 0];
var b = 0;
var ctx = getClearedContext2D('canvas_actual');
for(var i = 0; i < 2000; i++) {
var x = new Array(4);
var y = Math.random() * 0.3;
for(var j = 0; j < 4; j++) { x[j] = Math.random(); y += wActual[j] * x[j]; }
var error = y - b;
for(var j = 0; j < 4; j++) error -= w[j] * x[j];
var loss = Math.tanh(error^2);
var grad = -2 * error * (1 - Math.tanh(loss));
for(var j = 0; j < 4; j++) w[j] -= x[j] * grad / 5;
b -= grad / 5;
ctx.beginPath();
ctx.fillStyle = rgb(x[0],x[1],x[2]);
ctx.arc(x[3]*400, translate(y), 2, 0, 2 * Math.PI);
ctx.closePath();
ctx.fill();
};
var half = (w[0]+w[1]+w[2]) / 2;
ctx = getClearedContext2D('canvas_result');
ctx.beginPath();
ctx.strokeStyle = rgb(w[0]*5,w[1]*2.5,w[2]*5);
ctx.moveTo(0, translate(half+b));
ctx.lineTo(400, translate(half+w[3]+b));
ctx.closePath();
ctx.stroke();
byId('result').innerHTML =
'y = (' +
round(w[0]) + ', ' +
round(w[1]) + ', ' +
round(w[2]) + ', ' +
round(w[3]) + ') + ' +
round(b);
}
</script>nagatohttp://www.blogger.com/profile/18423439014202860313noreply@blogger.com0tag:blogger.com,1999:blog-237313321120008905.post-64055857163940416862017-09-10T16:27:00.002+09:002017-09-10T17:20:31.076+09:00 Learn weights from data matrix X and label vector y Learn weights from data matrix X and label vector y.</br>
<button id='button'>Learn</button></br>
actual: y = 0.2 * x0 + 0.3 + x1 + 0~0.5</br>
result: <span id='result'></span><br>
<div style='position:relative; width:400px; height:400px'>
<canvas id='canvas_result' width='400' height='400' style='position:absolute'></canvas>
<canvas id='canvas_actual' width='400' height='400' style='position:absolute'></canvas>
</div>
<script>
var byId = (id) => document.getElementById(id);
var round = (value) => Math.round(value * 100) / 100;
var translate = (value) => (1 - value) * 400;
var gray = (value) => { var int = value | 0; return 'rgb('+int+','+int+','+int+')'; };
byId('button').onclick = () => {
var w = [0, 0];
var b = 0;
var ctx = byId('canvas_actual').getContext('2d');
ctx.clearRect(0, 0, 400, 400);
for(var i = 0; i < 1000; i++) {
var x = new Array(2);
for(var j = 0; j < 2; j++) x[j] = Math.random();
var y = x[0] * 0.2 + x[1] * 0.3 + Math.random() / 2;
var error = y - b - w[0] * x[0] - w[1] * x[1];
var loss = Math.tanh(error^2);
var grad = -2 * error * (1 - Math.tanh(loss));
w[0] -= x[0] * grad / 5;
w[1] -= x[1] * grad / 5;
b -= grad / 5;
ctx.beginPath();
ctx.fillStyle = gray(y*255);
ctx.arc(x[0]*400, x[1]*400, 2, 0, 2 * Math.PI);
ctx.closePath();
ctx.fill(); };
ctx.beginPath();
ctx.moveTo(0, translate(b));
ctx.lineTo(400, translate(w+b));
ctx.stroke();
ctx = byId('canvas_result').getContext('2d');
for(var i = 0; i < 400; i+=8) {
for(var j = 0; j < 400; j+=8) {
ctx.beginPath();
ctx.fillStyle = gray((w[0]*i/400 + w[1]*j/400 + b)*255);
ctx.fillRect(i,j,8,8);
ctx.closePath();
ctx.stroke();
}
}
byId('result').innerHTML = 'y = ' + round(w[0]) + ' * x0 + ' + round(w[1]) + ' * x1 + ' + round(b);
}
</script>nagatohttp://www.blogger.com/profile/18423439014202860313noreply@blogger.com0tag:blogger.com,1999:blog-237313321120008905.post-44166507267516276422017-09-09T15:36:00.002+09:002017-09-12T02:39:41.844+09:00 Learn a weight and a bias from data vector x and label vector y Learn a weight from data vector x and label vector y.</br>
<i>y</i> = w * <i>x</i> + <i>b</i></br>
<canvas id='canvas' width='400' height='400'></canvas>
<button id='button'>Learn</button>
<p id='result'></p>
<script>
var byId = (id) => document.getElementById(id);
var round = (value) => Math.round(value * 100) / 100;
var translate = (value) => (1 - value) * 400;
var canvas = byId('canvas');
var ctx = canvas.getContext('2d');
byId('button').onclick = () => {
var w = 0;
var b = 0;
ctx.clearRect(0, 0, canvas.width, canvas.height);
for(var i = 0; i < 1000; i++) {
var x = (0.5 + Math.random()) / 2;
var y = x * 0.5 + (Math.random() - 0.5) / 2 + 0.2;
var error = y - b - w * x;
var loss = Math.tanh(error^2);
var grad = -2 * error * (1 - Math.tanh(loss));
w -= x * grad / 5;
b -= grad / 5;
ctx.beginPath();
ctx.arc(x*400, translate(y), 1, 0, 2 * Math.PI);
ctx.stroke(); };
ctx.beginPath();
ctx.moveTo(0, translate(b));
ctx.lineTo(400, translate(w+b));
ctx.stroke();
byId('result').innerHTML = 'y = ' + round(w) + ' * x + ' + round(b);
};
</script>
nagatohttp://www.blogger.com/profile/18423439014202860313noreply@blogger.com0tag:blogger.com,1999:blog-237313321120008905.post-89505730100700524222017-09-09T11:12:00.000+09:002017-09-09T11:12:00.869+09:00 Learn a weight from a data x and a label y Learn a weight from a data x and a label y.</br>
y = w * x</br>
<button id='button'>Learn</button>
<p id='result'></p>
<script>
var byId = (id) => document.getElementById(id);
var round = (x) => Math.round(x * 100) / 100;
byId('button').onclick = () => {
var x = Math.random();
var y = 2 * x + Math.random() / 10;
var w = y / x;
byId('result').innerHTML = 'x = ' + round(x) + ',y = ' + round(y) + ', w =' + round(w);
};
</script>nagatohttp://www.blogger.com/profile/18423439014202860313noreply@blogger.com0tag:blogger.com,1999:blog-237313321120008905.post-32253917857179522182016-12-19T03:50:00.001+09:002016-12-19T04:31:03.755+09:00Ordinary least squaresRoughly calculation of ordinary least squares of multiple linear regression.<br />
<br />
y = X b + e<br />
is a multiple linear regression where<br />
y is a dependent vector,<br />
X is an explanatory matrix and<br />
e is an error vector.<br />
<br />
e = y - X b<br />
<br />
Multiply both sides with a transposed variable of then self.<br />
<br />
eT e <br />
= (y - X b)T (y - X b)<br />
= yT y - 2 bT XT y + bT XT X b<br />
<br />
Differentiate by b.<br />
Since the right hand side of previous equation is a squared expression with b,<br />
the differentiation of minimal value of it is 0. <br />
<br />
d(eT e) / db = - 2 XT y + 2 XT X b = 0<br />
<br />
b = (XT X)^-1 XT y<br />
<br />
References:<br />
<a href="https://en.wikipedia.org/wiki/Ordinary_least_squares">https://en.wikipedia.org/wiki/Ordinary_least_squares</a><br />
<a href="https://en.wikipedia.org/wiki/Proofs_involving_ordinary_least_squares#Least_squares_estimator_for_.CE.B2">https://en.wikipedia.org/wiki/Proofs_involving_ordinary_least_squares#Least_squares_estimator_for_.CE.B2</a>nagatohttp://www.blogger.com/profile/18423439014202860313noreply@blogger.com0tag:blogger.com,1999:blog-237313321120008905.post-59571285390807740092015-04-06T16:44:00.002+09:002015-04-16T23:30:50.534+09:00TODO 2TODO<br />
エフェクト<br />
ポーズを練習(1ストローク毎に採点しグラフ化)<br />
ポーズを練習(同じ問題をやるボタン、使った設定をツイートに表示、結果の表に出す情報を増やす、設定の説明をちゃんとする、採点エフェクトは表示・非表示の切り替えにする)<br />
ポーズを練習(結果の統計データ)<br />
<br />
DONE<br />
背景(ポーズを練習、なぞって練習、円の達人、色彩テスト)<br />
円の達人(ペンタブレットに対応)<br />
ソフト倉庫(ウェブページ読み上げツール、時間計測・TODOリストのアプリを更新)<br />
<br />
POSTPONE<br />
ソフト倉庫(ツールの利用規約を書く、ライセンス管理をする、バグ修正、紹介ページ)<br />
位置テスト(デッサントレーナーをWeb版として復活させる)<br />
円の達人(経過時間を測る、点数を表にする)<br />
なぞって練習(ラウンド制にする)<br />
色彩テスト(回数を多く、説明をちゃんとする、はじめからボタン、ツイート内容を豪華に、経過時間も測る)nagatohttp://www.blogger.com/profile/18423439014202860313noreply@blogger.com0tag:blogger.com,1999:blog-237313321120008905.post-13156407104960222732015-03-05T17:35:00.001+09:002015-03-05T17:36:18.110+09:00JavaScript + SVG で星空を作ってみたJavaScript、mapもクロージャもあって、意外とまともだなあ・・<br>
<svg
version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
id="svg_stars" width="500" height="400"
style="background-color:#000000">
</svg>
<script>
var svg = document.getElementById('svg_stars');
for(i = 0; i<100; i++) {
var x = Math.random() * 500;
var y = Math.random() * 400;
var l = Math.random() + 0.5;
var m = (Math.random() * 2 + 3) * l;
function mkPoints(ps) {
return ps.map(function(xy) { return (xy[0] + x) + "," + (xy[1] + y); }).join(" "); }
var ps0 = mkPoints([[-m,0],[-l,-l],[0,-m],[l,-l],[m,0],[l,l],[0,m],[-l,l]]);
var ps1 = mkPoints([[-l,0],[-l,-l],[0,-l],[l,-l],[l,0],[l,l],[0,l],[-l,l]]);
var ps = ps0 + ";" + ps1 + ";" + ps0;
var time = Math.random() * 2 + 1;
var r = Math.random() * 64 + 192;
var g = Math.random() * 64 + 192;
var b = Math.random() * 64 + 192;
function mkColor(d) {
function f(x) {return Math.floor(x - d); }
return "rgb(" + f(r) + "," + f(g) + "," + f(b) + ")"; }
var co0 = mkColor(0);
var co1 = mkColor(128);
var co = co0 + ";" + co1 + ";" + co0;
var animPoints = [
"<animate ",
"attributeName='points' ",
"dur='", time, "' ",
"repeatCount='indefinite' ",
"values='", ps, "' ",
"/>"
].join("");
var animColor = [
"<animate ",
"attributeName='fill' ",
"dur='", time, "' ",
"repeatCount='indefinite' ",
"values='", co, "' ",
"/>"
].join("");
var polygon = document.createElementNS('http://www.w3.org/2000/svg', 'polygon');
polygon.innerHTML = animPoints + animColor;
svg.appendChild(polygon);
}
</script>nagatohttp://www.blogger.com/profile/18423439014202860313noreply@blogger.com0tag:blogger.com,1999:blog-237313321120008905.post-15216136398537917182015-02-22T16:44:00.004+09:002015-03-05T17:35:49.701+09:00JavaScript で雨を降らせてみたblogger には JavaScript が貼れるという真理を忘れていた・・<br>
<svg id='svg_rain' width='500' height='400'>
</svg>
<script>
var svg = document.getElementById('svg_rain');
for(i = 0; i<500; i++) {
var x = Math.random() * 555 - 25;
var br = Math.floor(Math.random() * 32 + 192);
var l1 = Math.random() * 7 + 3;
var l10 = l1 * 10;
var time = Math.random();
var tr = [
"<animateTransform ",
"attributeName='transform' attributeType='XML' ",
"type='translate' from='", x-30, " -100' to='", x+20, " 400' ",
"begin='", time, "s' dur='1s' repeatCount='indefinite' />"
].join("");
var line = document.createElementNS('http://www.w3.org/2000/svg', 'line');
line.setAttribute('x1', '0');
line.setAttribute('y1', '0');
line.setAttribute('x2', l1.toString());
line.setAttribute('y2', l10.toString());
line.setAttribute('style', ['stroke:rgb(', br, ',', br, ',255); stroke-width:2px;'].join(""));
line.innerHTML = tr;
svg.appendChild(line);
}
</script>
nagatohttp://www.blogger.com/profile/18423439014202860313noreply@blogger.com0tag:blogger.com,1999:blog-237313321120008905.post-78629843192786816672015-01-02T20:57:00.000+09:002015-02-21T10:21:21.999+09:00短期目標1TODO<br />
ポーズを練習(1ストローク毎に採点しグラフ化)<br />
ポーズを練習(同じ問題をやるボタン、使った設定をツイートに表示、結果の表に出す情報を増やす、設定の説明をちゃんとする、採点エフェクトは表示・非表示の切り替えにする)<br />
<br />
POSTPONE<br />
<div>
ソフト倉庫(ツールの利用規約を書く、ライセンス管理をする、バグ修正、紹介ページ)ウェブページ読み上げツール、時間計測・TODOリストのアプリを更新<br />
位置テスト(デッサントレーナーをWeb版として復活させる)<br />
円の達人(ペンタブレットに対応、経過時間を測る、点数を表にする)<br />
なぞって練習(ラウンド制にする、エフェクト)<br />
色彩テスト(回数を多く、説明をちゃんとする、はじめからボタン、ツイート内容を豪華に、経過時間も測る、エフェクト)<br />
<br />
DONE<br />
5分ドローイング(左右反転、キー変更)<br />
絵(デモとして雰囲気のあるものを+5枚程度)ランダムなお題を表示(ポーズ、服装、髪型、角度)<br />
ポーズを練習(ツイート内容を多く、客観的な数値を表示、ヒントとして一部を表示、お手本が消えるモード、UNDO・REDO、クリア、制限時間の選択の見た目、秒単位で調整、どう間違えたか分かるリアルタイムの採点、ページ別の設定ファイル、CSS preprocessor の代わりのヘルパー、ドロップダウンメニュー、ヘルプ、リアルタイムの採点のオン・オフ)</div>
<div>
絵を何枚か仕上げる -> 4枚仕上げた<br />
いつかぜのサブストーリーをノベルゲーム化したものを公開する</div>
nagatohttp://www.blogger.com/profile/18423439014202860313noreply@blogger.com0tag:blogger.com,1999:blog-237313321120008905.post-3181087898647587772014-12-31T16:17:00.000+09:002014-12-31T16:28:01.405+09:00さくさくペイントのコンパイル方法2<div class="separator" style="clear: both; text-align: left;">
FStap.Controls はレポジトリをクローンした後は、</div>
<div class="separator" style="clear: both; text-align: left;">
以下のように dll が読み込めていない状態のようです</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPcl33gIRMHagUKnS0H6UAJc5ljcvuZZ8ZNAoRodH77FUUENX6ItPewXr11zk93YeGgYWapqFfSKToNhGhZnhMpR0UHjmfrRwpxzoFOT11dO4-Dcivy8uCdBEjee-ccmx9PIMHDFGR_1w/s1600/reference.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPcl33gIRMHagUKnS0H6UAJc5ljcvuZZ8ZNAoRodH77FUUENX6ItPewXr11zk93YeGgYWapqFfSKToNhGhZnhMpR0UHjmfrRwpxzoFOT11dO4-Dcivy8uCdBEjee-ccmx9PIMHDFGR_1w/s1600/reference.JPG" height="320" width="283" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both;">
FStap.Control プロジェクトを右クリックして Manage Nuget Packages から</div>
<div class="separator" style="clear: both;">
FSharp.Data, HtmlAgilityPack, NDde, Newtonsoft.Json の4つはインストールされているように見えて、実は存在しないので、一旦すべて Uninstall します</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpoo5vqy4zbWNKVy0G6TwY5aX8n5aBYEiuLdMj_C2fy2naGVXIxdFOgQwk96TOvky4YGVWfC8T0Kapm3k1Z8xETevRX0buYL_06gf6fuoeRT7YuZLnvnMUAhuphWmfUK5_ekvLI-ysDBk/s1600/imported.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpoo5vqy4zbWNKVy0G6TwY5aX8n5aBYEiuLdMj_C2fy2naGVXIxdFOgQwk96TOvky4YGVWfC8T0Kapm3k1Z8xETevRX0buYL_06gf6fuoeRT7YuZLnvnMUAhuphWmfUK5_ekvLI-ysDBk/s1600/imported.JPG" height="322" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Online のタブを開き、右上の検索ボックスにキーワードを入れて、パッケージを検索できます</div>
<div class="separator" style="clear: both; text-align: left;">
ndde と入力して NDDe を見つけてインストールして下さい</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhknhms-T57ji5R9Uaj9EE-X8XEVfaq3CjHlDFIZzVViIMFTSYaWV2mJpuK4D3oMUSIlgaL1xhSkubhVKatuuMMF_5Yf25AhTXTFUY0JDlsItJMXJMO1UVKUA89OdTocZQuLNHH4a6oA9k/s1600/ndde.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhknhms-T57ji5R9Uaj9EE-X8XEVfaq3CjHlDFIZzVViIMFTSYaWV2mJpuK4D3oMUSIlgaL1xhSkubhVKatuuMMF_5Yf25AhTXTFUY0JDlsItJMXJMO1UVKUA89OdTocZQuLNHH4a6oA9k/s1600/ndde.JPG" height="156" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
F# Data と入力して F# Data を見つけてインストールして下さい(ToolBox と書いてある方は使いません)</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXkQKAhfrtcsNr8wivelMWuHHmWvzMdPCIdqICJxVsQrCui1H0idmUfO58mrt7WWTbvty0f26i1avpZ7nwbRgVhRRQEnkX1IIcBNPzIpa3vFegklBq3sh0xlzW6kwygEv7KAIwbdUMilM/s1600/fsharpdata.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXkQKAhfrtcsNr8wivelMWuHHmWvzMdPCIdqICJxVsQrCui1H0idmUfO58mrt7WWTbvty0f26i1avpZ7nwbRgVhRRQEnkX1IIcBNPzIpa3vFegklBq3sh0xlzW6kwygEv7KAIwbdUMilM/s1600/fsharpdata.JPG" height="140" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
HtmlA まで入力すれば出ると思いますが、HtmlAgilityPack と入力して、 HtmlAgilityPack をインストールして下さい。</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJcusx03sVnN9c64tbz2BSUu7bBN39yY4vGVNT_k06hKrH-_bItS3yBqTXbYS41SqctjJLVjjhNFemRi0a_H0ajvzBZsHsP6S7kUJmwlB-F9KXUTCWRgQnSl0nhVSE4GGXrWvJiUEf_nE/s1600/HtmlAgilityPack.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJcusx03sVnN9c64tbz2BSUu7bBN39yY4vGVNT_k06hKrH-_bItS3yBqTXbYS41SqctjJLVjjhNFemRi0a_H0ajvzBZsHsP6S7kUJmwlB-F9KXUTCWRgQnSl0nhVSE4GGXrWvJiUEf_nE/s1600/HtmlAgilityPack.JPG" height="154" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Json.NET と入力して Json.NET をインストールして下さい</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVPMG0vRMPMA5XKeOS3Zzgdv2-g7Rc6Puh-Q7o3IbC2f2SeBhdZvGUqKof4P2IJdzLmFx8ODE7Q6ZdCKzjnXbtjPf5EPgmG49P4Gl5KtuuX2q-ufnpqTQjeGM20wFPo5J8lXai8vNA0V4/s1600/Json.NET.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVPMG0vRMPMA5XKeOS3Zzgdv2-g7Rc6Puh-Q7o3IbC2f2SeBhdZvGUqKof4P2IJdzLmFx8ODE7Q6ZdCKzjnXbtjPf5EPgmG49P4Gl5KtuuX2q-ufnpqTQjeGM20wFPo5J8lXai8vNA0V4/s1600/Json.NET.JPG" height="154" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
先ほどの警告マークの出ていた Reference に戻ります</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPcl33gIRMHagUKnS0H6UAJc5ljcvuZZ8ZNAoRodH77FUUENX6ItPewXr11zk93YeGgYWapqFfSKToNhGhZnhMpR0UHjmfrRwpxzoFOT11dO4-Dcivy8uCdBEjee-ccmx9PIMHDFGR_1w/s1600/reference.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPcl33gIRMHagUKnS0H6UAJc5ljcvuZZ8ZNAoRodH77FUUENX6ItPewXr11zk93YeGgYWapqFfSKToNhGhZnhMpR0UHjmfrRwpxzoFOT11dO4-Dcivy8uCdBEjee-ccmx9PIMHDFGR_1w/s1600/reference.JPG" height="320" width="283" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
警告マークのあるもののうち</div>
<div class="separator" style="clear: both;">
FStap.TypeProviders</div>
<div class="separator" style="clear: both;">
Interop.SHDocVw</div>
<div class="separator" style="clear: both;">
だけ一旦、右クリックして削除して下さい</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
FStap.Controls プロジェクトを右クリックして Add -> Reference の Browser タブを開いて</div>
<div class="separator" style="clear: both;">
Browese で dll を探します</div>
<div class="separator" style="clear: both;">
Windows 7 だと C:\Windows\System32\shdocvw.dll を追加します</div>
<div class="separator" style="clear: both;">
OSのバージョンが違うと位置が違うかもしれません。</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidUJTC0FVaKFOiRWNn5vnaQLcjmzZCuNqYwBxYj8kOHN0cKFDvkYjhKvPqw1M3LZdNF5P529oWQcT6X4a49RBbRRAlwFHR3UNG0m8rO-aC6kxBLLJyUhJv0hgLbAOkQAG1tdwXt92s5MA/s1600/shdocvw.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidUJTC0FVaKFOiRWNn5vnaQLcjmzZCuNqYwBxYj8kOHN0cKFDvkYjhKvPqw1M3LZdNF5P529oWQcT6X4a49RBbRRAlwFHR3UNG0m8rO-aC6kxBLLJyUhJv0hgLbAOkQAG1tdwXt92s5MA/s1600/shdocvw.JPG" height="312" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
ここで、Visual Studio をもう1つ起動する必要があります</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgav1zKE7zuVJRqhBOYhWd7v8oXWvmwNdlIfaafBQrR1VkR-Wy8BvETlND3IUYXeUNKsK5a_EyvPj4S0BYBcxZLH_waaRARDNhgeUQL8yneJMTO5XFysYLJ5aL2Bbqdl1gEZe7KO6CYItk/s1600/FStap.TypeProviders.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgav1zKE7zuVJRqhBOYhWd7v8oXWvmwNdlIfaafBQrR1VkR-Wy8BvETlND3IUYXeUNKsK5a_EyvPj4S0BYBcxZLH_waaRARDNhgeUQL8yneJMTO5XFysYLJ5aL2Bbqdl1gEZe7KO6CYItk/s1600/FStap.TypeProviders.JPG" height="272" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
FStap\FStap.TypeProvider\FStap.TypeProviders.fsproj をVisual Studio で開き</div>
<div class="separator" style="clear: both; text-align: left;">
Build -> Build Solution すると</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinhinm8a-vdAkKpwWklyEQMDa6CmlGQza3PeuqC_HHXAMr_HWScsa9gd1U4zE6dEoCyUfa70_-3Wl8l68Cb5R34AhpQEXhG9dXJhItdArsaJi68ko8mWoAxAbLFRMt4jAPMPjcjHuSMbQ/s1600/FStap.TypeProvider.dll.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinhinm8a-vdAkKpwWklyEQMDa6CmlGQza3PeuqC_HHXAMr_HWScsa9gd1U4zE6dEoCyUfa70_-3Wl8l68Cb5R34AhpQEXhG9dXJhItdArsaJi68ko8mWoAxAbLFRMt4jAPMPjcjHuSMbQ/s1600/FStap.TypeProvider.dll.jpg" height="294" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
FStap\FStap.TypeProvider\bin\Debug\FStap.TypeProvider.dll が出来上がっていると思います</div>
<div class="separator" style="clear: both; text-align: left;">
これを 最初に起動しているVisual Studioの FStap.Controls プロジェクトの参照に追加します</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
ここまでやった後で、</div>
<div class="separator" style="clear: both; text-align: left;">
Build から Build Solution して、Clean Solution して</div>
<div class="separator" style="clear: both; text-align: left;">
Paint\Paint.UI に res というフォルダを作成して</div>
<div class="separator" style="clear: both; text-align: left;">
もう1回ビルドしたらコンパイルが通りました。</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
<br /></div>
<br />nagatohttp://www.blogger.com/profile/18423439014202860313noreply@blogger.com0