Search Results

Search found 3190 results on 128 pages for 'isapi rewrite'.

Page 100/128 | < Previous Page | 96 97 98 99 100 101 102 103 104 105 106 107  | Next Page >

  • Writing to the middle of the file (without overwriting data)

    - by Andreas Bonini
    In windows is it possible through an API to write to the middle of a file without overwriting any data and without having to rewrite everything after that? If it's possible then I believe it will obviously fragment the file; how many times can I do it before it becomes a serious problem? If it's not possible what approach/workaround is usually taken? Re-writing everything after the insertion point becomes prohibitive really quickly with big (ie, gigabytes) files. Note: I can't avoid having to write to the middle. Think of the application as a text editor for huge files where the user types stuff and then saves. I also can't split the files in several smaller ones.

    Read the article

  • How to call constructor of the current class and parent class at the same time?

    - by Siegfried
    public class A{ public A(int a, int b) {...} } public class B : A{ List a; List b; public B(){...} //constructor1 public B(int a, int b) : base(a,b){...} //constructor2 } My question is I need to initialize both list a and b in class B. If I put them in the constructor1, how can I call constructor1 in constructor2? I don't want to rewrite the initialization statements in constructor2 again. Thanks!

    Read the article

  • Render asp.net repeater as-and-when chunks of html is ready (streaming)

    - by sash
    The problem is to render huge reports. Basically we have lots of data that get rendered in html reports (mostly using repeater or gridview). As it so happens, the data started out small and now we have tons of it. There are lots of such reports already built so total rewrite is not an option. Heck, the business is not even letting us page the data. Now server memory is shooting up each time we try to render some reports. So the question is - is there some way we can bind data to repeater and have it stream html to browser as and when chunks are ready? That way we hope to not bring all that data into app server at once. I'm thinking we'll use a datareader or something to get parts of data and render it to browser. Any pointers, links, ideas?

    Read the article

  • WordPress sub domain htacess problem

    - by user260165
    Well i did a wordpress installation with the newer version now avaialble at dere website.. i did my installation at a subdomain : foo.abc.com the problem came with the permalink which do not work dere bec of the htaccess file. Can any one suggest me how to do that, i need to have only the category/postname Till now i am able to do foo.abc.com/index.php/category/postname - i dont want index.php in it. I have used this htacess file : disable the rewrite engine RewriteEngine on BEGIN WordPress RewriteEngine On RewriteBase /blog/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /blog/index.php [L] RewriteRule ^post/([0-9]+)?/?([0-9]+)?/?$ /index.php?p=$1&page=$2 [QSA] END WordPress Please correct me if possible. thanks

    Read the article

  • Eliminating cyclic flows from a graph

    - by Jon Harrop
    I have a directed graph with flow volumes along edges and I would like to simplify it by removing all cyclic flows. This can be done by finding the minimum of the flow volumes along each edge in any given cycle and reducing the flows of every edge in the cycle by that minimum volume, deleting edges with zero flow. When all cyclic flows have been removed the graph will be acyclic. For example, if I have a graph with vertices A, B and C with flows of 1 from A?B, 2 from B?C and 3 from C?A then I can rewrite this with no flow from A?B, 1 from B?C and 2 from C?A. The number of edges in the graph has reduced from 3 to 2 and the resulting graph is acyclic. Which algorithm(s), if any, solve this problem?

    Read the article

  • Converting ASP.NET MVC to n-Tiered Architecture

    - by Jeff
    I just built an application using ASP.NET MVC. The programmers at my company want to build all future modules using n-Tiered (Presentation Layer, Business Logic Layer, Data Access Layer) architecture. I am not the programmer and need to know why this makes sense? Do I have to completely rewrite the entire code or can it be converted? We are building an HRIS system with Business Intelligence. Somebody please explain why or why not this approach does or does not make sense.

    Read the article

  • Best protocol for client/server communication, from PHP/Perl to C++/Qt4

    - by Kyle
    I'm the author of an Open Source kiosk management system, Libki. The current version, though functional, was very much a learning experience for me. I'm working on a complete rewrite and am having a hard time deciding what protocol to use. The server will be written in PHP or Perl. Most likely PHP because I need to support some uncommon protocols that Library software use, ( SIP and NCIP ). So far I've only found a SIP2 library in PHP. The client is written in C++/Qt4. I'm looking at RPC and REST for client/server communication. I've found RPC client libraries for Qt4, and REST is already part of the Qt4 libraries. Is there an alternative I've missed? So far, REST seems to be the winner.

    Read the article

  • Time complexity O() of isPalindrome()

    - by Aran
    I have this method, isPalindrome(), and I am trying to find the time complexity of it, and also rewrite the code more efficiently. boolean isPalindrome(String s) { boolean bP = true; for(int i=0; i<s.length(); i++) { if(s.charAt(i) != s.charAt(s.length()-i-1)) { bP = false; } } return bP; } Now I know this code checks the string's characters to see whether it is the same as the one before it and if it is then it doesn't change bP. And I think I know that the operations are s.length(), s.charAt(i) and s.charAt(s.length()-i-!)). Making the time-complexity O(N + 3), I think? This correct, if not what is it and how is that figured out. Also to make this more efficient, would it be good to store the character in temporary strings?

    Read the article

  • How can I redirect all traffic from one domain to another with an .htaccess file?

    - by George Edison
    Say I have a subdomain xxx.yyy.com running Apache. The files are stored in /home/someone/public_html/xxx. What I want to do is redirect all requests to a domain name zzz.com which is using the same location for its files. (In other words, xxx.yyy.com and zzz.com are aliases for each other) I just want people accessing zzz.com, so if someone goes to xxx.yyy.com they should be redirected to zzz.com. Can this easily be done with a rewrite rule in an .htaccess file?

    Read the article

  • Bandpass filter of FFT applied image. (Like ImageJ bandpass filter algorithm)

    - by maximus
    There is a good function that I need, which is implemented in Java program: ImageJ I need to understand the algorithm used there. The function has several parameters: link text And before using FFT it converts image to a special one: The Bandpass Filter uses a special algorithm to reduce edge artifacts (before the Fourier transform, the image is extended in size by attaching mirrored copies of image parts outside the original image, thus no jumps occur at the edges) Can you tell me more about this special transform? Actually tiling mirrored image. I am writing on C++ and wish to rewrite that part of the program on C++.

    Read the article

  • ASP.Net: HTTP 400 Bad Request error when trying to process http://localhost:5957/http://yahoo.com

    - by mat3
    I'm trying to create something similar to the diggbar : http://digg.com/http://cnn.com I'm using Visual Studio 2010 and Asp Development server. However, I can't get the ASP dev server to handle the request because it contains "http:" in the path. I've tried to create an HTTPModule to rewrite the URL in the BeginRequest , but the event handler doesn't get called when the url is http://localhost:5957/http://yahoo.com. The event handler does get called if the url is http://localhost:5957/http/yahoo.com To summarize http://localhost:5957/http/yahoo.com works http://localhost:5957/http//yahoo.com does not work http://localhost:5957/http://yahoo.com does not work http://localhost:5957/http:/yahoo.com does not work Any ideas?

    Read the article

  • Django colon syntax in template tags: only in newer versions?

    - by Alan
    I just deployed an application to a new server, and although I'm using virtualenv, I had to install a new environment on the production server, which has a different architecture. Anyway, I received no TemplateSytaxErrors in development, but on the production server, I get: Exception Type: TemplateSyntaxError Exception Value: Caught SyntaxError while rendering: invalid syntax (views.py, line 25) The offending line is: {% url admin:password_change as password_change_url %} Upon removing that line, the TemplateSyntaxError hops to the next line that has a colon in it (and lets other template tags work fine). So my question is this: is there some discrepancy in versions of Python/Django that would allow or disallow the namespacing syntax? The template tags are in django-grappelli (http://code.google.com/p/django-grappelli/), so I'd rather not go through their code and rewrite all the template tags. Development server: 32-bit Debian Python 2.5.5 Django 1.2.1 Production server: 64-bit CentOS Python 2.4.3 Django 1.2.1 Any ideas?

    Read the article

  • Spring 3 - Theme with separate JSP

    - by Max
    Hi, I'm trying to rewrite some Spring 1.2 code to Spring 3.0 one. Currently I'm stuck with JSP resolved by URL problem. Application uses separate JSP files with different layouts for serving the same model from the same controller. The JSP is switched using interceptor, that intercepts the url and changes the view. For example: /design_one/mypage.htm -> MyPageController -> /design_one/mypage.jsp /design_two/mypage.htm -> MyPageController -> /design_two/mypage.jsp Is there a way to make same or similar functionality using something better than raw interceptors?

    Read the article

  • Does normalization really hurt performance in high traffic sites?

    - by Luke101
    I am designing a database and I would like to normalize the database. I one query I will joining about 30-40 tables. Will this hurt the website performance if it ever becomes extremely popular? This will be the main query and it will be getting called 50% of the time. The other queries I will be joining about 2 tables. I have a choice right now to normalize or not to normalize but if the normalization becomes a problem in the future i may have to rewrite 40% of the software and it may take me a long time. Does normalization really hurt in this case? Should I denormalize now while I have the time?

    Read the article

  • Streaming multiple TObjects to a TMemoryStream

    - by Altar
    I need to store multiple objects (most of them are TObject/non persistent) to a TMemoryStream, save the stream to disk and load it back. The objects need to be streamed one after each other. Some kind of universal container. I started to make several functions that store stuff to stream - for example function StreamReadString(CONST MemStream: TMemoryStream): string; StreamWriteString(CONST MemStream: TMemoryStream; s: string); However, it seems that I need to rewrite a lot of code. One of the many examples is TStringList.LoadFromStream that will not work so it needs to be rewritten. This is because TStringList needs to be the last object in the stream (it reads from current position to the end of the stream). Anybody knows a library that provide basic functionality like this? I am using Delphi 7 so RTTI won't help too much.

    Read the article

  • Nginx redirect if cookie present

    - by Joseph Silvashy
    I've seen some limited resources on checking for cookies with Nginx, but I couldn't really find the answer I was looking for, hopefully some of you Nginx masters can give me a hand. Essentially I have a vhost that I'd like to redirect to a different domain unless the user has a cookie, here is what I've created: server { listen 80; server_name rerecipe.com; if ($http_cookie ~* "ngl_beta_pass" ) { # set $beta off; root /home/deploy/apps/rerecipe/current/public; passenger_enabled on; rack_env production; break; } rewrite ^/(.*) http://beta.rerecipe.com/$1 permanent; } But it doesn't seem to work, I get the error: [emerg]: "root" directive is not allowed here in /opt/nginx/conf/nginx.conf:45 I'm not sure how to proceed here, any ideas guys?

    Read the article

  • Rewriting usort function because of fatal error (PHP bug)

    - by Lionel
    The two following usort functions throw fatal error Base lambda function for closure not found in our productive environment (PHP 5.4). This seems to be a known PHP bug that should be fixed by now (https://bugs.php.net/bug.php?id=52144), but it still occurs for us. Anyway, we unfortunately don't have time to figure out what's wrong with our PHP configurations etc. We would like to rewrite these two functions without the use of anonymous functions, so that the error doesn't occur anymore. Ordering of a multidimensional array ($array) by value of key "position": usort($array, function($a, $b) { return $a['position'] - $b['position']; }); Ordering of a multidimensional array ($array) according to the order of a second array ($position_order): usort($array, function($a, $b) use($position_order) { return (isset($position_order[$a['ftid']]) ? ($position_order[$a['ftid']] - $position_order[$b['ftid']]) : 1); }); Especially the latter causes some headache, as we don't know how to pass the "outside" array $position_order.

    Read the article

  • asp.net mvc route clashing with physical path in IIS7

    - by Andrew Bullock
    I'm messing about with controller organisation and I've hit a problem. If I have the following physical structure /Home/HomeController.cs /Home/Index.aspx /Home/About.aspx and I request the URI: /Home/Index I get a 403 Directory Listing Denied :( (im using a custom IControllerFactory and IViewEngine to look in this non-default path) Why is this happening? (I know the 403 is because its hitting the /Home folder, but why is it hitting the folder?) Why doesn't the UrlRoutingModule rewrite the route and let the controller pick up the request? Application_BeginRequest fires, but then it seems to pass control back to IIS to try and serve from the filesystem. Is it the UrlRoutingModule that defaults to a physical path if it exists before rewriting? Is there a way to make this work? N.B. Please don't suggest relocating my controllers etc. I know this is an obvious option, but that isn't the question ;) Using IIS7 In Integrated Mode Thanks

    Read the article

  • Why do a small amount of add/deletes take several seconds in EF4?

    - by TomWij
    Using the Entity Framework 4. I have created a Code First database in the past and a piece of code needs to delete and add 16 objects, this takes 6 seconds each. That's 300+ ms for each query! The deletes/adds occur in a foreach scope and there is a SaveChanges() outside the foreach. In the above image you see that each takes 6 seconds, which is 34% of the time, for 16 calls. That doesn't sound normal to me... Why is this and how can I improve the performance? If there is no solution: Are there any workarounds I can use? It would be a pain to rewrite my project...

    Read the article

  • Resources for learning how to better read code

    - by rsteckly
    Hi, I recently inherited a large codebase and am having to read it. The thing is, I've usually been the dev starting a project. As a result, I don't have a lot of experience reading code. My reaction to having to read a lot of code is, well, umm to rewrite it. But I need to bring myself up to speed quickly and build on top of an existing system. Do other people have techniques they've learned to absorb a code base? At this point, I'm just reading through the code. I've tried generating UML diagrams using UModel. They're so big they won't print cleanly and when I zoom in, I really do lose the perspective of seeing all the relationships. How have other people dealt with this problem?

    Read the article

  • Collectable<T> serialization, Root Namespaces on T in .xml files.

    - by Stacey
    I have a Repository Class with the following method... public T Single<T>(Predicate<T> expression) { using (var list = (Models.Collectable<T>)System.Xml.Serializer.Deserialize(typeof(Models.Collectable<T>), FileName)) { return list.Find(expression); } } Where Collectable is defined.. [Serializable] public class Collectable<T> : List<T>, IDisposable { public Collectable() { } public void Dispose() { } } And an Item that uses it is defined.. [Serializable] [System.Xml.Serialization.XmlRoot("Titles")] public partial class Titles : Collectable<Title> { } The problem is when I call the method, it expects "Collectable" to be the XmlRoot, but the XmlRoot is "Titles" (all of object Title). I have several classes that are collected in .xml files like this, but it seems pointless to rewrite the basic methods for loading each up when the generic accessors do it - but how can I enforce the proper root name for each file without hard coding methods for each one? The [System.Xml.Serialization.XmlRoot] seems to be ignored.

    Read the article

  • UML and Documenting Simple Diagrams

    - by Jason
    As part of a rewrite of an old Java application into C#, I'm writing an actual Software Design Specification. A problem I run into is when a method is too simple to bother with a Sequence Diagram (it doesn't interact with other objects). As an example, I have a simple POJO called Item, containing the following method: public String getCategoryKey() { StringBuffer value = new StringBuffer("s-"); value.append(this.getModelID()); value.append("-c"); return value; } The purpose and the algorithm for the method needs to be documented. However, a sequence diagram is overkill. How would others document it? (I take no credit/blame for the given method, it's very old code and the author "forgot" to put their name in the Javadoc).

    Read the article

  • Summation using Lambda C# 3.0

    - by Newbie
    I have a small thing. public int GetSum(List<int> x) { foreach (int i in x) sum += i; return sum; } where x is a List of integers defined as List<int> l = new List<int>(); l.Add(4); l.Add(2); l.Add(5); l.Add(8); l.Add(6); and has been passed as GetSum(l) Is it possible to rewrite the above foreach loop using a lambda? Reason: I started looking into the lambda stuffs since yesterday and is interested to learn .. however simple it may be. Thanks.

    Read the article

  • Create fake subdirectories with htaccess and php AND keep existing directories as is.

    - by Arseni
    I have a website, which has numerous subdirectories already. (All existing in server's filesystem) I want to create new "virtual" sub-dirs with htaccess, but I only want the htaccess rule work for directories, listed in DB, and not existing in filesystem. i.e. File system has: /dir1/ & /dir2/ MySQL database has record for 'dir3' & 'dir4' And I want: A: mysite.com/dir1/ and mysite.com/dir2/ display existing old content B: mysite.com/dir3/ and mysite.com/dir4/ display content from MySQL provided by PHP sctipt via redirect like: mysite.com/myscript.php?dir=dir3 C: mysite.com/dir5/ display 404 error (Dir does not exist in DB nor in Database) Basically I want .htaccess to work like this: IF DIR Exists in DB - apply the rewrite rule and show content from myscript.php?dir=DIR ELSE don't apply any rule. I can create a separate php script, which can return 0/1 when given dir name exist in DB or not, but how do I make mod_rewrite get the data from that script? Is it possible with htaccess/PHP at all?

    Read the article

  • Denying main links with .htaccess or anything else

    - by user1640660
    I'm using an encrypted php program with smarty template. I wanted to open links such as index.php?page=login to open with login.php, so I used Rewrite mode in .htaccesss, for example RewriteRule ^/*login.php$ /index.php?page=login [L] in a few pages there should be a query for errors such as RewriteRule ^/*support.php?(.+)$ /index.php?page=support&%{QUERY_STRING} [L] It works but I need to deny the main URLs so when users enters index.php?a=login manually nothing (or the main page) would show up and he should open the link only with /login.php. Is there a way to do this? A little help please...

    Read the article

< Previous Page | 96 97 98 99 100 101 102 103 104 105 106 107  | Next Page >