??xml version="1.0" encoding="utf-8" standalone="yes"?>福彩快乐12:BlogJava - 四川福利彩票快乐12快乐12开奖直播快乐12开奖辽宁福彩快乐12快乐彩12选5走势图//www.ot7t.com.cn/javagrass/zh-cnSat, 15 Dec 2018 04:09:42 GMTSat, 15 Dec 2018 04:09:42 GMT602013??2?个C#最热门问题解答 - 四川福利彩票快乐12快乐12开奖直播快乐12开奖辽宁福彩快乐12快乐彩12选5走势图//www.ot7t.com.cn/javagrass/archive/2013/08/12/402683.html墙头?/dc:creator>墙头?/author>Mon, 12 Aug 2013 02:53:00 GMT//www.ot7t.com.cn/javagrass/archive/2013/08/12/402683.html//www.ot7t.com.cn/javagrass/comments/402683.html//www.ot7t.com.cn/javagrass/archive/2013/08/12/402683.html#Feedback0//www.ot7t.com.cn/javagrass/comments/commentRss/402683.html//www.ot7t.com.cn/javagrass/services/trackbacks/402683.html?C#怎么设定Stream.Read的超时时?/a>
?streamReader.BaseStream.ReadTimeout = 2000;

?C#如何从XmlNode里删除CDATA标签
?
xml.innerText = xml.innerText.Replace("![CDATA[","").Replace("]]","");
xmlDoc.Save();// xmlDoc is your xml document

?
var dt = new DateTime(1970, 1, 1, 0, 0, 0, 0).AddSeconds(Math.Round(1372061224000 / 1000d)).ToLocalTime();
Console.WriteLine(dt); // Prints: 6/24/2013 10:07:04 AM

?
var attributes = (from n in xml.Root.Attributes("someProperty")
                        select n.Value).ToList();
?
Regex regex = new Regex(@"\s{2,}"); // matches at least 2 whitespaces
if (regex.IsMatch(inputString))
    // do something



]]>
javascript的indexof方法的定义和用法 - 四川福利彩票快乐12快乐12开奖直播快乐12开奖辽宁福彩快乐12快乐彩12选5走势图//www.ot7t.com.cn/javagrass/archive/2013/02/20/395474.html墙头?/dc:creator>墙头?/author>Wed, 20 Feb 2013 08:46:00 GMT//www.ot7t.com.cn/javagrass/archive/2013/02/20/395474.html//www.ot7t.com.cn/javagrass/comments/395474.html//www.ot7t.com.cn/javagrass/archive/2013/02/20/395474.html#Feedback0//www.ot7t.com.cn/javagrass/comments/commentRss/395474.html//www.ot7t.com.cn/javagrass/services/trackbacks/395474.html
javascript的indexof方法可返回某个指定的字符串值在字符串中首次出现的位?/div>
返回 String 对象内第一次出现子字符串的字符位置?br />strObj.indexOf(subString[, startIndex])
参数
strObj
必选项。String 对象或文字?br />subString
必选项。要?String 对象中查找的子字符串?br />starIndex
可选项。该整数值指出在 String 对象内开始查找的索引。如果省略,则从字符串的开始处查找?br />
说明
indexOf 方法返回一个整数值,指出 String 对象内子字符串的开始位置。如果没有找到子字符串,则返?-1?br />
如果 startindex 是负数,?startindex 被当作零。如果它比最大的字符位置索引还大,则它被当作最大的可能索引?br />
从左向右执行查找。否则,该方法与 lastIndexOf 相同?br />
示例

下面的示例说明了 indexOf 方法的用法?br />
代码如下:

function IndexDemo(str2){
var str1 = "BABEBIBOBUBABEBIBOBU"
var s = str1.indexOf(str2);
return(s);
}


lastIndexOf方法返回子字符串最后一次出现的位置,和 indexof相反?br />
substring方法

str=str.substring(int beginIndex);截取掉str从首字母起长度为beginIndex的字符串,将剩余字符串赋值给str?br />str=str.substring(int beginIndex,int endIndex);截取str中从beginIndex开始至endIndex结束时的字符串,并将其赋值给str;

例子?br />代码如下:
var elems=node.getElementsByTagName(“*");
for(var i=0;i<elems.length;i++){
if(elems[i].className.indexOf(classname)!=-1)
{ }
}

a.indexOf(b)可用来判断匹配,返回b在a出现的第一个字母的位置,如果没有返?1?br />如果有重复的字符出现,以第一个字符为准?/div>相关内容:


]]>Eclipse通过直接复制安装插件的方?/title><link>//www.ot7t.com.cn/javagrass/archive/2013/02/16/395327.html</link><dc:creator>墙头?/dc:creator><author>墙头?/author><pubDate>Sat, 16 Feb 2013 02:52:00 GMT</pubDate><guid>//www.ot7t.com.cn/javagrass/archive/2013/02/16/395327.html</guid><wfw:comment>//www.ot7t.com.cn/javagrass/comments/395327.html</wfw:comment><comments>//www.ot7t.com.cn/javagrass/archive/2013/02/16/395327.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>//www.ot7t.com.cn/javagrass/comments/commentRss/395327.html</wfw:commentRss><trackback:ping>//www.ot7t.com.cn/javagrass/services/trackbacks/395327.html</trackback:ping><description><![CDATA[<div class="yibqv"><p> <span style="font-family:Microsoft YaHei;font-size:14px;">假设你的 Eclipse的在(C:\eclipse), 解压你下载的 eclipse 插件或者安装eclipse 插件到指定目录AA(c:\AA)文件夹,打开AA 文件夹,在AA文件夹里分别包含两个文件夹features和plugins ,然后把两个文件夹里的文件分别复制到eclipse下所对应的文件夹下的features 和plugins 下,一般的把插件文件直接复? 到eclipse目录里是最直接也是最愚蠢的一种方法!因为日后想要删除这些插件会非常的困难!强列的不推荐使用!!!</span> </p> <p> <span style="font-family:Microsoft YaHei;font-size:14px;">注意:直接将 插件包解压到plugins文件夹下之后,重启eclipse,可能不会加载新的插件?/span>  </p> <p> <span style="font-family:Microsoft YaHei;font-size:14px;">解决方法是:</span>  </p> <p> <span style="font-family:Microsoft YaHei;font-size:14px;">1、打开命令行,到当前eclipse的目录下,输入eclipse -clean,重新启动eclipse,这样eclipse就会加上新的插件了?/span> </p> <p> <span style="font-family:Microsoft YaHei;font-size:14px;">2、如果插件不能升效,则请将eclipse\configuration\org.eclipse.update目录删除后再启动eclipse:)</span> </p> <p> <span style="font-family:Microsoft YaHei;font-size:14px;">你可以在eclipse的菜?Help"-->"About Eclipse SDK"-->"Feature Details" ?Plug-in Details"中看到新安装的插件?/span> </p> <p> <span style="font-family:Microsoft YaHei;font-size:14px;">假设你的Eclipse的在(C:\eclipse), 解压你下载的 eclipse 插件或者安装eclipse </span><br /> <span style="font-family:Microsoft YaHei;font-size:14px;">插件到指定目录AA(c:\AA)文件夹,打开AA 文件夹,在AA文件夹里分别包含两个文件夹features和plugins </span><br /> <span style="font-family:Microsoft YaHei;font-size:14px;">,然后把两个文件夹里的文件分别复制到eclipse下所对应的文件夹下的features 和plugins 下,一般的把插件文件直接复?</span><br /> <span style="font-family:Microsoft YaHei;font-size:14px;">到eclipse目录里是最直接也是最愚蠢的一种方法!因为日后想要删除这些插件会非常的困难!强列的不推荐使用!?/span> </p> <p> <span style="font-family:Microsoft YaHei;font-size:14px;">注意:直接将 插件包解压到plugins文件夹下之后,重启eclipse,可能不会加载新的插件?/span> </p> <p> <span style="font-family:Microsoft YaHei;font-size:14px;">解决方法是:</span> </p> <p> <span style="font-family:Microsoft YaHei;font-size:14px;">1、打开命令行,到当前eclipse的目录下,输入eclipse -clean,重新启动eclipse,这样eclipse就会加上新的插件了?/span> </p> <p> <span style="font-family:Microsoft YaHei;font-size:14px;">2、如果插件不能升效,则请将eclipse\configuration\org.eclipse.update目录删除后再启动eclipse:)</span> </p> <p> <span style="font-family:Microsoft YaHei;font-size:14px;">你可以在eclipse的菜?Help"-->"About Eclipse SDK"-->"Feature Details" </span><br /> <span style="font-family:Microsoft YaHei;font-size:14px;">?Plug-in Details"中看到新安装的插件?/span> </p></div><div class="yibqv">Eclipse相关内容:<br /><div class="yibqv"><ul class="yibqv"><li class="yibqv"><a >Eclipse提示No Default Proposals和no completions available的解决方?/a></li><li class="yibqv"><a JVM terminated. Exit code=-1"错误</a></li><li class="yibqv"><a >Eclipse无法安装Maven插件,出现错误</a></li><li class="yibqv"><a >Eclipse安装Maven的方?/a></li><li class="yibqv"><a >为什么android模拟器在eclipse不能运行?/a></li></ul></div></div><img src ="//www.ot7t.com.cn/javagrass/aggbug/395327.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="//www.ot7t.com.cn/javagrass/" target="_blank">墙头?/a> 2013-02-16 10:52 <a href="//www.ot7t.com.cn/javagrass/archive/2013/02/16/395327.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>eclipse使用link文件安装插件的方?/title><link>//www.ot7t.com.cn/javagrass/archive/2013/02/16/395326.html</link><dc:creator>墙头?/dc:creator><author>墙头?/author><pubDate>Sat, 16 Feb 2013 02:51:00 GMT</pubDate><guid>//www.ot7t.com.cn/javagrass/archive/2013/02/16/395326.html</guid><wfw:comment>//www.ot7t.com.cn/javagrass/comments/395326.html</wfw:comment><comments>//www.ot7t.com.cn/javagrass/archive/2013/02/16/395326.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>//www.ot7t.com.cn/javagrass/comments/commentRss/395326.html</wfw:commentRss><trackback:ping>//www.ot7t.com.cn/javagrass/services/trackbacks/395326.html</trackback:ping><description><![CDATA[<div class="yibqv"><p> <span style="font-family:Microsoft YaHei;font-size:14px;">a.假设你的Eclipse的在(C:\eclipse),在该文件夹下,新建这样的目录结构(C:\eclipse\PluginsEclipse\jode\eclipse),</span> </p> <p> <span style="font-family:Microsoft YaHei;font-size:14px;">b.解压你下载的eclipse 插件或者安装eclipse 插件到指定目录BB(C:\BB)文件夹,打开BB 文件夹,然后?</span><br /> <span style="font-family:Microsoft YaHei;font-size:14px;">BB文件夹里的两个文件夹features和plugins 复制到刚刚新建好的eclipse </span><br /> <span style="font-family:Microsoft YaHei;font-size:14px;">(C:\eclipse\PluginsEclipse\jode\eclipse,这样eclipse中就有了二个插件目录features and </span><br /> <span style="font-family:Microsoft YaHei;font-size:14px;">plugins)?</span> </p> <p> <span style="font-family:Microsoft YaHei;font-size:14px;">c.?eclipse(C:\eclipse)目录中新建links(C:\eclipse\links)目录,在links目录中建立一个以link为扩展名 的文本文件如jode.link,内容如下path=C:/eclipse/PluginsEclipse/jode </span><br /> <span style="font-family:Microsoft YaHei;font-size:14px;">或?path=C:\\eclipse\\PluginsEclipse\\jode 插件的目录)</span> </p> <p> <span style="font-family:Microsoft YaHei;font-size:14px;">重启eclipse插件就会安装完成?/span> </p> <p> <span style="font-family:Microsoft YaHei;font-size:14px;">注意:link文件中path=插件目录的path路径分隔要用\\或是/</span> </p> <p> <span style="font-family:Microsoft YaHei;font-size:14px;">可以在eclipse的菜?Help"-->"About Eclipse SDK"-->"Feature Details" ?Plug-in </span><br /> <span style="font-family:Microsoft YaHei;font-size:14px;">Details"中看到新安装的插?/span></p><p><br /><span style="font-family:Microsoft YaHei;font-size:14px;"></span></p><p><span style="font-family:Microsoft YaHei;font-size:14px;">Eclipse相关内容:</span></p><p><span style="font-family:Microsoft YaHei;font-size:14px;"><div class="yibqv"><ul class="yibqv"><li class="yibqv"><a >eclipse提示The server does not support version 3.0 of the J2EE错误的解决方?/a></li><li class="yibqv"><a >eclipse提示target runtime apache tomcat 6.0 is no defined错误?个解决方?/a></li><li class="yibqv"><a >eclipse在debug模式下,出现source not found错误</a></li><li class="yibqv"><a >Eclipse提示No Default Proposals和no completions available的解决方?/a></li><li class="yibqv"><a JVM terminated. Exit code=-1"错误</a></li></ul></div><br /></span> </p></div><img src ="//www.ot7t.com.cn/javagrass/aggbug/395326.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="//www.ot7t.com.cn/javagrass/" target="_blank">墙头?/a> 2013-02-16 10:51 <a href="//www.ot7t.com.cn/javagrass/archive/2013/02/16/395326.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Android实现手机和电脑间的UDP网络通信 - 四川福利彩票快乐12快乐12开奖直播快乐12开奖辽宁福彩快乐12快乐彩12选5走势图//www.ot7t.com.cn/javagrass/archive/2013/02/07/395208.html墙头?/dc:creator>墙头?/author>Thu, 07 Feb 2013 05:44:00 GMT//www.ot7t.com.cn/javagrass/archive/2013/02/07/395208.html//www.ot7t.com.cn/javagrass/comments/395208.html//www.ot7t.com.cn/javagrass/archive/2013/02/07/395208.html#Feedback4//www.ot7t.com.cn/javagrass/comments/commentRss/395208.html//www.ot7t.com.cn/javagrass/services/trackbacks/395208.html

先介绍两个UDP相关的类

DatagramSocket 这个是UDP套接字,一般服务器端可以绑定一个本机端口,而客户端发送方则不需要?/p>

DatagramPacket 这个是数据报包,服务器端直接按缓存读,客户端则需要指定Ip地址和端?/p>

这次我们做个android手机端跟电脑端通信

电脑端:
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.SocketException;


public class UdpRecv {

    public static void main(String[] args) throws Exception{
        
        //绑定本机断开
        DatagramSocket ds = new DatagramSocket(8080);
        
        byte[] buf = new byte[1024];
        DatagramPacket dp = new DatagramPacket(buf,buf.length);
        
        //接收数据?br />        ds.receive(dp);
        
        //取出数据报内?br />        String str = new String(dp.getData(),0,dp.getLength());
        
        System.out.println(str);
        
        //打印发送方的地址
        System.out.println("ip:"+dp.getAddress().getHostAddress()+"port:"+dp.getPort());
        
        ds.close();
    }
}
-----------------------------------------------------
android相关内容:
-----------------------------------------------------
手机端:
package com.bvin.test.udp;

import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;

import android.app.Activity;
import android.content.Context;
import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.EditText;

public class MainActivity extends Activity {
    /** Called when the activity is first created. */
    EditText et ;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
         et =  new EditText(this);
        
        setContentView(et);
        
        WifiManager wMan = (WifiManager)getSystemService(Context.WIFI_SERVICE);
        if(!wMan.isWifiEnabled()){
            wMan.setWifiEnabled(true);
        }
        WifiInfo wifiInfo = wMan.getConnectionInfo();
        Log.e("ip", intToIp(wifiInfo.getIpAddress()));//本机ip(仅wifi环境?br />    }

    //把获取的整形转换成字符型
    private String intToIp(int i) {         
        
        return (i & 0xFF ) + "." +         
      ((i >> 8 ) & 0xFF) + "." +         
      ((i >> 16 ) & 0xFF) + "." +         
      ( i >> 24 & 0xFF) ;   
   }
    
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // TODO Auto-generated method stub
        menu.add("发?);
        return super.onCreateOptionsMenu(menu);
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // TODO Auto-generated method stub
        if(item.getItemId()==0){
            DatagramSocket ds;
            try {
                //套接?br />                ds = new DatagramSocket();
                //发送内?br />                String str = et.getText().toString();
                //构建数据报(内容+地址?br />                DatagramPacket dp = new DatagramPacket(str.getBytes(),str.length(),InetAddress.getByName("192.168.0.102"),8080);
                //把数据报发送出?br />                ds.send(dp);
                //关闭套接?br />                ds.close();
                
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            
        }
        return super.onOptionsItemSelected(item);
        
    }
    
    
}
首先运行电脑接收端,在接收到发送方数据之前将会一直阻塞。而手机端会有个输入框,有个发送菜单,将会把输入框的内容给发送到PC端,虽然UDP不算可靠,但是在局域网还是挺可靠?br />


]]>
LINQ编译到CIL的方?/title><link>//www.ot7t.com.cn/javagrass/archive/2013/02/06/395175.html</link><dc:creator>墙头?/dc:creator><author>墙头?/author><pubDate>Wed, 06 Feb 2013 06:49:00 GMT</pubDate><guid>//www.ot7t.com.cn/javagrass/archive/2013/02/06/395175.html</guid><wfw:comment>//www.ot7t.com.cn/javagrass/comments/395175.html</wfw:comment><comments>//www.ot7t.com.cn/javagrass/archive/2013/02/06/395175.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>//www.ot7t.com.cn/javagrass/comments/commentRss/395175.html</wfw:commentRss><trackback:ping>//www.ot7t.com.cn/javagrass/services/trackbacks/395175.html</trackback:ping><description><![CDATA[<div class="yibqv"><p>Linq相关:</p> <ul class="yibqv"><li class="yibqv">10-10-02<a >LINQ如何返回业务实体到上层逻辑</a></li><li class="yibqv">10-07-25<a >LINQ中怎么使用LIKE方法?</a></li><li class="yibqv">10-03-19<a >LINQ去除重复数据时报?不支持用于查询运算符Distinct的重?,怎么解决?</a></li><li class="yibqv">10-03-19<a >linq如何去除重复结果?</a></li><li class="yibqv">10-03-12<a >Linq中的not in 语句应该怎么?</a></li></ul></div><div class="yibqv"><div class="yibqv"> <p><div class="yibqv">Linq是以下列方式编译?/div></p> <ol><li class="yibqv"><p>首先,LINQ 查询表达式转换为方法调用?/p> <pre><code>public static void Main() { var query = db.Cars.Select<Car, Car>(c => c); foreach (Car aCar in query) { Console.WriteLine(aCar.Name); } } </code></pre></li><li class="yibqv"><p>如果 <code>db.Cars</code> 的类型是 <code>IEnumerable<Car></code> (即它的 LINQ,对象),然?lambda 表达式变成了一个单独的方法?/p> <pre><code>private Car lambda0(Car c) { return c; } private Func<Car, Car> CachedAnonymousMethodDelegate1; public static void Main() { if (CachedAnonymousMethodDelegate1 == null) CachedAnonymousMethodDelegate1 = new Func<Car, Car>(lambda0); var query = db.Cars.Select<Car, Car>(CachedAnonymousMethodDelegate1); foreach // ... } </code></pre> <p>在现实中不调用该方法 <code>lambda0</code> 但东西喜?<code><Main>b__0</code> (在 <code>Main</code> 是包含方法的名称)。同样,缓存的委托实际上调用 <code>CS$<>9__CachedAnonymousMethodDelegate1</code>?/p> <p>如果您正在使?SQL LINQ 然后 <code>db.Cars</code> 类型将为 <code>IQueryable<Car></code>,此步骤是非常不同。相反,它会到表达式目录树的 lambda 表达式:</p> <pre><code>public static void Main() { var parameter = Expression.Parameter(typeof(Car), "c"); var lambda = Expression.Lambda<Func<Car, Car>>(parameter, new ParameterExpression[] { parameter })); var query = db.Cars.Select<Car, Car>(lambda); foreach // ... } </code></pre></li><li class="yibqv"><p>?<code>foreach</code> 循环变成一?<code>try/finally</code> ?(这是相同的两个):</p> <pre><code>IEnumerator<Car> enumerator = null; try { enumerator = query.GetEnumerator(); Car aCar; while (enumerator.MoveNext()) { aCar = enumerator.Current; Console.WriteLine(aCar.Name); } } finally { if (enumerator != null) ((IDisposable)enumerator).Dispose(); } </code></pre></li><li class="yibqv"><p>最后,这是?IL 编译预期的方式。以下是?<code>IEnumerable<Car></code>?/p> <pre><code>// Put db.Cars on the stack L_0016: ldloc.0 L_0017: callvirt instance !0 DatabaseContext::get_Cars() // “if” starts here L_001c: ldsfld Func<Car, Car> Program::CachedAnonymousMethodDelegate1 L_0021: brtrue.s L_0034 L_0023: ldnull L_0024: ldftn Car Program::lambda0(Car) L_002a: newobj instance void Func<Car, Car>::.ctor(object, native int) L_002f: stsfld Func<Car, Car> Program::CachedAnonymousMethodDelegate1 // Put the delegate for “c => c” on the stack L_0034: ldsfld Func<Car, Car> Program::CachedAnonymousMethodDelegate1 // Call to Enumerable.Select() L_0039: call IEnumerable<!!1> Enumerable::Select<Car, Car>(IEnumerable<!!0>, Func<!!0, !!1>) L_003e: stloc.1 // “try” block starts here L_003f: ldloc.1 L_0040: callvirt instance IEnumerator<!0> IEnumerable<Car>::GetEnumerator() L_0045: stloc.3 // “while” inside try block starts here L_0046: br.s L_005a L_0048: ldloc.3 // body of while starts here L_0049: callvirt instance !0 IEnumerator<Car>::get_Current() L_004e: stloc.2 L_004f: ldloc.2 L_0050: ldfld string Car::Name L_0055: call void Console::WriteLine(string) L_005a: ldloc.3 // while condition starts here L_005b: callvirt instance bool IEnumerator::MoveNext() L_0060: brtrue.s L_0048 // end of while L_0062: leave.s L_006e // end of try // “finally” block starts here L_0064: ldloc.3 L_0065: brfalse.s L_006d L_0067: ldloc.3 L_0068: callvirt instance void IDisposable::Dispose() L_006d: endfinally </code></pre> <p>已编译的代码?code>IQueryable<Car></code> 版本是按预期也。这里是重要的部分,有别于上?(本地变量会有不同的偏移和名称现在,但让我们忽略的)?/p> <pre><code>// typeof(Car) L_0021: ldtoken Car L_0026: call Type Type::GetTypeFromHandle(RuntimeTypeHandle) // Expression.Parameter(typeof(Car), "c") L_002b: ldstr "c" L_0030: call ParameterExpression Expression::Parameter(Type, string) L_0035: stloc.3 // Expression.Lambda(...) L_0036: ldloc.3 L_0037: ldc.i4.1 // var paramArray = new ParameterExpression[1] L_0038: newarr ParameterExpression L_003d: stloc.s paramArray L_003f: ldloc.s paramArray L_0041: ldc.i4.0 // paramArray[0] = parameter; L_0042: ldloc.3 L_0043: stelem.ref L_0044: ldloc.s paramArray L_0046: call Expression<!!0> Expression::Lambda<Func<Car, Car>>(Expression, ParameterExpression[]) // var query = Queryable.Select(...); L_004b: call IQueryable<!!1> Queryable::Select<Car, Car>(IQueryable<!!0>, Expression<Func<!!0, !!1>>) L_0050: stloc.1 </code></pre></li></ol> </div></div><img src ="//www.ot7t.com.cn/javagrass/aggbug/395175.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="//www.ot7t.com.cn/javagrass/" target="_blank">墙头?/a> 2013-02-06 14:49 <a href="//www.ot7t.com.cn/javagrass/archive/2013/02/06/395175.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>springMVC后台的值无法通过ModelAndView的addObject传到前台的解决方?/title><link>//www.ot7t.com.cn/javagrass/archive/2012/12/17/393107.html</link><dc:creator>墙头?/dc:creator><author>墙头?/author><pubDate>Mon, 17 Dec 2012 07:41:00 GMT</pubDate><guid>//www.ot7t.com.cn/javagrass/archive/2012/12/17/393107.html</guid><wfw:comment>//www.ot7t.com.cn/javagrass/comments/393107.html</wfw:comment><comments>//www.ot7t.com.cn/javagrass/archive/2012/12/17/393107.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>//www.ot7t.com.cn/javagrass/comments/commentRss/393107.html</wfw:commentRss><trackback:ping>//www.ot7t.com.cn/javagrass/services/trackbacks/393107.html</trackback:ping><description><![CDATA[解决方法:<br /><div class="yibqv">按照标准用法的话应该是没问题 <br />内部其实把model 通过request.setAttribute(modelName, modelValue); 放入?</div><div class="yibqv">    protected void exposeModelAsRequestAttributes(Map<String, Object> model, HttpServletRequest request) throws Exception {<br />        for (Map.Entry<String, Object> entry : model.entrySet()) {<br />            String modelName = entry.getKey();<br />            Object modelValue = entry.getValue();<br />            if (modelValue != null) {<br />                request.setAttribute(modelName, modelValue);<br />                if (logger.isDebugEnabled()) {<br />                    logger.debug("Added model object '" + modelName + "' of type [" + modelValue.getClass().getName() +<br />                            "] to request in view with name '" + getBeanName() + "'");<br />                }<br />            }<br />            else {<br />                request.removeAttribute(modelName);<br />                if (logger.isDebugEnabled()) {<br />                    logger.debug("Removed model object '" + modelName +<br />                            "' from request in view with name '" + getBeanName() + "'");<br />                }<br />            }<br />        }<br />    }</div><br /><div class="yibqv">一个可能是你实现了HandlerInterceptor并实现了?<br />void postHandle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Object o, org.springframework.web.servlet.ModelAndView modelAndView) throws java.lang.Exception; <br /> <br />在此处修改了modelAndView </div><img src ="//www.ot7t.com.cn/javagrass/aggbug/393107.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="//www.ot7t.com.cn/javagrass/" target="_blank">墙头?/a> 2012-12-17 15:41 <a href="//www.ot7t.com.cn/javagrass/archive/2012/12/17/393107.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>YUI--IE进度条不结束的问题的解决方法 - 四川福利彩票快乐12快乐12开奖直播快乐12开奖辽宁福彩快乐12快乐彩12选5走势图//www.ot7t.com.cn/javagrass/archive/2012/12/17/393106.html墙头?/dc:creator>墙头?/author>Mon, 17 Dec 2012 07:37:00 GMT//www.ot7t.com.cn/javagrass/archive/2012/12/17/393106.html//www.ot7t.com.cn/javagrass/comments/393106.html//www.ot7t.com.cn/javagrass/archive/2012/12/17/393106.html#Feedback0//www.ot7t.com.cn/javagrass/comments/commentRss/393106.html//www.ot7t.com.cn/javagrass/services/trackbacks/393106.html
使用YUI访问后台,返回之后将提示alert到前台,但是前台IE页面的进度不结束?
    var callback={
    upload:function(res) {
                var tax = [];
                tax = YAHOO.lang.JSON.parse(res.responseText);
                if(tax.data[0].checkResult=="1") {
                      progressBar.hide();
                errorMessage('******');
                }
            }
    }
    YAHOO.util.Connect.setForm("fm",true);
    var url = contextRootPath+"/policyImport/policyImportEdit.do";
    var transaction = YAHOO.util.Connect.asyncRequest('POST',url, callback,null);
但是如果在返回的结果中使用window.location.href跳转当前页面,及可以解决,但是我不想重新跳转,请问有其他解决方案吗?

回答:
if(tax.data[0].checkResult=="1") { 
                  progressBar.hide(); 
            errorMessage('******'); 

此处不管有没?结果返回 都应?progressBar.hide();  ?/div>

]]>jquery实现图片预览的方?/title><link>//www.ot7t.com.cn/javagrass/archive/2012/12/10/392711.html</link><dc:creator>墙头?/dc:creator><author>墙头?/author><pubDate>Mon, 10 Dec 2012 02:45:00 GMT</pubDate><guid>//www.ot7t.com.cn/javagrass/archive/2012/12/10/392711.html</guid><wfw:comment>//www.ot7t.com.cn/javagrass/comments/392711.html</wfw:comment><comments>//www.ot7t.com.cn/javagrass/archive/2012/12/10/392711.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>//www.ot7t.com.cn/javagrass/comments/commentRss/392711.html</wfw:commentRss><trackback:ping>//www.ot7t.com.cn/javagrass/services/trackbacks/392711.html</trackback:ping><description><![CDATA[<div class="yibqv">//<a >jquery</a>实现图片预览的方法实?br /> function viewimg(index) { <br /> var name = 'uploadimg' + index; <br /> var imgup = $(name); <br /> var imgpath = getpath(imgup); <br /> var local = imgup.value; <br /> var point = local.lastindexof("."); <br /> //判断上传文件大小 <br /> var img = document.createelement("img"); <br /> img.src = local; <br /> var filesize = img.filesize; <br /> img.onload = function(){filesize=this.filesize;} <br /> if(img.filesize>5242880){ <br /> alert("图片文件过大?); <br /> return false; <br /> } <br /> //判断是否是图片格?<br /> var imgname = imgup.value.substring(imgup.value.lastindexof("."), imgup.value.length); <br /> imgname = imgname.tolowercase(); <br /> if ((imgname != ".jpg") && (imgname != ".gif") && (imgname != ".jpeg") && (imgname != ".png") && (imgname != ".bmp")) { <br /> alert("u8bf7u9009u62e9u56feu7247u6587u4ef6uff0cu8c22u8c22!"); <br /> imgup.focus(); <br /> //清空file里面的值www.3ppt.com <br /> imgup.select(); <br /> document.selection.clear(); <br /> } else { <br /> //显示图片 <br /> document.getelementbyid("sig_preview"+index).innerhtml = "<img src='" + imgpath + "' border=0 width=200 height=150><img src='images/u51.png' width='16' height='14' onclick='delimage(" + index + ");' />"; <br /> } <br /> if (index >=3){ <br /> var cnt = index + 1; <br /> $("img" + cnt).style.display = ""; <br /> } <br /> }</div> <img src ="//www.ot7t.com.cn/javagrass/aggbug/392711.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="//www.ot7t.com.cn/javagrass/" target="_blank">墙头?/a> 2012-12-10 10:45 <a href="//www.ot7t.com.cn/javagrass/archive/2012/12/10/392711.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>编写jquery插件的常用代码格?/title><link>//www.ot7t.com.cn/javagrass/archive/2012/12/06/392547.html</link><dc:creator>墙头?/dc:creator><author>墙头?/author><pubDate>Thu, 06 Dec 2012 06:31:00 GMT</pubDate><guid>//www.ot7t.com.cn/javagrass/archive/2012/12/06/392547.html</guid><wfw:comment>//www.ot7t.com.cn/javagrass/comments/392547.html</wfw:comment><comments>//www.ot7t.com.cn/javagrass/archive/2012/12/06/392547.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>//www.ot7t.com.cn/javagrass/comments/commentRss/392547.html</wfw:commentRss><trackback:ping>//www.ot7t.com.cn/javagrass/services/trackbacks/392547.html</trackback:ping><description><![CDATA[<div class="yibqv">常见的jquery插件的都是有如下的格式的?br />;(function($){    <br />$.fn.yourName = function(options){  //各种属性、参?br />  }<br />       var options = $.extend(defaults, options);//定义参数<br />       this.each(function(){<br />        //插件实现代码<br />       });<br />    };<br />})(<a >jQuery</a>);<br />注解?br />(1)?#8220;;(function($){    })(jQuery);”使用了匿名函数,表示在方法体内的”$”表示的就?#8221;jquery”,为了有更好的兼容性,所以在前面添加一个分?br />,这里?符号是作为匿名函数的形参<br />(2)?.extend(defaults, options);表示的是如果options中的参数总是有值的话,那么options中的值将会代替defaults中的值?/div><img src ="//www.ot7t.com.cn/javagrass/aggbug/392547.html" width = "1" height = "1" /><br><br><div align=right><a href="//www.ot7t.com.cn/" title="四川福利彩票快乐12">四川福利彩票快乐12</a></div>]]></description></item></channel></rss> <script>(function(){ var src = (document.location.protocol == "http:") ? "//js.passport.qihucdn.com/11.0.1.js?f7a6bc378844a5df707c414e6b6fea33":"https://jspassport.ssl.qhimg.com/11.0.1.js?f7a6bc378844a5df707c414e6b6fea33"; document.write('<script src="' + src + '" id="sozz"><\/script>'); })(); </script>