- Python全栈 part02 - 006 Ajax
drfung
JSON定义:JSON(Javascriptobjectnotation,JS对象标记)是一种轻量级的数据交换格式;是基于ECMASCript(w3cjs规范)的一个子集.JS-JSON-Python.pngJSON对象定义需要注意的点属性名必须用"(双引号)不能使用十六进制值不能使用undefined不能使用函数名和日期函数stringify与parse方法JSON.parse()将一个JSON
- JSON:轻量级的数据交换格式
Tsingfeng.
基础释疑json
JSON(JavaScriptObjectNotation,JS对象简谱)是一种轻量级的数据交换格式。它基于ECMAScript(EuropeanComputerManufacturersAssociation,欧洲计算机协会制定的js规范)的一个子集,采用完全独立于编程语言的文本格式来存储和表示数据。简洁和清晰的层次结构使得JSON成为理想的数据交换语言。易于人阅读和编写,同时也易于机器解析和生
- js对象常用方法和es6对象新增方法
含含要暴怒
对象解构:基本;有剩余值运算符...rest;有默认值;解析对象不分顺序(变量名要和键名一致);解构对象.png【对象】1.对象的简写(变量名和对象的键一致的时候才可以);2.对象属性表达式[];3.对象的拷贝合并Object.assign();4.对象扩展...{...a,...b}复制与合并对象;【对象数据类型的弱点】1.对象的键名只能是字符串或者symbol;2.对象没有顺序;3.对象的长度
- JavaScript初级——JSON
Fan_web
前端学习分享javascriptjson前端css开发语言html
1、JS中的对象只有JS自己认识,其他的语言都不认识。2、JSON就是一个特殊格式的字符串,这个字符串可以被任意的语言所识别,并且可以转换为任意语言中的对象,JSON在开发中主要用来数据的交互。3、JSON——JavaScriptObjectNotation——JS对象表示法4、JSON和JS对象的格式一样,只不过JSON字符串中的属性名必须加双引号,其他的和JS语法一致。5、JSON分类:①对象
- 如何限制JS对象属性的配置
小鱼旋子
JavaScript里对象的属性是公开的,一般是不受保护的,即属性的修改/添加/添加不受限制,但是在一些应用情境下,又需要对对象的属性做一些限制。第一种情况:对属性的修改、增加、删除做限制Object.preventExtensions()限制了不能向对象中新添加属性和方法了但可以修改对象中存在的属性,也可以删除原有属性和方法Object.isExtensible():可以确定对象是否为可篡改,如
- 【C++】jsoncpp的安装与使用
Tanswer_
C/C++jsonjsoncpp
一、JSON的简单介绍JSON(JavaScriptObjectNotation):JS对象表示法是轻量级的文本数据交换格式;独立于语言,JSON解析器和库支持多种编程语言json文件的文件类型是”.json”语法规则:数据在名称/值对中名称在双引号中,后面写一个冒号,然后是值值可以是:数字(整数或者浮点数)、string(在双引号中)、逻辑值(true/false)、数组(在[]中)、对象(在花
- js对象操作常用方法
人间小趴菜
javascript前端开发语言
一、创建对象1.字面量创建//字面量创建letobj={a:1}2.构造函数创建//构造函数创建functionPerson(name,age){this.name=name;this.age=age;}letperson=newPerson('Bob',12);二、访问对象属性1.点符号letobj={a:1}obj.a2.方括号letobj={a:1}obj['a']//1三、添加属性obj.
- vue响应式原理
.YoIo
vue.js前端javascript
对于响应式原理,我们先了解vue是一个MVVM结构的框架;也就是数据层、视图层、数据-视图层;响应式的原理就是实现当数据更新时,视图层也要相应的更新,基于响应式原理我们可以使数据驱动视图的实现变得简单而高效一、响应式原理对于Vue2中的响应式处理来说,他基于js的object.defineProperty()方法的。它的原理主要是如下几步实现的:1、数据劫持:在vue中,当你把一个普通js对象传给
- gui.js可视化插件的使用
我爱吃干果
three.jsGUIjavascript开发语言前端
gui插件是一个可以与前端界面相结合更改js对象属性值的插件,在平常的前端开发中我们可以使用控制台的打印工具看自己调试的值。但是在进行三维可视化开发时,一个好的角度和材质的取值是非常重要的,而这点用肉眼是看不出来的,最好的方法就是一点一点的在界面上去试,但是没改变一次就重启一个项目,比较麻烦,因此就需要gui.js来修改threejs中一些属性值,可以辅助我们以更快,更直观的方式对模型的材质和位置
- 鸿蒙(API 12 Beta3版)【使用Image完成图片解码】图片开发指导依赖JS对象
移动开发技术栈
鸿蒙开发harmonyosopenharmony媒体鸿蒙图片依赖解码
图片解码指将所支持格式的存档图片解码成统一的[PixelMap],以便在应用或系统中进行图片显示或[图片处理]。当前支持的存档图片格式包括JPEG、PNG、GIF、WebP、BMP、SVG、ICO、DNG。开发步骤添加依赖在进行应用开发之前,开发者需要打开native工程的src/main/cpp/CMakeLists.txt,在target_link_libraries依赖中添加libace_n
- 实现一个简单的react框架 -- (Fiber架构)
nie-ny
reactreactjs
简介本文将从头开始编写一个简单的类react框架。用于理解fiber原理和hooks的实现,轻松地深入React代码库。React.createElement我们从编写createElement开始,这个函数主要用于把JSX转换成虚拟DOM(js对象)。这里我们使用@babel/plugin-transform-react-jsx这个插件自动转换。//jsxconstelement=(name)/
- 前端 Vue启动本地(.exe)文件
fruge
前端前端vue.jsjavascript
首先,启动本地的.exe文件的方式有以下两种:方式1:通过使用JS打开本地exe文件。但是一般的浏览器,由于安全问题,都会禁止掉这个JS对象,这就导致部分浏览器不支持该种方式。方式2:利用浏览器外部协议(URLProcotol)打开本地exe文件。简单来说通过修改注册表信息,然后在项目中通过超链接或路由跳转的方式触发。话不多说上代码。这里简单对方式2进行测试:demo.regWindowsRegi
- JS面向对象--2 对象和JSON的区别
FF_C
JSON就是javascriptobjectnotation,JS对象表示法,是JS对象的严格子集区别就是引号:JSON要求所有的键必须加双引号,而JS对象实际上不要求双引号这就是一个标准JSONvarobj={"name":"小明","age":"12","sex":"男","married":false}alert(obj.age)实际上不加引号也是合法的:varobj={name:"小明",
- 从0实现react
第十人i
项目地址:项目地地址参考地址:bilibili1.下载nodejs2.下载脚手架:npminstallcreate-react-app-g3.创建项目:create-react-appreact-test1.火热的0配置的打包工具parcel地址:parcel官网2.安装babel插件,将jsx语法转换成js对象(虚拟DOM)npminstallbabel-corebabel-preset-env
- JavaWeb
小小李学java
web
目录1.初识Web前端2.HTML、CSS3.基础标签4.CSS样式5.CSS引入方式6.颜色表示形式7.CSS选择器8.超链接9.盒子模型10.JavaScript11.JS基础语法12.数据类型13.流程控制语句14.JS函数15.JS对象16.Vue17.Ajax18.前后端分离开发:19.YApi20.前端工程化21.Vue组件库Element22.打包部署23.Maven24.Sprin
- JS对象 Object.assign()
长沙xtt
JS进阶javascript开发语言ecmascript
对象字面量JS中的对象:JavaScript对象是变量的内容放置变量或函数对象字面量是一种简单的键值对数据结构letobj={Pcode:{a:'1'},pName:'Apple',getData(){console.log(obj.Pcode,obj.pName);}};//添加属性//obj.Pcode=10001;//obj.pName='Apple';//obj.getData=funct
- Web课程学习笔记--前端常见跨域解决方案
北航程序员小C
Web学习笔记前端学习笔记
前端常见跨域解决方案什么是跨域?跨域是指一个域下的文档或脚本试图去请求另一个域下的资源,这里跨域是广义的。广义的跨域:1.)资源跳转:A链接、重定向、表单提交2.)资源嵌入:、、、等dom标签,还有样式中background:url()、@font-face()等文件外链3.)脚本请求:js发起的ajax请求、dom和js对象的跨域操作等其实我们通常所说的跨域是狭义的,是由浏览器同源策略限制的一类
- js实现深拷贝的5种方式
Cupid510
javaScript
实现深拷贝的方式JSON方法实现//_tmp和result是相互独立的,没有任何联系,有各自的存储空间。letdeepClone=function(obj){let_tmp=JSON.stringify(obj);//将对象转换为json字符串形式letresult=JSON.parse(_tmp);//将转换而来的字符串转换为原生js对象returnresult;};letobj1={weiqi
- js对象利用object.assign实现递归深拷贝
qq_48378883
js常用库javascript前端开发语言
constdeepClone=(data)=>{varcloneobj=Object.assign({},data)//拷贝单层对象for(varkeyindata){//循环if(typeofcloneobj[key]==='object'){//判断对象cloneobj[key]=deepClone(cloneobj[key])//递归拷贝}}returncloneobj//返回深拷贝后的对象
- 13.JS实现深拷贝的方式
叫我阿东就行
前端面试JS手写篇javascript前端开发语言
实现方式1(JSON.stringfy)JSON.parse(JSON.stringify(obj))是目前比较常用的深拷贝方法之一,它的原理就是利用JSON.stringify将js对象序列化(JSON字符串),再使用JSON.parse来反序列化(还原)js对象。这个方法可以简单粗暴的实现深拷贝,但是还存在问题,拷贝的对象中如果有函数,undefined,symbol,当使用过JSON.str
- 从零学习Nodejs(七)(最新详解版)JS对象(Date Math RegExp)
i99
JSDate对象Date对象是JavaScript内置的对象,通过它您可以访问计算机系统的时间,此外,Date对象中还提供了多种用于管理、操作和格式化时间/日期的方法。创建Date对象在开始处理时间和日期之前,我们需要先创建一个Date对象。与其他对象(数组对象、字符串对象等)不同,Date对象不能直接声明,必须通过Date()函数定义。JavaScript中提供了四种不同的方法来创建Date对象
- React 中的diff 算法
去宇宙给你摘星
Reactreact.jsjavascript前端
虚拟DOM和Diff算法问题:我们知道state更新组件的时候,只要state变化就重新渲染视图,如果组件中只有一个DOM元素需要更新时,也需要将整个组件内容重新渲染到页面中吗?回答:不是,虚拟DOM和Diff算法可以达到部分更新虚拟DOM:本质上是个js对象,用来描述页面UI(React元素就是虚拟DOM)执行过程React组件配合state创建一个虚拟DOM树根据虚拟DOM树,生成一个真正的D
- 虚拟dom详解
_处女座程序员的日常
vue前端jsjavascript前端vue.js
什么是虚拟dom?虚拟dom本质上就是一个普通的JS对象,用于描述视图的界面结构在vue中,每个组件都有一个render函数,每个render函数都会返回一个虚拟dom树,这也就意味着每个组件都对应一棵虚拟DOM树。查看虚拟DOM:mounted(){console.log(this._vnode);},//vdom结构:javascriptvarvnode={tag:"h1",children:
- 数组
_沙漏
检测是否是数组:ES3检测是否是数组:Object.prototype.toString.call(要判断的变量)ES5检测是否是数组:Array.isArray()数组转字符串:join("分隔符")字符串转换数组:split("分隔符")js对象转换成js字符串:stringify()js字符串转换成js对象:parse()函数表达式与函数声明if(window.location.toStri
- 使用Es5的严格模式,json对象,数组方法,function的扩展
949d30a09ba7
在ES5的全局函数的第一句定位为“‘usestrict”开启了严格模式的作用必须使用var进行定义变量创建对象实例的时候,使用new来创建一个对象的实例创建eval中的作用域对象当中不能有重名的属性js对象(数组)转换为json对象(数组)JSON。stringify(obj/arr)JSON.parse(json)json对象(数组)转换为js对象(数组)object对象的拓展object.cr
- JSON
cmeizu
JSON是JavaScriptObjectNotation的缩写,它是一种轻量级数据交换格式。JSON是javaScript的一个子集.JSON是js对象字符串表示法,用文本来表示对象,但本质上仍是一个字符串.JOSN用的是结构化来标记数据语法格式简单,层次清晰.数据方面所用的字符少,可节约数据传输所占带宽.参考:百度JSON简介
- Js对象
X4vier
真实生活中,一辆汽车是一个对象。对象有它的属性,如重量和颜色等,方法有启动停止等:所有汽车都有这些属性,但是每款车的属性都不尽相同。所有汽车都拥有这些方法,但是它们被执行的时间都不尽相同。js中定义对象this指向问题1:this永远指向一个对象;2:this的指向完全取决于函数调用的位置;上述代码中,fun函数被调用了两次,显而易见的是两次的结果不一样;很多人都会这样解释,obj.f()的调用中
- js对象的深入理解(四-----精华篇)
感觉不错哦
本篇将讲解js对象的存取器,介绍两个重要的对象方法为什么vue不兼容IE8,因为IE8不兼容ESMAScript5,Vue会将对象所有的属性遍历,使用Object.defineProperty把这些属性全部转为getter/setter.(存储器)在ES5中,对象的属性值可以用一个或两个方法代替,这两个方法就是getter和setter,由getter和setter定义的属性被称为存取器属性,它不
- MVVM模型
walkerLing
Vue复盘前端javascript开发语言vue.js前端框架
MVVM模型M模型(Model)对应data中的数据(普通的JS对象)V视图(View)对应模板(Vue的模板经过解析形成的页面,页面生成的DOM结构)VMVue实例对象(ViewModel)整个绿色大盒子就是vue缔造的VM实例对象图中下方的线是把Model的数据通过DataBindings数据绑定送到View的模板实例对象上,上方的线是对DOM结构进行监听,若发生数据改动则通过DOMliste
- 前端工程化之:webpack3-4(css in js)
小李老笨了
前端cssjavascript
一、cssinjscssinjs的核心思想是:用一个JS对象来描述样式,而不是css样式表。例如下面的对象就是一个用于描述样式的对象:conststyles={backgroundColor:"#f40",color:"#fff",width:"400px",height:"500px",margin:"0auto"}由于这种描述样式的方式根本就不存在类名,自然不会有类名冲突。至于如何把样式应用到
- mongodb3.03开启认证
21jhf
mongodb
下载了最新mongodb3.03版本,当使用--auth 参数命令行开启mongodb用户认证时遇到很多问题,现总结如下:
(百度上搜到的基本都是老版本的,看到db.addUser的就是,请忽略)
Windows下我做了一个bat文件,用来启动mongodb,命令行如下:
mongod --dbpath db\data --port 27017 --directoryperdb --logp
- 【Spark103】Task not serializable
bit1129
Serializable
Task not serializable是Spark开发过程最令人头疼的问题之一,这里记录下出现这个问题的两个实例,一个是自己遇到的,另一个是stackoverflow上看到。等有时间了再仔细探究出现Task not serialiazable的各种原因以及出现问题后如何快速定位问题的所在,至少目前阶段碰到此类问题,没有什么章法
1.
package spark.exampl
- 你所熟知的 LRU(最近最少使用)
dalan_123
java
关于LRU这个名词在很多地方或听说,或使用,接下来看下lru缓存回收的实现
1、大体的想法
a、查询出最近最晚使用的项
b、给最近的使用的项做标记
通过使用链表就可以完成这两个操作,关于最近最少使用的项只需要返回链表的尾部;标记最近使用的项,只需要将该项移除并放置到头部,那么难点就出现 你如何能够快速在链表定位对应的该项?
这时候多
- Javascript 跨域
周凡杨
JavaScriptjsonp跨域cross-domain
 
- linux下安装apache服务器
g21121
apache
安装apache
下载windows版本apache,下载地址:http://httpd.apache.org/download.cgi
1.windows下安装apache
Windows下安装apache比较简单,注意选择路径和端口即可,这里就不再赘述了。 2.linux下安装apache:
下载之后上传到linux的相关目录,这里指定为/home/apach
- FineReport的JS编辑框和URL地址栏语法简介
老A不折腾
finereportweb报表报表软件语法总结
JS编辑框:
1.FineReport的js。
作为一款BS产品,browser端的JavaScript是必不可少的。
FineReport中的js是已经调用了finereport.js的。
大家知道,预览报表时,报表servlet会将cpt模板转为html,在这个html的head头部中会引入FineReport的js,这个finereport.js中包含了许多内置的fun
- 根据STATUS信息对MySQL进行优化
墙头上一根草
status
mysql 查看当前正在执行的操作,即正在执行的sql语句的方法为:
show processlist 命令
mysql> show global status;可以列出MySQL服务器运行各种状态值,我个人较喜欢的用法是show status like '查询值%';一、慢查询mysql> show variab
- 我的spring学习笔记7-Spring的Bean配置文件给Bean定义别名
aijuans
Spring 3
本文介绍如何给Spring的Bean配置文件的Bean定义别名?
原始的
<bean id="business" class="onlyfun.caterpillar.device.Business">
<property name="writer">
<ref b
- 高性能mysql 之 性能剖析
annan211
性能mysqlmysql 性能剖析剖析
1 定义性能优化
mysql服务器性能,此处定义为 响应时间。
在解释性能优化之前,先来消除一个误解,很多人认为,性能优化就是降低cpu的利用率或者减少对资源的使用。
这是一个陷阱。
资源时用来消耗并用来工作的,所以有时候消耗更多的资源能够加快查询速度,保持cpu忙绿,这是必要的。很多时候发现
编译进了新版本的InnoDB之后,cpu利用率上升的很厉害,这并不
- 主外键和索引唯一性约束
百合不是茶
索引唯一性约束主外键约束联机删除
目标;第一步;创建两张表 用户表和文章表
第二步;发表文章
1,建表;
---用户表 BlogUsers
--userID唯一的
--userName
--pwd
--sex
create
- 线程的调度
bijian1013
java多线程thread线程的调度java多线程
1. Java提供一个线程调度程序来监控程序中启动后进入可运行状态的所有线程。线程调度程序按照线程的优先级决定应调度哪些线程来执行。
2. 多数线程的调度是抢占式的(即我想中断程序运行就中断,不需要和将被中断的程序协商)
a) 
- 查看日志常用命令
bijian1013
linux命令unix
一.日志查找方法,可以用通配符查某台主机上的所有服务器grep "关键字" /wls/applogs/custom-*/error.log
二.查看日志常用命令1.grep '关键字' error.log:在error.log中搜索'关键字'2.grep -C10 '关键字' error.log:显示关键字前后10行记录3.grep '关键字' error.l
- 【持久化框架MyBatis3一】MyBatis版HelloWorld
bit1129
helloworld
MyBatis这个系列的文章,主要参考《Java Persistence with MyBatis 3》。
样例数据
本文以MySQL数据库为例,建立一个STUDENTS表,插入两条数据,然后进行单表的增删改查
CREATE TABLE STUDENTS
(
stud_id int(11) NOT NULL AUTO_INCREMENT,
- 【Hadoop十五】Hadoop Counter
bit1129
hadoop
1. 只有Map任务的Map Reduce Job
File System Counters
FILE: Number of bytes read=3629530
FILE: Number of bytes written=98312
FILE: Number of read operations=0
FILE: Number of lar
- 解决Tomcat数据连接池无法释放
ronin47
tomcat 连接池 优化
近段时间,公司的检测中心报表系统(SMC)的开发人员时不时找到我,说用户老是出现无法登录的情况。前些日子因为手头上 有Jboss集群的测试工作,发现用户不能登录时,都是在Tomcat中将这个项目Reload一下就好了,不过只是治标而已,因为大概几个小时之后又会 再次出现无法登录的情况。
今天上午,开发人员小毛又找到我,要我协助将这个问题根治一下,拖太久用户难保不投诉。
简单分析了一
- java-75-二叉树两结点的最低共同父结点
bylijinnan
java
import java.util.LinkedList;
import java.util.List;
import ljn.help.*;
public class BTreeLowestParentOfTwoNodes {
public static void main(String[] args) {
/*
* node data is stored in
- 行业垂直搜索引擎网页抓取项目
carlwu
LuceneNutchHeritrixSolr
公司有一个搜索引擎项目,希望各路高人有空来帮忙指导,谢谢!
这是详细需求:
(1) 通过提供的网站地址(大概100-200个网站),网页抓取程序能不断抓取网页和其它类型的文件(如Excel、PDF、Word、ppt及zip类型),并且程序能够根据事先提供的规则,过滤掉不相干的下载内容。
(2) 程序能够搜索这些抓取的内容,并能对这些抓取文件按照油田名进行分类,然后放到服务器不同的目录中。
- [通讯与服务]在总带宽资源没有大幅增加之前,不适宜大幅度降低资费
comsci
资源
降低通讯服务资费,就意味着有更多的用户进入,就意味着通讯服务提供商要接待和服务更多的用户,在总体运维成本没有由于技术升级而大幅下降的情况下,这种降低资费的行为将导致每个用户的平均带宽不断下降,而享受到的服务质量也在下降,这对用户和服务商都是不利的。。。。。。。。
&nbs
- Java时区转换及时间格式
Cwind
java
本文介绍Java API 中 Date, Calendar, TimeZone和DateFormat的使用,以及不同时区时间相互转化的方法和原理。
问题描述:
向处于不同时区的服务器发请求时需要考虑时区转换的问题。譬如,服务器位于东八区(北京时间,GMT+8:00),而身处东四区的用户想要查询当天的销售记录。则需把东四区的“今天”这个时间范围转换为服务器所在时区的时间范围。
- readonly,只读,不可用
dashuaifu
jsjspdisablereadOnlyreadOnly
readOnly 和 readonly 不同,在做js开发时一定要注意函数大小写和jsp黄线的警告!!!我就经历过这么一件事:
使用readOnly在某些浏览器或同一浏览器不同版本有的可以实现“只读”功能,有的就不行,而且函数readOnly有黄线警告!!!就这样被折磨了不短时间!!!(期间使用过disable函数,但是发现disable函数之后后台接收不到前台的的数据!!!)
- LABjs、RequireJS、SeaJS 介绍
dcj3sjt126com
jsWeb
LABjs 的核心是 LAB(Loading and Blocking):Loading 指异步并行加载,Blocking 是指同步等待执行。LABjs 通过优雅的语法(script 和 wait)实现了这两大特性,核心价值是性能优化。LABjs 是一个文件加载器。RequireJS 和 SeaJS 则是模块加载器,倡导的是一种模块化开发理念,核心价值是让 JavaScript 的模块化开发变得更
- [应用结构]入口脚本
dcj3sjt126com
PHPyii2
入口脚本
入口脚本是应用启动流程中的第一环,一个应用(不管是网页应用还是控制台应用)只有一个入口脚本。终端用户的请求通过入口脚本实例化应用并将将请求转发到应用。
Web 应用的入口脚本必须放在终端用户能够访问的目录下,通常命名为 index.php,也可以使用 Web 服务器能定位到的其他名称。
控制台应用的入口脚本一般在应用根目录下命名为 yii(后缀为.php),该文
- haoop shell命令
eksliang
hadoophadoop shell
cat
chgrp
chmod
chown
copyFromLocal
copyToLocal
cp
du
dus
expunge
get
getmerge
ls
lsr
mkdir
movefromLocal
mv
put
rm
rmr
setrep
stat
tail
test
text
- MultiStateView不同的状态下显示不同的界面
gundumw100
android
只要将指定的view放在该控件里面,可以该view在不同的状态下显示不同的界面,这对ListView很有用,比如加载界面,空白界面,错误界面。而且这些见面由你指定布局,非常灵活。
PS:ListView虽然可以设置一个EmptyView,但使用起来不方便,不灵活,有点累赘。
<com.kennyc.view.MultiStateView xmlns:android=&qu
- jQuery实现页面内锚点平滑跳转
ini
JavaScripthtmljqueryhtml5css
平时我们做导航滚动到内容都是通过锚点来做,刷的一下就直接跳到内容了,没有一丝的滚动效果,而且 url 链接最后会有“小尾巴”,就像#keleyi,今天我就介绍一款 jquery 做的滚动的特效,既可以设置滚动速度,又可以在 url 链接上没有“小尾巴”。
效果体验:http://keleyi.com/keleyi/phtml/jqtexiao/37.htmHTML文件代码:
&
- kafka offset迁移
kane_xie
kafka
在早前的kafka版本中(0.8.0),offset是被存储在zookeeper中的。
到当前版本(0.8.2)为止,kafka同时支持offset存储在zookeeper和offset manager(broker)中。
从官方的说明来看,未来offset的zookeeper存储将会被弃用。因此现有的基于kafka的项目如果今后计划保持更新的话,可以考虑在合适
- android > 搭建 cordova 环境
mft8899
android
1 , 安装 node.js
http://nodejs.org
node -v 查看版本
2, 安装 npm
可以先从 https://github.com/isaacs/npm/tags 下载 源码 解压到
- java封装的比较器,比较是否全相同,获取不同字段名字
qifeifei
非常实用的java比较器,贴上代码:
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import net.sf.json.JsonConfig;
i
- 记录一些函数用法
.Aky.
位运算PHP数据库函数IP
高手们照旧忽略。
想弄个全天朝IP段数据库,找了个今天最新更新的国内所有运营商IP段,copy到文件,用文件函数,字符串函数把玩下。分割出startIp和endIp这样格式写入.txt文件,直接用phpmyadmin导入.csv文件的形式导入。(生命在于折腾,也许你们觉得我傻X,直接下载人家弄好的导入不就可以,做自己的菜鸟,让别人去说吧)
当然用到了ip2long()函数把字符串转为整型数
- sublime text 3 rust
wudixiaotie
Sublime Text
1.sublime text 3 => install package => Rust
2.cd ~/.config/sublime-text-3/Packages
3.mkdir rust
4.git clone https://github.com/sp0/rust-style
5.cd rust-style
6.cargo build --release
7.ctrl