Search Results

Search found 9706 results on 389 pages for 'aggregate functions'.

Page 26/389 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • Fetch Products Grouped By Total Sales ?

    - by David
    Hi, I have the following MySQL tables: TABLE: Products ---------------------- id | productname 1030 | xBox 360 1031 | PlayStation 3 1032 | iPod Touche TABLE: Sales ---------------------- productid | saledate 1031 | 2010-06-14 06:30:12 1031 | 2010-06-14 08:54:38 1030 | 2010-06-14 08:58:10 1032 | 2010-06-14 10:12:47 I want to fetch using php the products i sold today and groupe them by sales number and order by sale date (if possible) , example of Output: Today's statistics: -Playstation 3 (2 sales) -Xbox 360 (1 sale) -iPod Touche (1 sale) Thanks

    Read the article

  • javascript: what are immediate functions used for [duplicate]

    - by tkoomzaaskz
    This question already has an answer here: Why using self executing function in JavaScript? [duplicate] 4 answers I've been programming in JS since some time, but I have never came upon a need of using immediate functions, for example: (function(){ console.log('hello, I am an immediate function'); }()) What would be the difference if I just wrote: console.log('hello, I am an immediate function'); ? I don't have any access to this function anyway (it is not assigned anywhere). I think (but I'm not sure) that I can implement everything without immediate functions - so why do people use it?

    Read the article

  • list all functions on CRAN

    - by baptiste
    Suppose I'm trying to run a script of unknown origin, and one of the functions is from a package that is not loaded by the script (an oversight, maybe it was loaded in the .Rprofile of the person who wrote it). How can I find in which package this function resides? There's some information compiled on CRAN, that doesn't require the user to download/install all R packages locally; however as far as I could tell it only gives access to the DESCRIPTION files. RSiteSearch, and its web equivalent, seem to access an online database of all CRAN packages, where presumably a list of all functions would be available. Is there some way of accessing this information? Thanks. Edit: I know sos::findFn, utils::RSiteSearch and search.r-project; what I would like is to get the raw data that these tools use.

    Read the article

  • PHP: Classes to use functions from each other?

    - by Martti Laine
    Hello I've been into this problem for a while already, and have asked some questions about it here Stackoverflow. I've got some advice, but I just can't understand it. Could someone provide me an example of classes working smoothly together. I have 3 (maybe more) classes: mysql user alerts As I said, could someone provide an example, so these classes could use functions from each other class, e.g. user could use mysql's functions. I'm asking for an simple example, for learning-purposes. And please, no google-suggestions or links to other questions. I've tried to search this for a while already. No success, though. Martti Laine

    Read the article

  • Single C++/CLI method to wrap many type specific C functions

    - by T33C
    I am wrapping a C library using C++/CLI so that the C library can be used easily from C# in a C#'ish way. Some of the functions in this library are for putting a value into a container. There are no generics in C so there exists a function per type CLIB_SetBool(BOOL value), CLIB_SetInt(int value), CLIB_SetString(char* string) and so on. To make it easier to use from C#, I have created a single Set function which takes a System::Object. I have two related questions: With my method how would you use a switch statement on the type of System::Object to call the correct CLIB_Setxxxx function. [typeid is only for unmanaged code and I can't seem to use GetType.] Is there a better way to wrap these functions like using a Generic? [I started using template specialisation but then realised that C# doesn't see templates.] Thanks.

    Read the article

  • const member functions can call const member functions only?

    - by Abhi
    Hi all. Do const member functions call only const member functions? class Transmitter{ const static string msg; mutable int size; public: void xmit() const{ size = compute(); cout<<msg; } private: int compute() const{return 5;} }; string const Transmitter::msg = "beep"; int main(){ Transmitter t; t.xmit(); return EXIT_SUCCESS; } If i dont make compute() a const, then the compiler complains. Is it because since a const member function is not allowed to modify members, it wont allow any calls to non-consts since it would mean that the const member function would be 'indirectly' modifying the data members?

    Read the article

  • "Inlining" (kind of) functions at runtime in C

    - by fortran
    Hi, I was thinking about a typical problem that is very JIT-able, but hard to approach with raw C. The scenario is setting up a series of function pointers that are going to be "composed" (as in maths function composition) once at runtime and then called lots and lots of times. Doing it the obvious way involves many virtual calls, that are expensive, and if there are enough nested functions to fill the CPU branch prediction table completely, then the performance with drop considerably. In a language like Lisp, I could probably process the code and substitute the "virtual" call by the actual contents of the functions and then call compile to have an optimized version, but that seems very hacky and error prone to do in C, and using C is a requirement for this problem ;-) So, do you know if there's a standard, portable and safe way to achieve this in C? Cheers

    Read the article

  • If I'm projecting with linq and not using a range variable what is the proper syntax?

    - by itchi
    I have a query that sums and aggregates alot of data something like this: var anonType = from x in collection let value = collection.Where(c=>c.Code == "A") select new { sum = value.Sum(v=>v.Amount) }; I find it really weird that I have to declare the range variable x, especially if I'm not using it. So, am I doing something wrong or is there a different format I should be following? Also, keep in mind that anonType has about 15 different properties that are all types of aggregates (sums,counts, etc). So I couldn't do something like: int x = collection.Where(c=>c.Code == "A").Sum(v=>v.Amount);

    Read the article

  • News Aggregater of sorts

    - by shinjuo
    There is a website that my company uses that updates information about 3 specific things throughout the day. We use the information from 1 of them and what we are wanting to do is pull this information as it is added to their site and add it to a page of our own to view easier. Is this even possible? Can anyone point me in the direction of setting this up? It is all text that we want to pull.

    Read the article

  • Unrecognized libraries and functions

    - by John Smith
    I am working in Eclipse 3.7.2 on Ubuntu 12.04 with C++. I have read about a few instances where libraries were not being recognized and the majority said to update the Paths and Symbols but that hasn't fixed my issue. I have 2 projects open in my workspace, one of which is already a completed project that has implemented functions and libraries with no errors from Eclipse. However, when I try to implement some of the same functions or include the same libraries in the 2nd project Eclipse can't resolve them. For example, #include <string> #include <stdio.h> strstr(p, "<Project>"); The include statement will be accepted and stdio.h will be found but the strstr function is not resolved even though it works fine in the other project. Any ideas as to why this might be happening? Thanks.

    Read the article

  • Difference between jQuery click, bind, live, delegate & trigger functions( with example)

    - by I Like PHP
    Hello All, I know there are a lot of questions similar to this, but I want to know clear difference between all of these jQuery functions together on this page with an example, so that it will be very helpful for me to understand the mechanism of all of these functions. I have also read the reference on jQuery main site, but there is no comparison between these: $().click(fn) $().bind('click',fn) $().live('click',fn) $().delegate('td','click',fn) $().trigger('click') // UPDATED Please do not refer any link if there is a part of question belong to that. Please describe how all four function exactly works in different manner, and which should be preferred in which situation. Note: If there are any other function with same functionality/mechanism , then please share. Thanks a lot. Update i have also seen $(trigger) function? is this works similar to above four function ?

    Read the article

  • VLOOKUP and match functions appear to be searching the function rather than value

    - by Brandon S.
    Vlookup and match seem to be searching based on the function I have in my cell rather than the value i have in the cell. I have a column with dates, (ex: C2, which has the formula =E2&"/"&F2&"/"&D2 in them, for example). (where E2, F2, D2 are the year, month, and date). In another sheet and column, I have a bunch of dates, and i'm using the formula =VLOOKUP(C2,'sheet2'!A1:B252,2,FALSE), which doesn't work. (returns #N/A) If I replace C2 with the same date, but without the formula (just typing it in), VLOOKUP works. Why is this?

    Read the article

  • Run one virtual machine on a Linux server + standard Linux functions

    - by fistameeny
    Hi, I am looking for a method to setup a Linux server (running Ubuntu Server) that uses Samba for file sharing, as well as hosting a Windows virtual machine (in this case, Windows Small Business Server 2003, which in turn hosts SQL Server Express - Exchange won't be used on this). I would like to have the Linux server serving the files over Samba, and hosting the Virtual Machine. This obviously rules ESXi out as it couldn't do Samba at the same time. What would be the next best solution to give reasonable speed? Vmware Server 2.0, VirtualBox, Xen? There will be 10-15 users accessing the Samba shares and the SQL Express virtual machine. Matt

    Read the article

  • Compiling Ubuntu server: "libQtGui.so: undefined reference to png functions" errors

    - by Kowalikus
    I want to compile wkhtmltopdf on Ubuntu Server, but I have a problem with following errors: /usr/lib/libQtGui.so: undefined reference to `png_read_info@PNG12_0' /usr/lib/libQtGui.so: undefined reference to `png_set_gAMA@PNG12_0' /usr/lib/libQtGui.so: undefined reference to `png_set_PLTE@PNG12_0' ... /usr/lib/libQtGui.so: undefined reference to `png_create_info_struct@PNG12_0' /usr/lib/libQtGui.so: undefined reference to `png_set_bgr@PNG12_0' /usr/lib/libQtGui.so: undefined reference to `png_get_valid@PNG12_0' What can I do? in /usr/lib lrwxrwxrwx 1 17 2010-02-17 15:00 libQtGui.so -> libQtGui.so.4.5.2 lrwxrwxrwx 1 17 2010-02-17 14:59 libQtGui.so.4 -> libQtGui.so.4.5.2 lrwxrwxrwx 1 17 2010-02-17 14:59 libQtGui.so.4.5 -> libQtGui.so.4.5.2 -rw-r--r-- 1 10071604 2009-10-14 23:34 libQtGui.so.4.5.2

    Read the article

  • Moving LiveMeeting admin functions to a different window

    - by Rob Farley
    I run a user group, and often host LiveMeeting sessions. I use a projector, with a crowd watching. How do I do the admin stuff (respond to Q&A, etc) on one window, and just have the video on the 'extended monitor'? I dont' want the people in the audience to see anything except the video feed, but I want to be able to watch questions come in, etc... Note: I don't have a problem extending the screen across the two monitors - I already have different stuff showing on my screen compared to the projector. I just want a way to put the LM video on Monitor 2 (projector), and the LM controls on Monitor 1.

    Read the article

  • Compiling Ubuntu server: "libQtGui.so: undefined reference to png functions" errors

    - by Kowalikus
    I want to compile wkhtmltopdf on Ubuntu Server, but I have a problem with following errors: /usr/lib/libQtGui.so: undefined reference to `png_read_info@PNG12_0' /usr/lib/libQtGui.so: undefined reference to `png_set_gAMA@PNG12_0' /usr/lib/libQtGui.so: undefined reference to `png_set_PLTE@PNG12_0' ... /usr/lib/libQtGui.so: undefined reference to `png_create_info_struct@PNG12_0' /usr/lib/libQtGui.so: undefined reference to `png_set_bgr@PNG12_0' /usr/lib/libQtGui.so: undefined reference to `png_get_valid@PNG12_0' What can I do? in /usr/lib lrwxrwxrwx 1 17 2010-02-17 15:00 libQtGui.so -> libQtGui.so.4.5.2 lrwxrwxrwx 1 17 2010-02-17 14:59 libQtGui.so.4 -> libQtGui.so.4.5.2 lrwxrwxrwx 1 17 2010-02-17 14:59 libQtGui.so.4.5 -> libQtGui.so.4.5.2 -rw-r--r-- 1 10071604 2009-10-14 23:34 libQtGui.so.4.5.2

    Read the article

  • numeric keypad functions on compact or tenkeyless keyboard

    - by RedGrittyBrick
    I am purchasing a keyboard without a numeric pad (a Cooler Master Storm Rapid but my question probably applies to any keyboard without a numeric pad) I very occasionally use the numeric pad on my current keyboard, in conjunction with the Alt key, to enter special characters. If the keyboard does not make any special provision for this (no obvious keypad overlay on main section of keyboard, nothing on this subject in user-guide) - is there any way to retain this Alt+nnn capability under Windows-7?

    Read the article

  • Seperate external and intranet portals using the same functions .htaccess

    - by jezzipin
    We are currently struggling with setting up rules for a .htaccess file for a website built upon our company product. The product is built using PLSQL and procedures can be accessed using URLs. We use this functionality to present different options to our users. These options can be injected into HTML pages using replacement tags. So, the tag [user_menu] is always replaced with: /wd_portal_cand.menu?p_web_site_id={variable1}&p_candidate_id={variable2} for external sites and /intranet/wd_portal_cand.menu?p_web_site_id={variable1}&p_candidate_id={variable2} for internal sites. The issue we are having is twofold. We need to write our .htaccess rules so that the user can access the functionality whether they are internal or external. So, the links should work as follows: http://www.example.com/wd_portal_cand.menu?p_web_site_id={variable1}&p_candidate_id={variable2} or http://www.example.com/internal/wd_portal_cand.menu?p_web_site_id={variable1}&p_candidate_id={variable2} This is the other problem. As you can see for the internal link above, the procedure needs to be prefixed with internal instead or intranet. We cannot change this in our standard tags as this will affect other sites so we need to achieve this also using htaccess. Could anyone assist with this issue? I apologise if this is brief or confusing but it's something i've never done before and have been given the task of doing. I apologise for the lack of code that will be posted above however I am a front end developer and have been left to make these changes having no prior experience of .htaccess to please bare with me.

    Read the article

  • Restrict subversion to only allow certain functions

    - by Farseeker
    I'm in a bit of a situation. We have our private subversion server that we use for development, but one of our government clients is requesting access to our commit logs so that they can get an up-to-date picture of what we've been doing on the system. I don't have a problem with them reading our commit logs, but what I do have a problem with is them having access to our source code - they can't have read or write. The obvious solution is to do an svn log ourselves and give them an export, but they want direct SVN access as they apparently have an auditing solution that will import the svn log command automagically. So, is there a way I can set up access to a subversion repo and deny them access to everything except svn log? I don't care if I have to set up a virtualhost just for this, but it has to be done over http(s). We're also using LDAP for authentication if that makes any difference.

    Read the article

  • Multiple if functions

    - by user2948699
    I have problem I'm hoping someone could help me with. I have five different text values in 5 cells. I am trying to combine these values into one cell with a comma in between each. However the trick is that if there is no value in (H6) then it must place the word "and" between the cell (F6) and (G6). If there is a value in (H6) then place the word "and" between (G6) and (H6). In the same statement I must also include If there is not value in (G6) then it must place the word "and" between the cell E6 and F6. Please see image attached. I am trying to get the highlighted statements into one cell. So multiple IF statements into one cell. Anyone? =IF(G8=0,(D8)&", "&(E8)&" and "&(F8),(D8)&", "&(E8)&", "&(F8)&" and "&(G8)=IF(H8=0,(D8)&", "&(E8)&", "&(F8)&" and "&(G8),(D8)&", "&(E8)&", "&(F8)&", "&(G8)&" and "&(H8))) I cant figure out the code. Many thanks. Alex Edit: The original image can be found here if size of the inlined is too small.

    Read the article

  • OCaml: Currying without defined values

    - by nicotine
    I have two functions f and g and I am trying to return f(g(x)) but I do not know the value of x and I am not really sure how to go about this. A more concrete example: if I have functions f = x + 1 and g = x * 2 and I am trying to return f(g(x)) I should get a function equal to (x*2) + 1

    Read the article

  • Conventions for order of parameters in a function

    - by Andy
    In writing functions my brain always spends a few milliseconds to check which order of parameters would be best for a given function. should I write: public Comment AddComment(long userID, string title, string text) Or probably: public Comment AddComment(string title, string text, long userID) Why not: public Comment AddComment(string title, long userID, string text) Do you follow any rules when ordering the parameters for your functions? Which parameter would you place first and which would follow?

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >