Daily Archives

Articles indexed Wednesday May 5 2010

Page 14/119 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • Example where Up-Front Design (Would have) Saved You Time

    - by Winston Ewert
    In various places I've seen the claim that by designing a system up-front, you can significantly reduce development time. I.e. by spending an hour designing you can save a week coding. My problem is that I have never seen a situation where I found this to be true. So I want to know of any examples out there that people have where this would be true: So: What sort of problem arose during coding? (or was avoided?) How could you have avoided (or did avoid) the problem by spending more time doing design? Why was it (or would it have been) hard to fix the problem in the code?

    Read the article

  • What exactly is Arel in Rails 3.0?

    - by Will
    I understand that it is a replacement for ActiveRecord and that it uses objects instead of queries. But... why is this better? will objects/queries be "easier" to create? will it lead to more efficient SQL queries? will it be compatible with all major DB's? - I assume it will. will it be easier/harder to use with stored procedures?

    Read the article

  • Dissecting ASP.NET Routing

    The ASP.NET Routing framework allows developers to decouple the URL of a resource from the physical file on the web server. Specifically, the developer defines routing rules, which map URL patterns to a class or ASP.NET page that generates the content. For instance, you could create a URL pattern of the form Categories/CategoryName and map it to the ASP.NET page ShowCategoryDetails.aspx; the ShowCategoryDetails.aspx page would display details about the category CategoryName. With such a mapping, users could view category about the Beverages category by visiting www.yoursite.com/Categories/Beverages. In short, ASP.NET Routing allows for readable, SEO-friendly URLs. ASP.NET Routing was first introduced in ASP.NET 3.5 SP1 and was enhanced further in ASP.NET 4.0. ASP.NET Routing is a key component of ASP.NET MVC, but can also be used with Web Forms. Two previous articles here on 4Guys showed how to get started using ASP.NET Routing: Using ASP.NET Routing Without ASP.NET MVC and URL Routing in ASP.NET 4.0. This article aims to explore ASP.NET Routing in greater depth. We'll explore how ASP.NET Routing works underneath the covers to decode a URL pattern and hand it off the the appropriate class or ASP.NET page. Read on to learn more! Read More >

    Read the article

  • Network Scanning: HP Laserjet 2840 & Windows 7 (+ Linux?)

    - by Eddie Parker
    I own a HP Laserjet 2840 multifunction printer. It's a fabulous device, but on Windows 7 it can't network scan. HP doesn't seem to support it in anything greater than Vista, and they aren't forth coming with solutions. I'm curious if anyone else has gotten work arounds to this problem. One possible avenue for me is that I have an always-on Gentoo server that is configured to see the printer as a fax and printer using hplip. I have this shared via samba and I can print just fine through samba. Is there a similar way I can do network scanning? Anyone know of where I start looking for this?

    Read the article

  • compare previous ENCRYPT() call with new ENCRYPT() call mysql

    - by contagious
    I'm storing a string in mysql with the ENCRYPT() function. I want to fetch a row where that string is matched, but the new ENCRYPT() call gives me a different value, so they never match. This is expected as i'm not (and can't) give it a consistent salt: http://dev.mysql.com/doc/refman/5.0/en/encryption-functions.html#function_encrypt If no salt argument is given, a random value is used. This is the query i'm running that returns empty: SELECT * FROM `table` WHERE ENCRYPT('string') = `enc_string` I know this is possible because this is used by a 3rd party app, but I can't find their query where they do this. Is there a way to force ENCRYPT to use the previous salt, or predict it?

    Read the article

  • c++ vector.push_back error: request for member 'push_back'..., which is of non-class type 'vector(ch

    - by Ziplin
    I'm using Cygwin with GCC, and ultimately I want to read in a file of characters into a vector of characters, and using this code #include <fstream> #include <vector> #include <stdlib.h> using namespace std; int main (int argc, char *argv[] ) { vector<char> string1(); string1.push_back('a'); return 0; } generates this compile time error: main.cpp: In function int main(int, char**)': main.cpp:46: error: request for memberpush_back' in string1', which is of non -class typestd::vector ()()' I tried this with a vector of ints and strings as well and they had the same problem.

    Read the article

  • UINavigationController back button half works in iPad landscape orientation

    - by drawnonward
    In an iPad application with a UINavigationController, everything works in portrait mode but in landscape mode the back button sometimes only goes back half a level. That is to say, on the first press the title bar animates as if it was popping a controller, and on the second press it animates the content popping. Has anyone found a solution to this? The contradictory solution in this question did not help. I have a shouldAutorotate method in the navigation controller but no others. -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)inOrientation { return YES; }

    Read the article

  • Wicket app in embedded Jetty causes UnsupportedClassVersionError

    - by Ondra Žižka
    I've tried to run a Wicket app in an embedded Jetty, using this code: public static void main( String[] args ){ Server server = new Server(8080); Context root = new Context( server, "/", Context.SESSIONS ); FilterHolder filterHolder = new FilterHolder( new WicketFilter() ); filterHolder.getInitParameters().put("applicationClassName", cz.dw.test.WicketApplication.class.getName() ); root.addFilter( filterHolder, "/*" , Handler.ALL ); try { server.start(); } catch (Exception ex) { ex.printStackTrace(); } } But I got java.lang.UnsupportedClassVersionError: Bad version number in .class file. Switching the target class version for my app (1.6 - 1.5) did not help. I use Sun JDK 1.6.0_17, Wicket 1.4.8, Jetty 6.1.24. I tried to debug, but the JRE classes have no debug data. The stacktrace is of no use as it happens when loading the classes into JVM. Any ideas what could be wrong? How can I find which class is causing this? Thanks, Ondra

    Read the article

  • How to set/check cookies in iPhone app?

    - by Channing
    Hi, I am trying to set a cookie and also check if it is there, does anybody have any sample code for this? All I found was this, but it would be helpful if I could see an implementation example. http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSHTTPCookieStorage_Class/Reference/Reference.html

    Read the article

  • Missing Language File or Wrong Language File Version

    - by isuru
    Hi, I used a win 32 console application application to test a crash reporting mechanism. But when I run the Release exe, I got this error : Missing Language File or Wrong Language File Version. Can someone please explain what is the matter here and how to overcome it??? I use Visual Studio 2008 pro.

    Read the article

  • Using mercurial and beyond compare 3(bc3) as the diff tool? help needed

    - by mhd
    Hi, in windows I am able to use winmerge as the external diff tool for hg using mercurial.ini,etc. Using some options switch that you can find in web(I think it's a japanese website) Anyway, here for example: hg winmerge -r1 -r2 will list file(s) change(s) between rev1 and rev2 in winmerge. I can just click which file to diff but for bc3: hg bcomp -r1 -r2 will make bc3 open a dialog which stated that a temp dir can't be found. The most I can do using bc3 and hg is hg bcomp -r1 -r2 myfile.cpp which will open diff between rev1 and rev2 of myfile.cpp So,it seems that hg+bc3 can't successfully acknowledge of all files change between revision. Only able to diff 1 file at a time. Anyone can use bc3 + hg better ? edit: Problem Solved ! Got the solution from scooter support page. I have to use bcompare instead of bcomp Here's a snippet of my mercurial.ini [extensions] hgext.win32text = ;mhd adds hgext.extdiff = ;mhd adds for bc [extdiff] cmd.bc3 = bcompare opts.bc3 = /ro ;mhd adds for winmerge ;[extdiff] ;cmd.winmerge = WinMergeU ;opts.winmerge = /r /e /x /ub

    Read the article

  • Jquery how to test if current hovered div is eq(x)

    - by j-man86
    Hi all! I am trying to create a jQuery hover function that will highlight a different section of the page depending on what number EQ (index position number) the div is. $('#photoContent div').hoverIntent(function () { if( $(this).filter(':lt(5)') ) { $('#photoSidebar').find('p:eq(0)').addClass('currentPhoto'); } if( $(this).filter(':gt(5)') ) { $('#photoSidebar').find('p:eq(1)').addClass('currentPhoto'); } }, function () { $('#photoSidebar').find('p').removeClass('currentPhoto'); }); The above code obviously does not work, but the concept/functionality is what I'm going for. Thanks for your help!

    Read the article

  • How does Python store lists internally?

    - by Mike Cooper
    How are lists in python stored internally? Is it an array? A linked list? Something else? Or does the interpreter guess at the right structure for each instance based on length, etc. If the question is implementation dependent, what about the classic CPython?

    Read the article

  • How do you pass objects between View Controllers in Objective-C?

    - by editor
    I've been trudging through some code for two days trying to figure out why I couldn't fetch a global NSMutableArray variable I declared in the .h and implemented in .m and set in a the viewDidLoad function. It finally dawned on me: there's no such thing as a global variable in Objective-C, at least not in the PHP sense I've come to know. I didn't ever really read the XCode error warnings, but there it was, even if not quite plain English: "Instance variable 'blah' accessed in class method." My question: What am I supposed to do now? I've got two View Controllers that need to access a central NSMutableDictionary I generate from a JSON file via URL. It's basically an extended menu for all my Table View drill downs, and I'd like to have couple other "global" (non-static) variables. Do I have to grab the JSON each time I want to generate this NSMutableDictionary or is there some way to set it once and access it from various classes via #import? Do I have to write data to a file, or is there another way people usually do this?

    Read the article

  • In Python, are there builtin functions for elementwise boolean operators over boolean lists?

    - by bshanks
    For example, if you have n lists of bools of the same length, then elementwise boolean AND should return another list of that length that has True in those positions where all the input lists have True, and False everywhere else. It's pretty easy to write, i just would prefer to use a builtin if one exists (for the sake of standardization/readability). Here's an implementation of elementwise AND: def eAnd(*args): return [all(tuple) for tuple in zip(*args)] example usage: >>> eAnd([True, False, True, False, True], [True, True, False, False, True], [True, True, False, False, True]) [True, False, False, False, True] thx

    Read the article

  • Calculating driving distance in iPhone

    - by Prasanna
    Hi, I need to find the driving distance between 2 locations. I do not need to display the directions in a map, just need to calculate the distance, which I need to use in my application. Does MapKit allow this? Is there an alternative that can be used? I am able to get forward geo-coding using CloudMade, but there doesn't seem to be an option to obtain driving distance. Appreciate any help.

    Read the article

  • CodeIgniter - How to hide index.php from the URL

    - by kapil.israni
    This is what my .htaccess looks like. The .htaccess is sitting in /www/scripts directory which is the parent of codeigniter's "system" directory and which also contains index.php. I have enabled mod_rewrite in my Apache 2.2.x. This is on Ubuntu 9.10 server. I followed this link, but it does not work. Is there anything i need to do in apache2, any specific configuration so that this works?? RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [QSA,L]

    Read the article

  • postfix: maildir access problem; did I lose mail?

    - by threecheeseopera
    I found a few hundred of the following errors in my syslog following some configuration changes: warning: maildir access problem for UID/GID=5000/5000: create maildir file /home/vmail/domain/account1 /tmp/1273028517.P14666.domain.com: Permission denied I made a temporary fix for now (the ole' standby, chmod 777), but I would like to know if this is a permanent error (lost mail) or if these are retried/requeued. Thanks!

    Read the article

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