Search Results

Search found 5313 results on 213 pages for 'steve care'.

Page 47/213 | < Previous Page | 43 44 45 46 47 48 49 50 51 52 53 54  | Next Page >

  • Load Testing Java Web Application - find TPS / Avg transaction response time

    - by Steve
    I would like to build my own load testing tool in Java with the goal of being able to load test a web application I am building throughout the development cycle. The web application will be receiving server to server HTTP Post requests and I would like to find its starting transaction per second (TPS) capacity along with the avgerage response time. The Post request and response messages will be in XML (I dont' think that's really applicable though :) ). I have written a very simple Java app to send transactions and count how many transactions it was able to send in one second (1000 ms) however I don't think this is the best way to load test. Really what I want is to send any number of transactions at exactly the same time - i.e. 10, 50, 100 etc. Any help would be appreciated! Oh and here is my current test app code: Thread[] t = new Thread[1]; for (int a = 0; a < t.length; a++) { t[a] = new Thread(new MessageLoop()); } startTime = System.currentTimeMillis(); System.out.println(startTime); for (int a = 0; a < t.length; a++) { t[a].start(); } while ((System.currentTimeMillis() - startTime) < 1000 ) { } if ((System.currentTimeMillis() - startTime) > 1000 ) { for (int a = 0; a < t.length; a++) { t[a].interrupt(); } } long endTime = System.currentTimeMillis(); System.out.println(endTime); System.out.println("Total time: " + (endTime - startTime)); System.out.println("Total transactions: " + count); private static class MessageLoop implements Runnable { public void run() { try { //Test Number of transactions while ((System.currentTimeMillis() - startTime) < 1000 ) { // SEND TRANSACTION HERE count++; } } catch (Exception e) { } } }

    Read the article

  • VB.NET Window Screen Capture (ALT+PRINTSCREEN)

    - by Steve Thomas
    Hi, I found that code somewhere and I find it quite useful but I would like to find a way to make it work so it capture only the given window target. Maybe with a processID or Window Name. Even if that window is not active. I do not want to make that window active but want to get a screen capture like if I was doing Alt+PrintScreen on it. Here is the code that works for full Screen Capture Private bmpScreenShot As Bitmap Private gfxScreenshot As Graphics bmpScreenShot = New Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, PixelFormat.Format32bppArgb) gfxScreenshot = Graphics.FromImage(bmpScreenShot) gfxScreenshot.CopyFromScreen(Screen.PrimaryScreen.Bounds.X, Screen.PrimaryScreen.Bounds.Y, 0, 0, Screen.PrimaryScreen.Bounds.Size, CopyPixelOperation.SourceCopy) bmpScreenShot.Save(fileName, ImageFormat.Png) I use the Visual Basic 2008 Express Thank you in advance!

    Read the article

  • Code Coverage Analysis for Embedded C++ projects

    - by Steve Hawkins
    I have recently started working on a very large C++ project that, after completing 90% of the implementation, has determined that they need to demonstrate 100% branch coverage during testing. The project is hosted on an embedded platform (Green Hills Integrity). I'm looking for suggestions and experiences from others on StackOverflow that have used code coverage products in similar environments. I'm interested in both positive and negative comments regarding these types of tools.

    Read the article

  • ASP.NET Compiles on page load, but not on Ctrl+Shift+B

    - by Steve Syfuhs
    during debug in cassini the code runs fine, but when I explictly build it, the compile breaks on an object saying it can't find the reference. During a breakpoint shows the proper reference to the object, and I can view the debug intellisense. The code itself is simple using CFTW.Controls; ... controls_LatestPresentations c = LoadControl("~/controls/LatestPresentations.ascx") as controls_LatestPresentations; c.loadContent(); return RenderControl(c); The control is a simple user control, with the namespace CFTW.Controls. The calling code is in a webcontrol, which lives in the same folder. I even tried adding the calling code to the same namespace.

    Read the article

  • Giving writing permissions for IIS user at Windows 2003 Server

    - by Steve
    I am running a website over Windows 2003 Server and IIS6 and I am having problems to write or delete files in some temporary folder obtaining this kind of warmings: Warning: unlink(C:\Inetpub\wwwroot\cakephp\app\tmp\cache\persistent\myapp_cake_core_cake_): Permission denied in C:\Inetpub\wwwroot\cakephp\lib\Cake\Cache\Engine\FileEngine.php on line 254 I went to the tmp directory and at the properties I gave the IIS User the following permissions: Read & Execute List folder Contents Read And it still showing the same warnings. When I am on the properties window, if I click on Advanced the IIS username appears twice. One with Allow type and read & execute permissions and the other with Deny type and Special permissions. My question is: Should I give this user not only the Read & Execute permissions but also this ones?: Create Attributes Create Files/ Write Data Create Folders/ Append Data Delete Subfolders and Files Delete They are available to select if I Click on the edit button over the username. Wouldn't I be opening a security hole if I do this? Otherwise, how can I do to read and delete the files my website uses? Thanks.

    Read the article

  • Dll only loads correctly via LoadLibrary?

    - by Steve
    I'm trying to use dbghelp.dll. If I set it up in the VS2008 properties to point to the correct library and header file, and put dbghelp.dll in the same directory as the executable, one of the functions in the dll fails. If I LoadLibrary the dll, everything that function works. I've looked at the header that gets included via the VS option, and the right one is being pulled in. The correct lib is being pulled in (checked via /verbose option), and depends.exe shows the correct dll is loaded. Does anyone know why I can't get this to work? I'll probably just go with LoadLibrary, but I'm genuinely stumped on this one. EDIT: SymfromAddr fails with an "error 87", whatever that is. If I load the dll via LoadLibrary, it works.

    Read the article

  • When should I use Yield in c#?

    - by Steve
    I have a vage understanding of the Yield keyword in c#, but I haven't yet seen the need to use it in my code. This probably comes from a lack of understanding of it.. So; What are some typical good usages of Yield?

    Read the article

  • Redirect based on referer's url

    - by steve
    I am trying to redirect visitors to a site based on their referring url. Here is the script: php $domain='blankds.com'; $referrer=$_SERVER['HTTP_REFERER']; echo $referrer; if (preg_match("/$domain/",$referrer)) { header('Location: http://www.blackisgreen.org/page_1.php'); } else { header('Location: http://www.blackisgreen.org/page_2.php'); }; Errors: I get a "Warning: cannot modify header" error because I am echoing $referrer before sending headers. If I remove the echo the script does not work. Any suggestions?

    Read the article

  • OutputDebugString + DebugView = not tabs!

    - by Steve
    I am dumping \t delimited data using using OutputDebugString and then use ex-Sysinternals DebugView to capture it. The problem is that all the data in DebugView appear to be space delimited, hence I need to perfrorm CTRL+H "\x20" "t" to replace spaces with the tabs before I can use it (I really need tab delimited data). Is there anyway to tell DebugView not to replace tabs with spaces? Or maybe there is a better tool available to capture output of the OutputDebugString function? Any ideas are very welcome!

    Read the article

  • CakePHP: What to use for MySQL users & permissions?

    - by Steve
    I'm getting ready to deploy a CakePHP site for the first time. I'm using the site with a MySQL database, and I'm still a little unclear about the proper use of users & permissions for MySQL -- I'm talking about the "login" and "password" fields that appear in app/config/database.php. During development, I've been using 'root' and 'root' -- but I'm pretty sure that can't be a good idea. So my question is: what are the best practices for assigning a MySQL user to a CakePHP app, and what MySQL privileges should be assigned to it?

    Read the article

  • How to print an isosceles triangle

    - by Steve
    Hello, I'm trying to learn programming by myself, I'm working from a book that has the following problem which I can't solve: Allow the user to input two values: a character to be used for printing an isosceles triangle and the size of the peak for the triangle. For example, if the user inputs # for the character and 6 for the peak, you should produce the following display: # ## ### #### ##### ###### ##### #### ### ## # This is the code I've got so far: char character; int peak; InputValues(out character, out peak); for (int row = 1; row < peak * 2; row++) { for (int col = 1; col <= row; col++) { Console.Write(character); } Console.WriteLine(); } Console.Read() // hold console open Thanks in advance.

    Read the article

  • how to increment a javascript variable title that is within a php while loop

    - by steve
    I'm building multiple countdown clocks on one page. The number of countdown clocks varies from day to day so I need to call javascript several times from within "while" code in php to produce different clocks. The following code works but it's based on knowing how many clocks are needed before I start: <script language="javascript" src="countdown.js"></script> <script language="javascript"> var cd1 = new countdown('cd1'); cd1.Div = "clock1"; cd1.TargetDate = "<?php echo "$clocktime"; ?>"; cd1.DisplayFormat = "%%D%% days, %%H%% hours, %%M%% minutes, %%S%% seconds until event AAA happens"; </script> <div id="clockwrapper"><div id="clock1">[clock]</div></div> <script language="javascript" src="countdown.js"></script> <script language="javascript"> var cd2 = new countdown('cd2'); cd2.Div = "clock2"; cd2.TargetDate = "02/01/2011 5:30:30 PM"; cd2.DisplayFormat = "%%D%% days, %%H%% hours, %%M%% minutes, %%S%% seconds until event BBB happens..."; </script> <div id="clockwrapper"><div id="clock2">[clock]</div></div> So if I keep on calling the javascript above (the code with cd1 in it) all previous "cd1" clocks change to the latest clock because it is being overwritten. Somehow I need to call javascript from within my "while" loop in php and have cd1 become cd2, then cd3 so that the clocks work as they're supposed to. How do I go about doing this? I don't know how to call the javascript several times and increment the variable cd1 within the javascript. I tried something like this but couldn't get it to work. $id=mysql_result($result,$i,"id"); while($id){ $cd = ("$cd"."$id"); ?> <script language="javascript" src="countdown.js"></script> <script language="javascript"> var <?php echo "$cd"; ?> = new countdown('<?php echo "$cd"; ?>'); .... </script> <div id="clockwrapper"><div id="<?php echo "$cd"; ?>">[clock]</div></div> <?php $id=mysql_result($result,$i,"id"); } ?> Surely there is some easy way of getting around this that I don't know about. Thanks

    Read the article

  • What is the subject of Rspecs its method

    - by Steve Weet
    When you use the its method in rspec like follows its(:code) { should eql(0)} what is 'its' referring to. I have the following spec that works fine describe AdminlwController do shared_examples_for "valid status" do it { should be_an_instance_of(Api::SoapStatus) } it "should have a code of 0" do subject.code.should eql(0) end it "should have an empty errors array" do subject.errors.should be_an(Array) subject.errors.should be_empty end #its(:code) { should eql(0)} end describe "Countries API Reply" do before :each do co1 = Factory(:country) co2 = Factory(:country) @result = invoke :GetCountryList, "empty_auth" end subject { @result } it { should be_an_instance_of(Api::GetCountryListReply) } describe "Country List" do subject {@result.country_list} it { should be_an_instance_of(Array) } it { should have(2).items } it "should have countries in the list" do subject.each {|c| c.should be_an_instance_of(Api::Country)} end end describe "result status" do subject { @result.status } it_should_behave_like "valid status" end end However if I then uncomment the line with its(:code) then I get the following output AdminlwController Countries API Reply - should be an instance of Api::GetCountryListReply AdminlwController Countries API Reply Country List - should be an instance of Array - should have 2 items - should have countries in the list AdminlwController Countries API Reply result status - should be an instance of Api::SoapStatus - should have a code of 0 - should have an empty errors array AdminlwController Countries API Reply result status code - should be empty (FAILED - 1) 1) NoMethodError in 'AdminlwController Countries API Reply result status code should be empty' undefined method code for <AdminlwController:0x40fc4dc> /Users/steveweet/romad_current/romad/spec/controllers/adminlw_controller_spec.rb:29: Finished in 0.741599 seconds 8 examples, 1 failure It seems as if "its" is referring to the subject of the whole test, namely AdminLwController rather than the current subject. Am I doing something wrong or is this an Rspec oddity?

    Read the article

  • How can I concisely copy multiple SQL rows, with minor modifications?

    - by Steve Jessop
    I'm copying a subset of some data, so that the copy will be independently modifiable in future. One of my SQL statements looks something like this (I've changed table and column names): INSERT Product( ProductRangeID, Name, Weight, Price, Color, And, So, On ) SELECT @newrangeid AS ProductRangeID, Name, Weight, Price, Color, And, So, On FROM Product WHERE ProductRangeID = @oldrangeid and Color = 'Blue' That is, we're launching a new product range which initially just consists of all the blue items in some specified current range, under new SKUs. In future we may change the "blue-range" versions of the products independently of the old ones. I'm pretty new at SQL: is there something clever I should do to avoid listing all those columns, or at least avoid listing them twice? I can live with the current code, but I'd rather not have to come back and modify it if new columns are added to Product. In its current form it would just silently fail to copy the new column if I forget to do that, which should show up in testing but isn't great. I am copying every column except for the ProductRangeID (which I modify), the ProductID (incrementing primary key) and two DateCreated and timestamp columns (which take their auto-generated values for the new row). Btw, I suspect I should probably have a separate join table between ProductID and ProductRangeID. I didn't define the tables. This is in a T-SQL stored procedure on SQL Server 2008, if that makes any difference.

    Read the article

  • How do I count the number of bytes read by TextReader.ReadLine()?

    - by Steve Guidi
    I am parsing a very large file of records (one per line, each of varying length), and I'd like to keep track of the number of bytes I've read in the file so that I may recover in the event of a failure. I wrote the following: string record = myTextReader.ReadLine(); bytesRead += record.Length; ParseRecord(record); However this doesn't work since ReadLine() strips any CR/LF characters in the line. Furthermore, a line may be terminated by either CR, LF, or CRLF characters, which means I can't just add 1 to bytesRead. Is there an easy way to get the actual line length, or do I write my own ReadLine() method in terms of the granular Read() operations?

    Read the article

  • MySQL Full Text Search Boolean Mode Partial Match

    - by Rob
    I've found boolean mode of MySQL full text search useful, however there are a couple of things I can't seem to figure out how to achieve. For instance imagine I have a full text column containing the words "Steve's Javascript Tutorial - Part One". I would like to match this for each of the following searches: "tutorials", "javascript tutorials", "java", "java script", "script" Imagine that each of those searches is simply assigned to a variable in whatever language may be being used (I always use PHP). How could I modify this to make sure that Steve's article is returned on each of those searches? MATCH (article_title) AGAINST ('"+$variable+"*' IN BOOLEAN MODE)

    Read the article

  • Clean Javascript Info Popup

    - by steve
    I'm just trying to figure out exactly what kind of script this is, and where I can find more info on implementing it. Not sure exactly what to call it. If you click on one of the speakers here, you can see it in action: http://www.howconference.com/speakers/

    Read the article

  • Pop up password protect

    - by steve
    Please not that I fully understand this is a dumb ass idea, but its not my idea. We need to deter people visiting a certain page on our site. It's written in ASP and I don'tknow ASP! Can anyone tell me how I can have a pop up box load when the URL is visited where by people have to enter a username / password. The user name / password should be stored in the javascript. (Yes I know) The only real requirement is that this happen anytime the page is loaded and it stays on that page. So the page is test.asp - javascript pops up they enter credentials and if right remain on test.asp Thanks

    Read the article

  • Which isolation level should I use for the following insert-if-not-present transaction?

    - by Steve Guidi
    I've written a linq-to-sql program that essentially performs an ETL task, and I've noticed many places where parallelization will improve its performance. However, I'm concerned about preventing uniquness constraint violations when two threads perform the following task (psuedo code). Record CreateRecord(string recordText) { using (MyDataContext database = GetDatabase()) { Record existingRecord = database.MyTable.FirstOrDefault(record.KeyPredicate()); if(existingRecord == null) { existingRecord = CreateRecord(recordText); database.MyTable.InsertOnSubmit(existingRecord); } database.SubmitChanges(); return existingRecord; } } In general, this code executes a SELECT statement to test for record existance, followed by an INSERT statement if the record doesn't exist. It is encapsulated by an implicit transaction. When two threads run this code for the same instance of recordText, I want to prevent them from simultaneously determining that the record doesn't exist, thereby both attempting to create the same record. An isolation level and explicit transaction will work well, except I'm not certain which isolation level I should use -- Serializable should work, but seems too strict. Is there a better choice?

    Read the article

  • How can I programmatically position a view using relative points?

    - by Steve Madsen
    What is the best way to position a view relative to the size of its superview, when the bounds of the superview are not yet known? I am trying to avoid hard-coding coordinates if it is at all possible. Perhaps this is silly, and if so, that's a perfectly acceptable answer. I've run into this many times when working with custom UI. The most recent example is that I'm trying to replace the UINavigationItem plain-text title with a custom view. I want that view to fill the superview, but in addition, I want a UIActivityIndicatorView on the right side, inset about 2 pixels and centered vertically. Here's the code: - (void) viewDidLoad { [super viewDidLoad]; customTitleView = [[UIView alloc] initWithFrame:CGRectZero]; customTitleView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; titleLabel = [[UILabel alloc] initWithFrame:CGRectZero]; titleLabel.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; titleLabel.lineBreakMode = UILineBreakModeWordWrap; titleLabel.numberOfLines = 2; titleLabel.minimumFontSize = 11.0; titleLabel.font = [UIFont systemFontOfSize:17.0]; titleLabel.adjustsFontSizeToFitWidth = YES; [customTitleView addSubview:titleLabel]; spinnerView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite]; spinnerView.center = CGPointMake(customTitleView.bounds.size.width - (spinnerView.bounds.size.width / 2) - 2, customTitleView.bounds.size.height / 2); spinnerView.hidesWhenStopped = YES; [customTitleView addSubview:spinnerView]; self.navigationItem.titleView = customTitleView; [customTitleView release]; } Here's my problem: at the time that this code runs, customTitleView.bounds is still zeroes. The auto-resizing mask hasn't had a chance to do its thing yet, but I very much want those values so that I can compute the relative positions of other sub-views (here, the activity indicator). Is this possible without being ugly?

    Read the article

  • Access problems with IIS 7 and a WCF service

    - by Steve
    I have a Silverlight app that calls a WCF service, the service calls some stored procedures in an SQL db using Visual Studio 2008's Link to SQL class and returns the information to whatever called it. I have set up the compiled project (website with embedded app and the WCF service) on an remote IIS 7 server. I recompiled my local copy to use the WCF service that is now hosted on the IIS box and not the one on the local dev server that Visual Studio provides, if I use the local version of the website (hosted on the dev server, and using the remote SCF service) it is able to make calls it needs and display the information. However, if I use the website that is being hosted by the remote IIS server, the app will not get the information it needs from the service. On the IIS server I have the application pool and the website running under my credentials, which have access to the database. Users connecting to the webpage use anonymous authentication. Any ideas as to why I can only access the service when running from the dev server and not through the remotely hosted webpage are appreciated. If anything needs clarification, please ask.

    Read the article

< Previous Page | 43 44 45 46 47 48 49 50 51 52 53 54  | Next Page >