Search Results

Search found 7 results on 1 pages for 'dvanaria'.

Page 1/1 | 1 

  • Cygwin file and directory user and group

    - by dvanaria
    I use Cygwin as my main development environment on both my home and work computers. In order to share files between the two computers, I use Dropbox, which is installed in the following folder on both computers: c:\cygwin\home\dvanaria\dropbox Everything works great, except for one thing. When I'm working on my home computer and do an ls -l on any directory, all the files show up as owned by dvanaria of group Users. But when I work from my work computer, an ls -l shows all files as being owned by Administrators and of group Domain Users. I know Cygwin uses some kind of mapping between Windows users and permissions to the /etc/passwd file. But to be honest I have no idea how this file works or how it maps to Windows under Cygwin. Could anyone help figure this out? The main problem is that I can't edit any files when using my work computer, only read them.

    Read the article

  • Configuring home wireless network

    - by dvanaria
    I'm new to setting up a home wireless network. I have Comcast tv/internet/phone service (modem included) as well as a wireless router. My question is pretty basic. How can I tell the performance of the following parts of the network? 1. incoming internet speed 2. speed of the modem 3. speed of the wireless router I basically want as fast an internet connection as possible, of course, but I'm not sure where to look for the bottleneck (and so, not sure where I can spend some money to speed things up). Right now I'm getting about 36 Mbps (as it shows in Windows). If I run an online speed test (xfinity has one) it shows Average download speed of 14.91 Mbps and Average upload speed of 5.72 Mbps. Thanks for your help.

    Read the article

  • An alternative to reading input from Java's System.in

    - by dvanaria
    I’m working on the UVa Online Judge problem set archive as a way to practice Java, and as a way to practice data structures and algorithms in general. They give an example input file to submit to the online judge to use as a starting point (it’s the solution to problem 100). Input from the standard input stream (java.lang.System.in) is required as part of any solution on this site, but I can’t understand the implementation of reading from System.in they give in their example solution. It’s true that the input file could consist of any variation of integers, strings, etc, but every solution program requires reading basic lines of text input from System.in, one line at a time. There has to be a better (simpler and more robust) method of gathering data from the standard input stream in Java than this: public static String readLn(int maxLg) { byte lin[] = new byte[maxLg]; int lg = 0, car = -1; String line = “”; try { while (lg < maxLg) { car = System.in.read(); if ((car < 0) || (car == ‘\n’)) { break; } lin[lg++] += car; } } catch (java.io.IOException e) { return (null); } if ((car < 0) && (lg == 0)) { return (null); // eof } return (new String(lin, 0, lg)); } I’m really surprised by this. It looks like something pulled directly from K&R’s “C Programming Language” (a great book regardless), minus the access level modifer and exception handling, etc. Even though I understand the implementation, it just seems like it was written by a C programmer and bypasses most of Java’s object oriented nature. Isn’t there a better way to do this, using the StringTokenizer class or maybe using the split method of String or the java.util.regex package instead?

    Read the article

  • Subversion commit conflict

    - by dvanaria
    I use Subversion mainly to synchronize work between two computers I use on a daily basis (and as a backup, since I have a checked-out copy of the repository on each computer). I keep the main repository on a USB flashdrive. I recently came across the following error when trying to commit a current working copy (and both working copies, one on each computer, are identical now): ! C career\UVaOnlineJudge\Log.doc local delete, incoming delete upon update ! C career\UVaOnlineJudge\102\Main.class local delete, incoming delete upon update Without going into more detail about what I did to get the repository out of synch, my question is more general. What does “local delete, incoming delete upon update” mean? What is Subversion expecting that I’m not giving it?

    Read the article

  • Why does the Java Collections Framework offer two different ways to sort?

    - by dvanaria
    If I have a list of elements I would like to sort, Java offers two ways to go about this. For example, lets say I have a list of Movie objects and I’d like to sort them by title. One way I could do this is by calling the one-argument version of the static java.util.Collections.sort( ) method with my movie list as the single argument. So I would call Collections.sort(myMovieList). In order for this to work, the Movie class would have to be declared to implement the java.lang.Comparable interface, and the required method compareTo( ) would have to be implemented inside this class. Another way to sort is by calling the two-argument version of the static java.util.Collections.sort( ) method with the movie list and a java.util.Comparator object as it’s arguments. I would call Collections.sort(myMovieList, titleComparator). In this case, the Movie class wouldn’t implement the Comparable interface. Instead, inside the main class that builds and maintains the movie list itself, I would create an inner class that implements the java.util.Comparator interface, and implement the one required method compare( ). Then I'd create an instance of this class and call the two-argument version of sort( ). The benefit of this second method is you can create an unlimited number of these inner class Comparators, so you can sort a list of objects in different ways. In the example above, you could have another Comparator to sort by the year a movie was made, for example. My question is, why bother to learn both ways to sort in Java, when the two-argument version of Collections.sort( ) does everything the first one-argument version does, but with the added benefit of being able to sort the list’s elements based on several different criteria? It would be one less thing to have to keep in your mind while coding. You’d have one basic mechanism of sorting lists in Java to know.

    Read the article

  • Seeking a GUI auto-format feature for T-SQL

    - by dvanaria
    Is there a freely available GUI tool that will allow interaction with Microsoft SQL Server (via T-SQL) that provides an auto-format feature? I constantly find myself writing queries in SQL Query Analyzer (Microsoft’s standard GUI tool for T-SQL) and cutting/pasting the whole thing into SQLyog (a GUI tool for MySQL), where I can press F12 and have it reformatted into an easily readable, industry standard format. I then cut/paste this back into Query Analyzer to execute. I do this all the time at work and haven’t been able to find an alternative. I realize that SQLyog is no longer free software, but what I’m looking for is a specific alternative to a MS SQL Server interface (with auto-formatting). Thanks in advance for your help.

    Read the article

  • Why doesn't the Java Collections API include a Graph implementation?

    - by dvanaria
    I’m currently learning the Java Collections API and feel I have a good understanding of the basics, but I’ve never understood why this standard API doesn’t include a Graph implementation. The three base classes are easily understandable (List, Set, and Map) and all their implementations in the API are mostly straightforward and consistent. Considering how often graphs come up as a potential way to model a given problem, this just doesn’t make sense to me (it’s possible it does exist in the API and I’m not looking in the right place of course). Steve Yegge suggests in one of his blog posts that a programmer should consider graphs first when attacking a problem, and if the problem domain doesn’t fit naturally into this data structure, only then consider the alternative structures. My first guess is that there is no universal way to represent graphs, or that their interfaces may not be generic enough for an API implementation to be useful? But if you strip down a graph to its basic components (vertices and a set of edges that connect some or all of the vertices) and consider the ways that graphs are commonly constructed (methods like addVertex(v) and insertEdge(v1, v2)) it seems that a generic Graph implementation would be possible and useful. Thanks for helping me understand this better.

    Read the article

1