Search Results

Search found 14 results on 1 pages for 'dhruv arya'.

Page 1/1 | 1 

  • Windows 2003 to log on no matter how it turned off

    - by Arya
    I have a windows server 2003, which I use Teamviewer to connect to. When there is a power failure, and the computer restarts, it will not load Teamviewer. It gets stuck on a screen which asks why the computer was turned off. There is no keyboard or mouse connected to the server and I need Teamviewer to open every time. I don't want the screen asking why it was turned off to show up ever. I turned off Shutdown Event Tracker by doing the following: Open gpedit.msc Computer Configuration Administrative Templates System click Display Shutdown Event Tracker and then selected the disable radio button. Is this enough to prevent that screen to show up again? or is there anything else I need to change?

    Read the article

  • ip route add HOMEIP via SERVERIP disconnects me from ssh

    - by Arya
    I want to use a vpn connection on my Debian server but I get disconnected from ssh if I connect to the vpn. I thought by using the "ip route add" I can prevent getting disconnected from my server and it will continue to use the main connection for communication between my computer and the server, and the vpn for communication with other ips. This is the command I use ip route add PUBLICHOMEIP via PUBLICSERVERIP But I get disconnected after the "ip route add" command too. Am I making a mistake anywhere?

    Read the article

  • Testing for javascript alerts with Capybara

    - by Dhruv
    I'm using Cumcumber + capybara + selenium to run automated testing, but I'm having trouble finding a way to assert that a javascript alert is displayed. This question seems has a solution with selenium, but I can't figure out how to call the selenium object using Capybara. Is there a simple way to test for alerts using Capybara? Or is there a workaround?

    Read the article

  • java - codesprint2 programming contest answer

    - by arya
    I recently took part in Codesprint2. I was unable to submit the solution to the following question. http://www.spoj.pl/problems/COINTOSS/ ( I have posted the link to the problem statement at spoj because the codesprint link requires login ) I checked out one of the successful solutions, ( url : http://pastebin.com/uQhNh9Rc ) and the logic used is exactly the same as mine, yet I am still getting "Wrong Answer" I would be very thankful if someone could please tell me what error I have made, as I am unable to find it. Thank you. My code : import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.text.DecimalFormat; import java.util.StringTokenizer; public class Solution { static double solve( int n, int m ) { if( m==n ) return 0; if( m==0 ) return ( Math.pow( 2, n+1 ) - 2 ); else { double res = 1 + ( Double )( solve( n, m+1 ) + solve( n, 0 ))/2; return res; } } public static void main( String[] args ) throws IOException { BufferedReader br = new BufferedReader( new InputStreamReader( System.in )); int n, m; int t = Integer.parseInt( br.readLine() ); StringTokenizer tok; String s; for( int T=0; T<t; T++ ) { s = br.readLine(); tok = new StringTokenizer( s ); n = Integer.parseInt( tok.nextToken() ); m = Integer.parseInt( tok.nextToken() ); DecimalFormat df = new DecimalFormat(); df.setMaximumFractionDigits(2); df.setMinimumFractionDigits(2); System.out.println( df.format ( solve( n, m ) )); } } }

    Read the article

  • Which is more robust and scalable method?

    - by Dhruv Arya
    I am implementing a distributed chat system, in this system we have the following options : Make the client and server running at each node run as separate threads. The server acting as the receiver will be running as the daemon thread and the client taking the user input as a normal thread. Fork two processes one for the client and one for the server. I am not able to reason out with which one to proceed. Any insight would be great !

    Read the article

  • Running a java program in linux terminal with -class path

    - by Arya
    Hello I've been trying for an hour to run the following program with a the postgresql classpath class Test{ public static void main(String[] args){ try { Class.forName("org.postgresql.Driver"); } catch (ClassNotFoundException cnfe) { System.err.println("Couldn't find Postgresql driver class!"); } } } The program compiled fine with the javac command, but I'm having a hard time running it with the postgresql classpath. I have "postgresql-9.0-801.jdbc4.jar" in the same directory as the file and I tried the following, but non of them worked java -classpath ./postgresql-9.0-801.jdbc4.jar Test java -classpath postgresql-9.0-801.jdbc4.jar Test java -classpath "postgresql-9.0-801.jdbc4.jar" Test What am I doing wrong? Regards!

    Read the article

  • Thread sleep and thread join.

    - by Dhruv Gairola
    hi guys, if i put a thread to sleep in a loop, netbeans gives me a caution saying Invoking Thread.sleep in loop can cause performance problems. However, if i were to replace the sleep with join, no such caution is given. Both versions compile and work fine tho. My code is below (check the last few lines for "Thread.sleep() vs t.join()"). public class Test{ //Display a message, preceded by the name of the current thread static void threadMessage(String message) { String threadName = Thread.currentThread().getName(); System.out.format("%s: %s%n", threadName, message); } private static class MessageLoop implements Runnable { public void run() { String importantInfo[] = { "Mares eat oats", "Does eat oats", "Little lambs eat ivy", "A kid will eat ivy too" }; try { for (int i = 0; i < importantInfo.length; i++) { //Pause for 4 seconds Thread.sleep(4000); //Print a message threadMessage(importantInfo[i]); } } catch (InterruptedException e) { threadMessage("I wasn't done!"); } } } public static void main(String args[]) throws InterruptedException { //Delay, in milliseconds before we interrupt MessageLoop //thread (default one hour). long patience = 1000 * 60 * 60; //If command line argument present, gives patience in seconds. if (args.length > 0) { try { patience = Long.parseLong(args[0]) * 1000; } catch (NumberFormatException e) { System.err.println("Argument must be an integer."); System.exit(1); } } threadMessage("Starting MessageLoop thread"); long startTime = System.currentTimeMillis(); Thread t = new Thread(new MessageLoop()); t.start(); threadMessage("Waiting for MessageLoop thread to finish"); //loop until MessageLoop thread exits while (t.isAlive()) { threadMessage("Still waiting..."); //Wait maximum of 1 second for MessageLoop thread to //finish. /*******LOOK HERE**********************/ Thread.sleep(1000);//issues caution unlike t.join(1000) /**************************************/ if (((System.currentTimeMillis() - startTime) > patience) && t.isAlive()) { threadMessage("Tired of waiting!"); t.interrupt(); //Shouldn't be long now -- wait indefinitely t.join(); } } threadMessage("Finally!"); } } As i understand it, join waits for the other thread to complete, but in this case, arent both sleep and join doing the same thing? Then why does netbeans throw the caution?

    Read the article

  • Drawing rectangles on a grid in a web browser

    - by Dhruv
    I would like to create an online, simple WYSIWYG drawing editor allowing people to draw rectangular shapes. I'm thinking of a grid which the lines and points can snap on to, ensuring that the lines are strictly vertical or horizontal. I will be parsing the rectangular shapes to obtain some area calculations and compute certain things. How can I achieve the drawing ability? The new canvas tag is good but people have been telling me that IE does not support it. I found some Java applets but I have never programmed in Java before. Is there a way to do this using pure javascript or jquery? Does ASP.NET help at all? Thanks.

    Read the article

  • Python Class inherit from all submodules

    - by Dhruv Govil
    I'm currently writing a wrapper in python for a lot of custom company tools. I'm basically going to break each tool into its own py file with a class containing the call to the tool as a method. These will all be contained in a package. Then there'll be a master class that will import all from the package, then inherit from each and every class, so as to appear as one cohesive class. masterClass.py pyPackage - __ init__.py - module1.py --class Module1 ---method tool1 - module2.py --class Module2 ---method tool2 etc Right now, I'm autogenerating the master class file to inherit from the packages modules, but I was wondering if there was a more elegant way to do it? ie from package import * class MasterClass(package.all): pass

    Read the article

  • linebreak in url with Bibtex and hyperref package

    - by Tim
    Why is this item not shown properly in my bibliography? @misc{ann, abstract = {ANN is an implbmentation of nearest neighbor search.}, author = {David M. Mount and Sunil Arya}, howpublished = {\url{http://www.cs.umd.edu/~mount/ANN/}}, keywords = {knn}, posted-at = {2010-04-08 00:05:04}, priority = {2}, title = {ANN.}, url = "http://www.cs.umd.edu/~mount/ANN/", year = {2008} } @misc{Nilsson96introductionto, author = {Nilsson, Nils J.}, citeulike-article-id = {6995464}, howpublished = {\url{http://robotics.stanford.edu/people/nilsson/mlbook.html}}, keywords = {*file-import-10-04-11}, posted-at = {2010-04-11 06:52:28}, priority = {2}, title = {Introduction to Machine Learning: An Early Draft of a Proposed Textbook.}, year = {1996} } EDIT: I am using \usepackage{hyperref}, not \usepackage{url}. I don't know what changes I just made made the first item appear properly now @misc{ann, abstract = {ANN is an implbmentation of nearest neighbor search.}, author = {David M. Mount and Sunil Arya}, howpublished = {\url{http://www.cs.umd.edu/~mount/ANN/}}, keywords = {ann}, posted-at = {2010-04-08 00:05:04}, priority = {2}, title = {The \textsc{A}pproximate \textsc{N}earest \textsc{N}eighbor \textsc{S}earching \textsc{L}ibrary.}, url = "http://www.cs.umd.edu/~mount/ANN/", year = {2008} } EDIT: Since I am using hyperref package, it produces error when using url package together with it. So the two cannot work together? I would like to use hyper links inside pdf file, so I would like to use hyperref package instead of url package. I googled a bit, and try \usepackage[hyperindex,breaklinks]{hyperref}, but there is still no line break just as before. How can I do it? Is there conflict in the packages that I am now using?: \usepackage{amsmath} \usepackage{amsfonts} \usepackage[dvips]{graphicx} \usepackage{wrapfig} \graphicspath{{./figs/}} \DeclareGraphicsExtensions{.eps} \usepackage{fixltx2e} \usepackage{array} \usepackage{times} \usepackage{fancyhdr} \usepackage{multirow} \usepackage{algorithmic} \usepackage{algorithm} \usepackage{slashbox} \usepackage{multirow} \usepackage{rotating} \usepackage{longtable} \usepackage[hyperindex,breaklinks]{hyperref} \usepackage{forloop} \usepackage{lscape} \usepackage{supertabular} \usepackage{amssymb} \usepackage{amsthm}

    Read the article

  • Checking version of Applications installed in ~/Applications with unknown username

    - by ridogi
    I'd like to check the version of Firefox through Apple Remote Desktop of all managed computers. I have written this, but it only checks for Firefox in /Applications /bin/cat /Applications/Firefox.app/Contents/Info.plist | grep -A 1 CFBundleShortVersionString | grep string | sed 's/[/]//' | sed 's/<string>//g' For standard users Firefox auto update breaks if it is in /Applications so I instead have it installed in ~/Applications I'd like to check that copy (if it exists), but I can't specify the path in the command since it is unique to each computer. For example: /Users/jon/Applications/Firefox.app /Users/arya/Applications/Firefox.app Presumably I want to use find and pipe the result to my command. This should work for 10.6 through 10.8

    Read the article

  • C++ execution error: This application has requested the Runtime to terminate it in an unusual way.

    - by user1846547
    I am trying to run a C++ program and am getting the following error message when I try to run the program using - Codeblocks IDE and SQL API: "This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. Process returned 3 (0x3) execution time : 7.547 s Press any key to continue." The program compiles fine but on execution throws this error. My current OS is Windows server 2003 - SP2 (32 bit). Also program compiles and executes fine on Windows XP (32 bit) without any hassles. I checked the services (services.msc) running on my XP machine and compared with Windows server 2003 and found the settings same. Can someone please have a look and help me resolve the issue? thanks, Dhruv

    Read the article

  • How to track things that SHOULD happen, but might not have

    - by Kamiel Wanrooij
    I am running into a couple of issues with some applications we've deployed and maintain. I have the feeling we have approached this with some anti-patterns up to now, but I would like to see how to make this more flexible and stable. In one situation, we have a server at a client which pushes data to us to parse every night (yes, Windows Task Scheduler). This is highly unstable however, so once every month this doesn't happen because of reasons out of our control. This heavily impacts our business since we run with stale data in that situation. In another scenario we have a lot of background job processes that should be running. We already keep them up using bluepill ( http://www.github.com/arya/bluepill ) but obviously restarts happen, both automatically and manually, and people forget things or systems mess up. What I would like to track is events that should occur or should be available. Like the existence of a process, the execution of a program, or the creation/age of a file, and track it when they don't happen or exist. We develop most things in Ruby on Rails, use NewRelic, Bluepill and Munin, and run on Ubuntu. I've been toying around with counting ps aux | grep processname | wc -l in Munin scripts, or capturing the age of a file and raising alerts over 24-26 hours, stuff like that. Is there better tooling to track things that should happen, and raise alerts if they don't? P.S. I know some things are suboptimal, like manually having to define bluepill for applications and then forgetting to do so. The same goes for the push based approach of the first application, a dedicated daemon that manages that on the client side that we control and can track its connection to us might be a much better solution.

    Read the article

1