Sunday, April 29, 2018

Error: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.22' not found

error:

root@DESKTOP-OLCMPRJ:/mnt/d/setup/download/0xbtcminer-linux_2.10.2$ ./0xbitcoin-miner
pkg/prelude/bootstrap.js:1172
      throw error;
      ^
Error: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /mnt/d/setup/download/0xbtcminer-linux_2.10.2/hybridminer.node)
    at Object.Module._extensions..node (module.js:668:18)
    at Module.load (module.js:558:32)
    at tryModuleLoad (module.js:501:12)
    at Function.Module._load (module.js:493:3)
    at Module.require (module.js:583:17)
    at Module.require (pkg/prelude/bootstrap.js:1153:31)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/snapshot/0xbitcoin-gpuminer/0xbitcoinminer-accel.js:0:0)
    at Module._compile (pkg/prelude/bootstrap.js:1243:22)
    at Object.Module._extensions..js (module.js:650:10)

How:
Ubuntu:
wget http://ftp.de.debian.org/debian/pool/main/g/gcc-8/libstdc++6_8-20180425-1_amd64.debar -x libstdc++6_8-20180425-1_amd64.deb && tar xvJf data.tar.xzsudo cp usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25 /usr/lib
sudo mv /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.baksudo ln /usr/lib/libstdc++.so.6.0.25 /usr/lib/x86_64-linux-gnu/libstdc++.so.6


Last
Thanks

Tuesday, April 24, 2018

how to get cpp boost ptree json array root json string

Why
because default cpp boost ptree json not support root array json format.
there is so many other json parse engine on internet.
buy i want to reused boost ptree.

my code:
ptree r, r0, p1, p2;
ptree p0, p, c1, c2;

c1.put("c1a", "a");
c1.put("c1b", "b");
c2.put("c2a", "a");
c2.put("c2b", "b");

p.push_back(std::make_pair("", c1));
p.push_back(std::make_pair("", c2));
p0.push_back(std::make_pair("", p));
std::string s;
std::stringstream ss;
write_json(ss, p0);
s = ss.str();



i want to get below string format:
[
   {...},
   {...}
  ]


but boost ptree generate string like this:
{
  "":[
   {...},
   {...}
  ]
}

How:
remove string above of '[' and after ']':
std::string getJArrayString(const ptree& p) {
ptree p0;
p0.push_back(std::make_pair("", p));

std::stringstream ss;
write_json(ss, p0);
std::string s = ss.str();

do {
auto b = s.find_first_of('[');
if (b == std::string::npos)
break;

auto e = s.find_last_of(']');
if (e == std::string::npos)
break;
s = s.substr(b, e + 1 - b);

return s;
} while (false);

return "[]";

}

and call this:

ptree r, r0, p1, p2;
ptree p0, p, c1, c2;

c1.put("c1a", "a");
c1.put("c1b", "b");
c2.put("c2a", "a");
c2.put("c2b", "b");

p.push_back(std::make_pair("", c1));
p.push_back(std::make_pair("", c2));
p0.push_back(std::make_pair("", p));
std::string s = getJArrayString(p0);

Sunday, April 22, 2018

fixed error to get the value of VCTargetsPath:



Error:
E:\work\git\third\grpc\grpc\.build>cmake .. -G "Visual Studio 14 2015" -DCMAKE_BUILD_TYPE=Release
CMake Error at CMakeLists.txt:31 (project):
  Failed to run MSBuild command:
    MSBuild.exe
  to get the value of VCTargetsPath:
    system can not find the file specified.

How fixed it:

open "Developer Command Prompt for VS 2017" in start menu. or it's content is:
%comspec% /k "D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat"

Last:
 can run now. 

2018 q2 crypto coin research and test draft

1. gift.one
one airdrop crypto coin, test start in 2018.4.20

Gift.ONE, the global biggest airdrop organization of cryptocurrency, is airdropping million Tokens! 1GIFT = US$0.2,get 100GIFT by registration, Gain more 100000GIFT from any activities, Click link to get GIFT: https://gift.one/i/yPaX3s Win lottery for iPhoneX、BTC、ETH、GIFT everyday!

2. wait...

Tuesday, April 10, 2018

fatal: protocol error: bad line length character: Welc

What
windows tortoiesegit version 2.6.0.0 say:fatal: protocol error: bad line length character: Welc

Why
see here: https://gitlab.com/tortoisegit/tortoisegit/issues/2944

How:

Used old TortoiseGitPlink.exe, for example used old TortoiseGitPlink.exe file from 2.4.0.0 tortoisegit.

Or your can download it direct from here: http://depositfiles.com/files/vypznbi4t

Thursday, April 5, 2018

How To change Vlookup Matching Value From Bottom To Top In Excel 2016?

What?
How To Vlookup Matching Value From Bottom To Top In Excel?

Why?
Because default excel vlookup function search direction is from top to down, i need from down to top in finance data analyse.

my want formula is:
=VLOOKUP(G28,G27:H2,2,FALSE) but excel change it to =VLOOKUP(G28,G2:H27,2,FALSE)

How:
I Find answer from here: https://www.extendoffice.com/documents/excel/3404-excel-vlookup-from-bottom.html

Last i get the right formula is:
=LOOKUP(2,1/($G$2:$G$27=G28),$H$2:$H$27)


FINAL:

By use current row variable optimized code is:
=LOOKUP(2,1/(INDIRECT(CONCAT("G2:G",VALUE(ROW()-1)))=INDIRECT(CONCAT("G",ROW()))),INDIRECT(CONCAT("H2:H",ROW()-1)))


Last:
Thanks.