sage
gyl868 · 共 106 篇文章
chattr -i
7、执行chattr #chattr -i /etc/passwd # lsattr -v /etc/passwd 2095582053 ------------- /etc/passwd # chattr -i /etc/shadow 8、同步文件 pwconv 9、成功修改密码 passwd Changing password for user root. New UNIX password: BAD PASSWORD: it is WAY too short Retype new UNIX password: passwd: all authentication tokens upda…
2013-08-18T17:35:33Z · 编程语言 · 评论(0)
c# winForm delegate event 跨窗口修改其它控件属性
Form1代码 public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { textBox1.Text = DateTime.Now.ToString(); Form2 form2 = new Form2(); form2.event_getstr += new getstr(_setstr); form2.event_setstr += new setstr(_getstr); form2…
2013-05-30T20:10:18Z · 编程语言 · 评论(0)
C#MysqlHelper
View Code MysqlHelper类 using System; using System.Collections; using System.Collections.Specialized; using System.Data; using MySql.Data.MySqlClient; using System.Configuration; using System.Data.Common; using System.Collections.Generic; using System.Text.RegularExpressions; namespace LOAF.DAL { pu…
2013-04-30T16:16:39Z · 编程语言 · 评论(1)
[error] client denied by server configuration
client denied by server configuration: 解决办法: <Directory "/var/www/html/xxx//ROOT"> AllowOverride None Options None Order allow,deny Allow from all </Directory>
2012-11-12T17:48:11Z · 操作系统 · 评论(0)
如何利用google,baidu进行站内搜索
http://www.google.com/search?domains=www.hello.com&sitesearch=www.hello.com&q=test http://www.baidu.com/s?si=www.hello.com&cl=3&ct=2097152&tn=baidulocal&word=test www.hello.com 是要搜索的站点 test是要搜索的关键字
2012-09-27T14:17:16Z · 互联网 · 评论(0)
List对象排序通用方法
此文来自:http://jardot.iteye.com/blog/762349 在数据库中查出来的列表list中,往往需要对不同的字段重新排序,一般的做法都是使用排序的字段,重新到数据库中查询。如果不到数据库查询,直接在第一次查出来的list中排序,无疑会提高系统的性能。 只要把第一次查出来的结果存放在session中,就可以对list重新排序了。一般对list排序可以使用Collections.sort(list),但如果list中包含是一个对象的话,这种方法还是行不通的。那要怎么排序呢?如果有一个UserInfo对象,包含如下字段: private java.lang.Integer …
2012-08-27T18:16:46Z · 编程语言 · 评论(0)
update查询替换
UPDATE `table_name` SET `field_name` = replace (`field_name`,'from_str','to_str') WHERE `field_name` LIKE '%from_str%' 说明: table_name —— 表的名字 field_name —— 字段名 from_str —— 需要替换的字符串 to_str —— 替换成的字符串
2012-08-12T20:40:51Z · 数据库 · 评论(0)
常用的JPA标记 hibernate annotation
Table Table用来定义entity主表的name,catalog,schema等属性。 元数据属性说明: name: 表名 catalog: 对应关系数据库中的catalog schema:对应关系数据库中的schema UniqueConstraints:定义一个UniqueConstraint数组,指定需要建唯一约束的列 @Entity @Table(name="CUST") public class Customer { ... } SecondaryTable 一个entity class可以映射到多表,SecondaryTable用来定义单个从表的名字,主键名字等属性。 元…
2012-07-22T20:41:54Z · 编程语言 · 评论(0)
Spring3工具类
请求工具类 org.springframework.web.bind.ServletRequestUtils //取请求参数的整数值: public static Integer getIntParameter(ServletRequest request, String name) public static int getIntParameter(ServletRequest request, String name, int defaultVal) -->单个值 public static int getIntParameters(ServletRequest request, Str…
2012-07-16T11:52:54Z · 编程语言 · 评论(0)
Map的value取得key
转载 http://hi.baidu.com/sonos/item/2510a3166cb377c838cb30a4 protected List getKeyByValue(Map map, Object value) { List keys = new ArrayList(); Iterator it = map.entrySet().iterator(); while (it.hasNext()) { Map.Entry entry = (Entry) it.next(); Object obj = entry.getValue(); if (obj != null && obj.eq…
2012-06-15T13:42:11Z · 编程语言 · 评论(0)
mysql 查找替换
例句: UPDATE `products` SET `products_description` = replace (`products_description`,'cheap','discount'); 将products表中的字段products_description中的字符cheap替换成discount
2012-06-10T10:48:25Z · 数据库 · 评论(0)
springMVC 杂记
<mvc:mapping path="/user/*" /> mvc:interceptors </mvc:interceptors> JAVA_HOME:F:\Java\jdk1.6.0_16 path:%JAVA_HOME%\bin;
2012-05-17T18:47:57Z · Web前端 · 评论(0)
个人整理的Linux Shell语法速查表(用C语言语法来作对比)
本文目录 linx查看系统配置常用命令 unix 环境高级编程 个人整理的Linux Shell语法速查表(用C语言语法来作对比) 如何使用gdb进行debug c程序 GDB调试精粹及使用实例 linx查看系统配置常用命令 系统 uname -a # 查看内核/操作系统/CPU信息 head -n 1 /etc/issue # 查看操作系统版本 cat /proc/cpuinfo # 查看CPU信息 hostname # 查看计算机名 lspci -tv # 列出所有PCI设备 lsusb -tv # 列出所有USB设备 lsmod # 列出加载的内核模块 env # 查看环境变量 资源 …
2012-05-14T18:14:23Z · 操作系统 · 评论(0)
CentOS自启动
/etc/profile #/etc/rc.d/rc.local 用chkconfig配置linux自启动服务 要将一个服务变成自动启动的服务,可以利用chkconfig命令来完成。具体来说可以通过以下几个步骤实现: 例如要将httpd服务配置成开机即自启动的服务,可以 1.在/etc/rc.d/init.d增加apache的启动脚步(起文件名apache): #!/bin/sh description: Apache auto start-stop script. #chkconfig: 2345 20 80 APACHE_HOME=/home/psd/local/apache/ APAC…
2012-05-14T09:43:58Z · 操作系统 · 评论(0)