« first day (957 days earlier)      last day (4206 days later) » 

05:14
hello all
 
7 hours later…
12:37
hi all
does anybody know about hl7/hapi
0
Q: Why NACK message misses to create the Fields 3,4 and 5 in Hapi

RathaThe NACK message generated by HAPI missed to add 3, 4, 5 fields I'm generating the NACK message as follows; Message msg= hl7Msg.generateACK(HL7Constants.HL7_MSA_ERROR_FIELD_VALUE, new HL7Exception(errorMsg)); This returns; following message; MSH|^~\&|||||20130604165513.57...

 
3 hours later…
15:52
Hello
I am a little new to Java
Coming from the .Net enviroment
What to find out is it possible to reference jar files like we reference DLL files in .net
16:31
Busing making java web serves using Eclipse
and I want a to reference jar files that will not be deployed with the war file
but that are on the tomcat server
 
1 hour later…
17:48
Add the jar files in Eclipse by going to Project -> Configure Build Path -> Libraries -> Add External JAR . Or create a user library. If you don't want that exported, click the 'Export and Order' tab and deselect the individual JAR. Hope that helps.
18:06
ok let me try
I have asked the question here as well: stackoverflow.com/questions/16968181/…
mmm it does seem to be deselected
18:21
Even deleting the jar file on tomcat has no affect on the results
 
1 hour later…
19:28
anyone here?
Hey all, whats the difference between Binary Search Tree and Randomized Binary Search Tree?
 
1 hour later…
user1174868
21:00
Does anyone have an example of a linked list?
user1174868
I can't find any online, I want some code to play around with so I can understand how they work but all the code I find is really advanced and has a ton of stuff I don't understand and I can't get any of it to run because it doesn't ahve a main
user1174868
21:15
Or are linked lists something I should implement by myself?
user1174868
I really want to post this questions but I know I will be banned from the site again for asking something simple even though I couldn't find an answer searching older questions
Guys, I have a program that reads txt file and output something to console/command line. I run this JAR file via cmd in windows. there's no output to console, but when I debug this program via Intellij IDEA - the output works perfectly to IDE's console.. what can that be? it compiles the sources with javaw or something?
user1174868
21:58
java is a bad language
22:45
@Jordan - you want to check out docs.oracle.com/javase/6/docs/api/java/util/LinkedList.html for an example of a LinkedList. If you want to see how it's implemented use grepcode.com
user1174868
@selig thanks
user1174868
this place is always pathetically dead
@Jordan. Also, if you find some code you want to try and use you could try writing your own main method and calling some of the methods to see what they do.
user1174868
I tried but I just couldn't get it to run, I am too bad at programming to do that
Fratyr - javaw is another way of running a java program but without a console - if you run your code using this then you won't get anything printed out. Is that what's happening? see
22:51
Whoever correctly answers this question the fastest gets a cookie. Why is line b (slightly) better than line a?

Line a: String query = "SELECT " + param0 + ", " + param1 + "," + param2 + "," + param3 + "," + param4 + " FROM table WHERE id=" + id;

Line b: String query = ((("SELECT " + param0) + (", " + param1)) + (("," + param2) + ("," + param3))) + (("," + param4) + (" FROM table WHERE id=" + id));
Do the brackets change the order in which the String appends happen, thus increasing efficiency?... although probably not, as the current JVM compiles appends down into calls to StringBuilder. Hmm.
nope
jvm only optimizes += to stringbuilder, not String + String
close though
line a and line b have the same number of concat operations, one concat per +
but line a gives you longer junk strings
So that's a memory thing, cool.

Also, string concat is linear isn't it - so for line b the average length of strings being concated is shorter?
yep
not just memory issue
string concat takes O(n) where n is the total length of the two inputs
so for an example with 4 things to concat
linear concatenation will be O(3*n1 + 3*n2 + 2*n3 + 1*n4)
Hmm, actually we're going to have the same complexity for both a and b aren't we - we just make each concat more even.
23:01
the grouped version of concatenation will be O(2*n1 + 2*n2 + 2*n3 + 2*n4)
Specifically, linear concatenation for k elements will be O( n1 * (k-1) + n2 * (k-1) + n3 * (k-2) ...) and grouped concatenation for k elements will be O( n1 * log(k) + n2 * log(k) ...)
which means an amortized of O( n * k ) for linear and O( log(k) n) for grouped
k being the number of elements
and memory complexity is similar
Ah yes - I see, the log(k) is coming from the fact that we're (kind of) laying out the concatenations like a binary tree.

« first day (957 days earlier)      last day (4206 days later) »