- 博客(17)
- 收藏
- 关注
原创 typescript 实现 创建工厂。。
class Person implements ISay{ person() { console.log('**** PERSON ****') } say() { console.log("i'm a person"); }}class Dog implements ISay{ dog() { conso
2017-06-10 01:42:43
609
原创 vscode python 的用户设置
{ "workbench.colorTheme": "Vibrant_Ink", "window.zoomLevel": 1, "editor.fontFamily": "'Input Mono','Source Code Pro','文泉驿等宽微米黑'", "editor.fontSize": 12, "editor.rulers&qu
2017-02-05 11:49:23
5838
1
原创 mysqldb的安装
mysqldb是要安装mysql-python包,如果没有装libmysqlclient-dev会提mysql_config没有安装过程执行如下:sudo apt install libmysqlclient-devpip install mysql-python
2017-01-27 18:55:22
482
原创 XORM 的复杂操作
package mainimport ( "fmt" "log" _ "github.com/go-sql-driver/mysql" "github.com/go-xorm/xorm")type ModelBase struct { Id int64 Name string}type Person struct { Id int64 Name strin
2014-12-19 16:57:14
6662
原创 xorm 的基本操作
package mainimport ( "fmt" _ "github.com/go-sql-driver/mysql" "github.com/go-xorm/xorm")type Person struct { Id int64 Name string}func main() { x, engErr := xorm.NewEngine("mysql",
2014-12-12 17:45:47
1736
原创 beego orm 的基本操作
// beegoBasicpackage mainimport ( "fmt" "github.com/astaxie/beego/orm" _ "github.com/go-sql-driver/mysql")type User struct { ID int64 `orm:"pk;auto"` Name string `orm:"size(100)"`}fun
2014-12-09 16:25:36
2530
原创 SORM的关联查询
case class Person(name: String)case class Department(name: String)case class PersonDepartment(person: Person, department: Department)case class Order(person: Person, title: String)import sorm.Dsl.
2014-11-23 22:59:58
451
原创 SORM的CURD以及事务
package scala_mysql_BasicCURDcase class Person(name: String)import sorm.Dsl._import sorm._object db extends Instance( entities = Set(Entity[Person]()), url = "jdbc:mysql://localhost/testsca
2014-11-19 10:49:49
609
原创 SORM中的数据关系
package scala_mysql_DataRelationcase class Department(name: String)case class Person(name: String)case class PersonDepartment(person: Person, department: Department, isMainDepartment: Boolean)
2014-11-18 09:35:13
528
原创 最小二乘君根据样本数据推算直线方程系数
# -*- coding: utf-8 -*-"""Created on Thu Sep 18 10:43:37 2014@author: aminic"""import numpy as npimport pylab as pl#样本点d=[[1,2],[2,3],[3,4],[2.5,3],[4,3],[8,4]]d=np.array(d)#算最小二乘公式计算因子a
2014-09-18 16:00:27
693
原创 字符串遍历生成器。。。(改个名字行不行?
# -*- coding: utf-8 -*-"""Created on Sun Aug 10 11:12:35 2014@author: aminic"""class PasswordGenerator: ''' 密码生成器 ''' #参与密码的字符类型序列 digitalChars=('0','1','2','3','4','5','6',
2014-08-11 09:29:19
703
2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人