Search Results

Search found 988 results on 40 pages for 'andy simpson'.

Page 29/40 | < Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • Differing form size between XP and 7

    - by Andy
    I am developing a C# WinForms app on my XP dev machine with Visual C# Express 2008. I set the form to have a size of my liking with Width and Height on the designer and all looks good. I also set these dimensions to the MaximumSize property. Deploying the app to another XP machine, and the app looks like it does on my dev. However, in testing the app on a Win7 machine, the form has both horizontal and vertical scrollbars applied. I assume that this is due to the changed non-client size of the form, as determined by Win7. I can resize the window, but I would like it to be displayed correctly to begin with. So, my question is: What is the best way to correctly maintain a form size client area across OS'es? Thanks all.

    Read the article

  • Is Classic ADO still viable for a mixed managed/unmanaged App?

    - by Andy Dent
    We have a complex architecture with much logic in unmanaged code that needs database access. Currently this is via ODBC drivers and MFC classes and we're considering the issues of migrating our abstraction layer to use ADO or ADO.Net. In the latter case we'd have to be pushing database logic back up into the .Net layer. I'm trying to decide if the pain of invoking the database via .Net callbacks is offset by the improvements in ADO.Net. The Wikipedia comparison was interesting although I'm not sure I believe all the points in the comparison table (eg: does ADO.Net always use XML to pass data?). A 2005 comparison shows ADO.Net performing dramatically faster. Microsoft's guide to ADO.Net for ADO programmers suggests we will gain much from going to ADO.Net especially the way that data is available in native (.Net) types rather than solely through OLEAutomation's Variant.

    Read the article

  • Codeigniter pre_system hook for DB driven dynamic controller selection - best approach?

    - by Andy
    Although I can tentatively see a solution to this, I was wondering if there may be a glaringly obvious simpler approach. My aim is to use the first segment of a given URI to query the DB as to which controller should be run. I assume I would have to reform the URI with the resultant controller name in segment 1, then allow the system to continue processing as normal (hence a pre_system hook). Although not essential I would also like to hold a couple of other variables from the same DB request to be used later in the call stack, and assume this would have to be done using global variables? Any better suggestions would be gladly received. Thanks.

    Read the article

  • PHP.ini Settings Are Ignored By PHP5.3.5 Running With Windows 7 And Apache 2.2.15

    - by Andy
    I did an install of PHP5.3.5 on Windows 7 Home Premium using the MSI installer download. I got it to overwrite a previous version of PHP5 in C:\php5\ When first testing it, the server failed to start. I fixed this by adding the path to PHP in the Apache2.2 httpd file where the installer had inserted 2 lines of coded pointing to the ini file directory and the PHP DLL but had left out the directory path. After doing this, the server starts ok and I can run phpinfo to view the PHP settings in my web browser on local host. In the phpinfo it states that the loaded configuration file is C:\php5\php.ini as expected. But if I make any changes to the settings, and reboot the server, none of the changes are reflected in phpinfo. Yes, I do refresh the browser window. If I rename the php.ini to something else to make it invisible phpinfo then correctly identifies that there is no php.ini file loaded. So the settings in php.ini are being ignored and some default settings are being used (but I have no idea where these are derived from). As far as I can tell, there are no other php.ini files on my computer. In phpinfo it states that the Configuration File (php.ini) Path is C:\Windows but this is the same as on a Windows XP computer that I work on. And in the windows folder I don't see any php.ini file. In the windows registry, there is no mention of PHP5, and the PATH environment variable starts with C:\php5\; So hopefully someone can suggest how I can get PHP5 to take notice of the C:\php5\php.ini settings. :)

    Read the article

  • What's the best/easiest way to compare two times in Objective-C?

    - by Andy
    I've got a string representation of a time, like "11:13 AM." This was produced using an NSDateFormatter and the stringFromDate: method. I'd like to compare this time to the current time, but when I use the dateFromString: method to turn the string back into a date, a year, month and day are added - which I don't want. I just need to know if right now is < or the time stored in the string. What's going to be the best way to handle that? Thanks in advance for your help.

    Read the article

  • Adding date to multiple fields via datepicker

    - by Andy
    i have a form in drupal with jquery based date module. there are multiple fields with date picker enabled. i want to set the value of all of them (they all have class .date-popup-init) to the value of the first field (#edit-field, the 'from' date) when that field is set. my code so far: <script type="text/javascript"> var DatePicked = function() { var firstdate = $("#edit-field"); var updater = firstdate.datepicker("getDate"); $(".date-popup-init").each(function(){ $(this).datepicker("setDate", updater); }); } $(function() { $("#edit-field").datepicker({ onSelect: DatePicked }); }); </script> this seems to randomly work; it sets the date of some fields to the value of #edit-field, seemingly different fields each time. also, the form adds more datepicker-enabled fields via ajax. is there any way to ensure that all these new fields, when they load, pick up the value of #edit-field as well? disclaimer: last night was my first attempt at javascript of any kind. i have a basic idea now. the above was cobbled through countless google examples.

    Read the article

  • Creating a custom format string in a dataGridView

    - by Andy
    I have a dataGridView whose dataSource is a dataTable. My problem is that I want certain columns to be displayed in Hex. I can get that far with using something like this: foreach (DataGridViewColumn c in grid.Columns) { if (DISPLAYED_IN_HEX.Contains(c.Name)) { c.DefaultCellStyle.Format = "X"; } } My issue though is that I want this hex value prepended with 0x so as not to confuse anyone that they are in hexidecimal form. The values in the dataTable are various integral types. I looked into creating a custom IFormatProvider, but I don't think my coding skills are up to that par yet. Any other possible solutions?

    Read the article

  • Possible for C++ template to check for a function's existence?

    - by andy
    Is it possible to write a C++ template that changes behavior depending on if a certain member function is defined on a class? Here's a simple example of what I would want to write: template<class T> std::string optionalToString(T* obj) { if (FUNCTION_EXISTS(T->toString)) return obj->toString(); else return "toString not defined"; } So if class T has "toString" defined then it uses it, otherwise it doesn't. The magical part that I don't know how to do is the "FUNCTION_EXISTS" part.

    Read the article

  • Anonymous users support vs Google bot

    - by Andy
    I have a User class in my web app that represents a user currently logged in. Every time a user vists a page, a User instance is populated based on authentication data supplied in cookies. A User instance is created even if an anonymous user logs in - and a corresponding new record is created in the User table in the database. This approach allows me to save some state info for the current user regardless of its type. The problem however with this approach is the Google bot, and other non-human web organisms crawling my pages. Every time a bot starts to walk around the site, thousands of useless records will be created in the database, each of them only to be used for a single page. Question: what is the best trade off? How to support anonymous users, save their state, and don't get too much overhead because of cookieless bots?

    Read the article

  • Incrementing value by one over a lot of rows

    - by Andy Gee
    Edit: I think the answer to my question lies in the ability to set user defined variables in MySQL through PHP - the answer by Multifarious has pointed me in this direction Currently I have a script to cycle over 10M records, it's very slow and it goes like this: I first get a block of 1000 results in an array similar to this: $matches[] = array('quality_rank'=>46732, 'db_id'=>5532); $matches[] = array('quality_rank'=>12324, 'db_id'=>1234); $matches[] = array('quality_rank'=>45235, 'db_id'=>8345); $matches[] = array('quality_rank'=>75543, 'db_id'=>2562); I then cycle through them one by one and update the record $mult = count($matches)*2; foreach($matches as $m) { $rank++; $score = (($m[quality_rank] + $rank)/($mult))*100; $s = "UPDATE `packages_sorted` SET `price_rank` = '".$rank."', `deal_score` = '".$score."' WHERE `db_id` = '".$m[db_id]."' LIMIT 1"; } It seems like this is a very slow way of doing it but I can't find another way to increment the field price_rank by one each time. Can anyone suggest a better method. Note: Although I wouldn't usually store this kind of value in a database I really do need on this occasion for comparison search queries later on in the project. Any help would be kindly appreciated :)

    Read the article

  • Useful PowerShell Modules

    - by Andy White
    What are the best or most useful dev-related PowerShell modules that exist today? Not looking for sys admin management tools for Active Directory/Microsoft Exchange/etc., but more for development utilities. Please list one module per answer, so they can be voted up accordingly. I'll provide a few to start off.

    Read the article

  • I would like to flip my app's splash screen - how can I mimic the flipside controller's animation?

    - by Andy
    I've finally gotten a working "alpha" version of my first app installed and (mostly) working on my iPhone 3G. So excited I came into the house and danced a little jig while my wife rolled her eyes at me. Don't care - totally stoked that I figured it out on my own (with lots of help here - thanks again, guys). I've never really dabbled with or cared about animation; I'm more into utility-type apps. However, I've decided that I'd like to animate my app's opening image / default.png / splash screen similar to the flipside view controller animation - where the image spins from a view on the front to a different view on the back. I've found code for animating between views using the flipside animation, but how would I go about animating from a static *.png image to my navigation-based table view? I'm just not even sure where to start with this one - literally the first time I've ever even searched for anything graphics-related in the documentation. Any help will be appreciated. As usual, thanks in advance!

    Read the article

  • Beginner questions regarding Python classes.

    - by Andy
    Hi. I am new to Python so please don't flame me if I ask something too noobish :) 1. Consider I have a class: class Test: def __init__(self, x, y): self.x = x self.y = y def wow(): print 5 * 5 Now I try to create an object of the class: x = Test(3, 4) This works as expected. However, when I try to call the method wow(), it returns an error, which is fixed by changing wow() to: def wow(self) Why do I need to include self and if I don't, what does the method mean?2. In the definition of __init__: def __init__(self, x, y): self.x = x self.y = y Why do I need to declare x and y, when I can do this: def __init__(self): self.x = x self.y = y I hope I am being clear... Thanks for your time.

    Read the article

  • Python coin-toss

    - by Andy
    i am new to Python, and i can't wrap my head around this. I have following function defined: def FlipCoins(num_flips): heads_rounds_won = 0 for i in range(10000): heads = 0 tails = 0 for j in range(num_flips): dice = random.randint(0,1) if dice==1: heads += 1 else: tails += 1 if heads > tails: heads_rounds_won += 1 return heads_rounds_won Here is what it should do (but apparently doesn't): flip a coin num_flip times, count heads and tails, and see if there are more heads than tails. If yes, increment head_rounds_won by 1. Repeat 10000 times. I would assume that head_rounds_won will approximate 5000 (50%). And it does that for odd numbers as input. For example, 3, 5 or 7 will produce about 50%. However, even numbers will produce much lower results, more like 34%. Small numbers especially, with higher even numbers, like for example 800, the difference to 50% is much narrower. Why is this the case? Shouldn't any input produce about 50% heads/tails?

    Read the article

  • Entity Framework 4 Entity with EntityState of Unchanged firing update

    - by Andy
    I am using EF 4, mapping all CUD operations for my entities using sprocs. I have two tables, ADDRESS and PERSON. A PERSON can have multiple ADDRESS associated with them. Here is the code I am running: Person person = (from p in context.People where p.PersonUID == 1 select p).FirstOrDefault(); Address address = (from a in context.Addresses where a.AddressUID == 51 select a).FirstOrDefault(); address.AddressLn2 = "Test"; context.SaveChanges(); The Address being updated is associated with the Person I am retrieveing - although they are not explicitly linked in any way in the code. When the context.SaveChanges() executes not only does the Update sproc for my Address entity get fired (like you would expect), but so does the Update sproc for the Person entity - even though you can see there was no change made to the Person entity. When I check the EntityState of both objects before the context.SaveChanges() call I see that my Address entity has an EntityState of "Modified" and my Person enity has an EntityState of "Unchanged". Why is the Update sproc being called for the Person entity? Is there a setting of some sort that I can set to prevent this from happening?

    Read the article

  • Is there a better way to retrieve unique ID upon INSERT?

    - by Andy
    Hi, I am using the following MS SQL statement to insert records and return the unique auto-inc ID value all in one shot. Wonder if there is a simpler/faster/better way to do it? SET NOCOUNT ON; DECLARE @res table (ID bigint); INSERT INTO [Titles] ([Name],[Timestamp],[Title]) OUTPUT INSERTED.ID INTO @res VALUES ('Name','23 aug 2010','this is a title'); SELECT [ID] FROM @res;

    Read the article

  • Why cant Git merge file changes with a modified parent/master.

    - by Andy
    I have a file with one line in it. I create a branch and add a second line to the same file. Save and commit to the branch. I switch back to the master. And add a different, second line to the file. Save and commit to the master. So there's now 3 unique lines in total. If I now try and merge the branch back to the master, it suffers a merge conflict. Why cant Git simple merge each line, one after the other? My attempt at merge behaves something like this: PS D:\dev\testing\test1> git merge newbranch Auto-merging hello.txt CONFLICT (content): Merge conflict in hello.txt Automatic merge failed; fix conflicts and then commit the result. PS D:\dev\testing\test1> git diff diff --cc hello.txt index 726eeaf,e48d31a..0000000 --- a/hello.txt +++ b/hello.txt @@@ -1,2 -1,2 +1,6 @@@ This is the first line. - New line added by master. -Added a line in newbranch. ++<<<<<<< HEAD ++New line added by master. ++======= ++Added a line in newbranch. ++>>>>>>> newbranch Is there a way to make it slot lines in automatically, one after the other?

    Read the article

  • wordpress use in own template

    - by Andy
    Hi, I've created an HTML page as part of my website which I would like to use as a template for news articles. The page has all the things it needs, it just needs to display the correct news article in it. I installed WordPress on my webserver and now wonder how I can have wordpress publish articles using my HTML page? Is this even possible since WordPress works with php? thanks

    Read the article

  • Is Active Directory required for a team using TFS 2010?

    - by Andy
    I am new to TFS 2010 and wanted to give it a fair try for a small project with a team of 2-3 remote people. Is it a requirement that all my team users are part of an Active Directory network setup? or can I have my team-members to be loosely coupled and be able to login using username/password?

    Read the article

  • Sybase PowerDesigner Change Many (Find/Replace/Convert) Data Item's Data Types

    - by Andy
    Hello, I have a relatively large Conceptual Data Model in PowerDesigner. After generating a Physical Data Model and seeing the DBMS data types, I need to update all of data types(NUMBER/TEXT) for each data item. I'd like to either do a find/replace within the Conceptual Data Model or somehow map to different data types when creating the Physical Data Model. Ex. Change the auto conversion of Text - Clob, to Text - NVARCHAR(20). Thanks!

    Read the article

  • Wordpress post query php custom field conditional

    - by Andy
    Here's the situation: In wordpress I'm trying to reset a post WP_Query so that I can rewrite the post link based on whether or not a custom field exists in the post. I'm trying to give the post a NEW link in the custom field. All I've managed to do here is kill the link entirely. Any and all help is greatly appreciated, I'm pretty green to php. Here's my WP_Query: <?php $recentPosts = new WP_Query(); $recentPosts->query('showposts=3'); ?> <?php while ($recentPosts->have_posts()) : $recentPosts->the_post(); ?> <div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <?php $attribute = the_title_attribute(); $title = the_title(); $key = 'NewPostLink'; $newLink = get_post_meta( $post->ID, $key, TRUE ); if ($newLink != '') { $theLink = get_permalink ($post->ID ); if (has_post_thumbnail()) { $image = get_the_post_thumbnail( $post->ID ); echo '<div class="thumbnailbox"><div class="thumbnail"><a href="'.$theLink.'">'.$image.'</a></div></div>'; echo '<h2><a href="'.$theLink.'" rel="bookmark" title="Permanent Link to '.$attribute.'">'.$title.'</a></h2>'; } else { echo '<h2><a href="'.$theLink.'" rel="bookmark" title="Permanent Link to '.$attribute.'">'.$title.'</a></h2>'; } } else { $theLink = $newLink; if (has_post_thumbnail()) { $image = get_the_post_thumbnail( $post->ID ); echo '<div class="thumbnailbox"><div class="thumbnail"><a href="'.$theLink.'">'.$image.'</a></div></div>'; echo '<h2><a href="'.$theLink.'" rel="bookmark" title="Permanent Link to '.$attribute.'">'.$title.'</a></h2>'; } else { echo '<h2><a href="'.$theLink.'" rel="bookmark" title="Permanent Link to '.$attribute.'">'.$title.'</a></h2>'; } } ?> <small><?php the_time('F jS, Y') ?></small> <div class="entry"> <?php the_excerpt(); ?> </div> </div> <?php endwhile; ?>

    Read the article

  • Does Google appengine cache external requests?

    - by Andy Hume
    I have a very simple application running on appengine that requests a web page every five minutes and parses for a specific piece of data. Everything works fine except that the response I get back from the external request (using urllib2) doesn't reflect the latest changes to the page. Sometimes it takes a few minutes to get the latest, sometimes over an hour. Is there a transparent layer of caching that appengine puts in place? Or is there something else I am missing here? I've looked at the caching headers of the requested page and there is no Expires or LastModified's sent. Update: Sometimes, it will get the new version of the page for a number of requests and then randomly later get an old out of date version.

    Read the article

  • How can I serve static content with Glassfish embedded?

    - by Andy Fiedler
    I'm trying to setup Glassfish embedded with a WAR project that implements a REST API and then some static Javascript content that calls it. I got the WAR to deploy and the REST API is available with a context root of "/Users". How can I use Glassfish to serve static content with a context root of "/". So for example, if the user requests http://myserver.com/Users/some-REST-call it routes to the WAR application and http://myserver.com/somefile.js serves a static file from some directory? Here's my Main class file so far: public class Main{ public static void main(String[] args) throws Exception { String port = System.getenv("PORT"); port = port != null ? port : "8080"; GlassFishProperties gfProps = new GlassFishProperties(); gfProps.setPort("http-listener", Integer.parseInt(port)); GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish(gfProps); glassfish.start(); Deployer deployer = glassfish.getDeployer(); deployer.deploy(new File("target/Users-Rest.war")); } } Thanks a ton for your help!

    Read the article

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