2009年7月10日

          FLEX BUILDER 在運(yùn)行測(cè)試的時(shí)候老是報(bào)錯(cuò)(flash player not found) 或者彈出一個(gè)命令行編輯器的解決辦法

          1,如果你使用的是firefox作為默認(rèn)瀏覽器,到C:\WINDOWS\system32\Macromed\Flash 拷貝NPSWF32.dll到 firefox的plugins文件夾里
          2.window - perferences -general - web browser -選中firefox或者IE 千萬(wàn)別選"default system web browser"

          posted @ 2009-09-10 01:12 star11th 閱讀(625) | 評(píng)論 (0)編輯 收藏

          微軟提供的自動(dòng)關(guān)機(jī)軟件

          shutdown.exe
          直接 點(diǎn) "開(kāi)始"===>"運(yùn)行"
          在框里輸入:
          1.你要在00:00關(guān)機(jī) 就輸入(不含冒號(hào)): "at 00:00 Shutdown -s"
          2.你要在一小時(shí)后關(guān)機(jī),輸入(不含冒號(hào)): "Shutdown.exe -s -t 3600"
          3.設(shè)置錯(cuò)了,你要取消: "shutdown -a"

          -t 倒計(jì)時(shí)時(shí)間
          -s 關(guān)機(jī)
          -a 停止關(guān)機(jī)
          -c 設(shè)置提示信息

          注意:在XP下測(cè)試通過(guò)

          posted @ 2009-07-17 19:15 star11th 閱讀(155) | 評(píng)論 (0)編輯 收藏

          json的使用入門

           JSON采用完全獨(dú)立于語(yǔ)言的文本格式,易于人閱讀和編寫,同時(shí)也易于機(jī)器解析和生成。所以是數(shù)據(jù)中轉(zhuǎn)與傳輸?shù)膬?yōu)選。下面就是經(jīng)常用到的一些特性。本文所指都是json-lib的用法
          1.json--->List<YOUR_CLASS>
           
           1       List<YOUR_CLASS> list=new ArrayList<YOUR_CLASS>(); 
                        JSONArray jsonArray = JSONArray.fromObject(fmsStr);
           2        JsonConfig jc=new JsonConfig();
           3        jc.setRootClass(YOUR_CLASS.class);
           4        jc.setArrayMode(JsonConfig.MODE_OBJECT_ARRAY);
           5        int i=1;
           6        YOUR_CLASS[] oArray=(YOUR_CLASS[]) JSONArray.toArray(jsonArray, jc);
           7        for(YOUR_CLASSfms : oArray){
           8            list.add(fms);
           9        }

          2.json-->YOUR_CLASS
          1        JSONObject json=JSONObject.fromObject(fmsStr);
          2        FMS fms=(FMS)JSONObject.toBean(json, FMS.class);
          3.json--> bean轉(zhuǎn)換日期格式
          1           JSONObject json=JSONObject.fromObject(fmsStr);
          2       String[] dateFormats = new String[]  {"yyyy-MM-dd"};
          3          JSONUtils.getMorpherRegistry().registerMorpher(new DateMorpher(dateFormats));
          4          FMS fms=(FMS)JSONObject.toBean(json, FMS.class);
          5
          6其中fms有一個(gè)屬性day:1991-12-2
          4.json-->bean過(guò)濾一些不需要或json字符串中沒(méi)有賦值的項(xiàng)使用JSONConfig
                  JSONArray jsonArray = JSONArray.fromObject([{a:"astr",b:"bstr",c:"cstr",d:"dstr"},{a:"astr1",b:"bstr1",c:"cstr1",d:"dstr1"}]);
                  JsonConfig jc
          =new JsonConfig();
                  jc.setRootClass(FMS.
          class);
                  String[] dateFormats 
          = new String[] {"yyyy-MM-dd"};
                  JSONUtils.getMorpherRegistry().registerMorpher(
          new DateMorpher(dateFormats));
                  jc.setArrayMode(JsonConfig.MODE_OBJECT_ARRAY);
                  jc.setJsonPropertyFilter(
          new PropertyFilter(){
                      
          public boolean apply(Object sourse, String name, Object value) {
                          
          if(name.equals("a")||name.equals("b")||name.equals("c")||name.equals("d")){
                              
          return true;
                          }

                          
          else{
                              
          return false;
                          }

                      }

                      
                  }
          );
                  FMS[] oArray
          =(FMS[]) JSONArray.toArray(jsonArray, jc);


          FMS
          -->有 a b c d 屬性



          posted @ 2009-07-10 14:18 star11th 閱讀(715) | 評(píng)論 (0)編輯 收藏

          <2009年7月>
          2829301234
          567891011
          12131415161718
          19202122232425
          2627282930311
          2345678

          導(dǎo)航

          統(tǒng)計(jì)

          常用鏈接

          留言簿

          隨筆分類

          隨筆檔案

          搜索

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          主站蜘蛛池模板: 中牟县| 响水县| 邯郸县| 明溪县| 雷州市| 淮南市| 中方县| 安塞县| 射洪县| 黄骅市| 河津市| 交城县| 集贤县| 东乡族自治县| 嘉义市| 克山县| 静宁县| 重庆市| 肇州县| 大理市| 克东县| 资阳市| 专栏| 灌阳县| 昌江| 永春县| 从化市| 澄城县| 定州市| 抚松县| 卢湾区| 滁州市| 休宁县| 石台县| 饶河县| 扎兰屯市| 柳林县| 大理市| 封开县| 吉首市| 望江县|