Daily Archives

Articles indexed Sunday March 28 2010

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

  • Application error passthru when using apache mod_proxy

    - by user303442
    Heyas. I'm using mod_proxy with apache2 provide vhost ability to multiple servlet apps running on the local machine. It works fine, for the most part. Requests come into apache then are directed to the application bound on a port on localhost. The app receives the request and responds, which is delivered back to the client by apache. The problem I'm having is that the application delivers 500's on errors, and mod_proxy stomps on them. Often these errors are caused in a ajax request and the error is handled in client side javascript. For example, a call to a server side createObject(name) might throw a NameNotUniqueException , which is delivered back as a 500. The client javascript might then display an appropriate error message. When an error is thrown by the application (resulting in a 500 response to mod_proxy), then apache stomps the error message and returns 500 Internal Server Error Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. .. the stock apache server side error message. I want mod_proxy to pass the original 500 back through to the client. Is there a directive I've missed which prevents clobbering of the 500? TIA

    Read the article

  • Returning content directly from memcache - Django / HTTP Server

    - by RadiantHex
    Hi folks, I've built a web application with Django, I'm using Memcached in order to cache data. A few views cache the whole HttpResponse objects, therefore there might be a better alternative for returning the Memcached data other than going through Django. What could be faster alternatives for returning Memcached data on HTTP Requests ? I'm trying to make the operation as fast and lightweight as possible. Help would be much appreciated! :)

    Read the article

  • \n not working in my fwrite()

    - by brett
    Not sure what could be the problem. I'm dumping data from an array $theArray into theFile.txt, each array item on a separate line. $file = fopen("theFile.txt", "w"); foreach ($theArray as $arrayItem){ fwrite($file, $arrayItem . '\n'); } fclose($file); Problem is when I open theFile.txt, I see the \n being outputted literally. Also if I try to programmatically read the file line by line (just in case lines are there), it shows them as 1 line meaning \n are really not having their desired effect.

    Read the article

  • fread and fwrite are not recommended for use with structured data

    - by forest58
    A book beginning linux programming 3ed says "Note that fread and fwrite are not recommended for use with structured data.Part of the problem is that files written with fwrite are potentially nonportable between different machines." What does that mean exactly? what calls should I use if I want to write a portable structured data reader or writer? direct system calls?

    Read the article

  • PHP output of foreach loop into a new array.

    - by RobHardgood
    I know I'm probably missing something easy, but I have a foreach loop and I'm trying to modify the values of the first array, and output a new array with the modifications as the new values. Basically I'm starting with an array: 0 = A:B 1 = B:C 2 = C:D And I'm using explode() to strip out the :'s and second letters, so I want to be left with an array: 0 = A 1 = B 2 = C The explode() part of my function works fine, but I only seem to get single string outputs. A, B, and C.

    Read the article

  • I want to use a Currency control in Ajax that accepts any number of inputs

    - by Viswa
    I want to use a Currency Control in Ajax that accepts any number of input digits( with decimal maximum up to two digits only) For example If i am having a code like this: TextBox txt = new TextBox(); txt.Text ="99.99"; txt.Id = "TextBox1"; MaskedEditExtender mskEdit = new MaskEditExtender(); mskEdit.Id="CurrencyController"; mskEdit.Mask = "9,999,999.99"; mskEdit.TargetControlId = txt.Id; mskEdit.DisplayMoney = MaskedEditShowSymbol.Left; mskEdit.InputDirection = MaskedEditInputDirection.RightToLeft; mskEdit.MaskType = "None"; The issue is tha, when i run the above code the TextBox(textbox input text given is 99.99 but it is showing as $,,_.99. Please help me on this issue.

    Read the article

  • Alternatives to fread and fwrite for use with structured data

    - by forest58
    The book Beginning Linux Programming (3rd ed) says "Note that fread and fwrite are not recommended for use with structured data. Part of the problem is that files written with fwrite are potentially nonportable between different machines." What does that mean exactly? What calls should I use if I want to write a portable structured data reader or writer? Direct system calls?

    Read the article

  • Suggestions on how build an HTML Diff tool?

    - by Danimal
    In this post I asked if there were any tools that compare the structure (not actual content) of 2 HTML pages. I ask because I receive HTML templates from our designers, and frequently miss minor formatting changes in my implementation. I then waste a few hours of designer time sifting through my pages to find my mistakes. The thread offered some good suggestions, but there was nothing that fit the bill. "Fine, then", thought I, "I'll just crank one out myself. I'm a halfway-decent developer, right?". Well, once I started to think about it, I couldn't quite figure out how to go about it. I can crank out a data-driven website easily enough, or do a CMS implementation, or throw documents in and out of BizTalk all day. Can't begin to figure out how to compare HTML docs. Well, sure, I have to read the DOM, and iterate through the nodes. I have to map the structure to some data structure (how??), and then compare them (how??). It's a development task like none I've ever attempted. So now that I've identified a weakness in my knowledge, I'm even more challenged to figure this out. Any suggestions on how to get started? clarification: the actual content isn't what I want to compare -- the creative guys fill their pages with lorem ipsum, and I use real content. Instead, I want to compare structure: <div class="foo">lorem ipsum<div> is different that <div class="foo"><p>lorem ipsum<p><div>

    Read the article

  • The multi-part identifier could not be bound

    - by jello
    I have this very simple sql statement: SELECT max_dose FROM psychotropes WHERE (patient_meds.psychotrope = psychotrope_name) AND (patient_meds.patient_id = 12) when I try to run it in Visual Studio 2008, it tells me "The multi-part 'patient_meds.psychotrope' identifier could not be bound" it's weird, because I did set a relationship between the two tables in the diagram viewer

    Read the article

  • What join in Linq i have to use to do what i want?

    - by Garcia Julien
    Hi, I have two dataset from different server. I have result like that (if image doesn't work my data) The problem is at last, i've got only the result from the first table like that And i would like to have all the result for different job type like that asset job jan feb mar ... 5000 acc 10 11 12 5000 over 10 11 12 The problem is not solve with a right join because it's the same problem Could you help me? Thank Ju

    Read the article

  • Cannot ping ubuntu server by hostname - can only ping by IP

    - by Tone
    I have an unbuntu 9.10 server and have set the hostname to "fileserver" When I try to ping fileserver from a client machine it doesn't find it, however I can ping by the IP my router assigns it. I have tried changing the ip in /etc/hosts from this: 127.0.0.1 fileserver to this: 192.168.1.109 fileserver which is the ip being assigned. I had a previous install of this server and i had no issues with this - only difference in this install is i did not select any of the options such as LAMP, OpenSSH, etc during the install process. I can access the machine fine by ip using PuTTY. Any ideas?

    Read the article

  • UI suggestions on how to display suggested tags for a given text to a user?

    - by Danny
    I am writing a web-app that uses a tagging system to organize the user's submitted reports. Part of it uses ajax to get suggestions for tags to present to the user based on the content of their report. I am looking for suggestions on how to present this information for the user. I'm not quite certain what a friendly way to do this would be. Edit: Well, most of the responses here seem to be focused on the user typing in keywords. The idea I'm trying to define here is more towards presenting the user a set of suggested keywords that they may accept or decline without having to type a tag in manually. (That option is of course still available to them) --------------------------- # say they can checkoff or select tags they like. | o[tag2] x[foo] o[moo] | | x[tag1] o[bar] | ---------------------------

    Read the article

  • "Metadata information not found" while using EF4's POCO Template?

    - by ladenedge
    I just installed the POCO Template for EF4. I have a single entity in my model, AnnouncementText, and the T4 files seem to be properly generated. Attempting to access this new entity is throwing the following error when I access the auto-generated property MyObjectContext.AnnouncementTexts: InvalidOperationException: Mapping and metadata information could not be found for EntityType 'MyNamespace.AnnouncementText'. The properties on the AnnouncementText POCO seem to match up with the columns in the database, and I haven't changed any of the auto-generated code. The stack trace is: at System.Data.Objects.ObjectContext.GetTypeUsage(Type entityCLRType) at System.Data.Objects.ObjectContext.GetEntitySetForNameAndType(String entitySetName, Type entityCLRType, String exceptionParameterName) at System.Data.Objects.ObjectContext.CreateObjectSet[TEntity](String entitySetName) at MyNamespace.MyObjectContext.get_AnnouncementTexts() in C:\<snip>\MyObjectContext.Context.cs:line 65 at MyNamespace.Class1.Main() in C:\<snip>\Class1.cs:line 14 If I delete the .tt files from the solution and enable code generation on the model, I am able to access the property without issue. Here's my code, in case that might help: using (var context = new MyObjectContext()) foreach (var at in context.AnnouncementTexts) Console.WriteLine(at.Title); Any ideas on what might be wrong?

    Read the article

  • Is there a tool for detecting Visual Studio projects with duplicate GUIDs?

    - by sharptooth
    When creating new Visual Studio C++ projects there're two ways: either run the wizard and then painfully change all the necessary settings in the project or just copy and existing project, rename everything there and add files into it. The second variant is great except that the .vcproj file stores a project GUID. This GUID is used to track project dependencies and the startup project when two or more projects are in one solution. If any two projects in one solution have identical GUIDs problems can arise - dependencies are lost and the startup prject is reset on next solution reload. Clearly there's a need for a tool that would scan the filesystem subtree and detect projects with identical GUIDs here. Before I start writing one ... is there a ready tool for that?

    Read the article

  • Unable to download .apk via webbrowser from drupal site

    - by ggrell
    I have a drupal-based website where people can log in and see private discussion forums. This is where I want to have my beta testers for my Android application download the beta .apk files. I tested this thoroughly on my Android 1.6 based myTouch 3G, and was able to log in, and download files attached to forum posts without problems. Now comes the interesting part: my testers on Droids and Nexus Ones (Android 2.0.1 and 2.1) were complaining that their downloads are failing. Since I don't have an 2.0 phone, I tried it out in a 2.0 emulator, and lo-and-behold, it didn't work. The download shows the indeterminate progress for a second or two, then shows "Download unsuccessful". Based on what I see in the logs, it is apparent that the server is returning a 404 for the download request from 2.0 browsers. I can download to my desktop and 1.6 phone no problem. The only reason I can think of that the server would return a 404 for a request is that for some reason the credentials or cookies aren't being passed by the download process. Logcat shows: http error 404 for download x Some background: I added the mime type to my .htaccess like this: AddType application/vnd.android.package-archive apk I checked the server logs and see the following for failed downloads: xx.xx.xx.224 - - [28/Jan/2010:20:39:00 -0500] "GET /system/files/grandmajong-beta090.apk HTTP/1.1" 404 - "http://trickybits.com/forums/beta-testing/grandma-jong/latest-version-090-b1" "Mozilla/5.0 (Linux; U; Android 1.6; en-us; sdk Build/Donut) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1"

    Read the article

  • Using Regular Expression in VC++

    - by Benit
    Hi , I am finding Email ids in mu project, where I am preprocessing the input using some Regular Expression. RegExpPhone6.RegComp("[\[\{\(][ -]?[s][h][i][f][t][ -]?[+-][2][ -]?[\]\}\)]"); Here while I am compiling i am getting a warning msg like Warning 39 warning C4129: ')' : unrecognized character escape sequence How can i resolve this ? Why this is occuring and Where will it affect? Kindly help me...

    Read the article

  • Subclipse > Accidental Merge Conflict Resolution

    - by DTS
    I'm trying to merge changes from one branch into another using Subclipse. On a particular file in a particular subdirectory, I had a file conflict and edited the conflicts via the context menu option for this. However, when I went to resolve the conflict I apparently chose the wrong option and was left with the original unmerged file in my branch. Since then, I can no longer get this file back into a conflicted state so I can resolve this issue properly. I've tried deleting the file and the directory that contains it, to no avail. Any ideas?

    Read the article

  • Is is possible to use IOCP (or other API) in Reactor-style operations?

    - by Artyom
    Hello, Is there any scalable Win32 API (like IOCP not like select) that gives you reactor style operations on sockets? AFAIK IOCP allows you to receive notification on completed operations like data read or written (proactor) but I'm looking for reactor style of operations: I need to get notification when the socket is readable or writable (reactor). Something similar to epoll, kqueue, /dev/poll ? Is there such API in Win32? If so where can I find a manual on it? Clearification: I need select like api for sockets that is as scalable as IOCP, or I'm looking for a way to use IOCP in reactor like operations.

    Read the article

  • Zend_Form using subforms getValues() problem

    - by wiseguydigital
    Hi all, I am building a form in Zend Framework 1.9 using subforms as well as Zend_JQuery being enabled on those forms. The form itself is fine and all the error checking etc is working as normal. But the issue I am having is that when I'm trying to retrieve the values in my controller, I'm receiving just the form entry for the last subform e.g. My master form class (abbreviated for speed): Master_Form extends Zend_Form { public function init() { ZendX_JQuery::enableForm($this); $this->setAction('actioninhere') ... ->setAttrib('id', 'mainForm') $sub_one = new Form_One(); $sub_one->setDecorators(... in here I add the jQuery as per the docs); $this->addSubForm($sub_one, 'form-one'); $sub_two = new Form_Two(); $sub_two->setDecorators(... in here I add the jQuery as per the docs); $this->addSubForm($sub_two, 'form-two'); } } So that all works as it should in the display and when I submit without filling in the required values, the correct errors are returned. However, in my controller I have this: class My_Controller extends Zend_Controller_Action { public function createAction() { $request = $this->getRequest(); $form = new Master_Form(); if ($request->isPost()) { if ($form->isValid($request->getPost()) { // This is where I am having the problems print_r($form->getValues()); } } } } When I submit this and it gets past isValid(), the $form-getValues() is only returning the elements from the second subform, not the entire form.

    Read the article

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