Search Results

Search found 4250 results on 170 pages for 'mark underwood'.

Page 78/170 | < Previous Page | 74 75 76 77 78 79 80 81 82 83 84 85  | Next Page >

  • Moving UITableView cells and maintaining consistent data

    - by Mark F
    I've enabled editing mode and moving cells around to allow users to position table view content in the order they please. I'm using Core Data as the data source, which sorts the content by the attribute "userOrder". When content is first inserted, userOrder is set to a random value. The idea is that when the user moves a cell around, the userOrder of that cell changes to accomodate its new position. The following are problems I am running into while trying to accomplish this: Successfully saving the the new location of the cell and adjusting all changed locations of influenced cells. Getting the data to be consistent. For example, the TableView handles the movement fine, but when i click on the new location of the cell, it displays data for the old cell that used to be that location. Data of all influenced cells gets messed up as well. I know I have to implement this in: - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath *)destinationIndexPath {} I just don't know how. The apple docs are not particularly helpful if you are using Core Data, as in my situation. Any guidance greatly appreciated!

    Read the article

  • Viewing directory containing MIME encoded email messages

    - by Mark
    I have an application which generates and sends MIME encoded messages (javax.mail.internet.MimeMessage) through an SMTP server. As part of the development process only, I'd like to be able to view these messages rather than send them (I know the sending works just fine, but there are restrictions on the domains within the dev environment which makes it a little difficult) I thought the easiest way would be to save the text for each message to a directory, then point "an app" at the directory and check them over. So the question is, what would be a good app to use? Is it as simple as configuring Outlook or another email client to do it? Thanks

    Read the article

  • MediaWiki: workaround for watchlist restricted to 7 days?

    - by Mark Robinson
    I'm running MediaWiki 1.13.2. When I go to my watchlist, I'm limited to only viewing the last 7 days (though MediaWiki should permit me to view the last 30 days). I've tried: Clicking the all button Changing the URL Changing the settings under MY PREFERENCES-WATCHLIST. When I save (e.g. 30 days) it resets back to 7 days! Googling for an answer... Anyone heard of this bug before? Is there a workaround? I can't see a setting anywhere for this to be a maximum.

    Read the article

  • HTML5: Rendering absolute images using canvas

    - by Mark
    I am experimenting with canvas as part of my HTML5 introduction. This constitutes as assignment work, but I am not asking for any help on the actual coursework at all. I am trying to write a rendering engine, but having no luck because once the image is drawn on canvas it looks very distorted, and not at the right dimensions of the image itself. I have made a animation engine that loads images into an array, and then iterates through them at a certain speed. This is not the problem, and I assume is not causing the issue as this was happening when I drawn an image to the canvas. I think this is natural behaviour for images to be scaled/skewed when the window is resized, so I conquered that by simply redrawing the whole thing once the window is resized. The images I am using are isometric, and drawn at a pixel level. Would this cause the distortion? It seems setting the dimensions on the drawImage() function are not working are all. I am using JavaScript for the manipulation and rendering of the canvas. I would normally try and work it out myself, but I do not have any time to ponder why because I have no idea why it is even scaling/skewing the image once it is drawn on the canvas. I cannot share the code for obvious reasons. I should also mention, the canvas's dimension is the total width of the viewport, as I am developing a game. My question is: Has anyone encountered this and how would I correct it? Thanks for your help.

    Read the article

  • Oracle: what information can I derive from the SCN?

    - by Mark Harrison
    Given an SCN (system change number), and assuming an SCN for which the data is still in the undo logs, what information about the SCN can I derive? of course, SCN_TO_TIMESTAMP() gives an approximate time the data was committed. Is there any other information I can derive? What transaction, what tables, what data were affected? etc?

    Read the article

  • How do I write a regex that ignores strings starting with a particular prefix, and captures everythi

    - by Mark Rogers
    Background: I'm trying to come up with a regex for a rewrite rule that will take anything that does not start with a particular prefix, and add that prefix to it. But urls that already have the prefix should be rejected by the regular expression (because they already have the url). Example: If the prefix is s1 a string like home will capture the home part. But a string like s1/home, will not capture anything. This way I can add the capture group onto the prefix, so that 'home' will become 's1/home'. I've tried (^s1/), but I'm missing something here, because that rejected 'home' for some reason.

    Read the article

  • php Checking if value exists in array of array

    - by Mark
    I have an array within an array. $a = array ( 0 => array ( 'value' => 'America', ), 1 => array ( 'value' => 'England', ), ) How do I check if 'America' exists in the array? The America array could be any key, and there could be any number of subarrays, so a generalized solution please. Looking on the php manual I see in_array, but that only works for the top layer. so something like in_array("America", $a) would not work. Thanks.

    Read the article

  • Excel I have a .Net object compiled as a tlb but cant not access any methods apart from Dispose.

    - by Mark O'Grady
    Hi This is ongoing issue to something I posted yesterday. I have a .net object that I want to use in Excel. I have an existing VBA script that i need to alter to call this the object from. I have then converted the object to a TLB. I've not really touched on this area before so any help will be appreciated. I have created an interface [Guid("0F700B48-E0CA-446b-B87E-555BCC317D74"),InterfaceType(ComInterfaceType.InterfaceIsDual)] [ComVisible(true)] public interface IOfficeCOMInterface { [DispId(1)] void ResetOrder(); [DispId(2)] void SetDeliveryAddress(string PostalName, string AddressLine1, string AddressLine2, string AddressLine3, string AddressLine4, string PostCode, string CountryCode, string TelephoneNo, string FaxNo, string EmailAddress); } I have also created an class that inherits that object. [ClassInterface(ClassInterfaceType.None), ProgId("NAMESPACE.OfficeCOMInterface"), Guid("9D9723F9-8CF1-4834-BE69-C3FEAAAAB530"), ComVisible(true)] public class OfficeCOMInterface : IOfficeCOMInterface, IDisposable { public void ResetSOPOrder() { } public void SetDeliveryAddress(string PostalName, string AddressLine1, string AddressLine2, string AddressLine3, string AddressLine4, string PostCode, string CountryCode, string TelephoneNo, string FaxNo, string EmailAddress) { try { SalesOrder.AmendDeliveryAddress(PostalName, AddressLine1, AddressLine2, AddressLine3, AddressLine4, PostCode); MessageBox.Show("Delivery address set"); } catch (Exception ex) { throw ex; } } } I can't access the object methods apart from dispose, I guess IDisposable is working fine. Is there anything I need to my Interface?

    Read the article

  • Is there a better way to format this date string

    - by Mark Breen
    Hello is there are better way to structure this line of code, as you can see, I am changing the format of a string that contains a date. lblCourseStartDate.Text = String.Format("{0:D}", DateTime.Parse(CourseStartDate)); I just found it untidy that I am converting twice or three times to get the format I want. Thanks

    Read the article

  • C# Property Delegate?

    - by Mark
    In my other methods I could do something like this, public void Add(T item) { if (dispatcher.CheckAccess()) { ... } else { dispatcher.Invoke(new Action<T>(Add), item); } } But how do I invoke a property for a situation like this? public T this[int index] { get { ... } set { if (dispatcher.CheckAccess()) { ... } else { dispatcher.Invoke(???, index); // <-- problem is here } } }

    Read the article

  • Java - Optimize finding a string in a list

    - by Mark
    I have an ArrayList of objects where each object contains a string 'word' and a date. I need to check to see if the date has passed for a list of 500 words. The ArrayList could contain up to a million words and dates. The dates I store as integers, so the problem I have is attempting to find the word I am looking for in the ArrayList. Is there a way to make this faster? In python I have a dict and mWords['foo'] is a simple lookup without looping through the whole 1 million items in the mWords array. Is there something like this in java? for (int i = 0; i < mWords.size(); i++) { if ( word == mWords.get(i).word ) { mLastFindIndex = i; return mWords.get(i); } }

    Read the article

  • How do I define a foreign key that points to a class of a different name in ActiveRecord with Rails?

    - by Mark
    Hi there, I have a model Follow that defines a user_id and a followed_user_id. If you've used Twitter, this should make sense. I'm trying to make followed_user_id point to a User model, so I can access the user that is being followed through f.followed_user (in the same way that if I have an Entry with belongs_to :user and a user_id column I can use entry.user to get the user.) How can I do this? Thanks!

    Read the article

  • Can I use Google Maps API (Places API) in my iPhone app to find locations near me?

    - by Mark
    I have a couple of questions regarding using Google maps API, especially the Places API in my iPhone application. Can I use Places API in my iPhone app and still release the app as a paid app? Could I release my app as free if I am unable to use these APIs in a paid app? Is there an example for figuring out store locations around user's current location using Places API? For example if the user types "Groceries" in the app, I would like to show all the Store that sell groceries near the user's location. Thanks!

    Read the article

  • Java - Confused by the one class per file rule

    - by Mark
    The one class per file rule in Java has me a bit confused. I writing an Android app and trying to implement the accepted answer to this question: Common class for AsyncTask in Android? which calls for an interface definition which class A implements and class B accepts as an argument to its constructor. So I need an A.java and a B.java, but where does the interface go? Does it need a separate java file itself? Do I have to define it inside both A and B? If not how to import it? Also I will have about 10 different AsyncTask classes, but I don't want to bother creating a new file for each one. What would you recommend? Is there a way to put all 10 classes in one file? Or should I create a big if/then block inside the class and pass an argument telling it which of the 10 different tasks I want it to do?

    Read the article

  • How can I make PHP scripts timeout gracefully while waiting for long-running MySQL queries?

    - by Mark B
    I have a PHP site which runs quite a lot of database queries. With certain combinations of parameters, these queries can end up running for a long time, triggering an ugly timeout message. I want to replace this with a nice timeout message themed according to the rest of my site style. Anticipating the usual answers to this kind of question: "Optimise your queries so they don't run for so long" - I am logging long-running queries and optimising them, but I only know about these after a user has been affected. "Increase your PHP timeout setting (e.g. set_time_limit, max_execution_time) so that the long-running query can finish" - Sometimes the query can run for several minutes. I want to tell the user there's a problem before that (e.g. after 30 seconds). "Use register_tick_function to monitor how long scripts have been running" - This only gets executed between lines of code in my script. While the script is waiting for a response from the database, the tick function doesn't get called. In case it helps, the site is built using Drupal (with lots of customisation), and is running on a virtual dedicated Linux server on PHP 5.2 with MySQL 5.

    Read the article

  • localstorage vs html5?

    - by Mark
    What's the difference between local/html5 on this page: http://code.google.com/p/jquery-jstore/wiki/DefaultEngines I was under the impression that I could use localstorage on Chrome, but looks like that's not the case? Some elucidation would be greatly appreciated. Thanks.

    Read the article

  • When iterating over values, why does typeof(value) return "string" when value is a number? Javascrip

    - by Mark
    I'm using Google Chrome for this test: Contrary to intuition, the first loop alerts "string" 3 times, while the second loop alerts "number" 3 times. numarray = [1, 2, 3]; //for-each loop for(num in numarray) alert(typeof(num)); //standard loop for(i=0; i<numarray.length; i++) alert(typeof(numarray[i])); I was expecting both loops to alert "number" 3 times. How is the first loop implemented in Javascript? In other words, if the for-each is syntactic sugar, what is its equivalent using a standard loop? Also, is there some way to iterate over an object's namespace using a standard loop? I'm looking to touch every one of some object's methods and attributes using a loop of the second kind. I'm new to Javascript and any help is highly appreciated, thanks.

    Read the article

  • Sort an array via x86 Assembly (embedded in C++)?? Possible??

    - by Mark V.
    I am playing around with x86 assembly for the first time and I can't figure out how to sort an array (via insertion sort).. I understand the algorithm, but assembly is confusing me as I primarily use Java & C++. Heres all I have so far int ascending_sort( char arrayOfLetters[], int arraySize ) { char temp; __asm{ push eax push ebx push ecx push edx push esi push edi //// ??? pop edi pop esi pop edx pop ecx pop ebx pop eax } } Basically nothing :( Any ideas?? Thanks in advance.

    Read the article

  • Are there any good materials or examples on creating a custom Designer in the Delphi IDE

    - by Mark Elder
    I am working on creating a custom form designer in the Delphi IDE. I'm trying to use the RegisterCustomModule, TBaseCustomModule, and ICustomModule functions, classes, and interfaces. My first question on this pointed me to the Delphi Developer's Handbook and the idea that I could even create a custom form designer. However, that book seems to be all Delphi 3 information and things have really changed since then. I'm not finding any material in the Delphi Help file, and searches have not returned very much. I did find the Accidental Programmer's page on the Open Tools, but that looks like it was last up dated in 1998? It does at least have the correct unit names and uses the new interfaces. I'm willing to track down and buy an older book if that is the best reference.

    Read the article

  • How to reserve public API to internal usage in .NET?

    - by mark
    Dear ladies and sirs. Let me first present the case, which will explain my question. This is going to be a bit long, so I apologize in advance :-). I have objects and collections, which should support the Merge API (it is my custom API, the signature of which is immaterial for this question). This API must be internal, meaning only my framework should be allowed to invoke it. However, derived types should be able to override the basic implementation. The natural way to implement this pattern as I see it, is this: The Merge API is declared as part of some internal interface, let us say IMergeable. Because the interface is internal, derived types would not be able to implement it directly. Rather they must inherit it from a common base type. So, a common base type is introduced, which would implement the IMergeable interface explicitly, where the interface methods delegate to respective protected virtual methods, providing the default implementation. This way the API is only callable by my framework, but derived types may override the default implementation. The following code snippet demonstrates the concept: internal interface IMergeable { void Merge(object obj); } public class BaseFrameworkObject : IMergeable { protected virtual void Merge(object obj) { // The default implementation. } void IMergeable.Merge(object obj) { Merge(obj); } } public class SomeThirdPartyObject : BaseFrameworkObject { protected override void Merge(object obj) { // A derived type implementation. } } All is fine, provided a single common base type suffices, which is usually true for non collection types. The thing is that collections must be mergeable as well. Collections do not play nicely with the presented concept, because developers do not develop collections from the scratch. There are predefined implementations - observable, filtered, compound, read-only, remove-only, ordered, god-knows-what, ... They may be developed from scratch in-house, but once finished, they serve wide range of products and should never be tailored to some specific product. Which means, that either: they do not implement the IMergeable interface at all, because it is internal to some product the scope of the IMergeable interface is raised to public and the API becomes open and callable by all. Let us refer to these collections as standard collections. Anyway, the first option screws my framework, because now each possible standard collection type has to be paired with the respective framework version, augmenting the standard with the IMergeable interface implementation - this is so bad, I am not even considering it. The second option breaks the framework as well, because the IMergeable interface should be internal for a reason (whatever it is) and now this interface has to open to all. So what to do? My solution is this. make IMergeable public API, but add an extra parameter to the Merge method, I call it a security token. The interface implementation may check that the token references some internal object, which is never exposed to the outside. If this is the case, then the method was called from within the framework, otherwise - some outside API consumer attempted to invoke it and so the implementation can blow up with a SecurityException. Here is the modified code snippet demonstrating this concept: internal static class InternalApi { internal static readonly object Token = new object(); } public interface IMergeable { void Merge(object obj, object token); } public class BaseFrameworkObject : IMergeable { protected virtual void Merge(object obj) { // The default implementation. } public void Merge(object obj, object token) { if (!object.ReferenceEquals(token, InternalApi.Token)) { throw new SecurityException("bla bla bla"); } Merge(obj); } } public class SomeThirdPartyObject : BaseFrameworkObject { protected override void Merge(object obj) { // A derived type implementation. } } Of course, this is less explicit than having an internally scoped interface and the check is moved from the compile time to run time, yet this is the best I could come up with. Now, I have a gut feeling that there is a better way to solve the problem I have presented. I do not know, may be using some standard Code Access Security features? I have only vague understanding of it, but can LinkDemand attribute be somehow related to it? Anyway, I would like to hear other opinions. Thanks.

    Read the article

  • Django: HTTPS for just login page?

    - by Mark
    I just added this SSL middleware to my site http://www.djangosnippets.org/snippets/85/ which I used to secure only my login page so that passwords aren't sent in clear-text. Of course, when the user navigates away from that page he's suddenly logged out. I understand why this happens, but is there a way to pass the cookie over to HTTP so that users can stay logged in? If not, is there an easy way I can use HTTPS for the login page (and maybe the registration page), and then have it stay on HTTPS if the user is logged in, but switch back to HTTP if the user doesn't log in? There are a lot of pages that are visible to both logged in users and not, so I can't just designate certain pages as HTTP or HTTPS.

    Read the article

  • jquery Checking to see if element has element

    - by Mark
    I'm using jquery 1.3 and is trying to duplicate the 1.4 .has functionality. I need to check if the .page element contains the image, and if it doesn't, append it. Is it something like: var imageid = thirdimage; if ($('#page:has(#'+imageid+')') === undefined) { $('#page').append($('#'+imageid)); } Thanks.

    Read the article

< Previous Page | 74 75 76 77 78 79 80 81 82 83 84 85  | Next Page >