Search Results

Search found 12911 results on 517 pages for 'non modal'.

Page 7/517 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • How can you explain "beautiful code" to a non-programmer?

    - by Daniel Vandersluis
    When speaking with a non-programmer friend, I happened to mention the concept of "beautiful code" and she wanted to understand what that meant, but I was at a bit of a loss as to how to explain it to someone who would have no context whatsoever. When all code looks like gibberish to someone anyways, how can you explain what makes one piece of code prettier than another? Analogies could be useful too.

    Read the article

  • Sortie de Avgrund Modal : le plugin jQuery d'un nouvel effet pour popups et boîtes modales

    Sortie de Avgrund Modal le plugin jQuery pour vos boîtes modales et popups. Ce plugin, créé par Dmitri Voronianski, ajoute une impression de profondeur à la page lorsque vous affichez une boîte modale. Le contenu principal fait un zoom arrière (il rétrécit) et se grise. Il fonctionne dans tous les navigateurs récents. [IMG]http://dailyjs.com/images/posts/avgrund.png[/IMG] Simple d'utilisation, vous n'avez qu'à appeler ce code : Code javascript :

    Read the article

  • What is the rationale to non allow overloading of C++ conversions operator with non-member functio

    - by Vicente Botet Escriba
    C++0x has added explicit conversion operators, but they must always be defined as members of the Source class. The same applies to the assignment operator, it must be defined on the Target class. When the Source and Target classes of the needed conversion are independent of each other, neither the Source can define a conversion operator, neither the Target can define a constructor from a Source. Usually we get it by defining a specific function such as Target ConvertToTarget(Source& v); If C++0x allowed to overload conversion operator by non member functions we could for example define the conversion implicitly or explicitly between unrelated types. template < typename To, typename From operator To(const From& val); For example we could specialize the conversion from chrono::time_point to posix_time::ptime as follows template < class Clock, class Duration operator boost::posix_time::ptime( const boost::chrono::time_point& from) { using namespace boost; typedef chrono::time_point time_point_t; typedef chrono::nanoseconds duration_t; typedef duration_t::rep rep_t; rep_t d = chrono::duration_cast( from.time_since_epoch()).count(); rep_t sec = d/1000000000; rep_t nsec = d%1000000000; return posix_time::from_time_t(0)+ posix_time::seconds(static_cast(sec))+ posix_time::nanoseconds(nsec); } And use the conversion as any other conversion. So the question is: What is the rationale to non allow overloading of C++ conversions operator with non-member functions?

    Read the article

  • Modal View Does Not Appear in Center in Horizontal Orientation

    - by Sheehan Alam
    I have a UIPresentationFormSheet (contains a textview) that appears in the center of the screen when I am in vertical orientation. When I dismiss the modal view, it disappears fine. When I am in horizontal orientation my modal view does not appear in the center of the screen. I have to dismiss my keyboard for the modal view to appear in the center. [self presentModalViewController:composeTweetController animated:TRUE]; When I dismiss the modal view in horizontal orientation the app automatically switches to vertical orientation. -(void)dismissComposeTweetView{ [self dismissModalViewControllerAnimated:TRUE]; } I want the following to happen: Modal view should appear in the center in horizontal orientation Modal view should disappear without switching to vertical orientation

    Read the article

  • Understanding Node.js and concept of non-blocking I/O

    - by Saif Bechan
    Recently I became interested in using Node.js to tackle some of the parts of my web-application. I love the part that its full JavaScript and its very light weight so no use anymore to call an JavaScript-PHP call but a lighter JavaScript-JavaScript call. I however do not understand all the concepts explained. Basic concepts Now in the presentation for Node.js Ryan Dahl talks about non-blocking IO and why this is the way we need to create our programs. I can understand the theoretical concept. You just don't wait for a response, you go ahead and do other things. You make a callback for the response, and when the response arrives millions of clock-cycles later, you can fire that. If you have not already I recommend to watch this presentation. It is very easy to follow and pretty detailed. There are some nice concepts explained on how to write your code in a good manner. There are also some examples given and I am going to work with the basic example given. Examples The way we do thing now: puts("Enter your name: "); var name = gets(); puts("Name: " + name); Now the problem with this is that the code is halted at line 1. It blocks your code. The way we need to do things according to node puts("Enter your name: "); gets(function (name) { puts("Name: " + name); }); Now with this your program does not halt, because the input is a function within the output. So the programs continues to work without halting. Questions Now the basic question I have is how does this work in real-life situations. I am talking here for the use in web-applications. The application I am writing does I/O, bit is still does it in am blocking matter. I think that most of the time, if not all, you need to block, because you have to wait on what the response is you have to work with. When you need to get some information from the database, most of the time this data needs to be verified before you can further with the code. Example 1 If you take a login for example. You have to wait for the database to response to return, because you can not do anything else. I can't see a way around this without blocking. Example 2 Going back to the basic example. The use just request something from a database which does not need any verification. You still have to block because you don't have anything to do more. I can not come up with a single example where you want to do other things while you wait for the response to return. Possible answers I have read that this frees up recourses. When you program like this it takes less CPU or memory usage. So this non-blocking IO is ONLY meant to free up recourses and does not have any other practical use. Not that this is not a huge plus, freeing up recourses is always good. Yet I fail to see this as a good solution. because in both of the above examples, the program has to wait for the response of the user. Whether this is inside a function, or just inline, in my opinion there is a program that wait for input. Resources I looked at I have looked at some recourses before I posted this question. They talk a lot about the theoretical concept, which is quite clear. Yet i fail to see some real-life examples where this is makes a huge difference. Stackoverflow: What is in simple words blocking IO and non-blocking IO? Blocking IO vs non-blocking IO; looking for good articles tidy code for asynchronous IO Other recources: Wikipedia: Asynchronous I/O Introduction to non-blocking I/O The C10K problem

    Read the article

  • Push Notification in non english languages

    - by jmall
    Hello, I have implemented successfully this code: http://stackoverflow.com/questions/1020762/does-anyone-know-how-to-write-an-apple-push-notification-provider-in-c It works great. But I have a question, can anybody help me how to send non english messages like Hebrew Or Arabic? If the string contains any non english characters, it is not sent. Thank you

    Read the article

  • Can non-IT people learn and take advantage of regular expressions? [closed]

    - by user1598390
    Often times, not-IT people has to deal with massive text data, clean it, filter it, modify it. Often times normal office tools like Excel lack the tools to make complex search and replace operations on text. Could this people benefit from regexps ? Can regexp be taught to them ? Are regular expressions the exclusive domain of programmers and unix/linux technicians ? Can they be learned by non-IT people, given regexps are not a programming language? Is this a valid or achievable goal to make some users regexp-literate through appopriate training ? Have you have any experiences on this issue? and if so, have it been successful ?

    Read the article

  • How does one search/poll all modal info in a frame automatically?

    - by user310631
    As you'll no-doubt be able to tell momentarily, I have little knowledge of the programming world. That being said, here goes.... In this scenario, there's a Java-based game that has a map of the game world oriented in an X, Y coordinate tile system. Some of the grid tiles are player cities, some are non-player locations. The game runs inside a frame in the browser, the X, Y coordinate map feature is one optional view, and the entire map is not available to view at any one time. Each grid tile has an "Onclick" event and an "Onmouseover" event. The mouseover event is a tooltip, the click event is something called a "modal" that has information specific to that tile. What I'd like to find out is: How can I poll all the grid tiles' "modal" information using some kind of script or other auto-running polling feature?

    Read the article

  • Google ranking - Modal views - google analytics events [duplicate]

    - by minchiya
    This question already has an answer here: How to diagnose a search engine ranking drop? 5 answers I modified a site recently : - I added many google analytics events, to better understand user behaviour. - I added also two buttons on almost all the pages of the site. Those buttons show modal-views (I am using bootstrap) with questions about user opinion. This modals views are on almost all pages of the site. After this modification the ranking of the site decreased on google search from the second place to the seconde page :( Is it the events-collected or the model-views added ? If the model-views are the reason, then how to better do similar surveys ? Did you have please similar experience, or explanation to this ? Perhaps it is the effect of panda4 update. In this cas, what can I look for to improve the site. How to debug the problem/reasons ?

    Read the article

  • Modal popup showing on the wrong monitor

    - by Chase Seibert
    On Ubuntu 11.10, I'm seeing modals from many applications show up on a different monitor from their parent application. In this example, Firefox, the application on the right most monitor, has popped up a modal dialog in the center monitor. You'll notice that it is not just on the wrong monitor, it's also positioned horizntally against the left edge of that monitor. Vertically, it's centered. This happens for at least Firefox, Eclipse and gedit modals. It seems like it's all applications. It doesn't matter which monitor the parent application is on, the modals are always on the left edge of the center monitor.

    Read the article

  • Close modal window

    - by Eyal
    I have page with products. When adding a product to the shopping cart a modal window is fired up for confirmation - this can take up to 2 seconds. I want to show another modal window just before the confirmation modal to show "loading..." my problem is that I don't know how to close the "loading..." modal. This the code which fired up the confirmation modal: $(document).ready(function () { var $dialog = $('<div style="background-color:red"></div>') .html('<h1>loading...</h1>') .dialog({ autoOpen: false, title: 'loading...' }); $('.AddToCartButton').click(function () { $dialog.dialog('open'); }); }); On the 'confirmation' modal I am trying to close the the 'loading..." modal with this code: <script type="text/javascript"> $('#AddToCartButton').dialog('close'); </script> Please help. Thanks.

    Read the article

  • iPhone: Create a single UIView from multiple clicks

    - by Cuzog
    I'm making a partial overlay modal in my app with the code from “Semi-Modal (Transparent) Dialogs on the iPhone” at ramin.firoozye.com. In doing so, the button that calls the modal is still visible and clickable. I will hide this button when the modal spawns, but I want to be sure if the user clicks very quickly twice, a new modal doesn't come up for each click. What is the best way to check that the modal doesn't already exist when calling it from the button click? You can download the test project here. For those that don't have xcode, the relevant functions are below: I call forth the modal on button click with this: - (IBAction)displayModal:(id)sender { ModalViewController *modalController = [[ModalViewController alloc] initWithNibName:@"ModalViewController" bundle:nil]; modalController.view.frame = CGRectOffset(modalController.view.frame, 0, 230); [self showModal:modalController.view]; } Then use this function to animate the custom modal over the current view: - (void)showModal:(UIView*) modalView { UIWindow* mainWindow = (((TestAppDelegate*) [UIApplication sharedApplication].delegate).window); CGPoint middleCenter = modalView.center; CGSize offSize = [UIScreen mainScreen].bounds.size; CGPoint offScreenCenter = CGPointMake(offSize.width / 2.0, offSize.height * 1.5); modalView.center = offScreenCenter; // we start off-screen [mainWindow addSubview:modalView]; // Show it with a transition effect [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.4]; // animation duration in seconds modalView.center = middleCenter; [UIView commitAnimations]; } Then I dismiss the modal on button click with this: - (IBAction)dismissModal:(id)sender { [self hideModal:self.view]; } And then use these functions to animate the modal offscreen and clean itself up: - (void)hideModal:(UIView*) modalView { CGSize offSize = [UIScreen mainScreen].bounds.size; CGPoint offScreenCenter = CGPointMake(offSize.width / 2.0, offSize.height * 1.5); [UIView beginAnimations:nil context:modalView]; [UIView setAnimationDuration:0.7]; [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(hideModalEnded:finished:context:)]; modalView.center = offScreenCenter; [UIView commitAnimations]; } - (void)hideModalEnded:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context { UIView* modalView = (UIView *)context; [modalView removeFromSuperview]; [self release]; } Any help is greatly appreciated!

    Read the article

  • Which pattern should be used for editing properties with modal view controller on iPhone?

    - by Matthew Daugherty
    I am looking for a good pattern for performing basic property editing via a modal view on the iPhone. Assume I am putting together an application that works like the Contacts application. The "detail" view controller displays all of the contact's properties in a UITableView. When the UITableView goes into edit mode a disclosure icon is displayed in the cells. Clicking a cell causes a modal "editor" view controller to display a view that allows the user to modify the selected property. This view will often contain only a single text box or picker. The user clicks Cancel/Save and the "editor" view is dismissed and the "detail" view is updated. In this scenario, which view is responsible for updating the model? The "editor" view could update the property directly using Key-Value Coding. This appears in the CoreDataBooks example. This makes sense to me on some level because it treats the property as the model for the editor view controller. However, this is not the pattern suggested by the View Controller Programming Guide. It suggests that the "editor" view controller should define a protocol that the "detail" controller adopts. When the user indicates they are done with the edit, the "detail" view controller is called back with the entered value and it dismisses the "editor" view. Using this approach the "detail" controller updates the model. This approach seems problematic if you are using the same "editor" view for multiple properties since there is only a single call-back method. Would love to get some feedback on what approach works best.

    Read the article

  • Non Blocking Keyboard on WinCE accessing the virtual keyboard

    - by Jan H.
    Hello Guys, I am desperately looking for a solution that enables me to read keyboard events in a non blocking way. These Keyboard events are generated by a VIRTUAL KEYBOARD that comes with the WinCE device. I have a console application running in C++, where the user is asked to navigate via 'ESC', 'U' and other characters through the menu. I first tried to use fread and stdin and realised that it is blocking call and waits for a carriage return. Then I tried to hook up to the windows message WM_KEYUP, but I never recieve this windows message. Furthermore I tried to use QtGUI together with the event QKeyEvent, but I never recieve any event. I wonder if it is in general possible to recieve non-blocking keyboard events on a WinCE device. I would be glad if you have any suggestions! Cheers, Jan

    Read the article

  • Convert non-breaking spaces to spaces in Ruby

    - by CoolAJ86
    I have cases where user-entered data from an html textarea or input is sometimes sent with \u00a0 (non-breaking spaces) instead of spaces when encoded as utf-8 json. I believe that to be a bug in Firefox, as I know that the user isn't intentionally putting in non-breaking spaces instead of spaces. There are also two bugs in Ruby, one of which can be used to combat the other. For whatever reason \s doesn't match \u00a0 However [^[:print:]] (which definitely should not match) and \xC2\xA0 both will match, but I consider those to be less-than-ideal ways to deal with the issue. Are there other recommendations for getting around this issue?

    Read the article

  • How to handle iPad Modal View rotation

    - by Farha Ansari
    Hi, I have 2 views, each for portrait and landscape. I start by displaying the portrait view. On both the views, I have a button, which presents a modal view on clicking it. When the modal view comes up and then I rotate the iPad, the portrait view is replaced by the landscape view, but the modal view goes behind this view. Any idea how to bring the modal view again to the front after the rotation? Thanks for the help Farha

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >