Search Results

Search found 1666 results on 67 pages for 'practical joke'.

Page 42/67 | < Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >

  • What are the use cases for closures/callback functions in Javascript?

    - by Christopher Altman
    I was listening to Crockford's talk on Javascript closures and am convinced of the benefit of information hiding, but I do not have a firm understanding of when to use callback functions. It is mostly a true statement that a person could accomplish the same functionality with or without callbacks. As someone who is writing code, what heuristics or cues should I keep in mind when determining when to use callbacks/closures? I am not looking for the blanket statement 'Closures make more secure code', rather a list of practical examples or rules of thumb for when callbacks are the right idea. Crockford's Presentation: http://www.yuiblog.com/blog/2010/04/08/video-crockonjs-5/

    Read the article

  • Suggestions for Single-Page Web Application Design?

    - by DaveDev
    My view is that unless you need to change the basic structure of the user interface, you should not have to reload the page at all for any user interactions. I'd like to approach my next ASP.NET MVC project with this in mind. Can anyone suggest any principles, patterns or practices* I should consider? Excellent book, btw. Still trying to wrap my head around some of the concepts though. I thought a question like this would help link the theory to a practical design. Thanks

    Read the article

  • Comparing Clojure books

    - by Michiel Borkent
    Currently there is (afaik) one completed Clojure book available: Programming Clojure by Stuart Halloway. Two are being written and partially available at Manning: The Joy of Clojure by Fogus and Houser Clojure in Action by Amit Rathore Another one is about to be published in May: Practical Clojure (The Definitive Guide) by Luke Van der Hart Are these books more or less the same and meant as a general introduction to Clojure? Does it make sense to buy them all, or is there a risk of having three very similar books? Will there be books that go into more specialized areas of Clojure and targetted for 'intermediate' or 'advanced' Clojure programmers?

    Read the article

  • Display/Edit fields across tables in a Django Form

    - by jamida
    I have 2 tables/models, which for all practical purposes are the same as the standard Author/Book example, but with the additional restriction that in my application each Author can only write 0 or 1 books. (eg, the ForeignKey field in the Book model is or can be a OneToOneField, and there may be authors who have no corresponding book in the Book table.) I would like to be able to display a form showing multiple books and also show some fields from the corresponding Author table (eg author_name, author_address). I followed the example of the inlineformset and but that doesn't even display the author name in the generated form.

    Read the article

  • Unicode characters in URLs

    - by Pekka
    In 2010, would you serve URLs containing UTF-8 characters in a large web portal? Unicode characters are forbidden as per the RFC on URLs (see here). They would have to be percent encoded to be standards compliant. My main point, though, is serving the unencoded characters for the sole purpose of having nice-looking URLs, so percent encoding is out. All major browsers seem to be parsing those URLs okay no matter what the RFC says. My general impression, though, is that it gets very shaky when leaving the domain of web browsers: URLs getting copy+pasted into text files, E-Mails, even Web sites with a different encoding HTTP Client libraries Exotic browsers, RSS readers Is my impression correct that trouble is to be expected here, and thus it's not a practical solution (yet) if you're serving a non-technical audience and it's important that all your links work properly even if quoted and passed on? Is there some magic way of serving nice-looking URLs in HTML http://www.example.com/düsseldorf?neighbourhood=Lörick that can be copy+pasted with the special characters intact, but work correctly when re-used in older clients?

    Read the article

  • Use of IsAssignableFrom and "is" keyword in C#

    - by fearofawhackplanet
    While trying to learn Unity, I keep seeing the following code for overriding GetControllerInstance in MVC: if(!typeof(IController).IsAssignableFrom(controllerType)) { ... } this seems to me a pretty convoluted way of basically writing if(controllerType is IController) { ... } I appreciate there are subtle differences between is and IsAssignableFrom, ie IsAssignableFrom doesn't include cast conversions, but I'm struggling to understand the implication of this difference in practical scenarios. When is it imporantant to choose IsAssignableFrom over is? What difference would it make in the GetControllerExample? if (!typeof(IController).IsAssignableFrom(controllerType)) throw new ArgumentException(...); return _container.Resolve(controllerType) as IController;

    Read the article

  • Self Assessment Tests for Programmers

    - by THX1138.6
    I want to help the Dev team identify areas of knowledge (practical and theoretical) that they can work on. Though I am big believer in focusing on people's strengths being a good programmer requires (I think) being challenged by concepts and ideas that don't always come naturally. We work largely in the web app space using PHP & MySQL but better skills in data modelling, query optimisation, use of MVC and OOP etc. would help the team and the company a lot. I want to help the Dev team manage their careers, explore and expand their skills sets. Be all they can be and better than they were previously. I know its an idealistic goal but work must be about more than simply getting the work done. There should be some time to review, to learn, to grow and get better. Any thoughts, ideas, opinions and directions to tests or similar resources would be greatly appreciated.

    Read the article

  • Which hosting will let me execute my own EXE with PHP?

    - by guitar-
    I have a task that PHP (or any server-side scripting language) isn't practical for. It involves a lot of file I/O, processing, etc. and it will execute a lot faster using the program I made in C instead of PHP. Do any hosts allow you to upload your own EXE files and run them on the server using PHP's exec, shell_exec, etc. functions? Do you need a dedicated server to do this? Also, I don't know if Facebook's PHP HipHop is out yet, but I really don't want to use that.

    Read the article

  • Print webpages problems :: looking for good tutorial to print web pages (build by Jquey ui, jqgrid ,

    - by Yosef
    Hi, I should print web-pages of website with jqgrid , Jquery calendar+ other Jquery ui+background images etc.. in server side its build with Zend Framework. I don't have experience and knowledge in web page printing,but i get this mission in my job. I need: 1. Good tutorials or book (i read about background images problem) to study this issue well (I have time for that). More practical instructions how print web pages that build with Jquery + Jquery UI + jqgrid (I know that Jquery UI have browsers compatibity issues vs yui (yahoo library)). Thanks for all great people here that helps, Yosef

    Read the article

  • Adding JPanel onto another JPanel after button click

    - by user1400650
    I'm using Netbeans IDE to make a gui application. I have a JFrame with a JPanel inside it. After a button click I want to display a different JPanel inside the first. The other JPanel is in a different file. How would I go about doing this? If this is not practical I don't mind replacing the first JPanel with the second one. I've tried the following but it doesn't seem to work. I'm new to Java and Gui programming so I would appreciate any help I can get. private void jButtonActionPerformed(java.awt.event.ActionEvent evt) { JPanel2 jPanel2 = new JPanel2(); JPanel1.add(jPanel2); }

    Read the article

  • MVC pattern and State Machine

    - by topright
    I think of a game as a state machine. Game States separate I/O processing, game logic and rendering into different classes: while (game_loop) { game->state->io_events(this); game->state->logic(this); game->state->rendering(); } You can easily change a game state in this approach. MVC separation works in more complex way: while (game_loop) { game->cotroller->io_events(this); game->model->logic(this); game->view->rendering(); } So changing Game States becomes error prone task (switch 3 MVC objects, not 1). What are practical ways of combining these 2 concepts?

    Read the article

  • What Does OSGi Solve?

    - by Pablo Fernandez
    I've read on wikipedia and other sites about OSGi, but I don't really see the big picture. It says that it's a component based platform, and that you can reload modules at runtime. Also the "practical example" given everywhere is the Eclipse Plugin Framework. My questions are: 1) What is the CLEAR and SIMPLE definition of OSGi? 2) What COMMON PROBLEMS does it solve? By "common problems" I mean problems we face everyday, like "what can OSGi do for making our jobs more efficient/fun/simple" Thanks.

    Read the article

  • How would I / could I obtain an reasonably comprehensive list of domain names?

    - by Simon
    I know that domain names are constantly changing, and I know there are a lot of them, but there is clearly a region of the domain name space which is stable. How would I go about getting a list, even a very big one? Such a thing must logically exist, even if it is in a distributed form, because the web's DNS servers resolve names to IP addresses. So in theory if I could poll all the DNS servers in the world at a moment in time I would have the complete list of mapped names. Is there a practical way of doing that? As an aside, does anyone have any good estimates of how many domain names exist at the moment?

    Read the article

  • Highlighting effect to text and/or image similar to be synchronized with audio

    - by Irfan Mulic
    I am looking how to approach following problem: We have application that displays text with audio recorded material. We use Browser Control (Internet Explorer) in Delphi App to do this. We respond to events in Delphi code setting innerHTML for elements if we have to update the style ... Now, request is to add option to dynamically move the cursor or dynamically highlight the words spoken from the paragraph. It doesn't need to match absolutely the exact word spoken so we will have to dynamically update the content of position of highlighted word based on some timer or something (because it is not text to speach). What should be the most practical and easy approach to this kind of problem, all answers are greatly appreciated. Thanks.

    Read the article

  • Follow up viewDidUnload vs. dealloc question...

    - by entaroadun
    Clarification question as a follow up to: http://stackoverflow.com/questions/2261972/what-exactly-must-i-do-in-viewdidunload http://stackoverflow.com/questions/1158788/when-should-i-release-objects-in-voidviewdidunload-rather-than-in-dealloc So let's say there's a low memory error, and the view is hidden, and viewDidUnload is called. We do the release and nil dance. Later the entire view stack is not needed, so dealloc is called. Since I already have the release and nil stuff in viewDidUnload, I don't have it in dealloc. Perfect. But if there's no low memory error, viewDidUnload is never called. dealloc is called and since I don't have the release and nil stuff, there's a memory leak. In other words, will dealloc ever be called without viewDidUnload being called first? And the practical follow up to that is, if I alloc and set something in viewDidLoad, and I release it and set to nil in viewDidUnload, do I leave it out of dealloc, or do I do a defensive nil check in dealloc and release/nil it if it's not nil?

    Read the article

  • Master's in Software Engineering vs. Master's in Computer Science: which degree is preferred by empl

    - by dbarker
    I've been building software professionally for 7 years and am considering a master's degree. I understand the difference between these two degrees as simply: MSCS is the theory while MSE is the practice. I'm equally interested in both and would be happy with either, although I'm curious how these degrees rank in the eyes of a potential employer. I could see two views that a hiring manager could possibly take: a MSCS is loftier and has an implied knowledge of Software Engineering an MSE is more practical and has an implied knowledge of Computer Science In my own experience I've seen both MSCS degree holders than cannot program at all while others are among the best programmers I've met, so of course actual ability will depend on the individual. My question is about the "on paper" value of these two degrees when seeking a job. All things considered, is one degree more hirable, higher-paying than the other?

    Read the article

  • Is It Possible To Use Javascript/CSS To Swap Style Sheets When A Mobile Device Rotates?

    - by Sean M
    I am working on a site that must be designed with mobile accessibility in mind. As part of our brainstorming, we wondered whether it's possible to detect, for a mobile browser (i.e. Mobile Safari or the Android browser), when the viewing device has changed orientation, and to use that as a trigger to change page content? As the title of this question implies, our best-case scenario is the ability to detect the orientation change and use it to alter the CSS on the fly so as to present a slightly different page for landscape versus portrait. Of course we can just design for a page that looks good one way and make it obvious that it's supposed to be viewed that way, but the cool-stuff factor of a page that looks good either way is pretty appealing. Is this idea implementable? Practical?

    Read the article

  • Discrete and Continuous Classifier on Sparse Data

    - by Chris S
    I'm trying to classify an example, which contains discrete and continuous features. Also, the example represents sparse data, so even though the system may have been trained on 100 features, the example may only have 12. What would be the best classifier algorithm to use to accomplish this? I've been looking at Bayes, Maxent, Decision Tree, and KNN, but I'm not sure any fit the bill exactly. The biggest sticking point I've found is that most implementations don't support sparse data sets and both discrete and continuous features. Can anyone recommend an algorithm and implementation (preferably in Python) that fits these criteria? Libraries I've looked at so far include: Orange (Mostly academic. Implementations not terribly efficient or practical.) NLTK (Also academic, although has a good Maxent implementation, but doesn't handle continuous features.) Weka (Still researching this. Seems to support a broad range of algorithms, but has poor documentation, so it's unclear what each implementation supports.)

    Read the article

  • hierarchical clustering with gene expression matrix in python

    - by user248237
    how can I do a hierarchical clustering (in this case for gene expression data) in Python in a way that shows the matrix of gene expression values along with the dendrogram? What I mean is like the example here: http://www.mathworks.cn/access/helpdesk/help/toolbox/bioinfo/ug/a1060813239b1.html shown after bullet point 6 (Figure 1), where the dendrogram is plotted to the left of the gene expression matrix, where the rows have been reordered to reflect the clustering. How can I do this in Python using numpy/scipy or other tools? Also, is it computationally practical to do this with a matrix of about 11,000 genes, using euclidean distance as a metric? thanks.

    Read the article

  • What's the best way to do cross browser testing?

    - by Doug
    What's the best way for me to check if my website is compatible in IE7,8, Safari, FF, and Chrome without having to install each and everyone? I mainly want to check the CSS, HTML, and JavaScript. Update I put a bounty in hopes there is a more practical solution for someone like myself. I am using Windows 7 Home Premium x64. Update2 I don't mind installing these browsers now, but I can't even if I wanted to. Windows 7 doesn't allow me to install IE7.

    Read the article

  • Visual Studio's CSS Intellisense - Absolute paths & MasterPage files

    - by Overflew
    Hi there. I've noticed that to get CSS-Intellisense working in VS, the paths have to be relative - Is this the case? However, it seems <link href="/resources/test.css" [...] /> is far more practical than <link href="resources/test.css" [...] /> I'm including the CSS in the master page, and don't see much good in including it as a content block, just to get the relative paths correct for each directory depth. I've had a quick try with inline code resolving the path, but no dice there either (for Intellisense). I feel I'm missing something fairly simple - What's the correct approach here to have CSS Intellisense work across the pages in the app during dev, and render fine in any deployed state? Cheers. (Note - I'm aware that a <% if (false) { % type hack is required for user controls)

    Read the article

  • How do I specify the block object / predicate required by NSDictionary's keysOfEntriesPassingTest ?

    - by Todd
    For learning (not practical -- yet) purposes, I'd like to use the following method on an NSDictionary to give me back a set of keys that have values using a test I've defined. Unfortunately have no idea how to specify the predicate. NSDictionary keysOfEntriesPassingTest: - (NSSet *)keysOfEntriesPassingTest:(BOOL (^)(id key, id obj, BOOL *stop))predicate Let's say for example all my values are NSURLs, and I'd like to get back all the URLs that are on port 8080. Here's my stab at coding that -- though it doesn't really make sense to me that it'd be correct: NSSet * mySet = [myDict keysOfEntriesPassingTest:^(id key, id obj, BOOL *stop) { if( [[obj port] isEqual: [NSNumber numberWithInt: 8080]]) { return key; }] And that's because I get back the following compiler error: incompatible block pointer types initializing 'void (^)(struct objc_object *, struct objc_object *, BOOL *)', expected 'BOOL (^)(struct objc_object *, struct objc_object *, BOOL *)' What am I missing? I'd appreciate a pointer at some docs that go into more detail about the "Block object" that the predicate is supposed to be. Thanks!

    Read the article

  • How to Serialize a WPF Drawing?

    - by Néstor Sánchez A.
    Hi, maybe I'm missing something. I believed that WPF vector-based Drawings (like DrawingGroup, DrawingGeometry, etc.) were ready to be serialized. But they are not. So, should I navigate all these drawing childrens, and store they points, lines, brushes (that also are not serializable) and so on, and then made my custom serialization? Is really that difficult or I'm missing something pretty obvious? I mean, even serializing Bitmap images is easy. I thinked serializing vector-based drawings were easier (no quality loss, just descriptive info, no massive data). Thanks for your practical answers, alternate-way suggestions and comments!

    Read the article

  • Init modules in apache2

    - by user306963
    Hello, I used to write apache modules in apache 1.3, but these days I am willing to pass to apache2. The module that I am writing at the moment has is own binary data, not a database, for performance purposes. I need to load this data in shared memory, so every child can access it without making his own copy, and it would be practical to load/create the binary data at startup, as I was used to do with apache 1.3. Problem is that I don't find an init event in apache2, in 1.3 in the module struct, immediatly after STANDARD_MODULE_STUFF you find a place for a /** module initializer */, in which you can put a function that will be executed early. Body of the function I used to write is something like: if ( getppid == 1 ) { // Load global data here // this is the parent process void* data = loadGlobalData( someFilePath ); setGlobalData( config, data ); } else { // this is the init of a child process // do nothing } I am looking for a place in apache2 in where I can put a similar function. Can you help? Thanks Benvenuto

    Read the article

  • IP address detection for geo-location or MAC address much secure?

    - by SuperRomia
    Recent study many websites are using geo-location technology on their Websites. I'm planning to implement one website which can be detect the web visitor more accurate. An found that Mozilla is using some kind of detect MAC address technology in their Geo-Location web service. Is it violate some privacy issue? I believe most of Geo-location service providers only offer country to city level. But the Mac address detection enable to locate the web visitors' location more correctly than using IP address detection. If detect the MAC address is not practical, which geo-location service provider is offering more accurate data to detect my Website visitor around the world?

    Read the article

< Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >