Dict.CN 在线词典, 英语学习, 在线翻译
随笔-179  评论-145  文章-1  trackbacks-1
  2007年11月22日
     摘要: 我的天!  阅读全文
posted @ 2008-07-25 17:40 Robot·H 阅读(29) | 评论 (0)编辑
     摘要: 唇亡齿寒否?  阅读全文
posted @ 2008-07-25 14:15 Robot·H 阅读(107) | 评论 (2)编辑

卓越网: http://www.amazon.cn/
淘宝网: http://taobao.com
当当网: http://home.dangdang.com/
京东  : http://www.360buy.com/
拍拍  : http://www.paipai.com/
易趣  : http://www.eachnet.com/

垂直网站:...

posted @ 2008-07-25 11:41 Robot·H 阅读(21) | 评论 (3)编辑
     摘要: sns网站列表  阅读全文
posted @ 2008-07-25 11:30 Robot·H 阅读(76) | 评论 (0)编辑
     摘要: 马云的策略1-开发自己的平台  阅读全文
posted @ 2008-07-25 10:47 Robot·H 阅读(76) | 评论 (0)编辑
     摘要: 专家教你理财  阅读全文
posted @ 2008-07-25 09:50 Robot·H 阅读(49) | 评论 (0)编辑
     摘要: 不错的Enterprise Library系列!   阅读全文
posted @ 2008-07-24 16:43 Robot·H 阅读(72) | 评论 (0)编辑
     摘要: Enterprise library  阅读全文
posted @ 2008-07-24 16:24 Robot·H 阅读(6) | 评论 (0)编辑
     摘要:   阅读全文
posted @ 2008-07-23 14:22 Robot·H 阅读(58) | 评论 (0)编辑
     摘要:   阅读全文
posted @ 2008-07-23 13:54 Robot·H 阅读(106) | 评论 (4)编辑
     摘要:   阅读全文
posted @ 2008-07-22 08:57 Robot·H 阅读(13) | 评论 (0)编辑
     摘要: o(∩_∩)o...  阅读全文
posted @ 2008-07-21 17:52 Robot·H 阅读(87) | 评论 (0)编辑
     摘要: 看看吧。   阅读全文
posted @ 2008-07-21 16:59 Robot·H 阅读(196) | 评论 (2)编辑
     摘要: 都是浏览器惹得祸。  阅读全文
posted @ 2008-07-21 16:12 Robot·H 阅读(20) | 评论 (0)编辑
     摘要:   阅读全文
posted @ 2008-07-18 16:48 Robot·H 阅读(49) | 评论 (0)编辑
     摘要: 生活真他妈的难  阅读全文
posted @ 2008-07-18 13:29 Robot·H 阅读(97) | 评论 (2)编辑
     摘要: 你会字符换行吗?  阅读全文
posted @ 2008-07-15 17:32 Robot·H 阅读(64) | 评论 (0)编辑
     摘要: Reader啊!  阅读全文
posted @ 2008-07-09 18:31 Robot·H 阅读(180) | 评论 (0)编辑
     摘要: 看看涵盖那些设计模式。。。。
  阅读全文
posted @ 2008-07-04 22:12 Robot·H 阅读(520) | 评论 (18)编辑
     摘要: 你的MSMQ Run 了吗?  阅读全文
posted @ 2008-07-04 16:48 Robot·H 阅读(139) | 评论 (1)编辑
     摘要: 不错的e文!想了解连接池的可以看看。
  阅读全文
posted @ 2008-07-04 10:41 Robot·H 阅读(108) | 评论 (0)编辑
     摘要: 不错js日历控件!  阅读全文
posted @ 2008-07-02 14:16 Robot·H 阅读(138) | 评论 (0)编辑
     摘要: 我已困惑已久!  阅读全文
posted @ 2008-07-01 17:31 Robot·H 阅读(144) | 评论 (2)编辑
     摘要: 大家经常会出现这样的情况!  阅读全文
posted @ 2008-06-30 08:44 Robot·H 阅读(220) | 评论 (1)编辑
http://www.microsoft.com/windows/products/winfamily/ie/ie8/default.mspx

大家可以尝试一下!
posted @ 2008-06-30 08:22 Robot·H 阅读(119) | 评论 (0)编辑

描述:
1:一个页面有三层z-index[1,2,3]
div1:有个按钮OpenDiv,当点击时,弹出div2[遮罩层zindex=2]和一个动态createElement("table")[zindex=3]
2:table里有一个按钮[type=button],点击这个按钮div2和table都被remove掉


    //删除遮蔽层 EnvelopLayer
        var layerBeta=document.getElementById("EnvelopLayer");
        layerBeta.parentNode.removeChild(layerBeta);
    //删除table
    var divid=2;
        var tbl=document.getElementById("Window_"+divid);
        tbl.parentNode.removeChild(tbl);

3:这个页面是aspx页面
问题:这个按钮点2次才起作用。不知道为什么?
如果是html页面,点击一次就会起作用。
可为什么aspx页面就2次呢?


note:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">都一样.

部分js代码

建立遮罩层

function createEnvelopLayer()
{
    var h=document.documentElement.clientHeight;
    var w=document.documentElement.clientWidth;
    var div=document.createElement("<div id='EnvelopLayer' style='position:absolute;visibility:visible;background:#000;filter:alpha(opacity=20);z-index:500;left:0;top:0;width:"+w+"px;height:"+h+"px;color:#fff'></div>");
    div.id="EnvelopLayer";
    document.body.appendChild(div);
}

 

//create table

this.oTable = document.createElement("table");
   
    this.oTable.id = "Window_" + this.id;
 
 this.oTable.style.width = this.width + "px";
 //this.oTable.style.height = "100px";
 //set zIndex
 this.oTable.style.zIndex="1000"
 
 //this.oTable.style.width = "100%";
 //this.oTable.style.height = document.body.scrollHeight
 //this.oTable.style.border = "1px solid #C2C3BD";
  this.oTable.cellSpacing = 0;
 //this.oTable.cellPadding = 2;
 this.oTable.cellPadding = 0;
 //this.oTable.border = 0;
 //this.oTable.style.backgroundColor = "#FFFFFF";

 // determine the windows position when first open
 this.oTable.style.position = "absolute";
 this.oTable.style.left = this.x + "px";
 this.oTable.style.top = this.y + "px";

 // link from the table to the JSWindow object
 this.oTable.jsWindow = this;

 // if the table is clicked anywhere, show the table in front of other open windows
 this.oTable.onmousedown = JSWindow.prototype.onBringToFront;
    this.oTable.className="tanchu";

 

this.oContentTD.innerHTML = document.all["Div" + this.id].innerHTML;

posted @ 2008-06-29 12:38 Robot·H 阅读(126) | 评论 (1)编辑
     摘要: 可爱可恨的return false;  阅读全文
posted @ 2008-06-27 15:36 Robot·H 阅读(110) | 评论 (5)编辑
     摘要: 发上来、方便查阅!  阅读全文
posted @ 2008-06-27 11:53 Robot·H 阅读(120) | 评论 (0)编辑
     摘要: 随即数 !  阅读全文
posted @ 2008-06-25 17:49 Robot·H 阅读(112) | 评论 (0)编辑
     摘要: Bitmap,Graphics,Random等的使用!  阅读全文
posted @ 2008-06-25 17:39 Robot·H 阅读(34) | 评论 (0)编辑
     摘要: replace 的使用小结!  阅读全文
posted @ 2008-06-24 17:35 Robot·H 阅读(199) | 评论 (0)编辑
     摘要: 完美不完美你说了算!  阅读全文
posted @ 2008-06-24 15:28 Robot·H 阅读(325) | 评论 (9)编辑
     摘要: js Popup  阅读全文
posted @ 2008-06-23 17:57 Robot·H 阅读(36) | 评论 (0)编辑
     摘要: js中的面向对象!  阅读全文
posted @ 2008-06-23 13:34 Robot·H 阅读(144) | 评论 (0)编辑
     摘要: RegularExpression  阅读全文
posted @ 2008-06-22 21:53 Robot·H 阅读(27) | 评论 (1)编辑
     摘要: 回忆瘸狼  阅读全文
posted @ 2008-06-22 20:12 Robot·H 阅读(143) | 评论 (0)编辑
     摘要: 配置节点!  阅读全文
posted @ 2008-06-22 00:26 Robot·H 阅读(116) | 评论 (0)编辑
     摘要: js经典收藏!  阅读全文
posted @ 2008-06-21 23:35 Robot·H 阅读(243) | 评论 (4)编辑
     摘要: VS2005有ValidationGroup,
VS2003有什么?  阅读全文
posted @ 2008-06-21 23:14 Robot·H 阅读(122) | 评论 (0)编辑
     摘要: 有恨有爱的VSWebCache  阅读全文
posted @ 2008-06-18 17:12 Robot·H 阅读(20) | 评论 (0)编辑
     摘要: debug  阅读全文
posted @ 2008-06-18 15:15 Robot·H 阅读(19) | 评论 (0)编辑
From :ChinaDaily
URL:http://www.chinadaily.com.cn/china/2008-06/15/content_6761484.htm

Sichuan reopens to tourists, full recovery by 2010

By Huang Zhiling and Luo Xianyu (chinadaily.com.cn)
Updated: 2008-06-15 16:22


Soliders, policeman and volunteers who helped Dujiangyan's quake relief receive "gold cards" from the city's government June 15, 2008. The cardholders will be able to visit the Dujiangyan Irrigation Project and Mount Qingcheng free of charge during their lifetime. [Huang Zhiling/chinadaily.com.cn] 

CHENGDU: He Ping, a 52-year-old taxi driver in Chengdu, capital of Sichuan Province, sent a passenger to the Lidui Park in this city 48 km northwest of Chengdu early Sunday morning.

When he found the park which is home to Dujiangyan, the world's oldest irrigation project still in operation, was open to visitors free of charge, he made a quick visit to the site of the project on the World Cultural Heritage List of the United Nations Educational, Scientific and Cultural Organization.

Special coverage:
Strong Earthquake Jolts China

Related readings:
Frugal life for pandas in Chengdu
China quake death toll rises to 69,170
Panda safety main concern of rangers
54 tourists dead in China earthquake

"To my pleasant surprise, only some bricks and tiles have fallen from buildings near the project site and glass encircling a stone statue of Li Bing (builder of the project) built in the Eastern Han Dynasty (AD 25-220) has been shattered. And the dam site is intact," he said.

According to Cui Wei, an official with the Dujiangyan irrigation project administrative bureau, the park will be open free of charge for three months to promote tourism hard hit by the May 12 earthquake.

"The promotion is in response to the Sichuan Provincial Tourism Administration's decision to partially reopen the provincial tourism market on June 15," he said.

On May 12, the National Tourism Administration asked individuals and tour groups not to visit Sichuan in the wake of the earthquake.

Sichuan reopened 12 cities and one prefecture to tourists on Sunday in a move to revive its once-booming tourism industry. They include Zigong, Panzhihua, Luzhou, Suining, Neijiang, Leshan, Nanchong, Yibin, Guang'an, Dazhou, Meishan and Ziyang and the Liangshan Yi autonomous prefecture.

It partially opened Chengdu to tourists, for several major visitors' attractions were damaged in the earthquake, said Zhang Gu, chief of the Sichuan provincial tourism administration.

"Sichuan will promote visits to its attractions by locals in the province and ask provinces and cities which are helping Sichuan in its after-quake reconstruction to organize tourists to Sichuan," he told chinadaily.com.cn.

Sichuan's tourism sector has suffered a loss of more than 50 billion yuan (US$7.2 billion) because of the earthquake. But it has not caused havoc to the province's world heritage sites.

Mount Qingcheng and Dujiangyan have been just partly damaged, while the Jiuzhaigou and Huanglong scenic spots, Mount Emei and the Leshan Giant Buddha have suffered no damage in the earthquake.

Sichuan is working on the reconstruction plan of its tourism sector. According to the plan, the sector's full recovery, which is expected to take two years, will be in several steps.

First, the province will stress the promotion of the Chengdu-Mount Emei-Leshan Giant Buddha route in the second half of this year to show Sichuan is safe. Second, it will stress the promotion of the sector in an all-round way next year. The entire tourism sector including in disaster areas is expected to fully recover in about 2010.

The worst-hit places, including Beichuan county, Tangjiashan earthquake lake area, and Hanwang town, are expected to be built into earthquake museums in three years, he said.

The province will raise nearly 200 billion (nearly US$29 billion) from both the governments and investors for the reconstruction of the sector, according to the plan.

Tourism revenue in Sichuan was 121.7 billion yuan (US$18 billion) last year, accounting for 11.6 percent of the province's gross domestic product. More than 400,000 people are working in the industry.

Some visitors' attractions reopened to visitors before June 15, the timetable for their reopening set by his bureau because they were eager to restore their former prosperity, Zhang said.

The Lidui Park reopened on June 14 and was visited by some 4,000 tourists from Chengdu, Chongqing Municipality, Guizhou Province and Guangzhou.

In a ceremony marking the park's reopening, the Dujiangyan municipal government presented 100 "gold cards" to soldiers, policemen, medics, volunteers, donors, journalists and representatives from international organizations to appreciate their contribution to relief work in the city.

With the cards, holders who have contributed to relief work can visit the Dujiangyan Irrigation Project and Mount Qingcheng, which is birthplace of Taoism, the only religious indigenous to China, free of charge during their lifetime.

The issuance of the cards will not be limited. "The city will issue the cards to all those who have helped its relief work. They will post them to those who have left Dujiangyan," said Liu Junlin, party chief of Dujiangyan.

He said at least 1 million people have participated in relief work in his city.


生词
irrigation :灌溉
Heritage :遗产
Eastern Han Dynasty  :朝代
shattered:粉碎[eeter]
dam :水贝
intact:完整无缺的。
bureau:办公署
promote :促进.
tourism :旅游
prefecture :辖区
timetable :时刻表
issuance:发布

posted @ 2008-06-15 23:29 Robot·H 阅读(22) | 评论 (0)编辑
     摘要: 利用@@ROWCOUNT和Depth实现该功能。  阅读全文
posted @ 2008-06-14 18:44 Robot·H 阅读(147) | 评论 (0)编辑
     摘要: PetShop中的一点小疑惑。  阅读全文
posted @ 2008-06-13 11:33 Robot·H 阅读(80) | 评论 (1)编辑
     摘要: go,go,go!  阅读全文
posted @ 2008-06-12 16:17 Robot·H 阅读(19) | 评论 (0)编辑
     摘要: string-------------->int  阅读全文
posted @ 2008-06-10 22:42 Robot·H 阅读(62) | 评论 (0)编辑
     摘要: 字符串是否为空的判断  阅读全文
posted @ 2008-06-10 22:21 Robot·H 阅读(32) | 评论 (0)编辑
     摘要: Static variable  阅读全文
posted @ 2008-06-05 14:30 Robot·H 阅读(43) | 评论 (0)编辑
     摘要: C#基础  阅读全文
posted @ 2008-06-03 23:31 Robot·H 阅读(23) | 评论 (0)编辑
     摘要: 吕老师经典的设计模式讲解  阅读全文
posted @ 2008-05-31 10:27 Robot·H 阅读(16) | 评论 (0)编辑
     摘要: debug多多  阅读全文
posted @ 2008-05-29 12:30 Robot·H 阅读(99) | 评论 (0)编辑
     摘要: yield return 功不可没  阅读全文
posted @ 2008-05-28 10:28 Robot·H 阅读(185) | 评论 (0)编辑
     摘要: 你有可能熟悉out,ref.你熟悉params吗?不知道可以看看。  阅读全文
posted @ 2008-05-28 10:20 Robot·H 阅读(163) | 评论 (0)编辑
     摘要: Delegate经典诠释  阅读全文
posted @ 2008-05-27 09:42 Robot·H 阅读(27) | 评论 (0)编辑
     摘要: 杀手锏  阅读全文
posted @ 2008-05-24 19:54 Robot·H 阅读(228) | 评论 (11)编辑
     摘要: 看看吧。  阅读全文
posted @ 2008-05-24 12:33 Robot·H 阅读(323) | 评论 (5)编辑
     摘要: AppDomain知识  阅读全文
posted @ 2008-05-24 11:38 Robot·H 阅读(19) | 评论 (0)编辑
     摘要: 不知道谁写的了。  阅读全文
posted @ 2008-05-23 13:02 Robot·H 阅读(39) | 评论 (0)编辑
     摘要: 很简单的一个问题。  阅读全文
posted @ 2008-05-22 18:08 Robot·H 阅读(221) | 评论 (2)编辑
     摘要: 观察美丽少妇的后果  阅读全文
posted @ 2008-05-22 12:14 Robot·H 阅读(308) | 评论 (0)编辑
     摘要: MyResume  阅读全文
posted @ 2008-05-22 08:38 Robot·H 阅读(697) | 评论 (9)编辑
     摘要: 不错的一篇关于ViewState的E文文章。  阅读全文
posted @ 2008-05-12 16:05 Robot·H 阅读(116) | 评论 (0)编辑
     摘要: 献给母亲  阅读全文
posted @ 2008-05-11 11:10 Robot·H 阅读(102) | 评论 (2)编辑
     摘要: ~  阅读全文
posted @ 2008-05-09 10:59 Robot·H 阅读(40) | 评论 (0)编辑

C# 编程语言的 using 语句通过简化必须编写以便创建和清理对象的代码,使得对 Dispose 方法的调用更加自动化。using 语句获得一个或多个资源,执行您指定的语句,然后处置对象。请注意,using 语句只适用于这样的对象:这些对象的生存期不超过在其中构建这些对象的方法。下面的代码示例将创建并清理 ResourceWrapper 类的实例,如 C# 示例实现 Dispose 方法中所示。

 

class myApp
{
   
public static void Main()
   
{
      
using (ResourceWrapper r1 = new ResourceWrapper())
      
{
         
// Do something with the object.
         r1.DoSomething();
      }

   }

}

以上合并了 using 语句的代码与下面的代码等效。

 

 

class myApp
{
   
public static void Main()
   
{
      ResourceWrapper r1 
= new ResourceWrapper();
      
try
      
{
         
// Do something with the object.
         r1.DoSomething();
      }

      
finally
      
{
         
// Check for a null resource.
         if (r1 != null)
         
// Call the object's Dispose method.
         r1.Dispose();
      }

   }

}
posted @ 2008-05-09 10:52 Robot·H 阅读(199) | 评论 (3)编辑
using System;
using System.IO;

class Program
{

    
static void Main()
    
{
        
try
        
{
            
// Initialize a Stream resource to pass 
            
// to the DisposableResource class.
            Console.Write("Enter filename and its path: ");
            
string fileSpec = Console.ReadLine();
            FileStream fs 
= File.OpenRead(fileSpec);
            DisposableResource TestObj 
= new DisposableResource(fs);

            
// Use the resource.
            TestObj.DoSomethingWithResource();

            
// Dispose the resource.
            TestObj.Dispose();

        }

        
catch (FileNotFoundException e)
        
{
            Console.WriteLine(e.Message);
        }

    }

}



// This class shows how to use a disposable resource.
// The resource is first initialized and passed to
// the constructor, but it could also be
// initialized in the constructor.
// The lifetime of the resource does not 
// exceed the lifetime of this instance.
// This type does not need a finalizer because it does not
// directly create a native resource like a file handle
// or memory in the unmanaged heap.

public class DisposableResource : IDisposable
{

    
private Stream _resource;  
    
private bool _disposed;

    
// The stream passed to the constructor 
    
// must be readable and not null.
    public DisposableResource(Stream stream)
    
{
        
if (stream == null)
            
throw new ArgumentNullException("Stream in null.");
        
if (!stream.CanRead)
            
throw new ArgumentException("Stream must be readable.");

        _resource 
= stream;

        _disposed 
= false;
    }


    
// Demonstrates using the resource. 
    
// It must not be already disposed.
    public void DoSomethingWithResource() {
        
if (_disposed)
            
throw new ObjectDisposedException("Resource was disposed.");

        
// Show the number of bytes.
        int numBytes = (int) _resource.Length;
        Console.WriteLine(
"Number of bytes: {0}", numBytes.ToString());
    }



    
public void Dispose() //Implement interface
    {
        Dispose(
true);

        
// Use SupressFinalize in case a subclass
        
// of this type implements a finalizer.
        GC.SuppressFinalize(this);      
    }


    
protected virtual void Dispose(bool disposing)
    
{
        
// If you need thread safety, use a lock around these 
        
// operations, as well as in your methods that use the resource.
        if (!_disposed)
        
{
            
if (disposing) {
                
if (_resource != null)//_resourec!=null ,_resoure.Dispose();_resoure=null
                    _resource.Dispose();
                    Console.WriteLine(
"Object disposed.");
            }


            
// Indicate that the instance has been disposed.
            _resource = null;
            _disposed 
= true;   
        }

    }

}
posted @ 2008-05-09 10:23 Robot·H 阅读(15) | 评论 (0)编辑
     摘要: 概念性的东东。  阅读全文
posted @ 2008-05-08 22:33 Robot·H 阅读(126) | 评论 (0)编辑
     摘要: In a project I'm doing I needed to basically do a DISTINCT on a couple fields in a DataTable that I had used earlier in code. Did some Google searching and came up with this MS KB on the subject. I was hoping to find it in the Framework, but hey, writing a little extra code never hurt anyway. Looking over the code though I found that I just didn't really like it. Biggest reason being it only took one field. I wanted to be able to pass in n number of fields, so I rewrote it and did a little   阅读全文
posted @ 2008-05-05 19:38 Robot·H 阅读(120) | 评论 (4)编辑
From:MSDN  Example
private static void DemonstrateMergeTable()