Search Results

Search found 339 results on 14 pages for 'keith larson'.

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

  • Python - Linux - Connecting to MS SQL with Windows Credentials - FreeTDS+UnixODBC + pyodbc or pymssq

    - by Keith P
    There doesn't seem to be any great instructions for setting this up. Does anyone have any good instructions? I am a linux noob so be gentle. I did see another post that is similar, but no real answer. I have a couple of problems. FreeTDS doesn't "seem" to be working. I am trying to connect and I get the following message using the "tsql" command: "Default database being set to databaseName There was a problem connecting to the server" but it doesn't mention what the problem is. The error I get when I try to connect using pyodbc is: "pyodbc.Error: ('08S01', '[08S01] [unixODBC][FreeTDS][SQL Server]Unable to connect: Adaptive Server is unavailable or does not exist (20009) (SQLDriverConnectW)')" I tried something similar with pymssql, but I ran into similar issues. I keep getting errors that I can't connect, but it doesn't tell me why.

    Read the article

  • jQuery CSS plugin that returns computed style of element to pseudo clone that element?

    - by Keith Bentrup
    I'm looking for a way using jQuery to return an object of computed styles for the 1st matched element. I could then pass this object to another call of jQuery's css method. For example, with width, I can do the following to make the 2 divs have the same width: $('#div2').width($('#div1').width()); It would be nice if I could make a text input look like an existing span: $('#input1').css($('#span1').css()); where .css() with no argument returns an object that can be passed to .css(obj). (I can't find a jQuery plugin for this, but it seems like it should exist. If it doesn't exist, I'll turn mine below into a plugin and post it with all the properties that I use.) Basically, I want to pseudo clone certain elements but use a different tag. For example, I have an li element that I want to hide and put an input element over it that looks the same. When the user types, it looks like they are editing the element inline. I'm also open to other approaches for this pseudo cloning problem for editing. Any suggestions? Here's what I currently have. The only problem is just getting all the possible styles. This could be a ridiculously long list. jQuery.fn.css2 = jQuery.fn.css; jQuery.fn.css = function() { if (arguments.length) return jQuery.fn.css2.apply(this, arguments); var attr = ['font-family','font-size','font-weight','font-style','color', 'text-transform','text-decoration','letter-spacing','word-spacing', 'line-height','text-align','vertical-align','direction','background-color', 'background-image','background-repeat','background-position', 'background-attachment','opacity','width','height','top','right','bottom', 'left','margin-top','margin-right','margin-bottom','margin-left', 'padding-top','padding-right','padding-bottom','padding-left', 'border-top-width','border-right-width','border-bottom-width', 'border-left-width','border-top-color','border-right-color', 'border-bottom-color','border-left-color','border-top-style', 'border-right-style','border-bottom-style','border-left-style','position', 'display','visibility','z-index','overflow-x','overflow-y','white-space', 'clip','float','clear','cursor','list-style-image','list-style-position', 'list-style-type','marker-offset']; var len = attr.length, obj = {}; for (var i = 0; i < len; i++) obj[attr[i]] = jQuery.fn.css2.call(this, attr[i]); return obj; } Edit: I've now been using the code above for awhile. It works well and behaves exactly like the original css method with one exception: if 0 args are passed, it returns the computed style object. As you can see, it immediately calls the original css method if that's the case that applies. Otherwise, it gets the computed styles of all the listed properties (gathered from Firebug's computed style list). Although it's getting a long list of values, it's quite fast. Hope it's useful to others.

    Read the article

  • Entity Framework - Merging 2 physical tables into one "virtual" table problems...

    - by Keith Barrows
    I have been reading up on porting ASP.NET Membership Provider into .NET 3.5 using LINQ & Entities. However, the DB model that every single sample shows is the newer model while I've inherited a rather old model. Differences: The User Table is split into a pair of User & Membership Tables. All of the tables in the DB are prepended with aspnet_ I have Lowered versions of some columns (UserName, Email, etc) To work with this I have copied the properties from the Membership table into the User table (in the DB this is a 1<-1 relationship, not a 1<-0,1), renamed aspnet_Applications to Application, aspnet_Profiles to Profile, aspnet_Users to User and aspnet_Roles to Role. (See image) Link to full size image of model Now, I am running into one of 2 problems when I try to compile. Using the model in the image I get this error: Problem in Mapping Fragment starting at line 464: EntitySets 'UserSet' and 'aspnet_Membership' are both mapped to table 'aspnet_Membership'. Their Primary Keys may collide. If I delete the aspnet_Membership table from my model (to handle the above error) I then get: Problem in Mapping Fragment starting at line 384: Column aspnet_Membership.ApplicationId in table aspnet_Membership must be mapped: It has no default value and is not nullable. My ability to hand edit the backing stores is not the best and I don't want to just hack something in that may break other things. I am looking for suggestions, best practices, etc to handle this. Note: Moving the data tables themselves is not an option as I cannot replace all the logic in the existing apps. I am building this EF Provider for a new App. Over the next 6 months the old app(s) will migrate bit-by-bit to the new structures. Note: I added a link just under the image to the full size image for better viewing.

    Read the article

  • "Cannot open user default database" error with "User Instance=True"

    - by Keith
    I have a desktop application that uses Sql user instancing. This is my connection string: "Data Source=.\SqlExpress; AttachDbFilename=C:\path\file.mdf; Integrated Security=True; User Instance=True; Connect Timeout=100;" My application creates this DB, downloads a load of data into it from a web service and then does a lot of actions with it. The problem comes when I attempt to re-open the connection. I get a SqlException: "Cannot open user default database. Login failed. Login failed for user 'myDomain\myusername'." This error makes no sense in this context - I have no default database. I'm logging in to an instance created just for the current application, running separately from SqlExpress. There's no other way to connect to this DB. If I start the SqlExpress service and connect to the default instance it won't be visible. It only exists for this application. The file on disk is locked by the SqlExpress instance service running under the application. if I stop the app and restart it the connection works first time, but fails on re-opening. If I just stop the app I can delete the .mdf files and begin again, but it still crashes when I re-open the connection. As my app started the instance running as me my current user should have access to every DB in the instance. This doesn't happen for other users of the same code, which suggests that it's a SQL config issue. Does anyone have any idea what causes this and how to work around it?

    Read the article

  • iPhone GPS Development - Tips + Tricks

    - by Keith Fitzgerald
    Hello - I'm looking for some feedback, blog links, etc that offer some tips and tricks for iPhone GPS development. I've read and understand the API, I have my demo app up and running, etc but I have run into some "quirks" with gps on iphone. For example, it seems that you you will receive a lot less location updates when your iphone enters "power save" mode. I've read that you can combat this by playing music in your application [not sure if this is true]. It also seems that, terms of making a reasonable pedometer, you should filter out any reading with horizontal accuracies less than 20 meters. Does this sound right? Is there any kind of checklist out on the web for iphone gps gotchas? Thanks in advance.

    Read the article

  • Problem installing RMagick rubygem on Centos 5

    - by Keith Pitty
    I'm having problems installing the RMagick rubygem on Centos 5. I've followed the steps detailed in http://rmagick.rubyforge.org/install2-linux.html but when I try: sudo gem install rmagick the result is: Building native extensions. This could take a while... ERROR: Error installing rmagick: ERROR: Failed to build gem native extension. /usr/local/bin/ruby extconf.rb checking for Ruby version >= 1.8.5... yes checking for gcc... yes checking for Magick-config... no Can't install RMagick 2.11.0. Can't find Magick-config in /usr/bin:/bin *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/local/bin/ruby Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/rmagick-2.11.0 for inspection. Results logged to /usr/local/lib/ruby/gems/1.8/gems/rmagick-2.11.0/ext/RMagick/gem_make.out The directory /usr/local/bin contains Magick-config but I haven't been able to get rubygems to look there. I tried the following but the result was the same: sudo gem install rmagick -- --with-opt-dir=/usr/local/bin Any suggestions would be appreciated.

    Read the article

  • How to temporarily replace one primitive type with another when compiling to different targets in c#

    - by Keith
    How to easily/quickly replace float's for doubles (for example) for compiling to two different targets using these two particular choices of primitive types? Discussion: I have a large amount of c# code under development that I need to compile to alternatively use float, double or decimals depending on the use case of the target assembly. Using something like “class MYNumber : Double” so that it is only necessary to change one line of code does not work as Double is sealed, and obviously there is no #define in C#. Peppering the code with #if #else statements is also not an option, there is just too much supporting Math operators/related code using these particular primitive types. I am at a loss on how to do this apparently simple task, thanks! Edit: Just a quick comment in relation to boxing mentioned in Kyles reply: Unfortunately I need to avoid boxing, mainly since float's are being chosen when maximum speed is required, and decimals when maximum accuracy is the priority (and taking the 20x+ performance hit is acceptable). Boxing would probably rules out decimals as a valid choice and defeat the purpose somewhat. Edit2: For reference, those suggesting generics as a possible answer to this question note that there are many issues which count generics out (at least for our needs). For an overview and further references see Using generics for calculations

    Read the article

  • How can you centre an image within the image control in SQL Server Reporting Services 2008?

    - by Keith
    I have got an image in an image control on a report in SSRS 2008. The image is coming from an external source, and varies in width. I would like to centre the image within the control, but the image control does not have an equivalent of the text box's TextAlign property to allow right/left/center alignment to be done automatically. I have seen methods to dynamically calculate the amount of left padding as a hack to solve this, http://blogs.msdn.com/chrishays/archive/2004/10/27/CenteredImages.aspx, but the solution gives an error in SSRS 2008, perhaps not surprising given the age of the article. Has anybody got a solution to this for SSRS 2008?

    Read the article

  • Can you recommend an alternative for NCover?

    - by Keith
    I'm looking for a good .Net code coverage alternative to NCover (insufficient .Net 3.5 coverage and now pay-for) or VSTS (way too expensive). We currently test with NUnit, but could switch to something with a similar 'layout' for its text fixtures if it were better integrated.

    Read the article

  • Using Word COM objects in .NET, InlineShapes not copied from template to document

    - by Keith
    Using .NET and the Word Interop I am programmatically creating a new Word doc from a template (.dot) file. There are a few ways to do this but I've chosen to use the AttachedTemplate property, as such: Dim oWord As New Word.Application() oWord.Visible = False Dim oDocuments As Word.Documents = oWord.Documents Dim oDoc As Word.Document = oDocuments.Add() oDoc.AttachedTemplate = sTemplatePath oDoc.UpdateStyles() (I'm choosing the AttachedTemplate means of doing this over the Documents.Add() method because of a memory leak issue I discovered when using Documents.Add() to open from templates.) This works fine EXCEPT when there is an image (represented as an InlineShape) in the template footer. In that case the image does not appear in the resulting document. Specifically the image should appear in the oDoc.Sections.Item(1).Footers.Item(WdHeaderFooterIndex.wdHeaderFooterPrimary).Range.InlineShapes collection but it does not. This is not a problem when using Documents.Add(), however as I said that method is not an option for me. Is there an extra step I have to take to get the images from the template? I already discovered that when using AttachedTemplate I have to explicitly call UpdateStyles() (as you can see in my code snippet) to apply the template styles to the document, whereas that is done automatically when using Documents.Add(). Or maybe there's some crazy workaround? Your help is much appreciated! :)

    Read the article

  • Visual Studio 2008 setup looking at wrong drive

    - by Keith G
    I'm trying to add a feature to VS 2008. However, the initial install was done with a DVD in drive D: ... I don't currently have the DVD, so I'm trying to do the updating using an .iso mounted as drive E: ... The VS setup program is not able to find the setup files. Is there a way for me to tell VS 2008 setup to look for files in E: instead of D:? Maybe a registry or ini setting? Edit: The specific error message I got was: A selected drive is no longer valid

    Read the article

  • Newbie question: How do you layout an icon, 2 text lines and a button?

    - by Keith Barrows
    I am trying to extend a sample I found at http://developer.android.com/resources/articles/layout-tricks-efficiency.html. I am a brand new MonoDroid developer, just installed it yesterday, and trying to jump right into UI design and so far it is not clicking for me completely. I have this main.xml: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="?android:attr/listPreferredItemHeight" android:padding="6dip"> <ImageView android:id="@+id/icon" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentTop="true" android:layout_alignParentBottom="true" android:layout_marginRight="6dip" android:src="@drawable/icon" /> <TextView android:id="@+id/secondLine" android:layout_width="200dip" android:layout_height="26dip" android:layout_toRightOf="@id/icon" android:layout_alignParentBottom="true" android:layout_alignParentRight="true" android:singleLine="true" android:ellipsize="marquee" android:text="Second line which is a long line of text and needs to scroll" /> <TextView android:id="@+id/firstLine" android:layout_width="200dip" android:layout_height="wrap_content" android:layout_toRightOf="@id/icon" android:layout_alignParentRight="true" android:layout_alignParentTop="true" android:layout_above="@id/secondLine" android:layout_alignWithParentIfMissing="true" android:singleLine="true" android:ellipsize="marquee" android:gravity="center_vertical" android:text="First line" /> <Button android:id="@+id/logonButton" android:layout_width="50dip" android:layout_height="wrap_content" android:layout_toRightOf="@id/secondLine" android:layout_alignParentRight="true" android:layout_alignParentTop="true" android:gravity="center_vertical" android:text="Login" /> /> </RelativeLayout> What I am trying to do is have an icon on the left, 2 lines of text stacked in the middle and a button on the right. When I run this in my emulator I am seeing: The second line is not scrolling. The button does not show up. Is there by any chance a simple WYSIWYG editor for layout? Or is there an app to give me a quick view of my layout XML? Something like FireBug in FireFox would be fine. Barring the slim chance there are UI helpers for Droid, what am I doing wrong? :)

    Read the article

  • "The binary you uploaded was invalid. the file was not a valid zip file" Error message uploading app

    - by Keith Loughnane
    Hi, I'm trying to upload an iPhone app binary to iTunesConnect and keep getting the following error message "The binary you upload was invalid. the file was not a valid zip file". I had an app upload ok recently but this app is having problems. So after a while I carefully went through the following steps trying to make sure everything was ok. Any help is appreciated. The steps: renamed the project (Project-Rename... enter name into Rename project to:) to release name making sure the name has no spaces. Cleaned project Make sure references in build setting reflect new app name Create new app ID matching project name in iPhone Provisioning Portal Destroyed old developer and distributer provisioning profiles in Provisioning Portal, in XCode and on iPhone. Create new development provisioning profile using new app name. Install development provisioning profile into XCode 8) Build (Release) for iPhone OS 3.1.3 (highest my phone will upgrade to, I'm assuming current released version) Builds, Installs and Runs on actual iPhone: To me this implys App and developer ID's are OK. Create a distributor provisioning profile using existing Distributer ID. Install distributer ID into XCode Clean Checked that "Code Signing Identity" and "Any iPhone OS Device" lines in Build settings are set to Distributor ID Build for release for OS 3.1.3 Check Build results to make sure code is signed with Distributor Profile Reveal .app file and compress (alt click Compress "appName.app") Upload to iTunes connect Gives "The binary you uploaded was invalid. The file was not a valid zip file"

    Read the article

  • How to get java to recognize symbolic links under cygwin

    - by Keith Randall
    Here's a very simple java program to print the first line of a file: import java.io.* public class test { public static void main(String[] args) throws IOException { System.out.print(new BufferedReader(new FileReader(args[0])).readLine()); } } When I run this program under cygwin and pass it the name of a symbolic link, it prints the contents of the symbolic link, not the target of that link: $ echo foo > testfile $ ln -s testfile symlink_to_testfile $ java test testfile foo $ java test symlink_to_testfile !<symlink> ?t e s t f i l e How do I convince java to follow the symlink? I was hoping there was something simpler than implementing the redirect myself.

    Read the article

  • Is it possible to detect a scrollbar release event in GWT?

    - by Keith
    I'm building a GWT app where I want to be able to detect when a user releases a scroll bar on one of my ScrollPanels. My use case is that the horizontal scroll bar represents time. Since it's impossible to represent the full range of scrollable time I want to just represent a small window of time with the scroll bar. When the user moves and releases the scroll bar I want to do a smooth recentering where the new center is the release point. I can work out how to do this by building a custom scroll bar widget, but I wanted to check if I was missing some way to do it using a "native" scroll bar first.

    Read the article

  • Lazy loading the addthis script? (or lazy loading external js content dependent on already fired eve

    - by Keith Bentrup
    I want to have the addthis widget available for my users, but I want to lazy load it so that my page loads as quickly as possible. However, after trying it via a script tag and then via my lazy loading method, it appears to only work via the script tag. In the obfuscated code, I see something that looks like it's dependent on the DOMContentLoaded event (at least for firefox). Since the DOMContentLoaded event has already fired, the widget doesn't render properly. What to do? I could just use a script tag (slower)... or could I fire (in a cross browser way) the DOMContentLoaded (or equivalent) event? I have a feeling this may not be possible b/c I believe that (like jQuery) there are multiple tests of the content ready event, and so multiple simulated events would have to occur. Nonetheless, this is an interesting problem b/c I have seen a couple widgets now assume that you are including their stuff via static script tags. It would be nice if they wrote code that was more useful to developers concerned about speed, but until then, is there a work around?? And/or are any of my assumptions wrong? Edit: Because the 1st answer to the question seemed to miss the point of my problem, I wanted to clarify the situation. This is about a specific problem. I'm not looking for yet another lazy load script or check if some dependencies are loaded script. Specifically this problem deals with external widgets that you do not have control over and may or may not be obfuscated delaying the load of the external widgets until they are needed or at least, til substantially after everything else has been loaded including other deferred elements b/c of the how the widget was written, precludes existing, typical lazy loading paradigms While it's esoteric, I have seen it happen with a couple widgets - where the widget developers assume that you're just willing to throw in another script tag at the bottom of the page. I'm looking to save those 500-1000 ms** though as numerous studies by yahoo, google, and amazon show it to be important to your user's experience. **My testing with hammerhead and personal experience indicates that this will be my savings in this case.

    Read the article

  • Launching Vim via Lua

    - by Keith Pimmel
    I'm writing a simple little Lua commandline app that will build a static website. I'm storing my fragments in a sqlite database. Retrieving the data from the db is straightforward as is saving it; my question comes from editing the data. Is there an elegant way to pipe the data from Lua to vim? Can vim edit a memory buffer and return it? I was planning on launching the editor via os.execute('vim') but only after grabbing a temporary file handle and dumping the database output into that. I would like to have to avoid touching the filesystem that way but that is my contingency plan.

    Read the article

  • Best way to copy the entire contents of a directory in C#

    - by Keith
    I want to copy the entire contents of a directory from one location to another in C#. There doesn't appear to be a way to do this using System.IO classes without lots of recursion. There is a method in VB that we can use if we add a reference to Microsoft.VisualBasic: new Microsoft.VisualBasic.Devices.Computer(). FileSystem.CopyDirectory( sourceFolder, outputFolder ); This seems like a rather ugly hack. Is there a better way?

    Read the article

  • what's a good way to synchronize a sql server 2008 database from a 2005 database automatically?

    - by Keith Nicholas
    Ok, the scenario is... two servers, on completely different parts of the internet. The sql 2008 database just needs to get data updates and schema changes. It doesn't need to send anything to the 2005 database. Basically just suck data and schema as efficiently as possible automatically as a scheduled task. The database is quite huge.... but the changes per day are probablly around 20/30 megabytes of data/ I can't run any of the inbuilt replication on the 2005 database. I've had a wee look at the Sync Framework, I think that might do what I want, but seems a bit painful and requires a bit of work to get going. I'm wondering if there is tooling out there to make this easier? or?? not quite sure what my options are.

    Read the article

  • GWT removeHandler on first event notification

    - by Keith
    I want to remove a GWT event handler the first time I receive an event. I also want to avoid polluting my class with tracking registration objects that aren't really necessary. I currently have it coded as: final HandlerRegistration[] registrationRef = new HandlerRegistration[1]; registrationRef[0] = dialog.addFooHandler(new FooHandler() { public void onFoo(FooEvent event) { HandlerRegistration removeMe = registrationRef[0]; if(removeMe != null) { removeMe.removeHandler(); } // do stuff here } }); but the use of registrationRef makes the code less readable. Is there a better way to do this without adding variables to my class?

    Read the article

  • How do you make a Custom Data Generator for SQL XML DataType.

    - by Keith Sirmons
    Howdy, I am using Visual Studio 2010 and am playing around with the Database Projects. I am creating a DataGenerationPlan to insert data into a simple table, in which one of the column datatypes is XML. Out of the box, the generation plan uses the Regular Expression generator and generates something like this : HGcSv9wa7yM44T9x5oFT4pmBkEmv62lJ7OyAmCnL6yqXC2X.......... I am looking at creating a custom data Generator for this data type and have followed this site for the basics: http://msdn.microsoft.com/en-us/library/aa833244.aspx This example works if I am creating a string datatype and using it for a nvarchar datatype. What do I need to change to hook this Generator to the XML Datatype? Below are my code files. The string property works for nvarchar. The XElement property does not work for the xml datatype, and the RecordXMLDataGenerator is not listed as an option in the Generator column for the generation plan. CustomDataGenerators: using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Data.Schema.Tools.DataGenerator; using Microsoft.Data.Schema.Extensibility; using Microsoft.Data.Schema; using Microsoft.Data.Schema.Sql; using System.Xml.Linq; namespace CustomDataGenerators { [DatabaseSchemaProviderCompatibility(typeof(SqlDatabaseSchemaProvider))] public class RecordXMLDataGenerator : Generator { private XElement _RecordData; [Output(Description = "Generates string of XML Data for the Record.", Name = "RecordDataString")] public string RecordDataString { get { return _RecordData.ToString(SaveOptions.None); } } [Output(Description = "Generates XML Data for the Record.", Name = "RecordData")] public XElement RecordData { get { return _RecordData; } } protected override void OnGenerateNextValues() { base.OnGenerateNextValues(); XElement element = new XElement("Root", new XElement("Children1", 1), new XElement("Children6", 6) ); _RecordData = element; } } } XML Extensions File: <?xml version="1.0" encoding="utf-8" ?> <extensions assembly="" version="1" xmlns="urn:Microsoft.Data.Schema.Extensions" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:Microsoft.Data.Schema.Extensions Microsoft.Data.Schema.Extensions.xsd"> <extension type="CustomDataGenerators.RecordXMLDataGenerator" assembly="CustomDataGenerators, Version=1.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxxxxx" enabled="true"/> </extensions> Table.sql: CREATE TABLE [dbo].[Record] ( id int IDENTITY (1,1) NOT NULL, recordData xml NULL, userId int NULL, test nvarchar(max) NULL, rowver rowversion NULL, CONSTRAINT pk_RecordID PRIMARY KEY (id) )

    Read the article

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