Search Results

Search found 3459 results on 139 pages for 'if modified since'.

Page 37/139 | < Previous Page | 33 34 35 36 37 38 39 40 41 42 43 44  | Next Page >

  • Trying to manually recreate a simple generate/scaffolding script

    - by montooner
    I'm trying to understand Rails from the ground up. I want to learn how to manually create basic show-all/show-single/CRUD functionality in the framework. I currently am working on the display-all functionality, but am stopped by an error when I try to request all items in the Products db Here are the steps I've taken so far: script/generate controller Products script/generate model Products rake db:migrate modified products_controller.rb to add: def index() { @products = Product.all} (error: uninitialized constant ProductsController::Product) ideally, dump all orders in the view What's the fix?

    Read the article

  • Apache URL rewrite query

    - by ant-1980
    Can anyone tell me how to do this? i'm stumped! I need a modified URL in this format this55-is-a-test-id-23.html But I need the 23 as a GET. I can't rely on searching for 'id' as this may occur elsewhere in the URL. Is there any way of searching for the last occurrence of id and passing that as a get using an Apache RewriteRule in .htaccess?? Many thanks Ant

    Read the article

  • Remove unwanted lines,dead code from source code?

    - by Passionate programmer
    How to make source code free of the following Remove dead codes that are more than few lines between /* c++ codes */ Change more than one line breaks to one Remove modified user name and date /*-------- MODIFICATION DONE by xyz on ------------*/ I have used a code formatter tool to get a nice formatted code but stuck with code with above items.Is there any way to make sure codes like above doesn't get in to svn and automatically formatted code gets into the source.

    Read the article

  • PNGs alpha transparancy in AS3 - Unknown file-type

    - by WiseDonkey
    Hello there! After whittling down of the options we've encountered a problem with PNG's and ActionScript 3 (AS3). When loading a PNG 8 or PNG 32 with alpha transparancy we're getting the following error reported in Flash:- "Error #2124: Loaded file is an unknown type" Now, we're dealing with some legacy images, and it appears as though this problem isn't universal - some images believed to be 32bit alpha PNG are loading. BUT, some conclusions:- converting one image that was 32 bit alpha (NOT WORKING IN AS3) to PNG 8 index transparency DID work. And converting that same image to PNG 8 alpha DID NOT work. These all worked in AS2 There is no difference between the headers Headers of a Failing Image [0] => HTTP/1.1 200 OK [1] => Date: Tue, 06 Apr 2010 14:17:28 GMT [2] => Server: Apache/2.2.3 (Red Hat) [3] => Last-Modified: Tue, 06 Apr 2010 13:44:05 GMT [4] => ETag: "3700054-11d6-a3983340" [5] => Accept-Ranges: bytes [6] => Content-Length: 4566 [7] => Connection: close [8] => Content-Type: image/png Headers of a Working Image [0] => HTTP/1.1 200 OK [1] => Date: Tue, 06 Apr 2010 14:19:02 GMT [2] => Server: Apache/2.2.3 (Red Hat) [3] => Last-Modified: Fri, 30 Oct 2009 18:38:08 GMT [4] => ETag: "ba8057-65f2-5445c400" [5] => Accept-Ranges: bytes [6] => Content-Length: 26098 [7] => Connection: close [8] => Content-Type: image/png Any thoughts of a direction of further investigation or thoughts on a bewildering problem with little to no documentation; very warmly welcomed. EDIT Now it would appear as though something in the PHP conversion of the images is shafting; I use the following PHP to add alpha layers:- imagealphablending($image_p, false); ImageSaveAlpha($image_p, true); ImageFill($image_p, 0, 0, IMG_COLOR_TRANSPARENT);

    Read the article

  • Uncompres a gzip file from CURL, on php

    - by PartySoft
    Does anyone know how to uncompress the contents of a gzip file that i got with curl? for example: http://torcache.com/torrent/63ABC1435AA5CD48DCD866C6F7D5E80766034391.torrent responded HTTP/1.1 200 OK Server: nginx Date: Wed, 09 Jun 2010 01:11:26 GMT Content-Type: application/x-bittorrent Content-Length: 52712 Last-Modified: Tue, 08 Jun 2010 15:09:58 GMT Connection: keep-alive Expires: Fri, 09 Jul 2010 01:11:26 GMT Cache-Control: max-age=2592000 Content-Encoding: gzip Accept-Ranges: bytes then the compressed gzip, i tried gzdecode but doesn't work , gzeflate as well doesn't they simply don't get any response, and the contents of the files are no more than 2k

    Read the article

  • compare in flex store

    - by nikhil
    i have used adobe flexstore and modified it for my own application, but in the flex store the compare cars option does not work properly as it displays the same data fr all cars. plz sum1 temme how to implement the compare part. the code wud rilly be appreciated. btw i m using flexstore in flex 3.

    Read the article

  • How to calculate next Friday at 3am?

    - by Mark
    How can you calculate the following Friday at 3am as a datetime object? Clarification: i.e., the calculated date should always be greater than 7 days away, and less than or equal to 14. Going with a slightly modified version of Mark's solution: def next_weekday(dt=datetime.datetime.now(), time_of_day=datetime.time(hour=3), day_of_week=4): dt += datetime.timedelta(days=7) if dt.time() < time_of_day: dt = dt.combine(dt.date(), time_of_day) else: dt = dt.combine(dt.date(), time_of_day) + datetime.timedelta(days=1) return dt + datetime.timedelta((day_of_week - dt.weekday()) % 7)

    Read the article

  • Tomcat cache filter

    - by mabuzer
    How to have resource handler in tomcat, which simply check resource like js or css and append an ?[last-modified-date] to it's url, so we enable cache, and be sure that client-browser use right resource? thanks in advance...

    Read the article

  • Avoid change in database record

    - by Khou
    how do you make your software aware of database records changes that was not modifed by your application? (ie it was modified externally, in MS SQL Server Management Studio or other). Do you do a checksum? and store it somewhere? or what do you do?

    Read the article

  • Removing rows in asp.net

    - by user279521
    I am attempting to remove rows on my asp.net page using the following code: try { Table t = (Table)Page.FindControl("Panel1").FindControl("tbl"); foreach (TableRow tr in t.Rows) { t.Rows.Remove(tr); } } catch (Exception e) { lblErrorMessage.Text = "Error - RemoveDynControls - " + e.Message; } however, I am getting an error on the (when the code loops the second time around) "Collection was modified; enumeration operation may not execute." Any ideas regarding what is causing the error message?

    Read the article

  • Reverting a single file to a previous version in git

    - by georgeliquor
    Is there a way to go through different commits on a file. Say I modified a file 5 times and I want to go back to change 2, after I already committed and pushed to a repository. In my understanding the only way is to keep many branches, have I got that right? If I'm right I'm gonna have hundreds of branches in a few days, so I'm probably not understanding it really. Could anyone clear that up please?

    Read the article

  • Create your own HTML Textfield with Javascript

    - by teehoo
    I came across the following http://ckeditor.com/demo , and was wondering if anyone had a basic tutorial how to implement this (or perhaps what key search terms I should use)? Is this just a heavily modified TextField, or have they somehow managed to create a completely new TextField from scratch? I tried googling this many times, and I always get pages relating to customizing the built-in TextField with CSS etc.

    Read the article

  • Changing the color of a QTextBlock that is within a QTextDocument

    - by yan bellavance
    Is there any other way to change the QTextLayout of a QTextBlock that is within a QTextDocument without having to subclass QAbstractTextDocumentLayout and call its documentChanged? I know that on a call to QTextBlock::layout() const ; the returned QTextLayout object can only be modified from the documentChanged implementation of a QAbstractTextDocumentLayout subclass but I was wodering if there was any other way before I implemented it.

    Read the article

  • replace a whole page useing GreaseMonkey

    - by RYan
    is there a way to replace a whole web page using GreaseMonkey? basically a redirection but the address bar still shows the original address. i want the original address to show, but i want to load a modified web page from my hard drive without anyone knowing. thanks

    Read the article

  • php regular expression help finding multiple filenames only not full URL

    - by jason
    I am trying to fix a regular expression i have been using in php it finds all find filenames within a sentence / paragraph. The file names always look like this: /this-a-valid-page.php From help i have received on SOF my old pattern was modified to this which avoids full urls which is the issue i was having, but this pattern only finds one occurance at the begging of a string, nothing inside the string. /^\/(.*?).php/ I have a live example here: http://vzio.com/upload/reg_pattern.php

    Read the article

  • Use web interface to modify htaccess file

    - by justinl
    The solution to a previous question (How to implement “Maintenance Mode” on already established website), was to use a modified .htaccess to deny IP addresses. What is the best way to use a web interface to modify an .htaccess file? What I want is a way for an admin to log in to the admin area and switch Maintenance Mode on and off using a basic html form. I'm using PHP and I'm already using an .htaccess file for a handful of ReWriting.

    Read the article

  • How to implement email correlation with subject and body modification?

    - by Neuquino
    I have a system that sends mail. I have a system that receives mail. I need to identify that a received mail correlates with the one the other system sent. The particular thing here is that either the subject or the body can be modified. I thought on putting some hash in the header of the sent email, but I don't know where this could be added Don't you have any clue?

    Read the article

  • Entity Framework Update Entity along with child entities (add/update as necessary)

    - by Jorin
    I have a many-to-many relationship between Issues and Scopes in my EF Context. In ASP.NET MVC, I bring up an Edit form that allows the user to edit a particular Issue. At the bottom of the form, is a list of checkboxes that allow them to select which scopes apply to this issue. When editing an issue, it likely will always have some Scopes associated with it already--these boxes will be checked already. However, the user has the opportunity to check more scopes or remove some of the currently checked scopes. My code looked something like this to save just the Issue: using (var edmx = new MayflyEntities()) { Issue issue = new Issue { IssueID = id, TSColumn = formIssue.TSColumn }; edmx.Issues.Attach(issue); UpdateModel(issue); if (ModelState.IsValid) { //if (edmx.SaveChanges() != 1) throw new Exception("Unknown error. Please try again."); edmx.SaveChanges(); TempData["message"] = string.Format("Issue #{0} successfully modified.", id); } } So, when I try to add in the logic to save the associated scopes, I tried several things, but ultimately, this is what made the most sense to me: using (var edmx = new MayflyEntities()) { Issue issue = new Issue { IssueID = id, TSColumn = formIssue.TSColumn }; edmx.Issues.Attach(issue); UpdateModel(issue); foreach (int scopeID in formIssue.ScopeIDs) { var thisScope = new Scope { ID = scopeID }; edmx.Scopes.Attach(thisScope); thisScope.ProjectID = formIssue.ProjectID; if (issue.Scopes.Contains(thisScope)) { issue.Scopes.Attach(thisScope); //the scope already exists } else { issue.Scopes.Add(thisScope); // the scope needs to be added } } if (ModelState.IsValid) { //if (edmx.SaveChanges() != 1) throw new Exception("Unknown error. Please try again."); edmx.SaveChanges(); TempData["message"] = string.Format("Issue #{0} successfully modified.", id); } } But, unfortunately, that just throws the following exception: An object with the same key already exists in the ObjectStateManager. The ObjectStateManager cannot track multiple objects with the same key. What am I doing wrong?

    Read the article

  • Sharepoint 2007 calculated Date field shows incorrectly in non-US region

    - by Proforce
    If a SharePoint user (with Regional Settings set to UK) views a calculated date field in a View details form, the field shows incorrectly. I am using: ddwrt:FormatDateTime(string(@RenewalDate), 1033, 'dd MMMM yyyy') Which shows 04 January 2010 for 01/04/2010 and, doesnt show unresolvable dates such as 31-Dec-2010. This applies even with a simnple =[Modified] formula The Server is set up in the US for that locale.

    Read the article

  • ASP.NET MVC CookieTempDataProvider: any experience?

    - by Igor Brejc
    UPDATE: looks like I've misunderstood what TempData is for and what it isn't. It definitively shouldn't be used to "keep certain session-wide data" as I asked initially (see ASP.NET MVC TempData Is Really RedirectData why). I've modified the question accordingly. Has anyone used CookieTempDataProvider for TempData storage? Are there any caveats to watch out for (apart from keeping the session storage small)? Any issues with using it on Web farms?

    Read the article

< Previous Page | 33 34 35 36 37 38 39 40 41 42 43 44  | Next Page >