- 博客(0)
- 资源 (29)
- 问答 (1)
- 收藏
- 关注
js4rsa 基于javascript的ecc签名验签
代码搬运工:
附件中代码为javascript的ecc算法支持, 签名验签;
在使用过程中椭圆曲线Elliptic Curve parameters需要指定;一般使用 secp256r1
2020-09-15
js4ecdh.rar基于javascript的ecc的会话密钥协商
代码搬运工:
附件中代码为javascript的ecc算法支持, 会话密钥协商工具类,
在使用过程中椭圆曲线Elliptic Curve parameters需要指定;一般使用 secp256r1
2020-09-03
最新nodejs安装包 v8.12.0-linux-x64.tar.xz
1、解压
tar xvf node-v8.12.0-linux-x64.tar.xz
cd node-v8.12.0-linux-x64
2、将node加入环境变量
vim /etc/profile
export PATH=$PATH:/root/software/node-v8.12.0-linux-x64/bin
运行样例
node main.js
main.js脚本
// 引入 events 模块
var events = require('events');
// 创建 eventEmitter 对象
var eventEmitter = new events.EventEmitter();
// 使用匿名函数绑定 data_received 事件
eventEmitter.on('data_received', function(){
console.log('数据接收成功。');
});
// 创建事件处理程序
var connectHandler = function connected() {
console.log('连接成功。');
// 触发 data_received 事件
eventEmitter.emit('data_received');
}
// 绑定 connection 事件处理程序
eventEmitter.on('connection', connectHandler);
// 触发 connection 事件
eventEmitter.emit('connection');
console.log("程序执行完毕。");
结果
连接成功。
数据接收成功。
程序执行完毕。
2018-10-10
百度有价值内容 baidu SEO
1、搜索引擎为用户展现的每一条搜索结果,都对应着互联网上的一个页面。每一条搜索结果从产生到被搜索引擎展现给用户,都需要经过四个过程:抓取、过滤、建立索引和输出结果。
2、百度蜘蛛会通过搜索引擎系统的计算,来决定对哪些网站施行抓取,以及抓取的内容和频率值。当您的网站产生新内容时,Baiduspider会通过互联网中某个指向该页面的链接进行访问和抓取,如果您没有设置任何外部链接指向网站中的新增内容,则Baiduspider是无法对其进行抓取的。对于已被抓取过的内容,搜索引擎会对抓取的页面进行记录,并依据这些页面对用户的重要程度安排不同频次的抓取更新工作。
3、明显作弊行为有哪些?
①出售首页的友情链接。
②大量采集其他网站的
。。。。。。。。。。。。。。。
22、利用热门关键词做SEO的 “关键词爆破法”,短期内可能会有收益,但长远来看不利于主动访问用户的养成,有可能影响到搜索引擎对站点的评级。
23、如果链接成为死链之前已被百度搜索引擎收录,设置404后请不要再设置robots封禁,否则会影响搜索引擎对链接的判断和处理。
24、站点ip变更怎么办?
登录百度站长平台,使用抓取诊断工具,抓取诊断工具会检查站点与百度的连接是否畅通,若站长发现IP信息还是老旧的,可以通过“报错”通知百度搜索引擎更新IP。由于spider精力有限,如遇报错后网站IP依旧没有变化,站长可进行多次尝试,直至达到预期。
25、抓取诊断工具可以做什么呢?
①诊断抓取内容是否符合预期。例如很多商品详情页面,价格信息是通过JavaScript输出的,对百度蜘蛛不友好,价格信息较难在搜索中应用。问题修正后,可用诊断工具再次抓取检验。
②诊断网页是否被加入黑链接和隐藏文本。网站被黑后加上的隐藏链接从网页表面无法观察看到,这些链接可能只在百度抓取时才会出现,可以通过抓取诊断工具进行检查。
③邀请Baiduspider。如果网站有新页面或页面内容有更新,百度蜘蛛却较长时间没有来过,此时可以通过抓取诊断工具邀请Baiduspider快速来抓取。
26、多域名同内容的常见问题。
①多个域名指向同一个域名算是作弊么?
2018-10-10
linux下zookeeper-3.4.9 安装包
###### 2、解压
tar zxvf zookeeper-3.4.9.tar.gz
###### 3、copy配置文件
cp zoo_sample.cfg zoo.cfg
###### 4、编辑zoo.cfg
vim zoo.cfg
```
tickTime=2000
initLimit=10
syncLimit=5
dataDir=/usr/local/zookeeper-3.4.9/data
clientPort=2181
```
###### 5、启动
```
17:48:31 root@server1-dev:/usr/local/zookeeper-3.4.9/bin$ sh zkServer.sh start
ZooKeeper JMX enabled by default
Using config: /usr/local/zookeeper-3.4.9/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
17:48:31 root@server1-dev:/usr/local/zookeeper-3.4.9/bin$ ps -ef | grep zookeeper
2017-04-24
mysql-connector-odbc-3.51.12-win32
mysql-connector-odbc-3.51.12-win32
连接数据库的odbc,希望可以帮助到你。
2016-01-21
IeEmbed.exe java 嵌入浏览器
该文章只说明Swing中嵌入浏览器这一个问题,解决该问题需要3个第三方库文件,jdic.jar、jdic.dll、IeEmbed.exe.
jdic.jar是Java程序需要引入的第三方库,并且将jdic.dll、IeEmbed.exe拷到系统变量classpath或是操作系统system32下即可
2013-07-02
使用 AbstractTableModel 构建Table 在表格中添加JButton按钮
使用 AbstractTableModel 构建Table 在表格中添加JButton按钮,之前在网上找了2天没有找到好用的程序,最终终于找到一个好用的例子。
不要使,我退你们分。。
sing the Swing JTable class can quickly become a sticky business when you want to customize it to your specific needs. First you must become familiar with how the JTable class is organized. Individual cells are rendered by TableCellRenderer implementations. The table contents are represented by an implementation of the TableModel interface. By default, JTable uses DefaultTableCellRenderer to draw its cells. DefaultTableCellRenderer recognizes a few primitive types, rendering them as strings, and can even display Boolean types as checkboxes. But it defaults to displaying the value returned by toString() for types it does not specifically handle.
You have to provide your own TableCellRenderer implementation if you want to display buttons in a JTable. The TableCellRenderer interface contains only one method, getTableCellRendererComponent(...), which returns a java.awt.Component that knows how to draw the contents of a specific cell. Usually, getTableCellRendererComponent() will return the same component for every cell of a column, to avoid the unnecessary use of extra memory. But when the contents of a cell is itself a component, it is all right to return that component as the renderer. Therefore, the first step towards having JButtons display correctly in a JTable is to create a TableCellRenderer implementation that returns the JButton contained in the cell being rendered. In the accompanying code listing, JTableButtonRenderer demonstrates how to do this.
Even after creating a custom TableCellRenderer, you're still not done. The TableModel associated with a given JTable does not only keep track of the contents of each cell, but it also keeps track of the class of data stored in each column. DefaultTableModel is designed to work with DefaultTableCellRenderer and will return java.lang.String.class for columns containing data types that it does not specifically handle. The exact method that does this is getColumnClass(int column). Your second step is to create a TableModel implementation that returns JButton.class for cells that contain JButtons. JTableButtonModel shows one way to do this. It just returns the result of getClass() for each piece of cell data.
At this point, you're almost done, but not quite. What's the use of putting a JButton in a JTable if you can't press the darn thing? By default, JTable will not forward mouse events to components contained in its cells. If you want to be able to press the buttons you add to JTable, you have to create your own MouseListener that forwards events to the JButton cells. JTableButtonMouseListener demonstrates how you could do this.
2013-05-15
spring 平台很全面例子
spring 平台例子,提供了项目中基本你能想到的例子应用,
email、jmx、ejb、aop、事务、mvc、spring mvc、authentication、jbpm、flex、rest、osgi、springbatch、web_flow、portletmvc
2013-04-27
TA创建的收藏夹 TA关注的收藏夹
TA关注的人