Daily Archives

Articles indexed Friday April 30 2010

Page 4/114 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • shell script fun! how to perform an action on each subdirectory from a given path??

    - by pocketfullofcheese
    I am writing a shell script (which I suck at) and I need some help. Its a script that is moving things from git to CVS (not important). The thing is, i a file path: controllers/listbuilder/setup/SubmissionRolesListbuilderHandler.inc.php and I need to be able to do: cvs add controllers; cvs add controllers/listbuilder; cvs add controllers/listbuilder/setup; cvs add controllers/listbuilder/setup/SubmissionRolesListbuilderHandler.inc.php Can someone help me out? The best I've come up with so far is to recursively add ALL files in my working tree, but that seems overly inefficient.

    Read the article

  • PyQt4: Hide widget and resize window

    - by masterLoki
    Hi everyone: I'm working with several widgets but the solution just won't come out. What I have is a series of buttons in series of QHBoxLayouts. Some buttons are hidden by default, but they will appear when needed. To solve space issues, all buttons have a minimum and maximum size so they always look well packed. Also I have a QTextEdit, visible by default, which is in a QVBoxLayout with the QHBoxLayout that hold the buttons So the problem is this: When I hide the QTextEdit and show the other buttons, the window won't resize. After searching I found that using self.ui.layout().setSizeConstraint(QtGui.QLayout.SetFixedSize) will do the trick, but the problem is that it takes the maximum size from all widgets, therefore I end a huge window. Doing self.ui.layout().setSizeConstraint(QtGui.QLayout.SetMinAndMaxSize) won't resize the window I already tried using self.ui.resize(0,0), and when doing a self.ui.layout().update() I got False (which I find odd, http://doc.trolltech.com/4.6/qlayout.html#activate), and also tried to override sizeHint() but it keeps using the max size for all widgets. Is there a way to resize the window and while taking care of the min and max size of a widget? Thanks in advance

    Read the article

  • Restarting an activity in a single tab in a TabActivity?

    - by user291701
    Hi, I have a TabActivity. Each tab points to a sub activity. Works great. Is there any clever way to refresh one of the activity tabs? I just want to 'restart' the activity in tab #3 for example. Not sure of a good way to do this other than building in refresh support to the activity itself, or clearing ALL the tabs and recreating all of them. Thanks

    Read the article

  • Detect IE setting: check for newer versions of stored pages "never"

    - by xx
    I understand there isn't a way to interrogate a users IE settings directly due to security reasons, but is there a way to derive this answer with some other mechanism? I would like to stop a user from using my site if the setting "Check for newer versions of stored pages" is set to "Never". Any suggestions? Is there a way I could test for this using javascript? An example of what I am trying to accomplish is this: While it is not possible to check IE settings to see if you are running a popup blocker, that is a way to "test" for a popup blocker via javascript. I am looking for something similiar but for the cache setting, not the popup blocker.

    Read the article

  • Makefile : contains string

    - by Michael
    The variable returns MINGW32_NT-5.1 or CYGWIN_NT-5.1. (yea, dot at the end) Need to compare that given var contains NT-5.1 positioned anywhere. Using cygwin and would like to be compatible with pretty much any *nix.

    Read the article

  • Silverlight project fails to compile

    - by AngryHacker
    I have a Silverlight 3 project in VS2008. Today, for whatever reason, I get an error when compiling. Configuration system failed to initialize It reports the error on Line 1, Column 1 for every .xaml file in the project. I did a repair on VS2008, reinstalled all the Silverlight 3 bits (e.g. SDK, VS2008 tools and the Controls Toolkit), but the problem still persists. Am I missing something simple?

    Read the article

  • Alternatives to ntbackup

    - by Chris J
    Is anyone aware of any good (for a given value of "good") alternatives to ntbackup? There's a few quirks with ntbackup that I still find odd, and occasionally (and for no obvious reason) ntbackup just doesn't back up - usually complaining about that the wrong tape's inserted even though it's been told to just use the tape that's in the drive regardless. I've experiemented with cygwin's tar and cpio and Win32 ports of these utilities, but I've not had any luck getting them to see the tape device (so if someone does use these utilities to write to a tape device, also be interested to know how). Essentially all I'm looking for is a reliable program that I can tell to back-up a list of locations to the tape, and not to care about anything like formatting tapes, or sticking volume labels on them (and conversely then makes it fairly straightforward to restore off as well). On the flip-side, I don't want something that will attempt to manage our tapes. Don't get me wrong here -- ntbackup can do the job, but its quirks are making look at possible alternatives. Any suggestions? If it's open source, even better.

    Read the article

  • After Effects CS4: Using layer markers.

    - by GuruAbyss
    I have a question regarding Layer Markers in AE. What I'm trying to do is have a layer start off normal then in the time line I'll place a marker and have it change its color using Effect Color correction Change color to. The hue will change from 0% to 50% for 10 frames then turn back to normal. How would I go about doing this?

    Read the article

  • Microsoft Wireless Mouse 5000 Scroll Not Working

    - by Nathan Totten
    I have a Microsoft Wireless Mouse 5000 with Intellipiont 7.1 installed on Windows 7 x64. The scroll has stopped working before, but a restart or two always seemed to resolve it. I tested the mouse on another computer and it worked. I also tested an Microsoft Arc mouse on this computer and the scroll worked. I have checked everything I could find on google and nothing helps. I have reinstalled intellipoint two times. Tried to change my mouse to another model in the intellipoint settings as suggested in many forums. Nothing. If anyone has any suggestions that would be great. Otherwise, I think my next step is to pitch this mouse and get a logitech at Best Buy tomorrow.

    Read the article

  • Can ElementTree be told to preserve the order of attributes?

    - by dmckee
    I've written a fairly simple filter in python using ElementTree to munge the contexts of some xml files. And it works, more or less. But it reorders the attributes of various tags, and I'd like it to not do that. Does anyone know a switch I can throw to make it keep them in specified order? Context for this I'm working with and on a particle physics tool that has a complex, but oddly limited configuration system based on xml files. Among the many things setup that way are the paths to various static data files. These paths are hardcoded into the existing xml and there are no facilities for setting or varying them based on environment variables, and in our local installation they are necessarily in a different place. This isn't a disaster because the combined source- and build-control tool we're using allows us to shadow certain files with local copies. But even thought the data fields are static the xml isn't, so I've written a script for fixing the paths, but with the attribute rearrangement diffs between the local and master versions are harder to read than necessary. This is my first time taking ElementTree for a spin (and only my fifth or sixth python project) so maybe I'm just doing it wrong. Abstracted for simplicity the code looks like this: tree = elementtree.ElementTree.parse(inputfile) i = tree.getiterator() for e in i: e.text = filter(e.text) tree.write(outputfile) Reasonable or dumb? Related links: How can I get the order of an element attribute list using Python xml.sax? Preserve order of attributes when modifying with minidom

    Read the article

  • Ultimate Get/Post with Android Thread for Dummies

    - by Jayomat
    Hi, I'm writing an app to check for the bus timetable's. Therefor I need to post some data to a html page, submit it, and parse the resulting page with htmlparser. Though it may be asked a lot, can some one help me identify if 1) this page does support post/get (I think it does) 2) which fields I need to use? 3) How to make the actual request? this is my code so far: String url = "http://busspur02.aseag.de/bs.exe?Cmd=RV&Karten=true&DatumT=30&DatumM=4&DatumJ=2010&ZeitH=&ZeitM=&Suchen=%28S%29uchen&GT0=&HT0=&GT1=&HT1="; String charset = "CP1252"; System.out.println("startFrom: "+start_from); System.out.println("goTo: "+destination); //String tag.v List<NameValuePair> params = new ArrayList<NameValuePair>(); params.add(new BasicNameValuePair("HTO", start_from)); params.add(new BasicNameValuePair("HT1", destination)); params.add(new BasicNameValuePair("GTO", "Aachen")); params.add(new BasicNameValuePair("GT1", "Aachen")); params.add(new BasicNameValuePair("DatumT", day)); params.add(new BasicNameValuePair("DatumM", month)); params.add(new BasicNameValuePair("DatumJ", year)); params.add(new BasicNameValuePair("ZeitH", hour)); params.add(new BasicNameValuePair("ZeitM", min)); UrlEncodedFormEntity query = new UrlEncodedFormEntity(params, charset); HttpPost post = new HttpPost(url); post.setEntity(query); InputStream response = new DefaultHttpClient().execute(post).getEntity().getContent(); // Now do your thing with the facebook response. String source = readText(response,"CP1252"); Log.d(TAG_AVV,response.toString()); System.out.println("STREAM "+source); One person also gave me a hint to use firebug to read what's going on at the page, but I don't really understand what to look for, or more precisely, how to use the provided information. I also find it confusing, for example, that when I enter the data by hand, the url says, for example, "....HTO=Kaiserplatz&...", but in Firebug, the same Kaiserplatz is connected to a different field, in this case: \<\td class="Start3" Kaiserplatz <\/td (I inserted \ to make it visible) The last line in my code prints the html page, but without having send a request.. it's printed as if there was no input at all... My app is almost done, I hope someone can help me out to finish it! thanks in advance

    Read the article

  • SED: Matching on 2 patterns on the same line

    - by Brian Knott
    Hi I want to delete a line using sed if it matches 2 regular expressions in the same line. EG the line starts with /* and end with */ (comment). The following script will do most of that. sed -e '/^\/*/ d' -e '/*\/$/ d' filename This script will remove all lines that start with * and end with */. I want it to remove the line only if is meets both criteria not one.

    Read the article

  • Image Gallery Manager for PHP and MySQL?

    - by John
    Can anyone recommend a plugin or library that allows people to upload images which automatically gets cropped and resized? I don't mind editting some config files to specify how images should be cropped and resized. Additionally, after uploading, the front end user should be able to drag and drop for re-ordering. Can someone recommend something that works with php?

    Read the article

  • Getting a Target to run BEFORE anything else runs when building from Visual Studio

    - by damageboy
    Hi, I'm trying to get a one-time costly target to run only when building a certain top-level project (that has many dependencies). I have no problem on getting this working from plain msbuild / command line build. I do this with setting and InitialTargets on the project, or alternatively with < BeforeBuild /. The tricky part is with Visual Studio. When I build the same project from VS. VS runs the dependencies before even invoking my .csproj, so my target (which affects how the other projects are built) doesn't get to run until they have already been built. Is there someway to force VS to run a target before invoking the dependencies? I'm currently working around this, by running the same costly target from my most low-level project (the one that get's always built...) by using: Condition=" $(BuildingInsideVisualStudio) " Any ideas on how to get this done "properly"? Again, I'm looking for a solution that will work FROM VS.

    Read the article

  • Core Data store corruption

    - by sehugg
    A handful of customers for my iPhone app are experiencing Core Data store corruption (I assume so, since the error is "Failed to save to data store: Operation could not be completed. (Cocoa error 259.)") Has anyone else experienced this kind of store corruption? I am worried since I aim to soon push an update which performs a schema migration, and I am worried that this will expose even more problems. I had assumed that the Core Data/SQLlite APIs use atomic operations and are immune to corruption except if the underlying filesystem experiences corruption. Is there a way to reduce/prevent corruption, or at least a good way to reproduce (I have been unsuccessful thus far).

    Read the article

  • Icons in Windows Form Applications (VS2008)

    - by typoknig
    This is yet another question about .ico files. I have read through many pages trying to figure this out but I am unable to. When I go to Properties - Application of my Windows Form Application there is a place for me to pick the icon for my application. I have made a 32x32 icon and it takes it just fine, but the image is grainy when it is applied to my .exe file, like it is a picture that has been expanded more than it should have. 1.) Why is this? 2.) Is there any .ico file size other than 32x32 than a Windows Form Application can accept? I have tried 48x48 but it doesn't like that. I just want my .exe file to look nice!

    Read the article

  • qt drop event get widget

    - by eyecreate
    I'm trying to, inside a dropevent method, find out which widget was just dropped. I tried looking at the docs, but they only have commands for images and text. How do I access both the item just dropped and which widget it was dropped on?(this is drag and drop inside of a QTreeWidget)

    Read the article

  • what should I take into consideration when choosing a session implementation?

    - by Satoru.Logic
    Hi, all. Yesterday, my supervisor told me that tmp-file-based session should be THE answer to session implementation, and I should abandon any idea of making sessions persistent. He argues that file-based session is much faster and eaiser to use than other choices like db-based or memcached-based implementations. What he said was really a shock to my past learning experience, so please tell me whether he was wrong and why? Thanks in advance.

    Read the article

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