Search Results

Search found 1303 results on 53 pages for 'dr gewa'.

Page 17/53 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • collecting a "+" via CGI

    - by Dr.Dredel
    I'm collecting text through a web form and noticing that when it is collected by my PERL CGI all instances of "+" are transformed into " ". I run the text through a javascript escape before submission, but escape seems to leave + unaltered. There must be something really obvious that I'm missing... how do I send the string "2 + 2 = 4" through and not have it arrive as "2 2 = 4" ??

    Read the article

  • VS 2010 Debugger: Any way to search an object for a particular value?

    - by Dr. Zim
    I am trying to search the "this" object in an ASP.NET MVC 2 for a string value. In a view, I set the partial view input tag prefix and am trying to figure out how to reference it in the partial view itself. For example: Html.EditorFor(m => m, "templateName", "fieldPrefix"); In the partial view, I would like to search the "this" object for my fieldPrefix string to see where the MVC folks decided to store it. Any ideas?

    Read the article

  • Is it possible to "learn" a regular expression by user-provided examples?

    - by DR
    Is it possible to "learn" a regular expression by user-provided examples? To clarify: I do not want to learn regular expressions. I want to create a program which "learns" a regular expression from examples which are interactively provided by a user, perhaps by selecting parts from a text or selecting begin or end markers. Is it possible? Are there algorithms, keywords, etc. which I can Google for? EDIT: Thank you for the answers, but I'm not interested in tools which provide this feature. I'm looking for theoretical information, like papers, tutorials, source code, names of algorithms, so I can create something for myself.

    Read the article

  • What's the best way to skin my iPhone app (similar to how the Notes app is skinned)?

    - by Dr Dork
    If you look at the Notes app on the iPad, you can see it uses all native iPhone controls, but they're "skinned" to look like a pad of paper. What's the best way to implement something similar to that? Could I use interface builder and simply change the background image for each of the controls, including the TableViews? Thanks in advance for all your help! I'm going to continue researching this question right now.

    Read the article

  • Should frontend and backend be handled by different controllers?

    - by DR
    In my previous learning projects I always used a single controller, but now I wonder if that is good practice or even always possible. In all RESTful Rails tutorials the controllers have a show, an edit and an index view. If an authorized user is logged on, the edit view becomes available and the index view shows additional data manipulation controls, like a delete button or a link to the edit view. Now I have a Rails application which falls exactly into this pattern, but the index view is not reusable: The normal user sees a flashy index page with lots of pictures, complex layout, no Javascript requirement, ... The Admin user index has a completly different minimalistic design, jQuery table and lots of additional data, ... Now I'm not sure how to handle this case. I can think of the following: Single controller, single view: The view is split into two large blocks/partials using an if statement. Single controller, two views: index and index_admin. Two different controllers: BookController and BookAdminController None of these solutions seems perfect, but for now I'm inclined to use the 3rd option. What's the preferred way to do this?

    Read the article

  • Is there any conflict between NFS and calling getFD().sync()?

    - by Dr.Dredel
    My boss is worried that our NFS file system will not be happy with the jboss run java process calling getFD().sync on the files we are writing. We have noticed that frequently the time stamp on the created file is minutes (sometimes as many as 15 minutes) after the log claims the file was finished writing. My only guess is that the NFS is hanging on to the file in memory and not writing it till it feels like it. sync should solve that probelm, right? I also noticed that there is never a close() called on the file. Wondering if that could have been the cause as well? any thoughts appreciated.

    Read the article

  • Access of private field of another object in copy constructors - Really a problem?

    - by DR
    In my Java application I have some copy-constructors like this public MyClass(MyClass src) { this.field1 = src.field1; this.field2 = src.field2; this.field3 = src.field3; ... } Now Netbeans 6.9 warns about this and I wonder what is wrong with this code? My concerns: Using the getters might introduce unwanted side-effects. The new object might no longer be considered a copy of the original. If it is recommended using the getters, wouldn't it be more consistent if one would use setters for the new instance as well?

    Read the article

  • Where can I find my iPhone app's Core Data persistent store?

    - by Dr Dork
    I'm diving into iPhone development, so I apologize in advance if this is a ridiculous question, but in a new iPad app project using the Core Data framework, here's the generated code for creating the persistentStoreCoordinator... - (NSPersistentStoreCoordinator *)persistentStoreCoordinator { if (persistentStoreCoordinator != nil) { return persistentStoreCoordinator; } NSURL *storeUrl = [NSURL fileURLWithPath: [[self applicationDocumentsDirectory] stringByAppendingPathComponent: @"ApplicationName.sqlite"]]; NSError *error = nil; persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]]; if (![persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeUrl options:nil error:&error]) { /* Replace this implementation with code to handle the error appropriately. abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. If it is not possible to recover from the error, display an alert panel that instructs the user to quit the application by pressing the Home button. Typical reasons for an error here include: * The persistent store is not accessible * The schema for the persistent store is incompatible with current managed object model Check the error message to determine what the actual problem was. */ NSLog(@"Unresolved error %@, %@", error, [error userInfo]); abort(); } return persistentStoreCoordinator; } My questions are... The first time I run the app, is the ApplicationName.sqllite database created automatically if it doesn't exist? If not, when is it created? When data is added to it programmatically? Once the DB does exist, where can I locate the file? I'd like to open it with a different program so I can manually manipulate the data. Thanks so much in advance for your help! I'm going to continue researching these questions right now.

    Read the article

  • Use different locale for the Format function?

    - by DR
    In a VB6 application I have to build a file which contains a decimal number which must always be written in US format: 1,499.99 But the Format function takes the system settings into account and on a German system this result would be produced: (Using the format string #,##0.00) 1.499,99 Can I force the Format function to use different settings?

    Read the article

  • Where do I place the launch image "Default.png" in my iPhone app's project directory?

    - by Dr Dork
    In the Apple documentation, it says... iPhone OS looks for a Default.png file, located in the top level of the application bundle. but I'm having a hard time figuring out how to get the image in that location in the bundle (I'm new to all this). I'm assuming my image will end up in the right place in the bundle when I compile it so long as I add it to the project correctly and place it in the right location in the project directory. My questions are... Where in my project directory should I place the "Default.png" image? Do I need add it to the project through Xcode? If so, how? Thanks so much in advance for all your help! I'm going to continue researching this question right now.

    Read the article

  • SSRS Issue: Rounding to nearest .25

    - by D.R.
    I have an SSRS (2008) report that takes in a raw transactions, then groups and totals them. At the "Total" level, I would like to round the final numbers to the nearest .25, however I cannot find a method to do this. According to what I've read, the Round() function in SSRS only rounds to integers. I have found a couple ways to do it in SQL, but the problem is, I want to do all the calculations with the REAL numbers and just round the result so that I don't introduce a significant amount of error from the real numbers. Here's the best SQL solution I could find: dec(round(number * 4, 0)/4,11,2) as Nearest_Qtr Anyone know how I could do the equivalent in the actual SSRS report? Thanks in advance for the help!

    Read the article

  • What's the preferred way to use helper methods in Ruby?

    - by DR
    Disclaimer: Although I'm asking in context of a Rails application, I'm not talking about Rails helpers (i.e. view helpers) Let's say I have a helper method/function: def dispatch_job(job = {}) #Do something end Now I want to use this from several places (mostly controllers, but also a few BackgrounDRb workers) What's the preferred way to do this? I can think of two possibilities: 1. Use a class and make the helper a static method: class MyHelper def self.dispatch_job(job = {}) end end class MyWorker def run MyHelper.dispatch_job(...) end end 2. Use a module and include the method into whatever class I need this functionality module MyHelper def self.dispatch_job(job = {}) end end class MyWorker include MyHelper def run dispatch_job(...) end end 3. Other possibilities I don't know yet ... The first one is more Java-like, but I'm not sure if the second one is really an appropriate use of Ruby's modules.

    Read the article

  • Alternative C++ Compilers?

    - by Dr Hydralisk
    I want to start learning C++, so I downloaded Microsoft Visual Studio 2010 Express, and the entire application freezes and crashes every time I try to compile (debug and release build) something (I have tried running it in Admin Mode). Is there a good alternative compiler that I could still use VS 2010 as the IDE?

    Read the article

  • Multiple returns: Which one sets the final return value?

    - by DR
    Given this code: String test() { try { return "1"; } finally { return "2"; } } Do the language specifications define the return value of a call to test()? In other words: Is it always the same in every JVM? In the Sun JVM the return value is 2, but I want to be sure, that this is not VM-dependant.

    Read the article

  • Boost Include Files in VC++

    - by Dr. K
    For the last few years, I have been exclusively a C# developer. Previously, I developed in C++ and have a C++ application that I built about 3 years ago using VS2005. It made extensive use of the Boost libraries. I recently decided to brush off the old app and rebuild it in VS2008 with the latest version of Boost (the latest version with the "easy" installation program from BoostPro Computing), 1.39. Previously when I had the program running I was at 1.33. Also, the last time the program was running was at least 2 OS installations ago. The Boost installation is located on my machine at: "C:\Program Files\boost\boost_1_39". Anyway, I have done the following: Set the project's "Additional Include Directories" directory to "C:\Program Files\boost\boost_1_39" Added "C:\Program Files\boost\boost_1_39" to VS2008's Tools - Options - Projects and Solutions - VC++ Directories - Include Files I have a number of Boost includes in my stdafx.h file. The compiler fails upon attempting to open the first one - #include <boost/algorithm/string/string.hpp> I have confirmed that the above file is indeed located at "C:\Program Files\boost\boost_1_39\boost\algorithm\string\string.hpp" I continue to get: fatal error C1083: Cannot open include file: 'boost/algorithm/string/string.hpp': No such file or directory Any tips on what else to check would be greatly appreciated. Again, this is an application that compiled fine a few years ago, but the source has now been moved to a new machine/compiler.

    Read the article

  • Maximum number of inodes in a directory?

    - by Dr. UNIX
    Is there a maximum number of inodes in a single directory? I have a directory of 2 million+ files and can't get an the ls command to work against that directory. So now I'm wondering if I've exceeded a limit on inodes in Linux. Is there a limit before a 2^64 numerical limit?

    Read the article

  • Under what circumstances would a Ruby $LOAD_PATH be acquired from a parent process?

    - by Dr Nic
    In my cucumber scenarios, if I call rake db:schema:load within a target Rails app folder, I get the cucumber process's $LOAD_PATH and not the Rails app's own Gemfile/load path. I think this is very weird. The consequence is that I get the following error: no such file to load -- rails/all I can't reproduce it outside of my cucumber scenario. ruby -rubygems -e "system 'rake -T'" works normally - the 'rake -T' has the application's own Gemfile-based $LOAD_PATH; and doesn't generate the error above. Can anyone think why a child process (rake -T or rake db:schema:load or rails runner...; invoked by either system, exec, %x[...] or backtick; would start with the parent processes' $LOAD_PATH (from the cucumber scenario's Gemfile) instead of its own $LOAD_PATH (from the Rails app's Gemfile)?

    Read the article

  • How can creating the SessionFactory become slow after updating Hibernate?

    - by DR
    In my Java SE application I used Hibernate 3.4 and creating the SessionFactory took about 5 seconds. Today I updated to Hibernate 3.5.1 and suddenly it takes over a minute. What can be the cause of such a dramatic effect? I tried different things the better part of the day and I have no clue... Some data I collected According to the profiler the most time is spent in PersisterFactory.createClassPersister and in that method ProxyFactory.createClass takes the most time. The log shows nothing unusual Changing hibernate.bytecode.use_reflection_optimizer makes no difference

    Read the article

  • How to get JOptionPane with three text fields

    - by Dr.Mostafa
    I want to know how i can do a messageBox from three input dialog .. Like this: JOptionPane.showInputMessageDialog("Enter your FirstName"); JOptionPane.showInputMessageDialog("Enter your MiddleName"); JOptionPane.showInputMessageDialog("Enter your LastName"); But I want one message has a three input boxes.

    Read the article

  • SSIS: Way to handle hot folder items in parallel?

    - by Dr. Zim
    We have eight Xeon (i7) cores and 16 gig of RAM on our SSIS box. We have about 200 image files we want to convert using a command line utility every day. Currently the process is using Adobe Photoshop and droplets (very manual, taking upwards of two hours a day) Using SSIS hot folders, is there a way to execute up to eight conversions at once? Is there any way to tell a process completed or execute code upon it's completion?

    Read the article

  • How to stop Interruptible Threads in Java

    - by Dr.Lesh
    I have a Java application that I CAN'T EDIT that starts a Thread wich has this run method: public void run(){ while(true){ System.out.println("Something"); } } And at a certain moment I wanna stop it, but if I use thread.interrupt(); it won't work. If I use thread.stop(); it works, but this method is deprecated and its use is discouraged because soon it will be removed from JVM. Does anyone knows how to do it? Thank you.

    Read the article

  • How can I obtain the IPv4 address of the client?

    - by Dr Dork
    Hello! I'm prepping for a simple work project and am trying to familiarize myself with the basics of socket programming in a Unix dev environment. At this point, I have some basic server side code setup to listen for incoming TCP connection requests from clients after the parent socket has been created and is set to listen... int sockfd, newfd; unsigned int len; socklen_t sin_size; char msg[]="Test message sent"; char buf[MAXLEN]; int st, rv; struct addrinfo hints, *serverinfo, *p; struct sockaddr_storage client; char ip[INET6_ADDRSTRLEN]; . . //parent socket creation and listen code omitted for simplicity . //wait for connection requests from clients while(1) { //Returns the socketID and address of client connecting to socket if( ( newfd = accept(sockfd, (struct sockaddr *)&client, &len) ) == -1 ){ perror("Accept"); exit(-1); } if( (rv = recv(newfd, buf, MAXLEN-1, 0 )) == -1) { perror("Recv"); exit(-1); } struct sockaddr_in *clientAddr = ( struct sockaddr_in *) get_in_addr((struct sockaddr *)&client); inet_ntop(client.ss_family, clientAddr, ip, sizeof ip); printf("Receive from %s: query type is %s\n", ip, buf); if( ( st = send(newfd, msg, strlen(msg), 0)) == -1 ) { perror("Send"); exit(-1); } //ntohs is used to avoid big-endian and little endian compatibility issues printf("Send %d byte to port %d\n", ntohs(clientAddr->sin_port) ); close(newfd); } } I found the get_in_addr function online and placed it at the top of my code and use it to obtain the IP address of the client connecting... // get sockaddr, IPv4 or IPv6: void *get_in_addr(struct sockaddr *sa) { if (sa->sa_family == AF_INET) { return &(((struct sockaddr_in*)sa)->sin_addr); } return &(((struct sockaddr_in6*)sa)->sin6_addr); } but the function always returns the IPv6 IP address since thats what the sa_family property is set as. My question is, is the IPv4 IP address stored anywhere in the data I'm using and, if so, how can I access it? Thanks so much in advance for all your help!

    Read the article

  • MS SQL 2005: Why would a delete from a temp table hang forever?

    - by Dr. Zim
    DELETE FROM #tItem_ID WHERE #tItem_ID.Item_ID NOT IN ( SELECT DISTINCT Item_ID FROM Item_Keyword JOIN Keyword ON Item_Keyword.Keyword_ID = Keyword.Record_ID WHERE Keyword LIKE @tmpKW) The Keyword is %macaroni%. Both temp tables are 3300 items long. The inner select executes in under a second. All strings are nvarchar(249). All IDs are int. Any ideas? I executed it (it's in a stored proc) for over 12 minutes without it finishing.

    Read the article

  • Correct Exceptions in C++

    - by Dr.Ackula
    I am just learning how to handle errors in my C++ code. I wrote this example that looks for a text file called some file, and if its not found will throw an exception. #include <iostream> #include <fstream> using namespace std; int main() { int array[90]; try { ifstream file; file.open("somefile.txt"); if(!file.good()) throw 56; } catch(int e) { cout<<"Error number "<<e<<endl; } return 0; } Now I have two questions. First I would like to know if I am using Exceptions correctly. Second, (assuming the first is true) what is the benefit to using them vs an If else statement?

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >