Search Results

Search found 17924 results on 717 pages for 'z order'.

Page 22/717 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • How to: Save order of tabs when customizing tabs in UITabBarController

    - by Canada Dev
    I am having problems finding any other information than the docs for how to save the tab order for my UITabBarController, so that the user's customization is saved for next app launch. I have searched online, but have been unable to find any blog posts or articles that goes through the proper code for doing this. I realize I have to use the delegate methods for the UITabBarController (didEndCustomizingViewControllers:) but I am not sure how I best approach persistance in terms of saving the state of the order the user wants the tabs in. Can someone post some code, point me in the right direction or perhaps you have a link for something saved? :) Thanks

    Read the article

  • XML testing in Rails - Fixed attributes order in Builder::XmlMarkup in ruby -

    - by Daniel Cukier
    I have the following test in my Rails Application: it "should validate xml" do builder = Builder::XmlMarkup.new builder.server(:name => "myServer", :ip => "192.168.1.1").should == "<server name=\"myServer\" ip=\"192.168.1.1\"/>" end The problem is that this test passes sometimes, because the order of the xml tag attributes is unpredictable. Is there a way to force this order? Is there any other easy way to build xml? This example is simplified, I have a big XML. My problem is that I want to do an integration test, which compares a WebService call with a fixed XML file. Otherwise, I would have to parse the xml and verify element by element in the XML.

    Read the article

  • How do I guarante node order for an Xpath 'OR' query

    - by Tom Carter
    I have a snippet of XML that looks like <body> Some text.... <nodeA>....</nodeA> more text <someOtherNode> <nodeA>.......</nodeA> </someOtherNode> <nodeB>.......</nodeB> etc..... </body> I'm selecting all nodeA and NodeB nodes inside <body> using an XPATH query similar to "//nodeA|//nodeB" As I understand it, .NET supports XPATH 1.0 which does not guarantee node order. How can I guarantee selected nodes are returned in document order in my OR query : that's to say : nodeA, nodeA, nodeB

    Read the article

  • Time order of messages

    - by Aiden Bell
    Read (skimmed enough to get coding) through Erlang Programming and Programming Erlang. One question, which is as simple as it sounds: If you have a process Pid1 on machine m1 and a billion million messages are sent to Pid1, are messages handled in parallel by that process (I get the impression no) and(answered below) is there any guarantee of order when processing messages? ie. Received in order sent? If so, how is clock skew handled in high traffic situations for ordering? Coming from the whole C/Thread pools/Shared State background ... I want to get this concrete. I understand distributing an application, but want to ensure the 'raw bones' are what I expect before building processes and distributing workload. Also, am I right in thinking the whole world is currently flicking through Erlang texts ;)

    Read the article

  • Maintaining sort order of database table rows

    - by Lox
    Say I have at database table containing information about a news article in each row. The table has an integer "sort" column to dictate the order in which the articles are to be presented on a web site. How do I best implement and maintain this sort order. The problem I want to avoid is having the the articles numbered 1,2,3,4,..,100 and when article number 50 suddenly becomes interesting it gets its sort number set to 1 and then all articles between them must have their sort number increased by one. Sure, setting initial sort numbers to 100,200,300,400 etc. leaves some space for moving around but at some point it will break. Is there a correct way to do this, maybe a completely different approach? Added-1: All article titles are shown in a list linking to the contents, so yes all sorted items are show at once. Added-2: An item is not necessarily moved to the top of the list; any item can be placed anywhere in the ordered list.

    Read the article

  • MS Access: Order of Events in event ApplyFilter (ADP Project)

    - by Jose Valdes
    I'm having problems with the execution of ServerFilterByForm in Access 2003 When I apply the entered filter it returns the requested data but after it appear on screen (Form) it disappears. Don't know why this is happening Does anyone had the same problem? How can it be solved? Heris is part of the code Private Sub Form_ApplyFilter(Cancel As Integer, ApplyType As Integer) Dim stSql As String If Len(ServerFilter) > 0 Then stSql = "SELECT * FROM v_InitialReviewQuery " & _ " WHERE " + ServerFilter & _ " ORDER BY acctnumber" Else stSql = "SELECT top 1 * FROM v_InitialReviewQuery ORDER BY acctnumber" End If Me.RecordSource = stSql End Sub

    Read the article

  • Mysql query - problem with order by

    - by Sergio
    I'm using two tables for selecting messages between users. Table "messages" for recording the messages and table "members" for checking users data (are they activ or deleted). This query working fine. What I need to do is list the received messsages order by last received. I tried to do with "ORDER BY messages.id DESC" at the end of this query but it didn't work. All messages are listed from first received. This is the mysql join table query that I'm using: sql = "select distinct messages.fromid, messages.readed, messages.fromid, messages.toid, members.id as pid From messages Inner Join members on members.id = messages.fromid Where messages.toid = ".$mid." AND members.status = 7 AND messages.kreaded !='1' AND messages.subject != 'readed' GROUP BY fromid" Is there any way to do this?

    Read the article

  • casting doubles to integers in order to gain speed

    - by antirez
    Hello all, in Redis (http://code.google.com/p/redis) there are scores associated to elements, in order to take this elements sorted. This scores are doubles, even if many users actually sort by integers (for instance unix times). When the database is saved we need to write this doubles ok disk. This is what is used currently: snprintf((char*)buf+1,sizeof(buf)-1,"%.17g",val); Additionally infinity and not-a-number conditions are checked in order to also represent this in the final database file. Unfortunately converting a double into the string representation is pretty slow. While we have a function in Redis that converts an integer into a string representation in a much faster way. So my idea was to check if a double could be casted into an integer without lost of data, and then using the function to turn the integer into a string if this is true. For this to provide a good speedup of course the test for integer "equivalence" must be fast. So I used a trick that is probably undefined behavior but that worked very well in practice. Something like that: double x = ... some value ... if (x == (double)((long long)x)) use_the_fast_integer_function((long long)x); else use_the_slow_snprintf(x); In my reasoning the double casting above converts the double into a long, and then back into an integer. If the range fits, and there is no decimal part, the number will survive the conversion and will be exactly the same as the initial number. As I wanted to make sure this will not break things in some system, I joined #c on freenode and I got a lot of insults ;) So I'm now trying here. Is there a standard way to do what I'm trying to do without going outside ANSI C? Otherwise, is the above code supposed to work in all the Posix systems that currently Redis targets? That is, archs where Linux / Mac OS X / *BSD / Solaris are running nowaday? What I can add in order to make the code saner is an explicit check for the range of the double before trying the cast at all. Thank you for any help.

    Read the article

  • two php arrays - sort one array with the value order of another

    - by Tisch
    Hi there, I have two PHP arrays like so: Array of X records containing the ID of Wordpress posts (in a particular order) Array of Wordpress posts The two arrays look something like this: Array One (Sorted Custom Array of Wordpress Post IDs) Array ( [0] => 54 [1] => 10 [2] => 4 ) Array Two (Wordpress Post Array) Array ( [0] => stdClass Object ( [ID] => 4 [post_author] => 1 ) [1] => stdClass Object ( [ID] => 54 [post_author] => 1 ) [2] => stdClass Object ( [ID] => 10 [post_author] => 1 ) ) I would like to sort the array of wordpress posts with the order of the ID's in the first array. I hope this makes sense, and thanks in advance of any help. Tom edit: The server is running PHP Version 5.2.14

    Read the article

  • Play bitmap animation list in reverse order?

    - by Ixx
    I have a bitmap animation defined in XML, to open a door. I also need to animate closing the door, which contains the same frames but in reverse order. I don't want to create a second XML for this. The only reverse parameter I found in the documentation is related with repeating, and this doesn't apply, since I want the opening animation to finish when the door is closed and not continue to closing animation. I also found some threads about using a custom interpolator, but can I use / makes sense with a bitmap animation? How can I play the XML animation in reverse order?

    Read the article

  • Order object simplexml_load_file by field of this.

    - by ronsandova
    Hi i have a problems with simplexml_load_file, i'm not pretty sure how to do to order my array by a $item-padre. I need to do foreach and order by $item-padre.=, i don't know how to do this. function create_sitemap($sitemap){ $xml = file_exists('sitemap.xml') ? $xml = simplexml_load_file('sitemap.xml'): exit('Failed to open sitemal.xml.'); $xml = uasort($xml, function($a,$b){ return strcmp($a-padre, $b-padre); }); foreach ($xml-url as $item) { echo "" . $item-loc. ""; echo "" . $item-padre . ""; } } Thanks in advance.

    Read the article

  • PHP readdir() not returning files in alphabetical order

    - by Buggabill
    I am reading through a directory with some pictures and such using a pretty simple implementation of readdir() like the following: if ($handle = opendir($path)) { while (false !== ($szFilename = readdir($handle))) { if ($szFilename[0] !== '.') { if (is_file($path.$szFilename)) { // do stuff } } } } The problem that I am having is that the files are not being read in alphabetical order as the docs for readdir() state: Returns the filename of the next file from the directory. The filenames are returned in the order in which they are stored by the filesystem. Another weird thing is that, on the local testing server, the same code works great. This is running on a server using the LAMP stack in both cases. I know that I can build an array and just sort it, but I was wondering if I was missing something in what I was doing. Thanks for any insight!

    Read the article

  • Export DB Tables via phpMyAdmin In Non-Alphabetical Order

    - by dosboy
    I have a MySQL database from a Joomla MultiSite installation where it has a set of tables with different prefixes for each Joomla site. When I export the db via phpMyAdmin it creates a SQL file where the tables are created and populated in alphabetical order. The problem is that the tables for the slave sites have dependencies on the tables for the master site, but alphabetically their prefixes are ahead of the master site. So the export works fine but when I try importing I get error after error and have to manually move sections around in the SQL file to make sure that the dependent tables are created/populated first. So, is it possible to export a db via phpMyAdmin with the tables in a specific order?

    Read the article

  • build a chrome extension in order to upload images (from clipboard)

    - by dayscott
    I wanted to write a simple chrome extension in order to substitute the following sequence of steps which i have to do very often for university: make screenshot of something edit screenshot in Paint save unnamend.png to harddrive upload unnamed.png to imageshack.us/pic-upload.de or any other website share link of image with others. I don't care which image upload service to use, i just want automize this use-case in order to save time (I already red and did a getting-started chrome extension and checked out their API, but that's it, this page: http://farter.users.sourceforge.net/blog/2010/11/20/accessing-operating-system-clipboard-in-chromium-chrome-extensions/ seemed useful, but i couldn't make it overwrite my systems clipboard - moreover i can't find a tutorial which helps me further).

    Read the article

  • Determining the order of a list of numbers (possibly without sorting)

    - by Victor Liu
    I have an array of unique integers (e.g. val[i]), in arbitrary order, and I would like to populate another array (ord[i]) with the the sorted indexes of the integers. In other words, val[ord[i]] is in sorted order for increasing i. Right now, I just fill in ord with 0, ..., N, then sort it based on the value array, but I am wondering if we can be more efficient about it since ord is not populated to begin with. This is more of a question out of curiousity; I don't really care about the extra overhead from having to prepopulate a list and then sort it (it's small, I use insertion sort). This may be a silly question with an obvious answer, but I couldn't find anything online.

    Read the article

  • NUnit Assert a list of objects in no order

    - by Shawn Mclean
    How do I Assert a collection of items in no particular order? I just want to make sure all the items are in the list. I'm heard of CollectionAssert but I do not see any method that would do what I want. My object looks like this: public class Vector2{ public float X {get; set;} public float Y {get; set;} } Assert - I want something like this: CollectionAssert.ContainsAll(mesh.GetPolygonVertices(0), aListOfVertices); mesh.GetPolygonVertices(int) returns a List<Vector2> and aListOfVertices contains all of what is returned, but not guaranteed that order.

    Read the article

  • Select records from XML column (SQL Server 2005) based on node order

    - by jdoe
    I have a column in a SQL Server 2005 table defined as an XML column. Is there a way to select records from this table based on the order of two nodes in that column? For example, we have the following structure in our XML: <item> <latitude/> <longitude/> </item> I want to see if there are any records that have latitude/longitude in the opposite order i.e. <longitude/> then <latitude/>. I've tried some XPath expressions but with no luck.

    Read the article

  • Weird callback execution order in Twisted?

    - by SlashV
    Consider the following code: from twisted.internet.defer import Deferred d1 = Deferred() d2 = Deferred() def f1(result): print 'f1', def f2(result): print 'f2', def f3(result): print 'f3', def fd(result): return d2 d1.addCallback(f1) d1.addCallback(fd) d1.addCallback(f3) #/BLOCK==== d2.addCallback(f2) d1.callback(None) #=======BLOCK/ d2.callback(None) This outputs what I would expect: f1 f2 f3 However when I swap the order of the statements in BLOCK to #/BLOCK==== d1.callback(None) d2.addCallback(f2) #=======BLOCK/ i.e. Fire d1 before adding the callback to d2, I get: f1 f3 f2 I don't see why the time of firing of the deferreds should influence the callback execution order. Is this an issue with Twisted or does this make sense in some way?

    Read the article

  • Enter purchase order received quantity by code

    - by user733916
    In purchase order form - Line - Tab Quantity, there is Received, Delivery Reminder and Ordered. I want to be able to entry those field by X++ code, because currently our company still entry data into old system. I can retrieve the arrival purchase order goods data from that old system, then I want to entry those retrieved data by code into Axapta. What table and field should I consider when doing that? What functions available to easily update each PO lines received quantity? Sample Code is nice.

    Read the article

  • controlling the order of submitted futures

    - by mac
    In this example, i am submitting a few files to my comparator object. It all works fine, except that i noticed that order in which files are submitted is not always teh same order in which they are returned. Any suggestions on how i can better control this? ExecutorService pool = Executors.newFixedThreadPool(5); CompletionService<Properties> completion = new ExecutorCompletionService<Properties>(pool); for (String target : p.getTargetFiles()) { completion.submit(new PropertiesLoader(target, p)); } for (@SuppressWarnings("unused") String target : p.getTargetFiles()) { Properties r = null; try { r = completion.take().get(); } catch (InterruptedException e) { e.printStackTrace(); } catch (ExecutionException e) { e.printStackTrace(); } p.addTargetFilesProperties(r); } pool.shutdown();

    Read the article

  • group by, order by, with join

    - by Scarface
    Hey guys, quick question, I have this query, and I am trying to get the latest comment for each topic and then sort those results in descending order (therefore one comment per topic). I have what I think should work, but my join always messes my results up. Somehow, it seems to have sorted the end results properly, but has not taken the latest comment from each topic instead it seems to have just taken a random comment. If anyone has any ideas, would really appreciate any advice SELECT * FROM comments JOIN topic ON topic.topic_id=comments.topic_id WHERE topic.creator='admin' GROUP BY comments.topic_id ORDER BY comments.time DESC table comments is structured like id time user message topic_id table topic is structured like topic_id subject_id topic_title creator timestamp description

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >