随笔 - 25, 文章 - 1, 评论 - 0, 引用 - 0
数据加载中……

2010年5月24日

批处理_获取当前时间_BAT

set d=%date:~0,10%
set d=%d:-=%
set d=%d: =0%
set t=%time:~0,8%
set t=%t::=%
set t=%t: =0%
echo 
"%p%%d%%t%"
pause

posted @ 2011-05-03 18:29 至尊贝贝 阅读(1849) | 评论 (0)编辑 收藏

[Java]-[截图]-[获取屏幕某点的RGB]-[代码]

    public static String getHexRGB(int x, int y, Robot robot) {
        
if (robot == null)
            
return "null";
        Dimension dimension 
= Toolkit.getDefaultToolkit().getScreenSize();
        BufferedImage bi 
= robot.createScreenCapture(new Rectangle(00,
                dimension.width, dimension.height));
        
return Integer.toHexString(16777216 + bi.getRGB(x, y));
    }

posted @ 2010-10-29 09:49 至尊贝贝 阅读(343) | 评论 (0)编辑 收藏

[FlashPlayer]-[release]-[离线安装程序]

http://get.adobe.com/cn/flashplayer/otherversions/

posted @ 2010-09-28 16:23 至尊贝贝 阅读(314) | 评论 (0)编辑 收藏

XP系统自动登陆

注册表:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winlogon
DefaultUserName 值 为要登陆的用户名: 
DefaultPassword 为你的密码:
AutoAdminLogon 值为1

posted @ 2010-09-28 07:55 至尊贝贝 阅读(192) | 评论 (0)编辑 收藏

[chrome][symantec]冲突解决办法

修改注册表 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SysPlant下"Start" DWORD的值为"4"

posted @ 2010-09-26 09:00 至尊贝贝 阅读(458) | 评论 (0)编辑 收藏

[20100822]-[Flex]-[ACTIONSCRIPT]-[数组的深复制]

import flash.utils.ByteArray; 
 
function clone(source:Object):* 

    var myBA:ByteArray 
= new ByteArray(); 
    myBA.writeObject(source); 
    myBA.position 
= 0
    return(myBA.readObject()); 
}

posted @ 2010-08-22 21:37 至尊贝贝 阅读(170) | 评论 (0)编辑 收藏

[Java]-[Enum]-[DBTYPE]

    enum DatabaseProduct {
        ACCESS,
        UNKNOWN,
        DERBY,
        DB2_OLD_AS400,
        DB2_AS400,
        DB2,
        FIREBIRD,
        GREENPLUM,
        HSQLDB,
        INFORMIX,
        INFOBRIGHT,
        INGRES,
        INTERBASE,
        LUCIDDB,
        MSSQL,
        NETEZZA,
        NEOVIEW,
        ORACLE,
        POSTGRESQL,
        MYSQL,
        SQLSTREAM,
        SYBASE,
        TERADATA,
        VERTICA;

        
/**
         * Return the root of the family of products this database product
         * belongs to.
         *
         * <p>For {
@link #DB2_AS400} and {@link #DB2_OLD_AS400} returns
         * {
@link #DB2}; for all other database products, returns the same
         * product.
         *
         * 
@return root of family of database products
         
*/
        
public DatabaseProduct getFamily() {
            
switch (this) {
            
case DB2_OLD_AS400:
            
case DB2_AS400:
                
return DB2;
            
default:
                
return this;
            }
        }
    }

posted @ 2010-07-26 15:15 至尊贝贝 阅读(197) | 评论 (0)编辑 收藏

[20100531]-[BIEE]-[BAT]-[开启和停止BIEE服务]

net stop "sawjavahostsvc"
net stop 
"sawsvc"
net stop 
"Oracle BI Server"

echo 即将开启OracleBiee服务
pause
net start 
"sawjavahostsvc"
net start 
"sawsvc"
net start 
"Oracle BI Server"

posted @ 2010-05-31 17:24 至尊贝贝 阅读(221) | 评论 (0)编辑 收藏

[20100531]-[Javascript]-[IE判断是否网页元素加载完毕]

function document.onreadystatechange()
{

if (document.readyState=="complete"{
    change11();
   }

}

function change11(){
    
    
var year11= (new Date()).getFullYear();
    
    
var targetdiv1 = document.getElementById('idResultsTableParent');
    
var targettable1 = targetdiv1.firstChild;
    targettable1.rows(
0).cells(2).innerHTML=(year11-1)+'年次均费用';
    targettable1.rows(
0).cells(3).innerHTML=(year11-2)+'年次均费用';
    targettable1.rows(
0).cells(4).innerHTML=(year11-3)+'年次均费用';
    targettable1.rows(
0).cells(5).innerHTML=(year11-4)+'年次均费用';
    targettable1.rows(
0).cells(6).innerHTML=(year11-1)+'年同比';
    targettable1.rows(
0).cells(7).innerHTML=(year11-2)+'年同比';
    targettable1.rows(
0).cells(8).innerHTML=(year11-3)+'年同比';
}

只对IE有效

posted @ 2010-05-31 17:17 至尊贝贝 阅读(501) | 评论 (0)编辑 收藏

[20100524]-[Flex4]-[素材颜色]-[一组简单的CHARTS颜色填充]

 

                <mx:fills>

                    
<fx:Array>
                        
<s:RadialGradient>
                            
<s:entries>
                                
<fx:Array>
                                    
<mx:GradientEntry color="#7fe137"
                                                      ratio
="0.3"/>
                                    
<mx:GradientEntry color="#59ab1d"
                                                      ratio
="0.8"/>
                                
</fx:Array>
                            
</s:entries>
                        
</s:RadialGradient>
                        
<s:RadialGradient>
                            
<s:entries>
                                
<fx:Array>
                                    
<mx:GradientEntry color="#249fdf"
                                                      ratio
="0.3"/>
                                    
<mx:GradientEntry color="#1c81b5"
                                                      ratio
="0.8"/>
                                
</fx:Array>
                            
</s:entries>
                        
</s:RadialGradient>
                        
<s:RadialGradient>
                            
<s:entries>
                                
<fx:Array>
                                    
<mx:GradientEntry color="#b222e1"
                                                      ratio
="0.3"/>
                                    
<mx:GradientEntry color="#931cba"
                                                      ratio
="0.8"/>
                                
</fx:Array>
                            
</s:entries>
                        
</s:RadialGradient>
                        
<s:RadialGradient>
                            
<s:entries>
                                
<fx:Array>
                                    
<mx:GradientEntry color="#d21e5a"
                                                      ratio
="0.3"/>
                                    
<mx:GradientEntry color="#a11845"
                                                      ratio
="0.8"/>
                                
</fx:Array>
                            
</s:entries>
                        
</s:RadialGradient>
                        
<s:RadialGradient>
                            
<s:entries>
                                
<fx:Array>
                                    
<s:GradientEntry color="#ccd71f"
                                                     ratio
="0.3"/>
                                    
<s:GradientEntry color="#9ea617"
                                                     ratio
="0.8"/>
                                
</fx:Array>
                            
</s:entries>
                        
</s:RadialGradient>
                    
</fx:Array>
                
</mx:fills>

posted @ 2010-05-24 01:45 至尊贝贝 阅读(285) | 评论 (0)编辑 收藏

[20100524]-[素材]-[颜色]-[一组简单颜色]-[FusionChart使用]

    private static String[] COLOR = "'AFD8F8'""'F6BD0F'""'8BBA00'",
            
"'FF8E46'""'008E8E'""'D64646'""'8E468E'""'588526'",
            
"'B3AA00'""'008ED6'""'9D080D'""'A186BE'" }
;

posted @ 2010-05-24 01:31 至尊贝贝 阅读(180) | 评论 (0)编辑 收藏

[Flex4]-[20100524]-[文件上传]

需要用到的Flex原生态对象

1.FileReferenceList

2.FileReference

3.URLRequest

4.URLVariables


封装对象:
CURL

参考代码:


private var files:FileReferenceList=new FileReferenceList;
files.addEventListener(Event.SELECT, onSelectFiles);
files.browse([
new FileFilter("图片""*.jpg;*.gif;*.png""bmp")]);

protected function onSelectFiles(event:Event):void
{

    
for each (var f:FileReference in files.fileList)
    
{

        var fileItem:Object
=new Object;
        fileItem.file
=f;
        fileItem.name
="NoName";
        fileItem.typeid
=11;
        fileItem.filename
=f.name;
        selectFiles.addItem(fileItem);
    }


}

protected function uploadI_clickHandler(event:MouseEvent):void
{
        
if (selectFiles.length > 0)
        
{

            var item:Object
=selectFiles.removeItemAt(0);

            var curl:CURL
=new CURL;
            curl.url
="UploadImageServlet";
            curl.setData(
"name", item.name);
            curl.setData(
"type", item.typeid);
            curl.setData(
"imagedesc", item.imagedesc);
            var file:FileReference
=item.file as FileReference;
            
if (file != null)
            
{
                file.addEventListener(Event.COMPLETE, onFileUploadComplete);
                file.upload(curl.urlRequest);
            }


        }

        
}

    
protected function onFileUploadComplete(event:Event):void
{
    var f:FileReference
=event.currentTarget as FileReference;
    f.removeEventListener(Event.COMPLETE, onFileUploadComplete);
    uploadI_clickHandler(
null);
}

posted @ 2010-05-24 01:28 至尊贝贝 阅读(604) | 评论 (0)编辑 收藏

[Flex]-[20100524]-[Stream]-[从服务端读取图片]

Flex 如何从服务端读取流信息
参考解决一,从服务端读取Bitmap数据

使用的原生态对象
1 URLStream
2 URLRequest
3 URLVariables  

封装对象:
CURL

源码如下:

package incisive.framework.c.factory
{
 import flash.net.URLRequest;
 import flash.net.URLVariables;

 
public class CURL
 
{

  
public static const urlbase:String="http://localhost:8080/bss/";
  
private var _urlRequest:URLRequest=new URLRequest;
  
private var _url:String;
  
private var vars:URLVariables=new URLVariables;

  
public function CURL(u:String=null)
  
{
   
if (u != null)
   
{
    _urlRequest
=new URLRequest(urlbase + u);
   }

  }


 

  
public function get urlRequest():URLRequest
  
{
   
if (_urlRequest != null)
    _urlRequest.data
=vars;
   
return _urlRequest;
  }


  
public function get url():String
  
{
   
return _url;
  }


  
public function set url(value:String):void
  
{
   _url
=value;
   _urlRequest
=new URLRequest(urlbase + value);
  }


  
public function setData(key:String, value:String, encode:Boolean=false):void
  
{
   
if (encode)
   
{
    vars[key]
=encodeURI(value);
   }

   
else
    vars[key]
=value;

  }

 }

}


 


Stream 如何如下:

 curl:CURL = new CURL;
 curl.url 
= u;
 var imageStream:URLStream
=new URLStream;
 imageStream.load(curl.urlRequest);


posted @ 2010-05-24 01:21 至尊贝贝 阅读(488) | 评论 (0)编辑 收藏