Search Results

Search found 494 results on 20 pages for 'craig shearer'.

Page 11/20 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • How to upgrade a VB6 app with .NET components

    - by Craig Johnston
    I want to make a change to a VB6 app which consists of a .EXE, no VB6 DLLs but a handful of .NET DLLs. The interop is achieved by a one of the .NET dlls being referenced by the VB6 app which seems to require REGASM-ing of an associated .tlb file. If I want to change only the VB6 app .exe, could I just compile it and drop it into the app folder on existing installations or are there going to be binding issues?

    Read the article

  • dynamic check_box using field_for in rails

    - by Craig Whitley
    I have a many-to-many relationship with a link box, and I want to pull those models together into one form so I can update from the same page. I'm really struggling with getting the check_box to even show all the elements of my array - I've scoured the net and been working on this literally all day, and I'm finding it difficult to apply the information I'm reading to my problem. I'm also extremely new to RoR and I've been following a bit of an outdated video tutorial (pre 2.0) so apologies for my code. So far, I've got it to output only one key pair in the array (the last one) - although outside the form, the code used in the tutorial works exactly how it should. Thats of little use though! Host is the model for which the main form is for, and Billing is the outside model that I'm trying to add to the form. This is the code that works outside of the form from the tutorial: <% for billing in @billings -%> <%= check_box_tag('billing_title[]', billing.id, @host.billings.collect {|obj| obj.id}.include?(billing.id))%> <%= billing.title %><br /> <% end -%> I just need to know how to make it work inside the form. This is the aforementioned code that only retrieves the last array keypair after looping through them: <% f.fields_for :billings do |obj| %><br /> <%= check_box_tag('billing_title[]', billing.id, @billings.collect {|obj| obj.id}.include?(billing.id))%> <%= billing.title %><br /> <% end %> The debug(@billings) : --- - !ruby/object:Billing attributes: title: Every Month id: "1" attributes_cache: {} - !ruby/object:Billing attributes: title: 12 Months id: "2" attributes_cache: {} - !ruby/object:Billing attributes: title: 6 Months id: "5" attributes_cache: {} Any help really appreciated.

    Read the article

  • Strategy for converting a VB6 app to .NET

    - by Craig Johnston
    Would it be a good idea to start converting forms into .NET one at a time which you would then invoke from the VB6 app via COM-interop. This way, by the end of the process you would just convert the 'shell' of the VB6 application into a new .NET app, and all your forms are ready to go in .NET. Is there a better strategy?

    Read the article

  • LinkButton Click event ignored

    - by Craig
    I have the following Hyperlink as a button:- <asp:LinkButton ID="loginButton" runat="server" CssClass="loginButton" Text="LOGIN" OnClientClick="return validateLogin(memNoID,pwID)" AddressOf="loginButton.Click"></asp:LinkButton> It causes a postback but only executes the onload and prerender sections of code. It totally ignores the following function signature:- Protected Sub loginButton_Click(ByVal sender As Object, ByVal e As EventArgs) Some code End Sub Any pointers appreciated.

    Read the article

  • How to structure Python package that contains Cython code

    - by Craig McQueen
    I'd like to make a Python package containing some Cython code. I've got the the Cython code working nicely. However, now I want to know how best to package it. For most people who just want to install the package, I'd like to include the .c file that Cython creates, and arrange for setup.py to compile that to produce the module. Then the user doesn't need Cython installed in order to install the package. But for people who may want to modify the package, I'd also like to provide the Cython .pyx files, and somehow also allow for setup.py to build them using Cython (so those users would need Cython installed). How should I structure the files in the package to cater for both these scenarios? The Cython documentation gives a little guidance. But it doesn't say how to make a single setup.py that handles both the with/without Cython cases.

    Read the article

  • Profiling statements inside a User-Defined Function

    - by Craig Walker
    I'm trying to use SQL Server Profiler (2005) to track down some application performance problems. One of the calls being made is to a table-valued user-defined function. This function wraps a select that joins several tables together. In SQL Server Profiler, the call to the UDF is logged. However, the select that underlies the UDF isn't being logged at all. Because of this, I'm not getting useful data on which tables & indexes are being hit. I'd like to feed this info into the Database Tuning Advisor for some indexing advice. Is there any way (short of unwrapping the queries themselves) to log the tables called by UDFs in Profiler?

    Read the article

  • Create a flexible, localized, Ruby-on-Rails list-of-values

    - by Craig
    I have a list of values (Beginner, Intermediate, Advanced, Fluent, Native) that I would like to: act as the model for a SELECT list act as a model to convert ids to values in a HTML table use in multiple controllers and views keep in an order that preserves the business rules (ordered by skill level) localize at some point in the future Is there a way of implementing this list to address all or most of my needs?

    Read the article

  • What DVCS support Unicode filenames?

    - by Craig McQueen
    I'm interested in trying out distributed version control systems. git sounds promising, but I saw a note somewhere for the Windows port of git that says "don't use non-ASCII filenames". I can't find that now, but there is this link. It's put me off git for now, but I don't know if the other options are any better. Support for non-ASCII filenames is essential for my Japanese company. I'm looking for one that internally stores filenames as Unicode, not a platform-dependent encoding which would cause endless grief. So: What DVCS support Unicode filenames? In both Windows and Linux? Ideally, with the possibility to transfer repositories between Windows and Linux machines with minimal issues?

    Read the article

  • Etiquette for adding repository during rpm/deb install

    - by Craig Peterson
    We're distributing a commercial application for Linux and we currently make it available for download as a .tar.gz, a .rpm, and a .deb. We're setting up both RPM and DEB repositories to make upgrading easier. Is it appropriate to add our repository to /etc/apt/sources.list or /etc/yum.repos.d automatically as part of the initial install? Are there any good reasons not to?

    Read the article

  • Pulling a timestamp from an XML feed with PHP but seem to be to many digits

    - by Craig Ward
    I am pulling a timestamp from a feed and it gives 12 digits (1269088723811). When I convert it, it comes out as 1901-12-13 20:45:52, but if I put the timestamp into http://www.epochconverter.com/ it comes out as Sat, 20 Mar 2010 12:38:43 GMT, which is the correct time. epochconverter.com mentions that it maybe in milliseconds so I have amended the script to take care of it using $mil = $timestamp; $seconds = $mil / 1000; $date = date('Y-m-d H:i:s', date($seconds)); but it still converts the date wrong, 1970-01-25 20:31:23. What am I doing wrong?

    Read the article

  • Can FAXCOMEXLib and Windows Fax Service send a color fax?

    - by Craig
    We are in the process of testing different options for sending faxes from within our C# code (receiving faxes is not necessary). One of those options is to use FAXCOMEXLib. Without surprise, I've had pretty good success sending out black & white faxes with FAXCOMExLib. But we also have a requirement to support sending color faxes. So I execute the following code (just a snippet): IFaxDocument oFaxDoc = new FaxDocumentClass(); oFaxDoc.Body = @"C:\Test\color_image.jpg"; oFaxDoc.ConnectedSubmit(m_oFaxServer); The image is 24bit color, 1728x2304, 204x196 dpi. For the most part, this process works (with a couple of small quirks) and the fax shows up in my "Windows Fax and Scan" outbox (I'm on Vista). The problem is the image has been dithered to a 1bit black & white image. I assume that what I see in "Windows Fax and Scan" is what is actually transmitted. So is there a way to send a color fax using this technology? Are we missing a configuration option somewhere to make it work?

    Read the article

  • Uncompress OpenOffice files for better storage in version control

    - by Craig McQueen
    I've heard discussion about how OpenOffice (ODF) files are compressed zip files of XML and other data. So making a tiny change to the file can potentially totally change the data, so delta compression doesn't work well in version control systems. I've done basic testing on an OpenOffice file, unzipping it and then rezipping it with zero compression. I used the Linux zip utility for my testing. OpenOffice will still happily open it. So I'm wondering if it's worth developing a small utility to run on ODF files each time just before I commit to version control. Any thoughts on this idea? Possible better alternatives? Secondly, what would be a good and robust way to implement this little utility? Bash shell that calls zip (probably Linux only)? Python? Any gotchas you can think of? Obviously I don't want to accidentally mangle a file, and there are several ways that could happen. Possible gotchas I can think of: Insufficient disk space Some other permissions issue that prevents writing the file or temporary files ODF document is encrypted (probably should just leave these alone; the encryption probably also causes large file changes and thus prevents efficient delta compression)

    Read the article

  • Syntax to change the value of a cached object property

    - by Craig
    In an ASP.NET 3.5 VB web app, I successfully manage to cache an object containing several personal details such as name, address, etc. One of the items is CreditNum which I'd like to change in the cache on the fly. Is there a way to access this directly in the cache or do I have to destroy and rebuild the whole object just to change the value of objMemberDetails.CreditNum? The cache is set using: Public Shared Sub CacheSet(ByVal key As String, ByVal value As Object) Dim userID As String = HttpContext.Current.User.Identity.Name HttpContext.Current.Cache(key & "_" & userID) = value End Sub

    Read the article

  • MacRuby - CLLocation Properties Not Accessible

    - by Craig Williams
    Anyone know why this works in Objective-C but not in MacRuby? Objective-C Version: CLLocation *loc = [[CLLocation alloc] initWithLatitude:38.0 longitude:-122.0]; NSLog(@"Lat: %.2f", loc.coordinate.latitude); NSLog(@"Long: %.2f", loc.coordinate.longitude); [loc release]; // Results: // 2010-04-30 16:48:55.568 OCCoreLocationTest[70030:a0f] Lat: 38.00 // 2010-04-30 16:48:55.570 OCCoreLocationTest[70030:a0f] Long: -122.00 Here is the MacRuby version with results: loc = CLLocation.alloc.initWithLatitude(38.0, longitude:-122.0) puts loc.class # => CLLocation puts loc.description # => <+38.00000000, -122.00000000> +/- 0.00m (speed -1.00 mps / course -1.00) @ 2010-04-30 16:37:47 -0600 puts loc.respond_to?(:coordinate) # => true puts loc.coordinate.latitude # => Error: unrecognized runtime type `{?=dd}' (TypeError)

    Read the article

  • rails named_scope ignores eager loading

    - by Craig
    Two models (Rails 2.3.8): User; username & disabled properties; User has_one :profile Profile; full_name & hidden properties I am trying to create a named_scope that eliminate the disabled=1 and hidden=1 User-Profiles. The User model is usually used in conjunction with the Profile model, so I attempt to eager-load the Profile model (:include = :profile). I created a named_scope on the User model called 'visible': named_scope :visible, { :joins => "INNER JOIN profiles ON users.id=profiles.user_id", :conditions => ["users.disabled = ? AND profiles.hidden = ?", false, false] } I've noticed that when I use the named_scope in a query, the eager-loading instruction is ignored. Variation 1 - User model only: # UserController @users = User.find(:all) # User's Index view <% for user in @users %> <p><%= user.username %></p> <% end %> # generates a single query: SELECT * FROM `users` Variation 2 - use Profile model in view; lazy load Profile model # UserController @users = User.find(:all) # User's Index view <% for user in @users %> <p><%= user.username %></p> <p><%= user.profile.full_name %></p> <% end %> # generates multiple queries: SELECT * FROM `profiles` WHERE (`profiles`.user_id = 1) ORDER BY full_name ASC LIMIT 1 SHOW FIELDS FROM `profiles` SELECT * FROM `profiles` WHERE (`profiles`.user_id = 2) ORDER BY full_name ASC LIMIT 1 SELECT * FROM `profiles` WHERE (`profiles`.user_id = 3) ORDER BY full_name ASC LIMIT 1 SELECT * FROM `profiles` WHERE (`profiles`.user_id = 4) ORDER BY full_name ASC LIMIT 1 SELECT * FROM `profiles` WHERE (`profiles`.user_id = 5) ORDER BY full_name ASC LIMIT 1 SELECT * FROM `profiles` WHERE (`profiles`.user_id = 6) ORDER BY full_name ASC LIMIT 1 Variation 3 - eager load Profile model # UserController @users = User.find(:all, :include => :profile) #view; no changes # two queries SELECT * FROM `users` SELECT `profiles`.* FROM `profiles` WHERE (`profiles`.user_id IN (1,2,3,4,5,6)) Variation 4 - use name_scope, including eager-loading instruction #UserConroller @users = User.visible(:include => :profile) #view; no changes # generates multiple queries SELECT `users`.* FROM `users` INNER JOIN profiles ON users.id=profiles.user_id WHERE (users.disabled = 0 AND profiles.hidden = 0) SELECT * FROM `profiles` WHERE (`profiles`.user_id = 1) ORDER BY full_name ASC LIMIT 1 SELECT * FROM `profiles` WHERE (`profiles`.user_id = 2) ORDER BY full_name ASC LIMIT 1 SELECT * FROM `profiles` WHERE (`profiles`.user_id = 3) ORDER BY full_name ASC LIMIT 1 SELECT * FROM `profiles` WHERE (`profiles`.user_id = 4) ORDER BY full_name ASC LIMIT 1 Variation 4 does return the correct number of records, but also appears to be ignoring the eager-loading instruction. Is this an issue with cross-model named scopes? Perhaps I'm not using it correctly. Is this sort of situation handled better by Rails 3?

    Read the article

  • Rail plugin acts_as_taggable_on :through

    - by Craig
    I have two models: class Employee < ActiveRecord::Base has_many :projects end class Project < ActiveRecord::Base acts_as_taggable_on :skills, :roles end I would like to find Employees using the tags associated with their projects. The geokit-rails plugin supports a similar concept, using its ':through' relationship. Ideally, I would be able to: specify which tags (i.e. skills, roles) would be included in the conditions order the employees by the total number of projects with matching tags be able to access the matching-tag count for each employee for the purposes of building a tag cloud Any thoughts would be appreciated.

    Read the article

  • .NET: How does the use of components in .NET differ to pre-.NET?

    - by Craig Johnston
    How does the use of components in .NET differ to pre-.NET? I see the differences as: .NET components don't have to be centrally registered on a machine and can merely be invoked at run-time from a specified location if .NET components are 'registered' in the GAC, problems asociated with different versions of the same DLL ("DLL hell") are avoided because each version will have its own id/key which is known to the calling program Is the above correct, and what other relevant differences are there?

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >