Search Results

Search found 1511 results on 61 pages for 'brian d foy'.

Page 49/61 | < Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >

  • Python breaks for a certain amount

    - by Brian Cox
    All, I am not very good at explaining so i will let my comments do it! #this script is to calculate some of the times table up to 24X24 and also miss some out #Range of numbers to be calculated numbers=range(1,25) for i in numbers: for w in numbers: print(str(i)+"X"+str(w)+"="+str(i*w)) #here i want to break randomly (skip some out) e.g. i could be doing the 12X1,12X2 and then 12X5 i have no limit of skips. Update Sorry if this is not clear i want it to break from the inner loop for a random amount of times

    Read the article

  • JSP Iterating over a map of a list when the value might be null

    - by Brian Hoover
    How do I clear the value from the stack of a s:iterator? I'm trying to iterator over a TreeMultimap with a structure like: TreeMultimap<person, lineItems> persons; Using something like: <s:iterator value="attendeesForParticipantTypeEvents.asMap()"> <div> <s:property value="key.name" /><br /> <s:iterator id="currentSku" value="value"> <s:property value="currentSku.name" /><br /> </s:iterator> </div> </s:iterator> This works fine, except when the treeMultimap has null for lineItems, then it's taking the value from the previous iteration. So, a structure like: persons = {{"Person1",["Line1","line2"]}, {"Person2",["Line3","line4"]}, {"Person2",null}} Renders as: <div> Person1<br /> Line1<br /> Line2<br /> </div> <div> Person2<br /> Line3<br /> Line4<br /> </div> <div> Person3<br /> Line3<br /> Line4<br /> </div> Which seems to indicate that the value isn't being cleared on each iterator. What do I need to do to handle the case where value might be null? Thanks for your help

    Read the article

  • I get "stack level too deep" error when using a named scope

    - by Brian Roisentul
    I'm using ruby on rails 2.3.8 and when I write the syntax shown below I get the "stack level too deep" error message. The model is called Announcement and the line of the error looks like this: Tag.find(category_id).announcements.published Where published is named_scope :published, :conditions => "announcements.state = 'published'" I use this named scope in many other places and it works fine. What am I doing wrong? (the relationship between Tag and Announcement model is ok because if I remove the ".published" method from that line it works just fine).

    Read the article

  • Tortoisesvn using svn:mergeinfo, is there a way to turn it off?

    - by Brian R. Bondy
    When I'm doing a tortoise svn merge, it includes a bunch of directories, and some files into the modified files, even know there are no actual changes. It changes the property svn:mergeinfo Is there any reason why these properties set on the directory/files are needed? Is there any way to get around not doing these changes to svn:mergeinfo? I usually just revert the items then commit, but this wastes extra time

    Read the article

  • Proper thread termination in multi-threaded C# application

    - by Brian
    I have what I think is a rather complex problem. I have a C# application that utilizes a plug-in architecture using reflection. The application loads plug-in dlls and the user is able to enable/disable them. When a plug-in is enabled, the main app starts a thread to run the plug-in in. In many cases the plug-in may have multiple threads of its own. When I want to disable a plug-in I am calling Thread.Abort(). This seems to kill the initial thread that was created for the plug-in, but any additional threads that the plug-in created continue running. Is there a better way to stop all of the associated plug-in's threads along with the main thread? Thanks.

    Read the article

  • Did the OS X java update to 1.5u7 whack my 1.6.0 laf.jar?

    - by Brian Deacon
    This is the update that just came out this week (2010-05-18) Somebody moved my cheese. It appears that laf.jar is Look And Feel, so probably not a big deal for my java development. Eclipse got mad about the missing jar, and furthermore thinks the 1.6.0 VM disappeared, which it didn't. Had to redefine the VM library within eclipse and everything appears kosher, but was hoping somebody with more hit points than me could say so definitively. Am I all good? Was it really the OSX update for 1.5 that went and hunted down a file in my 1.6 VM? Haven't been able to google anything about this... if somebody could post a link to some info about this, that'd be appreciated too.

    Read the article

  • Should I have one dll or multiple for Business Logic?

    - by Brian
    In my situation, my company services many types of customers. Almost every customer requires their own Business Logic. Of course, there will be a base layer that all business logic should inherit from. However, I'm going back and forth on architecting this--either in one dll for all customers or one dll for each. My biggest point of contention deals with upgrading the software. We have about 12 data entry personnel that work with 20 companies and it's critical that they have little down time. My concern is that if I deploy everything in one dll, I could introduce a bug in company A's logic while only intending to update Company B's logic. I believe I could reduce the risk if each company's logic had their own dll, so then, I could deploy Company B's update w/o harming Company A's. -- I will be the only one supporting this. That said, this also seems like a nightmare to manage 20 different .dll's -- that's for the BLL alone. I also need to create a View layer and ViewModel layer. So, potentially, I could have 20 (companies) * 3 (layers) which would equate to 60 .dll's. Thank You.

    Read the article

  • SlickGrid V2.0 Column name/id does not follow column when dragging

    - by Brian
    I have an application (using SlickGrid) where I need to get the column name or id at any time when user clicks on a cell (this pulls up a menu specific to the data in that column/cell). Grid works fine initially but if the column is moved (drag/drop), the column name/id does not follow the drop but remains mapped to it's initial column position. Has anyone else seen this and, if so, how did you fix it? Thanks

    Read the article

  • How to update attributes without valitation

    - by Brian Roisentul
    I've got a model with its validations, and I found out that I can't update an attribute without validating the object before. I already tried to add on => :create syntax at the end of each validation line, but I got the same results. My announcement model have the following validations: validates_presence_of :title validates_presence_of :description validates_presence_of :announcement_type_id validate :validates_publication_date validate :validates_start_date validate :validates_start_end_dates validate :validates_category validate :validates_province validates_length_of :title, :in => 6..255, :on => :save validates_length_of :subtitle, :in => 0..255, :on => :save validates_length_of :subtitle, :in => 0..255, :on => :save validates_length_of :place, :in => 0..50, :on => :save validates_numericality_of :vacants, :greater_than_or_equal_to => 0, :only_integer => true validates_numericality_of :price, :greater_than_or_equal_to => 0, :only_integer => true My rake task does the following: task :announcements_expiration => :environment do announcements = Announcement.expired announcements.each do |a| #Gets the user that owns the announcement user = User.find(a.user_id) puts a.title + '...' a.state = 'deactivated' if a.update_attributes(:state => a.state) puts 'state changed to deactivated' else a.errors.each do |e| puts e end end end This throws all the validation exceptions for that model, in the output. Does anybody how to update an attribute without validating the model?

    Read the article

  • Mysql Master Slave Replication on Large Database table (how to sync initial data)

    - by Brian Lovett
    We have a production server and a dev server. We have found that backups are nearly impossible on the production server because of the query volume we experience. So, we're looking at setting up replication with our dev server being the slave. This is ideal because we can afford to lock the tables on that server and additionally it will be nice to have up to date data for the developers. Now, the issues. The production server can't really be taken down or locked at this point, at least not easily. We have a high query volume and fairly large 30+ GB innodb tables. Both servers are running all innodb and are also both on mysql 5.1. What can we do to sync the data initially to get replication started? I've tried a few options, but so far, none have worked.

    Read the article

  • What time/date do you stamp your deployed data/exe files when they appear on the target system?

    - by Brian Frost
    It seems a good and clean thing to ensure that your deployed files appear on the target system with a consistent time/date. Many Applications seem to do this but other than for care of overwriting Users' existing data I guess it has no real significance. I'm having a purge on my installer packaging and I'd like to know if there any good reasons for specific date/time handling.

    Read the article

  • How can I force a subscriber to be synchronized from a local snapshot?

    - by Brian
    Hello, I have a SQL 2005 server replicating(merge\push) to SQL 2005 and SQL 2000 servers. I have multiple subscribers spread througout the United states. I have set , @snapshot_in_defaultfolder = N'false', @alt_snapshot_folder = N'c:\snapshots\Merge\' (sample location). I take the snapshot from the publisher that is in the same location, 'c:\snapshots\Merge\', and copy it to the subscribers. I wanted to avoid applying the snapshot over the WAN but from the performance I am getting the synchronization is going over the WAN. Does anybody have any ideas how to make sure that I am using the local copy of the snapshot and not the copy at the publisher? Thanks

    Read the article

  • Prevent browser form submission when Wicket AjaxFormValidatingBehaviour validation fails

    - by Brian Laframboise
    I have a Page with a Wizard component. The user can navigate the panels of the wizard by using the next and previous buttons which I have performing full (non-ajax) form submissions so that the app is back-button friendly. When the next button is clicked, I would like to attempt ajax form validation (if javascript is enabled). I tried doing: nextButton.add( new AjaxFormValidatingBehavior( form, "onsubmit") ); to add such validation. The behaviour works - however, when validation errors occur the browser still submits the entire form. What is the Wicket way to prevent the browser from submitting the form in this case?

    Read the article

  • Scanner's Read Line returning NoSuchElementException

    - by Brian
    This is my first time using StackOverflow. I am trying to read a text file which consists of a single number one the first line. try { Scanner s = new Scanner(new File("HighScores.txt")); int temp =Integer.parseInt(s.nextLine()); s.close(); return temp; } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } However, I get an error: java.util.NoSuchElementException: No line found at java.util.Scanner.nextLine(Unknown Source) at GameStart.getHighScore(GameStart.java:334) at GameStart.init(GameStart.java:82) at sun.applet.AppletPanel.run(Unknown Source) at java.lang.Thread.run(Unknown Source) I know that HighScores.txt is not empty, so why is this problem occuring? I tried using BufferedReader, and BufferReader.readLine() return null.

    Read the article

  • Any recommended VC++ settings for better PDB analysis on release builds

    - by Brian R. Bondy
    Are there any VC++ settings I should know about to generate better PDB files that contain more information? I have a crash dump analysis system in place based on the project crashrpt. Also, my production build server has the source code installed on the D:\, but my development machine has the source code on the C:\. I entered the source path in the VC++ settings, but when looking through the call stack of a crash, it doesn't automatically jump to my source code. I believe if I had my dev machine's source code on the D:\ it would work.

    Read the article

  • What's the best way to run Wordpress on the same domain as a Rails application?

    - by Brian Deterling
    I've got a standard Rails app with Nginx and Mongrel running at http://mydomain. I need to run a Wordpress blog at http://mydomain.com/blog. My preference would be to host the blog in Apache running on either the same server or a separate box but I don't want the user to see a different server in the URL. Is that possible and if not, what would you recommend to accomplish the goal?

    Read the article

  • Write/read count to txt file

    - by Brian
    Hi, I need a batch file that writes the count number to a txt file. Next time the batch file is run, it should read the current count number from the txt file and add 1 to count and save this new value in the txt file. (nothing else is in the txt file) When count is 5 it should start from 1 again Example: Count.bat runs 1 time: count.txt has no count so Count.bat saves the value 1 in count.txt Count.bat is run 2 time: Count.bat reads 1 from count.txt and saves the new value 2 to count.txt When count.bat is run for the 6 time it should start over by saving the value 1 in count.txt I think this just be easy to do, but I'am not use to batch commands So hopefully someone here could help me.

    Read the article

  • TCP/IP RST being sent differently in different browsers.

    - by Brian
    On Mac OS X (10.6), if I start a YouTube video download and pull the Ethernet cable for 5 or so seconds, then plug it back in, I get varying results depending on the browser. With Opera and Chrome, after I plug the cable back in the video continues to load. But with Safari and Firefox, it never does. Using Wireshark to look at the traffic, I found that Opera and Chrome simply ACK the first packet from YouTube after the cable has been plugged back in, but Safari and Firefox set the RST flag (0x4) in the TCP header and no more traffic follows. I can put a HUB in between the machine and the internet connection, the problem goes away and all four browsers continue loading the video when the cable is plugged back into the HUB. Again, looking at the Wireshark logs, it's evident that the machine doesn't see the Mulitcast connection close and there is simply a delay in the packets flowing through. So it seems that if Safari and Firefox sees a Multicast connection close, and then later see data on that same connection, they will send a RST. My question is why? What is the correct course of action, and why are 2/4 browsers doing it one way, while the other 2/4 are doing it another way? Is there somewhere in the code that I can see where this is happening in Firefox, for instance? Thank you very much.

    Read the article

  • NHibernate Empty Set Clauses in SQL Update Statements

    - by Brian Wilkinson
    I'm getting SQL update statements from NHibernate having a empty set clause ie UPDATE SET WHERE x == ? This propblem is occuring when a child entity is being updated for some reason the sql statement is being run against the Parent Entity, for some reason NHibenate is saying the parent has changed but when the set clause is being built no changes are found, can anyone help. The application I am constructing isn 3 tier. The domain entities are light weight data contract only entities.

    Read the article

  • How to handle dependency files in a cross-platform manner?

    - by Brian Knoblauch
    I'm working on updating an old app. It has some dependency files that live in the same directory as the app. Obviously this broke when Windows Vista came out (since it violates the API and Vista/7 now enforce that (XP didn't)). Ideally, I'd like to avoid hardcoding anything into the app for just Windows. I can live with that if I have to though. I've already been down that path with pulling the APPDATA and LOCALAPPDATA environment variables, but that doesn't help any since they just give you the current user area... I need these to live somewhere accessible for all users, and I'd like to obey the Windows API expectations that they go into the all user appdata area. Suggestions?

    Read the article

  • need to clean malformed tags using regular expression

    - by Brian
    Looking to find the appropriate regular expression for the following conditions: I need to clean certain tags within free flowing text. For example, within the text I have two important tags: <2004:04:12 and . Unfortunately some of tags have missing "<" or "" delimiter. For example, some are as follows: 1) <2004:04:12 , I need this to be <2004:04:12> 2) 2004:04:12>, I need this to be <2004:04:12> 3) <John Doe , I need this to be <John Doe> I attempted to use the following for situation 1: String regex = "<\\d{4}-\\d{2}-\\d{2}\\w*{2}[^>]"; String output = content.replaceAll(regex,"$0>"); This did find all instances of "<2004:04:12" and the result was "<2004:04:12 ". However, I need to eliminate the space prior to the ending tag. Not sure this is the best way. Any suggestions. Thanks

    Read the article

  • How to avoid escaping by accident in PERL using system()?

    - by Brian
    I want to run some commands using the system() command, I do this way: execute_command_error("trash-put '/home/$filename'"); Where execute_command_error will report if there was an error with whatever system command it ran. I know I could just unlink the file using Perl commands, but I want to delete stuff using trash-put as it's a type of recycling program. My problem is that $filename will sometimes have apostrophes, quotes, and other weird characters in it that mess up the system command or Perl itself.

    Read the article

< Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >