Daily Archives

Articles indexed Thursday April 29 2010

Page 18/119 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • Launch a webpage on a Firefox (win) tab using Python

    - by Leandro Ardissone
    Hi, I'm trying to launch a website url in a new tab using python in that way, but it didn't worked in these both ways: Method 1: os.system('C:\Program Files\Mozilla Firefox\Firefox.exe -new-tab http://www.google.com/'); and Method 2: os.startfile('C:\Program Files\Mozilla Firefox\Firefox.exe -new-tab http://www.google.com/'); If I don't add the parameters (-new-tab http://www.google.com/) it works, opening the default page.

    Read the article

  • Psuedo-Backwards Builder Pattern?

    - by Avid Aardvark
    In a legacy codebase I have a very large class with far too many fields/responsibilities. Imagine this is a Pizza object. It has highly granular fields like: hasPepperoni hasSausage hasBellPeppers I know that when these three fields are true, we have a Supreme pizza. However, this class is not open for extension or change, so I can't add a PizzaType, or isSupreme(), etc. Folks throughout the codebase duplicate the same "if(a && b && c) then isSupreme)" logic all over place. This issue comes up for quite a few concepts, so I'm looking for a way to deconstruct this object into many subobjects, e.g. a pseudo-backwards Builder Pattern. PizzaType pizzaType = PizzaUnbuilder.buildPizzaType(Pizza); //PizzaType.SUPREME Dough dough = PizzaUnbuilder.buildDough(Pizza); Is this the right approach? Is there a pattern for this already? Thanks!

    Read the article

  • Continous Build Integration with SourceSafe and Batch Files

    - by CraigS
    I want to create a continuous build integration system for .NET using just Windows batch files and Visual Source Safe. I've come up with the following batch file so far - set ssdir=\\xxxx\vss cd d:\mydir "C:\Program Files\Microsoft Visual SourceSafe\ss.exe" diff "$/sourcedir" -R -Q > diffout.txt This will spit out a file containg lines like "SourceSafe files different from local files" when a change has been made. My challenge is to figure out if those lines are in the file, then do a get and kick off MSBuild if they are. I'd then schedule the batch file to run every 10 minutes or so. Anyone got any thoughts on how to do that? Or any other ways of doing continuous build integration without downloading a complicated build automation system? Update: Happy to use cscript or powershell too, though not really familiar with those environments. My main aim is to avoid installing 3rd party software

    Read the article

  • *Client* scalability for large numbers of remote web service calls

    - by Yuriy
    Hey Guys, I was wondering if you could share best practices and common mistakes when it comes to making large numbers of time-sensitive web service calls. In my case, I have a SOAP and an XML-RPC based web service to which I'm constantly making calls. I predict that this will soon become an issue as the number of calls per second will grow. On a higher level, I was thinking of batching those calls and submitting those to the web services every 100 ms. Could you share what else works? On a lower level side of the things, I use Apache Xml-Rpc client and standard javax.xml.soap.* packages for my client implementations. Are you aware of any client scalability related tricks/tips/warnings with these packages? Thanks in advance Yuriy

    Read the article

  • .NET RegEx "Memory Leak" investigation

    - by Kevin Pullin
    I recently looked into some .NET "memory leaks" (i.e. unexpected, lingering GC rooted objects) in a WinForms app. After loading and then closing a huge report, the memory usage did not drop as expected even after a couple of gen2 collections. Assuming that the reporting control was being kept alive by a stray event handler I cracked open WinDbg to see what was happening... Using WinDbg, the !dumpheap -stat command reported a large amount of memory was consumed by string instances. Further refining this down with the !dumpheap -type System.String command I found the culprit, a 90MB string used for the report, at address 03be7930. The last step was to invoke !gcroot 03be7930 to see which object(s) were keeping it alive. My expectations were incorrect - it was not an unhooked event handler hanging onto the reporting control (and report string), but instead it was held on by a System.Text.RegularExpressions.RegexInterpreter instance, which itself is a descendant of a System.Text.RegularExpressions.CachedCodeEntry. Now, the caching of Regexs is (somewhat) common knowledge as this helps to reduce the overhead of having to recompile the Regex each time it is used. But what then does this have to do with keeping my string alive? Based on analysis using Reflector, it turns out that the input string is stored in the RegexInterpreter whenever a Regex method is called. The RegexInterpreter holds onto this string reference until a new string is fed into it by a subsequent Regex method invocation. I'd expect similar behaviour by hanging onto Regex.Match instances and perhaps others. The chain is something like this: Regex.Split, Regex.Match, Regex.Replace, etc Regex.Run RegexScanner.Scan (RegexScanner is the base class, RegexInterpreter is the subclass described above). The offending Regex is only used for reporting, rarely used, and therefore unlikely to be used again to clear out the existing report string. And even if the Regex was used at a later point, it would probably be processing another large report. This is a relatively significant problem and just plain feels dirty. All that said, I found a few options on how to resolve, or at least work around, this scenario. I'll let the community respond first and if no takers come forward I will fill in any gaps in a day or two.

    Read the article

  • Experience with AMCC 3ware 9650se raid cards? Ours seems dead

    - by antiduh
    We have a 8-port 3ware 9650se raid card for our main disk array. We had to bring the server down for a pending power outage, and when we turned the machine back on, the raid card never started. This card has been in service for a couple years without problems, and was working up until the shutdown. Now, when we turn the machine on, the bios option rom that normally kicks in before the bootloader doesn't show up, none of the drives start, and when the OS tries to access the device, it just times out. The firmware on it has been upgraded in the past, so it's possible we've hit some sort of firmware bug. We're using it in a Silicon Mechanics R272 machine with gentoo for the OS. The OS eventually boots, but alas, without the card. We've ordered a new one, but I'm worried that if we replace the card it won't recognize the existing array. Has anybody performed a card swap before? Any help would be greatly appreciated.

    Read the article

  • Recommendation on remote access setup for accessing customer systems

    - by gregmac
    I'm looking for a product recommendation (open or commercial) that will allow remote access to customer sites for tech support purposes. We need to be able to gain access to help troubleshoot problems on servers. Currently end up using anything from RDP on public IP, to various VPNs that clients happen to have, to webex-type sessions that require lots of interaction from both sides to get things working. This often means a problem that could take 10 minutes to solve takes an extra 30+ minutes messing around trying to get a connection up. There are multiple customer sites, which should NOT have access to each other. At each site, there is anywhere from 1 to 8 servers (Windows 2003 or 2008) that need to be accessed. Support connection to machines even if they're behind a firewall/router with no public IP Be able to selectively allow/deny access from customer site. Customer site should not be able to connect outbound to anywhere else (our systems, or other customer sites) Support multiple users from our end If not a VPN connection (where RDP could be used over top), should support: Remote desktop access, including copy/paste File transfers Preferably would have some way to list all remote systems, showing online/offline. Anyone have any suggestions?

    Read the article

  • My JVM crahes when i run my program.

    - by rgksugan
    I have written a program to process packets. The program runs well if its run alone but when i integrate it to my main project the jvm crashes and shows the below result. What is the problem? # # An unexpected error has been detected by HotSpot Virtual Machine: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d7dcf6e, pid=4328, tid=4068 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_16-b02 mixed mode, sharing) # Problematic frame: # V [jvm.dll+0x9cf6e] # # An error report file with more information is saved as hs_err_pid4328.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp #

    Read the article

  • Capture Sql Error when excute in CMD file

    - by sarah xia
    Hi, I am writing a CMD file which runs a bunch of sql files, like this: :: Running every sql file in the temp directory For %%G IN (.\install\*.sql) DO ( :: run sql script echo exit | sqlplus interacct/interacct @%%G ) My question is how do I capture an error when one of the scripts didn't succeed? Thankyou. Sarah

    Read the article

  • How to set the location of a WPF window?

    - by Ashish Ashu
    I have a List View in which I have defined a custom cell as a user control. In the custom cell I given user hyperlink, I am showing a WPF dialog when user clicks on a hyperlink. I want WPF dialog comes just above the hyperlink.. Please let me know how can I acheive this or how to set the location of the dialog so that it just comes above the hyperlink.

    Read the article

  • How to convince someone, that reading programming related books(blogs, so..) is important? [closed]

    - by hgulyan
    Dear all, please, help me to convince, that no matter what you're doing, you need to read some stuff, try to learn something new. They say, that they don't want to sit in front of computer in the end of a day and they don't have opportunity to read in working hours, or they're too tired for doing something. Have you faced this kind of situation? What did you do? What if you want to help them? What methodology you'd suggest? How to open their eyes? EDIT I'm really concerned about this people. EDIT 2 Just to be clear, I'm not talking about one person or two. Some of them, just do their job good. Company doesn't motivate them to learn something. They're not bad people, not bad developers, they just need something or someone to help, show another view, but you can't just describe this new view or say smth like "You need to learn!" and that's it, you'll start to learn or you're not a good programmer. I started to learn OOP, DB structure 6 years ago and I had someone who had guided me. He told me to learn Java and MySQL, gave me some manuals and API's. That's how I started. What if they don't have that kind person or something else?

    Read the article

  • Is html5 video ready for primetime yet?

    - by Galen
    I've been asked to develop a website for the iPad. It's going to have a couple videos on it. I'd like to try out html5. I'd really only be using the new video part of html5 (with flash fallback for browsers that don't yet support it). Would it be a mistake to do this on a fairly traffic heavy site?

    Read the article

  • Variant datatype library for C

    - by Joey Adams
    Is there a decent open-source C library for storing and manipulating dynamically-typed variables (a.k.a. variants)? I'm primarily interested in atomic values (int8, int16, int32, uint, strings, blobs, etc.), while JSON-style arrays and objects as well as custom objects would also be nice. A major case where such a library would be useful is in working with SQL databases. The most obvious feature of such a library would be a single type for all supported values, e.g.: struct Variant { enum Type type; union { int8_t int8_; int16_t int16_; // ... }; }; Other features might include converting Variant objects to/from C structures (using a binding table), converting values to/from strings, and integration with an existing database library such as SQLite. Note: I do not believe this is question is a duplicate of http://stackoverflow.com/questions/649649/any-library-for-generic-datatypes-in-c , which refers to "queues, trees, maps, lists". What I'm talking about focuses more on making working with SQL databases roughly as smooth as working with them in interpreted languages.

    Read the article

  • Assign TableView column binding to a specific core-data object in to-many related entity based on se

    - by snown27
    How would I assign a column of a TableView to be a specific entry in a Core Data entity that is linked to the NSArrayController via a to-many relationship? For example Entity: MovieEntity Attributes: title(NSString), releaseDate(NSDate) Relationship: posters<-->> PosterEntity Entity:PosterEntity Attributes: imageLocation(NSURL), default(BOOL) Relationships: movie<<--> MovieEntity So I have a three column table that I want to display the Poster, Title, and Release Date attributes in, but as one movie could potentially have several different style's of posters how do I get the poster column to only show the one that's marked default? Since the rest of the table is defined in Interface Builder I would prefer to keep it that way for the sake of keeping the code as clean as possible, but if this can only be done programmatically then I'm all ears. I just wanted to give preference in case there's more than one way to skin a cat, so to speak.

    Read the article

  • In languages which create a new scope each time in a loop block, a new local copy of the local loop

    - by Jian Lin
    It seems that in language like C, Java, and Ruby (as opposed to Javascript), a new scope is created for each iteration of a loop block, and the local variable defined for the loop is actually made into a local variable every single time and recorded in this new scope? For example, in Ruby: p RUBY_VERSION $foo = [] (1..5).each do |i| $foo[i] = lambda { p i } end (1..5).each do |j| $foo[j].call() end the print out is: [MacBook01:~] $ ruby scope.rb "1.8.6" 1 2 3 4 5 [MacBook01:~] $ So, it looks like when a new scope is created, a new local copy of i is also created and recorded in this new scope, so that when the function is executed at a later time, the "i" is found in those scope chains as 1, 2, 3, 4, 5 respectively. Is this true? (It sounds like a heavy operation). Contrast that with p RUBY_VERSION $foo = [] i = 0 (1..5).each do |i| $foo[i] = lambda { p i } end (1..5).each do |j| $foo[j].call() end This time, the i is defined before entering the loop, so Ruby 1.8.6 will not put this i in the new scope created for the loop block, and therefore when the i is looked up in the scope chain, it always refer to the i that was in the outside scope, and give 5 every time: [MacBook01:~] $ ruby scope2.rb "1.8.6" 5 5 5 5 5 [MacBook01:~] $ I heard that in Ruby 1.9, i will be treated as a local defined for the loop even when there is an i defined earlier? The operation of creating a new scope, creating a new local copy of i each time through the loop seems heavy, as it seems it wouldn't have matter if we are not invoking the functions at a later time. So when the functions don't need to be invoked at a later time, could the interpreter and the compiler to C / Java try to optimize it so that there is not local copy of i each time?

    Read the article

  • Background job with status in rails

    - by pepernik
    Hey. I would like to upload a file and then parse it. Because parsing can take up to 10min I installed delayed_job plugin and called parsing function through send_later function. I have to mention that this is an AJAX app. Imagine that you press an AJAX button that starts upload and after that the source is imported into the database. During the process I want to show the progress bar or message (importing...) and when it completes the task status changes to done. My question is: What is the best way to check for status of the process. What would you do? My idea is to have another controller actions "status" which look into the database and provide the right status.

    Read the article

  • In your experience, what has inspired you to change a fundamental programming tool

    - by Dr J
    A lot of what I am working on is changing the mindset of a community of developers. Moving them from one tool to another, or to picking up a new tool. What are some of the suggested or recommended ways to get a community to pick up a new meme? While we can mandate tool usage, this is a last resort. I would rather have the developers move to any new tools of their own accord. I'm not a programmer, I need to understand why a programmer will move from one tool to another. Edited the title thanks to a fabulous comment! My world runs on Meme's, tipping points, and general pressures. This is why I needed to ask. And clarifying yet more- I am the middle manager needing to plan and manage an implementation and not a sales person.

    Read the article

  • HTML Minification in C#

    - by Tom
    Hi Guys, Tried searching around for a complete library for HTML Minification in C# but haven't been able to locate anything that is useful ? Does anyone here have such a library or know of one ?

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >