<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆-295  評(píng)論-26  文章-1  trackbacks-0
     

    ArrayList和Vector的區(qū)別,HashMap和Hashtable的區(qū)別?
    答:就ArrayList與Vector主要從二方面來(lái)說(shuō).?
    一.同步性:Vector是線程安全的,也就是說(shuō)是同步的,而ArrayList是線程序不安全的,不是同步的?
    二.數(shù)據(jù)增長(zhǎng):當(dāng)需要增長(zhǎng)時(shí),Vector默認(rèn)增長(zhǎng)為原來(lái)一培,而ArrayList卻是原來(lái)的一半?
    就HashMap與HashTable主要從三方面來(lái)說(shuō)。?
    一.歷史原因:Hashtable是基于陳舊的Dictionary類的,HashMap是Java?1.2引進(jìn)的Map接口的一個(gè)實(shí)現(xiàn)?
    二.同步性:Hashtable是線程安全的,也就是說(shuō)是同步的,而HashMap是線程序不安全的,不是同步的?
    三.值:只有HashMap可以讓你將空值作為一個(gè)表的條目的key或value?

      

    都屬于
    Map 接口的類,實(shí)現(xiàn)了將惟一鍵映射到特定的值上。

    ?

       HashMap 類沒(méi)有分類或者排序。它允許一個(gè) null 鍵和多個(gè) null 值。

       Hashtable 類似于 HashMap ,但是不允許 null 鍵和 null 值。它也比 HashMap 慢,因?yàn)樗峭降摹?/span>

    posted @ 2007-08-20 13:13 華夢(mèng)行 閱讀(253) | 評(píng)論 (0)編輯 收藏
    Stack. ?用來(lái)在ram中存放數(shù)據(jù)的地方 This ? lives ? in ? the ? general ? RAM ? (random-access ? memory) ? area, ? but????has ? direct ? support ? from ? the ? processor ? via ? its ? stack ? pointer. ? The ? stack ? pointer ? is ? moved ? down ? to ? create ? new ? memory ? and ? moved ? up ? to ? release ? that ? memory. ? This ? is ? an ? extremely ? fast ? and ? efficient ? way ? to ? allocate ? storage, ? second ? only ? to ? registers. ? The ? Java ? compiler ? must ? know, ? while ? it ? is ? creating ? the ? program, ? the ? exact ? size ? and ? lifetime ? of ? all ? the ? data ? that ? is ? stored ? on ? the ? stack, ? because ? it ? must ? generate ? the ? code ? to ? move ? the ? stack ? pointer ? up ? and ? down. ? This ? constraint ? places ? limits ? on ? the ? flexibility ? of ? your ? programs, ? so ? while ? some ? Java ? storage ? exists ? on ? the ? stack ? ?in ? particular, ? object ? handles ? ?Java ? objects ? are ? not ? placed ? on ? the ? stack. ? ?
    ? ?
    ? Heap. ? This ? is ? a ? general-purpose ? pool ? of ? memory ? (also ? in ? the ? RAM ? area) ? where ? all ? Java ? objects ? live. ? The ? nice ? thing ? about ? the ? heap ? is ? that, ? unlike ? the ? stack, ? the ? compiler ? doesn't ? need ? to ? know ? how ? much ? storage ? it ? needs ? to ? allocate ? from ? the ? heap ? or ? how ? long ? that ? storage ? must ? stay ? on ? the ? heap. ? Thus, ? there's ? a ? great ? deal ? of ? flexibility ? in ? using ? storage ? on ? the ? heap. ? Whenever ? you ? need ? to ? create ? an ? object, ? you ? simply ? write ? the ? code ? to ? create ? it ? using ? new ? and ? the ? storage ? is ? allocated ? on ? the ? heap ? when ? that ? code ? is ? executed. ? And ? of ? course ? there's ? a ? price ? you ? pay ? for ? this ? flexibility: ? it ? takes ? more ? time ? to ? allocate ? heap ? storage.??
    . 棧(stack)與堆(heap)都是Java用來(lái)在Ram中存放數(shù)據(jù)的地方。
    2. 棧的優(yōu)勢(shì)是,存取速度比堆要快,僅次于直接位于CPU中的寄存器。但缺點(diǎn)是,存在棧中的數(shù)據(jù)大小與生存期必須是確定的,缺乏靈活性。另外,棧數(shù)據(jù)可以共享,詳見(jiàn)第3點(diǎn)。堆的優(yōu)勢(shì)是可以動(dòng)態(tài)地分配內(nèi)存大小,生存期也不必事先告訴編譯器,Java的垃圾收集器會(huì)自動(dòng)收走這些不再使用的數(shù)據(jù)。但缺點(diǎn)是,由于要在運(yùn)行時(shí)動(dòng)態(tài)分配內(nèi)存,存取速度較慢。
    3. Java中的數(shù)據(jù)類型有兩種。基本類型(primitive types), 共有8種,即int, short, long, byte, float, double, boolean, char。存在于棧中。另一種是包裝類數(shù)據(jù),如Integer, String, Double等將相應(yīng)的基本數(shù)據(jù)類型包裝起來(lái)的類。這些類數(shù)據(jù)全部存在于堆中.
    posted @ 2007-08-20 13:08 華夢(mèng)行 閱讀(165) | 評(píng)論 (0)編輯 收藏

    Boolean.parseBoolean("Strrrr");?? false
    只有String 在忽略大小寫的情況小“true”才會(huì)返回true

    posted @ 2007-08-20 10:18 華夢(mèng)行 閱讀(506) | 評(píng)論 (0)編輯 收藏
    String strSource=request.getHeader("Referer")
    posted @ 2007-08-17 10:29 華夢(mèng)行 閱讀(75) | 評(píng)論 (0)編輯 收藏
    ???? strReturn= sql.replaceAll("(&)|(\\^)|(')|(/)|(;)|(:)|(_)|(%)|(\")|(\n)|(\\*)|(\\+)|(\\[)|(\\])|(\\})|(\\{)|(\\n)|(\\|)","");

    ?public static String dealSql(String sql){
    ??????? String strReturn="";
    ??????? if (sql==null)
    ??????????? strReturn="";
    ??????? else{
    ??????????? try{
    ??????? strReturn= sql.replaceAll("(&)|(\\^)|(')|(/)|(;)|(:)|(_)|(%)|(\")|(\n)|(\\*)|(\\+)|(\\[)|(\\])|(\\})|(\\{)|(\\n)|(\\|)","");
    ??????????? }catch(Exception e){
    ??????????????? System.out.println(e.toString());
    ??????????????? strReturn="";
    ??????????? }
    ??????? }
    ??????? return strReturn;
    ??? }
    posted @ 2007-08-16 18:10 華夢(mèng)行 閱讀(111) | 評(píng)論 (0)編輯 收藏
    ws

    /*
    ?* PathWsInterUnit.java
    ?*
    ?* Created on 2007年8月16日, 下午12:52
    ?*
    ?* To change this template, choose Tools | Template Manager
    ?* and open the template in the editor.
    ?*/

    package path.ws.interUnit;

    import javax.jws.WebMethod;
    import javax.jws.WebParam;
    import javax.jws.WebService;


    import path.crm.entity.CRM_Interunit;
    import path.crm.manager.InterUnitManager;

    /**
    ?*
    ?* @author ljl
    ?*/
    @WebService()
    public class PathWsInterUnit {
    ??? /**
    ???? * Web service operation? 客戶新增
    ???? * @param pwsStrWebSiteID?? 網(wǎng)站id
    ???? * @param pwsStrInterUnitName?? 客戶名稱
    ???? * @param pwsStrTel?????? 電話
    ???? * @param pwsStrMobile?? 手機(jī)
    ???? * @param pwsStrFax?? 傳真
    ???? * @param pwsStrCorpName?? 公司名稱
    ???? * @param pwsStrEmail?? 公司郵件
    ???? * @param pwsStrMemo?? 詳細(xì)信息
    ???? * @return?? "success" : 添加成功???? userexisted: "用戶已存在" emailexisted: 該郵件已經(jīng)被使用過(guò)了? fail: 添加失敗
    ???? */
    ??? @WebMethod
    ??? public String pathWsInterUnitAdd(@WebParam(name = "pwsStrWebSiteID") String pwsStrWebSiteID, @WebParam(name = "pwsStrInterUnitName") String pwsStrInterUnitName, @WebParam(name = "pwsStrTel") String pwsStrTel, @WebParam(name = "pwsStrMobile") String pwsStrMobile, @WebParam(name = "pwsStrFax") String pwsStrFax, @WebParam(name = "pwsStrCorpName") String pwsStrCorpName, @WebParam(name = "pwsStrEmail") String pwsStrEmail, @WebParam(name = "pwsStrMemo") String pwsStrMemo) {
    ?String strReturn;
    ? InterUnitManager? im=new InterUnitManager();
    ? //檢查用戶時(shí)候存在
    ?if ("existed".equals(im.chkIfExistRcd(pwsStrInterUnitName,"InterUnitName")))
    ????? return? "userexisted";
    ? if ("existed".equals(im.chkIfExistRcd(pwsStrInterUnitName,"InterUnitName")))
    ?? return? "emailexisted";
    ?//檢查郵件是否存在
    ??????? try{
    ??????? CRM_Interunit ci=new CRM_Interunit();
    ??????? ci.setSerialNumber(pwsStrInterUnitName);
    ??????? ci.setOrgTypeId("pathwebserviceorgnization");
    ??????? ci.setCreatorTypeId(pwsStrWebSiteID);
    ??????? ci.setName(pwsStrCorpName);
    ??????? ci.setTelephone(pwsStrTel);
    ??????? ci.setFax(pwsStrFax);
    ??????? ci.setEmail(pwsStrEmail);
    ??????? ci.setDescription(pwsStrMemo);
    ????? return im.insertInterunitWs(ci);
    ??????? }catch(Exception e){
    ??????????? System.out.println(e.toString());
    ??????????? return "fail";
    ??????? }
    ??? }

    ??? /**
    ???? * Web service operation?? 是否存在的服務(wù)? 直接調(diào)用javabean
    ???? * @param pwsStrWebSiteId? 網(wǎng)站id?
    ???? * @param pwsStrChkName
    ???? * @param pwsStrChkModule?? 模塊名?? InterUnitName:檢驗(yàn)客戶是否存在?? InterUnitEmail:郵件是否被注冊(cè)過(guò)
    ???? * @return?? 不存在:notExisted?? 存在:existed???? 異常:"fail
    ???? */
    ??? @WebMethod
    ??? public String pathWsCheckUserExist(@WebParam(name = "pwsStrWebSiteId") String pwsStrWebSiteId, @WebParam(name = "pwsStrChkName") String pwsStrChkName, @WebParam(name = "pwsStrChkModule") String pwsStrChkModule) {
    ??????? // TODO implement operation
    ??????? return? new InterUnitManager().chkIfExistRcd(pwsStrChkName,pwsStrChkModule);
    ??? }
    ???
    }

    posted @ 2007-08-16 14:19 華夢(mèng)行 閱讀(103) | 評(píng)論 (0)編輯 收藏

    Server.xml? :?
    <GlobalNamingResources>
    ??????? <!-- Test entry for demonstration purposes -->
    ??????? <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
    ??????? <!-- Editable user database that can also be used by
    ???????? UserDatabaseRealm to authenticate users -->
    ??????? <Resource auth="Container" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase"/>
    ???? <!--??
    ??????? <Resource
    ??????????? auth="Container"
    ??????????? name="jdbc/PathPlat"
    ??????????? type="javax.sql.DataSource"
    ??????????? password=""
    ??????????? driverClassName="net.sourceforge.jtds.jdbc.Driver"
    ??????????? maxIdle="50"
    ??????????? maxWait="5000"
    ??????????? username="sa"
    ??????????? url="jdbc:jtds:sqlserver://192.168.0.155:1433/pathplat;tds=8.0;lastupdatecount=true"
    ??????????? removeAbandoned="true"
    ??????????? removeAbandonedTimeout="60"
    ??????????? maxActive="100"/>??? -->
    ??????????
    ??????? <Resource
    ??????????? name="jdbc/PathPlat"
    ??????????? auth="Container"
    ??????????? type="javax.sql.DataSource"
    ??????????? password=""
    ??????????? driverClassName="oracle.jdbc.driver.OracleDriver"
    ??????????? maxIdle="50"
    ??????????? maxWait="5000"
    ??????????? username="tep"
    ??????????? url="jdbc:oracle:thin:@192.168.0.166:1521:w"
    ??????????? removeAbandoned="true"
    ??????????? removeAbandonedTimeout="60"
    ??????????? maxActive="100"/>
    ??????
    ??? </GlobalNamingResources>
    context.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <Context path="/PathCrm" reloadable="true">
    ? <ResourceLink global="jdbc/PathPlat" name="jdbc/PathPlat" type="javax.sql.DataSource"/>
    </Context>
    hibernate.cfg.xml:
    <?xml version='1.0' encoding='utf-8'?>

    <!DOCTYPE hibernate-configuration PUBLIC
    ??????? "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
    ??????? "

    <hibernate-configuration>

    ??? <session-factory>

    ??????? <!-- Database connection settings -->
    ??????? <property? name="connection.datasource">java:comp/env/jdbc/PathPlat</property>?

    ??????? <!-- SQL dialect -->
    ??????? <!--<property name="dialect">org.hibernate.dialect.SQLServerDialect</property>-->
    ??????? <property name="dialect">org.hibernate.dialect.OracleDialect</property>

    ??????? <!-- Enable Hibernate's automatic session context management -->
    ??????? <property name="current_session_context_class">thread</property>

    ??????? <!-- Disable the second-level cache? -->
    ??????? <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>

    ??????? <!-- Echo all executed SQL to stdout -->
    ??????? <property name="show_sql">false</property>

    ?<mapping resource="/wms/entity/WmsAdjustStoreCmdt.hbm.xml"/>
    ??????? <mapping resource="/wms/entity/WmsStorage.hbm.xml"/>
    ??
    ??? </session-factory>

    </hibernate-configuration>

    posted @ 2007-08-15 10:44 華夢(mèng)行 閱讀(150) | 評(píng)論 (0)編輯 收藏
    豎排格式:Portrait? 橫排格式:landscape
    posted @ 2007-08-14 19:18 華夢(mèng)行 閱讀(151) | 評(píng)論 (0)編輯 收藏
    ?If dtmDateLowerLimit is not null and dtmDateUpperLimit is not null then
    ??? temps := temps ||' AND DATEDIFF(''d'', to_date('''||to_char(dtmDateLowerLimit,'yyyy-mm-dd ')|| ' 00:00:00'||''',''yyyy-mm-dd HH24:mi:ss''), a.SendTime) >= 0 AND DATEDIFF(''d'', a.SendTime, to_date('''||to_char(dtmDateUpperLimit,'yyyy-mm-dd')|| ' 23:59:59'||''',''yyyy-mm-dd HH24:mi:ss'')) >= 0 ' ;
    ? End If;?
    posted @ 2007-08-13 11:14 華夢(mèng)行 閱讀(86) | 評(píng)論 (0)編輯 收藏
    document.getElementById("ffff").readOnly=true;
    ?readOnly? O必須大寫
    posted @ 2007-08-10 14:20 華夢(mèng)行 閱讀(127) | 評(píng)論 (0)編輯 收藏

    ? Session session = HibernateUtil.getSession();
    ??????????? Criteria crit = session.createCriteria(entityClass);
    ??????????? crit.add(Restrictions.eq("orgTypeId", orgId));?
    ??????????? crit.add(Restrictions.eq("StructID", strTypeid));
    ??????????? List entities = crit.list();
    ??????????? populate(sheet, entities);

    ? Hibernate 條件查詢

    /*
    ?* ExportManager.java
    ?*
    ?* Created on 2006年7月30日, 下午2:40
    ?*
    ?* To change this template, choose Tools | Template Manager
    ?* and open the template in the editor.
    ?*/

    package path.system.manager;

    import java.io.*;
    import java.util.List;
    import java.util.Date;
    import java.sql.Timestamp;
    import java.lang.reflect.*;
    import java.math.BigDecimal;

    import jxl.*;
    import jxl.write.*;
    import org.hibernate.Session;
    import org.hibernate.Query;
    import org.hibernate.Criteria;
    import org.hibernate.criterion.Restrictions;

    import path.system.manager.HibernateUtil;
    import path.util.DoNumber;

    /**
    ?*
    ?* @author zhaoming
    ?*/
    public class ExportManager {
    ???
    ??? private Class entityClass;
    ??? private Field[] fields;
    ??? private Class[] fieldTypes;
    ???
    ??? private static WritableCellFormat integerFormat = new WritableCellFormat(NumberFormats.INTEGER);
    ??? private static WritableCellFormat floatFormat = new WritableCellFormat(new NumberFormat("#.####"));
    ??? private static WritableCellFormat dateFormat = new WritableCellFormat(new DateFormat("yyyy-MM-dd"));
    ???
    ??? public ExportManager() {
    ??? }
    ???
    ??? /**
    ???? * 輸出excel
    ???? * @param is 原始excel模版輸入流
    ???? * @param os 目的輸出流,這里是ServletOutputStream
    ???? */
    ??? public void exportExcel(InputStream is, OutputStream os, String orgId) {
    ??????? WritableWorkbook wb = null;
    ??????? try {
    ??????????? wb = Workbook.createWorkbook(os, Workbook.getWorkbook(is));
    ??????????? WritableSheet sheet = wb.getSheet(0);
    ??????????? init(sheet);
    ??????????? Session session = HibernateUtil.getSession();
    ??????????? Criteria crit = session.createCriteria(entityClass);
    ??????????? crit.add(Restrictions.eq("orgTypeId", orgId));
    ??????????? List entities = crit.list();
    ??????????? populate(sheet, entities);
    ??????????? wb.write();
    ??????? } catch (Exception e) {
    ??????????? e.printStackTrace();
    ??????? } finally {
    ??????????? try { wb.close(); } catch (Exception e) {}
    ??????? }
    ??? }
    ??? public void exportExcelCd(InputStream is, OutputStream os, String orgId, String strTypeid) {
    ??????? WritableWorkbook wb = null;
    ??????? try {
    ??????????? wb = Workbook.createWorkbook(os, Workbook.getWorkbook(is));
    ??????????? WritableSheet sheet = wb.getSheet(0);
    ??????????? init(sheet);
    ??????????? Session session = HibernateUtil.getSession();
    ??????????? Criteria crit = session.createCriteria(entityClass);
    ??????????? crit.add(Restrictions.eq("orgTypeId", orgId));?
    ??????????? crit.add(Restrictions.eq("StructID", strTypeid));
    ??????????? List entities = crit.list();
    ??????????? populate(sheet, entities);
    ??????????? wb.write();
    ??????? } catch (Exception e) {
    ??????????? e.printStackTrace();
    ??????? } finally {
    ??????????? try { wb.close(); } catch (Exception e) {}
    ??????? }
    ??? }
    ???
    ??? private void init(WritableSheet sheet) throws Exception {
    ??????? entityClass = Class.forName(sheet.getCell(0, 0).getContents().trim());
    ??????? Cell[] fieldNames = sheet.getRow(1);
    ??????? int len = fieldNames.length;
    ??????? fields = new Field[len];
    ??????? fieldTypes = new Class[len];
    ??????? for (int i = 0; i < len; i++) {
    ??????????? fields[i] = entityClass.getDeclaredField(fieldNames[i].getContents().trim());
    ??????????? fieldTypes[i] = fields[i].getType();
    ??????? }
    ??? }
    ???
    ??? private void populate(WritableSheet sheet, List entities) throws Exception {
    ??????? for (int i = 0; i < entities.size(); i++) {
    ??????????? Object entity = entities.get(i);
    ??????????? for (int j = 0; j < fields.length; j++) {
    ??????????????? fields[j].setAccessible(true);
    ??????????????? WritableCell cell = getCell(i + 3, j, fields[j].get(entity));
    ??????????????? sheet.addCell(cell);
    ??????????? }
    ??????? }
    ??? }
    ???
    ??? private WritableCell getCell(int row, int col, Object value) {
    ??????? if (fieldTypes[col] == String.class)
    ??????????? return new Label(col, row, (String) value);
    ??????? if (fieldTypes[col] == long.class || fieldTypes[col] == Long.class)
    ??????????? return new jxl.write.Number(col, row, value == null ? 0 : ((Long) value).longValue(), integerFormat);
    ??????? if (fieldTypes[col] == int.class || fieldTypes[col] == Integer.class)
    ??????????? return new jxl.write.Number(col, row, value == null ? 0 : ((Integer) value).intValue(), integerFormat);
    ??????? if (fieldTypes[col] == double.class || fieldTypes[col] == Double.class)
    ??????????? return new jxl.write.Number(col, row, value == null ? 0 : ((Double) value).doubleValue(), floatFormat);
    ??????? if (fieldTypes[col] == float.class || fieldTypes[col] == Float.class)
    ??????????? return new jxl.write.Number(col, row, value == null ? 0 : ((Float) value).floatValue(), floatFormat);
    ??????? if (fieldTypes[col] == BigDecimal.class)
    ??????????? return new jxl.write.Number(col, row, value == null ? 0 : ((BigDecimal) value).doubleValue(), floatFormat);
    ??????? if (fieldTypes[col] == Timestamp.class || fieldTypes[col] == Date.class)
    ??????????? return new jxl.write.DateTime(col, row, value == null ? new Date() : (Date) value, dateFormat);
    ??????? return null;
    ??? }
    ???
    }

    posted @ 2007-08-10 14:18 華夢(mèng)行 閱讀(235) | 評(píng)論 (0)編輯 收藏
    var oOpener = dialogArguments ;
    ??????
    ?oOpener.szOldPassword = document.all.OldPassword.value ;
    ?oOpener.szNewPassword = document.all.NewPassword.value ;
    ?oOpener.bIsEditPwd = true ;

    openDialog('UserModifyPwd.jsp?TimeID=' + Math.random(),window,300,180) ;
    ?if (bIsEditPwd == true){
    ??document.Form1.OldPassword.value = szOldPassword ;
    ??document.Form1.NewPassword.value = szNewPassword ;
    ??top.topFrame.saveURL('../Configure/UserConfigure.jsp?AutoShow=Yes&TimeID=' + Math.random()) ;
    ??document.Form1.submit() ;
    ?}
    posted @ 2007-08-01 16:26 華夢(mèng)行 閱讀(583) | 評(píng)論 (0)編輯 收藏
    select * from col , user_tab_cols??
    posted @ 2007-07-31 11:39 華夢(mèng)行 閱讀(89) | 評(píng)論 (0)編輯 收藏

    D:\aa>keytool -genkey -v -alias JoeUserKey -keyalg RSA
    輸入keystore密碼:? huamengxing
    您的名字與姓氏是什么?
    ? [Unknown]:? Joe usr
    您的組織單位名稱是什么?
    ? [Unknown]:? security
    您的組織名稱是什么?
    ? [Unknown]:? commmm,Inc
    您所在的城市或區(qū)域名稱是什么?
    ? [Unknown]:? fsdfs
    您所在的州或省份名稱是什么?
    ? [Unknown]:? fsdfsd
    該單位的兩字母國(guó)家代碼是什么
    ? [Unknown]:? cn
    CN=Joe usr, OU=security, O="commmm,Inc", L=fsdfs, ST=fsdfsd, C=cn 正確嗎?
    ? [否]:? y

    創(chuàng)建1,024比特RSA鍵值對(duì)及針對(duì)CN=Joe usr, OU=security, O="commmm,Inc", L=fsdfs, ST
    =fsdfsd, C=cn的自我簽署的認(rèn)證 (MD5WithRSA)
    ??????? :
    輸入<JoeUserKey>的主密碼
    ??????? (如果和 keystore 密碼相同,按回車):
    [正在存儲(chǔ) C:\Documents and Settings\ljl\.keystore]

    D:\aa>keytool -list -v -genkey -alias JooUserKey
    輸入keystore密碼:? huamengxing
    您的名字與姓氏是什么?
    ? [Unknown]:? Joe usr
    您的組織單位名稱是什么?
    ? [Unknown]:? security
    您的組織名稱是什么?
    ? [Unknown]:? commmm,Inc
    您所在的城市或區(qū)域名稱是什么?
    ? [Unknown]:? fadfs
    您所在的州或省份名稱是什么?
    ? [Unknown]:? fsdfsd
    該單位的兩字母國(guó)家代碼是什么
    ? [Unknown]:? cn
    CN=Joe usr, OU=security, O="commmm,Inc", L=fadfs, ST=fsdfsd, C=cn 正確嗎?
    ? [否]:? y

    創(chuàng)建1,024比特DSA鍵值對(duì)及針對(duì)CN=Joe usr, OU=security, O="commmm,Inc", L=fadfs, ST
    =fsdfsd, C=cn的自我簽署的認(rèn)證 (SHA1WithDSA)
    ??????? :
    輸入<JooUserKey>的主密碼
    ??????? (如果和 keystore 密碼相同,按回車):
    [正在存儲(chǔ) C:\Documents and Settings\ljl\.keystore]

    D:\aa>keytool -list -v? -alias JooUserKey
    輸入keystore密碼:? huamengxing
    別名名稱: JooUserKey
    創(chuàng)建日期: 2007-7-30
    輸入類型:KeyEntry
    認(rèn)證鏈長(zhǎng)度: 1
    認(rèn)證 [1]:
    Owner: CN=Joe usr, OU=security, O="commmm,Inc", L=fadfs, ST=fsdfsd, C=cn
    發(fā)照者: CN=Joe usr, OU=security, O="commmm,Inc", L=fadfs, ST=fsdfsd, C=cn
    序號(hào): 46ad82e0
    有效期間: Mon Jul 30 14:19:12 CST 2007 至: Sun Oct 28 14:19:12 CST 2007
    認(rèn)證指紋:
    ???????? MD5:? 88:F5:21:21:2C:65:03:84:60:12:65:55:39:D3:A0:1E
    ???????? SHA1: 37:B6:87:9F:C4:EA:E4:50:9A:F4:00:B3:41:58:C8:F0:10:5E:44:8E

    D:\aa>
     D:\>keytool.exe -genkey -alias Tomcat -keyalg RSA -storepass bigsecret -keypass bigsecret -dname "cn=localhost"

      執(zhí)行完該命令后,就會(huì)在HOME目錄下生成一個(gè).keystore文件。下面是各種切換命令的含義:

      · genkey:告訴keytool應(yīng)用程序生成新的公鑰/私鑰對(duì)。
      · alias:用于引用密鑰的名稱。記住,.keystore文件可包含多個(gè)密鑰。
      · Keyalg:使用RSA算法生成公鑰/私鑰對(duì)。
      · Storepass:訪問(wèn).keystore文件所需的口令。
      · Keypass:管理密鑰所需的口令。
      · dname:該值非常重要。.我使用了localhost,因?yàn)樵撌纠辉O(shè)計(jì)為本地運(yùn)行。如果一個(gè)Web應(yīng)用程序被注冊(cè)為http://www.myserver.com,那么該值就必須是www.myserver.com。如果名稱不匹配,證書就會(huì)自動(dòng)被拒絕。
      一旦keytool應(yīng)用程序創(chuàng)建了一個(gè)新的公鑰/私鑰對(duì),它就自動(dòng)自簽名該密鑰。我們剛剛生成了自己的自簽名證書,它可用于HTTPS通信。只需提取出自簽名公鑰。后面我將展示如何做。

    posted @ 2007-07-30 14:24 華夢(mèng)行 閱讀(1283) | 評(píng)論 (0)編輯 收藏

    public void close()
    ??? {
    ??????? try
    ??????? {
    ???????????? if(rs!=null) rs.close();
    ???????????? if(st!=null) st.close();
    ???????????? if(cn!=null) cn.close();
    ??????? }
    ??????? catch(SQLException _ex)
    ??????? {
    ??????????? try
    ??????????? {
    ??????????????? if(rs != null)?? rs.close();
    ??????????? }
    ??????????? catch(SQLException _ex2)
    ??????????? {
    ??????????????? try
    ??????????????? {
    ??????????????????? if(st != null) st.close();
    ??????????????? }
    ??????????????? catch(SQLException _ex3) {
    ??????????????? }
    ??????????????? try
    ??????????????? {
    ??????????????????? if(cn != null) cn.close();
    ??????????????? }
    ??????????????? catch(SQLException _ex3) {
    ??????????????? }
    ??????????? }

    ??????????? try
    ??????????? {
    ??????????????? if(st != null)? st.close();
    ??????????? }
    ??????????? catch(SQLException _ex2)
    ??????????? {
    ??????????????? try
    ??????????????? {
    ??????????????????? if(cn != null) cn.close();
    ??????????????? }
    ??????????????? catch(SQLException _ex3) {
    ??????????????? }
    ??????????? }
    ??????????? try
    ??????????? {
    ??????????????? if(cn != null)?? cn.close();
    ??????????? }
    ??????????? catch(SQLException _ex2) {
    ??????????? }
    ??????? }
    ??????? finally
    ??????? {
    ????????? try
    ????????? {
    ?????????? // if(rs!=null) rs.close();
    ??????????? if(st!=null) st.close();
    ??????????? if(cn!=null) cn.close();
    ????????? }
    ????????? catch(Exception e)
    ????????? {
    ??????????? //System.out.println(e.toString());
    ????????? }
    ??????? }

    ??? }

    posted @ 2007-07-27 13:56 華夢(mèng)行 閱讀(92) | 評(píng)論 (0)編輯 收藏

    select NVL(b.Name, ' ') AS spec, ' ' as packs,
    '' as Quant,
    '' as Price,

    ?NVL(a.feeamount,0) as amount, ' ' as cpbh,' ' as cpname, ' ' as jidw
    from ITM_Documentfee a? left join
    sys_datadictionary b on b.id=a.feeid????

    union
    select
    NVL(b.Spec, ' ') AS spec,
    NVL(b.field1,' ') as packs,
    case Quant
    ?when 0 then
    ? ' '
    ?when null then
    ? ' '
    ?else
    ?? to_char(Quant)?
    end as Quant
    ,
    case Price
    ?when 0 then
    ? ' '
    ?when null then
    ? ' '
    ?else
    ?? to_char(Price)?
    end as Price
    ,
    ? NVL(b.Amount, 0) AS amount,
    c.SerialNumber as cpbh,NVL(c.EnName, ' ') AS cpname,
    NVL(t.Symbol, ' ') AS jidw
    from ITM_SalesCommodity b
    left join CRM_Commodity c ON c.TypeID = b.CommodityTypeID
    LEFT OUTER JOIN????? BSE_MeasureStyle t ON b.QuantUnitID = t.ID


    select ISNULL(b.Name, ' ') AS spec, ' ' as packs,
    '' as Quant,
    '' as Price,

    ?isnull(a.feeamount,0) as amount, ' ' as cpbh,' ' as cpname, ' ' as jidw
    from ITM_Documentfee a? left join
    sys_datadictionary b on b.id=a.feeid????

    union
    select
    ISNULL(b.Spec, ' ') AS spec,
    isnull(b.field1,' ') as packs,
    Quant =
    case
    ?when Quant>0 then
    ? CAST( Quant AS varchar(20))
    ?else ''
    end
    ,
    Price =
    case
    ?when Price>0 then
    ? CAST( Price AS varchar(20))
    ?else ''
    end
    ,
    ? ISNULL(b.Amount, 0) AS amount,
    c.SerialNumber as cpbh,ISNULL(c.EnName, ' ') AS cpname,
    ISNULL(t.Symbol, ' ') AS jidw
    from ITM_SalesCommodity b
    left join CRM_Commodity c ON c.TypeID = b.CommodityTypeID
    LEFT OUTER JOIN????? BSE_MeasureStyle t ON b.QuantUnitID = t.ID

    posted @ 2007-07-27 13:44 華夢(mèng)行 閱讀(100) | 評(píng)論 (0)編輯 收藏

    using System;
    using System.Data;
    using System.Data.SqlClient;

    namespace com.hua..li
    {
    ?/// <summary>
    ?/// 數(shù)據(jù)庫(kù)操作
    ?/// </summary>
    ?public class pathDB:pathPage
    ?{

    ??override protected void OnInit(EventArgs e)
    ??{
    ???pathInit();
    ???base.OnInit(e);
    ??}

    ??protected void pathInit()
    ??{
    ???this.ConnectDb();
    ??}

    ??protected void ConnectDb()
    ??{
    ???if(doh == null)
    ???{
    ????System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection(System.Configuration.ConfigurationSettings.AppSettings["connString"]);
    ????doh = new com.path.SqlDbOperHandler(conn);
    ???}
    ??}
    ?}
    }
    using System;

    namespace com.hua.li
    ?{
    ??/// <summary>
    ??/// 表示數(shù)據(jù)庫(kù)連接類型。
    ??/// </summary>
    ??public enum DatabaseType:byte{SqlServer,OleDb};
    ??/// <summary>
    ??/// DbOperHandler 的摘要說(shuō)明。
    ??/// </summary>
    ??public abstract class DbOperHandler
    ??{
    ???/// <summary>
    ???/// 析構(gòu)函數(shù),釋放申請(qǐng)的資源。
    ???/// </summary>
    ???~DbOperHandler()
    ???{
    ????conn.Close();
    ???}
    ???/// <summary>
    ???/// 表示數(shù)據(jù)庫(kù)連接的類型,目前支持SqlServer和OLEDB
    ???/// </summary>
    ???protected DatabaseType dbType=DatabaseType.OleDb;
    ???/// <summary>
    ???/// 返回當(dāng)前使用的數(shù)據(jù)庫(kù)連接對(duì)象。
    ???/// </summary>
    ???/// <returns></returns>
    ???public System.Data.IDbConnection GetConnection()
    ???{
    ????return conn;
    ???}
    ???/// <summary>
    ???/// 條件表達(dá)式,用于在數(shù)據(jù)庫(kù)操作時(shí)篩選記錄,通常用于僅需指定表名稱和某列名稱的操作,如GetValue(),Delete()等,支持查詢參數(shù),由AddConditionParameters指定。。
    ???/// </summary>
    ???public string ConditionExpress=string.Empty;
    ???/// <summary>
    ???/// 當(dāng)前的SQL語(yǔ)句。
    ???/// </summary>
    ???public string SqlCmd=string.Empty;
    ???/// <summary>
    ???/// 當(dāng)前操作所涉及的數(shù)據(jù)表名稱。
    ???/// </summary>
    ???protected string tableName=string.Empty;
    ???/// <summary>
    ???/// 當(dāng)前操作所設(shè)計(jì)的字段名稱。
    ???/// </summary>
    ???protected string fieldName=string.Empty;
    ???/// <summary>
    ???/// 當(dāng)前所使用的數(shù)據(jù)庫(kù)連接。
    ???/// </summary>
    ???protected System.Data.IDbConnection conn;
    ???/// <summary>
    ???/// 當(dāng)前所使用的命令對(duì)象。
    ???/// </summary>
    ???protected System.Data.IDbCommand cmd;
    ???/// <summary>
    ???/// 當(dāng)前所使用的數(shù)據(jù)庫(kù)適配器。
    ???/// </summary>
    ???protected System.Data.IDbDataAdapter da;

    ??
    ???/// <summary>
    ???/// 用于存儲(chǔ)字段/值配對(duì)。
    ???/// </summary>
    ???protected System.Collections.ArrayList alFieldItems=new System.Collections.ArrayList(10);
    ???/// <summary>
    ???/// 用于存儲(chǔ)SQL語(yǔ)句中的查詢參數(shù)。
    ???/// </summary>
    ???protected System.Collections.ArrayList alSqlCmdParameters=new System.Collections.ArrayList(5);
    ???/// <summary>
    ???/// 用于存儲(chǔ)條件表達(dá)式中的查詢參數(shù)。
    ???/// </summary>
    ???protected System.Collections.ArrayList alConditionParameters=new System.Collections.ArrayList(5);
    ???/// <summary>
    ???/// 重值該對(duì)象,使之恢復(fù)到構(gòu)造時(shí)的狀態(tài)。
    ???/// </summary>
    ???public void Reset()
    ???{
    ????this.alFieldItems.Clear();
    ????this.alSqlCmdParameters.Clear();
    ????this.alConditionParameters.Clear();
    ????this.ConditionExpress=string.Empty;
    ????this.SqlCmd=string.Empty;
    ????this.cmd.Parameters.Clear();
    ????this.cmd.CommandText=string.Empty;
    ???}
    ???/// <summary>
    ???/// 添加一個(gè)字段/值對(duì)到數(shù)組中。
    ???/// </summary>
    ???/// <param name="_fieldName">字段名稱。</param>
    ???/// <param name="_fieldValue">字段值。</param>
    ???public void AddFieldItem(string _fieldName,object _fieldValue)
    ???{

    ????for(int i=0;i<this.alFieldItems.Count;i++)
    ????{
    ?????if(((DbKeyItem)this.alFieldItems[i]).fieldName==_fieldName)
    ?????{
    ??????throw new ArgumentException("The field name has existed!");
    ?????}
    ????}
    ????this.alFieldItems.Add(new DbKeyItem(_fieldName,_fieldValue));
    ???}
    ???/// <summary>
    ???/// 添加條件表達(dá)式中的查詢參數(shù)到數(shù)組中。注意:當(dāng)數(shù)據(jù)庫(kù)連接為SqlServer時(shí),參數(shù)名稱必須和SQL語(yǔ)句匹配。其它則只需保持添加順序一致,名稱無(wú)需匹配。
    ???/// </summary>
    ???/// <param name="_conditionName">條件名稱。</param>
    ???/// <param name="_conditionValue">條件值。</param>
    ???public void AddConditionParameter(string _conditionName,object _conditionValue)
    ???{
    ????for(int i=0;i<this.alConditionParameters.Count;i++)
    ????{
    ?????if(((DbKeyItem)this.alConditionParameters[i]).fieldName==_conditionName)
    ?????{
    ??????throw new ArgumentException("The condition name has existed!");
    ?????}
    ????}
    ????this.alConditionParameters.Add(new DbKeyItem(_conditionName,_conditionValue));
    ???}

    ???/// <summary>
    ???/// 添加SQL語(yǔ)句中的查詢參數(shù)到數(shù)組中。注意:當(dāng)數(shù)據(jù)庫(kù)連接為SqlServer時(shí),參數(shù)名稱必須和SQL語(yǔ)句匹配。其它則只需保持添加順序一致,名稱無(wú)需匹配。
    ???/// </summary>
    ???/// <param name="_paraName">參數(shù)名稱。</param>
    ???/// <param name="_paraValue">參數(shù)值。</param>
    ???public void AddSqlCmdParameters(string _paraName,object _paraValue)
    ???{
    ????for(int i=0;i<this.alSqlCmdParameters.Count;i++)
    ????{
    ?????if(((DbKeyItem)this.alSqlCmdParameters[i]).fieldName==_paraName)
    ?????{
    ??????throw new ArgumentException("The sqlcmd parameter name has existed!");
    ?????}
    ????}
    ????this.alSqlCmdParameters.Add(new DbKeyItem(_paraName,_paraValue));
    ???}

    ???public bool Exist(string tableName)
    ???{
    ????return this.GetValue(tableName,"count(*)").ToString()!="0";
    ???}
    ???/// <summary>
    ???/// 抽象函數(shù)。用于產(chǎn)生Command對(duì)象所需的參數(shù)。
    ???/// </summary>
    ???protected abstract void GenParameters();
    ???/// <summary>
    ???/// 根據(jù)當(dāng)前alFieldItem數(shù)組中存儲(chǔ)的字段/值向指定表中添加一條數(shù)據(jù)。在該表無(wú)觸發(fā)器的情況下返回添加數(shù)據(jù)所獲得的自動(dòng)增長(zhǎng)id值。
    ???/// </summary>
    ???/// <param name="_tableName">要插入數(shù)據(jù)的表名稱。</param>
    ???/// <returns>返回本數(shù)據(jù)連接上產(chǎn)生的最后一個(gè)自動(dòng)增長(zhǎng)id值。</returns>
    ???public int Insert(string _tableName)
    ???{
    ???
    ????this.tableName=_tableName;
    ????this.fieldName=string.Empty;
    ????this.SqlCmd="insert into "+this.tableName+"(";
    ????string tempValues=" values(";
    ????for(int i=0;i<this.alFieldItems.Count-1;i++)
    ????{
    ?????this.SqlCmd+=((DbKeyItem)alFieldItems[i]).fieldName;
    ?????this.SqlCmd+=",";

    ?????tempValues+="@para";
    ?????tempValues+=i.ToString();

    ?????tempValues+=",";
    ????}
    ????this.SqlCmd+=((DbKeyItem)alFieldItems[alFieldItems.Count-1]).fieldName;
    ????this.SqlCmd+=") ";

    ????tempValues+="@para";
    ????tempValues+=(alFieldItems.Count-1).ToString();

    ????tempValues+=")";
    ????this.SqlCmd+=tempValues;
    ????this.cmd.CommandText=this.SqlCmd;
    ????this.GenParameters();
    ????cmd.ExecuteNonQuery();
    ????cmd.CommandText="select @@identity as id";
    ????int autoId=Convert.ToInt32(cmd.ExecuteScalar());
    ????return autoId;
    ???}

    ???/// <summary>
    ???/// 根據(jù)當(dāng)前alFieldItem數(shù)組中存儲(chǔ)的字段/值和條件表達(dá)式所指定的條件來(lái)更新數(shù)據(jù)庫(kù)中的記錄,返回所影響的行數(shù)。
    ???/// </summary>
    ???/// <param name="_tableName">要更新的數(shù)據(jù)表名稱。</param>
    ???/// <returns>返回此次操作所影響的數(shù)據(jù)行數(shù)。</returns>
    ???public int Update(string _tableName)
    ???{
    ????this.tableName=_tableName;
    ????this.fieldName=string.Empty;
    ????this.SqlCmd="update "+this.tableName+" set ";
    ????for(int i=0;i<this.alFieldItems.Count-1;i++)
    ????{
    ?????this.SqlCmd+=((DbKeyItem)alFieldItems[i]).fieldName;
    ?????this.SqlCmd+="=";

    ?????this.SqlCmd+="@para";
    ?????this.SqlCmd+=i.ToString();

    ?????this.SqlCmd+=",";
    ????}
    ????this.SqlCmd+=((DbKeyItem)alFieldItems[alFieldItems.Count-1]).fieldName;
    ????this.SqlCmd+="=";

    ????this.SqlCmd+="@para";
    ????this.SqlCmd+=(alFieldItems.Count-1).ToString();


    ????if(this.ConditionExpress!=string.Empty)
    ????{
    ?????this.SqlCmd=this.SqlCmd+" where "+this.ConditionExpress;
    ????}
    ????this.cmd.CommandText=this.SqlCmd;
    ????this.GenParameters();
    ????int effectedLines=this.cmd.ExecuteNonQuery();
    ????return effectedLines;
    ???}

    ???/// <summary>
    ???/// 執(zhí)行SqlCmd中的SQL語(yǔ)句,參數(shù)由AddSqlCmdParameters指定,與ConditionExpress無(wú)關(guān)。
    ???/// </summary>
    ???/// <returns>返回此次操作所影響的數(shù)據(jù)行數(shù)。</returns>
    ???public int ExecuteSqlNonQuery()
    ???{
    ????this.cmd.CommandText=this.SqlCmd;
    ????this.GenParameters();
    ????return cmd.ExecuteNonQuery();
    ???}
    ???/// <summary>
    ???/// 獲取指定表,指定列,指定條件的第一個(gè)符合條件的值。
    ???/// </summary>
    ???/// <param name="_tableName">表名稱。</param>
    ???/// <param name="_fieldName">字段名稱。</param>
    ???/// <returns>獲取的值。如果為空則返回null。</returns>
    ???public object GetValue(string _tableName,string _fieldName)
    ???{
    ????this.tableName=_tableName;
    ????this.fieldName=_fieldName;
    ????this.SqlCmd="select "+this.fieldName+" from "+this.tableName;
    ????if(this.ConditionExpress!=string.Empty)
    ????{
    ?????this.SqlCmd=this.SqlCmd+" where "+this.ConditionExpress;
    ????}
    ????this.cmd.CommandText=this.SqlCmd;
    ????this.GenParameters();
    ????return cmd.ExecuteScalar();
    ???}
    ???/// <summary>
    ???/// 根據(jù)當(dāng)前指定的SqlCmd獲取DataTable。如果ConditionExpress不為空則會(huì)將其清空,所以條件表達(dá)式需要包含在SqlCmd中。
    ???/// </summary>
    ???/// <returns>返回查詢結(jié)果DataTable。</returns>
    ???public System.Data.DataTable GetDataTable()
    ???{
    ????System.Data.DataSet ds=this.GetDataSet();
    ????return ds.Tables[0];
    ???}
    ???/// <summary>
    ???/// 根據(jù)當(dāng)前指定的SqlCmd獲取DataSet。如果ConditionExpress不為空則會(huì)將其清空,所以條件表達(dá)式需要包含在SqlCmd中。
    ???/// </summary>
    ???/// <returns>返回查詢結(jié)果DataSet。</returns>
    ???public System.Data.DataSet GetDataSet()
    ???{
    ????this.alConditionParameters.Clear();
    ????this.ConditionExpress=string.Empty;
    ????this.cmd.CommandText=this.SqlCmd;
    ????this.GenParameters();
    ????System.Data.DataSet ds=new System.Data.DataSet();
    ????this.da.SelectCommand=this.cmd;
    ????this.da.Fill(ds);
    ????return ds;
    ???}
    ???/// <summary>
    ???/// 對(duì)指定表,指定字段執(zhí)行加一計(jì)數(shù),返回計(jì)數(shù)后的值。條件由ConditionExpress指定。
    ???/// </summary>
    ???/// <param name="_tableName">表名稱。</param>
    ???/// <param name="_fieldName">字段名稱。</param>
    ???/// <returns>返回計(jì)數(shù)后的值。</returns>
    ???public int Count(string _tableName,string _fieldName)
    ???{
    ????this.tableName=_tableName;
    ????this.fieldName=_fieldName;
    ????int count=Convert.ToInt32(this.GetValue(this.tableName,this.fieldName));
    ????count++;
    ????this.cmd.Parameters.Clear();
    ????this.cmd.CommandText=string.Empty;
    ????this.AddFieldItem(_fieldName,count);
    ????this.Update(this.tableName);
    ????return count;
    ???}

    ???/// <summary>
    ???/// 對(duì)指定表,指定字段執(zhí)行減一計(jì)數(shù),返回計(jì)數(shù)后的值。條件由ConditionExpress指定。
    ???/// </summary>
    ???/// <param name="_tableName">表名稱。</param>
    ???/// <param name="_fieldName">字段名稱。</param>
    ???/// <returns>返回計(jì)數(shù)后的值。</returns>
    ???public int Substract(string _tableName,string _fieldName)
    ???{
    ????this.tableName=_tableName;
    ????this.fieldName=_fieldName;
    ????int count=Convert.ToInt32(this.GetValue(this.tableName,this.fieldName));
    ????if(count>0)count--;
    ????this.cmd.Parameters.Clear();
    ????this.cmd.CommandText=string.Empty;
    ????this.AddFieldItem(_fieldName,count);
    ????this.Update(this.tableName);
    ????return count;
    ???}

    ???/// <summary>
    ???/// 根據(jù)ConditionExpress指定的條件在指定表中刪除記錄。返回刪除的記錄數(shù)。
    ???/// </summary>
    ???/// <param name="_tableName">指定的表名稱。</param>
    ???/// <returns>返回刪除的記錄數(shù)。</returns>
    ???public int Delete(string _tableName)
    ???{
    ????this.tableName=_tableName;
    ????this.SqlCmd="delete from "+this.tableName;
    ????if(this.ConditionExpress!=string.Empty)
    ????{
    ?????this.SqlCmd=this.SqlCmd+" where "+this.ConditionExpress;
    ????}
    ????this.cmd.CommandText=this.SqlCmd;
    ????this.GenParameters();
    ????return cmd.ExecuteNonQuery();
    ???}
    ??????????? /// <summary>
    ??????????? /// 函數(shù)sendMsg需要 __Receive接受者 如果是系統(tǒng)則為 admin 否則為手機(jī)號(hào)碼
    ??????????? /// </summary>
    ??????????? /// <param name="_PHONE">手機(jī)號(hào)碼</param>
    ??????????? /// <param name="_KeyWorld">關(guān)鍵字</param>
    ??????????? /// <param name="_INFO">信息的基本內(nèi)容</param>
    ??????????? /// <param name="_Receive">接受者</param>
    ??????????? /// <returns></returns>
    ??????????? public bool SendMsg(string _PHONE, string _KeyWorld, string _INFO, string _Receive)
    ??????????? {
    ??????????????? bool SendOk;
    ??????????????? if (_PHONE != null || _KeyWorld != null)
    ??????????????? {
    ??????????????????? this.Reset();
    ??????????????????? this.AddFieldItem("PHONE", _PHONE);
    ??????????????????? this.AddFieldItem("KeyWorld", _KeyWorld);
    ??????????????????? this.AddFieldItem("INFO", _INFO);
    ??????????????????? this.AddFieldItem("Receive", _Receive);
    ??????????????????? this.Insert("smsRawRecv").ToString();
    ??????????????????? SendOk = true;
    ??????????????? }
    ??????????????? else
    ??????????????? {
    ??????????????????? SendOk = false;
    ???????????????????
    ??????????????? }
    ??????????????? return SendOk;
    ??????????? }
    ??????????? /// <summary>
    ??????????? ///
    ??????????? /// </summary>
    ??????????? /// <param name="_PHONE"></param>
    ??????????? /// <param name="_KeyWorld"></param>
    ??????????? /// <param name="_INFO"></param>
    ??????????? /// <param name="_Receive"></param>
    ??????????? /// <returns></returns>
    ???????????? //public bool Received(string _PHONE, string _KeyWorld, string _INFO, string _Receive)
    ???????????? //{
    ???????????? //??? bool Received, SendOk;
    ???????????? //??? if (SendOk)
    ???????????? //??? {
    ???????????? //??????? if (_PHONE != null || _KeyWorld != null)
    ???????????? //??????? {
    ???????????? //??????????? this.Reset();
    ???????????? //??????????? this.AddFieldItem("PHONE", _PHONE);
    ???????????? //??????????? this.AddFieldItem("KeyWorld", _KeyWorld);
    ???????????? //??????????? this.AddFieldItem("INFO", _INFO);
    ???????????? //??????????? this.AddFieldItem("Receive", _Receive);
    ???????????? //??????????? this.Insert("smsSended").ToString();
    ???????????? //??????????? Received = true;
    ???????????? //??????? }
    ???????????? //??????? else
    ???????????? //??????? {
    ???????????? //??????????? Received = false;
    ???????????? //??????? }
    ???????????? //??? }
    ???????????? //??? else
    ???????????? //??? {
    ???????????? //??????? Received = false;
    ???????????? //??? }
    ???????????? //}
    ???/// <summary>
    ???/// 審核函數(shù)。將指定表,指定字段的值進(jìn)行翻轉(zhuǎn),如:1->0或0->1。條件由ConditionExpress指定。
    ???/// </summary>
    ???/// <param name="_tableName">表名稱。</param>
    ???/// <param name="_fieldName">字段名稱。</param>
    ???/// <returns>返回影響的行數(shù)。</returns>
    ???public int Audit(string _tableName,string _fieldName)
    ???{
    ????this.tableName=_tableName;
    ????this.fieldName=_fieldName;
    ????this.SqlCmd="update "+this.tableName+" set "+this.fieldName+"=1-"+this.fieldName;
    ????if(this.ConditionExpress!=string.Empty)
    ????{
    ?????this.SqlCmd=this.SqlCmd+" where "+this.ConditionExpress;
    ????}
    ????this.cmd.CommandText=this.SqlCmd;
    ????this.GenParameters();
    ????return cmd.ExecuteNonQuery();
    ???}

    ???/// <summary>
    ???/// 釋放資源
    ???/// </summary>
    ???public void Dispose()
    ???{
    ????conn.Close();
    ???}
    ??
    ??}

    ??/// <summary>
    ??/// 數(shù)據(jù)表中的字段屬性,包括字段名,字段值。
    ??/// 常用于保存要提交的數(shù)據(jù)。
    ??/// </summary>
    ??public class DbKeyItem
    ??{
    ???/// <summary>
    ???/// 構(gòu)造函數(shù)。
    ???/// </summary>
    ???/// <param name="_fieldName">字段名稱。</param>
    ???/// <param name="_fieldValue">字段值。</param>
    ???public DbKeyItem(string _fieldName,object _fieldValue)
    ???{
    ????this.fieldName=_fieldName;
    ????this.fieldValue=_fieldValue.ToString();
    ???}
    ???/// <summary>
    ???/// 字段名稱。
    ???/// </summary>
    ???public string fieldName;
    ???/// <summary>
    ???/// 字段值。
    ???/// </summary>
    ???public string fieldValue;
    ??}
    ?}

    posted @ 2007-07-27 11:09 華夢(mèng)行 閱讀(335) | 評(píng)論 (0)編輯 收藏
    用了這么久的PHP,今天才知道原來(lái)PHP對(duì)函數(shù)名、類名大小寫不敏感。我一直都以為是跟變量名一樣大小寫敏感的。爆汗一下!!!,今天才發(fā)現(xiàn)PHP原來(lái)對(duì)函數(shù)名類名大小寫不敏感

    NULL 類型只有一個(gè)值,就是大小寫敏感的關(guān)鍵字 NULL
    posted @ 2007-07-25 16:10 華夢(mèng)行 閱讀(282) | 評(píng)論 (0)編輯 收藏
    端口沖突問(wèn)題,開(kāi)機(jī)后便宣布某個(gè)端口歸某個(gè)應(yīng)用程序所有
    posted @ 2007-07-25 15:55 華夢(mèng)行 閱讀(94) | 評(píng)論 (0)編輯 收藏

    1下載 apatche http server,下php 安裝程序,?
    2. 設(shè)置環(huán)境變量, class pass? php安裝路徑
    3. 設(shè)置apatche的根路徑 doc_root ="C:\Program Files\Apache Software Foundation\Apache2.2\htdocs"

    posted @ 2007-07-25 15:54 華夢(mèng)行 閱讀(100) | 評(píng)論 (0)編輯 收藏
    僅列出標(biāo)題
    共15頁(yè): First 上一頁(yè) 7 8 9 10 11 12 13 14 15 下一頁(yè) 
    主站蜘蛛池模板: 一区二区三区视频免费观看| 亚洲视频在线观看2018| 污视频网站免费在线观看| 在线观看免费宅男视频| 中文有码亚洲制服av片| 最近免费中文字幕视频高清在线看| 亚洲视频在线免费看| 亚洲免费电影网站| 亚洲欧洲另类春色校园网站| 四虎永久在线观看免费网站网址| 亚洲制服丝袜精品久久| 在线看片免费不卡人成视频| 亚洲熟妇av午夜无码不卡| 日本媚薬痉挛在线观看免费| 国产亚洲精品美女久久久久 | 黄人成a动漫片免费网站| 亚洲欧洲精品成人久久奇米网| 中文字幕无线码中文字幕免费| 亚洲爆乳无码一区二区三区| 一区二区在线免费观看| 国产成人精品亚洲2020| 又大又黄又粗又爽的免费视频| 日本高清免费中文在线看 | 456亚洲人成影院在线观| 夜夜嘿视频免费看| 窝窝影视午夜看片免费| 亚洲国产精品久久久久婷婷软件 | 亚洲欧美日韩综合久久久| 免费又黄又爽的视频| 国产又黄又爽又大的免费视频 | 成年人网站免费视频| 日本亚洲高清乱码中文在线观看| 亚洲欧洲日产国码高潮αv| 久久免费观看国产精品88av| 亚洲人成电影网站| 亚洲一区无码精品色| 日本免费xxxx| 久久国产精品免费| 亚洲精品免费网站| 亚洲色无码专区在线观看| 无码国产精品一区二区免费|