Skip to content

Instantly share code, notes, and snippets.

@lihb
lihb / oracle培训.md
Last active June 30, 2022 02:01
记录oracle要点和重点

oracle体系:

是由实例(instance)和库文件组成的。

管理员方式连接数据库

C:\>sqlplus / as sysdba;
@lihb
lihb / vimrc.vim
Last active August 29, 2015 14:04
2014-07-16上传, 插件放在115网盘,名称:VimPlugins20140716.zip
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin
set diffexpr=MyDiff()
function! MyDiff()
let opt = '-a --binary '
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
@lihb
lihb / 19乘法.md
Created May 2, 2014 02:02
19以内的两位数的乘法

19以内的两位数的乘法

这个方法是在微信上看到的,据说是印度阿三流行出来的。记录下来 备用。

19×13 = (19+3) × 10 + 9 × 3 = 220 + 27 = 247

16*18 = (16+8) × 10 + 6 × 8 = 240 + 48 = 288

的确很快很好用。

@lihb
lihb / vimrc.vim
Created April 29, 2014 13:13
my vimrc
set guioptions=T " 隐藏工具栏
colorscheme Monokai "配色方案
"set guifont=Monospace:h12:cGB2312 " 字体 && 字号
set noerrorbells " 关闭错误提示音
"
set nobackup " 不要备份文件
"
@lihb
lihb / vim-motion.md
Created April 29, 2014 09:57
Vim motion用法

主要介绍vim编辑器中motion个人认为比较高级,且在编写代码中会用到的一些用法,一般都是和操作命令如(c,d等)配合使用。

words

aw: 一个单词,包含单词两端的空格

iw: 单词内部,不包含两端的空格

示例:

@lihb
lihb / python正则.md
Last active June 30, 2022 02:01
python 正则表达式

group()

group()方法 返回所有匹配对象,或者是根据要求返回某个特定的子组。

groups()

groups()方法则简单些,它只返回一个 包含唯一或者所有子组的 元组。

@lihb
lihb / tab&space.md
Created April 24, 2014 13:50
vim 空格和tab相互转换

vimrc文件中,添加以下代码,然后重启vim,即可实现按tab键产生4个空格:

set ts=4  " ts是tabstop的缩写,设TAB宽4个空格
set expandtab

对于已保存的文件,可以使用如下方法进行空格和TAB的替换:

TAB替换成空格

@lihb
lihb / django admin.py
Last active August 29, 2015 14:00
django admin.py 后台管理 示例
#coding:utf8
from django.contrib import admin
from sqlTest.models import Publisher, Author, Book
class AuthorAdmin(admin.ModelAdmin):
list_display = ('first_name', 'last_name', 'email') # 页面显示元组中的信息
search_fields = ('first_name','last_name', 'email') # 左上角显示搜索栏
@lihb
lihb / django model操作
Created April 19, 2014 01:47
django模型操作
主要是在shell环境下实验:
比如我们的models.py是以下内容
#################################################
#models.py
from django.db import models
def User(models.Model):
name = models.CharField(max_length=30)
sex = models.CharField(max_length=10)