Python Django 调试 >>> class Person(models.Model): ... first_name = models.CharField(max_length = 50) ... last_name = models.CharField(max_length = 50) ... def __unicode__(self): ... return u‘%s %s...
分类:
编程语言 时间:
2014-12-21 16:44:34
阅读次数:
499
一、概述read命令接收标准输入(键盘)的输入,或者其他文件描述符的输入。得到输入后,read命令将数据放入一个标准变量中。二、使用举例(这里仅列出一些常用的选项)1.基本读取#!/bin/bash echo -n "Enter your name:" #参数-n的作用是不换行,...
分类:
系统相关 时间:
2014-12-21 16:25:01
阅读次数:
194
通常作为一个应用程序的部署脚本,开始的第一项工作是为当前应用创建一个专用(dedicated)的用户和用户组。这个脚本很简单,这里贴一个参考样本:#!/bin/sh
user=test_user
group=test_group
#create group if not exists
egrep "^$group" /etc/group >& /dev/null
if [ $? -ne 0 ]
...
分类:
系统相关 时间:
2014-12-21 15:22:24
阅读次数:
223
RHEL自动安装zookeeper的shell脚本A:本脚本运行的机器,Linux RHEL6B,C,D,...:待安装zookeeper cluster的机器, Linux RHEL6首先在脚本运行的机器A上确定可以ssh无密码登录到待安装zk的机器B,C,D,...上,然后就可以在A上运行本脚本:$ ./install_zookeeper 2181 B C D前提:B, C, D机器必须配置好...
分类:
系统相关 时间:
2014-12-21 12:45:46
阅读次数:
233
Just A Triangle
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 2273 Accepted Submission(s): 1503
Problem Descript...
分类:
其他好文 时间:
2014-12-21 09:15:22
阅读次数:
202
date在shell中常用的语法常见的参数:%Y显示年份%m显示月份%d显示日期%H显示小时%M显示分钟%S显示秒%x显示年月份%X显示时分秒查看当前系统时间[root@fuzj-linux~]#date2014年08月10日星期日16:48:04CST查看年,月,日[root@fuzj-linux~]#date+%Y查看当前年份2014[root@fuzj-lin..
分类:
其他好文 时间:
2014-12-21 01:57:31
阅读次数:
194
比较费空间的笨方法:#includevoid main(){ int i,j,k,*m,*n,*q,temp; printf("请输入三个数:"); scanf("%d,%d,%d",&i,&j,&k); printf("三个数是:%d,%d,%d\n",i,j,k); m=&i,n=&j,q=&k...
分类:
编程语言 时间:
2014-12-20 23:17:52
阅读次数:
233
第一种
#include
int main()
{
int n;
int i,j;
int a[100][50];
scanf("%d",&n);
a[0][0]=1;
for(i=1;i<=n;i++)
{
for(j=1;j<=i;j++)
{
a[i][j]=a[i-1][j]+a[i-1][j-1];
printf("%d ",a[i][j]);
}...
分类:
其他好文 时间:
2014-12-20 22:12:32
阅读次数:
262