记录精彩的程序人生
基于openfire 服务和smack 搭建即时通讯项目 下面是我在本地搭建的open fire,非常简单。 点击下载open fire服务,和spark客户端,安装过程也非常的傻瓜,就不在这里说明了,如果遇到问题欢迎留言。 局域网内实现通讯,需要更改 host 文件 :C:\Windows\System32\drivers\etc\host, #localOpenfire(IP + 空格 + 域名)192.168.4.123 openfire.im.hexl。具体如何在spark中配置自行百度。 spark 配置参数 下面是Android端的demo,具体实现包括源码地址会在之后的博客中给出。 连接、注册、登录 开启连接 首先需要导入smack相关jar包,篇尾会给出,至于源码会在该系列的博客最后一篇给出来,如果有问题欢迎大家留言 打开连接相关API 1、XMPPTCPConnection 2、XMPPTCPConnectionConfiguration 在开启连接时用到的就是以上两个api,下面看下如何去创建,通过查看源码我们发现创建XMPPTCPConnect....
NetBeans Platform Login Tutorial This tutorial demonstrates how to create a login form for a NetBeans Platform application with very simple user and password management. The login will be implemented with the DialogDisplayer class of the NetBeans APIs. The dialog that you create in this tutorial will be visible whenever the user starts the application. The passwords and usernames will be stored in a preferences file, which is not very safe. Therefore, this tutorial will provide a solution to enc....
最近在使用Spingboot做项目的时候,在引入shiro后,启动项目一直报错 Error creating bean with name 'debtServiceImpl': Bean with name 'debtServiceImpl' has been injected into other beans [repayBillServiceImpl,investServiceImpl,receiveBillServiceImpl] in its raw version as part of a circular reference, but has eventually been wrapped. This means that said other beans do not use the final version of the bean. This is often the result of over-eager type matching - consider using 'getBeanNamesOfType' with the 'allowEagerInit' fl....
java.util.logging.Logger使用详解 一、创建Logger对象 // 为指定子系统查找或创建一个 logger。 static Logger getLogger(String name) // 为指定子系统查找或创建一个 logger。 static Logger getLogger(String name, String resourceBundleName) 注意:name是Logger的名称,当名称相同时候,同一个名称的Logger只创建一个。 二、Logger的级别 比log4j的级别详细,全部定义在java.util.logging.Level里面。 各级别按降序排列如下: SEVERE(最高值) WARNING INFO CONFIG FINE FINER FINEST(最低值) 此外,还有一个级别 OFF,可用来关闭日志记录,使用级别 ALL 启用所有消息的日志记录。 logger默认的级别是INFO,比INFO更低的日志将不显示。 Logger的默认级别定义是在jre安装目录的lib下面。 # Limit the message that ar....
Quantitative Trading - How to Build Your Own Algorithmic Trading Business 这是一本由www.epchan.com的创始人Ernest P. Chan撰写的量化投资理论的matlab技术实现的巨著,之中的很多观点非常新颖,他的量化投资策略在近些年的金融及债务危机中获得了十分优良的收益。值得技术开发者作为知识扩充储备来阅读。 Algorithmic Trading Winning Strategies and Their Rationale Ernie’s second book Algorithmic Trading: Winning Strategies and Their Rationale is an in-depth study of two types of strategies: mean reverting and momentum. It delves into the reasons certain markets display either mean reversion or momentum....
Since the resolution of issue 92570, it is possible to show a modal dialog after the appearance of an application's splash screen, but before the appearance of an application's main window. And what would one want to put there? A login screen, of course. With this enhancement, it is possible to integrate some level of authentication into your NetBeans Platform application. The specific method in question here is DialogDisplayer.notifyLater, which can now also be called before the main window is ....
package com.stt.dateChange; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * * @author zengms * @date 2012-12-27 * */ public class DateUtils { private static final Log logger = LogFactory.getLog(DateUtils.class); public static final String YYYYMMDD = "yyyy-MM-dd"; public static final String YYYYMMDD_ZH = "yyyy年MM月dd日"; public static final int FIRST_DAY_OF_WEEK = Calendar....
详解Github的.gitignore忽略文件+.gitignore不生效解决方案+生产配置大奉送 Git中有一个非常重要的一个文件-----.gitignore 今天给大家免费送一个.gitignore忽略文件配置清单。 大家一定要养成在项目开始就创建.gitignore文件的习惯,否则一旦push,处理起来会非常麻烦。 ============华丽的分割线============ 当然如果已经push了怎么办?当然也有解决方法,如下: 有时候在项目开发过程中,突然心血来潮想把某些目录或文件加入忽略规则,按照上述方法定义后发现并未生效,原因是.gitignore只能忽略那些原来没有被track的文件,如果某些文件已经被纳入了版本管理中,则修改.gitignore是无效的。那么解决方法就是先把本地缓存删除(改变成未track状态),然后再提交: --cached 后面 有个点 git rm -r --cached . git add . git commit -m "update .gitignore" ============华丽的分割线============ https:/....
Customize Netbeans Platform Splash Screen and About Dialog October 18th, 2007 | by Tonny Kohar | During development of our product Sketsa SVG Editor, we need to customize the default Netbeans Platform About Dialog and splash screen as part our product branding. Note: this is tested on Netbeans IDE 6-beta1 Customize the Splash Screen Create the image using any image editor application to suit your particular branding. If you want to have single image for both splash and about dialog, please mak....
https://dzone.com/articles/secrets-netbeans-window-system
https://wenku.baidu.com/view/c3a781584028915f814dc232.html
About this series So you think you know about Java programming? The fact is, most developers scratch the surface of the Java platform, learning just enough to get the job done. In this ongoing series, Java technology sleuths dig beneath the core functionality of the Java platform, turning up tips and tricks that could help you solve even your stickiest programming challenges. User interface design and development have changed a lot and the Java™ platform has kept pace with these changes. The re....
目前A股程序化交易接口不提供给散户。偶然发现富途证券提供各类语言的API接口,可以实现沪股通、深股通股票的程序化交易,条件是在富途证券开户,并需要把资金转移到香港,貌似交易手续费也要贵一些(这个没深究)。 介绍 futu-api提供了交易和行情接口,可以满足个人开发者使用富途牛牛软件进行程序化投资的需求。 主要功能 交易品种: 1.港股:正股、ETF、窝轮、牛熊证 2.美股:正股、ETF、期权 行情数据: 1.支持A股、港股 2.支持定阅并接收实时报价、逐笔、买卖档,买卖经纪(仅港股)等深度数据 特点 特点说明 高效的执行配合 FutuOpenD ,一行简单的命令就可以执行您的策略 活跃的社区富途牛牛圈、QQ群和众多牛人一起分享心得 丰富的接口港股、A股行情数据获取、港美股实盘交易、A股通实盘交易以及港美A模拟交易 跨平台支持兼容 Windows / Mac OS / Linux 目前沪股通股票(580)包括 序号名称代码序号名称代码序号名称代码序号名称代码序号名称代码序号名称代码 1浦发银行600000101万华化学600309201大众交通60061130....
mysql报错Ignoring the redo log due to missing MLOG_CHECKPOINT between mysql版本:5.7.19 系统版本:centos7.3 由于周未公司断电,跑在vmware虚拟机上的mysql挂掉,无法重启 启动mysql的时候,error log的信息如下 2017-11-15T11:44:46.562061+08:00 0 [ERROR] InnoDB: Ignoring the redo log due to missing MLOG_CHECKPOINT between the checkpoint 63593957 and the end 63593472. 2017-11-15T11:44:46.562090+08:00 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error 2017-11-15T11:44:47.062885+08:00 0 [ERROR] Plugin 'InnoDB' init function retu....
K线图里面的前复权、后复权和不复权,具体是什么意思,我们在股票分析的时候应该选择哪一个?今天我们来聊聊复权这个话题
备用
自用股票行情软件 开发工具:Netbeans 8.2 开发平台:Netbeans Platform 数据源:面向A股市场,支持多数据源(同一时间只能选择一个数据源),首先支持的是免费的Tushare 中国股票市场是由三部分组成:A股市场、B股市场和H股市场。 A股 也称为人民币普通股票、流通股、社会公众股、普通股。是指那些在中国大陆注册、在中国大陆上市的普通股票。以人民币认购和交易。 B股 也称为人民币特种股票。是指那些在中国大陆注册、在中国大陆上市的特种股票。以人民币标明面值,只能以外币认购和交易。其中,沪市B股需要用美金才能交易;深市B股必须用港币交易。 H股 也称为国企股,是指国有企业在香港 (Hong Kong) 上市的股票。 通过证券代码判断证券属于上证还是深证。 前面是000的,或者002还有300就是属于深交所的,前面是主板,后面是中小企业板.300的是属于创业板. 前面是600,或者是601的就是上交所的证券. 切换数据源时会对现有的图表造成影响,简单的方法是重新打开现有的ChartFrame;复杂的方法是让ChartFrame监听数据源改变事件并相应处理 n....
两个字段确定一支股票:股票市场和股票代码 市场类型 未知市场 港股 港期货(目前是恒指的当月、下月期货行情) 美股 沪股 深股 订阅类型 基础报价 摆盘 逐笔 分时 日K 5分K 15分K 30分K 60分K 1分K 周K 月K 经纪队列 季K 年K 3分K 委托明细 Security - 证券标识 message Security { required int32 market = 1; //QotMarket,股票市场 required string code = 2; //股票代码 } KLine - K线数据点 message KLine { required string time = 1; //时间戳字符串 required bool isBlank = 2; //是否是空内容的点,若为ture则只有时间信息 optional double highPrice = 3; //最高价 optional double openPrice = 4; //开盘价 optional double lowPrice = 5; //最低价 optional double clo....
如下, 一共存在11种实现方式及其对应的性能测试结果: 1、使用IOUtils.toString (Apache Utils) String result = IOUtils.toString(inputStream, StandardCharsets.UTF_8); 2、使用CharStreams (guava) String result = CharStreams.toString(new InputStreamReader(inputStream, Charsets.UTF_8)); 3、使用Scanner (JDK) Scanner s = new Scanner(inputStream).useDelimiter("\\A"); String result = s.hasNext() ? s.next() : ""; 4、使用Stream Api (Java 8). 提醒: 这种方式会将不同的换行符 (比如\r\n) 都替换为 \n. String result = new BufferedReader(new InputStreamReader(inputStrea....
When you have no more than this dependency in the application module of your NetBeans Platform application, you have all you need for the simplest imaginable NetBeans Platform application. <dependencies> <dependency> <groupId>org.netbeans.modules</groupId> <artifactId>org-netbeans-core-startup</artifactId> <version>${netbeans.version}</version> <type>jar</type> </dependency> </dependencies> The above results in one direct d....