Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
D

David Skelly

@David Skelly
About
Posts
566
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • iterator problem
    D David Skelly

    TorstenH. wrote:

    Why do you add via the iterator? you can add directly to the ArrayList.

    Why are you so insistent on telling this guy how to build his application when you have no idea what his requirements are? There are perfectly valid reasons to insert via a ListIterator. That's why the method exists on the interface.

    Java database help question

  • iterator previous() add()
    D David Skelly

    It may be easier to add at the end of the list, but that doesn't mean it's more efficient. I'm guessing you've never heard of an insertion sort algorithm.

    Java tutorial

  • oracle 11g alias to query
    D David Skelly

    I know, I had to think very carefully about that one. This query used to work but only because it was a bug (in other words you thought it was good, but in fact we knew it was bad), so we fixed the bug and now your query doesn't work anymore (which you may think is bad, but really it's not, because we know it's good). If I follow the argument correctly, it has something to do with ANSI standards: you should not be able to do this in ANSI-standard SQL. So in order for Oracle to be ANSI-standard, they had to stop you from doing this. I think that's the reason.

    Database database oracle help

  • oracle 11g alias to query
    D David Skelly

    The question has been answered on stackoverflow. For anyone who wants to know, the answer is No - this does not work on 11g. For more details why, go here: http://stackoverflow.com/questions/9290653/oracle-11g-alias-to-query[^]

    Database database oracle help

  • iterator previous() add()
    D David Skelly

    Are you saying that the correct solution is always to add to the end of a list and then sort it? That inserting into a specific index position within a list is always wrong?

    Java tutorial

  • iterator previous() add()
    D David Skelly

    TorstenH. wrote:

    To get a real order according to what you expect/want the objects to be in the list you need to sort them

    No, I don't. I can add items to the list at any position I want. One way to do this is to use the overloaded add method, which allows me to specify the index position at which I want to add the item. This allows me to add items to the list in any arbitrary order I want, even if it does not correspond to a natural sort order. For example, I can add numbers in the order 3, 1, 4, 1, 9 which are the digits of pi in sequence. But wait! I hear you cry, that's not right. So now I go back and add the digit 5 into my list at index 4 to make 3, 1, 4, 1, 5, 9. If I add the number at the end, it's wrong. If I sort it, it's wrong. I have to add it into the correct position to get the order I want and expect.

    Java tutorial

  • iterator previous() add()
    D David Skelly

    TorstenH. wrote:

    A List is not a ordered thing.

    Yes, it is. This is how the javadoc for java.util.List defines a List:

    An ordered collection (also known as a sequence).

    The fact that a List is ordered is what distinguishes it from other collection types such as a Bag (although Java does not actually have a Bag type out of the box). I ran a little test to repeat the OP's example using ArrayList and it worked perfectly, exactly as expected, no exception thrown. So I think you are right, there is something else going on here, probably to do with threads - that's typically where you see ConcurrentModification, where one thread is reading the list and another thread is updating it.

    Java tutorial

  • set database value to java script var on Js file
    D David Skelly

    OK, now we know what you want. What's your question?

    Java java javascript html database tools

  • Looking for version control software
    D David Skelly

    There are lots of free version control systems available and to be honest the choice between them usually boils down to personal taste. You don't say what development environment you are using (.NET, Java, Python, PHP, something weird and off the shelf) but I don't think that matters. Subversion is good, mainstream, easy to use (once you get used to it), and has plugins to integrate it with just about any IDE you can think of, and tortoiseSVN is a good GUI for it that integrates well with Windows Explorer. Flavour of the month are tools like Mercurial, Git, DARCS or Bazaar. I don't think DARCS has a GUI available, the others do. Bazaar is popular in the Python world, Mercurial is the trendy VCS to use in Java circles, and Git is the sweetheart of the open source world at the moment. But all of them work well with any language and with binary files like documents or images. And to echo what others here have said: the idea that a small company does not need version control is wrong, wrong, wrong. Lack of proper version control just screams "amateur" and tells me that their development procedures are likely to be pretty sloppy in general. So well done for deciding to use your own.

    Free Tools collaboration question announcement

  • print a report sourced by html page
    D David Skelly

    Waaaaaaaaay too much code. The least you could do is format it as a <code> block.

    Java java html tools help

  • Auto-increment value on UPDATE
    D David Skelly

    One thing to bear in mind: GETDATE isn't particularly accurate at the millisecond level. Although the datetime datatype is accurate to about 3 milliseconds, GETDATE does not give you that level of precision, as far as I can gather from a quick google it is somewhere around 15ms although things like machine load can affect it. If you are expecting to do repeated updates to the same row within a very short time period, this may not give you unique values for your Modified column. If your rows will not be updated that frequently, then it's not a problem. I thought SQL Server supported the ability to automatically timestamp rows when they were updated. The timestamp is just a meaningless number but at least you can check whether a row is the version you expect it to be, and you can also tell the order in which updates were applied. (I'm assuming SQL Server since you haven't said what database you are using.)

    C# database announcement question

  • Implementing AST Vistitor inside or outside the Analysis class
    D David Skelly

    Usage of inner classes is one of those things that some Java coders get very worked up about, for and against. Personally, I don't much like them but they have their uses. There are plenty of opinions on the net about whether to use them, when to use them, how to use them. For every one person who says "Do it this way" you will find another who says "Don't do it that way". The one thing I would say is: if you are making AST Visitor publicly visible outside Analysis, why not just make it an outer class on its own? What do you gain by making it an inner class of Analysis?

    Java java data-structures

  • Implementing AST Vistitor inside or outside the Analysis class
    D David Skelly

    I would turn the question around and ask: why do you want to make the visitor a private inner class? What are you hoping to gain by doing that?

    Java java data-structures

  • How can I run an .exe file in a program in java?
    D David Skelly

    Since 1.5 ProcessBuilder has been recommended over Runtime. Having said that, I still use Runtime because it's what I'm used to and old habits die hard.

    Java question java

  • Conditional clause form two tables in sql server
    D David Skelly

    I'm not sure what you mean when you say that you don't want any rows from tbTasks1. I assume that you mean that you don't want to see the tbTasks1 columns in your result set. In which case you should specify which columns you want, something like:

    select tbDocument.col1, tbDocument.col2, tbDocument.col3
    from tbDocument inner join tbTasks1
    on tbDocument.aKey = tbTasks.aKey
    where tbTasks1.IsDelete = 0

    Edit: which I've just realised is exactly the same answer Damian gave earlier. Doh!

    Database database sql-server sysadmin

  • Conditional clause form two tables in sql server
    D David Skelly

    V@rsh@ wrote:

    This will give same result as op's Query

    No, it won't. There is a big difference between these two queries:

    select * from tbDocument,tbTasks1
    where
    tbTasks1.IsDelete = 0

    select tbDocument.*
    from tbDocument inner join tbTasks1 on tbDocument.FOREIGNKEY = tbTasks1.PRIMARYKEY
    where tbTasks1.IsDelete = 0

    The first one is called a "cartesian join" and is almost always a mistake.

    Database database sql-server sysadmin

  • How to insert same record multiple times in Mysql using single query and not using for loop.
    D David Skelly

    According to the MySQL documentation:

    INSERT statements that use VALUES syntax can insert multiple rows. To do this, include multiple lists of column values, each enclosed within parentheses and separated by commas. Example:

    INSERT INTO tbl_name (a,b,c) VALUES(1,2,3),(4,5,6),(7,8,9);

    Database database mysql tutorial

  • Calling java method from C# .net
    D David Skelly

    This article may get you started: How to Call Java Functions from C Using JNI[^] It's a bit basic but it might at least point you in the right direction. But JNI programming is not straight-forward at the best of times, and the benefits of using a third-party tool are that they have worked out all the difficult bits, and it may end up being cheaper in the long run to buy something off the shelf than to spend ages building your own.

    Java csharp tutorial java algorithms question

  • Calling java method from C# .net
    D David Skelly

    He's already got this answer on the C# forum. I think he has decided to go the JNI route and is looking for pointers on that so has re-posted here.

    Java csharp tutorial java algorithms question

  • Calling java from C#
    D David Skelly

    You have a number of options: - use third-party tool like JNBridge or IKVM or similar - use a web service or other cross-process communication - write your own wrapper DLL using JNI I have no idea what your Zip/Unzip methods do, but one option (which I am sure you have considered) is to bite the bullet and rewrite them in C#. If the Java functionality isn't too complicated, this would be my preferred option if it was my project. Don't forget, you will need a JVM up and running in order to call the Java methods. They will not run natively in .NET.

    C# csharp java tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups