我的活动包含GridView,它包含40多个元素.启动活动后,用户最多可以看到15个项目(3行,每行5个项目).我在getView()体中编写了传递给获取View的LogCat数:
Log.i("getView()", "GETTING VIEW_POSITION[" + String.valueOf(position) + "]" + (convertView != null?convertView.toString():"null"));
Run Code Online (Sandbox Code Playgroud)
启动我的应用程序后,我得到这样的日志:
02-09 14:34:56.900: INFO/getView()(388): GETTING VIEW_POSITION[0]null
02-09 14:34:57.300: INFO/getView()(388): GETTING VIEW_POSITION[0]android.widget.FrameLayout@44c7a9c0
02-09 14:34:57.300: INFO/getView()(388): GETTING VIEW_POSITION[1]null
02-09 14:34:57.400: INFO/getView()(388): GETTING VIEW_POSITION[2]null
02-09 14:34:57.510: INFO/getView()(388): GETTING VIEW_POSITION[3]null
02-09 14:34:57.620: INFO/getView()(388): GETTING VIEW_POSITION[4]null
02-09 14:34:57.720: INFO/getView()(388): GETTING VIEW_POSITION[5]null
02-09 14:34:57.840: INFO/getView()(388): GETTING VIEW_POSITION[6]null
02-09 14:34:57.930: INFO/getView()(388): GETTING VIEW_POSITION[7]null
02-09 14:34:58.273: DEBUG/dalvikvm(388): GC freed 3530 objects / 322744 bytes in 270ms
02-09 14:34:58.280: INFO/getView()(388): GETTING VIEW_POSITION[8]null
02-09 14:34:58.300: INFO/getView()(388): GETTING VIEW_POSITION[9]null …Run Code Online (Sandbox Code Playgroud) 我有一个ASP.NET C#应用程序,我总是得到不同的错误,就像你在下面看到的那样.有谁知道如何解决这个问题?谢谢.
Page: http://www.sitename.com/WebResource.axd?d=OYuYekAZWSmOdOaJyDRqKg2&t=634022222718906250
Message: This is an invalid webresource request.
Source: System.Web
Inner Exception:
Stack Trace: at System.Web.Handlers.AssemblyResourceLoader.System.Web.IHttpHandler.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
我使用Entity框架和一个有大约50个表的数据库,它工作得很好.
但只是为了看看更大的数据库在表/实体数量方面会发生什么,我试图将实体框架实现到拥有大约100多个表的数据库.一旦我选择了所有表并点击了Entity Framework Wizard上的Finish按钮,它就挂了我的VS 2010,所以我无法得到任何结果.
我的问题如下;
1.如果我在表/ Entites方面拥有更大的数据库,如上所述,使用实体框架是否是个好主意?
2.使用Entity Framework处理数据库的更好的方法是什么?
3.我应该创建多个具有较少entite的DataContext或EDMX文件?
4.这些不同的DataContext如何相互交互?
5.在使用Entity Framework时,是否有任何建议不应使用的表格?
我正在使用mamp服务器来测试我的所有网页.我是python的新手.我能够在python解释器中运行一个脚本,通常会打印一个hello world.
print "Hello World!"
Run Code Online (Sandbox Code Playgroud)
所以我在名为test.py的文件中使用了相同的行.那我该如何在网上运行呢.
作为python的新手,我尝试了一些正常的东西,将test.py放在/ htdocs/cgi-bin /中并尝试打开它.但它说禁止页面.
有人请帮我做这个工作.谢谢
我需要导航Json结构,因为我将使用导航XML XmlDocument.
结构未知,我需要迭代节点来解析一些数据.
这可能吗?
我知道我可以使用JavaScriptSerializer它将其反序列化为已知类型,但事实并非如此,因为我可以收到任何有效的json.
我正在使用.NET 3.5(SP1),目前无法升级到4.0.
我升级到.NET 4.0以使用动态类型(这是令人敬畏的代码)
如何使用jQuery将两个双引号替换为单引号?
例如:我需要更换
山姆在他的"家""
至
山姆在他的"家"
寻找与此正则表达式类似的内容(将双引号替换为单引号):
mystring.replace(/"/g, "'")
Run Code Online (Sandbox Code Playgroud) 我开始使用Symfony2,我正在尝试理解表单组件.我正在查看此页面http://docs.symfony-reloaded.org/guides/forms/overview.html
我可以理解我们如何创建表单类,但令人困惑的是我们如何在控制器中实际使用这些表单.
$form = ContactForm::create($this->get('form.context'));
Run Code Online (Sandbox Code Playgroud)
有没有人对此代码的form.context部分有更深入的解释,以及在控制器中使用表单的实际过程?
谢谢.
我正在为node.js开发一个web框架.这是代码;
function Router(request, response) {
this.routes = {};
var parse = require('url').parse;
var path = parse(request.url).pathname,
reqRoutes = this.routes[request.method],
reqRoutesLen = reqRoutes.length;
..... // more code
};
Run Code Online (Sandbox Code Playgroud)
我应该将所有var更改为此,如下所示:
function Router(request, response) {
this.routes = {};
this.parse = require('url').parse;
this.path = this.parse(request.url).pathname;
this.reqRoutes = this.routes[request.method];
this.reqRoutesLen = this.reqRoutes.length;
..... // more code
};
Run Code Online (Sandbox Code Playgroud)
任何意见?
我在写一些小红宝石程序的同时正在学习TDD.我有以下课程:
class MyDirectory
def check(dir_name)
unless File.directory?(dir_name) then
raise RuntimeError, "#{dir_name} is not a directory"
end
end
end
Run Code Online (Sandbox Code Playgroud)
而我正试图用这个rspec测试来测试它.
describe MyDirectory do
it "should error if doesn't exist" do
one = MyDirectory.new
one.check("donee").should raise_exception(RuntimeError, "donee is not a directory")
end
end
Run Code Online (Sandbox Code Playgroud)
它永远不会工作,我不明白rspec输出有什么问题.
Failures:
1) MyDirectory should error if doesn't exist
Failure/Error: one.check("donee").should raise_error(RuntimeError, "donee is not a directory")
RuntimeError:
donee is not a directory
# ./lib/directory.rb:4:in `check'
# ./spec/directory_spec.rb:9:in `block (2 levels) in <top (required)>'
Run Code Online (Sandbox Code Playgroud)
我希望这是一件我很想念的简单事,但我只是没有看到它.
我一直都知道网络浏览器可以进行并行下载.但是前几天我听说过流水线.我认为流水线操作只是并行下载的另一个名称,但后来发现即使firefox默认禁用流水线.这些东西有什么区别,如何一起工作?