Daily Archives

Articles indexed Monday April 19 2010

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

  • Is there a way to turn this query to regular inline SQL

    - by Luke101
    I would like to turn this query to regular inline sql without using stored procedures declare @nod hierarchyid select @nod = DepartmentHierarchyNode from Organisation where DepartmentHierarchyNode = 0x6BDA select * from Organisation where @nod.IsDescendantOf(DepartmentHierarchyNode) = 1 Is there a way to do it?

    Read the article

  • Loading an XML configuration file BEFORE the flex application loads

    - by Shahar
    Hi, We are using an XML file as an external configuration file for several parameters in our application (including default values for UI components and properties values of some service layer objects). The idea is to be able to load the XML configuration file before the flex application initializes any of its components. This is crucial because XML loading is processed a-synchronously in flex, which can potentially cause race-conditions in the application. For example: the configuration file holds the endpoint URL of a web service used to obtain data from the server. The URL resides in the XML because we want to allow our users to alter the endpoint URL according to their environment. Now because the endpoint URL is retrieved only after the XML has been completely loaded, some of the application's components might be invoking operations on this web service before it is initialized with the correct endpoint. The trivial solution would have been to suspend the initialization of the application until the complete event is dispatched by the loader. But it appears that this solution is far from being trivial. I haven't found a single solution that allows me to load the XML before any other object in the application. Can anyone advice or comment on this matter? Regards, Shahar

    Read the article

  • Any reccomendations for implementing a user-defined workflow in Ruby?

    - by midas06
    I'm interested in creating a system where the user can define the steps in a workflow. Is there a gem that already handles this? I thought about one of the state machine gems, but they all seem to be for pre-defined states. I've been thinking maybe i can use state machine for the individual step types... An email step could have a few states [New, Assigned, Done], and the workflow could just be lists of these stateful steps. Are there other solutions out there?

    Read the article

  • How to add SQLite (SQLite.NET) to my C# project

    - by Lirik
    I followed the instructions in the documentation: Scenario 1: Version Independent (does not use the Global Assembly Cache) This method allows you to drop any new version of the System.Data.SQLite.DLL into your application's folder and use it without any code modifications or recompiling. Add the following code to your app.config file: <configuration> <system.data> <DbProviderFactories> <remove invariant="System.Data.SQLite"/> <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /> </DbProviderFactories> </system.data> </configuration> My app.config file now looks like this: <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > <section name="DataFeed.DataFeedSettings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> </sectionGroup> </configSections> <userSettings> <DataFeed.DataFeedSettings> <setting name="eodData" serializeAs="String"> <value>False</value> </setting> </DataFeed.DataFeedSettings> </userSettings> <system.data> <DbProviderFactories> <remove invariant="System.Data.SQLite"/> <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /> </DbProviderFactories> </system.data> </configuration> My project is called "DataFeed": using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data.SQLite; //<-- Causes compiler error namespace DataFeed { class Program { static void Main(string[] args) { } } } The error I get is: .\dev\DataFeed\Program.cs(5,19): error CS0234: The type or namespace name 'SQLite' does not exist in the namespace 'System.Data' (are you missing an assembly reference?) I'm not using the GAC, I simply dropped the System.Data.SQLite.dll into my .\dev\DataFeed\ folder. I thought that all I needed to do is add the DLL to the project folder as it was mentioned in the documentation. Any hints on how to actually make this work?

    Read the article

  • mysql query to select the bottom values from a table

    - by S.PRATHIBA
    Hi all, I have the following table. mysql> select * from consumer2; SERVICE_ID SERVICE_TYPE CONSUMER_FEEDBACK 31 PRINTER 1 32 PRINTER -1 33 PRINTER 0 34 PRINTER -1 35 PRINTER 0 31 PRINTER 0 32 PRINTER 1 35 PRINTER 1 31 PRINTER 0 From the above table i need to select the bottom 4 values using mysql i need to get the output as follows SERVICE_ID SERVICE_TYPE CONSUMER_FEEDBACK 31 PRINTER 0 32 PRINTER 1 35 PRINTER 1 31 PRINTER 0 Please help me.Thank u in advance.

    Read the article

  • updating vc6 code to vs2005

    - by vijay.j
    Hi, I have compliedand built my VC6 application code in vs2005, but while running i am getting an error saying could not load the DLL, once i check this with dependcy walker i found that ieshims.dll and wer.dll are missing but i searched for those dll's but i could not get it. please help me on this

    Read the article

  • Python Framework for small website

    - by mvid
    I am planning a small, simple website to showcase myself as an engineer. My preferred language is Python and I hope to use it to create my website. My pages will be mostly static, with some database stored posts/links. The site will be simple, but I would like to have freedom in how it operates. I plan on using CSS/JS for the design, so I really just need an easy way to throw a small amount of content around. Some frameworks I have come across: Flask cherry.py Pinax Are there any suggestions? Does anyone have any experience with Python on small/hobby websites?

    Read the article

  • A good file management/hosting/storage web service with embed-function?

    - by Andreas
    I am looking for a file management web service that lets me integrate the directory-view into a commercial website. Another requirement: User can register themselves, but need to be approved, before being able to download files. So something like box.net, but with more than just a a flash-widget. I would prefer some javascript, that can be embedded. Thanks for any recommendations.

    Read the article

  • Tutoriel Java : Comprendre le fonctionnement de RMI (Remote Method Invocation), par Alain Defrance

    Bonjour, Le RMI (ou Remote Method Invocation) est très souvent utilisé, soit directement, soit dans des couches sous-jacentes. RMI est par exemple utilisé pour exposer des EJB SessionBeans. Notre objectif va être de démystifier RMI en comprenant ses méchanismes. Nous allons analyser comment une invocation à distance est possible en allant jusqu'a implémenter notre propre version allégée de RMI. Bien entendu, afin de nous focaliser sur les objectifs de cet article, certains prérequis sont nécessaires. Aucun rappel sur l'utilisation la gestion d'un réseau en Java ne sera fait. Article disponible ici : http://alain-defrance.developpez.com...2SE/micro-rmi/...

    Read the article

  • c# "==" operator : compiler behaviour with different structs

    - by Moe Sisko
    Code to illustrate : public struct MyStruct { public int SomeNumber; } public string DoSomethingWithMyStruct(MyStruct s) { if (s == null) return "this can't happen"; else return "ok"; } private string DoSomethingWithDateTime(DateTime s) { if (s == null) return "this can't happen"; // XX else return "ok"; } Now, "DoSomethingWithStruct" fails to compile with : "Operator '==' cannot be applied to operands of type 'MyStruct' and '<null>'". This makes sense, since it doesn't make sense to try a reference comparison with a struct, which is a value type. OTOH, "DoSomethingWithDateTime" compiles, but with compiler warning : "Unreachable code detected" at line marked "XX". Now, I'm assuming that there is no compiler error here, because the DateTime struct overloads the "==" operator. But how does the compiler know that the code is unreachable ? e.g. Does it look inside the code which overloads the "==" operator ? (This is using Visual Studio 2005 in case that makes a difference). Note : I'm more curious than anything about the above. I don't usually try to use "==" on structs and nulls.

    Read the article

  • Scope of variables inside of javascript

    - by wcpro
    I have the following code sample that im trying to wrap my head around $(document).ready(function () { test("load json", function () { length = 0; // length = 0 $.getJSON("plugins/form.json", function (data) { length = data.fields.length; // length = 4 }); ok(length == 4, "length = " + length.toString()); // length = 0? wtf? }); }); the 'length' variable does not persist when the $.getJSON runs. I cant figure out if its because its asynchronous or because the variable is out of scope.

    Read the article

  • ImportError: No module named _sqlite3

    - by Chris R.
    I'm writing for the Google App Engine and my local tests are getting the following error: --> --> --> Traceback (most recent call last): File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 3185, in _HandleRequest self._Dispatch(dispatcher, self.rfile, outfile, env_dict) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 3128, in _Dispatch base_env_dict=env_dict) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 515, in Dispatch base_env_dict=base_env_dict) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 2387, in Dispatch self._module_dict) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 2297, in ExecuteCGI reset_modules = exec_script(handler_path, cgi_path, hook) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 2193, in ExecuteOrImportScript exec module_code in script_module.__dict__ File "C:\Users\Chris Reade\Documents\SI 182\Final\geneticsalesman\Final.py", line 7, in <module> from pyevolve import DBAdapters File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1272, in Decorate return func(self, *args, **kwargs) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1922, in load_module return self.FindAndLoadModule(submodule, fullname, search_path) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1272, in Decorate return func(self, *args, **kwargs) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1824, in FindAndLoadModule description) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1272, in Decorate return func(self, *args, **kwargs) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1775, in LoadModuleRestricted description) File "C:\Users\Chris Reade\Documents\SI 182\Final\geneticsalesman\pyevolve\DBAdapters.py", line 21, in <module> import sqlite3 File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1272, in Decorate return func(self, *args, **kwargs) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1922, in load_module return self.FindAndLoadModule(submodule, fullname, search_path) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1272, in Decorate return func(self, *args, **kwargs) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1824, in FindAndLoadModule description) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1272, in Decorate return func(self, *args, **kwargs) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1775, in LoadModuleRestricted description) File "C:\Python26\lib\sqlite3\__init__.py", line 24, in <module> from dbapi2 import * File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1272, in Decorate return func(self, *args, **kwargs) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1922, in load_module return self.FindAndLoadModule(submodule, fullname, search_path) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1272, in Decorate return func(self, *args, **kwargs) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1824, in FindAndLoadModule description) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1272, in Decorate return func(self, *args, **kwargs) File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1775, in LoadModuleRestricted description) File "C:\Python26\lib\sqlite3\dbapi2.py", line 27, in <module> from _sqlite3 import * ImportError: No module named _sqlite3 My python direction has a lib file for sqlite3 but I can't tell why it can't find it. Any help would be greatly appreciated.

    Read the article

  • String tokenizer for PHP

    - by Jack
    I have used the String Tokenizer in Java. I wish to know if there is similar functionality for PHP. I have a string and I want to extract individual words from it. eg. If the string is - Summer is doubtful #haiku #poetry #babel I want to know if it contains the hashtag #haiku.

    Read the article

  • [iPhone] Play video not in full screen mode

    - by Kyo
    Hello, First, excuse my english :) I've read on apple developer website that video playback provides by the framework supports only full screen mode. I will need to develop an application where video can be played in reduce screen mode. I've see that Orange TV make something which looks like what i need to do. http://img218.imageshack.us/img218/1228/tvplayerorange.jpg The application is available on app store but you need to have a subscription to test this application. Whatever, to resume it, we can see video (tv stream video) in a reduce mode and if we click on the screen it switch to a full screen mode. So my question, what i want to do is possible (Orange TV made it) but i wonder the difficulty to make it. It seems that I have to make a video player. If it take a bunch of time, I tkink I will use Media Player Framework of iPhone even isn't the optimal solution for me. Feel free to ask me more details ;) Thank you for your answers.

    Read the article

  • implement code folding with html and java script

    - by Vignesh
    I'm trying to collapse or expand table rows with + and - sign displayed on the first column, using jquery. <script type="text/javascript"> $(document).ready(function() { $("tr.header").click(function () { $("tr.child", $(this).parent()).slideToggle("fast"); }); }); I'm trying to use this code. But I want the child of the parent I'm clicking on alone to be toggled. Any ideas on how to do it?

    Read the article

  • Do I need a view controller for MVVM-light in Silverlight?

    - by Stefan de Vogelaere
    I have the following question regarding MVVM light: what "drives" the UI? I see I can have a ViewModel per View I am showing; the ViewLocator handles all the ViewModels (for caching as I understand). But what is driving the UI? If I have a Command defined in my ViewModel that says "ShowDetail"; do I have to write the code for displaying this View inside the ViewModel? Are there any examples of this? Thanks!

    Read the article

  • good Video chatting application

    - by Stan
    Skype eats too many CPU while video chatting (about 100%). Not sure it's due to camera driver or Skype. So can anyone suggest any light resource drain video chatting application, please? thanks.

    Read the article

  • Set the Image brightness and contrast using OpenGL ES.

    - by Viral
    hi friends, I want to set Image Brightness and contras of images that are in my photo library, I got the code from http://developer.apple.com/iphone/library/samplecode/GLImageProcessing/Introduction/Intro.html, but that will work on the EAGL layer i.e. all the effects are provided on image that is put initially not on the image that are selected from the photo library ,as this function will work on the view(EAGLview) and not on the image view. so how to change the brightness and contras of any images that are selected from the photo library?? if any one know this please let me know.. regards viral.

    Read the article

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