Search Results

Search found 42685 results on 1708 pages for 'page speed'.

Page 10/1708 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Problem displaying custom error page in ASP.NET MVC 2

    - by robert_d
    This is customErrors section from my web.config file <customErrors mode="On"> <error statusCode="500" redirect="HTTP500.aspx" /> </customErrors> HTTP500.aspx is the same as standard /Views/Shared/Error.aspx page. When I get HTTP 500 error I see this page: Server Error in '/' Application. Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed. Details: To enable the details of this specific error message to be viewable on the local server machine, please create a tag within a "web.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "RemoteOnly". To enable the details to be viewable on remote machines, please set "mode" to "Off". Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's configuration tag to point to a custom error page URL. But when I change the above customErrors section like this: <customErrors mode="On"> <error statusCode="500" redirect="HTTP500.htm" /> </customErrors> then HTTP500.htm page is displayed when HTTP 500 error occurs. Why HTTP500.aspx page isn't displayed?

    Read the article

  • C# serialPort speed

    - by MarekK
    Hi I am developing some monitoring tool for some kind of protocol based on serial communication. Serial BaudRate=187,5kb I use System.IO.Ports.SerialPort class. This protocol has 4 kinds of frames. They have 1Byte,3Bytes,6Bytes, 10-255Bytes. I can work with them but I receive them too late to respond. For the beginning I receive first packed after ex. 96ms (too late), and it contains about 1000B. This means 20-50 frames (too much, too late). Later its work more stable, 3-10Bytes but it is still too late because it contains 1-2 frames. Of Course 1 frame is OK, but 2 is too late. Can you point me how can I deal with it more reliable? I know it is possible. Revision1: I tried straight way: private void serialPort1_DataReceived(object sender, SerialDataReceivedEventArgs e) { if (!serialPort1.IsOpen) return; this.BeginInvoke(new EventHandler(this.DataReceived)); } And Backgroud worker: And ... new Tread(Read) and... always the same. Too late, too slow. Do I have to go back to WinApi and import some kernel32.dll functions? Revision 2: this is the part of code use in the Treading way: int c = serialPort1.BytesToRead; byte[] b = new byte[c]; serialPort1.Read(b, 0, c); I guess it is some problem with stream use inside SerialPort class. Or some synchronization problem. Revision 3: I do not use both at once!! I just tried different ways. Regards MarekK

    Read the article

  • Speed boost to adjacency matrix

    - by samoz
    I currently have an algorithm that operates on an adjacency matrix of size n by m. In my algorithm, I need to zero out entire rows or columns at a time. My implementation is currently O(m) or O(n) depending on if it's a column or row. Is there any way to zero out a column or row in O(1) time?

    Read the article

  • Speed of CSS

    - by Ólafur Waage
    This is just a question to help me understand CSS rendering better. Lets say we have a million lines of this. <div class="first"> <div class="second"> <span class="third">Hello World</span> </div> </div> Which would be the fastest way to change the font of Hello World to red? .third { color: red; } div.third { color: red; } div.second div.third { color: red; } div.first div.second div.third { color: red; } Also, what if there was at tag in the middle that had a unique id of "foo". Which one of the CSS methods above would be the fastest. I know why these methods are used etc, im just trying to grasp better the rendering technique of the browsers and i have no idea how to make a test that times it. UPDATE: Nice answer Gumbo. From the looks of it then it would be quicker in a regular site to do the full definition of a tag. Since it finds the parents and narrows the search for every parent found. That could be bad in the sense you'd have a pretty large CSS file though.

    Read the article

  • std::vector iterator or index access speed question

    - by Simone Margaritelli
    Just a stupid question . I have a std::vector<SomeClass *> v; in my code and i need to access its elements very often in the program, looping them forward and backward . Which is the fastest access type between those two ? Iterator access std::vector<SomeClass *> v; std::vector<SomeClass *>::iterator i; std::vector<SomeClass *>::reverse_iterator j; // i loops forward, j loops backward for( i = v.begin(), j = v.rbegin(); i != v.end() && j != v.rend(); i++, j++ ){ // some operations on v items } Subscript access (by index) std::vector<SomeClass *> v; unsigned int i, j, size = v.size(); // i loops forward, j loops backward for( i = 0, j = size - 1; i < size && j >= 0; i++, j-- ){ // some operations on v items } And, does const_iterator offer a faster way to access vector elements in case i do not have to modify them? Thank you in advantage.

    Read the article

  • Understanding memory and cpu speed

    - by tipu
    Firstly, I am working on a windows xp 64 machine with 4gb ram and 2.29 ghz x4 I am indexing 220,000 lines of text that are more or less the same length. These are divided into 15 equally sized files. File 1/15 takes 1 minute to index. As the script indexes more files, it seems to take much longer with file 15/15 taking 40 minutes. My understanding is that the more I put in memory, the faster the script is. The dictionary is indexed in a hash, so fetch operations should be O(1). I am not sure where the script would be hanging the CPU. I have the script here.

    Read the article

  • Cython Speed Boost vs. Usability

    - by zubin71
    I just came across Cython, while I was looking out for ways to optimize Python code. I read various posts on stackoverflow, the python wiki and read the article "General Rules for Optimization". Cython is something which grasps my interest the most; instead of writing C-code for yourself, you can choose to have other datatypes in your python code itself. Here is a silly test i tried, #!/usr/bin/python # test.pyx def test(value): for i in xrange(value): i**2 if(i==1000000): print i test(10000001) $ time python test.pyx real 0m16.774s user 0m16.745s sys 0m0.024s $ time cython test.pyx real 0m0.513s user 0m0.196s sys 0m0.052s Now, honestly, i`m dumbfounded. The code which I have used here is pure python code, and all I have changed is the interpreter. In this case, if cython is this good, then why do people still use the traditional Python interpretor? Are there any reliability issues for Cython?

    Read the article

  • php string versus boolean speed test

    - by ae
    I'm looking at trying to optimise a particular function in a php app and foolishly assumed that a boolean lookup in a 'if' statement would be quicker than a string compare. But to check it I put together a short test (see below). To my surprise, the string lookup was quicker. Is there anything wrong with my test (I'm wired on too much coffee so I'm suspicious of my own code)? If not, I would be interested in any comments people have around string versus boolean lookups in php. The result for the first test (boolean lookup) was 0.168 The result for the second test (string lookup) was 0.005 <?php $how_many = 1000000; $counter1 = 0; $counter2 = 0; $abc = array('boolean_lookup'=>TRUE, 'string_lookup'=>'something_else'); $start = microtime(); for($i = 0; $i < $how_many; $i++) { if($abc['boolean_lookup']) { $counter1++; } } echo ($start - microtime()); echo '<hr>'; $start = microtime(); for($i = 0; $i < $how_many; $i++) { if($abc['string_lookup'] == 'something_else') { $counter2++; } } echo ($start - microtime());

    Read the article

  • Optimizing for speed - 4 dimensional array lookup in C

    - by Tiago
    I have a fitness function that is scoring the values on an int array based on data that lies on a 4D array. The profiler says this function is using 80% of CPU time (it needs to be called several million times). I can't seem to optimize it further (if it's even possible). Here is the function: unsigned int lookup_array[26][26][26][26]; /* lookup_array is a global variable */ unsigned int get_i_score(unsigned int *input) { register unsigned int i, score = 0; for(i = len - 3; i--; ) score += lookup_array[input[i]][input[i + 1]][input[i + 2]][input[i + 3]]; return(score) } I've tried to flatten the array to a single dimension but there was no improvement in performance. This is running on an IA32 CPU. Any CPU specific optimizations are also helpful. Thanks

    Read the article

  • Comparisons of web programming languages (on speed, etc.)

    - by Dave
    I'm looking for a site / report / something that can compares "identical" programs (programs that do the same thing) in different web-programming languages and then compares the speeds of each of them. I agree that there will be MANY MANY criteria on which this information can be sliced and diced by, but has anyone done any real comparison of this? I am interested in web-based languages only, ie php, perl, C, C++, java, asp, asp.net, etc.

    Read the article

  • speed string search in PHP

    - by Marc
    Hi! I have a 1.2GB file that contains a one line string. What I need is to search the entire file to find the position of an another string (currently I have a list of strings to search). The way what I'm doing it now is opening the big file and move a pointer throught 4Kb blocks, then moving the pointer X positions back in the file and get 4Kb more. My problem is that a bigger string to search, a bigger time he take to got it. Can you give me some ideas to optimize the script to get better search times? this is my implementation: function busca($inici){ $limit = 4096; $big_one = fopen('big_one.txt','r'); $options = fopen('options.txt','r'); while(!feof($options)){ $search = trim(fgets($options)); $retro = strlen($search);//maybe setting this position absolute? (like 12 or 15) $punter = 0; while(!feof($big_one)){ $ara = fgets($big_one,$limit); $pos = strpos($ara,$search); $ok_pos = $pos + $punter; if($pos !== false){ echo "$pos - $punter - $search : $ok_pos <br>"; break; } $punter += $limit - $retro; fseek($big_one,$punter); } fseek($big_one,0); } } Thanks in advance!

    Read the article

  • Script Speed vs Memory Usage

    - by Doug Neiner
    I am working on an image generation script in PHP and have gotten it working two ways. One way is slow but uses a limited amount of memory, the second is much faster, but uses 6x the memory . There is no leakage in either script (as far as I can tell). In a limited benchmark, here is how they performed: -------------------------------------------- METHOD | TOTAL TIME | PEAK MEMORY | IMAGES -------------------------------------------- One | 65.626 | 540,036 | 200 Two | 20.207 | 3,269,600 | 200 -------------------------------------------- And here is the average of the previous numbers (if you don't want to do your own math): -------------------------------------------- METHOD | TOTAL TIME | PEAK MEMORY | IMAGES -------------------------------------------- One | 0.328 | 540,036 | 1 Two | 0.101 | 3,269,600 | 1 -------------------------------------------- Which method should I use and why? I anticipate this being used by a high volume of users, with each user making 10-20 requests to this script during a normal visit. I am leaning toward the faster method because though it uses more memory, it is for a 1/3 of the time and would reduce the number of concurrent requests.

    Read the article

  • Speed of QHash lookups using QStrings as keys.

    - by Ryan R.
    I need to draw a dynamic overlay on a QImage. The component parts of the overlay are defined in XML and parsed out to a QHash<QString, QPicture> where the QString is the name (such as "crosshairs") and the QPicture is the resolution independent drawing. I then draw components of the overlay as they are needed at a position determined during runtime. Example: I have 10 pictures in my QHash composing every possible element in a HUD. During a particular frame of video I need to draw 6 of them at different positions on the image. During the next frame something has changed and now I only need to draw 4 of them but 2 of those positions have changed. Now to my question: If I am trying to do this quickly, should I redefine my QHash as QHash<int, QPicture> and enumerate the keys to counteract the overhead caused by string comparisons; or are the comparisons not going to make a very big impact on performance? I can easily make the conversion to integer keys as the XML parser and overlay composer are completely separate classes; but I would like to use a consistent data structure across the application. Should I overcome my desire for consistency and re-usability in order to increase performance? Will it even matter very much if I do?

    Read the article

  • iphone threading speed up startup of app

    - by BahaiResearch.com
    I have an app that must get data from the Sqlite database in order to display the first element to the User. I have created a domain object which wraps the DB access and is a thread safe singleton. Is this following strategy optimal to ensure the fastest load given the iPhone's file access and memory management capabilities in threaded apps: 1) In the AppDelegate's FinishedLaunching event the very first thing I do is create the domain singleton within a new thread. This will cause the domain object to go to Sqlite and get the data it needs without locking the UI thread. 2) I then call the standard Window methods to add the View and MakeKeyAndVisible etc. Is there an earlier stage in the AppDelegate where I should fire off the thread that creates the Domain Object and accesses Sqlite?

    Read the article

  • domain name vs ip address, same server, but different speed

    - by bn
    I have two similar sites: - two of them have almost exactly the same codes, and running on the same server - both sites are the same, they just use different language. - database of the slower site is populated (maybe only the user table) the other tables for site content is the same - the faster uses root to access database one of the sites is not released yet, so it uses IP Address to access the site instead of domain name the site that is using IP address is faster (lot faster) the site that is using domain name is slower do you know why is this happening what could be the reason?

    Read the article

  • Log4J - Speed of resolving class/method/line references

    - by Jeach
    Does log4J still gather the class, method and line numbers by generating exceptions and inspecting the stack trace? Or has Java been optimized since Sun included their own logging framework. If not, why has there not been any optimizations made since. What is the main challenges in obtaining class, method and line numbers quickly and efficiently? Although I hate annotations and try to avoid them, has log4J not made use of this, such as: @log4j-class MyClass @log4j-method currentMethodOne At least this would avoid some companies bad habit of repeatedly writing/copying the method name as the first part of their logging message (which is seriously annoying). Thanks, Jeach!

    Read the article

  • PHP Speed - Many Echos vs Building a String

    - by Chris
    Wondering if anyone knows if either of these methods would produce an output faster: Method 1 for ($i=1;$i<99999;$i++) { echo $i, '<br>'; } or Method 2 for ($i=1;$i<99999;$i++) { $string .= $i . '<br>'; } echo $string; Thanks for any input you have.

    Read the article

  • Can I reduce the CPU speed of my MacBook when on battery?

    - by Greg Hewgill
    I've got a MacBook with a Core 2 Duo CPU. I've got CoreDuoTemp installed which can show the current speed of the CPU. It appears to always show: Mini : 1.0 GHz Maxi : 2.0 GHz Current : 2.0 GHz I believe my laptop would run longer on battery if it were to run at a maximum of 1 GHz. Is there a way to configure this, or is the CPU speed adjustment completely automatic?

    Read the article

  • USB-to-Parallel adapter rated as USB 1.1 - will its driver lower speed of USB 2.0 bus?

    - by cumminjm
    I need to connect a printer with a parallel port to a computer with only a USB 2.0 bus. I'd like to do so without lowering the USB 2.0 bus speed to USB 1.1. All the USB-to-Parallel adapter cable found so far seem to be rated as USB 1.1 and they come with a CD which presumably contains a necessary driver. I haven't purchased one and tested it out yet, but if so, would the cable's driver lower speed of USB 2.0 bus?

    Read the article

  • asp.net master page/content page interaction with style sheet

    - by Matt
    Learning how to do a master page in asp.net. Trying to figure out how my style sheet interacts with respects to the master page and content page. I can get HTML tags like body and the style sheet to react. But when I call the ID attribute of a label no styling takes place. What am I missing here as far as interaction? BTW I'm using VS2008 CSS sample: body { height:1200px; width:920px; border-style:solid; border-color:blue; padding:10px 10px 10px 10px; } #toptext1 { position:relative; top:-225px; right:-500px; font-size:22px; font-weight:bold; } From the master page: <body> <form id="form1" runat="server"> <asp:image id="cookNookLogo" ImageUrl="images/Logo.gif" runat="server" AlternateText="CookNook" Width="449px"></asp:image> <p> <asp:Label ID="toptext1" runat="server" Text="Quality Recipes, Hints and Supplies"></asp:Label> </p> From the content page: <%@ Page Language="C#" MasterPageFile="~/CNMasterPage.master" AutoEventWireup="true" CodeFile="Home.aspx.cs" Inherits="Home" Title="Untitled Page" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> <link href="App_Themes/cn/cn.css" rel="stylesheet" type="text/css" /> </asp:Content> When I was doing this without a master page it worked so where am I going wrong with the attributes?

    Read the article

  • "Page description language" and "markup language"

    - by Tim
    What is the difference and relation between "Page description language"(http://en.wikipedia.org/wiki/Page_description_language), "markup language" (http://en.wikipedia.org/wiki/Markup_language) and "Page description markup language" (http://en.wikipedia.org/wiki/Page_description_markup_language)? Thanks! PostScript is a page description language. Is it a markup language? HTML and Latex are markup language. Are they page description language?

    Read the article

  • php page navigation by serial number

    - by ilnur777
    Can anyone help in this php page navigation script switch on counting normal serial number? In this script there is a var called "page_id" - I want this var to store the real page link by order like 0, 1, 2, 3, 4, 5 ... $records = 34; // total records $pagerecord = 10; // count records to display per page if($records<=$pagerecord) return; $imax = (int)($records/$pagerecord); if ($records%$pagerecord>0)$imax=$imax+1; if($activepage == ''){ $for_start=$imax; $activepage = $imax-1; } $next = $activepage - 1; if ($next<0){$next=0;} $prev = $activepage + 1; if ($prev>=$imax){$prev=$imax-1;} $end = 0; $start = $imax; if($activepage >= 0){ $for_start = $activepage + $rad + 1; if($for_start<$rad*2+1)$for_start = $rad*2+1; if($for_start>=$imax){ $for_start=$imax; } } if($activepage < $imax-1){ $str .= ' <a href="?domain='.$domain_name.'&page='.($start-1).'&page_id=xxx"><<< End</a> <a href="?domain='.$domain_name.'&page='.$prev.'&page_id=xxx">< Forward</a> '; } $meter = $rad*2+1; for($i=$for_start-1; $i>-1; $i--){ $meter--; $line = ''; if ($i>0)$line = ""; if($i<>$activepage){ $str .= "<a href='?domain=".$domain_name."&page=".$i."&page_id=xxx'>".($i)."</a> ".$line." "; } else { $str .= " <b class='current_page'>".($i)."</b> ".$line." "; } if($meter=='0'){ break; } } if($activepage > 0){ $str .= " <a href='?domain=".$domain_name."&page=".$next."&page_id=xxx'>Back ></a> <a href='?domain=".$domain_name."&page=".($end)."&page_id=xxx'>Start >>></a> "; } return $str; Really need help with this stuff! Thanks in advance!

    Read the article

  • Using GhostScript to get page size

    - by Aristoteles
    Is it possible to get the page size (from e.g. a PDF document page) using GhostScript? I have seen the "bbox" device, but it returns the bounding box (it differs per page), not the TrimBox (or CropBox) of the PDF pages. (See http://www.prepressure.com/pdf/basics/page_boxes for info about page boxes.) Any other possibility?

    Read the article

  • Jquery page turn with html or asp

    - by vishal
    I was asked by a client to create a bookflip (Page Turn) effect that did not require Flash. The imBookFlip plugin can load a book in an iframe or directly on the page. The book's pages can be set to turn when manually clicked only, begin auto flip (turn automatically) as soon as the html page loads, or begin auto flip when first page (front cover is clicked).

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >