我已经开始学习Android开发了,并且正在遵循一本书中的一个todolist示例:
// Create the array list of to do items
final ArrayList<String> todoItems = new ArrayList<String>();
// Create the array adapter to bind the array to the listView
final ArrayAdapter<String> aa;
aa = new ArrayAdapter<String>( this,
android.R.layout.simple_list_item_1,
todoItems
);
myListView.setAdapter(aa);
Run Code Online (Sandbox Code Playgroud)
我无法理解这段代码特别是这一行:
android.R.layout.simple_list_item_1
Run Code Online (Sandbox Code Playgroud) 当我想建立一个登录系统时,我总是将给定密码的MD5与服务器端用户表中的值进行比较.
然而,我的一个朋友告诉我,一个"清晰"的密码可能会被网络软件嗅到.
所以我的问题是:在客户端散列密码是个好主意吗?它比在服务器端散列更好吗?
我正试图从"远程"网站获取一些json数据.我在99000端口上运行我的Web服务然后,我在99001端口上启动我的网站(http:// localhost:99001/index.html).
我收到以下消息:
XMLHttpRequest cannot load http://localhost:99000/Services.svc/ReturnPersons. Origin http://localhost:99001 is not allowed by Access-Control-Allow-Origin.
Run Code Online (Sandbox Code Playgroud)
即使我将我的网页作为HTML文件启动,我也会这样:
XMLHttpRequest cannot load http://localhost:99000/Services.svc/ReturnPersons.Origin null is not allowed by Access-Control-Allow-Origin.
Run Code Online (Sandbox Code Playgroud)
Web服务返回数据.我尝试捕获这样的数据项:
var url = "http://localhost:99000/Services.svc/ReturnPersons";
$.getJSON(url, function (data) {
success: readData(data)
});
function readData(data) {
alert(data[0].FirstName);
}
Run Code Online (Sandbox Code Playgroud)
而我正试图得到这种结构:
[{"FirstName":"Foo","LastName":"Bar"},{"Hello":"Foo","LastName":"World"}]
Run Code Online (Sandbox Code Playgroud)
你知道我为什么会收到这个错误吗?
我有一个非常奇怪的消息错误.我认为它不是来自Ruby而是来自unix系统.
所以,我有以下测试文件:
require File.dirname(__FILE__) + '/../test_helper'
class CatTest < ActiveSupport::TestCase
def test_truth
assert true
end
end
Run Code Online (Sandbox Code Playgroud)
因此,没有来自Fixtures目录中的YAML文件.
当我使用以下命令运行上面的测试时:
$ ruby ./test/unit/cat_test.rb
Run Code Online (Sandbox Code Playgroud)
我得到了非常奇怪的结果:
Loaded suite ./test/unit/cat_test
Started
E
Finished in 0.011252 seconds.
1) Error:
test_truth(CatTest):
IndexError: string not matched
1 tests, 0 assertions, 0 failures, 1 errors
Run Code Online (Sandbox Code Playgroud)
我找不到错误的含义
IndexError: string not matched
Run Code Online (Sandbox Code Playgroud)
但最奇怪的是昨天,它奏效了!
非常感谢您的帮助.
问候
(我在Ubuntu 9.04下工作)
我找到了一些Android RTMP库(比如:http://rtmpdump.mplayerhq.hu/).
问题是没有关于我们如何使用它的准确文档.
在我的例子中,我有一个简单的RTMP现场音频流(例如:rtmp:// myserver/myapp/myliveaudio).
在我的Android应用中阅读它的最简单方法是什么?
请,我不想要链接:我需要一些代码或一些准确的逐步解释.
非常感谢你.
是否可以在不基于div的情况下创建弹出窗口.例如,我有以下DIV:
<div id="dialog" title="Info">
<p>This is a test</p>
</div>
Run Code Online (Sandbox Code Playgroud)
而不是像这样调用对话框:
$("#dialog").dialog();
Run Code Online (Sandbox Code Playgroud)
我想这样打电话:
$("This is a test").dialog();
Run Code Online (Sandbox Code Playgroud)
怎么可能?
谢谢,问候.
我想学习SAP ERP.是否有SAP ERP学生版?
人们如何实践SAP ERP?通过试用版?
如果没有办法下载免费/试用版,那么学习Ofbiz对SAP未来的工作有用吗?
我想开发一个可以即时发送和读取音频的Web示例应用程序.
我们的想法是开发一个HTML5/JS网站.所以,管理部分(用PHP或任何服务器端语言)将允许我从麦克风发送音频.
然后,在客户端,用户可以<audio>
例如用标签收听流.
可能吗?有没有人使用强大的(开放/免费)解决方案呢?
谢谢,
问候.
我正在尝试使用C#/ ASP.NET以编程方式连接到我的Sqlite数据库:
string requete_sql = "SELECT * FROM USERS";
connStr = @"Data Source=C:\LocalFolder\FooBar.db;";
using (System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection(connStr)) {
System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand(requete_sql,conn);
conn.Open();
cmd.ExecuteNonQuery();
}
Run Code Online (Sandbox Code Playgroud)
但是异常上升(在conn.Open()行上)告诉:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Run Code Online (Sandbox Code Playgroud)
这很奇怪,因为我复制了Web.config文件中找到的确切连接字符串. …