Search Results

Search found 18766 results on 751 pages for 'me again'.

Page 75/751 | < Previous Page | 71 72 73 74 75 76 77 78 79 80 81 82  | Next Page >

  • When designing an event, is it a good idea to prevent listeners from being added twice?

    - by Matt
    I am creating an event-based API where a user can subscribe to an event by adding listener objects (as is common in Java or C#). When the event is raised, all subscribed listeners are invoked with the event information. I initially decided to prevent adding an event listener more than once. If a listener is added that already exists in the listener collection, it is not added again. However, after thinking about it some more, it doesn't seem that most event-based structures actually prevent this. Was my initial instinct wrong? I'm not sure which way to go here. I guess I thought that preventing addition of an existing listener would help to avoid a common programming error. Then again, it could also hide a bug that would lead to code being run multiple times when it shouldn't.

    Read the article

  • Normalising book titles - Python

    - by RadiantHex
    Hi folks, I have a list of books titles: "The Hobbit: 70th Anniversary Edition" "The Hobbit" "The Hobbit (Illustrated/Collector Edition)[There and Back Again]" "The Hobbit: or, There and Back Again" "The Hobbit: Gift Pack" and so on... I thought that if I normalised the titles somehow, it would be easier to implement an automated way to know what book each edition is referring to. normalised = ''.join([char for char in title if char in (string.ascii_letters + string.digits)]) or normalised = '' for char in title: if char in ':/()|': break normalised += char return normalised But obviously they are not working as intended, as titles can contain special characters and editions can basically have very different title layouts. Help would be very much appreciated! Thanks :)

    Read the article

  • Redirect to prevent dup submission...but then you loose existing data

    - by coffeeaddict
    Here's the scenario User is on your checkout.aspx page Somewhere in the process, when clicking the pay button, you redirect the user to an intermediate page (before the confirmation page) to do some other logic. That intermediate page performs whatever logic based on a querystring flag you sent with the redirect from the checkout page This intermediate page also serves as an error page. So if any logic in the intermediatePage.aspx.cs fails I'm setting a message to be displayed on this page to the user If I refresh, that querystring value is still in the url..hence when it hits my Page_Load again, then the server-side logic is called & run again and I don't want this to happen The avoid this behavior/problem, the logical next step is to do a redirect back to the same page if they refresh (not sure how you'd catch that) to get rid of that querystring But when you redirect back to the same page your error message is gone, lost in the redirect therefore you end up showing them the same page but all values for the error message are now gone I do not want to solve this with Javascript either. I am not sure the best way to handle this.

    Read the article

  • 404 on custom post types after updating Wordpress to 3.7

    - by Chris
    Since I updated Wordpress from 3.6 to 3.7, I'm not able to visit the single-pages on my custom post types, then I get a 404 error. I thought this would be a rewrite_rules issue, so I've tried the following: -Go to the Permalink settings, click save (flush rewrites) -Manually deleted the rewrite_rules from the option table in the DB (I was desparate, and it seriously worked for me one time) -Re-check my .htaccess, but this is the exactly same as instructed on the permalink page -switched off the plugins I also tried switching the permalink to the "ugly" url (eg. ?page=35) and check if the articles worked, and they did! So I'm pretty sure it's a permalink issue. Now I rolled back to 3.6 again, but I of course want to upgrade in the near future (security etc.). A remarkable thing was that during the rollback I checked out a single page (notice that I didn't rolled back the database yet, only the files) and surprisingly they worked again. Any suggestions on how to solve this?

    Read the article

  • Disable the Go button in the Keyboard for a UITextfield in iphone app.

    - by coder net
    Hi, My app has a screen where keyboard is always visible. The main element of the screen is a UITextfield. For easy data entering, keyboard is always made visible. When the user finishes entering data and hits Go, the app performs a 4,5 seconds action which is done in the background thread in order to show UIActivityIndicatorView. My problem is that the Go button on the keyboard still shows as enabled since the logic is performed in the background. The user could potentially hit the Go again causing it to run again. I am not able to set editable/userinteraction properties to No because then the keyboard disappears. Is there anyway just to disable the Go button or freeze the keyboard until the background thread returns?

    Read the article

  • How to know when the user touches the OK button of the last StoreKit alert "Thank you. Your purchase

    - by Walchy
    I have integrated "In App Purchase" in a game to let the user unlock more levels. Everything works fine, but I have a little problem with the last alert "Thank You. Your purchase was successful. [OK]". My program gets informed that the transaction was successfully completed before this last alert pops up and so my game starts running again - then the alert comes up, annoying the user. I would like to wait with my game running until the user touches the "OK" button, but since it is an alert from StoreKit I have no idea when this happens or how I could catch it. I don't want to create another dialog (this time my own, therefor under my control) below the alert, just asking for touching "OK" again - would be a bad user experience. Anybody have any ideas?

    Read the article

  • Fetching a result twice with deferend name

    - by user1799842
    I have 1 table with tasks named opentask:columns: id,title,description,expires,creator_id,creator_name, executer_id, executer_name, priority_id, status_id1 table with users named user: with columns: user_id, username What I want is to create a query where there will be all columns from opentask table where the executer_id will be equal to the user_id of user table AND the creator_id will be equal to the user_id again. This creates a confusion because the first equality excludes the second.So I need somehow to create a query where I will include the usernames for the executer with something like where "opentask.executer_id=user_user_id" and at the same time I will include the username again (as a differend name?) for the creator with something like "where opentask.executer_id=user_user_id"So I try this, which of course I know that is missing something, can you help? SELECT DISTINCT id, title, description, expires, creator_id, executer_id, oc_opentask.priority_id, oc_opentask.status_id, priority_name, status_name, user_id, username, (SELECT username FROM oc_opentask, oc_user WHERE oc_opentask.creator_id=oc_user.user_id) AS username2 FROM oc_opentask, oc_opentask_priority, oc_user, oc_opentask_status WHERE oc_opentask.priority_id=oc_opentask_priority.priority_id AND oc_opentask.executer_id=oc_user.user_id AND oc_opentask.status_id=oc_opentask_status.status_id ORDER BY oc_opentask.expires DESC

    Read the article

  • Button in App on iOS 4.2 won't work properly

    - by MatthiasC
    My app, written for the iPad contains several UIButtons. One of them starts and stops an AVAudioPlayer: hitting the button once starts the player, hitting it again stops it accordingly. Rinse and repeat. This all works nicely on iOS version pre 4.2. When installing the App on an iPad with iOS 4.2, the button turns on and off the audio player exactly once, then stops working properly: after hitting the button, it turns into its selected state, but it does not start the audio player (as it should) and hitting the button again doesn't return it to its default state, either. As previously said: it's all fine and dandy pre 4.2, the problem only arises on the most current OS version. XCode 3.2.4 iPad with iOS 4.2

    Read the article

  • Validation of viewstate MAC failed in Safari

    - by Midhat
    Hi I have a web app using forms authentication. When I perform the following steps Let the login cookie expire Click on a link that requires a logged in user The user is redirected to the login page Click the browser back button The user is redirected to the login page again Log in using a valid username/password I get this exception Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. This case appears only in safari (windows and mac). The fundamental difference between safari and other browsers is that when we click the back button in step 4, safari shows the login page again, while the other browsers show the previous page the user was working on. Please help in this regard

    Read the article

  • How do i stop continuous builds in CCNET dashboard?

    - by Heera
    I have successfully setup a CCNet web dashboard and everything is working fine has expected. And i have triggered a force build from CCNET and it ran successfully with out causing any error. but, the problem what i am facing is that, whenever i'm triggering the build from CCNET dashboard (Force) it's keeps on to build continuously again and again. Actually it should stop the build automatically right after the success of the latest build. can any one help me out, how to stop the continuous builds ???? Thanks in Advance !!!

    Read the article

  • Reference variable to an object instantiated/initialized in another class in Java

    - by Alex
    The reason I'm asking is because I'm getting NullPointerException. I now this is very easy but I'm pretty new programming and find this a bit confusing. So say I have initialized an object in a class and want to access that same object from another class. Like now for instance I'm working on a small Chess game, in my model Game class I have an instance of Board, an object. Board, in turn, has an array of Squares. Square[][]. Game has board, board has Square[][]. Now if I want to access the Square[][] through the object board (in Game) of type Board. Do I just declare a variable with the same name and type or do I have to initialize it again? Board board OR Board board = new Board(); Note, I have already initialized board in the class Game so if I do it again, won't they be two totally different Board objects?

    Read the article

  • imageview draw issue with asynctask

    - by alexb
    Have the following asynctask that i'm using to download some images. Works fine except for the very first image, which doesn't always appears unless I do something like move to the next image and then back again. public class DownloadImageTask extends AsyncTask { static ImageView _imageView=null; public DownloadImageTask(ImageView ctl){ _imageView=ctl; } protected void onPostExecute(Bitmap result) { _imageView.setImageBitmap(result); } ... } I thought this might be an issue with updating the UI on a background thread, so I reworked this using an abstract class that invokes a method on the UI thread that calls .setImageBitmap() but I still get the same behaviour - works fine for all images except the first, unless I move to the next image and back again. Is there a way to force a redraw on the imageview after i set the image?

    Read the article

  • Can someone tell me why my dataset wont save correctly to the database in simple winforms app?

    - by Mike
    I have been struggling with this all day and I know it is probably something stupid. My code is below. If I call save then exit my program and start again I can save images to my events but if I just call save when I try to add an image and call save again I get a foreign key error. From what I know I thought my save method was updating the database from my dataset so the event associated with the image should exist. Anyway here is my save method... Private Sub Save() Me.Validate() EventsBindingSource.EndEdit() ImagesBindingSource.EndEdit() TableAdapterManager.UpdateAll(EventDataSet) EventDataSet.AcceptChanges() End Sub Am I doing this wrong? Is this enough detail?

    Read the article

  • Which index is used in select and why?

    - by Lukasz Lysik
    I have the table with zip codes with following columns: id - PRIMARY KEY code - NONCLUSTERED INDEX city When I execute query SELECT TOP 10 * FROM ZIPCodes I get the results sorted by id column. But when I change the query to: SELECT TOP 10 id FROM ZIPCodes I get the results sorted by code column. Again, when I change the query to: SELECT TOP 10 code FROM ZIPCodes I get the results sorted by code column again. And finally when I change to: SELECT TOP 10 id,code FROM ZIPCodes I get the results sorted by id column. My question is in the title of the question. I know which indexes are used in the queries, but my question is, why those indexes are used? I the second query (SELECT TOP 10 id FROM ZIPCodes) wouldn't it be faster if the clusteder index was used? How the query engine chooses which index to use?

    Read the article

  • xcode storyboard reverting in compile

    - by darren
    I started having some very odd behaviour in Xcode 4.5 recently. I made a change to a UITableViewController with static cells but the changes did not appear in the simulator and neither did my code changes. I removed the app from the simulator and ran clean on the project, then started again and all the changes appeared. I made another code change, ran the debugger via simulator and once again I saw my old UITableViewController values and my code changes were absent. This project is using storyboards, but I am not sure if this problem is related to just storyboards given my code changes are reverted as well. I am deeply confused here. Not even clean fixed this issue. Any thoughts or suggestions?

    Read the article

  • "slash before every quote" problem

    - by Camran
    I have a php page which contains a form. Sometimes this page is submitted to itself (like when pics are uploaded). I wouldn't want users to have to fill in every field again and again, so I use this as a value of a text-input inside the form: value="<?php echo htmlentities(@$_POST['annonsera_headline'],ENT_COMPAT,'UTF-8');?>"> This works, except it adds a "\" sign before every double-quote... For instance writing 19" wheels gives after page is submitted to itself: 19\" wheels And if I don't even use htmlentities then everything after the quotes dissappears. What is the problem here?

    Read the article

  • How can I dismiss the view appeared by touching Add item in UINavigationController ?

    - by srikanth rongali
    I have added add(+ symbol button) button to my navigation controller. When I click it a view appears from bottom. I added a navigation bar and two buttons to it. One save and one cancel button. And the view have one textEdit box. After editing I can save or cancel. If I touch cancel I need the view to disappear like it should go down again. I think all iPhone , iPodTouch users use it. Like when they touch Add item then a view appears from bottom and when they cancel it goes down again. How can I make in this way in my application.

    Read the article

  • Is there a 'catch' with FastFormat?

    - by Roddy
    I just read about the FastFormat C++ i/o formatting library, and it seems too good to be true: Faster even than printf, typesafe, and with what I consider a pleasing interface: // prints: "This formats the remaining arguments based on their order - in this case we put 1 before zero, followed by 1 again" fastformat::fmt(std::cout, "This formats the remaining arguments based on their order - in this case we put {1} before {0}, followed by {1} again", "zero", 1); // prints: "This writes each argument in the order, so first zero followed by 1" fastformat::write(std::cout, "This writes each argument in the order, so first ", "zero", " followed by ", 1); This looks almost too good to be true. Is there a catch? Have you had good, bad or indifferent experiences with it? CW on this question, as there's probably no right answer...

    Read the article

  • WPF Prism deactivate ?

    - by 2Fast4YouBR
    Hi all, I have an problem and would like to know if it is common problem or jsut with me. I am using Wpf with Prism and Unity, all with the pattern MvvM. I am loading a viewModel that has a reference to a dropdown with few items, my idea is that each time that the user click in some place to open the view that has this dropdown is that the dropdown will be shown with diferent values. The problem is that I see is that after I show the view for the first time and after the first DEACTIVATE, when I try to load it again looks like it is already in the memory (was not deactivated/disposed), so as is already in memory, it not call the constructor again of the modelView and the dropdown is shown with tha same old values. public BranchSelectionViewModel(IUnityContainer unityContainer) { this.unityContainer = unityContainer; User user = this.unityContainer.Resolve<User>(); this.branches = new ObservableCollection<Department>(user.Departments .Where(department => department.DepartmentId != user.SelectedDepartment.DepartmentId)); }

    Read the article

  • Django 1.2: Dates in admin forms don't work with Locales (I10N=True)

    - by equalium
    I have an application in Django 1.2. Language is selectable (I18N and Locale = True) When I select the english lang. in the site, the admin works OK. But when I change to any other language this is what happens with date inputs (spanish example): Correctly, the input accepts the spanish format %d/%m/%Y (Even selecting from the calendar, the date inserts as expected). But when I save the form and load it again, the date shows in the english form: %Y-%m-%d The real problem is that when I load the form to change any other text field and try to save it I get an error telling me to enter a valid date, so I have to write all dates again or change the language in the site to use the admin. I haven't specified anything for DATE_INPUT_FORMATS in settings nor have I overridden forms or models. Surely I am missing something but I can't find it. Can anybody give me a hint?

    Read the article

  • C/C++ enums: Detect when multiple items map to same value

    - by Dan
    Is there a compile-time way to detect / prevent duplicate values within a C/C++ enumeration? The catch is that there are multiple items which are initialized to explicit values. Background: I've inherited some C code such as the following: #define BASE1_VAL (5) #define BASE2_VAL (7) typedef enum { MsgFoo1A = BASE1_VAL, // 5 MsgFoo1B, // 6 MsgFoo1C, // 7 MsgFoo1D, // 8 MsgFoo1E, // 9 MsgFoo2A = BASE2_VAL, // Uh oh! 7 again... MsgFoo2B // Uh oh! 8 again... } FOO; The problem is that as the code grows & as developers add more messages to the MsgFoo1x group, eventually it overruns BASE2_VAL. This code will eventually be migrated to C++, so if there is a C++-only solution (template magic?), that's OK -- but a solution that works with C and C++ is better.

    Read the article

  • Is there away to load a page only once with AJAX?

    - by digitup
    I have an AJAX call to load a function once the page is loaded, the function opens a lightbox a like frame with some data. The issue is that if I click on close (lightbox frame), the page loads again and again loading the frame so the use never reaches the page under the layer of frame since the frame load on infinite loop. The Ajax is repeating calling the function I guess but I would like to load the frame once and when the user clicks X (close) he may return to the original page. $(document).ready(function(){ var city = $('#citycode').html(); $.ajax({ //when page is loaded, fire the following function success: function(){ //the function to be fired located in the page in seperate file openX(city + //some other parameters); }}); }); Any tips?

    Read the article

  • setText() without calling onTextChanged()

    - by user1537779
    Is there a way I can set text to an EditTextView, but not trigger its onTextChanged() or afterTextChanged(). In onTextChanged(), I am making a server call to get autocompletes. But once the user selects from the dropdown, I want to set text to the EditTextView, but it again calls the server and shows the dropdown. While I can have a flag not to make server call when selected from dropdown, using the onItemClick() on dropdown(ListView). How can I remove the flag again, if the user tried to edit the text later.

    Read the article

  • Is modifying a file without writing a new file possible in c++?

    - by Phenom
    Let's say I have a text file that is 100 lines long. I want to only change what is in the 50th line. One way to do it is open the file for input and open a new file for output. Use a for-loop to read in the first half of the file line by line and write to the second file line by line, then write what I want to change, and then write out the second half using a for-loop again. Finally, I rename the new file to overwrite the original file. Is there another way besides this? A way to modify the contents in the middle of a file without touching the rest of the file and without writing everything out again? If there is, then what's the code to do it?

    Read the article

  • Need help with tweaking a Dropdown with three options, user selects one - a hidden div appears with correct fields

    - by Jack
    Hello Again, I posted a question on here and got an answer within minutes I'm hoping the wizards on here can help me again. Okay so I'm using a script I found online to try and add this function to a shopping cart form. Here's the setup. I have a payment method dropdown with Visa, Mastercard and Bank Withdrawal as the options. For the credit cards I have one hidden div with a certain set of fields, and for the bank I have another hidden div. Each of the divs have named ID's - #payCredit and #payBank The css for both have margin: 0px and display: none; Here's a peice of javascript I used successfuly on a shipping address checkbox `function toggleLayer( whichLayer ) { var elem, vis; if( document.getElementById ) // this is the way the standards work elem = document.getElementById( whichLayer ); else if( document.all ) // this is the way old msie versions work elem = document.all[whichLayer]; else if( document.layers ) // this is the way nn4 works elem = document.layers[whichLayer]; vis = elem.style; // if the style.display value is blank we try to figure it out here if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined) vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none'; vis.display = (vis.display==''||vis.display=='block')?'none':'block'; }` I was hoping I could change it slightly to meet my needs. Here's the dropdown <label>Payment Method:</label> <select name="payment" id="payment" class="dropdown3" style="width:8em"> <option selected="selected">Select</option> <option value="Visa" onclick="javascript:toggleLayer('payCredit');">Visa</option> <option value="MasterCard" onclick="javascript:toggleLayer('payCredit');">Mastercard</option> <option value="Direct" onclick="javascript:toggleLayer('payBank');">Direct Withdraw</option> </select></li> The current result is that it kinda works. I can open the dropdown and select Visa and it appears, if I select Visa again it disappears, if I select Visa and then select bank, both appear. You can see what i'm working on here - http://test.sharevetcare.com/bestfriends/cart3.html

    Read the article

< Previous Page | 71 72 73 74 75 76 77 78 79 80 81 82  | Next Page >