码迷,mamicode.com
首页 > 其他好文
Django学习系列之ModelForm
前面两篇写了有关Form与Form的验证,今天我们来写些ModelForm,因为现在的web开发都基与db驱动的,所以models.py的定义是少不掉的,但我们会发现它的定义与forms.py定义很接近,为此减少输入,我们可以使用modelForm这个模块,可减少代码输入。先定义models.py#coding:utf-8fro..
分类:其他好文   时间:2015-05-24 10:15:35    阅读次数:151
LVM高级管理
#LVM回滚技术 [root@domain/]#umount/home #卸载/home分区 [root@domain/]#lvreduce-L200M/dev/vg01/lvhome #不扫描文件系统,直接减掉文件系统 [root@domain/]#mount/dev/vg01/lvhome #这个时候挂载就会报错,文件系统就损坏了 [root@domain/]#cd/etc/lvm #进..
分类:其他好文   时间:2015-05-24 10:12:41    阅读次数:197
Tomcat介绍
Tomcat是一个免费开放源代码的Web应用服务器,具有开源免费、容易安装、容易使 用、占用资源孝易于和其他软件集成等优点,是Apache软件基金会(ApacheSoftware Foundation)的Jakarta项目中的一个核心项目,由Apache、Sun和其他一些公司及个人共 同开发而成。由于有了Sun的参与..
分类:其他好文   时间:2015-05-24 10:15:31    阅读次数:153
Tomcat安装
#centos安装jak和tomcat环境 [root@server1tomcat]#ls apache-tomcat-8.0.21.tar.gzjdk-8u40-linux-x64.tar.gz [root@server1tomcat]#tarzxvfjdk-8u40-linux-x64.tar.gz [root@server1tomcat]#mkdir/usr/java [root@server1tomcat]#tarzxvfjdk-8u40-linux-x64.tar.gz-C/usr/jav..
分类:其他好文   时间:2015-05-24 10:14:14    阅读次数:125
Quartz 2D基本绘图
上一节中,我引用别人的文章,详细的讲解了Quartz 2D的基本概念。想了解的,请点击这里。这一节用几个小Demo,来说明Quartz 2D的绘图功能。  1. 我们先定义一个用来绘图的View(DrawView,它继承自UIView),并准备在下面的方法中实现绘图工作。 - (void)drawRect:(CGRect)rect; 2. 在主界面上面拖拽一个View,并且将...
分类:其他好文   时间:2015-05-24 10:13:55    阅读次数:132
Pair Program and Feel the Flow
Pair Program and Feel the FlowGudny Hauknes, Kari Røssland, and Ann Katrin GagnatiMAGiNE THAT YOU ARE TOTALLY ABSORBED by what you are doing— focused, dedicated, and involved. You may have lost track o...
分类:其他好文   时间:2015-05-24 10:12:13    阅读次数:155
Own (and Refactor) the Build
Own (and Refactor) the BuildSteve BerczukiT iS NOT UNCOMMON for teams that are otherwise highly disciplined about coding practices to neglect build scripts, either out of a belief that they are merely...
分类:其他好文   时间:2015-05-24 10:13:02    阅读次数:126
Sum Root to Leaf Numbers -- leetcode
Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3 which represents the number 123. Find the tota...
分类:其他好文   时间:2015-05-24 10:12:08    阅读次数:109
rTextarea函数,FCKEditor编辑器在轻开平台中的使用例子三
引入fckeditor编辑器入口文件(跟前边的例子一样)用户会话临时设置 0 表单部分<form id="Edoit_Form" method="pos...
分类:其他好文   时间:2015-05-24 10:11:30    阅读次数:159
4.1矩阵运算的设计与实现
//4.1矩阵运算的设计与实现 #include #include #define M 4 /****----------------------------------------------****/ //函数名:MatrixAdd(int m1[M][M], int m2[M][M], int &result[M][M]) //参数: (传入)int m1[M][...
分类:其他好文   时间:2015-05-24 10:10:30    阅读次数:127
第12周 程序阅读-多重继承1
#include using namespace std; class A { public: A() { a=0; } A (int i) { a=i; } void print() { cout<<a<<" "; } private: int a; }; clas...
分类:其他好文   时间:2015-05-24 10:12:05    阅读次数:167
Struts2中自定义的Result
引言所谓自定义Result,就是由我们自行开发Result,而不是使用由Struts2预定义的result。 在实际的开发中使用自定义的result机会不大,因为常见的各种页面展示技术,都有struts2给我们做的比较好好的。自定义的Result观看Result的源码如下:public interface Result extends Serializable { /** * Re...
分类:其他好文   时间:2015-05-24 10:09:37    阅读次数:98
Struts2中自定义的Result
引言所谓自定义Result,就是由我们自行开发Result,而不是使用由Struts2预定义的result。 在实际的开发中使用自定义的result机会不大,因为常见的各种页面展示技术,都有struts2给我们做的比较好好的。自定义的Result观看Result的源码如下:public interface Result extends Serializable { /** * Re...
分类:其他好文   时间:2015-05-24 10:11:54    阅读次数:108
Codeforces 500B - New Year Permutation(最短路)
题意:给你一个序列    ,   给你一个mark 矩阵 , 如果mark[i][j] = 1,  则代表序列i    j  可以交换,需要求出交换之后字典序最小的序列 题解: floyd 处理一遍,然后靠前的优先选择最小的数  ,  然后没了 代码: #include #include #define N_node 305 int n, dis[N_node][N_node], va...
分类:其他好文   时间:2015-05-24 10:12:05    阅读次数:133
第12周 阅读程序-多重继承2
#include using namespace std; class A { public: A(char *s) { cout<<s<<endl; } }; class B:public A { public: B(char *s1, char *s2):A(s1) { cout<<s2<<endl; } }; ...
分类:其他好文   时间:2015-05-24 10:09:16    阅读次数:116
确定主机字节序的程序
int main(int argc,char **argv) { int sockfd, n; char buf[MAXLINE]; union { short s; char c[sizeof(short)]; } un; un.s = 0x0102; if (sizeof(short) == 2) {...
分类:其他好文   时间:2015-05-24 10:09:16    阅读次数:122
第12周 程序阅读-多重继承3
#include using namespace std; class Base { public: Base(char i) { cout<<"Base constructor. --"<<i<<endl; } }; class Derived1:virtual public Base { public: Derived1(char i,char j):Base(i) ...
分类:其他好文   时间:2015-05-24 10:10:29    阅读次数:154
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!