Daily Archives

Articles indexed Tuesday April 13 2010

Page 22/126 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • how to use conditional select query ? in sqlserver

    - by Arunachalam
    how to use conditional select query ? in sqlserver i have a column in which i store date type variable .now i should retrieve one value from that column and find the difference with the curent_timestamp and if the difference is less than 10 mins i should a return 1 and if more than 10 mins i should return 0.is it possible ? 05-12-2010 13.58.30 - 05-12-2010 13.56.30 here the difference is 2 so it should return 1 .

    Read the article

  • Problem Upgrading NHibernate SQLite Application to .Net 4.0

    - by Xavin
    I have a WPF Application using Fluent NHibernate 1.0 RTM and System.Data.SQLite 1.0.65 that works fine in .Net 3.5. When I try to upgrade it to .Net 4.0 everything compiles but I get a runtime error where the innermost exception is this: `The IDbCommand and IDbConnection implementation in the assembly System.Data.SQLite could not be found.` The only change made to the project was switching the Target Framework to 4.0.

    Read the article

  • Ontologies in c#

    - by Lily
    Hi, I need to make use of some OWL ontologies in c#. Does anyone have a suggestion where I can start? Or if there are any libraries available for c# please? Thanks!

    Read the article

  • llvm's getelementptr instruction with array types

    - by vava
    I'm trying to use array type in llvm and can't get a hold of it yet. As far as I can understand from documentation, array should grow all by itself. But how does it happen, should I just getelementptr with whatever index I have and it'll grow so that index will still be in bounds? That's not what happens, I get all sorts of funny problems which hide away the moment I create array big enough to accommodate all my data. So, should the following code work by itself or I have to call something else for array to increase it's size? %stack = alloca [0 x i32] ; <[0 x i32]*> %"stack[idx]" = getelementptr [0 x i32]* %stack, i32 0, i32 1 ; <i32*>

    Read the article

  • Webservice won't accept JSON requests

    - by V-Man
    Hi, The main issue is that I cannot run a webservice that accepts requests in JSON format. I keep getting a 500 Server error stating that the "request format is invalid." My ASP.NET AJAX extensions are installed. My server is running Plesk Control Panel 8.6 which is undoubtedly causing these problems. The default handler for this specified extension is shown in the web.config like so: For my applications webservice to handle JSON it needs to have this reference: <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> Plesk is not allowing the request to be handled properly. I need to know the correct http directive(s) to put into the web.config to properly handle JSON webservices. I tried posting to the Plesk forum two days ago but no response yet. Any insight would be great =)

    Read the article

  • The Best Way to Parse Dates from an Email

    - by John
    Im currently developing an app that can parse dates from an email - i.e extract the time and dates from an email (similar to gmail). Currently I do this in php but this is a tad clunky. Whats the best language to do this in and are there any existing open source solutions?

    Read the article

  • C# - Name the Design Pattern

    - by nettguy
    Using Fluent Interface design here if i call something like dog.Train("Running").Train("Eating").Do("Running").Do("Eating"); what is the name of this pattern ? is it chain-of-responsibility or there any specific design pattern name associated with it?

    Read the article

  • what's wrong in my C program ?

    - by user292084
    a cpp file: #include <iostream> #include <jni.h> #include "Hello.h" #include "windows.h" #include "stdafx.h" #define HINSTANCE "hDll" typedef void(__stdcall *Print_)(); int main(){ HINSTANCE hDll; //DLL?? Print_ print_; //???? hDll = LoadLibrary("Hello.dll"); if (hDll != NULL) { print_ = (Print_)GetProcAddress(hDll,"Java_Hello_sayHello@8"); if(print_!=NULL) { print_(); } FreeLibrary(hDll); } return 0; } //there is something wrong, it prints: http://i983.photobucket.com/albums/ae311/keatingWang/c_wrong.png ??????? means : Undeclared identifier

    Read the article

  • How do I sanitize LaTeX input?

    - by Conley Owens
    I'd like to take user input (sometimes this will be large paragraphs) and generate a LaTeX document. I'm considering a couple of simple regular expressions that replaces all instances of "\" with "\textbackslash " and all instances of "{" or "}" with "\}" or "\{". I doubt this is sufficient. What else do I need to do? Note: In case there is a special library made for this, I'm using python.

    Read the article

  • Passing enums to functions in C++

    - by rocknroll
    Hi all, I have a header file with all the enums listed (#ifndef #define #endif construct has been used to avoid multiple inclusion of the file) that I use in multiple cpp files in my application.One of the enums in the files is enum StatusSubsystem {ENABLED,INCORRECT_FRAME,INVALID_DATA,DISABLED}; There are functions in the application delcared as ShowStatus(const StatusSubsystem&); Earlier in the application when I made calls to the above function like ShowStatus(INCORRECT_FRAME); my application used to compile perfectly. But after some code was added The compilation halts giving the following error: File.cpp:71: error: invalid conversion from `int' to `StatusSubsystem' File.cpp:71: error: initializing argument 1 of `void Class::ShowStatus(const StatusSubsystem&) I checked the code for any conflicting enums in the new code and it looked fine. My Question is what is wrong with the function call that compiler shows as erroneous? For your reference the function definition is: void Class::ShowStatus(const StatusSubsystem& eStatus) { QPalette palette; mStatus=eStatus;//store current Communication status of system if(eStatus==DISABLED) { //select red color for label, if it is to be shown disabled palette.setColor(QPalette::Window,QColor(Qt::red)); mLabel->setText("SYSTEM"); } else if(eStatus==ENABLED) { //select green color for label,if it is to be shown enabled palette.setColor(QPalette::Window,QColor(Qt::green)); mLabel->setText("SYSTEM"); } else if(eStatus==INCORRECT_FRAME) { //select yellow color for label,to show that it is sending incorrect frames palette.setColor(QPalette::Window,QColor(Qt::yellow)); mLabel->setText("SYSTEM(I)"); } //Set the color on the Label mLabel->setPalette(palette); } A strange side effect of this situation is it compiles when I cast all the calls to ShowStatus() as ShowStatus((StatusSubsystem)INCORRECT_FRAME); Though this removes any compilation error, but a strange thing happens. Though I make call to INCORRECT_FRAME above but in function definition it matches with ENABLED. How on earth is that possible? Its like while passing INCORRECT_FRAME by reference, it magically converts to ENABLED, which should be impossible. This is driving me nuts. Can you find any flaw in what I am doing? or is it something else? The application is made using C++,Qt-4.2.1 on RHEL4. Thanks.

    Read the article

  • IP address spoofing using Source Routing

    - by iamrohitbanga
    With IP options we can specify the route we want an IP packet to take while connecting to a server. If we know that a particular server provides some extra functionality based on the IP address can we not utilize this by spoofing an IP packet so that the source IP address is the privileged IP address and one of the hosts on the Source Routing is our own. So if the privileged IP address is x1 and server IP address is x2 and my own IP address is x3. I send a packet from x1 to x2 which is supposed to pass through x3. x1 does not actually send the packet. It is just that x2 thinks the packet came from x1 via x3. Now in response if x2 uses the same routing policy (as a matter of courtesy to x1) then all packets would be received by x3. Will the destination typically use the same IP address sequences as specified in the routing header so that packets coming from the server pass through my IP where I can get the required information? Can we not spoof a TCP connection in the above case? Is this attack used in practice?

    Read the article

  • ruby on rails - ultrasphinx

    - by satya
    Ruby on Rails - UltraSphinx Hi guys, I'm using Ultrasphinx for the search thing. My question is : I have the "rake ultrasphinx:daemon:start" running in the background. Now, should I have a cron job that does "rake ultrasphinx:index" regularly or will the daemon take care of indexing whenever a new object is created. Please, let me know. Its kind of emergency. Thanks

    Read the article

  • The difference between lists and sequences

    - by Peanut
    I'm trying to understand the difference between sequences and lists. In F# there is a clear distinction between the two. However in C# I have seen programmers refer to IEnumerable collections as a sequence. Is what makes IEnumerable a sequence the fact that it returns an object to iterate through the collection? Perhaps the real distinction is purely found in functional languages?

    Read the article

  • how to find difference between two timestamp using hibernate query language

    - by Shekhar
    Hello I am trying to write an hql query which gives me the number of hours between two timestamp. So, far i am unable to do this. I have used hql hour function but that does not work if the timestamp corresponds to different date. Please provide any input. My hql query is select count(*) from com.xxx.Request as request where request.id = :id and hour(current_timestamp - request.lastEventDate) :delay Thanks Shekhar

    Read the article

  • How to search and locate (annotate) in MKMapView?

    - by chaitanya
    Hi, In my application I have to search five nearest locations of "medical services" using the user current location and annotate those locations on my MKMapView. Can any one tell me how to search with a particular keyword (eg. medical services, garages) by using user current locations and annotate onto the map and when the user taps on the annotations it should show the complete address of the locations which is annotated. Can anyone help me in this?

    Read the article

  • Sharepoint Designer Workflow with multiple tasks in sequence

    - by Triangle Man
    I have a multi-step Sharepoint workflow in task list A that starts when a new task is created in that list and creates a task in another list, B. When that task in list B is completed, I would like the workflow in list A to create another task in list C. I am using Sharepoint Designer 2007 to build all of this and at the moment I have this represented by multiple steps. So, step one is to create the task in the other list, and store its ID as a variable. Step 2 is conditional on a value in the task created by step one being marked complete, and it creates a task in the next list, and so on. However, when I run the workflow, it marks its status as complete as soon as the item in the first list is completed, and does not go on to create the task outlined in Step 2 of the workflow. I would like to know why the workflow is marking itself complete at the end of step one, and why the subsequent steps are not executed. Thanks in advance for your help.

    Read the article

  • how can i change the back arrow in navigation toolbar function

    - by jackrobert
    hi i have developed simple web application using jsp... Step 1 : I have one login page : (contains username ,password and sumbit button) Step2 : I have one logout page : it has one link (Go to login page), just u click this link go to login page.. step3 : And i have some pages like (page1,page2,page3, page4.....) Normal application working following way : after login comes page1.. Then click some action and it will go to page2 Then i click some action and it will goto page3 Then i click some action and it will goto page4 So now i am in page4... now click back arrow in navigation toolbar in browser, generally go to previous page (page3). For example... If u seeing gmail inbox msg... that time u click back arrow..then automatically go to previous page.. But i need , if click back arrow in navigation toolbar (from any page in my application) ,then go to logout page... For example.... Suppose i am in page4... here i click backarrow in browser then i want to go logout page, don't go to page3 how to acheive this... Is there any possible....Any javascript or any otherway pls help me...

    Read the article

  • How can I avoid running ActiveRecord callbacks?

    - by Ethan
    I have some models that have after_save callbacks. Usually that's fine, but in some situations, like when creating development data, I want to save the models without having the callbacks run. Is there a simple way to do that? Something akin to... Person#save( :run_callbacks => false ) or Person#save_without_callbacks I looked in the Rails docs and didn't find anything. However in my experience the Rails docs don't always tell the whole story. UPDATE I found a blog post that explains how you can remove callbacks from a model like this: Foo.after_save.clear I couldn't find where that method is documented but it seems to work.

    Read the article

  • Iterating Over <select> Using jQuery + Multi Select

    - by Kezzer
    This isn't quite as straight forward as one may think. I'm using a plugin called jQuery MultiSelect and multiple <select options using XSLT as follows: <xsl:for-each select="RootField"> <select id="{RootField}" multiple="multiple" size="3"> <option value=""></option> <xsl:for-each select="ChildField"> <option value="{ChildField}"><xsl:value-of select="ChildField"/></option> </xsl:for-each> </select> </xsl:for-each> The accompanying JavaScript is as follows: var selects = document.getElementsByTagName("select"); $.each(selects, function() { $(this).multiSelect(); }); This allows me to apply the multiSelect(); function to every single <select on the page. The behaviour is quite strange, every other <select is being changed into the dropdown list (all the even ones anyway). I can't see anything wrong in my JavaScript to cause this issue as it would iterate over every single one. To make it more clear, the only lists that have that JavaScript applied to it are ones in position 2, 4, 6 and 8 (out of the 9 which are on the page). Any ideas?

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >