Search Results

Search found 232 results on 10 pages for 'vikas anand'.

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

  • Quartz Thread Execution Parallel or Sequential?

    - by vikas
    We have a quartz based scheduler application which runs about 1000 jobs per minute which are evenly distributed across seconds of each minute i.e. about 16-17 jobs per second. Ideally, these 16-17 jobs should fire at same time, however our first statement, which simply logs the time of execution, of execute method of the job is being called very late. e.g. let us assume we have 1000 jobs scheduled per minute from 05:00 to 05:04. So, ideally the job which is scheduled at 05:03:50 should have logged the first statement of the execute method at 05:03:50, however, it is doing it at about 05:06:38. I have tracked down the time taken by the scheduled job which comes around 15-20 milliseconds. This scheduled job is fast enough because we just send a message on an ActiveMQ queue. We have specified the number of threads of quartz to be 100 and even tried with increasing it to 200 and more, but no gain. One more thing we noticed is that logs from scheduler are coming sequential after first 1 minute i.e. [Quartz_Worker_28] <Some log statement> .. .. [Quartz_Worker_29] <Some log statement> .. .. [Quartz_Worker_30] <Some log statement> .. .. So it suggesting that after some time quartz is running threads almost sequential. May be this is happening due to the time taken in notifying the job completion to persistence store (which is a separate postgres database in this case) and/or context switching. What can be the reason behind this strange behavior? EDIT: More detailed Log [06/07/12 10:08:37:192][QuartzScheduler_Worker-34][INFO] org.quartz.plugins.history.LoggingTriggerHistoryPlugin - Trigger [<trigger_name>] fired job [<job_name>] scheduled at: 06-07-2012 10:08:33.458, next scheduled at: 06-07-2012 10:34:53.000 [06/07/12 10:08:37:192][QuartzScheduler_Worker-34][INFO] <my_package>.scheduler.quartz.ScheduledLocateJob - execute begin--------- ScheduledLocateJob with key: <job_name> started at Fri Jul 06 10:08:37 EDT 2012 [06/07/12 10:08:37:192][QuartzScheduler_Worker-34][INFO] <my_package>.scheduler.quartz.ScheduledLocateJob <some log statement> [06/07/12 10:08:37:192][QuartzScheduler_Worker-34][INFO] <my_package>.scheduler.quartz.ScheduledLocateJob <some log statement> [06/07/12 10:08:37:192][QuartzScheduler_Worker-34][INFO] <my_package>.scheduler.quartz.ScheduledLocateJob <some log statement> [06/07/12 10:08:37:220][QuartzScheduler_Worker-34][INFO] <my_package>.scheduler.quartz.ScheduledLocateJob - execute end--------- ScheduledLocateJob with key: <job_name> ended at Fri Jul 06 10:08:37 EDT 2012 [06/07/12 10:08:37:220][QuartzScheduler_Worker-34][INFO] org.quartz.plugins.history.LoggingTriggerHistoryPlugin - Trigger [<trigger_name>] completed firing job [<job_name>] with resulting trigger instruction code: DO NOTHING. Next scheduled at: 06-07-2012 10:34:53.000 I am doubting on this section of the above log scheduled at: 06-07-2012 10:08:33.458, next scheduled at: 06-07-2012 10:34:53.000 because this job was scheduled for 10:04:53, but it fired at 10:08:33 and still quartz didn't consider it as misfire. Shouldn't it be a misfire?

    Read the article

  • Compile C++ file as objective-c++ using makefile

    - by Vikas
    I'm trying to compile .cpp files as objective-c++ using makefile as few of my cpp file have objective code. I added -x objective-c++ as complier option and started getting stray /327 in program error( and lots of similar error with different numbers after /). The errors are around 200. But when I change the encoding of the file from unicode-8 to 16 the error reduces to 23. currently there is no objective-c++ code in the .cpp file but plan to add in future. When i remove -x objective-c++ from complier option ,everything complies fine. and .out is generated. I would be helpful if someone will tell me why this is happening and even a solution for the same Thanks in advance example of my makefile <code> MACHINE= $(shell uname -s) CFLAGS?=-w -framework CoreServices -framework ApplicationServices -framework CoreFoundation -framework CoreWLAN -framework Cocoa -framework Foundation ifeq ($(MACHINE),Darwin) CCLINK?= -lpthread else CCLINK?= -lpthread -lrt endif DEBUG?= -g -rdynamic -ggdb CCOPT= $(CFLAGS) $(ARCH) $(PROF) CC =g++ -x objective-c++ AR = ar rcs #lib name SLIB_NAME=myapplib EXENAME = myapp.out OBJDIR = build OBJLIB := $(addprefix $(OBJDIR)/... all .o files) SS_OBJ := $(addprefix $(OBJDIR)/,myapp.o ) vpath %.cpp path to my .cpp files INC = include files subsystem: make all $(OBJLIB) : |$(OBJDIR) $(OBJDIR): mkdir $(OBJDIR) $(OBJDIR)/%.o:%.cpp $(CC) -c $(INC) $(CCOPT) $(DEBUG) $(CCLINK) $< -o $@ all: $(OBJLIB) $(CLI_OBJ) $(SS_OBJ) $(AR) lib$(SLIB_NAME).a $(OBJLIB) $(CC) $(INC) $(CCOPT) $(SS_OBJ) $(DEBUG) $(CCLINK) -l$(SLIB_NAME) -L ./ -o $(OBJDIR)/$(EXENAME) clean: rm -rf $(OBJDIR)/* dep: $(CC) -MM *.cpp </code>

    Read the article

  • Tree View Control problem with render Control function

    - by vikas
    I am using TreeView Control in Asp.net. I have placed this control inside a panel. The tree control is completely binded (we don’t want populate on demand) with an Xmldatasource during a callback and then I call Panel.renderControl to return the response (HTML) to the client side callback handler. Problem: 1. The tree expand/collapse (on click of plus sign) is causing postback whereas when I normally bind a tree with xml during postback and without using renderControl of container control, the expand/collapse (on click of plus sign) is being handled at client side.

    Read the article

  • Is there Any Limit on stack memory!

    - by Vikas
    I was going through one of the threads. A program crashed because It had declared an array of 10^6 locally inside a function. Reason being given was memory allocation failure on stack leads to crash. when same array was declared globally, it worked well.(memory on heap saved it). Now for the moment ,Let us suppose, stack grows downward and heap upwards. We have: ---STACK--- ---HEAP---- Now , I believe that if there is failure in allocation on stack, it must fail on heap too. So my question is :Is there any limit on stack size? (crossing the limit caused the program to crash). Or Am I missing something?

    Read the article

  • I need a simple Example of JNA which can map char * of c dll.

    - by Vikas Sharma
    I have one dll of cpp and i need to call its function which returns char*. Im using String in native Declaration but getting out put like ???? or some crap thing. I just want to knw that do i have to decode the String.i have already set my system property like System.setProperty("jna.encoding","UTF-8"); Im in big mess. Hope to get Some Positive replies from u guys. Thanks in Advance.. Cheers...!

    Read the article

  • Data entry screen in asp.net MVC

    - by Vikas
    You may thick that it is a silly question but I am confused! I have a situation that I have a Lecture table. And I want to store attendance of who have registered for it. I have master table of People who will register, lecture table, and Important one table is attendance that stores P.k. as f.k. of rest of the table. On Index view of lecture operator will select Attendance and enter attendance information. My problem It show only one page for attendance entry and that page can also open open in EDIT mode, for editing attendance. So what would be the design of the page and process flow of taking attendance?

    Read the article

  • how to check null value of Integer type field in ASP.NET MVC view?

    - by Vikas
    Hi, I have integer type field in database which is having property "Not Null". when i create a view & do a validation, if i left that field blank, it will consider it as 0 so i can not compare it with 0 because if someone insert a value 0 then it will be considered as error! one another problem is that i am using Model error as described in the book "ASP.NET MVC 1.0" @ Scott Gu blog. And I am checking the value in partial class of object (created by LINQ-To-SQL). i.e public partial class Person { public bool IsValid { get { return (GetRuleViolations().Count() == 0); } } public IEnumerable<RuleViolation> GetRuleViolations() { if (String.IsNullOrEmpty(Name)) yield return new RuleViolation("Name is Required", "Name"); if (Age == 0) yield return new RuleViolation("Age is Required", "Age"); yield break; } partial void OnValidate(ChangeAction action) { if (!IsValid) throw new ApplicationException("Rule violations prevent saving"); } } There is also problem with range. Like in database if i declared as smallint i.e. short in c#, now if i exceed that range then it gives error as "A Value is reguired". so finally is there any best way for validation in ASP.NET MVC?

    Read the article

  • Apache redirection problem!!!!

    - by vikas
    Hi guys, I am setting up a pre-built website built in php. The site was actually hosted on the linux server. Now I am trying to set it up on a Window machine with WAMP server. In this website almost every page request passes through a particular file called redirect(which is basically a php file without extension). Now the problem is that when I inspected the configuration(httpd.conf, apache.conf,.htaccess, vhost.conf etc) of the apache server on the linux machine, I nowhere found the redirect rules for doing so. Neither mod_rewrite nor mod_alias rules for this redirection were found there. But is still redirects the request properly. I also noticed that Zend Framework library is there in the exact same directory where the redirect file is. This library is included in the include_path in php.ini. However, the web site is still not developed using Zend MVC and I have seen NO proof of ZEND being used there. So I am really confused how this redirection is working there? I am unable to set up this on window machine without rewrite rules of mod_rewrite or mod_alias. Do you guys know any alternative of both the said modules for redirection? I know the site is really weird, but i have to set it up. :) Thanks in advance for your help.

    Read the article

  • maximum memory which malloc can allocate!

    - by Vikas
    I was trying to figure out how much memory I can malloc to maximum extent on my machine (1 Gb RAM 160 Gb HD Windows platform). I read that maximum memory malloc can allocate is limited to physical memory.(on heap) Also when a program exceeds consumption of memory to a certain level, the computer stops working because other applications do not get enough memory that they require. So to confirm,I wrote a small program in C, int main(){ int *p; while(1){ p=(int *)malloc(4); if(!p)break; } } Hoping that there would be a time when memory allocation will fail and loop will be breaked. But my computer hanged as It was an infinite loop. I waited for about an hour and finally I had to forcely shut down my computer. Some questions: Does malloc allocate memory from HD also? What was the reason for above behaviour? Why didn't loop breaked at any point of time.? Why wasn't there any allocation failure?

    Read the article

  • A question related to UIButton

    - by vikas Savardekar
    I have taken customview in my code for UIButton. UIButton *button= [[UIButton buttonWithType:UIButtonTypeRoundedRect] retain]; //(UIButton *)newCell.accessoryView; [button addTarget:self action:@selector(checkedimage:) forControlEvents:UIControlEventTouchUpInside]; -(IBAction)checkedimage:(id)sender { NSLog(@"checkedimage"); if(checkImage == NO) { newImage = [UIImage imageNamed:@"a.png"]; checkImage=YES; } else if(checkImage==YES) { newImage = [UIImage imageNamed:@"b.png"]; checkImage=NO; } } but when i click on UIButton it is not going to action checkedimage why?

    Read the article

  • Absolute Centering Not Working in IE

    - by Vikas Ghodke
    I have a div which is centered in parent div, it working on all browser but not in ie, can you help me out with this. JSFIDDLE span.qbg3 { display: block; text-align: center; background: url(http://powerblanket.com/may2014/wp-content/uploads/2014/05/qbg3.png) no-repeat center center; background-size:cover; padding: 50px 20px; color: #fff; font-weight: 400; font-size: 30px; position: relative; margin-top: -20px; min-height: 350px; } span.inqbg3 { max-height: 100px; display: block; text-align: center; color: #fff; font-weight: 400; font-size: 40px; position: absolute; margin: auto; top: 0px; right: 0; left: 0; bottom: 0px; background: rgba(0, 0, 0, 0.5); max-width: 700px; padding: 35px 0; } span.inqbg3 a { color: #fff; }

    Read the article

  • SQL Server 2005: Insert a row in a table and update the same row

    - by vikas
    eg:table pkey --guid annualpay datefrom dateto--if null means current record percentannualincrease percent annual increase will be calculated only if there is a difference in newly inserted and previously existing last differing value. percentannualincrease = ([newannualpay-just previous pay(if different from current)]/newannualpay)*100 eg newid(),5000,today,null,0--very first row newid(),5000,today+1,null(*),0 newid,5500,today+2,null(*),?????????????--> need to be calculated before insert *--insert will close the previous record by updating dateto=null to todays date How can I do this stuff in a trigger???

    Read the article

  • Minimize the sequence by putting appropriate operations ' DP'

    - by Vikas
    Given a sequence,say, 222 We have to put a '+' or '* ' between each adjacent pair. '* ' has higher precedence over '+' We have to o/p the string whose evaluation leads to minimum value. O/p must be lexicographically smallest if there are more than one. inp:222 o/p: 2*2+2 Explaination: 2+2+2=6 2+2*2=6 2*2+2=6 of this 3rd is lexicographically smallest. I was wondering how to construct a DP solution for this.

    Read the article

  • Page Fault Interrupt Problems

    - by Vikas
    This is a statement referring to problem caused by page fault:(from Silberschatz 7th ed P-310 last para) 'We cant simply restart instructions when instruction modifies several different location Ex:when a instruction moves 256 bytes from source to dest and either src or dest straddles on page boundary , then,after a partial move, if a page fault occurs, 'we can't simply restart the instructions' My question is Why not? Simply restart the instruction again do the same copy after page is in. Is there any problem in it?

    Read the article

  • Foreach loop problem for Iqueyable object

    - by Vikas
    Hi, Can we use foreach loop for Iqueryable object? I'd like to do something as follow: query = Iqueryable<Myclass> = objDataContext.Myclass; // objDataContext is an object of LINQ datacontext class int[] arr1 = new int[] { 3, 4, 5 }; foreach (int i in arr1) { query = query.Where(q => (q.f_id1 == i || q.f_id2 == i || q.f_id3 == i)); } It gives me wrong output as each time value if i is changed.

    Read the article

  • Removing spaces from columns of a CSV file in bash

    - by vikas ramnani
    I have a CSV file in which every column contains unnecessary spaces(or tabs) after the actual value. I want to create a new CSV file removing all the spaces using bash. For example One line in input CSV file value1 ;value2 ;value3 ;value4 same line in output csv file should be value1;value2;value3;value4 I tried using awk to trim each column but it didnt work. Can anyone please help me on this ? Thanks in advance :)

    Read the article

  • Unable to establish the connection to the file in BlackBerry

    - by Vikas
    I have tried the example code on SO to read the contents from the file in the resource directory in BlackBerry. But I am having an issue with the FileConnection. I get the following error: File system error (1003) I tried the example from here. I want only the read functionality, the file I want to read is in CSV format as a .txt file placed in the /res/test.txt. public class FileDemo extends MainScreen { public FileDemo() { setTitle("My Page"); String str = readTextFile("file:///test.txt"); System.out.println("Contents of the file::::::: " + str); } public String readTextFile(String fName) { String result = null; FileConnection fconn = null; DataInputStream is = null; try { fconn = (FileConnection) Connector.openInputStream(fName); is = fconn.openDataInputStream(); byte[] data = IOUtilities.streamToBytes(is); result = new String(data); } catch (IOException e) { System.out.println(e.getMessage()); } finally { try { if (null != is) is.close(); if (null != fconn) fconn.close(); } catch (IOException e) { System.out.println(e.getMessage()); } } return result; } } Any suggestions/advice on a better approach or as to how I can get this working??

    Read the article

  • Unexpected behaviour when dynamically add node in HAproxy server

    - by Anand Soni
    I wanted to use HAProxy for my web app for load balancing purpose. I am trying to add a new rabbitmq node dynamically in HAProxy server using command : haproxy -p /var/run/haproxy.pid -sf $(cat /var/run/haproxy.pid). I am doing tcp connection mode with leastconn balance algorithm in load balancing. What is expected is when there is 3 connection in one rabbitmq, I add a new rabbit server in HAProxy server. so the next connection would pass to 2nd rabbitmq server which is not happening in my case. It distributes the connection in haphazardly manner. Here is my config file: defaults log global mode http option httplog option dontlognull retries 3 option redispatch maxconn 2000 contimeout 5000 clitimeout 5000 srvtimeout 5000 listen rabbitmq 0.0.0.0:5672 mode tcp stats enable balance leastconn option tcplog server rabbit01 xx.xx.xx.xx:5672 check server rabbit02 xx.xx.xx.xx:5672 check listen tomcatq 0.0.0.0:80 mode http stats enable balance roundrobin stats refresh 10s stats refresh 10s stats uri /lb?stats stats auth admin:admin option httplog What is the problem causing this behavior? Any suggestion will appreciated.

    Read the article

  • Connecting CR 2008 and Oracle database: "TNS file could not be opened"

    - by anand
    I am trying to connect to an Oracle database using CR 2008 drivers for oracle (specifically OLE db driver). When I try to connect I provide the correct connection parameters however I keep getting "TNS file could not be opened" error. I am very confused about this message does this mean I am missing some component? From my understanding the driver should be able to connect. Currently on the computer running Crystal reports there is only has Crystal reports 2008 installed. Do i need to install the oracle instant client on the CR computer in order to make a proper connection? Any suggestions would be greatly appreciated!

    Read the article

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