首先工程Manifest文件要引用:1 2 //获取网络服务 1 public static String getNetworkTypeName(Context context) { 2 if (context != null) { 3 ConnectivityMana...
分类:
移动开发 时间:
2015-05-29 11:31:09
阅读次数:
132
1. private AudioClip SetAudio(string StrPath) { AudioClip clip=null; clip = (AudioClip)Resources.Load(StrPath, typeof(AudioClip)); return clip; }这个是加....
分类:
其他好文 时间:
2015-05-29 11:25:57
阅读次数:
166
本码农最近开发一个VS扩展,其中有些功能涉及到文件的签出。我们公司用的是TFS,遇到了一些奇特的现象,将解决过程记录如下。一、明明在线的连接却Offline属性等于True public static Workspace GetWorkspace(string slnDir) { ...
分类:
Web程序 时间:
2015-05-29 11:25:25
阅读次数:
132
string url = "http://192.168.21.92/" + Str+".png"; www = new WWW(url); yield return www; newTexture = www.texture; byte[] pngData = newTexture.Encode....
分类:
其他好文 时间:
2015-05-29 11:18:31
阅读次数:
144
IO中主要的类和接口File、InputStream、OutputStream、Reader、Writer、Serialzable接口File类File类应用的小例子import java.io.File;
import java.io.IOException;public class FileDemo {
public static void main(String[] args) {...
分类:
编程语言 时间:
2015-05-29 10:11:29
阅读次数:
147
1.新建一个java工程做服务器public class MyServer {
String str ;
public MyServer(){
try {
//服务器端的声明用serversocket,括号里面写端口号,端口号是自己指定的
ServerSocket ss = new ServerSocket(4700...
分类:
移动开发 时间:
2015-05-29 10:08:42
阅读次数:
115
问题
Letter Combinations of a Phone Number
Given a digit string, return all possible letter combinations that the number could represent.
A mapping of digit to letters (just like on th...
分类:
其他好文 时间:
2015-05-29 10:08:13
阅读次数:
115
将python中的字符串的某些字符转化为特定字符是经常用到string库中的maketrans()函数,以及translate()函数。 但是这两个函数比较抽象: maketrans函数产生的对象是一个表,这个数据结构对初学者并不友好。 tranlate(table,
deleteValue)函数所需的第一个参数是个表结构,也就是maketrans的返回值,deleteValue是所要删除的字...
分类:
编程语言 时间:
2015-05-29 10:03:34
阅读次数:
159
Long time=System.currentTimeMillis();
Date date=new Date(time);
String mat="yyyy-MM-dd";
String ma="yyyyMMdd";
SimpleDateFormat format=new SimpleDateFormat(mat);
SimpleDateFor...
分类:
编程语言 时间:
2015-05-29 09:58:37
阅读次数:
125
这种问题是因为你提交的Form中有HTML字符串,例如你在TextBox中输入了html标签,或者在页面中使用了HtmlEditor组件等,解决办法是禁用validateRequest。
如果你是.net 4.0或更高版本,一定要看方法3。
此方法在asp.net webForm和MVC中均适用
方法1:
在.aspx文件头中加入这句:
@ Page validateRequest...
分类:
其他好文 时间:
2015-05-29 09:55:58
阅读次数:
105