Search Results

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

Page 127/717 | < Previous Page | 123 124 125 126 127 128 129 130 131 132 133 134  | Next Page >

  • return to merchent problme in paypal.

    - by Avinash
    Hi, I am using paypal standard as my payment gateway. My problem is that, in Paypal Standard payment method, I have done my code as below: When user click on return to merchant button from paypal then user return to the site with order data , and on that page my order entry will be inserted in my DB. So my problem occur when someone pays but don't click on return to merchant link. So in this case customer gets paid, but due to no entry my DB its not working proper. Hope I am clear to all. Thanks Avinash

    Read the article

  • ruby on rails, searchlogic and refactoring

    - by JohnMerlino
    Hey all, I'mt not too familiar with searchlogic plugin for rails (I did view the railscasts but wasn't helpful in relation to the specific code below). Can anyone briefly describe how it is being used in the three methods below? Thanks for any response. def extract_order @order_by = if params[:order].present? field = params[:order].gsub(".", "_") field = field.starts_with?('-') ? 'descend_by_'+field[1..-1] : 'ascend_by_'+field field.to_sym else # Workaround 'searchlogic'.to_sym end end def find_resources @search_conditions = params[:search_conditions] || {} # See http://www.binarylogic.com/2008/11/30/searchlogic-1-5-7-complex-searching-no-longer-a-problem/ @resources = @resource_model.send(@order_by).searchlogic(:conditions => @search_conditions) end def apply_filters f = filter_by f.each do |filter_field| filter_constraints = params[filter_field.to_sym] if filter_constraints.present? # Apply searchlogic's scope @resources.send(filter_field,filter_constraints) end end end

    Read the article

  • How do I sort a hash table in javascript?

    - by Colen
    I have a javascript hash table, like so: var things = [ ]; things["hello"] = {"name" : "zzz I fell asleep", "number" : 7}; things["one"] = {"name" : "something", "number" : 18}; things["two"] = {"name" : "another thing", "number" : -2}; I want to sort these into order by name, so if I iterate through the hash table it will go in order another thing something zzz I fell asleep I tried doing this: function compareThings(thing1, thing2) { var name1 = thing1["name"].toLowerCase(); var name2 = thing2["name"].toLowerCase(); if (name1 < name2) { return -1; } if (name1 > name2) { return 1; } return 0; } things.sort(compareThings); But it doesn't seem to work. Edit: it occurs to me that perhaps a sorted hash table is an oxymoron. If so, what's the best way to get access to a sorted list of the things here?

    Read the article

  • Rows dropping when I try to join data from two tables

    - by blcArmadillo
    I have a fairly simple query I'm try to write. If I run the following query: SELECT parts.id, parts.type_id FROM parts WHERE parts.type_id=1 OR parts.type_id=2 OR parts.type_id=4 ORDER BY parts.type_id; I get all the rows I expect to be returned. Now when I try to grab the parent_unit from another table with the following query six rows suddenly drop out of the result: SELECT parts.id, parts.type_id, sp.parent_unit FROM parts, serialized_parts sp WHERE (parts.type_id=1 OR parts.type_id=2 OR parts.type_id=4) AND sp.parts_id = parts.id ORDER BY parts.type_id In the past I've never really dealt with ORs in my queries so maybe I'm just doing it wrong. That said I'm guessing it's just a simple mistake. Let me know if you need sample data and I'll post some. Thanks.

    Read the article

  • Need to upload files to google docs from my application and store reference to the uploaded file...

    - by Ali
    Hi guys - I'm working on a basic google applications based system. Like I earlier defined I'm building a simple ordering system and to each order placed I attach a file or document. I would like to be able to set it such that whatever file I upload is uploaded into google docs and I somehow am able to maintain a reference to that file from my own application i.e these files are concerned with such and such order. My application is google application based hopefully and I'm building it to be such for later on deployment into the cloud. How do I start on this and what do I need to do? Are there already working widgets I can use and apply or would I need to create my own customised solution for this? I'm working in Php MySQL.

    Read the article

  • What should I learn after HTML and CSS?

    - by Ryan B
    I am 5 days into learning how to make my website, flying through my HTML & CSS book and having fun. I’m starting to consider what to order next. I’m not sure what to study next, so please give me some advice if you can. My end goal is to create a site that has a lot of the functionality that www.edufire.com and similar sites have, just for example. I think I’m learning well with the Head First Series, and the style will probably serve me well as an intro to programming. However, I don't think the books dive too deeply into any 1 subject. I could order: A: Head First Programming: A Learner’s Guide to Programming Using the Python Language B: Head First Javascript C: Head First PHP & MySQL D: a different programming book or E: another CSS or design book to solidify my basic HTML & CSS skills Any guidance would be appreciated. Thanks!

    Read the article

  • How to use sum and count functions

    - by Odette
    hi guys I am trying to get the total count and total sum per salesperson but its not working in my WITH query Currently I have: WITH CALC1 AS (SELECT B.OTSMAN AS SALESMAN, COUNT(B.ONINUM) AS COUNT, SUM(B.OVSVAL) AS SVAL FROM @[email protected] AS B WHERE B.OCSGRP <> 'INT' AND B.OCSGRP <> 'INX' AND B.OCPSBR IN (@OCPSBR@) AND B.ICMATX <> '705' AND B.OCSGRP NOT LIKE 'S/%' GROUP BY B.OTSMAN, B.ONINUM ORDER BY B.OTSMAN ASC) SELECT SALESMAN, COUNT, SVAL FROM CALC1 ORDER BY SALESMAN THE RESULT IS: AM 1 79.03 AM 40 1337.70 AM 48 4627.15 AM 42 2727.40 AM 1 111.79 AM 1 1110.00 AM 52 3018.77 How do i change my query so I only get one record with the total count and value per salesperson? AM 1 13,011.84

    Read the article

  • problem with filtering the dropdownlist in scroll window

    - by Rahul
    Hi all, Problem with filtering Dropdown list. The scenario is : in scroll window there are two fields Document types and type id: Document type is Dropdown list: As per document type selection type id look should display the values. For ex. If I select quote type from document type and if I open type id look up it should display only quotation in the look window. It should work for all the values of document type drop down list values. Its working fine. The item in the document types are: Quote, Order, Invoice, Return, BackOrder. The problem is after saving the data when I am displaying the same record in scroll window, suppose after displaying document type is QUOTE and document id is QTOARD, and in this position I am changing the document type from dropdown QUOTE to ORDER at this time warning message should c ome this range entered is in valid. Because in database table there is no document QTOARD for ORDER type. The same should work for all the condition. The table name is SOP_ID_Setp and key is SOP Type and DocumentID. For that I have written the Stored procedure : create procedure DocTypeFilter @DocumentType as int, @DocumentID as varchar(30) as --declare --@documentype int, --@documentID varchar(30), select * from sop40200 where soptype=@DocumentType and docid=@DocumentID and I have called this SP in Dropdownlist change event. local long retcode; range clear table SOP_ID_SETP; clear field 'SOP Type' of table SOP_ID_SETP; clear field 'Document ID' of table SOP_ID_SETP; range start table SOP_ID_SETP; fill field 'SOP Type' of table SOP_ID_SETP; fill field 'Document ID' of table SOP_ID_SETP; range end table SOP_ID_SETP; if err()=OKAY then call DocTypeFilter,retcode,'Document Type' of window 'Is_Document Type Site_Scroll','Document ID' of window 'Is_Document Type Site_Scroll'; else warning "The range entered is invalid"; clear window 'Is_Document Type Site_Scroll'; fill window 'Is_Document Type Site_Scroll' table is_sop_site_line_temp; end if; Above code not giving the expected output any help pls.

    Read the article

  • Mix RGB colors (L*a*b*)

    - by Samuel
    Hello! Basically I want two mix two colours color1 and color2. Since simple calculation's bring up stuff like blue+yellow = grey ((color1.r + color2.r)/2 etc) i did some research and found that apparently mixing colors in order for the mixed color to look like we expect it too (e.g. blue+yellow = green) isn't that straight forward. What another stackoverflow post taught me was that in order two achieve the mixture correctly i'd have to use the L*a*b* space / CIELAB and linked to the wikipedia page about this topic. I found it informative but i couldn't really understand how to convert RGB to (sRGB and than to) L*a*b* - how to mix the obtained colors and how to convert back I hope somebody here can help me Thanks, Samuel

    Read the article

  • Recording user data for heatmap with javascript

    - by Hanpan
    Hi, I was wondering how sites such as crazyegg.com store user click data during a session. Obviously there is some underlying script which is storing each clicks data, but how is that data then populated into a database? It seems to me the simple solution would be to send data via AJAX but when you consider that it's almost impossible to get a cross browser page unload function setup, I'm wondering if there is perhaps some other more advanced way of getting metric data. I even saw a site which records each mouse movement and I am guessing they are definitely not sending that data to a database on each mouse move event. So, in a nutshell, what kind of technology would I need in order to monitor user activity on my site and then store this information in order to create metric data? I am not looking to recreate GA, I'm just very interested to know how this sort of thing is done. Thanks in advance

    Read the article

  • UISegmentedControl register taps on selected segment

    - by Jongsma
    Hi, I have a segmented control where the user can select how to order a list. Works fine. However, I would like that when an already selected segment is tapped, the order gets inverted. I have all the code in place, but I don't know how to register the taps on those segments. It seems the only control event you can use is UIControlEventValueChanged, but that isn't working (since the selected segment isn't actually changing). Is there a solution for this? And if so, what is it? Thanks in advance!

    Read the article

  • Interpolation of scattered data: What could I do?

    - by Simon
    Hi! I need your help. I'm working on a 3D chart in Java using Java 3D. It should be able to display a bunch of measured values. As measured, the data I get is scattered. This means I will have to interpolate the missing points in order to get my surface plotted nicely. I didn't study all that 3D-Geometry stuff yet and I don't know where to start. My idea is to triangulate the points to a surface and then, based on the triangulation, interpolate the missing points. (see this to have a rough idea of what I want to achieve) Does someone have experiences with the interpolation of scattered data? Is my approach the right one? If yes, what kind of data structures and algorithms will I need in order to triangulate my points cloud?

    Read the article

  • Is this a violation of the single responsiblity principle?

    - by L. Moser
    I have the following method and interface: public object ProcessRules(List<IRule> rules) { foreach(IRule rule in rules) { if(EvaluateExpression(rule.Exp) == true) return rule.Result; } //Some error handling here for not hitting any rules } public interface IRule { Expression Exp; Object Result; int Precedence; } Because rules have a precedence, they should actually never be processed out of order. This leads me with (I think) three solutions: Sort rules before passing them into the evaluator. Change the parameter type to something that enforces a sort order. Sort within the evaluator. I like option 3 because it always ensures that it is sorted and I like option 1 because it seems more cohesive. And option 2 seems like a good compromise. Is a scenario like this context specific/subjective, or is there really a best practice to be applied here?

    Read the article

  • Am I using EJBs properly?

    - by kgrad
    I am using a JEE6 stack including JPA 2.0, JSF 2.0, EJB 3.1 etc. The way my architecture is setup is the following: I have JPA annotated DAOs using hibernate as my JPA provider. I have JSF Managed beans which correspond to my facelet/xhtml pages. I have EJBs that handle all of my database requests. My XHTML pages have JSF EL which make calls to my Managed beans. My managed beans contain references to my DAO entities which are managed by EJBs. For example, I have a user entity which is mapped to a db table. I have a user EJB which handles all CRUD operations that return Users. I have a page that edits a user. The highlevel workflow would be: navigate to user edit page - EL calls a method located in the managed bean that loads a user. The method calls userEJB.loadUser(user) from the EJB to get the user from the database. The user is edited and submit - a function is called in the managed bean which calls a function in the EJB to save the user. etc. I am running into issues accessing my data within my JSF pages using EJBs. I am having a lot of problems with lazy initialization errors, which I believe is due to how I have set things up. For example, I have a Client entity that has a List of users which are lazily loaded. In order to get a client I call a method in my EJB which goes to the database, finds a client and returns it. Later on i wish to access this clients list of users, in order to do so i have to go back to the EJB by calling some sort of method in order to load those users (since they are lazily loaded). This means that I have to create a method such as public List<User> getUserListByClient(Client c) { c = em.merge(c); return c.getUserList(); } The only purpose of this method is to load the users (and I'm not even positive this approach is good or works). If i was doing session management myself, I would like just leave the session open for the entire request and access the property directly, this would be fine as the session would be open anyway, there seems to be this one extra layer of indirection in EJBs which is making things difficult for me. I do like EJBs as I like the fact that they are controlled by the container, pooled, offer transaction management for free etc. However, I get the feeling that I am using them incorrectly, or I have set up my JSF app incorrectly. Any feedback would be greatly appreciated. thanks,

    Read the article

  • How do I parse boolean logic?

    - by d03boy
    I need to write a boolean logic parser which will translate the boolean logic language to a SQL WHERE clause. The order of the operands will always be in the correct order (with value on the right). Here is a relatively simple example. There could be nested parentheses and the use of NOT operators, etc. (CACOUNT=01 OR CACOUNT=02 OR CACOUNT=03 OR CACOUNT=05 OR CACOUNT=07 OR CACOUNT=09 OR CACOUNT=12 OR CACOUNT=13 OR CACOUNT=18) AND Q4=1 AND NAME=TIMOTHY Here is what the WHERE clause would resemble. WHERE ( EXISTS ( SELECT 1 FROM MyVerticalTable b WHERE b.Key=a.Key AND b.Key='CACOUNT' AND b.Value='01' ) )

    Read the article

  • PyQt: How to keep QTreeView nodes correctly expanded after a sort

    - by taynaron
    I'm writing a simple test program using QTreeModel and QTreeView for a more complex project later on. In this simple program, I have data in groups which may be contracted or expanded, as one would expect in a QTreeView. The data may also be sorted by the various data columns (QTreeView.setSortingEnabled is True). Each tree item is a list of data, so the sort function implemented in the TreeModel class uses the built-in python list sort: self.layoutAboutToBeChanged.emit() self.rootItem.childItems.sort(key=lambda x: x.itemData[col], reverse=order) for item in self.rootItem.childItems: item.childItems.sort(key=lambda x: x.itemData[col], reverse=order) self.layoutChanged.emit() The problem is that whenever I change the sorting of the root's child items (the tree is only 2 levels deep, so this is the only level with children) the nodes aren't necessarily expanded as they were before. If I change the sorting back without expanding or collapsing anything, the nodes are expanded as before the sorting change. Can anyone explain to me what I'm doing wrong? I suspect it's something with not properly reassigning QModelIndex with the sorted nodes, but I'm not sure.

    Read the article

  • How can I loop through posts as well as child pages to display them all by date in Wordpress 2.9

    - by Craig Dennis
    Some background info -- In wordpress I have my portfolio as a parent page with each item of work a child page. I also have a blog. I want to display the most recent 6 items on the homepage whether they are from my portfolio or my blog. I have a loop that displays the posts and on another page I have a loop that displays the child pages of a specific parent page. I only need to display the_title and the_post_thumbnail. Is it possible to loop through both the posts and the child pages and display them in order of date (recent first). So the final display would be a mixture of posts and child pages. Could it be done by having a separate loop for pages and one for posts, then somehow adding the results to an array and then pull them out in date order (recent first). Any help would be greatful. Thanks

    Read the article

  • Datamodel for a MVC learning project

    - by Dofs
    Hi, I am trying to learn Microsoft MVC 2, and have in that case found a small project I wanted to deploy it on. My idea was to simulate a restaurant where you can order a table. Basics: A user can only reserve a full table, so I don't have the trouble of merging people on different tables. A person can order a table for a certain amount of hours. My question was how I could make the data model the smartest way. I thought of just having a my database like this: Table { Id, TableName } Reservations { Id TableId ReservedFrom ReservedTo UserId } User { UserId UserName ... } By doing it this way I would have to program a lot of the logic in e.g. the business layer, to support which tables are occupied at what time, instead of having the data model handle it. Therefore do you guys have a better way to do this?

    Read the article

  • Delphi - How to register a custom form...

    - by durumdara
    Hi! D6 Prof. Because of Z-Order problem I created a new form. I want to register this custom form in Delphi, to I can use it as normal form, and to I can replace my forms with this - to avoid Z-Order problems. But I don't know, how to do it. I created the class, but how to register? How to force Delphi to show it under "New..." menu? Thanks for your help: dd

    Read the article

  • Need an algorithm to group several parameters of a person under the persons name

    - by QuickMist
    Hi. I have a bunch of names in alphabetical order with multiple instances of the same name all in alphabetical order so that the names are all grouped together. Beside each name, after a coma, I have a role that has been assigned to them, one name-role pair per line, something like whats shown below name1,role1 name1,role2 name1,role3 name1,role8 name2,role8 name2,role2 name2,role4 name3,role1 name4,role5 name4,role1 ... .. . I am looking for an algorithm to take the above .csv file as input create an output .csv file in the following format name1,role1,role2,role3,role8 name2,role8,role2,role4 name3,role1 name4,role5,role1 ... .. . So basically I want each name to appear only once and then the roles to be printed in csv format next to the names for all names and roles in the input file. The algorithm should be language independent. I would appreciate it if it does NOT use OOP principles :-) I am a newbie.

    Read the article

  • SQL to retrieve the latest records, grouping by unique foreign keys

    - by jbox
    I'm creating query to retrieve the latest posts in a forum using a SQL DB. I've got a table called "Post". Each post has a foreign key relation to a "Thread" and a "User" as well as a creation date. The trick is I don't want to show two posts by the same user or two posts in the same thread. Is it possible to create a query that contains all this logic? # Grab the last 10 posts. SELECT id, user_id, thread_id FROM posts ORDER BY created_at DESC LIMIT 10; # Grab the last 10 posts, max one post per user SELECT id, user_id, thread_id FROM post GROUP BY user_id ORDER BY date DESC LIMIT 10; # Grab the last 10 posts, max one post per user, max one post per thread???

    Read the article

  • How do I get a screenshot of a given website using C#

    - by Ender
    I'm writing a specialised crawler and parser for internal use and I require the ability to take a screenshot of a web page in order to check what colours are being used throughout. The program will take in around ten web addresses and will save them as a bitmap image, from there I plan to use LockBits in order to create a list of the five most used colours within the image. To my knowledge it's the easiest way to get the colours used within a web page but if there is an easier way to do it please chime in with your suggestions. Anyway, I was going to use this program until I saw the price tag. I'm also fairly new to C#, having only used it for a few months. Can anyone provide me with a solution to my problem of taking a screenshot of a web page in order to extract the colour scheme? EDIT: Sorry for not getting back to this sooner, but I've been busy with some other things. Anyway, the code seems to work well, but the problem I am having right now is that I am running it within a form, and naturally with Application.Run() being called I cannot run two instances of the same form at once. It recommended Form.showDialog() but that broke everything. Can anyone give me a hand with this code? public static void buildScreenshotFromURL(string url) { int width = 800; int height = 600; using (WebBrowser browser = new WebBrowser()) { browser.Width = width; browser.Height = height; browser.ScrollBarsEnabled = true; // This will be called when the page finishes loading browser.DocumentCompleted += new System.Windows.Forms.WebBrowserDocumentCompletedEventHandler(OnDocumentCompleted); //browser.DocumentCompleted += OnDocumentCompleted; browser.Navigate(url); // This prevents the application from exiting until // Application.Exit is called // Application.Run() does not work as it cannot be called twice, recommended form.showDialog() // but still issues Application.Run(); } } public static void OnDocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { // Define size of thumbnail neded int thumbSize = 50; // Now that the page is loaded, save it to a bitmap WebBrowser browser = (WebBrowser)sender; using (Graphics graphics = browser.CreateGraphics()) { using (Bitmap bitmap = new Bitmap(browser.Width, browser.Height, graphics)) { Rectangle bounds = new Rectangle(0, 0, bitmap.Width, bitmap.Height); browser.DrawToBitmap(bitmap, bounds); Bitmap thumbBitmap = new Bitmap(bitmap.GetThumbnailImage(thumbSize, thumbSize, thumbCall, IntPtr.Zero)); thumbBitmap.Save("screenshot.png", ImageFormat.Png); handleImage(thumbBitmap); } }

    Read the article

< Previous Page | 123 124 125 126 127 128 129 130 131 132 133 134  | Next Page >