This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <array> | |
using namespace std; | |
template<class real,size_t h,size_t w> | |
void mul(const array<array<real,w>,h>&m,const array<real,w>&v,array<real,h>&out){ | |
for(size_t y=0;y<h;y++){ | |
auto&s=out[y];s={}; | |
for(size_t x=0;x<w;x++){ | |
s+=v[x]*m[y][x]; | |
} |
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 38 columns, instead of 13 in line 6.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
y,n,active,avg n/a,p25,p31,p37,p43,p50,p75,p87,p93,p96,p98,p99,m25,m31,m37,m43,m50,m75,m87,m93,m96,m98,m99,|,a25,a31,a37,a43,a50,a75,a87,a93,a96,a98,a99 | |
2002,11130,323,34.46,0.49,0.67,0.81,0.91,0.97,1.62,2.58,2.79,2.71,2.02,1.33,2,3,4,5,6,20,63,133,246,337,443,,243,223,202,182,162,81,41,21,11,6,3 | |
2003,59698,1507,39.61,2.26,3.11,3.77,4.24,4.52,8.29,11.72,13.59,12.62,10.97,9.46,2,3,4,5,6,22,62,143,263,457,788,,1131,1037,942,848,754,377,189,95,48,24,12 | |
2004,113925,2911,39.14,4.37,6.01,7.28,8.19,8.74,17.47,24.75,26.21,23.84,19.32,14.33,2,3,4,5,6,24,68,144,262,420,623,,2184,2002,1820,1638,1456,728,364,182,91,46,23 | |
2005,190682,4027,47.35,6.04,8.31,12.59,13.60,16.11,32.22,40.82,46.62,42.84,33.20,24.38,2,3,5,6,8,32,81,185,340,527,762,,3021,2769,2517,2266,2014,1007,504,252,126,63,32 | |
2006,204719,4595,44.55,6.89,9.48,11.49,12.93,16.09,35.62,47.15,48.96,45.50,33.26,23.36,2,3,4,5,7,31,82,170,316,462,649,,3447,3160,2872,2585,2298,1149,575,288,144,72,36 | |
2007,188550,5108,36.91,7.66,10.54,9.58,11.50,15.33,26.84,37.70,41.60,38 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//id2time=JSON.parse(POST.data);return ""+mapkeys(id2time).length; | |
//id2y={};return mapkeys(id2time).map(id=>id2y[id]=id2time[id].split(" ").pop()).join("\n"); | |
//a=POST.data;return "done: a=arr_of_user_stats"; | |
//return json(JSON.parse(a).filter(e=>!e.user_name).map(e=>e.user_id)); | |
//return maps2csv(JSON.parse(a).map(e=>(e.user_name).split(",").join("."))); | |
var years=[2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020]; | |
var arr=JSON.parse(a); | |
var bugs=JSON.parse(POST.data); | |
arr.filter(e=>e.user_id in bugs).map(e=>e.user_name=bugs[e.user_id]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://stackoverflow.com/questions/8824255/getting-a-windows-message-name/40425868 | |
// https://wiki.winehq.org/List_Of_Windows_Messages | |
#include <iostream> | |
const char*id2str_impl(int id){ | |
#define F(A,B)case A:return #B; | |
switch(id){ | |
F(0,WM_NULL) | |
F(1,WM_CREATE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*POST.data: | |
1234 = 12 Гц | |
2345 = 2 Гц | |
3456 = 1 Гц | |
4567 = 1 Гц | |
5678 = 1 Гц | |
6781 = 2 Гц | |
*/ | |
var n=8; | |
var base="0".charCodeAt(0);var as_str=i=>String.fromCharCode(base+i);var from_str=s=>s.split("").map(e=>e.charCodeAt(0)-base); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs=require("fs");var json=JSON.stringify; | |
log=console.log;//("ok"); | |
var s=""+require('child_process').execSync("find -type f"); | |
var fn2stat={}; | |
var f2s=JSON.parse(fs.readFileSync("fn2stat_backup2.json")+""); | |
var f=fn=>{ | |
var i=fs.statSync(fn); | |
fn2stat[fn]=i; | |
var s=fs.readFileSync(fn)+""; | |
var postfix=""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// forked from https://gamedev.ru/files/?id=138400 | |
#include <windows.h> | |
#include <shellapi.h> | |
#include <cstdint> | |
#include <cstdio> | |
#include <cmath> | |
#include <cstring> | |
#include <cstdarg> | |
#include <array> | |
#include <vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// nodejs | |
var arr=POST.data.split("\n"); // <- image_parsed.csv | |
arr=arr.map(e=>e.split(",")); | |
var u=arr[0];var jud=[]; | |
var A=arr.slice(1); | |
var zzz=A.map((e,i)=>{var t={};var q=[];u.map((k,j)=>{t[k]=e[j];if(j>=2)q.push(e[j]*1.0);if(j>=2)getdef(jud,j-2,[]).push(JSON.parse(e[j]));});q.pop();t.q=qapavg(q);return t;}); | |
var JV=jud.map(e=>{var t={min:qapmin(e),avg:qapavg(e),max:qapmax(e)};return t;}) | |
var jud_func=(v,id)=>{var ex=JV[id];return (v-ex.min)/(ex.max-ex.min)*100;} | |
A.map((e,i)=>{var t=zzz[i];var q=[];u.map((k,j)=>{if(j>=2){var w=jud_func(e[j]*1.0,j-2);q.push(w);t[k]=w.toFixed(2);}});q.pop();t.q=qapavg(q);}); | |
//return inspect(jud.map(e=>{var t={min:qapmin(e),avg:qapavg(e),max:qapmax(e)};return t;})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <thread> | |
#include <iostream> | |
#include <queue> | |
#include <mutex> | |
#include <atomic> | |
#include <string> | |
#include <condition_variable> | |
using namespace std; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct t_world{}; // t_world | |
t_world_frag to_client=apply_fog_of_war_for(server_side_world,client); | |
struct t_world_frag{}; // t_client_side_world | |
// get_commulative_clients_info(recs,inp_frag).foreach_client(client=>get_frendly_value(client)).sum_all(); | |
// diff(smart_sizeof(t_world),smart_sizeof(t_world_frag)) |
NewerOlder