Posts

Showing posts from 2018

txt2rss software publish

txt to rss software, it can start one rss server to response rss style content from txt file.  useage  put your multiple content to html/txt/{fileName}.txt, txt template your can see html/txt/1.txt,  then access your url: http://127.0.0.1:28081/rss/?file={fileName} if your want random access rss item: http://127.0.0.1:28081/rss/?random=1&file={fileName} startup  $ ./txt2rss or custom bind address: $ ./txt2rss -addr=127.0.0.1:28081 advance usage this tool with pkrss: https://sourceforge.net/projects/pkrss/ add http://127.0.0.1:28081/rss/?file=1 to your custom rss source, then listen and see lyric in windows. download in here: https://github.com/pkrss/txt2rss/releases

china futures ctp realtime server docker image description

what used this docker image,to receive china futures ctp realtime data. How 1. docker: docker image see: https://hub.docker.com/r/pkrss/ctp-market/ docker template:     image: docker.io/pkrss/ctp-market:latest     environment: (change below values if your need)       - users.simnow.mdInvesterID="{your account id, liked 065206}"       - users.simnow.mdInvesterPassword="{your simnow password}"       - users.simnow.mdBrokerID="9999"       - users.simnow.mdFrontAddr="tcp://218.202.237.33:10012"       - users.simnow.mdInvesterPassword="tcp://218.202.237.33:10002"       - sys_log_filePath=       - sys_wsSrv_port=8086 2. web socket client: websocket client docker ip:8086, send json string to regist realtime data: {"cat": "quote","oper": "realtime", "data", {"stk":"*"}} you can change * to your want symbol, liked: "rb1809". After that your can ...

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...

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, ...

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...

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

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.

mybatis-spring-boot-starter @PostConstruct can not work

What by java9 below code not effect in some projects. <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>1.3.2</version> </dependency> <dependency> <groupId>tk.mybatis</groupId> <artifactId>mapper-spring-boot-starter</artifactId> <version>2.0.0</version> </dependency> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> <version>1.2.3</version> </dependency> How breakpoint at org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration   @PostConstruct   public void checkConfigFileExists() but not trigger. Why my java9 default is need add below maven dependcy: <dependency>     <groupId>javax.annotation</gro...

How to use reflect.Type.Implements

see: https://stackoverflow.com/questions/18570391/check-if-struct-implements-a-given-interface ou've unfortunately left out the essential parts (please always post complete programs), so I can only guess that the problem is in a method defined on a pointer receiver, in which case the behavior of your code is expected. Check this example and its output: package main import (         "fmt"         "reflect" ) type Model interface {         m() } func HasModels(m Model) {         s := reflect.ValueOf(m).Elem()         t := s.Type()         modelType := reflect.TypeOf((*Model)(nil)).Elem()         for i := 0; i < s.NumField(); i++ {                 f := t.Field(i)                 fmt.Printf("%d: %s %s -> %t\n", i, f.Name, f.Type, f.Type.Implements(modelType)) ...

docker file. jre and libfontconfig resolve jdk graph2d problem.

# jre-libfontconfig docker file. jre and libfontconfig resolve jdk graph2d problem. # why because china get Get:2 http://cdn-fastly.deb.debian.org/debian sid/main amd64 Packages [10.5 MB] is very slow, so create one docker image, that no need fetch libfontconfig each time. blogs: https://blogs.pkstate.com Dockerfile: FROM openjdk:9-jre-slim RUN apt-get update -y && apt-get install -y libfontconfig # Last thanks! now, your can used docker image:  pkrss/jre-libfontconfig:latest # other tutorial draft build dockerfile (ex: pkrss/jre-libfontconfig): docker build -t pkrss/jre-libfontconfig:latest . publish image from local to docker.io: docker tag pkrss/jre-libfontconfig:latest docker.io/pkrss/jre-libfontconfig:latest docker login --username="your user name" --password="your password" docker.io docker push docker.io/pkrss/jre-libfontconfig:latest docker logout docker.io above content, "pkrss/jre-libfontconfig" is sample na...

go lang get struct field value by field name through reflect method

What i want to used go lang reflect method to get struct field value by dynamic reflect. How func getStructFieldSimple (v interface {}, field string ) interface {} {      if v == nil || field == "" {          return nil     }      val := reflect. ValueOf (v)      if val. Kind () == reflect.Ptr {          val = val. Elem ()     }      field = strings. ToLower (field)      c := val. NumField ()      for i := 0 ; i < c; i++ {          valueField := val. Field (i)          typeField := val. Type (). Field (i)          if strings. ToLower (typeField.Name) == field {    ...

how to get generic class method return type and parameters class type by dynamic java reflect.

1.What i want to get generic class method return type and method parameters and parameters class type by dynamic java reflect. For example code: //////////////////////////////////////////////////////////// class UserDomain {} public interface BaseService<T> {     T selectOne(T record);  } public interface UserService extends BaseService<UserDomain> { } public interface MyMapper<T> { } public interface UserDomainMapper extends MyMapper<UserDomain> { } public abstract class BaseServiceImpl<MAP extends MyMapper<T>,T extends Object> implements BaseService<T> {      @Override     public T selectOne(T record){     return ...;     } } @Service("userService") public class UserServiceImpl extends BaseServiceImpl<UserDomainMapper,UserDomain> implements UserService { } //////////////////////////////////////////////////////////// no...