Search Results

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

Page 103/717 | < Previous Page | 99 100 101 102 103 104 105 106 107 108 109 110  | Next Page >

  • openquery giving differnt results

    - by Mithil Deshmukh
    I have 2 similar queries select * from openquery(powerschool, 'select * from TEACHERS where teachernumber is not null and schoolid=''1050'' and teacherloginid is not null order by teachernumber') and SELECT * from openquery(powerschool, 'SELECT NVL(teachernumber,'''') from TEACHERS where teachernumber is not null and schoolid=''1050'' and teacherloginid is not null order by teachernumber') The first one is giving me 182 rows while the second one gives me 83. What's wrong with the queries?

    Read the article

  • What's the C strategy to "imitate" a C++ template ?

    - by Andrei Ciobanu
    After reading some examples on stackoverflow, and following some of the answers for my previous questions (1), I've eventually come with a "strategy" for this. I've come to this: 1) Have a declare section in the .h file. Here I will define the data-structure, and the accesing interface. Eg.: /** * LIST DECLARATION. (DOUBLE LINKED LIST) */ #define NM_TEMPLATE_DECLARE_LIST(type) \ typedef struct nm_list_elem_##type##_s { \ type data; \ struct nm_list_elem_##type##_s *next; \ struct nm_list_elem_##type##_s *prev; \ } nm_list_elem_##type ; \ typedef struct nm_list_##type##_s { \ unsigned int size; \ nm_list_elem_##type *head; \ nm_list_elem_##type *tail; \ int (*cmp)(const type e1, const type e2); \ } nm_list_##type ; \ \ nm_list_##type *nm_list_new_##type##_(int (*cmp)(const type e1, \ const type e2)); \ \ (...other functions ...) 2) Wrap the functions in the interface inside MACROS: /** * LIST INTERFACE */ #define nm_list(type) \ nm_list_##type #define nm_list_elem(type) \ nm_list_elem_##type #define nm_list_new(type,cmp) \ nm_list_new_##type##_(cmp) #define nm_list_delete(type, list, dst) \ nm_list_delete_##type##_(list, dst) #define nm_list_ins_next(type,list, elem, data) \ nm_list_ins_next_##type##_(list, elem, data) (...others...) 3) Implement the functions: /** * LIST FUNCTION DEFINITIONS */ #define NM_TEMPLATE_DEFINE_LIST(type) \ nm_list_##type *nm_list_new_##type##_(int (*cmp)(const type e1, \ const type e2)) \ {\ nm_list_##type *list = NULL; \ list = nm_alloc(sizeof(*list)); \ list->size = 0; \ list->head = NULL; \ list->tail = NULL; \ list->cmp = cmp; \ }\ void nm_list_delete_##type##_(nm_list_##type *list, \ void (*destructor)(nm_list_elem_##type elem)) \ { \ type data; \ while(nm_list_size(list)){ \ data = nm_list_rem_##type(list, tail); \ if(destructor){ \ destructor(data); \ } \ } \ nm_free(list); \ } \ (...others...) In order to use those constructs, I have to create two files (let's call them templates.c and templates.h) . In templates.h I will have to NM_TEMPLATE_DECLARE_LIST(int), NM_TEMPLATE_DECLARE_LIST(double) , while in templates.c I will need to NM_TEMPLATE_DEFINE_LIST(int) , NM_TEMPLATE_DEFINE_LIST(double) , in order to have the code behind a list of ints, doubles and so on, generated. By following this strategy I will have to keep all my "template" declarations in two files, and in the same time, I will need to include templates.h whenever I need the data structures. It's a very "centralized" solution. Do you know other strategy in order to "imitate" (at some point) templates in C++ ? Do you know a way to improve this strategy, in order to keep things in more decentralized manner, so that I won't need the two files: templates.c and templates.h ?

    Read the article

  • Help understand difference in sql query

    - by Anil Namde
    Select user_name [User Name], first_name [First Name], last_name [Last Name] Form tab_user ORDER BY user_name Select user_name [User Name], first_name [First Name], last_name [Last Name] Form tab_user ORDER BY User Name Above are the two queries, Is there any difference because of the user_name used instead of User Name Is there something that should be taken care/worried when using something like this.

    Read the article

  • Performance with timestamp conditions

    - by Tim Whitlock
    Which of the following is faster, or are they equivalent? (grabbing recent most records from a TIMESTAMP COLUMN) SELECT UNIX_TIMESTAMP(`modified`) stamp FROM `some_table` HAVING stamp > 127068799 ORDER BY stamp DESC or SELECT UNIX_TIMESTAMP(`modified`) stamp FROM `some_table` WHERE UNIX_TIMESTAMP(`modified`) > 127068799 ORDER BY `modified` DESC or even another combination?

    Read the article

  • How to define variable for Trac TicketQuery?

    - by JOM
    Using TRAC TicketQuery template for sprint to show what's going on. How would I type name of current sprint only ONCE, when template needs it in multiple location? For example "Sprint1" is needed is 6 places: = New items = [[TicketQuery(milestone=Sprint1,status=new,format=table,order=priority,col=id|summary|priority|component|owner|type)]] = Items in progress = [[TicketQuery(milestone=Sprint1,status=in_progress,format=table,order=priority,col=id|summary|priority|component|owner|type)]]

    Read the article

  • SQL Update with row_number()

    - by user609511
    i m using SQL Server 2008 R2. i want to update my column CODE_DEST with increment number CODE_DEST RS_NOM null qsdf null sdfqsdfqsdf null qsdfqsdf what i want: CODE_DEST RS_NOM 1 qsdf 2 sdfqsdfqsdf 3 qsdfqsdf i have try this: update DESTINATAIRE_TEMP set CODE_DEST = TheId FROM (SELECT Row_Number() OVER (ORDER BY [RS_NOM]) as TheId from DESTINATAIRE_TEMP) not work because of ) and this With DESTINATAIRE_TEMP As ( SELECT ROW_NUMBER() OVER (ORDER BY [RS_NOM] DESC) AS RN FROM DESTINATAIRE_TEMP ) UPDATE DESTINATAIRE_TEMP SET CODE_DEST=RN because of union

    Read the article

  • Reflecting actionscript objects

    - by Chin
    Is it possible to reflect an object in actionscript and get the property names back in the order they are positioned in the class? I have tried the following var reflectionObject : Object = ObjectUtil.getClassInfo(obj); var propsArray : Array = reflectionObject.properties; (orders alphabetically) var typeInfo:XML = describeType(obj) (Not sure what order this is)

    Read the article

  • How to use Linq to select and group complex child object from a parents list.

    - by Daoming Yang
    How to use Linq to select and group complex child object from a parents list. I have an OrderList each of order object has a OrderProductVariantList(OrderLineList), and each of OrderProductVariant object has ProductVariant, and then the ProductVariant object will have a Product object which contains product information. My goal is to select and group the most popular products from the order list. Can anyone help me with this? Many thanks.

    Read the article

  • objective C convert NSString to unsigned

    - by user1501354
    I have changed my question. I want to convert an NSString to an unsigned int. Why? Because I want to do parallel payment in PayPal. Below I have given my coding in which I want to convert the NSString to an unsigned int. My query is: //optional, set shippingEnabled to TRUE if you want to display shipping //options to the user, default: TRUE [PayPal getPayPalInst].shippingEnabled = TRUE; //optional, set dynamicAmountUpdateEnabled to TRUE if you want to compute //shipping and tax based on the user's address choice, default: FALSE [PayPal getPayPalInst].dynamicAmountUpdateEnabled = TRUE; //optional, choose who pays the fee, default: FEEPAYER_EACHRECEIVER [PayPal getPayPalInst].feePayer = FEEPAYER_EACHRECEIVER; //for a payment with multiple recipients, use a PayPalAdvancedPayment object PayPalAdvancedPayment *payment = [[PayPalAdvancedPayment alloc] init]; payment.paymentCurrency = @"USD"; // A payment note applied to all recipients. payment.memo = @"A Note applied to all recipients"; //receiverPaymentDetails is a list of PPReceiverPaymentDetails objects payment.receiverPaymentDetails = [NSMutableArray array]; NSArray *emailArray = [NSArray arrayWithObjects:@"[email protected]",@"[email protected]", nil]; for (int i = 1; i <= 2; i++) { PayPalReceiverPaymentDetails *details = [[PayPalReceiverPaymentDetails alloc] init]; // Customize the payment notes for one of the three recipient. if (i == 2) { details.description = [NSString stringWithFormat:@"Component %d", i]; } details.recipient = [NSString stringWithFormat:@"%@",[emailArray objectAtIndex:i-1]]; unsigned order; if (i==1) { order = [[feeArray objectAtIndex:0] unsignedIntValue]; } if (i==2) { order = [[amountArray objectAtIndex:0] unsignedIntValue]; } //subtotal of all items for this recipient, without tax and shipping details.subTotal = [NSDecimalNumber decimalNumberWithMantissa:order exponent:-4 isNegative:FALSE]; //invoiceData is a PayPalInvoiceData object which contains tax, shipping, and a list of PayPalInvoiceItem objects details.invoiceData = [[PayPalInvoiceData alloc] init]; //invoiceItems is a list of PayPalInvoiceItem objects //NOTE: sum of totalPrice for all items must equal details.subTotal //NOTE: example only shows a single item, but you can have more than one details.invoiceData.invoiceItems = [NSMutableArray array]; PayPalInvoiceItem *item = [[PayPalInvoiceItem alloc] init]; item.totalPrice = details.subTotal; [details.invoiceData.invoiceItems addObject:item]; [payment.receiverPaymentDetails addObject:details]; } [[PayPal getPayPalInst] advancedCheckoutWithPayment:payment]; Can anybody tell me how to do this conversion? Thanks and regards in advance.

    Read the article

  • find and replace tokens in javascript

    - by Sourabh
    Hello, I have to do something like this string = " this is a good example to show" search = array {this,good,show} find and replace them with a token like string = " {1} is a {2} example to {3}" (order is intact) the string will undergo some processing and then string = " {1} is a {2} numbers to {3}" (order is intact) tokens are again replaced back to the string likem so that the string becomes string = " this is a good number to show" How should it be implemented so that the process is done at high performance ? Thanks in advance.

    Read the article

  • Appengine filter inequality and ordering fails

    - by davezor
    I think I'm overlooking something simple here, I can't imagine this is impossible to do. I want to filter by a datetime attribute and then order the result by a ranking integer attribute. When I try to do this: query.filter("submitted >=" thisweek).order("ranking") I get the following: BadArgumentError: First ordering property must be the same as inequality filter property, if specified for this query; received ranking, expected submitted Huh? What am I missing? Thanks.

    Read the article

  • Android Restart a Service

    - by xger86x
    I have the following question: I start my activity and i call bindService in order to start a service which in background downloads data from an API. When it finish, it calls stopSelf(). But if i want to call again bindService in my Activity in order to download other data, nothing happens. Any idea?

    Read the article

  • How to get N random string from a {a1|a2|a3} format string?

    - by Pentium10
    Take this string as input: string s="planets {Sun|Mercury|Venus|Earth|Mars|Jupiter|Saturn|Uranus|Neptune}" How would I choose randomly N from the set, then join them with comma. The set is defined between {} and options are separated with | pipe. The order is maintained. Some output could be: string output1="planets Sun, Venus"; string output2="planets Neptune"; string output3="planets Earth, Saturn, Uranus, Neptune"; string output4="planets Uranus, Saturn";// bad example, order is not correct Java 1.5

    Read the article

  • Selecting by ID in Castle ActiveRecord

    - by ripper234
    How can I write a criteria to return all Orders that belong to a specific User? public class User { [PrimaryKey] public virtual int Id { get; set; } } public class Order { [PrimaryKey] public virtual int Id { get; set; } [BelongsTo("UserId")] public virtual User User { get; set; } } return ActiveRecordMediator<Order>.FindAll( // What criteria should I write here ? );

    Read the article

  • How to redirect a form's get variables with IIS7

    - by Gareth
    Is it possible (and if so how) to redirect the url from a forms get variables into something more url friendly using IIS 7's URL Rewrite module. An example would be /Catalog/Search/Title=Something&Order=Price into /Catalog/Search/Title/Something/Order/Price Thanks for any suggestions

    Read the article

  • OpenCL C/C++ dynamic binding library (win32 and more)

    - by rotoglup
    I'm giving a try at OpenCL, and in order to put this in production I'd like to be able to bind dynamically to OpenCL.DLL (when under Windows), in order to handle 'gracefully' the case where no OpenCL is installed on the host computer. Is there any available library (or code snippet) that takes care of this dynamic binding in C or C++, much like GLEW does for OpenGL ? I'd like to avoid the hassle to do it myself. Thanks,

    Read the article

  • Resources (resx) maintenance in big projects

    - by exalted
    In a big project where you have lots of resources (resx) what would be the right approaches and/or tools of translation in order to save time, at the same time keep everything in order and leave nothing behind. More precisely, how to find (as far as translations are concerned) what has been modified (adds and removes are easy) of an entire .NET application from a previous version to another? Would resx technology help you there? How?

    Read the article

  • Eclipse "Add unimplemented methods" method ordering

    - by Steve Kuo
    Eclipse has a feature "Add unimplemented methods" that adds the unimplemented methods for a class (such as when implementing an interface). When Eclipse adds the methods it adds them in alphabetical order. Is there a way to configure Eclipse to add them in the order that they appear in the interface (or abstract class)?

    Read the article

  • Multiset without Compare?

    - by nimcap
    I want to use multiset to count some custom defined keys. The keys are not comparable numerically, comparing two keys does not mean anything, but their equality can be checked. I see that multiset template wants a Compare to order the multiset. The order is not important to me, only the counts are important. If I omit Compare completely what happens? Does multiset work without any problems for my custom keys?

    Read the article

  • Biztalk - how do I set up MSMQ load balancing and high availability ?

    - by FullOfQuestions
    Hi, From what I understand, in order to achieve MSMQ load-balancing, one must use a technology such as NLB. And in order to achieve MSMQ high-availability, one must cluster the related Biztalk Host (and hence the underlying servers have to be in a cluster themselves). Yet, according to Microsoft Documentation, NLB and FailOver Clustering technologies are not compatible. See this link for reference: http://support.microsoft.com/kb/235305 Can anyone PLEASE explain to me how MSMQ load-balancing and high-availability can be achieved? thank you in advance, M

    Read the article

  • information need to display below in Form using Swing

    - by vamshikpd
    Hi All, I am using SunJavaStudio Enterprise 8 , using swing framework I created form,In form I added Jlable,JFormattedTextfield,Jpanle1,Jpanel2 and Jpanel3 in order wise.I am using GridBag layout.Above order displayed in form first line onwards, I want , In Form ,above will some gap and middle layer display the added fields . how to arrange the Form? Please help me,its urgent

    Read the article

  • Sanitize file_get_contents

    - by Luis
    I want to use file_get_contents to implement a proxy so I can do ajax cross domain requests. Querystring will be used to supply the URL to file_get_contents. Now the problem is people can muck around with the qurystring in order to read local files on the server. I dont wnat this. Can someone get me a function to sinitize the querystring in order only to accept urls and not local files: ie: ?url=http://google.com.au - OK ?url=./passwords.txt - Not OK

    Read the article

< Previous Page | 99 100 101 102 103 104 105 106 107 108 109 110  | Next Page >