问题列表 - 第31714页

Does a Buffered ObjectInputStream exist?

I am deserializing an object from a file that is 350KB in size, and its taking rather a long time. My computer science TA told me that there is a way to use a Buffered reader along with the ObjectInputStream to greatly increase performance. I however can not find anything about this on Google.

java performance serialization buffer

10
推荐指数
1
解决办法
1万
查看次数

How can i call another view in a couchdb view?

I have just finished the book "couchdb: a definitive guide" and started to play with design documents. there is however one thing, that I do not understand. All the examples I have seen so far are somewhat linear.

Example:

{
   "_id": "1",
   "_rev": ".....",
   "name": "first",
   "something": "blue",   
   "child": "2"   
}

{
   "_id": "2",
   "_rev": ".....",
   "name": "second",
   "something": "green",   
   "child": "3"   
   "parent" : "1"
   }

{
   "_id": "3",
   "_rev": ".....",
   "name": "second",
   "something": "red",   
   "parent" : "2";
}
Run Code Online (Sandbox Code Playgroud)

I …

json couchdb

5
推荐指数
1
解决办法
3142
查看次数

Standard URL Normalization - Java

I would like to ask if there's any Java package or library that have the standard URL normalization?

5 Components of URL Representation

http://www[dot]example[dot]com:8040/folder/exist?name=sky#head

  1. scheme: http
  2. authority: www.example.com:8040
  3. path: /folder/exist
  4. query: ?name=sky
  5. fragment: #head

The 3 types of standard URL normalization

Syntax-Based Normalization

  • Case normalization – convert all letter at scheme and authority components to lower case
  • Percent-encoded normalization – decode any percent-encoded octet that corresponds to unreserved character, such as %2D for hyphen and %5 for underscore
  • Path segment …

java url normalization

9
推荐指数
2
解决办法
8578
查看次数

Text inputs with maxlength not validating with jQuery Validate

I'm stuck with a problem using jQuery Validate. The thing is I have a few textboxes with their maxlength attributes set. Although they are not required, they still fail to validate when either empty or whitespace.

Sample HTML:

<input type="textbox" id="tbx1" maxlength="100" value="" />

Then, $('#tbx1').valid() returns false. Shouldn't it return true instead? Are there any known workarounds for this?

Oh, and adding $('#myform').validate({ ignore: '#tbx1' }); doesn't quite work for me, because I'm using ASP.NET controls with their …

jquery jquery-validate

8
推荐指数
2
解决办法
2万
查看次数

Tomcat STDOUT as Error in Eclipse

I am configuring Tomcat (5.5) server in Eclipse (3.3.2). Once I add Tomcat and start it, the output is printed in Eclipse Console. This output is printed in RED indicating its Standard Error. Although the server gets started without any error the normal INFO is also marked as error.

Jul 29, 2010 7:06:14 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.5.0_10\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jdk1.5.0_10\bin\..\jre\bin\client;C:\Program …
Run Code Online (Sandbox Code Playgroud)

eclipse tomcat

22
推荐指数
1
解决办法
4980
查看次数

How can I display different phrases depending on the time of day with javascript?

For example, if it's between 8 and 1 pm, it would say "good morning", if it's 1:01-6:00 pm, it would say "good afternoon" and if it's between 6:01-11:59, it would say "good evening"

How do I go about doing that using javascript/jquery?

javascript

2
推荐指数
1
解决办法
208
查看次数

Passing multiple methods (delegate?)

I'm trying to develop a framework for several applications we are developing here and one of the framework classes I am trying to build is for creating a database. Ideally, I would have a method where I could pass it the following two methods: CreateDatabaseTables() and ResetDatabaseValues();

For instance, I might have three applications which I'll call Application1, Application2 and Application3; each one these applications would have a different database schema which I would incorporate into code (e.g. the CreateDatabaseTables …

c#

6
推荐指数
1
解决办法
1231
查看次数

Is it necessary to change the assemblyIdentity's version attribute in a manifest file?

In the following manifest, is it necessary to change the version attribute of the assemblyIdentity element if the assembly version is specified in the project (or, in my case, set as part of a MSBuild task)?

According to this Microsoft Connect page, it looks like the project's version number overrides the manifest's version number. Please correct me if I'm wrong...

<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" 
                xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" 
                xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" 
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="MyApp.exe" type="win32"/>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3"> …
Run Code Online (Sandbox Code Playgroud)

assemblies version manifest

15
推荐指数
1
解决办法
7163
查看次数

在Ruby中比较数组并删除重复项?

比较多个数组并删除重复数据的最简单方法是什么?

所以(在这种情况下数组里面的数组)......

a = [[2, 1], [3, 3], [7, 2], [5, 6]]  
b = [[2, 1], [6, 7], [9, 9], [4, 3]]  
c = [[2, 1], [1, 1], [2, 2], [9, 9]]  
d = [[2, 1], [9, 9], [2, 2], [3, 1]]  
Run Code Online (Sandbox Code Playgroud)

......会出来(优先考虑数组a,然后是b,然后是c,然后是d)

a = [[2, 1], [3, 3], [7, 2], [5, 6]]  
b = [[6, 7], [9, 9], [4, 3]]  
c = [[1, 1], [2, 2]]  
d = [[3, 1]]  
Run Code Online (Sandbox Code Playgroud)

ruby arrays compare duplicates

4
推荐指数
1
解决办法
3956
查看次数

在C#中生成随机浮点数的最佳方法

在C#中生成随机浮点数的最佳方法是什么?

更新:我想从float.Minvalue到float.Maxvalue的随机浮点数.我在一些数学方法的单元测试中使用这些数字.

c# random floating-point

51
推荐指数
3
解决办法
9万
查看次数