Daily Archives

Articles indexed Tuesday March 30 2010

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

  • Visual studio not detecting that exe is out of date after perforce revert

    - by CHaskell2
    This is a bit of an odd situation. Here's what's happening. So, we have a VS2008 project which outputs to a number of files under perforce control. These files have the always writable flag set. I compile the project in VS, which gives me up to date binaries on my machine. If I then revert those binaries via perforce, I have the version of the binaries that were up on perforce (ie, old ones.) Despite this, compiling the project again at this point detects no changes and will not remake those binaries. In a way, this makes sense, since none of the code or obj files have changed, but it's not really what I want to happen. This comes up in an edge case on our automated build server. I can think of tons of different little hacks I could do to fix this, but I'm thinking I could be missing something fundamental here. The actual build process uses the Unreal build tool, so there is a bit of magic going on behind the scenes that I'm not entirely familiar with too. Edit: This is a C/C++ project, forgot to mention that.

    Read the article

  • Anyone know of a good open source spam checker in java or c#?

    - by Spines
    I'm creating a site where users can write articles and comment on the articles. I want to automatically check to see if a new article or comment is spam. What are good libraries for doing this? I looked at bayesian classifier libraries, but it seems that I would have to gather a large amount of samples and classify them all as spam or not spam myself... I'm looking for something that can hopefully just tell me right out of the box.

    Read the article

  • is it possible to run a makefile from java?

    - by Bugzy bug
    Hi guys, i would like to ask if it is possible to run a make file in java? I was searching the internet but only got the examples of generating java make file. My case is different, what if i have makefile, but i just want to run it from java? really sorry for dumb question, but i am lost and dont even know if i can run it or not. thank you very much!

    Read the article

  • VMWare ESXi, change the default path for a VM

    - by glenatron
    For some reason VMWare ESXi has decided that one of my VMs is on a completely different path to the path it is actually on. So my VM is on /vmfs/volumes/long-guid-here/my-vm-name but when I try to open it I get the message "File < unspecified filename was not found." Which is not really surprising as unspecified filenames are quite difficult to locate. I thought it was just the swap file, which was down in the .vmx file as /vmfs/volumes/long-guid-here/old-vm-name/old-vm-name.vmsd but when I changed that in the vmx it made no difference. What I can't figure out is where VMWare is getting the old-vm-name from- when I look in the "Settings" pane it believes the working file location to be "[datastore-name] old-vm-name\" and I can't find anywhere to change it. Now the files themselves are all named for old-vm-name - so the directory is /my-vm-name/old-vm-name.vmx and so on. Is this the cause of my problems or is there some arcane configuration option elsewhere around the VMWare machine that I need to be tinkering with?

    Read the article

  • Ruby on Rails: Find records based on a method in the model?

    - by sjsc
    I'm looking to use named_scope to find records based on a method in the model. Right now I have in my Order.rb model: def self.paid collect { |order| order if order.paid? } end # the method def paid order.payments.total >= order.total_price end That works, but I can't chain it if I have a shipped named_scope: named_scope :shipped, :conditions => "shipped is true" And I wanted to do: Order.paid.shipped which doesn't work. Any ideas?

    Read the article

  • Mutual class instances in C++

    - by SepiDev
    Hi guys. What is the issue with this code? Here we have two files: classA.h and classB.h classA.h: #ifndef _class_a_h_ #define _class_a_h_ #include "classB.h" class B; //???? class A { public: A() { ptr_b = new B(); //???? } virtual ~A() { if(ptr_b) delete ptr_b; //???? num_a = 0; } int num_a; B* ptr_b; //???? }; #endif //_class_a_h_ classB.h: #ifndef _class_b_h_ #define _class_b_h_ #include "classA.h" class A; //???? class B { public: B() { ptr_a = new A(); //???? num_b = 0; } virtual ~B() { if(ptr_a) delete ptr_a; //???? } int num_b; A* ptr_a; //???? }; #endif //_class_b_h_ when I try to compile it, the compiler (g++) says: classB.h: In constructor ‘B::B()’: classB.h:12: error: invalid use of incomplete type ‘struct A’ classB.h:6: error: forward declaration of ‘struct A’ classB.h: In destructor ‘virtual B::~B()’: classB.h:16: warning: possible problem detected in invocation of delete operator: classB.h:16: warning: invalid use of incomplete type ‘struct A’ classB.h:6: warning: forward declaration of ‘struct A’ classB.h:16: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined.

    Read the article

  • Is there a more efficient way to set variables on a RadioButton's CheckChanged event?

    - by C Patton
    I have 16 radio buttons in an application of mine.. I have to set a variable based on which one was selected.. and I've produced some very ugly code doing this.. private void Foo_CheckedChanged(object sender, EventArgs e) { convertSource = 1; } private void Bar_CheckedChanged(object sender, EventArgs e) { convertSource = 2; } private void Baz_RadioButton_CheckedChanged(object sender, EventArgs e) { convertSource = 3; } Now, I've been thinking about it and to be honest I thought there might have been a way to do it with a switch.. I just can't conceptualize it in my mind. If anyone could show me a more efficient way of doing this, I'd really appreciate it. It's just really bugging me that such a simple thing as this is taking up fifty to seventy lines of code. thanks, cpatton

    Read the article

  • How do I convert HTML to RTF (Rich Text) in .NET without paying for a component?

    - by Josh Kodroff
    Is there a free third-party or .NET class that will convert HTML to RTF (for use in a rich-text enabled Windows Forms control)? The "free" requirement comes from the fact that I'm only working on a prototype and can just load the BrowserControl and just render HTML if need be (even if it is slow) and that Developer Express is going to be releasing their own such control soon-ish. I don't want to learn to write RTF by hand, and I already know HTML, so I figure this is the quickest way to get some demonstrable code out the door quickly.

    Read the article

  • Why a Swing app stops my Java servlet ?

    - by Frank
    I have a Swing runnable app which updates messages, then I have a Java servlet that gets messages from Paypal IPN (Instant Payment Notification), when the servlet starts up, in the init(), I starts the Swing runnable app which opens a desktop window, but 30 minutes later an error in the Swing caused the servlet to stop, how can that happen ? Because the runnable is running on it's own thread, servlet started that thread, why an error in that thread will cause the servlet to stop ? public class License_Manager extends JPanel implements Runnable { License_Manager() { Do_GUI(); ... start(); } public static void main(String[] args) { // Schedule a job for the event-dispatching thread : creating and showing this application's GUI. javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { Create_And_Show_GUI(); } }); } } public class PayPal_Servlet extends HttpServlet { public void init(ServletConfig config) throws ServletException { super.init(config); License_Manager.main(null); } protected void processRequest(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException { } } And besides the error don't even have anything to do with my code, it looks like this : Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 17 = 0 at java.util.Vector.elementAt(Vector.java:427) at javax.swing.DefaultListModel.getElementAt(DefaultListModel.java:70) at javax.swing.plaf.basic.BasicListUI.paintCell(BasicListUI.java:191) at javax.swing.plaf.basic.BasicListUI.paintImpl(BasicListUI.java:304) at javax.swing.plaf.basic.BasicListUI.paint(BasicListUI.java:227) at javax.swing.plaf.ComponentUI.update(ComponentUI.java:143) at javax.swing.JComponent.paintComponent(JComponent.java:763) at javax.swing.JComponent.paint(JComponent.java:1029) at javax.swing.JComponent.paintChildren(JComponent.java:864) at javax.swing.JComponent.paint(JComponent.java:1038) at javax.swing.JViewport.paint(JViewport.java:747) at javax.swing.JComponent.paintChildren(JComponent.java:864) at javax.swing.JComponent.paint(JComponent.java:1038) at javax.swing.JComponent.paintToOffscreen(JComponent.java:5124) at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:278) at javax.swing.RepaintManager.paint(RepaintManager.java:1220) at javax.swing.JComponent._paintImmediately(JComponent.java:5072) at javax.swing.JComponent.paintImmediately(JComponent.java:4882) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:803) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:714) at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:694) at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

    Read the article

  • Recommendations for project management software for Scrum

    - by Mendokusai
    We're using Scrum on our current project and we're very happy using our agile board and cards but reporting, burndown charts etc. are somewhat cumbersome to maintain. So, we're looking for good agile software to use instead. I'm keeping requirements deliberately vague but does anyone have any recommendations? The software would need to run on Windows.

    Read the article

  • iPhone UIScrollView - How to animate scrolling with steady contents?

    - by timbos
    Hi all, I'm wondering if anyone knows how to prevent the contents of a uiscrollview from moving unsteadily when scrolling manually by setting the content offset. When scrolling by touch the text remains clear and steady. I would like to recreate this by animating with the animated option set to false. I'm using a timer to scroll at a given interval. The text is being drawn to a view in the contents, but it vibrates and it becomes more difficult to read clearly when animating at a greater speed. The speed varies and the scrolling must respond to changes in speed quickly. Here's some code - - (void) scrollIncrAmt:(float) amt { _currentSpeedIncr = amt; NSArray* arr = [SharedTickerInfo sharedTickerInfo].sDataArray; DataObj* tdObj = [arr objectAtIndex:_row]; if ( ![tdObj isDirLeft] ) { amt = -amt; } float scrollTo = self.scrollView.contentOffset.x + amt; [scrollView setContentOffset:CGPointMake(scrollTo, 0.0f) animated:NO]; }

    Read the article

  • Static functions vs const functions

    - by baash05
    I'm looking at a member function int funct(int x) const; And I'm wondering if static int funct(int x); would be better. If a member function doesn't use any of the member variables should it be static. Are there any things that would discourage this?

    Read the article

  • Issue parsing RSS xml

    - by cw
    Hello, I'm having an issue using Linq to XML parsing the following XML. What I am doing is getting the element checking if it's what I want, then moving to the next. I am pretty sure it has to do with the xmlns, but I need this code to work with both this style and normal style RSS feeds (no xmlns). Any ideas? <?xml version="1.0" encoding="UTF-8"?> <rdf:RDF xmlns:rdf="http://someurl" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"> <channel rdf:about="http://someurl"> XElement currentLocation = startElementParameter; foreach (string x in ("channel\\Title").Split('\\')) { if (condition1 == false) { continue; } else if (condition2 == false) { break; } else { // This is returning null. currentLocation = currentLocation.Element(x); } } Thanks!

    Read the article

  • Removing connections to network printers that no longer exist

    - by Jeff Hardy
    I'm trying to delete some network printer connections from a Windows Server 2003 (SP2) machine because the printer shares no longer exist. Windows shows the printers' status as "Printer not found on server, unable to connect"; this is expected; the printers are now on a different server. Only one machine ever connected to the printer shares; it no longer needs to and I'd like to clean it up. However, when I try to delete the connections, I get an error message: --------------------------- Remove Printer --------------------------- Printer connection cannot be removed. Operation could not be completed. --------------------------- OK --------------------------- The "solutions" I've found online seem to be more voodoo than anything (and they still don't work!). Does anybody know how I can delete these long-gone printers?

    Read the article

  • optional local variables in rails partial templates: how do I get out of the (defined? foo) mess?

    - by brahn
    I've been a bad kid and used the following syntax in my partial templates to set default values for local variables if a value wasn't explicitly defined in the :locals hash when rendering the partial -- <% foo = default_value unless (defined? foo) %> This seemed to work fine until recently, when (for no reason I could discern) non-passed variables started behaving as if they had been defined to nil (rather than undefined). As has been pointed by various helpful people on SO, http://api.rubyonrails.org/classes/ActionView/Base.html says not to use defined? foo and instead to use local_assigns.has_key? :foo I'm trying to amend my ways, but that means changing a lot of templates. Can/should I just charge ahead and make this change in all the templates? Is there any trickiness I need to watch for? How diligently do I need to test each one?

    Read the article

  • How do I set ORDER BY params using prepated PDO statement?

    - by Marlorn
    I'm having problems using params in the ORDER BY section of my SQL. It doesn't issue any warnings, but prints out nothing. $order = 'columnName'; $direction = 'ASC'; $stmt = $db->prepare("SELECT field from table WHERE column = :my_param ORDER BY :order :direction"); $stmt->bindParam(':my_param', $is_live, PDO::PARAM_STR); $stmt->bindParam(':order', $order, PDO::PARAM_STR); $stmt->bindParam(':direction', $direction, PDO::PARAM_STR); $stmt->execute(); The :my_param works, but not :order or :direction. Is it not being internally escaped correctly? Am I stuck inserting it directly in the SQL? Like so: $order = 'columnName'; $direction = 'ASC'; $stmt = $db->prepare("SELECT * from table WHERE is_live = :is_live ORDER BY $order $direction"); Is there a PDO::PARAM_COLUMN_NAME constant or some equivalent? Thanks!

    Read the article

  • How to handle crash from system command in Perl on windows

    - by Pete
    I am calling a command-line program from my perl script, when these programs crash, I am prompted with a messagebox asking me if I want to notify Microsoft. Since this is an automated system it would be desirable if I could suppress that message and continue with other things in my script. Is this possible?

    Read the article

  • Stop a custom submit button from firing the form validation on a CCK form

    - by kidrobot
    I've added a submit button inside a fieldgroup on a CCK form using hook_form_alter as follows: function mymodule_form_alter(&$form, $form_state, $form_id) { if ($form_id == 'object_node_form') { $form['group_wikipedia']['search'] = array( '#type' => 'submit', '#value' => t('Search Wikipedia'), '#name' => 'searchwiki', '#submit' => array('mymodule_searchwiki_submit'), ); } } When I press the button, the validation handlers for the full form eg. checks for required fields, run as though I have pressed the 'Submit' button at the end of the form. I thought that changing the #name property from 'op' to 'searchwiki' would prevent this kind of mix-up, but not so. Does anyone know a workaround for this?

    Read the article

  • ASP.NET AJAX AutoComplete Extender Scrolling Issue

    - by Kumar
    I was looking at the ASP.NET AJAX AutoComplete Extender sample on http://www.asp.net/AJAX/AjaxControlToolkit/Samples/AutoComplete/AutoComplete.aspx Once the items are populated in the list the scrolling doesn't seem to work in IE8 but it works in IE7. How can I make the scrolling work in IE8?

    Read the article

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