Search Results

Search found 1237 results on 50 pages for 'sam'.

Page 27/50 | < Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >

  • SQL Server - Query Short-Circuiting?

    - by Sam Schutte
    Do T-SQL queries in SQL Server support short-circuiting? For instance, I have a situation where I have two database and I'm comparing data between the two tables to match and copy some info across. In one table, the "ID" field will always have leading zeros (such as "000000001234"), and in the other table, the ID field may or may not have leading zeros (might be "000000001234" or "1234"). So my query to match the two is something like: select * from table1 where table1.ID LIKE '%1234' To speed things up, I'm thinking of adding an OR before the like that just says: table1.ID = table2.ID to handle the case where both ID's have the padded zeros and are equal. Will doing so speed up the query by matching items on the "=" and not evaluating the LIKE for every single row (will it short circuit and skip the LIKE)?

    Read the article

  • Eclipse antRunner command line build has wrong dependency build order

    - by Sam Jones
    My team's Eclipse RCP app builds fine from the Eclipse IDE. When I try to build it from the command line, using the antRunner application, it builds the plugins out of order -- a plugin builds before it's dependencies are built, and so can't resolve some of the needed classes. Where should I look to fix this? As far as I can tell, the dependencies are set up correctly (a feature that depends on a plugin that depends on another plugin). I have my build.properties and folder structure set up as specified here. Is there anything else I should look at?

    Read the article

  • Inheritance Problem in Perl OOP

    - by Sam
    Hello, I have a sub class that calls a method from a super class. and the method in the super class use a method that is defined in the super class as asbstract(not really abstract) but implemented in the sub class. for example: package BaseClass; sub new { } sub method1 { return someAbstractMethod(); } sub someAbtsractMethod { die "oops, this is an abstract method that should be implemented in a subclass" ; } 1; package SubClass; sub new { } sub someAbtsractMethod { print "now we implement the asbtract method"; } 1; now when I do: $sub = new SubClass(); $sub-method1(); It calls the abstract message and i get the specified error message. if I took off the abstractmethod from the super class and just leave the implementation in the subclass, It does not recognize the method and I get subroutine abstractmethod not found error.

    Read the article

  • Java unchecked method invocation

    - by Sam
    I'm trying to setup a multithreaded application using SQLite4java, and everything is working fine. However, according to the getting started tutorial I am meant to create an object of type "object" and in order to return a value of null (due to use of generic types). Here is the suggested code: queue.execute(new SQLiteJob<Object>() { protected Object job(SQLiteConnection connection) throws SQLiteException { // this method is called from database thread and passed the connection connection.exec(...); return null; } }); Source The following example code I created produces the same error: error: test.java:9: warning: [unchecked] unchecked method invocation: <T,J>execute(J) in com.almworks.sqlite4java.SQLiteQueue is applied to (query<java.lang.Integer>) queue.execute(new query<Integer>()); test.java: import com.almworks.sqlite4java.*; import java.util.ArrayList; import java.io.File; class test{ public static void main(String[] args){ File f = new File("file.db"); SQLiteQueue queue = new SQLiteQueue(f); queue.execute(new query<Integer>()); } } query.java: import com.almworks.sqlite4java.SQLiteException; import com.almworks.sqlite4java.SQLiteJob; import com.almworks.sqlite4java.SQLiteConnection; import com.almworks.sqlite4java.SQLiteStatement; import java.util.ArrayList; class query<T> extends SQLiteJob{ protected ArrayList<Integer> job(SQLiteConnection connection) throws SQLiteException{ ArrayList<Integer> ints = new ArrayList<Integer>(); //DB Stuff return ints; } } I have read a lot about how this particular message appears when people fail to specify a type for an ArrayList. However, I am not attempting to cast the object or do anything with it. It is merely a mechanism implemented by the library developers in order to return a null. I do not believe this to be an issue relating directly to the library, which is why I'm asking this on StackOverflow. I believe it all comes down to my lack of experience with generic types. I've already spent a few hours on this and don't feel like I am getting anywhere. How do I stop the warning?

    Read the article

  • Invoke method in another class

    - by Sam
    I have two view controllers (viewControllerA and viewControllerB) with their own views. When the user touches a button in the view of viewControllerA, I am able to load the view of the viewControllerB. However, I don't know how to invoke a method in viewControllerB's class!

    Read the article

  • Is there a future for Powerpoint VBA/VSTO?

    - by Sam Russo
    Does anyone know what the future holds for VBA/VSTO programming in Powerpoint? I've been working on a Office automation project and find it frustrating to work with Powerpoint in particular since it seems to be one level below VBA support found in Excel or Word. It feels like MS is trying to phase out support for VBA in PPT since they dropped macro recording in version 2007 and the object model lacks some key features support.

    Read the article

  • jqGrid local date manipulation; problem with row ids when deleting and adding new rows

    - by Sam
    I'm using jqGrid as a client side grid input, allowing the user to input multiple records before POSTing all the data back at once. I'm having a problem where if the user has added a few records (say 3 ) the id's for the records will be 1,2,3. if the user deletes record 2, you're left with 1 and 3 for the id of the records. When the user now adds a new records, jqGrid assigns that records the id 3 again since it just seems to count the total records and increments it by one for the new record. This causes problems when selecting rows as now the row id's are 1, 3 and 3. Does anyone know how to access the row ids of records as I could probably use the afterSubmit event and reassign the row id's increasing from 1. ( so after i delete row id 2, this will set the other row id's to 1 and 2) Any other suggestions to solve this problem? Thanks

    Read the article

  • Call function under object from string

    - by sam
    I have a script which creates a drag-and-drop uploader on the page from a div. My DIV will look something like <div class="well uploader" data-type="image" data-callback="product.addimage" data-multi="1"></div> Then I'll have a function something like var product = new function(){ /* Some random stuff */ this.addimage = function(image){ alert('W00T! I HAZ AN IMAGE!'); } /* More random stuff */ } When the upload is complete, I need to call the function in data-callback (In this example, product.addimage). I know with global functions you can just do window[callback]() but I'm not sure the best way to do this with functions under objects. My first thought was to do something like* var obj = window; var parts = callback.split('.'); for(part in parts){ obj = obj[parts[part]]; } obj(); but that seems a bit dirty, is there a better way without using eval because eval is evil? I haven't tested this so I have no idea if it will work

    Read the article

  • Glib-Error MYSQL????

    - by sam
    Hi guys, I got this Error when querying MYSQL Database: Glib-Error **: gmem.c:173:falied to allocate 216000000 bytes aborting.. Do anybody have some explanations? I am using MYSQL Query Browser. thanks

    Read the article

  • Site not displaying properly

    - by Sam
    Hi, I created a webforms asp.net site. When I run the site from VWD 2008 express the site displays fine. But I setup the site on IIS 7.5 on localhost. Now when I browse the site I get a page filled with symbols. Eg. ??{???{??;?N'??? What is going on here?

    Read the article

  • Set maven to use archiva repositories WITHOUT using activeByDefault?

    - by Sam Levin
    I am very close to finally having a working setup with archiva and maven. The last thing that's really boggling me, is how to set up my internal and snapshot repositories - without using a profile which contains activeByDefault set to true. I am using a SUPER super pom - a company-wide pom which contains distributionManagement information for releases. I was thinking that I could specify the repositories in this pom, and configure the authentication settings in settings.xml? Can I use repositories tag without a profile? There should be no "profile" for my internal and snapshot repositories, as they will never change... What I'm trying to steer clear from, is using a "default" profile, which is active all the time. I hear activeByDefault is NOT a best practice and I don't intend to use it. With that said, how should I go about doing this? My internal repo is a mirror of the maven central repo, so I would like to lock down my developers to ONLY use our internal artifact server. Remember - I do NOT want a profile with activeByDefault set to true. I cannot stress this enough! Should I use Maven mirrors? Should I "add" additional repositories? If I take the repositories tag instead of the mirrors tag, will maven force builds to use ONLY my archiva settings, instead of the default maven central? Or is what I seek to accomplish able to be done using only the mirrors tag in maven? I know how to configure repo credentials when using repositories tag, but not with mirrors. How is this done? Is providing credentials for anything in mirrors tags the same as for anything in repositories tags? Am I missing something obvious? I've had it up to here with getting things up and running using maven. I know it will be worthwhile in the end, but it is surely causing me a ton of aggravation and resources seem to be sparse. Either that, or people are content using it however they please without regard to best-practices. Thank you

    Read the article

  • Set top level directory to be handled by Perl?

    - by Sam Lee
    I have an Apache server set up to use mod_perl. I have it set up to handle all requests using a Perl module MyModule. Here is part of my httpd.conf: LoadModule perl_module modules/mod_perl.so <Directory /> Order Deny,Allow Allow from all </Directory> PerlModule MyModule <Location /> SetHandler modperl PerlResponseHandler MyModule </Location> This seems to work fine, except top level directory (ie. www.mysite.com/) is not being sent to MyModule. What's going wrong?

    Read the article

  • Auto convert java source to use generic rather than raw types

    - by Sam
    Is there a way/tool to auto convert Java source code from using raw types to using generic types? I have some legacy code with 677 references to raw types: ArrayList 47 Vector 420 Hashtable 61 Enumeration 64 Class 7 Iterator 78 TOTAL 677 Now I could manually look through the code to infer the generic types and replace, but that is going to take a long time.

    Read the article

  • iterate trough each selecter jquery

    - by Sam Vloeberghs
    Hi I'm having problems calculating stuff on my web app. Here is the scenario: I have a html markup like this: <table> <tr> <td><span class="sub_total">10</span></td> </tr> <tr> <td><span class="sub_total">10</span></td> </tr> <tr> <td><span class="sub_total">10</span></td> </tr> </table> <p><span id="total"></span></p> I would like to calculate the main total of all the sub totals: var total; $('.sub_total').each(function(){ total = total + parseInt($(this).text()); }); $('#total').text(total); But I can't get this to work. I get a NaN notification.. Plz help and advice Greeting

    Read the article

  • sudo taking long time

    - by Sam
    On a Ubuntu 9 64bit Linux machine, sudo takes longer time to start. "sudo echo hi" takes 2-3 minutes. strace on sudo tells poll("/etc/pam.d/system-auth", POLLIN) timesout after 5 seconds and there are multiple calls(may be a loop) to same system call (which causes 2-3min delay). Any idea why sudo has to wait for /etc/pam.d/system-auth? Any tunable to make sudo to timeout faster? Thanks Samuel

    Read the article

  • Rails: Helpers and Models - where to organize code

    - by Sam
    More and more I'm putting all of my code in models and helpers concerning MVC. However, sometimes I'm not sure where to organize code. Should it go into the model or should it go into a helper. What are the benefits of each. Is one faster or are they the same. I've heard something about all models getting cached so it seems then like that would be a better place to put most of my code. For example here is a scenario that works in a model or in helper: def status if self.purchased "Purcahsed" elsif self.confirmed "Confirmed" elsif self.reserved "Reserved" else "Pending" end end I don't need to save this status as in the database because there are boolean fields for purchased, and confirmed, and reserved. So why put this in a model or why put it into a helper? So I'm not sure of the best practice or benefits gained on putting code into a model or into helper if it can be in both.

    Read the article

  • Problem storing a hash in DB using Storable::nfreeze in Perl

    - by Sam
    I want to insert a hash in the db using Storable::nfreeze but the data is not inserted properly. My code is as follows: %rec=(); $rec{'name'} = 'my name'; $rec{'address'} = 'my address'; my $order1 = new Order(); $order1->set_session(\%rec); $self->createOrder($order1); sub createOrder { my $self = $_[0]; my $order = $_[1]; # Retrieve the fields to insert into the database. my $st = $dbh->prepare("insert into order (session,.......) values(?,........)"); my $session = %{$order->get_session()}; $st->execute(&Storable::nfreeze(\%session),.....); $st->finish(); } sub getOrder { ... my $session = &Storable::thaw( $ref->{'session'} ); ..... } The thaw is working fine because I tested it withe some rows that have been inserted correctly, but when I try to get a row that was inserted using the createOrder subroutine, I get an error saying: Storable binary image v36.65 more recent than I am (v2.7) at blib/lib/Storable.pm (autosplit into blib/lib/auto/Storable/thaw.al) line 415 The error comes from the line that have thaw. The nfreeze did not store the hash properly. Can someone point me to what I'm doing wrong in the createOrder subroutine? I know the module version have nothing to do with the problem.

    Read the article

  • Can't append space at end of UITextView

    - by Sam V
    I have a UITextView in which I want the initial value to be "@username " (notice the space after the username). This way the user can start typing right away without having to tap space. So I do: textView.text = [NSString stringWithFormat:@"@%@ ", username]; But it seems like it's impossible to have the UITextView text property ending with a space (it always gets stripped out). Am I correct? Is there any workaround for this? I tried using the \s char and no success.

    Read the article

< Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >