Search Results

Search found 613 results on 25 pages for 'tony lambert'.

Page 20/25 | < Previous Page | 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • SQL Select for multiple where clause

    - by Tony
    Hi, I am trying to create SQL Select that returns counts of a certain field based on a field. So, here is what I am trying to do. Select count(distinct id) as TotalCount, -- this will be the total of id count(distinct id where type='A') as TotalA, -- this will be total when type='A' count(distinct id where type='B') as TotalB -- This will be total when type = 'B' from MyTable Basically, TotalCount = TotalA + TotalB. How can I achieve this in SQL Select Statement? Thanks.

    Read the article

  • Inheriting from List<T> in .NET (vb or C#)

    - by Tony
    I have been delved in C++ world for a while, but now I'm in .NET world again, VB and C# and I wondered if you have a class that represents a collection of something, and you want the ability to use this in a foreach loop, etc... is it better to implement IEnumerable and IEnumerator yourself or should you inherit from the List<T> where T is the object type in it's singular form? I know in C++ for example, inheriting from a container is considered a bad idea. But what about .NET.

    Read the article

  • ajax security ?

    - by Tony
    When I look back my codes that written earlier time, I found something terribly bad. Whenever I want to delete a record in the database, I did like this : $.post("deleteAction.do",{recordId:10}); I cannot prevent a malicious user visit my database operation url directly : deleteAction.do?recordId=10 What's the solution for this kind of problem ?

    Read the article

  • Starting out with Exchange Server development

    - by Tony
    Hi, We've written several Outlook Add-ins for various projects and have now been asked to look at writing a Exchange server add-in. We will need to inspect all incoming / outgoing msgs and tag / file them into a document management system. If it's a message that we are interested in we would ideally like to change the default icon that is displayed in Outlook. We could I guess settle for Categorising / colour coding the email but we've been asked for a icon. Any guidance on how to get started / killer reference apps much appricaiated. Oh we will be needing to target both Exchange 2003 and 2007. vb.net is our bag but were fine with c# too. Thanks in advance - liking the site thus far btw

    Read the article

  • Java JIT compiler compiles at compile time or runtime ?

    - by Tony
    From wiki: In computing, just-in-time compilation (JIT), also known as dynamic translation, is a technique for improving the runtime performance of a computer program. So I guess JVM has another compiler, not javac, that only compiles bytecode to machine code at runtime, while javac compiles sources to bytecode,is that right?

    Read the article

  • How do I conditionally assign ruby variables to javascript variables?

    - by Tony
    I have a website where I need a javascript version of the "current user" object along with the ruby version. I have been assigning these variables doing something like this... Application Controller: def get_user begin @current_user = User.find(session[:user_id]) if session[:user_id] @current_user_json = @current_user.to_json rescue session.delete(:user_id) @current_user = nil @current_user_json = {} end end Web Page: var current_user = null; current_user_json = '<%= @current_user_json %>'; if(current_user_json != ''){ current_user = current_user_json.user; } Even when there is a current user, I get the current user is undefined. Probably because I am putting the current_user_json assignment around single quotes. However, if I don't put it around single quotes, I'll always get a javascript error when no user is logged in because the syntax is invalid - current_user_json = ; I think I am just looking at this completely wrong and there must be a better way. Given that this is probably a common thing to do, I wanted to get other people's opinion on how to create an object in javascript that is a duplicate of the ruby object.

    Read the article

  • Random Record from Recordset

    - by Tony Hanks
    I have the fillowing Query: SELECT a.*, ps4_media.filename, ps4_galleries.name as galleryname, ps4_media_iptc.description, ps4_media_iptc.title, ps4_media_iptc.headline, ps4_media.date_added, ps4_galleries.created, ps4_folders.name as foldername, ps4_galleries.gallery_count FROM ps4_media_galleries a INNER JOIN (SELECT ps4_media_galleries.gallery_id, min(ps4_media_galleries.gmedia_id) AS minID FROM ps4_media_galleries GROUP BY ps4_media_galleries.gallery_id) b ON a.gallery_id = b.gallery_id AND a.gmedia_id = b.minID INNER JOIN ps4_media ON ps4_media.media_id = a.gmedia_id INNER JOIN ps4_folders ON ps4_folders.folder_id = ps4_media.folder_id INNER JOIN ps4_galleries ON ps4_galleries.gallery_id = a.gallery_id INNER JOIN ps4_media_iptc ON ps4_media_iptc.media_id = a.gmedia_id ORDER BY ps4_galleries.created DESC How do I get ps4_media.filename to be random, everything else is fine just want the thumbnail which ps4_media.filename is to be and of the records in the found set.

    Read the article

  • Connecting to TFS via ASP.NET, jQuery and Phonegap

    - by Tony D.
    I want to develop a mobile application that would allow the user the ability to run a suite of automated test cases housed in TFS. This is something I thought of this morning so it's all still very preliminary. But I'm curious as to what would be the best route for something like this? Or if it's even possible? Because the mobile devices from the users will vary from iphones to droids, I would probably want to incorporate something like Phonegap for it's cross platform capabilities. My initial thought was to develop in ASP.net/C# (which would be stored on a remote server), and have jQuery make calls to that server. Not sure if that would be the most appropriate way of handling this. I'm not too familiar with JSON but I have seen it as a suggestion on various sites to handle the returned data. Any thoughts or suggestions are appreciated. Thanks.

    Read the article

  • Is a server an infinite loop running as a background process?

    - by Tony
    Is a server essentially a background process running an infinite loop listening on a port? For example: while(1){ command = read(127.0.0.1:xxxx); if(command){ execute(command); } } When I say server, I obviously am not referring to a physical server (computer). I am referring to a MySQL server, or Apache, etc. Full disclosure - I haven't had time to poke through any source code. Actual code examples would be great!

    Read the article

  • How to deal with time zones in a Rails app with events...

    - by Tony
    I have a Rails app for bands. Bands can import their shows which all occur in different time zones. It seems like a ton of work to store these events in UTC. I would have to figure out the time zone for any show created and then convert back to the show's local time zone when displaying to the user. Is there a simple plugin to get a UTC offset based on geolocation? That would probably help, but does anyone see any major reasons why I should store in UTC here? I understand storing timestamps in UTC is probably a good idea...but band event times?

    Read the article

  • Strange C++ thread function invocation

    - by Tony
    I have the following: class DThread { virtual void run()=0; _beginthreadex(NULL,0,tfunc,this,0,&m_UIThreadID); // class itself being passed as param to thread function... static unsigned int __stdcall tfunc(void* thisptr) { static_cast<DThread*>(thisptr)->run(); return 0; } //other stuff } The run function is implemented in a derived class. Why is the function that's being called in the thread being called through a cast this pointer? Is this good practise? Can't it just be called directly? The actual function needing to run is in the derived class. My question is

    Read the article

  • How to understand the BODYSTRUCTURE information returned by IMAP servers?

    - by Tony
    I'm using python's IMAPClient to retrieve email messages from IMAP server. One of the attributes I retrieve is BODYSTRUCTURE. However, I can't find any documentation on how to interpret the return values. Here's the body structure that IMAP server returns 16:12.679978 < FLAGS (NotJunk $NotJunk \Seen) BODYSTRUCTURE ((("TEXT" "PLAIN" ("CHARSET" "us-ascii") NIL NIL "QUOTED-PRINTABLE" 4888 170 NIL NIL NIL)("TEXT" "HTML" ("CHARSET" "us-ascii") NIL NIL "QUOTED-PRINTABLE" 32407 479 NIL NIL NIL) "ALTERNATIVE" ("BOUNDARY" "Apple-Mail=_3AAA7CD7-3B07-406A-83CB-2C7762C3306E") NIL NIL)("APPLICATION" "PKCS7-SIGNATURE" ("NAME" "smime.p7s") NIL NIL "BASE64" 2414 NIL ("ATTACHMENT" ("FILENAME" "smime.p7s")) NIL) "SIGNED" ("BOUNDARY" "Apple-Mail=_DF4FE6BB-F796-46D7-A593-9723F4315DD2" "MICALG" "sha1" "PROTOCOL" "application/pkcs7-signature") NIL NIL)) Here's the same body structure parsed to python type. "BODYSTRUCTURE": [ [ [ [ "TEXT", "PLAIN", [ "CHARSET", "us-ascii" ], null, null, "QUOTED-PRINTABLE", 4888, 170, null, null, null ], [ "TEXT", "HTML", [ "CHARSET", "us-ascii" ], null, null, "QUOTED-PRINTABLE", 32407, 479, null, null, null ], "ALTERNATIVE", [ "BOUNDARY", "Apple-Mail=_3AAA7CD7-3B07-406A-83CB-2C7762C3306E" ], null, null ], [ "APPLICATION", "PKCS7-SIGNATURE", [ "NAME", "smime.p7s" ], null, null, "BASE64", 2414, null, [ "ATTACHMENT", [ "FILENAME", "smime.p7s" ] ], null ] ], "SIGNED", [ "BOUNDARY", "Apple-Mail=_DF4FE6BB-F796-46D7-A593-9723F4315DD2", "MICALG", "sha1", "PROTOCOL", "application/pkcs7-signature" ], null, null ], The arrays don't seems to be constant length. What each element of the array stand for?

    Read the article

  • ASP.NET MVC2 TeplatedHelper doesn't render an ID of the HTML's markup

    - by Tony
    Hi, I have the code (snippet): The Model is the IEnumerable object of the Person's class: <% foreach (var item in Model) { %> <tr> <td><%= Html.DisplayFor(x=>item.Name) %></td> </tr> <% } %> it renders only labels like that: <td>Tommy</td> According to the link it should be rendering a HTML markup something like: but there is no the ID and the NAME property. Why ?

    Read the article

  • ASP.NET MVC 2 A question about an Asynchronous Controller

    - by Tony
    Hi, I'm wondering about one thing - let's assume that the user clicks a button, and the asynch controller's action is invoked. What happens, when the asynchronous action takes e.g. 10 seconds? The user has to wait 10 seconds to view the result of the action? If so, are the asynch controllers really helpful ?

    Read the article

  • Basic CSS: having unordered list extend beyond container div?

    - by Tony
    Hi. It's been a bit since I've gotten really into CSS work, I'm trying to make a simple layout with a menubar. The idea is to have a container holding everything in the center of the screen and have a menubar (unordered inline list) that runs the full length of the screen but the list items to be contained in the container. See this pic for a visual example ps. I know this isn't true "programming", but this seemed like the most appropriate place to post this question. Let me know if there's a better /r/ for this to go.

    Read the article

  • C++ finding pointer errors

    - by Tony
    Hello! I am currently on a project which has been buggy for a long while, now I suspect, among other things, that there is pointer errors in the code. The program is written in native C++ using COM and uses out-of-process COM servers. Can anybody give me some tips as how one would go about finding these errors? Is there specific things to keep in mind, ways to do it, etc...

    Read the article

  • Recursive only 2 level records using common sql

    - by Tony
    I have an Employee table, it's a self-referencing table, with managerId refers to primary key empID. I want to find 2 level records by a given empId. For example: if given empId=5, if empId=5 has children records, display them, as well as the children in children records. You may also provide a recursive suggestion without level limitation. The database is SQL Server 2005.

    Read the article

  • For a 1view/scene to 2view/scene app, what application should I choose in Xcode?

    - by Tony Xu
    The question may be simple to some others, but I have been struggling with this for a while. The app I want would be like this: first scene/view with two big buttons (no toolbar item), click each one to get into two new scenes. So totally three scenes. In Xcode, what application should I choose? And in storyboard how/should I drag/draw? Thanks. Update: thanks for the link, the big-number-user. I actually read that tutorial before I asked. A little update on what I got so far: 1, I selected "single view", so there's view controller 1 (VC1) in the storyboard. 2, dragged a navigation controller (NC), and move the initial view arrow pointing to NC 3, control-drag to link NC and VC1, selected "relationship segue root view controller" when some small dialog popup. IS THIS CORRECT? 4, created two additional VC, VC3 and VC4, control-drag link each to NC. selected "push", IS THIS CORRECT? 5, in VC1, I added two buttons, showVC3 and showVC4. NOW I DON'T KNOW how to add IBAction to button showVC3 and showVC4. I tried to control-drag it to ViewController.m file @interface and @end section, but failed. What should I do next?

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25  | Next Page >