Search Results

Search found 188 results on 8 pages for 'sunil agarwal'.

Page 4/8 | < Previous Page | 1 2 3 4 5 6 7 8  | Next Page >

  • Will the values of label and its correspondences change if Image is rotated?

    - by Vinayak Agarwal
    Hi all I have an image in which a text like "VINAYAK 123" is written. The text in the image is at a certain angle, say 30degrees. Now when I extract the labels of the connected components, I get V-1, I-2, N-3, A-4,Y-5,A-6,K-7, 1-8,2-9,3-10( Format: Character- Label No.). Now I rotate the image 30 degrees in the clockwise direction to make the text in the image horizontal. My question is that now if I extract the labels of the connected components, will the character and the label no. correspondence still remain the same? Thanks in advance!

    Read the article

  • WaitForSingleObject( )

    - by Rakesh Agarwal
    I have got myself stuck into a really amazing issue here.The code is like as below. class A { public: A(){ m_event = CreateEvent(NULL, false, false, NULL); // create an event with initial value as non-signalled m_thread = _beginthread(StaticThreadEntry, 0, this); // create a thread } static void StaticThreadEntry(A * obj) { obj->ThreadEntry(); } void ThreadEntry(); }; void A::ThreadEntry() { WaitforSingleObject(m_event,INFINITE); } int main() { A a; SetEvent(m_event); // sets the event to signalled state which causes the running thread to terminate WaitForSingleObject(m_thread, INFINITE); // waits for the thread to terminate return 0; } Problem : When the above code is run,sometimes( 1 out of 5 ) it hangs and the control gets stuck in the call to WaitforSingleObject()( inside the main function ).The code always calls SetEvent() function to ensure that the thread would terminate before calling Wait() function. I do not see any reason why it should ever hang?

    Read the article

  • Ember multiple property changes but want to trigger single event

    - by Ankur Agarwal
    I have a ArrayController for date picker with properties to and from. Now when user selects a new date range from the UI both to and from value changes. So a function which observers on to and from is trigger twice for a single change in date range. I want to trigger the function only one every date range change. Any suggestions how to do that with ember app = Ember.Application.create(); app.Time = Ember.ArrayController.create({ to: null, from: null, rootElement: "#time", debug1: function() { this.set('to', 1); this.set('from', 2); }, debug2: function() { this.setProperties( { 'to': 3, 'from': 4 }); }, debug3: function() { this.beginPropertyChanges(); this.set('to', 5); this.set('from', 6); this.endPropertyChanges(); }, search: function() { alert('called'); }.observes('to', 'from') }); View in JS Fiddle

    Read the article

  • Shell script task status monitoring

    - by Bikram Agarwal
    I'm running an ANT task in background and checking in 60 second intervals whether that task is complete or not. If it is not, every 60 seconds, a message should be displayed on screen - "Deploy process is still running. $slept seconds since deploy started", where $slept is 60, 120, 180 n so on. There's a limit of 1200 seconds, after which the script will show the log via 'ant log' command and ask the user whether to continue. If the user chooses to continue, 300 seconds are added to the time limit and the process repeats. The code that I am using for this task is - ant deploy & limit=1200 deploy_check() { while [ ${slept:-0} -le $limit ]; do sleep 60 && slept=`expr ${slept:-0} + 60` if [ $$ = "`ps -o ppid= -p $!`" ]; then echo "Deploy process is still running. $slept seconds since deploy started." else wait $! && echo "Application ${New_App_Name} deployed successfully" || echo "Deployment of ${New_App_Name} failed" break fi done } deploy_check if [ $$ = "`ps -o ppid= -p $!`" ]; then echo "Deploy process did not finish in $slept seconds. Here's the log." ant log echo "Do you want to kill the process? Press Ctrl+C to kill. Press Enter to continue." read log limit=`expr ${limit} + 300` deploy_check fi Now, the problem is - this code is not working. This looks like a perfectly good code and yet, this is not working. Can anyone point out what is wrong with this code, please.

    Read the article

  • How to do parrallel processing in Unix Shell script?

    - by Bikram Agarwal
    I have a shell script that transfers a build.xml file to a remote unix machine (devrsp02) and executes the ANT task wldeploy on that machine (devrsp02). Now, this wldeploy task takes around 15 minutes to complete and while this is running, the last line at the unix console is - "task {some digit} initialized". Once this task is complete, we get a "task Completed" msg and the next task in the script is executed only after that. But sometimes, there might be a problem with the weblogic domain and the deployment might be failing internally, with no effect on the status of the wldeploy task. The unix console will still be stuck at "task {some digit} initialized". The error of the deployment will be getting logged in a file called output.a So, what I want now is - Start a time counter before running wldeploy. If the wldeploy runs for more than 15 minutes, the following command should be run - tail -f output.a ## without terminating the wldeploy or cat output.a ## after terminating the wldeploy forcefully Point to be noted here is - I can't run the wldeploy task in background, as in that case the user won't get to know when the task is complete, which is crucial for this script. Could you please suggest anything to achieve this?

    Read the article

  • Can we you the attached properties in C# class library?

    - by Manas Agarwal
    Hi I have implemented the Observer Pattern with lazy load. The class that requests the data from the database is a singleton class. Now I am able to load the data from one database (located in one datacenter) very easily. But I need to get the data from other data centers too and display on the same UI. I can somehow pass the address of second data center and fetch the data from there also. But once I will get the data from second data center, it will be added to earlier list only. So later it will be thought for me to distinguish between the data. So I thought of attaching a property with the result set, so that while displaying the output I can show the data for both the data centers separately but on the same UI. I thought of attached property as an option where I can attach the data center name with the list of the data obtained. How is it possible to do in C#? Thanks Manas

    Read the article

  • find a duplicate entry in an array in constant space and O(n) time [closed]

    - by Anubhav Agarwal
    Possible Duplicate: Algorithm to find a duplicate entry in constant space and O(n) time Given an array of N integer such that only one integer is repeated. Find the repeated integer in O(n) time and constant space. There is no range for the value of integers or the value of N For example given an array of 6 integers as 23 45 67 87 23 47. The answer is 23 (I hope this covers ambiguous and vague part) I searched on the net but was unable to find any such question in which range of integers was not fixed. Also here is an example that answers a similar question to mine but here he created a hash table with the highest integer value in C++.But the cpp does not allow such to create an array with 2^64 element(on a 64-bit computer).

    Read the article

  • Vertically align UILabel

    - by Ashish Agarwal
    I am trying to vertically align the text in the UILabel view of my app. The problem is that I want the text to be vertically aligned to the top and the size of the label to be 280 x 150. I am only able to achieve one of these 2 things. If I remove the line [myLabel sizeToFit]; then the alignment of the text is alright but the size is messed up. But if I add the above line, then the alignment is messed up but the size is alright. How do I fix this problem. I've added the code below - CGRect labelFrame = CGRectMake(22, 50, 280, 150); UILabel *myLabel = [[UILabel alloc] initWithFrame:labelFrame]; [myLabel setText:finalRecipe]; [myLabel setBackgroundColor: [UIColor lightGrayColor]]; [myLabel setNumberOfLines:0]; [myLabel sizeToFit]; [self.view addSubview:myLabel];

    Read the article

  • How to parse SQL files using C# ?

    - by Sunil Agarwal
    Hi, Can anyone please help me? I am having bunch of .sql files. I want to parse (validate) those files before executing them on server. I have many online sites which parse the code. But I want to parse the code using C#. So please can you guide. If there is any tool, dll I need to use. I just want to parse the file and not execute it

    Read the article

  • How to undo SQL changes using installer

    - by Sunil Agarwal
    I have installer to install procedures, scripts, views, etc in SQL server 2005/2008. Now I want to add a condition in the installer like if there is any error while installing, I want to undo all the changes done in SQL server. I tried to store the procedures, views, etc which I am changing while installing and reverting them back if I get any error. But am not able to do it the way I want. Can someone guide me if he had done the same thing? To specify I am using WIX installer. Also if someone has tried SMO, it will be of great help.

    Read the article

  • Can an application on the user's computer be started from a Firefox Extension?

    - by Saurabh Agarwal
    For example, can I start an instance of "Calculator.exe" on the user's computer (if it is available of course) upon some particular event in firefox, say clicking of a button? I thought of perhaps linking the extension to Python's subprocess method using XPCOM. But I was wondering whether there is an easier way. Additional information: I do not, at this point need to interact with the application upon its instantiation. Therefore I am looking for a way to open an application that's all. (Though, out of interest, if you have any pointers to interact with the same as well, that would be great) Thanks!

    Read the article

  • Get items selected from another form

    - by Samarth Agarwal
    Hi I have a Windows Form application. I have a Textbox. I want to implement a functionality like when the user clicks on the textbox, a list should be made available to the user and then the item selected from the list should be filled in the textbox. The list should not be available if some other control is focussed other than the textbox. What would be the better way to do this? Should I implement the list in the same form as the textbox or should I use another form for the list? I want to implement a functionality like in the Tally Accounting Software.

    Read the article

  • Problem in installing OpenOffice 3.1 on Solaris 10

    - by Sunil Kumar Sahoo
    I want OpenOffice in Solaris. So I downloaded OpenOffice from the link below. http://download.openoffice.org/other.html#tested-full My OpenOffice is in .tar.gz format so I unzipped the file using gunzip and then untar'ed the file using tar xvf command. Now I got a directory containing packages subfolder. When I cd to that directory I found too many subdirectories. I could not find a single .pkg file or .jar file or .sh file so that I can install the OpenOffice in Solaris 10. How can I install OpenOffice in Solaris 10 given the scenario above?

    Read the article

  • How do I remove a repository of yum

    - by sunil
    When I search for a package in yum(centos 6), it tries to search in a repro named 'c6-media' And it gives a bunch of errors as follows file:///media/CentOS/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/CentOS/repodata/repomd.xml Trying other mirror. file:///media/cdrecorder/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/cdrecorder/repodata/repomd.xml Trying other mirror. file:///media/cdrom/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/cdrom/repodata/repomd.xml Trying other mirror. Error: Cannot retrieve repository metadata (repomd.xml) for repository: c6-media. Please verify its path and try again Obviously the error seems to say that yum is trying to search for the CD/DVD which installed the OS. I do not have it now. All I want to do now is to delete this repository from yum. I went to the package manager graphical tool and removed this from the sources. Seems yum and the graphical tool do not use the same config. This is just my guess.

    Read the article

  • Out of memory Problem

    - by Sunil
    I'm running a C++ program in Ubuntu 10.04 (32-bit system architecture). If I calculate the amount of memory that my program uses, it comes up to 800MB. I have a 4GB RAM in place. But still before the program even finishes it throws an out of memory exception. Why is that happening ? Is it because of the structure of the memory or implementation problems or what could possibly trigger this issue ? I've had seen this problem quite a number of times before but never understood the reason behind it. Have any of you handled this case before ?

    Read the article

  • Connection to mysql server in SYN_SENT

    - by Sunil
    We are facing a strange problem from last few days between our application server and database server(Mysql): connection to database server from application server hangs in SYN_SENT state and after that we are not able to make any connection to database server on mysql port(3306). When we checked the netstat output on database server its in SYN_RECV state. What I can figure out is mysql server is receiving the SYN request and responding also and its not reaching to the client hence SYN_RECV at server side and SYN_SENT at client side. I think SYN_SENT state should go after some time and because of this other db connection attempts to same server should not hang. Does anybody have any idea how can we resolve this issue? Out setup details : Application server: RHEL 5.4, kernel-release = 2.6.18-164.el5, x86_64 Database server: Mysql Version : 5.1.49 RHEL 5.4, kernel-release = 2.6.18-164.el5, x86_64

    Read the article

  • Alternate Out of Order TCP Packets problem

    - by Sunil
    I am having a network of windows and embedded nodes connected on a series of cisco switch. I have been seeing some serious network problems from few days. Used wireshark to capture the network trace and see every alternate tcp packets being marked as "out of order". Any pointers on how to troubleshoot this problem?

    Read the article

  • What is the best way to shutdown hard disk?

    - by Sunil
    Right Now I'm using hdparm command in unix to shut down the hard disk but there are few issues with it. when it wakes back up it consumes lots power. Is there any other way to do it? Many times when I put my hard disk to sleep, I can see few bursts at the beginning and then after a while it goes to sleep. I think its because of the journaling system in ubuntu (which I use) Have anybody encountered that? What would be the best linux/unix operating system (eg: ubuntu/centos/redhat) to work on extensive hard disk operations? I would highly appreciate if you could share the problems you encountered while doing this operation.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8  | Next Page >