Search Results

Search found 2046 results on 82 pages for 'sam dark'.

Page 45/82 | < Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >

  • How can i rewrite this query for faster execution

    - by sam
    SELECT s1.ID FROM binventory_ostemp s1 JOIN ( SELECT Cust_FkId, ProcessID, MAX(Service_Duration) AS duration FROM binventory_ostemp WHERE ProcessID='4d2d6068678bc' AND Overall_Rank IN ( SELECT MIN(Overall_Rank) FROM binventory_ostemp WHERE ProcessID='4d2d6068678bc' GROUP BY Cust_FkId ) GROUP BY Cust_FkId ) AS s2 ON s1.Cust_FkId = s2.Cust_FkId AND s1.ProcessID=s2.ProcessID AND s1.Service_Duration=s2.duration AND s1.ProcessID='4d2d6068678bc' GROUP BY s1.Cust_FkId It just goes away if there are more than 10K rows in that table. What it does is find rows for each customer who has min. of overall rank and in those max. of service duration for a given processid Table Data ID Cust_FkId Overall_Rank Service_Duration ProcessID 1 23 2 30 4d2d6068678bc 2 23 1 45 4d2d6068678bc 3 23 1 60 4d2d6068678bc 4 56 3 90 4d2d6068678bc 5 56 2 50 4d2d6068678bc 6 56 2 85 4d2d6068678bc

    Read the article

  • Language independent logic question

    - by Sam
    If one has three fields in a db that they are querying an object by.... One of these fields must always be an associations id. Concerning the other two fields "only one needs to be true" What interpretation do you take or make of "only one needs to be true"?

    Read the article

  • How do I create a deb package with basic dependencies?

    - by Sam
    Hi so I am trying to create a deb package for a web application written in Java (it uses Apache Tomcat). My eventual goal is to start a repository that people can add to apt-get the software, but How do I make it so that the package knows to look for dependencies like tomcat, sun-java6-bin, and ant? How do I write an installer script to place the files and folders in the right place?

    Read the article

  • How do you check individual SqlCommands ran during a SqlTransactions to see if they will run?

    - by Sam F
    I've been reading up on SqlTransactions and have found a great load of examples like: http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=451 The problem is, when I do a BeginTransaction() (Execute all the commands) and then Commit() at the end all the commands I execute get run and the ones with syntax errors or other errors just get skipped. This is where I would also like to run a roll back, not skip over them. I found a few articles on the subject but they were not very helpful and purely in SQL. Is there any way to find out if one of the ExecuteNonQuery()'s failed before the commit and not just skipped? Thanks.

    Read the article

  • Converting a string into a list in Python

    - by Sam
    I have a text document that contains a list of numbers and I want to convert it to a list. Right now I can only get the entire list in the 0th entry of the list, but I want each number to be an element of a list. Does anyone know of an easy way to do this in Python? 1000 2000 3000 4000 to ['1000','2000','3000','4000']

    Read the article

  • Counting bits set in a .Net BitArray Class

    - by Sam
    I am implementing a library where I am extensively using the .Net BitArray class and need an equivalent to the Java BitSet.Cardinality() method, i.e. a method which returns the number of bits set. I was thinking of implementing it as an extension method for the BitArray class. The trivial implementation is to iterate and count the bits set (like below), but I wanted a faster implementation as I would be performing thousands of set operations and counting the answer. Is there a faster way than the example below? count = 0; for (int i = 0; i < mybitarray.Length; i++) { if (mybitarray [i]) count++; }

    Read the article

  • How does jQuery have asynchronous functions?

    - by Sam.Rueby
    I'm surprised I can't find a clear answer to this. So, in jQuery, you can do this: $(someElements).fadeOut(1000); $(someElements).remove(); Which, will start a fadeOut animation, but before it finishes executing in the 1 second duration, the elements are removed from the DOM. But how is this possible? I keep reading the JavaScript is single threaded. ( Is javascript guaranteed to be single-threaded? ) This question is not "How do I fix this?" I know I can do either: $(someElements).fadeOut(1000).promise().done(function() { $(someElements).remove();});, or even better:$(someElements).fadeOut(1000, function() { $(this).remove(); } ); What I don't understand is how JavaScript runs in a "single thread" but I'm able to use these jQuery functions that execute asynchronously and visibly see the DOM change in different places at the same time. How does it work?

    Read the article

  • Null Value Statement

    - by Sam
    Hi All, I have created a table called table1 and it has 4 columns named Name,ID,Description and Date. I have created them like Name varchar(50) null, ID int null,Description varchar(50) null, Date datetime null I have inserted a record into the table1 having ID and Description values. So Now my table1 looks like this: Name ID Description Date Null 1 First Null One of them asked me to modify the table such a way that The columns Name and Date should have Null values instead of Text Null. I don't know what is the difference between those I mean can anyone explain me the difference between these select statements: SELECT * FROM TABLE1 WHERE NAME IS NULL SELECT * FROM TABLE1 WHERE NAME = 'NULL' SELECT * FROM TABLE1 WHERE NAME = ' ' Can anyone explain me?

    Read the article

  • error when trying to install nokogiri

    - by sam
    im trying to install nokogiri to use in a ruby on rails application to read xml files, ive been following the instructions on their page for home brew 0.9, when i try and install the libivcon from source as bellow wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz tar xvfz libiconv-1.13.1.tar.gz cd libiconv-1.13.1 ./configure --prefix=/usr/local/Cellar/libiconv/1.13.1 make sudo make install i get the following error `make: *** No rule to make target `install'. Stop.` any idea why that might be ? sorry if the answers a real simple one im pretty new to ror / terminal and ive been going round in loops with this for almost a day, any helps much appreciated !

    Read the article

  • Drupal 7 configuration error with Postgresql in Mac OS 10.6.5

    - by Sam
    I am trying to configure Drupal 7 with Postgres. At the database setup step, I get the following error. Warning: PDO::_construct(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) in DatabaseConnection-_construct() (line 300 of /Users/shamod/Sites/drupal/7/includes/database/database.inc). In order for Drupal to work, and to continue with the installation process, you must resolve all issues reported below. For more help with configuring your database server, see the installation handbook. If you are unsure what any of this means you should probably contact your hosting provider. Failed to connect to your database server. The server reports the following message: SQLSTATE[HY000] [2002] No such file or directory. Is the database server running? Does the database exist, and have you entered the correct database name? Have you entered the correct username and password? Have you entered the correct database hostname? NOTE: I am trying to connect to Postgresql but it fails on var/mysql/mysql.sock error. I have setup the database connection string in settings.php for Postgresql. It still does not work. Any idea?

    Read the article

  • delphi windows service can't download file from internet

    - by sam
    hi, i have a windows service written in delphi,the service will use to downloading a file from my website but it can't download the file,it doesn't thrown any exception also i change the destination path and the file to be download but the result was same,my firewall was off too,my project work properly in another PC that i test on it and in windows application my function works properly too, so what should be the problem ? thx for ur time

    Read the article

  • Get text when enter is pressed in a text box in wxPython

    - by Sam
    I have a (single line) TextCtrl. The user types data into this. When they press enter, the contents of the box need to be extracted so they can be processed. I can't figure out how to catch enter being pressed. According to the docs, with the style wx.TE_PROCESS_ENTER set on my TextCtrl, it should generate a wx.EVT_COMMAND_TEXT_ENTER event when enter is pressed in the box, which I could then catch. However, wx.EVT_COMMAND_TEXT_ENTER seems not to exist (I get "module has no attribute EVT_COMMAND_TEXT_ENTER), so I'm a bit stuck. Googling just gets a couple of hits of people complaining wx.EVT_COMMAND_TEXT_ENTER doesn't work, so I guess I need another way of doing it.

    Read the article

  • How to insert time in SQl Derver 2005?

    - by sam
    i am creating windows application .In this i have to subtract two dates .i subtract it successfully ,i used TimeSpan to get subtracted value.But when i insert it in SQl Server 2005 db, it inserted with starting date i.e. 1/1/1900 and the calculated difference which format should i use to insert Time only? Thanks in advance

    Read the article

  • Make input field jquery ui datepicker editable

    - by Sam Vloeberghs
    Hi Folks, I've scanned trough the documentation but I can't find out how I to get the field to get the datepickers value AND let it be editable using my keyboard numpad. So filling/editing the date without using the datepicker. I hope my question is clear cause I don't know how the formulate it otherwise.. Greetings

    Read the article

  • WPF: Bind DataGrid to List<String>

    - by Sam
    Funny, how sometimes the simple things bite me in the behind. I can bind a DataGrid nicely to a Collection of some arbitrary class, using a DataGridTextColumn like this: <DataGridTextColumn Header="Name" Binding="{Binding Name}"/> Now I want to bind a DataGrid to a simple Collection. So since there is no property "Name" or something like that to bind to, how do I write the binding: <DataGridTextColumn Header="Name" Binding="{Binding ???}"/> String has no Property "Value" or something like that. And if I just write {Binding } I'll end up with a one-way-binding, unable to write changes back to the Collection. Thinking about it, I think it is not possible to bind to a collection, so I do need to wrap my string into a class? Or is there a way?

    Read the article

  • How do I get characters common to two vectors in C++?

    - by Sam Phelps
    I am trying to compare two vector objects, and return a single vector containing all the chars which appear in both vectors. How would I go about this without writing some horribly complex manual method which compares every char in the first vector to every char in the second vector and using an if to add it to a third vector (which would be returned) if they match. Maybe my lack of real experience with vectors is making me imagine this will be harder than it really is, but I suspect there is some simplier way which I have been unable to find through searching.

    Read the article

  • Password value on click is not changing the text to 'Password'

    - by Sam
    window.onload=function() { var password = document.getElementById('apassword'); var real = document.getElementById('password'); var fake = document.createElement('input'); fake.setAttribute('type', 'text'); /*fake.setAttribute('id', 'password');*/ fake.setAttribute('class', 'contact-input contact-right'); password.appendChild(fake); fake.setAttribute('value', 'Password'); fake.onfocus = function() {this.style.display='none';real.style.display=''; real.focus();}; real.style.display = 'none'; real.setAttribute('value', ''); real.onblur = function() {if(this.value==''){this.style.display='none';fake.style.display=''}}; }; AND <label id="apassword"> <input type="password" title="Password" id="password" class="contact-input contact-right" name="password" /> </label> What is supposed to happen is that when you click on the input box, it changes from 'Password' to a blank type="password" input box, however it doesn't happen. This originally worked, but then I had to change some ID's and classes etc. I'm not sure how to debug scripts, so hopefully someone can help me with that, and also with my question :). Thankyou :).

    Read the article

  • Showing newly added table row using .show("slow")

    - by Sam Mackrill
    I am cloning a hidden table row then populating it and after validation I want to show the row using a jquery effect ... say .show("slow") var baseRow = $("#tasks tr#baseTaskLine"); var newRow = baseRow.clone(); var lastRow = $("#tasks tr[id^='TaskLine_']" + dayClass + ":last"); var newRowId; if (lastRow.length == 0) { newRowId = "TaskLine_new0"; } else { newRowId = "TaskLine_new" + lastRow[0].rowIndex; } newRow.attr("id", newRowId); : [populate new row] : if (lastRow.length == 0) { baseRow.after(newRow); } else { lastRow.after(newRow); } newRow.hide(); : : [validate via webservice call] : newRow.show("slow"); This does show the row but it appears instantly. I have tried hiding all the <td> elements of the row then showing those and that does seem to work but some strange styles get added to each <td> which interfere with the formatting i.e. style="display: block;"

    Read the article

  • Get PropertyInfo from property instead of name

    - by Sam
    Say, for example, I've got this simple class: public class MyClass { public String MyProperty { get; set; } } The way to get the PropertyInfo for MyProperty would be: typeof(MyClass).GetProperty("MyProperty"); This sucks! Why? Easy: it will break as soon as I change the Name of the Property, it needs a lot of dedicated tests to find every location where a property is used like this, refactoring and usage trees are unable to find these kinds of access. Ain't there any way to properly access a property? Something, that is validated on compile time? I'd love a command like this: propertyof(MyClass.MyProperty);

    Read the article

  • c++ recursion with arrays

    - by Sam
    I have this project that I'm working on for a class, and I'm not looking for the answer, but maybe just a few tips since I don't feel like I'm using true recursion. The problem involves solving the game of Hi Q or "peg solitaire" where you want the end result to be one peg remaining (it's played with a triangular board and one space is open at the start.) I've represented the board with a simple array, each index being a spot and having a value of 1 if it has a peg, and 0 if it doesn't and also the set of valid moves with a 2 dimensional array that is 36, 3 (each move set contains 3 numbers; the peg you're moving, the peg it hops over, and the destination index.) So my problem is that in my recursive function, I'm using a lot of iteration to determine things like which space is open (or has a value of 0) and which move to use based on which space is open by looping through the arrays. Secondly, I don't understand how you would then backtrack with recursion, in the event that an incorrect move was made and you wanted to take that move back in order to choose a different one. This is what I have so far; the "a" array represents the board, the "b" array represents the moves, and the "c" array was my idea of a reminder as to which moves I used already. The functions used are helper functions that basically just loop through the arrays to find an empty space and corresponding move. : void solveGame(int a[15], int b[36][3], int c[15][3]){ int empSpace; int moveIndex; int count = 0; if(pegCount(a) < 2){ return; } else{ empSpace = findEmpty(a); moveIndex = chooseMove( a, b, empSpace); a[b[moveIndex][0]] = 0; a[b[moveIndex][1]] = 0; a[b[moveIndex][2]] = 1; c[count][0] = b[moveIndex][0]; c[count][1] = b[moveIndex][1]; c[count][2] = b[moveIndex][2]; solveGame(a,b,c); } }

    Read the article

  • Position: absolute a div over Flash

    - by Sam
    Is it possible to position: absolute a <div /> over a Flash banner without adding wmode="transparent" to the banner? I have a lightbox that needs to appear above my ads but I can't directly modify the banners as they come from a third party.

    Read the article

  • Pass parameters to Windows Service to fire method

    - by Sam Youtsey
    Hi there, I'm attempting to build a Windows Service which will execute some method when a user clicks a button in a WinForms application. I'd like to be able to pass in a few strings when the user presses the GUI button which will have the service consume them and processes a specific method. What's the best way to do this? Thanks for help.

    Read the article

< Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >