Daily Archives

Articles indexed Thursday April 15 2010

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

  • Django 404 page not showing up

    - by Matthew Doyle
    Hey all, I'm in the middle of putting up my first django application on shared hosting. This should be an easy thing, but I am just not seeing it. I tried to follow the directions of the django documentation, and created a 404.html page within my template folder. I just wrote "This is a 404 page." in the .html file. I also did the same thing for a 500.html page and wrote in it "This is a 500 page." However when I hit a 'bad page' I get a standard 404 page from the browser (Oops! This link appears to be broken. in Chrome) when I would expect "This is a 404 page." What's even more interesting is out of frustration I wrote {% asdfjasdf %} in the 404.html, and instead of getting the "Oops!..." error I get "This is a 500 page," so it definitely sees the 404.html template. Here's what I can confirm: Debug = False I am running apache on a shared hosting I have not done anything special with .htaccess and 404 errors. If I run with Debug = True, it says it's a 404 error. I am using FastCGI Anything else anyone think I could try? Thank you very much!

    Read the article

  • Is 23,148,855,308,184,500 a magic number, or sheer chance?

    - by Roddy
    News reports such as this one indicate that the above number may have arisen as a programming bug. A man in the United States popped out to his local petrol station to buy a pack of cigarettes - only to find his card charged $23,148,855,308,184,500. That is $23 quadrillion (£14 quadrillion) - many times the US national debt.* In hex it's $523DC2E199EBB4 which doesn't appear terribly interesting at first sight. Anyone have any thoughts about what programming error would have caused this?

    Read the article

  • How to force Chrome to make bookmarks the priority for auto-complete in the address bar?

    - by NoCatharsis
    As it is right now, if I start typing, for instance, "dictionary" into the address bar, Chrome immediately returns a list of bookmarks, history, and related sites. However, the first and highlighted option is to search Google for "dictionary". I want Chrome to immediately recognize that I have a bookmark specifically named "Dictionary" that links to the site www.dictionary.com. But, that's the second choice, not the first. So I have to type a few letters, get auto-complete to suggest some sites, then key down to my bookmark item before pressing Enter. How annoying. Any way to cut the middle man and make my bookmark the top result?

    Read the article

  • Add programmatically clickable Button with custom Views layouted in InterfaceBuilder

    - by allisone
    I have a UIScrollView. In there I add buttons programmatically. Right now I just use UIButton and set one title. But I need to have an UIImage View in there, that will change upon certain events, Text that will change too etc. and I would like to style that in Interface Builder, but I can't figure out how to do this. Which class should I extend, and what kind of xib should I create and what in there, so that in the end I can make the right connections and so that I can listen for UIControlEventTouchDown of that Button.

    Read the article

  • converting an int to char*

    - by Alexander
    This is a very very basic question and I know one way is to do the following: char buffer[33]; itoa(aq_width, buffer,10); where aq_width is the int, but then I can't guarantee what size of buffer I would need in order to do this... I can always allocate a very large buffer size, but that wouldn't be very nice... any other pretty and simple way to do this?

    Read the article

  • Throwing a C++ exception after an inline-asm jump

    - by SoapBox
    I have some odd self modifying code, but at the root of it is a pretty simple problem: I want to be able to execute a jmp (or a call) and then from that arbitrary point throw an exception and have it caught by the try/catch block that contained the jmp/call. But when I do this (in gcc 4.4.1 x86_64) the exception results in a terminate() as it would if the exception was thrown from outside of a try/catch. I don't really see how this is different than throwing an exception from inside of some far-flung library, yet it obviously is because it just doesn't work. How can I execute a jmp or call but still throw an exception back to the original try/catch? Why doesn't this try/catch continue to handle these exceptions as it would if the function was called normally? The code: #include <iostream> #include <stdexcept> using namespace std; void thrower() { cout << "Inside thrower" << endl; throw runtime_error("some exception"); } int main() { cout << "Top of main" << endl; try { asm volatile ( "jmp *%0" // same thing happens with a call instead of a jmp : : "r"((long)thrower) : ); } catch (exception &e) { cout << "Caught : " << e.what() << endl; } cout << "Bottom of main" << endl << endl; } The expected output: Top of main Inside thrower Caught : some exception Bottom of main The actual output: Top of main Inside thrower terminate called after throwing an instance of 'std::runtime_error' what(): some exception Aborted

    Read the article

  • What techniques are available for filtering collections of objects when using zodb?

    - by Omega
    As the title says: What techniques are available for filtering objects when using zodb? The equivalent in SQL terms would be something like filtering results by a date range. Or only returning rows with a particular value set in a column. If I had a series of blog posts and only wanted ones done in the past month, what would I have to do? Is there any way to optimize these kinds of "queries"? My gut tells me iterating over all the objects in a relationship simply to perform a test is less than optimal.

    Read the article

  • Windbg + IDA: calculate an address in a module

    - by Benjamin
    Hi all, I'm debugging remotely a windows XP machine. One of my drivers is loaded at address 0xb2c4c000 up to 0xb2cb9680. Now when I open my driver in IDA, the offset I want to set a breakpoint on is at 00017619. How can I effectively match my IDA address into windbg? I've tried the obvious which is to sum 0xb2c4c000 + 00017619 = 0xB2C635F7 and disassemble that address using the 'u' command in windbg. But the results did not match the assembly in IDA. On the side question: is there a way to cancel a command that is running in windbg? Several times I've ran commands that took ages to process, I would like to be able to cancel them if needed. So I can keep working. Thanks for your time.

    Read the article

  • Facebook comments widget

    - by Fabian Glace
    Hi, i'm using some of facebook widgets. I have "Fan Box" and "Share". They work just fine. I'm trying to use the Comment Box and the problem is it does not show up at all on my site. http://www.facebook.com/facebook-widgets/ This is the facebook page with the widgets. "Website or Business" column widgets work fine when i use them. "Developers" column widgets don't work at all. I have a developer account all setup. This is the widget code. FB.init("e83799c22a5c43da5142a958595dc531"); Does anyone know if i'm missing something.

    Read the article

  • Can JNI handle any dll files (Windows)?

    - by henry
    I am new to JNI. And have a few questions : Can JNI handle every type dll exists in windows? I wanted to link a library but it gives me error. Is it possible JNI and the dll are not compatible? Excerpt from VB .NET (It works) Private Declare Function ConnectReader Lib "rfidhid.dll" () As Integer Private Declare Function DisconnectReader Lib "rfidhid.dll" () As Integer Private Declare Function SetAntenna Lib "rfidhid.dll" (ByVal mode As Integer) As Integer Full Code From Java public class MainForm { /** * @param args */ public native int ConnectReader(); public static void main(String[] args) { // TODO Auto-generated method stub MainForm mf = new MainForm(); System.out.println(mf.ConnectReader()); } static { System.loadLibrary("rfidhid"); } } Error code shown Exception in thread "main" java.lang.UnsatisfiedLinkError: MainForm.ConnectReader()I at MainForm.ConnectReader(Native Method) at MainForm.main(MainForm.java:13) Can anyone point to me where I might do wrong

    Read the article

  • A web framework where AJAX was not an after thought

    - by Pirate for Profit
    AJAX is a pain in the ass because it essentially means you'll have to write two sets of similarish code: one for browsers with JavaScript enabled and those without. Not only this, but you have to connect JavaScript events to hook into your models and display the results. And if all that weren't bad enough, you need to send an address change with the request, otherwise the user won't be able to "click back" correctly (if confused look at what happens to the address bar when you click links in GMail). We're searching for something that had the foresight and design goals with all these concerns in mind. Performance and security are also obvious major concerns. We love config-based systems as well, where you don't have to write a lot of code you just drop it into an easily read config format. It's like asking for the holy grail right?

    Read the article

  • Export SharePoint Wiki to PDF from the Command Line

    - by Wyatt Barnett
    We use a SharePoint wiki* at the office to serve as a knowledgebase for our IT operations. Recently we went through a disaster recovery exercise where we realized we had a key hole in our plans: how do you restore the services if your instruction manual is down because some services are offline? Anyhow, we did realize that the wiki angle was definitely something we wanted to keep, but rather that we should explore a way to create offline backups of the wiki which could be easily read using common software we should be able to setup without any knowledge from the wiki. So, does anyone know of a good utility that can take a SharePoint wiki and dump it to PDF/Word/RTF/[INSERT HUMAN FRIENDLY FORMAT] easily from the command line? *-Yes, there are better solutions out there. But this was easy and used existing infrastructure and generally does what we need it to do.

    Read the article

  • Hot swapping for Linux web/database servers

    - by Art
    Is there a way to perform the following under Linux: There are two web servers, main and backup There are two database servers (postgres), main and backup Web Servers are in sync with each other, ie. configuration/content/applications are the same Backup database is continuously synced up with main database. If either of main servers goes down, it's being replaced with backup one on the fly. When main database server goes back up, all the data from backup server is uploaded to it. Essentially, I need the hot swapping working automatically with no or minimal user intervention, if possible. Recovery procedure is preferably automatic but can include some manual steps.

    Read the article

  • Change desktop background at school

    - by Nano8Blazex
    On school computers, I can log in with a user account stored on the school network (something like that, I have no experience in networking and this sort of stuff). Everything is fine and dandy and totally works as it should, but there is one thing that I find annoying. Apparently for some reason I can't change my background to anything more than a couple of different solid colors with our school's logo still stuck in the middle. (the original background is a white logo on black background. If I change it to a different color, the central 6x6 inch black/white logo still remains, only the surrounding color is changed.) It may have been set by school administrators or something, I don't really know. I find this really ugly. Is there any way to change a setting so that I can set the background to any picture I wish? (like on a home pc...) Thanks.

    Read the article

  • Folder keeps changing back to read-only. What permissions setup causes this in Windows?

    - by farmerbuzz
    I think I'm going crazy. Every time I create a folder it automatically is set to readonly, but I can still then rename the folder or add folders to it. If I attempt to uncheck the readonly flag it becomes checked again when I next open the folder properties. What the heck? Could my IT dept really have set up a policy like this somehow? If so, how? Seems crazy that Windows would even do this -- no errors when I uncheck read-only and hit ok but the change fails.

    Read the article

  • Sortie de Perl 5.12, tandis que le développement de Perl 6 se poursuit

    Mise à jour du 14.04.2010 par Katleen Sortie de Perl 5.12, tandis que le développement de Perl 6 se poursuit Le langage open source Perl fait un pas en avant cette semaine avec les débuts de Perl 5.12, malgré le débat autour de son déclin. De nouvelles fonctionnalité sont au rendez-vous pour faciliter la tâche des développeurs. Par exemple, les mots clés pluggables sont désormais pris en charge. Ce méchanisme s'attache directement au parseur et permet l'implémentation d'un mot clé pour définir la syntaxe du reste du texte. Perl, langage dynamique, existe depuis 1987 (une éternité dans l'histoire de l'informatique !). Perl 5.0 est apparu en 1994, quelle longévité ! ...

    Read the article

  • Prepend to the title tag using jQuery?

    - by Bob Dylan
    I want to have my title tag look like this: My Website - Name of Page I want to prepend the My Website - part so that I don't have to type it on every new page I make. So the title tag that I actually have on the page would be: <title>Name of Page</title> Is this possible?

    Read the article

  • Combining MDX and SQL datasets into one for a drill-through report??

    - by user259286
    Hello, Wondering if I could get some advice and direction on this following requirement: Need to Create a SSRS report with two datasets, one MDX and one SQL. I then need to join those two datasets to create a third dataset which is to be used by a drill though report. How can I combine those datasets into one and use that as a Dataset for a drill-through report? Thanks!!

    Read the article

  • Creating Windows Desktop Icon in CMake + CPack + NSIS

    - by Simeon Fitch
    I'm using NSIS package generator in CMake 2.8.1 to distribute a Qt application. Everything is working fine... except the use of CPACK_CREATE_DESKTOP_LINKS to create a desktop link to the application. I've looked through the CMake source (including it's own "bootstrap" installation definition for windows), and as far as I can tell I'm doing the same thing. Here's the relevant section of my CMakeLists.txt file. set(CPACK_GENERATOR NSIS) set(CPACK_NSIS_PACKAGE_NAME "${EWS_APP_NAME}") set(CPACK_NSIS_DISPLAY_NAME "${EWS_APP_NAME}") set(CPACK_NSIS_CONTACT "${EWS_EMAIL}") set(CPACK_PACKAGE_EXECUTABLES "${EXE_TARGET_NAME}" "${EWS_APP_NAME}") set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CMAKE_PROJECT_NAME}-${EWS_VERSION}") # this works set(CPACK_NSIS_MENU_LINKS "${EWS_WEBSITE}" "Homepage for ${EWS_APP_NAME}") # this doesn't set(CPACK_CREATE_DESKTOP_LINKS "${EXE_TARGET_NAME}") # Icon in the add/remove control panel. Must be an .exe file set(CPACK_NSIS_INSTALLED_ICON_NAME bin\\\\${EXE_TARGET_NAME}.exe) set(CPACK_NSIS_URL_INFO_ABOUT "${EWS_WEBSITE}") set(CPACK_NSIS_HELP_LINK "${EWS_WEBSITE}") Any ideas or debugging tips are appreciated!

    Read the article

  • Dismissing iPad UIPopoverController when BarButtonItem is pushed while it's open

    - by joshholat
    Using a split view on the iPad, I have the following code: - (void)splitViewController: (UISplitViewController*)svc willHideViewController:(UIViewController *)aViewController withBarButtonItem:(UIBarButtonItem*)barButtonItem forPopoverController:(UIPopoverController*)pc { barButtonItem.title = @"Categories"; NSMutableArray *items = [[toolbar items] mutableCopy]; [items insertObject:barButtonItem atIndex:0]; [toolbar setItems:items animated:YES]; [items release]; self.popoverController = pc; } This works well to show the popover when the button is pressed. However, I'd also like to have the popover dismiss if the button is pressed while it is already open to follow good guidelines. How would I go about doing this? (i.e. if the user repeatedly clicks this button, the popover should come and hide every other hit.)

    Read the article

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