Posts

Java, sockets, BufferedReader, and readline hang ... :( -

I am not a complete Java programmer, I actually try to completely avoid it, but it is necessary that I Use for a class (in the meaning of school). The teacher needs to use other things like socket (), buffed reader (), printware () and readread () method of buffed reader (). Actually, the problem I am having is the documentation clearly states that readLine should return an empty at the end of the input stream, but this is not happening. socket link = new socket (this.address, 80); BufferedReader = New in BufferedReader (New InputStreamReader (link.getInputStream ()); PrintWriter out = new printIter (new print order (link.getOutputStream (), true)); outside. Print ("gulla blah blah blah"); // http request by hand.flush (); // Please send when sending ((s = in.readline ()) = null) {// HTML prints correctly, hooray !! Println (s); } Instead of ending HTML, I get a blank line, a 0 and a second blank row, and then in the next. Why? Where's my nip? I tried. Close...

junit - Easiest way to unit test SWT and Swing apps in a headless environment? -

I'm testing some SWT and swing codes for a project on the unit and on which I am working and The tests run fine as long as I am running them from eclipse. As soon as I run them in my Hudson environment, because Hudson runs the test without head mode. What is the best way to do this? Open source solutions only please (because the project is open source) You can run (X virtual framebuffer, an X11 server which performs all graphical operations in memory) And it works fine. But with Hudson's plugin there is another solution for Xvnc. Just install the plugin and check the checkbox in the Job Configuration screen: Hudson will automatically start an Xvnc session and DISPLAY will set the environment variable to the appropriate value and then The closure will be closed when the session is completed One of the advantages is that the Xvfb method is that if you have more than one swing / SWT projects, each build has its own X session. This is not an issue at all, but it ...

svn - How can I find commits with commit messages less than N characters? -

Is it possible to get a complete list of commitments, their amendment numbers and the user in any modern SCM when a specific Character is counted? I have to find out that any of the developers - side down with useless commit is giving down. Disclamer: I understand that less committed messages can sometimes be useful, but when you teach people to use version control for the first time Trying to Is there anything like this? Change any modification category and 80 with HEAD which should also be your minenum message message character. git rev-list HEAD | Xargs -iX sh -c \ "if test \" \ $ (git show --quiet --pretty = format:% s% n% b x | wc -c) \ "-lt 80; then echo x; Fi "

C# SQLite Bulk Insert or Parameterized Insert Efficenecy -

I have datatel that I want to save in a SQLite database table. This is my dilemma, I do not know how Have to go Most datatiles will have 65,000 rows and maybe 12 columns. So, will it be faster to save datatel to the CSV file and then put it in the SQLite in bulk (which I do not know how to do) or through all the columns it gets faster in the loop Is there a better solution than what I have listed? Thank you, thank you, Nathan check out. is a SqlBulkCopy in the net framework category, which provides fun sitinetal for bulk inserts. Unfortunately this is supported for the SQL Server only database. However, by touching some parameters on your insertion, you will make a lot of bulk in bulk, no single demonstration is involved in what people are reporting.

ruby - Default task for namespace in Rake -

Something like this has been given: namespace: my_tasks do the job: foo do Do some tasks: Do the bar do_something_else Finish: all = & gt; [: Foo,: bar] end How do I make : all the default task, so that rake my_tasks is running Call (instead of calling rake my_tasks: all )? Put it outside the named location like this: Namespace: My_tasks work: foo do dos Finish a few tasks: Do not do do_something_else termination tasks: all = & gt; Apart from this, if your tasks require a logic: namespace: ["My_tasks: foo", "my_tasks: bar"] : My_tasks work: Foo ,: arg1 ,: arg2 do | T, args | Do_something End Function: Bar ,: arg1,: arg2 do | T, args | Do_something_else end-end work: my_tasks ,: arg1 ,: arg2 do | T, args | Rack :: Task ["my_tasks: foo"]. Call (args.arg1, args.arg2) Reiki :: Task ["my_tasks: bar"]. Call (args.arg1, args.arg2) termination Note that in the second example, you can call the name of namespace, i.e....

javascript - Jquery tranversing DOM to find consecutives values -

Thanks for watching, all helpful answers have been voted. This is my markup. I am constantly trying to merge with two divs cmk1 and cmk2 content right and here in consecutive order. Should not match div id 1 because one is correct but not here . should not match div id 3 because there is a here but there is no correct I'm trying to find something that looks like div id2 as correct as here . In addition, the text should be accurate: & lt; Div & gt; More accurate than & lt; / Div & gt; , even if the word right is the most effective way to do this? Update: I was just an idea, me every class = cmk1 . If it matches correctly, then I can select its Next (Semic2) and if that also matches, I want it. But how can I do this while loop in jquery? And most importantly, how do I get out of it? & lt; Div class = "sep" id = "1" & gt; & Lt; Div class = "cmk1" & gt; True & lt; / D...

git rebase - Change timestamps while rebasing git branch -

I have reconstructed the commitment in a branch before it is going to be public, mixed order is just one among them I'll be in seconds only. Obviously these time stamps will not be correct either, but because it is the time when things are public, I like it in mixed history, timetable. How do I get to create a new timestamp while leaking? git rebase --ignore-date