首页 > 其他
Django学习系列之ModelForm
前面两篇写了有关Form与Form的验证,今天我们来写些ModelForm,因为现在的web开发都基与db驱动的,所以models.py的定义是少不掉的,但我们会发现它的定义与forms.py定义很接近,为此减少输入,我们可以使用modelForm这个模块,可减少代码输入。先定义models.py#coding:utf-8fro..
分类:其他   时间:2015-05-24 10:12:43    收藏:0  评论:0  赞:0  阅读:208
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:32    收藏:0  评论:0  赞:0  阅读:224
Tomcat介绍
Tomcat是一个免费开放源代码的Web应用服务器,具有开源免费、容易安装、容易使 用、占用资源孝易于和其他软件集成等优点,是Apache软件基金会(ApacheSoftware Foundation)的Jakarta项目中的一个核心项目,由Apache、Sun和其他一些公司及个人共 同开发而成。由于有了Sun的参与..
分类:其他   时间:2015-05-24 10:12:22    收藏:0  评论:0  赞:0  阅读:302
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:12:13    收藏:0  评论:0  赞:0  阅读:235
Quartz 2D基本绘图
上一节中,我引用别人的文章,详细的讲解了Quartz 2D的基本概念。想了解的,请点击这里。这一节用几个小Demo,来说明Quartz 2D的绘图功能。  1. 我们先定义一个用来绘图的View(DrawView,它继承自UIView),并准备在下面的方法中实现绘图工作。 - (void)drawRect:(CGRect)rect; 2. 在主界面上面拖拽一个View,并且将...
分类:其他   时间:2015-05-24 10:11:32    收藏:0  评论:0  赞:0  阅读:234
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:11:23    收藏:0  评论:0  赞:0  阅读:232
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:11:02    收藏:0  评论:0  赞:0  阅读:144
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:10:38    收藏:0  评论:0  赞:0  阅读:289
rTextarea函数,FCKEditor编辑器在轻开平台中的使用例子三
引入fckeditor编辑器入口文件(跟前边的例子一样)用户会话临时设置 0 表单部分<form id="Edoit_Form" method="pos...
分类:其他   时间:2015-05-24 10:10:02    收藏:0  评论:0  赞:0  阅读:318
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:09:52    收藏:0  评论:0  赞:0  阅读:284
第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:09:32    收藏:0  评论:0  赞:0  阅读:275
Struts2中自定义的Result
引言所谓自定义Result,就是由我们自行开发Result,而不是使用由Struts2预定义的result。 在实际的开发中使用自定义的result机会不大,因为常见的各种页面展示技术,都有struts2给我们做的比较好好的。自定义的Result观看Result的源码如下:public interface Result extends Serializable { /** * Re...
分类:其他   时间:2015-05-24 10:09:12    收藏:0  评论:0  赞:0  阅读:225
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:09:02    收藏:0  评论:0  赞:0  阅读:424
第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:08:52    收藏:0  评论:0  赞:0  阅读:260
确定主机字节序的程序
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:08:02    收藏:0  评论:0  赞:0  阅读:297
第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:07:52    收藏:0  评论:0  赞:0  阅读:263
Anndroid 开发架构读书笔记
市面上大部分应用不外乎就是颠过来倒过去地做以下这些事情: --------------- --------------- --------------- --------------- | | | | ...
分类:其他   时间:2015-05-24 10:07:12    收藏:0  评论:0  赞:0  阅读:259
操作系统 外部内部碎片的区别(经典)
引用网友的比喻: 外部碎片,是由于大量信息由于先后写入、置换、删除而形成的空间碎片。为了便于理解,我们将信息比作货物,将存储空间比作仓库来举例子。假设,我们有编号为1、2、3、4、5、6的6间仓库库房,前天送来了一大宗货,依次装入了1、2、3、4、5号仓库,昨天又因故将4号库房的货物运走了...
分类:其他   时间:2015-05-24 10:06:42    收藏:0  评论:0  赞:0  阅读:281
条款33:避免隐藏继承而来的名称
? 此例中混合了纯虚函数、虚函数、非虚函数等,只是为了强调隐藏的是继承而来的名字,至于名字代表的是什么并不重要,即使enum、nested class、typedef也不例外。 1 #include 2 3 using namespace std; 4 5 class Base 6 { 7 p...
分类:其他   时间:2015-05-24 10:06:02    收藏:0  评论:0  赞:0  阅读:165
团队组建及项目启动
第一项任务:团队组建及项目启动日光微澜Github仓库:https://github.com/yangleiwangximin/组长:杨磊(计科高职13-3)201303014107成员:王希敏(计科高职13-3)201303014099、赵林林(计科高职13-3)、201303014112赵书(计...
分类:其他   时间:2015-05-24 10:05:52    收藏:0  评论:0  赞:0  阅读:242
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!