- 博客(129)
- 资源 (3)
- 收藏
- 关注
转载 ubuntu 配置
(ubuntu环境配置)[https://wido.me/sunteya/understand-bashrc-and-profile/]
2018-07-03 09:56:52
335
翻译 gitlab 基本指令
A little lookup for commands I use frequentlyCommit all edited files and add a message git commit -a -m “My commit”Add all new files git add .Perform a pull operation git pull REMOT...
2018-05-29 20:22:43
895
原创 读取PC 的uuid 或者硬盘的序列号
有时候,我们需要为我们的软件绑定特定的PC.这时,我们就需要一种特定的标识,一般可用的CUP 的id,MAC地址,但是有的CPU id为空,MAC地址也是人为可以修改的,我一般使用的是SMBOIS的id或者硬盘的序列号。虽然,也不是一定可靠的,但是相对而言还是可以使用的. UUID wmic csproduct get “UUID” > C:\UUID.txt ...
2018-04-03 19:22:00
7121
原创 Oracle 对时间的操作
早Oracle中对月份,毫秒,微秒的操作都有函数支持,但是对于天数,时分秒的操作却没有内置的函数支持,下面演示如何操作时分秒 In a more general way you can use “INTERVAL”. Here some examples: 1) 对当前时间加1天 select sysdate + INTERVAL ‘1’ DAY from dual; ...
2018-03-30 10:27:13
321
原创 mysql 5.7.12 zip install
1. 下载mysql zip 下载mysql zip window64位安装包2. 解压缩,例如放到C:\mysql-5.7.21-winx643. 在文件夹C:\mysql-5.7.21-winx64 下新建my.ini这是mysql会自动读取的默认配置文件4. 在C:\mysql-5.7.21-winx64 目录下,新建data文件夹用于存放MySQL数据库...
2018-03-30 10:21:31
273
原创 数组元素查重
数组元素查重,帅选出重复的数据type person struct { name, id_card_no string}//家系中的相同人员筛选func familyHasSamePerson(nodeViewList []*person)([]person) { nodeMap := make([]person, 0) pList := make([]...
2018-03-18 12:32:06
727
原创 正确的姿态使用curl上传文件内的json数据
使用Curl上传file curl -XPUT -H’Content-Type: application/json’ localhost:9200/family_person?pretty -d@data.json -X 参数代表资源的请求类型-H参数表示在请求头中附加的参数-d参数表示需要上传的参数,需要上传文件时需要使用@file_name示例 提交p...
2018-03-15 20:24:33
21014
原创 oracle 备份数据
oracle 经常需要的备份数据的操作1、如果表不存在create table new_table_name asselect column_name,[more columns] from Existed_table; 例如create table deptasselect empno, ename from emp;2、 如果表存在insert in...
2018-02-09 16:18:56
272
转载 15 Things You Should Know about the ORDER BY Clause
When multiple columns/expressions are specified in the ORDER BY clause, the precedence of sorting is left to right.The ORDER BY clause can order in ascending (ASC) or descending (DESC) sequence, or ...
2018-02-09 14:26:24
371
转载 Oracle 数据集
Oracle 在表与表之间取交集,差集关键字UNION, UNION ALL, INTERSECT, and MINUSYou can combine multiple queries using the set operators UNION, UNION ALL, INTERSECT, and MINUS. All set operators have equal preceden...
2018-02-08 14:46:49
1181
翻译 golang 程序运行影藏dos黑窗口
通过go的标准库exec调用cmd命令时会闪弹黑窗口,为解决此问题在windows下可以用win32 API 的 WinExec。此问题主要出现在带UI或无控制台的程序调用cmd时。编译go时加入参数: go build -ldflags=”-H windowsgui”
2018-02-06 10:54:48
4151
原创 oracle 重复数据去除
oracle 重复数据查重删除select idfrom (select row_number() over(partition by self_object_id order by self_object_id) record_line, si.* from sample_info si where self_object_id in
2018-02-05 13:19:18
422
原创 html5 IndexedDB
html5 IndexedDB 使用测试主要是测试,体验浏览器自带的k/v数据库 1、openDatabase 2、transaction 3、executeSql1、创建浏览器自带的数据库实例 openDatabase(‘database_name’,’database_version’, ‘database_description’,’database_m
2018-01-29 14:11:59
205
原创 微信小程序开发--记事本 收藏夹
记事本微信小程序开发 这里是简单的微信小程序的开发主要实现的功能是记事本和收藏夹 1、开发环境的搭建2、功能模块的介绍3、代码实现
2018-01-21 13:37:00
2099
翻译 oracle snapshot
利用闪回查看Oracle表历史时刻数据1.查看表历史时刻数据select * from tab_test AS OF TIMESTAMP to_timestamp('20140917 10:00:00','yyyymmdd hh24:mi:ss'); 2、利用flashback table恢复表到过去某一时刻alter table tab_test enable row movement; flas
2017-12-01 18:32:24
658
翻译 oracle lock
查看哪个表被锁 select b.owner,b.object_name,a.session_id,a.locked_mode from v$locked_object a,dba_objects b where b.object_id = a.object_id; 查看是哪个session引起的 select b.username,b.sid,b.serial#,logon_
2017-12-01 18:27:57
499
转载 postgresql zip install
1 Download the ZIP file from http://www.enterprisedb.com/products-services-training/pgbindownload2 Unzip the archive into a directory of your choice (the archive is created such that unzipping it, it w
2017-11-21 21:41:49
627
原创 javascript引用自身属性
javascript引用自身属性说明:目的是需要定义对象,且内部属性的值依赖自身属性的值var foo = { a: 5, b: 6, c: this.a + this.b // Doesn't work c:NaN}解决方法方法1、var foo = { a: 5, b: 6, get c () { return this.a + this.b;
2017-11-04 00:28:31
3469
1
原创 oracle 最简导入导出数据
1、登陆终端 sqlplus / as sysdba grant dba to ystr32、创建用户,授权create user lnalims identified by lnalims;grant dba to lnalims;3、导入数据1、导入.dmp中的所有数据 imp user_name/password@ip/orcl ...
2017-10-26 10:12:33
308
原创 golang获取命令行参数
goalng 解析命令行参数package mainimport ( "flag" "fmt")func main() { ip := flag.String("ip", "127.0.0.1", "ipAddr") port := flag.Int("port", ":8080", "http listen port") var databaseType
2017-08-01 18:55:21
823
翻译 Oracle:查找表的主键,外键,唯一性约束,索引
oracle:查找表的主键,外键,唯一性约束,索引1、查找表的所有索引(包括索引名,类型,构成列) select t.*, i.index_type from user_ind_columns t,user_indexes i where t.index_name = i.index_name
2017-07-31 19:41:17
521
翻译 ajax 触发preflight的配置
ajax 出发prefight的配置 Here’s sample code for making a CORS request with JQuery. The comments give more details on how certain properties interact with CORS.$.ajax({ // The 'type' property sets the HTT
2017-07-09 12:31:51
1560
翻译 关于\xEF\xBB\xBF的介绍
UTF-8编码中BOM的检测与删除 所谓BOM,全称是Byte Order Mark,它是一个Unicode字符,通常出现在文本的开头,用来标识字节序(Big/Little Endian),除此以外还可以标识编码(UTF-8/16/32),如果出现在文本中间,则解释为zero width no-break space。 注:Unicode相关知识的详细介绍请参考UTF-8, UTF-16, UT
2017-07-04 09:37:40
14897
翻译 oracle 查询锁和解锁
1、查找锁表后台需要经常的数据库交互,有时需要查看一些操作不当导致数据库的一些表被锁住,这时就需要查找出哪些表被锁,进而解锁。 查看锁表进程SQL语句 select sess.sid, sess.serial#, lo.oracle_username, lo.os_user_name, ao.object_name, lo.loc
2017-06-27 14:26:59
486
原创 golang 递归遍历树节点
在数据结构的组织中重要的一节一定会包含”树”,和相应的处理”树”的递归函数。这一节,就是说明如何的处理工作当中的很重要的数据展现,行政区划的处理。 var str = [ { "code":1, "p_code":0, "name":"c1" }, { "co
2017-06-24 20:26:53
6058
2
原创 解压缩安装mysql
解压缩安装mysql1 下载mysql压缩2 配置环境变量 在系统环境变量path下增加以下路径, 指定到mysql安装包中的bin目录 3 添加配置文件 在解压缩的安装包中增加my.ini文件添加以下内容[mysql]# 设置mysql客户端默认字符集default-character-set=utf8[mysqld]#skip-grant-tables#设置3306端口
2017-06-02 13:30:26
320
原创 reflect包copy函数的使用
关于golang的reflect包copy函数的使用package mainimport( "reflect" "fmt")type Student struct{ Name string`json:"name"` Age int`json:"age"` Gender string`json:"gender"`}func main() { src
2017-02-26 23:18:37
2580
原创 react 实践
1、安装react-domnpm i react-dom --save2、实例import React, { Component } from 'react';import ReactDOM from 'react-dom';// Parent Componentclass GroceryList extends Component { render() { return
2016-11-04 16:31:48
285
原创 go 复杂结构和json字符串
在go中会经常拼接复杂的结构和拼接复杂的json字符串go-sampleJson简单测试package mainimport ( "fmt" sampleJson "go-simplejson-master")type User struct { Name string Age int}func main() { j, _ := sampleJson.N
2016-10-24 18:46:24
2253
原创 php解析json
<?php$json = '{\"illness_radio_r\":\"传染病史:无\",\"illness_radio_r1\":\"既往手术史:无\",\"illness_radio_r3\":\"既往其他病史:无\",\"illness_radio_r4\":\"既往是否接受过针灸治疗:无\",\"illness_radio_r5\":\"既往是否有晕针史:有\",\"illness_ra
2016-10-01 15:55:02
930
原创 Ajax的同步和异步数据传输
Ajax的数据传输默认的方式是asycn:true就是异步的数据传输,但是有的时候我们需要同步的数据传输,例如下面的方式。我们自定义了一个函数,在此函数的内部调用了一个异步传输数据的Ajax函数,这个函数和服务器进行数据的交互,而且必须要进行的是,首先执行ajax,接收服务器的数据,因为在下面程序的执行依赖于服务器返回的数据。在这种情况下,就必须要同步的执行ajax代码,所以需要设置ajax的传
2016-08-18 19:08:43
2064
原创 sublime 3
import urllib.request,os; pf = ‘Package Control.sublime-package’; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) );
2016-08-05 16:29:19
223
原创 markdown编辑器练习
Markdown编辑器总结1、使用*创建不同的标题等级语法格式[*]一级标题二级标题三级标题2、无序列表语法格式:[-]- 列表1 - 列表2 - 列表33、有序列表语法格式[1. ]1. 有序列表1 2. 有序列表2 3. 有序列表3 以上的有序和无序列表都可以使用加前导空格来分层级4、输入内容语法格式[>] this is a test5、格式化字体语法格式[**,*,**
2016-07-19 18:42:10
338
翻译 解决打开文件夹,每次都在新的窗口中
一般是因为删除了系统盘的C:\Program Files\Internet Explorer文件夹导致的,首先需要的别的电脑上复制这个文件夹,然后按照以下步骤操作就OK了。1、在开始菜单-运行中输入regsvr32 “%SystemRoot%/System32/actxprxy.dll” regsvr32 “%ProgramFiles%/Internet Explorer/ieproxy.dll”
2016-07-14 15:51:34
4404
原创 go text/templete模板
抽空把go 的text/templete模板整理学习了,现在总结下。 步骤 1、定义数据类型type Opt struct{ Name string Age int Score float32}one := Opt{"xiao chao",26,90}two := Opt{"xiao er",29,89}2、建立模板 one_str := "one_str :
2016-06-11 23:47:44
645
转载 http协议详解
引言 HTTP是一个属于应用层的面向对象的协议,由于其简捷、快速的方式,适用于分布式超媒体信息系统。它于1990年提出,经过几年的使用与发展,得到不断地完善和扩展。目前在WWW中使用的是HTTP/1.0的第六版,HTTP/1.1的规范化工作正在进行之中,而且HTTP-NG(Next Generation of HTTP)的
2016-06-06 01:00:03
888
原创 go数据库操作
package mainimport ( "database/sql" _ "github.com/go-sql-driver/mysql")func main() { /* //打开数据库 db, err := sql.Open("mysql", "root:12
2016-06-06 00:12:59
1213
原创 go http协议和文件操作
package mainimport ( "fmt" "net/http" "os")func main() { Client := &http.Client{} url := "http://www.baidu.com" req, err := http.NewRequest("GET", url, nil) if err != nil {
2016-06-05 01:56:33
1244
原创 go 接口
package mainimport ( "fmt" "reflect")type student struct { name string}type GetInfo interface { GetName() string SetName(name string)}func (stu *student) GetName() string { r
2016-06-04 13:28:35
538
原创 go 类型练习
package mainimport ( "fmt" "math")type rect struct { width, height float32}type cir struct { r float32}type myInt int64func (a myInt) area() myInt { return a}func (a *rect) ar
2016-06-04 12:10:05
519
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人