Search Results

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

Page 60/717 | < Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >

  • MS Access Mark Duplicates in order of appearance - using the function RankOfDup: (SELECT Count(*) ...)

    - by veska stoyanova
    I'm trying to create Ranking that shows the sequence of agreements for the two fields Customers and Agreements. The number for agreements must be unique, whereas customers can repeat. The formula RankOfDup: (SELECT Count(*) FROM Data a WHERE a.customer=Data.customer And a.agreement >= Data.agreement) Works beautifully but after this query with columns Agreement, Customer and RankofDup, I need to create crosstab that transposes the RankofDub. It works when I make the table first and then create query but my data is too large so I'm trying to put the select query with the ranking in a crosstab query. However, when I try to do this Access gives error message that microsoft jet ... doesn't recognise Data.customer? Any ideas how I can fix this?

    Read the article

  • What's the order of execution in property setters when using IDataErrorInfo?

    - by Benny Jobigan
    Situation: Many times with WPF, we use INotifyPropertyChanged and IDataErrorInfo to enable binding and validation on our data objects. I've got a lot of properties that look like this: public SomeObject SomeData { get { return _SomeData; } set { _SomeData = value; OnPropertyChanged("SomeData"); } } Of course, I have an appropriate overridden IDataErrorInfo.this[] in my class to do validation. Question: In a binding situation, when does the validation code get executed? When is the property set? When is the setter code executed? What if the validation fails? For example: User enters new data. Binding writes data to property. Property set method is executed. Binding checks this[] for validation. If the data is invalid, the binding sets the property back to the old value. Property set method is executed again. This is important if you are adding "hooks" into the set method, like: public string PathToFile { get { return _PathToFile; } set { if (_PathToFile != value && // prevent unnecessary actions OnPathToFileChanging(value)) // allow subclasses to do something or stop the setter { _PathToFile = value; OnPathToFileChanged(); // allow subclasses to do something afterwards OnPropertyChanged("PathToFile"); } } }

    Read the article

  • Keeping dates in order when using date_select and discarding year in Rails?

    - by MikeH
    My app has users who have seasonal products. When a user selects a product, we allow him to also select the product's season. We accomplish this by letting him select a start date and an end date for each product. We're using date_select to generate two sets of drop-downs: one for the start date and one for the end date. Including years doesn't make sense for our model. So we're using the option: discard_year => true To explain our problem, consider that our products are apples. Vendor X carries apples every year from September to January. Years are irrelevant here, and that's why we're using discard_year => true. However, while the specific years are irrelevant, the relative point in time from the start date to the end date is relevant. This is where our problem arises. When you use discard_year => true, Rails does set a year in the database, it just doesn't appear in the views. Rails sets all the years to 0001 in our app. Going back to our apple example, this means that the database now thinks the user has selected September 0001 to January 0001. This is a problem for us for a number of reasons. To solve this, the logic that I need to implement is the following: - If season_start month/date is before season_end month/date, then standard Rails approach is fine. - But, if season_start month/date is AFTER season_end month/date, then I need to dynamically update the database field such that the year for season_end is equal to the year for season_start + 1. My best guess is that I would create a custom method that runs as an after_save or after_update in my products model. But I'm not really sure how to do this. Ideas? Anybody ever had this issue? Thanks!

    Read the article

  • How can I check a type's dependents order to drop them and replace/modify the initial type?

    - by pctroll
    I tried to modify a type using the following code and it gave me the error code: 'ORA-02303'. I don't know much about Oracle or PL/SQL but I need to solve this; so I'd appreciate any further help with this. Thanks in advance. The code is just an example. But then again, I need to check its dependents first. create or replace type A as object ( x_ number, y_ varchar2(10), member procedure to_upper ); /

    Read the article

  • Re-order list in Python to ensure it starts with check values.

    - by S_Swede
    Dear all, I'm reading in serial data using Pyserial, to populate a list of 17 values (1byte each) at a sampling rate of 256Hz. The bytes I ultimately want to use are the 5th to 8th in the list. Providing no bytes are dropped, the first two values of the stream are always the same ('165','90'). I'm getting quite a few dropped values though, and my list values are shifting, so when I read the 5th-8th bytes, they aren't the correct values. I've partially combatted this by ensuring that before the wanted segement is captured, the first few values are checked against what they should be (i.e. if mylist[0]==165 &....). This is crude but ok since the chances of these two values appearing adjacent to each other in the list elsewhere is small. The problem is that this means as soon as the bytes shift, I'm losing a load of values, until it eventually realigns. My question is: what code can I use to either: a) Force the list to realign once it has been detected that it no longer starts with 165,90. (elif....). b) Detect where '165' & '90' are (next to each other) in the list and extract the values I want in relation to their position (next but one, onwards). Thanks in advance S_S Just noticed from the related Qs that I could use mylist.append(mylist.pop(0)) multiple times until they are in the right place. Is there a better way that anyone can suggest?

    Read the article

  • How to iterate javascript object properties in the order they were written.

    - by Jenea
    Hi. I identified a bug in my code which I hope to solve with minimal refactoring effort. This bug occurs in Chrome and Opera browsers. Problem: var obj = {23:"AA",12:"BB"}; //iterating through obj's properties for(i in obj) document.write("Key: "+i +" "+"Value: "+obj[i]); Output in FF,IE Key: 23 Value: AA Key: 12 Value: BB Output in Opera and Chrome (Wrong) Key: 12 Value BB Key: 23 Value AA I attempted to make an inverse ordered object like this var obj1={"AA":23,"BB":12}; for(i in obj1) document.write("Key: "+obj[i] +" "+"Value: "+i); However the output is the same. Is there a way to get for all browser the same behaviour with small changes?

    Read the article

  • Why does Printing from Javascript in Air happen out of order?

    - by Bob Bob
    I am trying to print from an Adobe Air App that embeds an AJAX app. The print function looks like this: function printPage() { asyncSetupForPrint(printCallback); } function asyncSetupForPrint(printCallback) { synchronousMethods(); if (printCallback) printCallback(); } function printCallback() { var pjob = new window.runtime.flash.printing.PrintJob; var psprite = window.htmlLoader; pjob.start(); // etc... } However the print dialog is coming up before the synchronous methods have been executed. Is the AIR JS runtime optimizing something? And if so, is there any way to stop it doing that? (The setup function is doing things like changing the resolution to huge*huge so that the print out looks ok.)

    Read the article

  • How can I decode UTF-16 data in Perl when I don't know the byte order?

    - by Geo
    If I open a file ( and specify an encoding directly ) : open(my $file,"<:encoding(UTF-16)","some.file") || die "error $!\n"; while(<$file>) { print "$_\n"; } close($file); I can read the file contents nicely. However, if I do: use Encode; open(my $file,"some.file") || die "error $!\n"; while(<$file>) { print decode("UTF-16",$_); } close($file); I get the following error: UTF-16:Unrecognised BOM d at F:/Perl/lib/Encode.pm line 174 How can I make it work with decode?

    Read the article

  • Update a list of things without hitting every entry

    - by bobobobo
    I have a list in a database that the user should be able to order. itemname| order value (int) --------+--------------------- salad | 1 mango | 2 orange | 3 apples | 4 On load from the database, I simply order by order_value. By drag 'n drop, he should be able to move apples so that it appears at the top of the list.. itemname| order value (int) --------+--------------------- apples | 4 salad | 1 mango | 2 orange | 3 Ok. So now internally I have to update EVERY LIST ITEM! If the list has 20 or 100 items, that's a lot of updates for a simple drag operation. itemname| order value (int) --------+--------------------- apples | 1 salad | 2 mango | 3 orange | 4 I'd rather do it with only one update. One way I thought of is if "internal Order" is a double value. itemname| order value (double) --------+--------------------- salad | 1.0 mango | 2.0 orange | 3.0 apples | 4.0 SO after the drag n' drop operation, I assign apples has a value that is less than the item it is to appear in front of: itemname| order value (double) --------+--------------------- apples | 0.5 salad | 1.0 mango | 2.0 orange | 3.0 .. and if an item is dragged into the middle somewhere, its order_value is bigger than the one it appears after .. here I moved orange to be between salad and mango: itemname| order value (double) --------+--------------------- apples | 0.5 salad | 1.0 orange | 1.5 mango | 2.0 Any thoughts on better ways to do this?

    Read the article

  • Why IE7 is not respecting the z-index order?

    - by janoChen
    The #cm_sidebarDIV div has z-index 3; The .abouttop and .aboutlist divs have z-index 2 So #cm_sidebarDiv is at the top when it is displayed in Firefox and Chrome but in EI7 it remains at the bottom. #leftmanulist{ background:url("images/abouttop.gif") no-repeat; float: left; margin: 2px 2px 5px 30px; padding:39px 0 0 0; width:237px; } #leftmanulist ul li{line-height:35px;text-align:left; text-decoration:none;} #leftmanulist ul li a{ text-decoration:none;} #leftmanulist ul li:hover{ color:#0068FF;} #leftmanulist ul li a:hover{ color:#0068FF;} #leftmanulist ul li.index{ color:#0068FF;} #leftmanulist ul li.index a{ color:#0068FF;} .abouttop{background:url("images/leftmanulist_z.gif") repeat-y ; padding:0 6px; position:relative; z-index:2; width:237px;} .aboutlist{position:relative;left:28px;} .aboutbutton{background:url("images/leftmanulist_b.gif") no-repeat; width:237px; height:20px; position:relative; top:-17px; z-index:2;} .inword{color:#555555;font-size:0.92em;text-align:justify;line-height:24px;letter-spacing:1px; padding:30px 40px 0px 336px; } #cm_sidebarDIV { z-index: 3; } Any suggestions?

    Read the article

  • How to combine "|" character in run () command in powerbuilder in order to read an txt file as metad

    - by sgian76
    Could you please tell me how to use "pdftk mypdf.pdf dump data | findstr NumberOfPages in powerbuilder run command and save this metadata in a file by using the following code like this: string ls_runinput, ls_outputfile ls_outputfile = "c:\test.exe" ls_runinput = "c:\pdftk\pdftk.exe mypdf.pdf dump_data | findstr NumberOfPages >"+ls_outputfile Run(ls_runinput,Minimized!) li_fileopen = FileOpen(ls_outputfile ,TextMode!, Read!, Shared!) The problem is that Run command is executed, the file is created, but fileopen return -1 ? Is it maybe that run cannot recognize the "|" character? What should you propose me to write the right code? Iam using powerbuilder 10.5.2 , Thanks very much in advance

    Read the article

  • How to split records per hour in order to display them as a chart?

    - by Axel
    Hi, I have an SQL table like this : sales(product,timestamp) I want to display a chart using Open Flash Chart but i don't know how to get the total sales per hour within the last 12 hours. ( the timestamp column is the sale date ) By example i will end up with an array like this : array(12,5,8,6,10,35,7,23,4,5,2,16) every number is the total sales in each hour. Note: i want to use php or only mysql for this. Thanks

    Read the article

  • How to develop Online Shopping Portal Application using PHP ?

    - by Sarang
    I do not know PHP & I have to develop a Shopping Portal with following Definition : Scenario: Online Shopping Portal XYZ.com wants to create an online shopping portal for managing its registered customers and their shopping. The customers need to register themselves first before they do shopping using the shopping portal. However, everyone, whether registered or not, can view the various products along with the prices listed in the portal. The registered customers, after logging in, are allowed to place order for one or more products from the products listed in the portal. Once the order is placed, the customer gets a reference order number and the order status should be “order in process”. The customers can track their order using the given reference number. The management of XYZ.com should be able to modify the order status of a particular reference order number to “shipped” once the products are shipped to the shipping address entered by the customer at the time of placing the order. The Functionalities required are : Create the interface for the XYZ.com shopping portal using HTML/XHTML and CSS. Implement the client side validations using JavaScript. Create the tables using MySQL. Implement the functionality using the server side scripting language, PHP. Integrate all the above tasks and make the XYZ.com shopping portal functional. How do I develop this application with following proper steps of development ?

    Read the article

  • Are there any garanties in JLS about order of execution static initialization blocks?

    - by Roman
    I wonder if it's reliable to use a construction like: private static final Map<String, String> engMessages; private static final Map<String, String> rusMessages; static { engMessages = new HashMap<String, String> () {{ put ("msgname", "value"); }}; rusMessages = new HashMap<String, String> () {{ put ("msgname", "????????"); }}; } private static Map<String, String> msgSource; static { msgSource = engMessages; } public static String msg (String msgName) { return msgSource.get (msgName); } Is there a possibility that I'll get NullPointerException because msgSource initialization block will be executed before the block which initializes engMessages? (about why don't I do msgSource initialization at the end of upper init. block: just the matter of taste; I'll do so if the described construction is unreliable)

    Read the article

  • Optimal Activity Stack Order for a Main Menu button?

    - by kefs
    I'm developing an app that starts with a main menu, and then continues through three different steps (activities) to a final activity where the task is marked complete. On this last activity, i have several additional options (add note, share, etc..) and i also have a return to main menu button. My question is.. how do i stack the activities so that calling finish() on the final activity will return back to the first activity launched? i am currently just starting the new activity via an intent, so pressing back on this screen doesn't return me to home as i would like. Sorry in advance for being so convoluted in my desc

    Read the article

  • How to flatten list of options using higher order functions?

    - by Synesso
    Using Scala 2.7.7: If I have a list of Options, I can flatten them using a for-comprehension: val listOfOptions = List(None, Some("hi"), None) listOfOptions: List[Option[java.lang.String]] = List(None, Some(hi), None) scala> for (opt <- listOfOptions; string <- opt) yield string res0: List[java.lang.String] = List(hi) I don't like this style, and would rather use a HOF. This attempt is too verbose to be acceptable: scala> listOfOptions.flatMap(opt => if (opt.isDefined) Some(opt.get) else None) res1: List[java.lang.String] = List(hi) Intuitively I would have expected the following to work, but it doesn't: scala> List.flatten(listOfOptions) <console>:6: error: type mismatch; found : List[Option[java.lang.String]] required: List[List[?]] List.flatten(listOfOptions) Even the following seems like it should work, but doesn't: scala> listOfOptions.flatMap(_: Option[String]) <console>:6: error: type mismatch; found : Option[String] required: (Option[java.lang.String]) => Iterable[?] listOfOptions.flatMap(_: Option[String]) ^ The best I can come up with is: scala> listOfOptions.flatMap(_.toList) res2: List[java.lang.String] = List(hi) ... but I would much rather not have to convert the option to a list. That seems clunky. Any advice?

    Read the article

  • What should I do in order to be able to work with maven + eclipse + wicket + hibernate + spring in M

    - by spderosso
    I want to create a web app that will use wicket, hibernate and spring frameworks. My IDE of choice is Eclipse, I am using maven for the .war generation and I am running Mac OS. What steps should I follow to correctly install and configure all the tools so as to have a project running that relies on these 3 frameworks. I was able to successfully set up wicket but I am having trouble for setting up hibernate and spring. I went through multiple tutorials but I still couldn't find the solution. Thanks!

    Read the article

  • DirectX: Game loop order, draw first and then handle input?

    - by Ricket
    I was just reading through the DirectX documentation and encountered something interesting in the page for IDirect3DDevice9::BeginScene : To enable maximal parallelism between the CPU and the graphics accelerator, it is advantageous to call IDirect3DDevice9::EndScene as far ahead of calling present as possible. I've been accustomed to writing my game loop to handle input and such, then draw. Do I have it backwards? Maybe the game loop should be more like this: (semi-pseudocode, obviously) while(running) { d3ddev->Clear(...); d3ddev->BeginScene(); // draw things d3ddev->EndScene(); // handle input // do any other processing // play sounds, etc. d3ddev->Present(NULL, NULL, NULL, NULL); } According to that sentence of the documentation, this loop would "enable maximal parallelism". Is this commonly done? Are there any downsides to ordering the game loop like this? I see no real problem with it after the first iteration... And I know the best way to know the actual speed increase of something like this is to actually benchmark it, but has anyone else already tried this and can you attest to any actual speed increase?

    Read the article

  • What's a good algorithm for searching arrays N and M, in order to find elements in N that also exist

    - by GenTiradentes
    I have two arrays, N and M. they are both arbitrarily sized, though N is usually smaller than M. I want to find out what elements in N also exist in M, in the fastest way possible. To give you an example of one possible instance of the program, N is an array 12 units in size, and M is an array 1,000 units in size. I want to find which elements in N also exist in M. (There may not be any matches.) The more parallel the solution, the better. I used to use a hash map for this, but it's not quite as efficient as I'd like it to be. Typing this out, I just thought of running a binary search of M on sizeof(N) independent threads. (Using CUDA) I'll see how this works, though other suggestions are welcome.

    Read the article

< Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >