Search Results

Search found 2619 results on 105 pages for 'mike garrett'.

Page 8/105 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • sybase - fails to use index unless string is hard-coded

    - by Garrett
    I'm using Sybase 12.5.3 (ASE); I'm new to Sybase though I've worked with MSSQL pretty extensively. I'm running into a scenario where a stored procedure is really very slow. I've traced the issue to a single SELECT stmt for a relatively large table. Modifying that statement dramatically improves the performance of the procedure (and reverting it drastically slows it down; i.e., the SELECT stmt is definitely the culprit). -- Sybase optimizes and uses multi-column index... fast!<br> SELECT ID,status,dateTime FROM myTable WHERE status in ('NEW','SENT') ORDER BY ID -- Sybase does not use index and does very slow table scan<br> SELECT ID,status,dateTime FROM myTable WHERE status in (select status from allowableStatusValues) ORDER BY ID The code above is an adapted/simplified version of the actual code. Note that I've already tried recompiling the procedure, updating statistics, etc. I have no idea why Sybase ASE would choose an index only when strings are hard-coded and choose a table scan when choosing from another table. Someone please give me a clue, and thank you in advance.

    Read the article

  • Show Visual Studio's Source Control Merge Wizard programmatically

    - by Mike
    Hi, I'm developing a Work item Custom Control and I need to use the standard VS's Merge Wizard for items in source control from my code to allow to user choose the target branch, resolve conflicts etc. I'm pretty sure it's possible in some way (even through the reflection), but I just can't find the proper class in any of VS client assemblies (Microsoft.TeamFoundation.VersionControl.Controls.dll, Microsoft.TeamFoundation.VersionControl.Client.dll). Any help will be appreciated. Best regards, Mike

    Read the article

  • Am I compiling with x64 JDK?

    - by Mike
    Hi, Do I have the 64 bit of JDK installed on my machine? My java -version says: C:\Documents and Settings\Administratorjava -version java version "1.6.0_20" Java(TM) SE Runtime Environment (build 1.6.0_20-b02) Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode) Should I expect a performance improvement in using a 64 bit compiler versus a 32 bit one? Thanks, Mike

    Read the article

  • Giving focus to GNOME docked window

    - by mike
    I've got a GTK/GDK docked window that I need to give keyboard focus to, so accelerator keys (shortcuts) work. Does anybody know if GNOME even allows a docked window to have keyboard focus, and if so, how can I enable it? Thanks, Mike

    Read the article

  • Send Redirects To Specific Ports

    - by Garrett
    I have an Rails application server that is listening on port 9000, and is being called through haproxy. All my redirects from that server are being redirected back through port 9000, when they should be sent back on port 80. I am using a combination of haproxy + nginx + passenger. Is there a way to make sure all redirects are being sent through port 80, regardless of what port the actual server is listening on? I don't care if its a haproxy, nginx, Passenger, or Rails change. I just need to make sure most requests unless specified otherwise, are sent back to port 80. Thanks!

    Read the article

  • How can I run a joomla project?

    - by Mike Redford
    Hi guys, I get a joomla template, but I can't run it. I copy it to htdocs folder in Apache(XAMPP) and it return this : "Restricted access" defined('_JEXEC') or die('Restricted access'); // no direct access require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'functions.php'; please kindly advise me, Cheers, Mike

    Read the article

  • Mysql CASE and UPDATE

    - by Rosengusta Garrett
    I asked yesterday how I could update only the first column that was empty. I got this of a answer: UPDATE `names` SET `name_1` = CASE WHEN `name_1` = '' then 'Jimmy' else `name_1` end, `name_2` = CASE WHEN `name_1` != '' and `name_2` = '' then 'Jimmy' else `name_2` end I tried it and it ended up updating every column with 'Jimmy' what's wrong with this? I can't find anything. It could possibly be the structure of the database. So here is what each name_* column is setup like: # Name Type Collation Attributes Null Default Extra 1 name_1 varchar(255) latin1_swedish_ci No None

    Read the article

  • Lighttpd check request headers in configuration

    - by Mike Hayes
    Hi I was wondering if it was possible in the configuration of Lighttpd to read request headers, I've searched and searched.. apparently it's not possible. For example, conditional configuration based upon IP address: $HTTP["remoteip"] == "0.0.0.0" { // Do something } Is there something similar to check headers, for example: $HTTP["X-Some-Header"] == "Value" { // Do something } I'm thinking there isn't but thought I would post here as a last resort. Google didn't help much, and Lighttpd documentation would suggest this is not possible. Thanks Mike

    Read the article

  • How do I maintain coherency between model and view-model in MVVM pattern?

    - by Mike Garrett
    Problem Statement I'm writing a very basic WPF application to alter the contents of a configuration file. The data format is an XML file with a schema. I want to use it as a learning project for MVVM, so I have duly divided the code into Model: C# classes auto-generated from xsd.exe View-Model: View-friendly representation of the Model. View: Xaml and empty code behind I understand how the View-Model can make View-binding a breeze. However, doesn't that leave the View-Model <- Model semantics very awkward? Xsd.exe generates C# classes with arrays for multiple XML elements. However, at the V-VM level you need Observable Collections. Questions: Does this really mean I have to keep two completely different collection types representing the same data in coherence? What are the best practices for maintaining coherence between the Model and the View-Model?

    Read the article

  • Getting started on thunderbird extensions

    - by Mike
    Hello there,       I have beein using Tunderbird for many years now and now i am interested in developing some of my own extensions.       I looked over the documentation on their official website but found little suport for getting started at this.       I have some experience with python, perl, php and would like if you can reccomend me some geting started materials, a "hello world" for this would be great Best regards, Mike

    Read the article

  • Discovering a functional algorithm from a mutable one

    - by Garrett Rowe
    This isn't necessarily a Scala question, it's a design question that has to do with avoiding mutable state, functional thinking and that sort. It just happens that I'm using Scala. Given this set of requirements: Input comes from an essentially infinite stream of random numbers between 1 and 10 Final output is either SUCCEED or FAIL There can be multiple objects 'listening' to the stream at any particular time, and they can begin listening at different times so they all may have a different concept of the 'first' number; therefore listeners to the stream need to be decoupled from the stream itself. Pseudocode: if (first number == 1) SUCCEED else if (first number >= 9) FAIL else { first = first number rest = rest of stream for each (n in rest) { if (n == 1) FAIL else if (n == first) SUCCEED else continue } } Here is a possible mutable implementation: sealed trait Result case object Fail extends Result case object Succeed extends Result case object NoResult extends Result class StreamListener { private var target: Option[Int] = None def evaluate(n: Int): Result = target match { case None => if (n == 1) Succeed else if (n >= 9) Fail else { target = Some(n) NoResult } case Some(t) => if (n == t) Succeed else if (n == 1) Fail else NoResult } } This will work but smells to me. StreamListener.evaluate is not referentially transparent. And the use of the NoResult token just doesn't feel right. It does have the advantage though of being clear and easy to use/code. Besides there has to be a functional solution to this right? I've come up with 2 other possible options: Having evaluate return a (possibly new) StreamListener, but this means I would have to make Result a subtype of StreamListener which doesn't feel right. Letting evaluate take a Stream[Int] as a parameter and letting the StreamListener be in charge of consuming as much of the Stream as it needs to determine failure or success. The problem I see with this approach is that the class that registers the listeners should query each listener after each number is generated and take appropriate action immediately upon failure or success. With this approach, I don't see how that could happen since each listener is forcing evaluation of the Stream until it completes evaluation. There is no concept here of a single number generation. Is there any standard scala/fp idiom I'm overlooking here?

    Read the article

  • How to compose a Matcher[Iterable[A]] from a Matcher[A] with specs testing framework

    - by Garrett Rowe
    If I have a Matcher[A] how do create a Matcher[Iterable[A]] that is satisfied only if each element of the Iterable satisfies the original Matcher. class ExampleSpec extends Specification { def allSatisfy[A](m: => Matcher[A]): Matcher[Iterable[A]] = error("TODO") def notAllSatisfy[A](m: => Matcher[A]): Matcher[Iterable[A]] = allSatisfy(m).not "allSatisfy" should { "Pass if all elements satisfy the expectation" in { List(1, 2, 3, 4) must allSatisfy(beLessThan(5)) } "Fail if any elements do not satisfy the expectation" in { List(1, 2, 3, 5) must notAllSatisfy(beLessThan(5)) } } }

    Read the article

  • Showing value of UISlider inside App Prefs?

    - by Garrett H
    I have a settings bundle, working perfectly, that I would like to customize a bit. I have, among other things, a PSSliderSpecifier and a PSTitleValueSpecifier. What I would like to do is change the value of the PSTitleValueSpecifier to show the current value of the slider, preferably updating every time the slider's value changes (Actually, what I'd like even more would be displaying the slider's value on the same row as the slider). I know the settings bundle is rather strict about what you're allowed to do in it, but is there any way of doing this?

    Read the article

  • keyboard layout direction

    - by mike
    hi, I would like to detect the direction of the current typing (input) language. I may detect the language by means of "GetKeyboardLayout", but then I'll have to check if it equals to Arabic or Hebrew and so on, is there any way just to detect the direction, i.e. left to right or right to left. thanks! mike.

    Read the article

  • How to know the next temp file to be created in windows?

    - by Mike
    I am by no means a programmer but currently am wondering if an application creates a temp file that windows names. For example the file it creates is tmp001, is there a way i can take that name tmp001 and ask windows to give me the next temp file it would create before it creates it. Thanks, Mike

    Read the article

  • TeamCity Mercurial, How to handle tags and releases

    - by Garrett
    Hi First off, i'm new to Teamcity comming from CC. I have a server up and running and building my projects, so far so good :). My problem is this: Whenever I make a Mercurial Tag, I would like TeamCity to react in a special way, so that the resulting binaries/artifacts from the Tag build, are made avaliable for download (automatic release when tagging). In short can I do automated release so that when I create a Tag AND it builds successfully then the result is copied to some location X, but ONLY when I Tag. Im pretty sure that this can be done, but when I read the posts around the net and read the documentation, I tend to get a little confused about artifacts/build scripts/publishing and how to do it. Can anyone give me some hints about where/how to start or guide me to a location with a tutorial/example of how to do this? I want it soooooo bad :-D. Kind regards

    Read the article

  • Basic javascript function

    - by McDan Garrett
    I have this function working <script type="text/javascript"> $(window).scroll(function() { if ($(window).scrollTop() == $(document).height() - $(window).height()) { $('div#loadmoreajaxloader').show(); $.ajax({ url: "loadmore.php?wall=<?php echo $wall; ?>&lastid=" + $(".postitem:last").attr("id"), success: function(html) { if (html) { $("#postswrapper").append(html); $('div#loadmoreajaxloader').hide(); } else { $('div#loadmoreajaxloader').html('<center><font color="white">No more posts to show.</font></center>'); } } }); } }); </script> But I need to have the same stuff happening (on IOS Devices), but instead of it happening when the browser reaches the loadmoreajaxeloader div, I simply need it to happen on an onclick event on a link. Thanks heaps. Tried to add code but didn't format so here it is http://pastebin.com/p2VUqZff

    Read the article

  • Backbone: Easiest way to maintain reference to 'this' for a Model inside callbacks

    - by Garrett
    var JavascriptHelper = Backbone.Model.extend("JavascriptHelper", {}, // never initialized as an instance { myFn: function() { $('.selector').live('click', function() { this.anotherFn(); // FAIL! }); }, anotherFn: function() { alert('This is never called from myFn()'); } } ); The usual _.bindAll(this, ...) approach won't work here because I am never initializing this model as an instance. Any ideas? Thanks.

    Read the article

  • Polymorphic behavior not being implemented

    - by Garrett A. Hughes
    The last two lines of this code illustrate the problem: the compiler works when I use the reference to the object, but not when I assign the reference to an array element. The rest of the code is in the same package in separate files. BioStudent and ChemStudent are separate classes, as well as Student. package pkgPoly; public class Poly { public static void main(String[] arg) { Student[] stud = new Student[3]; // create a biology student BioStudent s1 = new BioStudent("Tom"); // create a chemistry student ChemStudent s2 = new ChemStudent("Dick"); // fill the student body with studs stud[0] = s0; stud[1] = s1; // compiler complains that it can't find symbol getMajor on next line System.out.println("major: " + stud[0].getMajor() ); // doesn't compile; System.out.println("major: " + s0.getMajor() ); // works: compiles and runs correctly } }

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >