我想知道维基百科的"你的意思是......"是如何工作的,如果有一种方法,比如使用API,可以使用它吗?因为我想从输入中获取相应的页面,但是这个页面可能包含错误.例子.是否有直接返回建议的查询?
谢谢您的帮助.
我一直在努力解决这个问题两天没有评估.任何帮助将非常感激.
我安装了以下内容:
日食
Android的SDK-的MacOSX
Android SDK工具
Android 2.2 API 8
Android 2.3.3 API 10
我有一个phonegap项目设置.点击"运行" - >"运行方式" - >"Android应用程序"
在控制台中点击我看到:
[2011-12-14 10:47:38 - Foanar] ------------------------------ [2011-12-14 10:47:38 - Foanar] Android Launch! [2011-12-14 10:47:38 - Foanar] adb is running normally. [2011-12-14 10:47:38 - Foanar] Performing com.phonegap.foanar.App activity launch [2011-12-14 10:47:38 - Foanar] Automatic Target Mode: launching new emulator with compatible AVD '3DEVO' [2011-12-14 10:47:38 - Foanar] Launching a new emulator with Virtual Device '3DEVO' [2011-12-14 10:47:40 - Emulator] 2011-12-14 10:47:40.256 emulator-arm[3278:80b] …
import com.sun.org.apache.xerces.internal.dom.DOMImplementationImpl;
public static Document newDocument( String pName ) {
return DOMImplementationImpl.getDOMImplementation().createDocument(
null,
pName,
DOMImplementationImpl.getDOMImplementation().createDocumentType( pName, null, null ) );
}
Run Code Online (Sandbox Code Playgroud)
我在netbeans中遇到过以下警告
warning: com.sun.org.apache.xerces.internal.dom.DOMImplementationImpl is Sun proprietary API and may be removed in a future release
return DOMImplementationImpl.getDOMImplementation().createDocument(
warning: com.sun.org.apache.xerces.internal.dom.DOMImplementationImpl is Sun proprietary API and may be removed in a future release DOMImplementationImpl.getDOMImplementation().createDocumentType( pName, null, null ) );
Run Code Online (Sandbox Code Playgroud) 我有点困惑,在什么情况下我需要使用Service,asyncTask和Broadcast Receiver等应用程序组件.
任何人都可以解释这些与我需要使用这些组件之间的确切区别吗?
如何从 Java 读取 shell 命令的实时输出
到目前为止,这是我所拥有的,但它会在命令执行后打印:
try {
proc = Runtime.getRuntime().exec("du -d 1 /sdcard/");
InputStream inputStream = proc.getInputStream();
InputStreamReader inputStreamReader = new InputStreamReader(inputStream);
BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
while ((line = bufferedReader.readLine()) != null) {
publishProgress(i);
i++;
System.out.println(line); // it prints all at once after command has been executed.
}
}
catch (IOException e) {
Log.e("du","error "+e.getMessage());
}
Run Code Online (Sandbox Code Playgroud) 我有以下代码:
List<Dictionary<string, string>> allMonthsList = new List<Dictionary<string, string>>();
while (getAllMonthsReader.Read()) {
Dictionary<string, string> month = new Dictionary<string, string>();
month.Add(getAllMonthsReader["year"].ToString(),
getAllMonthsReader["month"].ToString());
allMonthsList.Add(month);
}
getAllMonthsReader.Close();
Run Code Online (Sandbox Code Playgroud)
现在我试图遍历所有月份,如下所示:
foreach (Dictionary<string, string> allMonths in allMonthsList)
Run Code Online (Sandbox Code Playgroud)
如何访问键值?难道我做错了什么?
我想比较两个双重值:
for(int i=0;i<count;i++){
Double i1=Double.parseDouble(pref.getString("longitude"+i, null));
Double i2=Double.parseDouble(pref.getString("latitude"+i,null));
Log.i("Longitude", i1+"");
Log.i("Latitude",i2+"");
Log.i("Longitude1",longitude+"");
Log.i("Latitude1", latitude+"");
Log.i("note",pref.getString("note"+i, null));
if(longitude==i1&&latitude==i2) {
String note=pref.getString("note"+i, null);
txt.setText(note);
}
}
Run Code Online (Sandbox Code Playgroud)
共享首选项中有一个组合与经度和纬度相匹配,但是当我比较它没有为textview txt分配任何值时.但是在log中有纬度和纬度的相同值.任何一个请告诉我这里有什么错误比较为什么它不执行txt.settext语句?
我想触发一个事件,比如当我按下Tab文本框中的键时显示警告消息.
<input type="text" />
$("input").blur(function (e) {
if (e.which == 9)
alert("Hurray!!!");
});
Run Code Online (Sandbox Code Playgroud)
我想要发生的是,无论何时我在文本框中输入,然后点击Tab它都会做一些事情.
我正在使用 jquery1.7.2.min.js
我真的不知道我是否正确行事.
我想使用选择菜单重定向到另一个页面,但是当我选择"主页"时,它不会将我重定向到主页面.什么都没发生...
<select>
<option>Select a menu</option>
<option><%= link_to 'Home', '/' %></option>
</select>
Run Code Online (Sandbox Code Playgroud)
谢谢您的帮助.
我需要在给定年份的每一天中每隔一小时在命令行上打印/打印,例如2011年,但我很难用Java编写代码.
有没有人编码过这个问题?