Daily Archives

Articles indexed Friday April 2 2010

Page 12/105 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Is it possible (and safe/reliable/non-damaging) to use a 20-pin ATX PSU with a 24-pin ATX motherboar

    - by Legooolas
    I have a reasonably-decent old 20-pin PSU which I want to use on a newer 24-pin ATX motherboard. I see that the ATX page on wikipedia mentions that 24-pin ATX is backward-compatible, and I can find 20-to-24 pin adapters to buy for a couple of dollars/pounds at lots of places, but I can't find any mention of restrictions on the use of these. Will this work on any motherboard, or is it a per-motherboard compatibility question? Are there any other restrictions like the level of power available (and hence the additional 4 pins with +12, +5 and +3.3V lines which are already on other pins)?

    Read the article

  • how to get trac to run with apache?

    - by ajsie
    i have some problems getting trac to be running with apache. have no idea of how to do and the tutorial i followed doesnt work. i have an empty /etc/apache2/httpd.conf. should it be empty? then i followed the tutorial (http://trac.edgewall.org/wiki/TracModPython) and typed in: LoadModule python_module modules/mod_python.so so now it contains one row. i have ubuntu and i installed mod_python with: apt-get install libapache2-mod-python libapache2-mod-python-doc however, when i run a2enmod mod_python it says: ERROR: Module mod_python does not exist! but i have checked that it exists in /usr/lib/apache2/modules/mod_python.so. so whats the problem?

    Read the article

  • Python web devlopment framework for python 3.1 user

    - by iama
    I have been learning python for some time now. While starting this "learning python" endeavor I decided to learn the latest and greatest 3.1 version of python. I regret this decision now because I wanted to try my hands on some of the python web development frameworks & it looks like many of them does not support 3.1 yet & it looks like it might take them years to support the new version of Python especially Django and TurboGears. This is really disappointing. Therefore, SO users, do you have any recommendation for a web framework for me that runs on 3.1 and supports some of the modern (I guess I will never learn ;-)) web framework features like MVC/ORM/URL Routing/Caching etc. Many thanks for your response.

    Read the article

  • Reading Binary file in C

    - by darkie15
    Hi All, I am having following issue with reading binary file in C. I have read the first 8 bytes of a binary file. Now I need to start reading from the 9th byte. Following is the code: fseek(inputFile, 2*sizeof(int), SEEK_SET); However, when I print the contents of the array where I store the retrieved values, it still shows me the first 8 bytes which is not what I need. Can anyone please help me out with this? Regards, darkie

    Read the article

  • AudioQueue ate my buffer (first 15 milliseconds of it)

    - by iter
    I am generating audio programmatically. I hear gaps of silence between my buffers. When I hook my phone to a scope, I see that the first few samples of each buffer are missing, and in their place is silence. The length of this silence varies from almost nothing to as much as 20 ms. My first thought is that my original callback function takes too much time. I replace it with the shortest one possible--it re-renqueues the same buffer over and over. I observe the same behavior. AudioQueueRef aq; AudioQueueBufferRef aq_buffer; AudioStreamBasicDescription asbd; void aq_callback (void *aqData, AudioQueueRef inAQ, AudioQueueBufferRef inBuffer) { OSStatus s = AudioQueueEnqueueBuffer(aq, aq_buffer, 0, NULL); } void aq_init(void) { OSStatus s; asbd.mSampleRate = AUDIO_SAMPLES_PER_S; asbd.mFormatID = kAudioFormatLinearPCM; asbd.mFormatFlags = kLinearPCMFormatFlagIsSignedInteger | kAudioFormatFlagIsPacked; asbd.mBytesPerPacket = 1; asbd.mFramesPerPacket = 1; asbd.mBytesPerFrame = 1; asbd.mChannelsPerFrame = 1; asbd.mBitsPerChannel = 8; asbd.mReserved = 0; int PPM_PACKETS_PER_SECOND = 50; // one buffer is as long as one PPM frame int BUFFER_SIZE_BYTES = asbd.mSampleRate/PPM_PACKETS_PER_SECOND*asbd.mBytesPerFrame; s = AudioQueueNewOutput(&asbd, aq_callback, NULL, CFRunLoopGetCurrent(), kCFRunLoopCommonModes, 0, &aq); s = AudioQueueAllocateBuffer(aq, BUFFER_SIZE_BYTES, &aq_buffer); // put samples in the buffer buffer_data(my_data, aq_buffer); s = AudioQueueStart(aq, NULL); s = AudioQueueEnqueueBuffer(aq, aq_buffer, 0, NULL); }

    Read the article

  • Fastest Java way to remove the first/top line of a file (like a stack)

    - by christangrant
    I am trying to improve an external sort implementation in java. I have a bunch of BufferedReader objects open for temporary files. I repeatedly remove the top line from each of these files. This pushes the limits of the Java's Heap. I would like a more scalable method of doing this without loosing speed because of a bunch of constructor calls. One solution is to only open files when they are needed, then read the first line and then delete it. But I am afraid that this will be significantly slower. So using Java libraries what is the most efficient method of doing this. --Edit-- For external sort, the usual method is to break a large file up into several chunk files. Sort each of the chunks. And then treat the sorted files like buffers, pop the top item from each file, the smallest of all those is the global minimum. Then continue until for all items. http://en.wikipedia.org/wiki/External_sorting My temporary files (buffers) are basically BufferedReader objects. The operations performed on these files are the same as stack/queue operations (peek and pop, no push needed). I am trying to make these peek and pop operations more efficient. This is because using many BufferedReader objects takes up too much space.

    Read the article

  • Telerik RadEditor Find & Replace in HTML View

    - by Jim
    We use Telerik's RadEditor for our content management system's WYSIWYG editor. We need the find & replace functionality that is in the WYSIWYG editor to also be in the HTML editor. The editor is pretty customizable, anyone know if there is a way to enable this or hack it in?

    Read the article

  • Source of parsers for programming languages?

    - by Arkaaito
    I'm dusting off an old project of mine which calculates a number of simple metrics about large software projects. One of the metrics is the length of files/classes/methods. Currently my code "guesses" where class/method boundaries are based on a very crude algorithm (traverse the file, maintaining a "current depth" and adjusting it whenever you encounter unquoted brackets; when you return to the level a class or method began on, consider it exited). However, there are many problems with this procedure, and a "simple" way of detecting when your depth has changed is not always effective. To make this give accurate results, I need to use the canonical way (in each language) of detecting function definitions, class definitions and depth changes. This amounts to writing a simple parser to generate parse trees containing at least these elements for every language I want my project to be applicable to. Obviously parsers have been written for all these languages before, so it seems like I shouldn't have to duplicate that effort (even though writing parsers is fun). Is there some open-source project which collects ready-to-use parser libraries for a bunch of source languages? Or should I just be using ANTLR to make my own from scratch? (Note: I'd be delighted to port the project to another language to make use of a great existing resource, so if you know of one, it doesn't matter what language it's written in.)

    Read the article

  • UIImage couldn't load some png picture.

    - by www.ruu.cc
    I Use the following code to load png image: UIImage *imageBack1 = [UIImage imageNamed:@"Bar1.png"]; UIImage *imageBack2 = [UIImage imageNamed:@"Bar2.png"]; imageBack1 work right when imageBack2's value is nil, Bar1.png and Bar2.png are located at the same place,but why Bar2.png couldn't be load?

    Read the article

  • SQL Server deadlocks between select/update or multiple selects

    - by RobW
    All of the documentation on SQL Server deadlocks talks about the scenario in which operation 1 locks resource A then attempts to access resource B and operation 2 locks resource B and attempts to access resource A. However, I quite often see deadlocks between a select and an update or even between multiple selects in some of our busy applications. I find some of the finer points of the deadlock trace output pretty impenetrable but I would really just like to understand what can cause a deadlock between two single operations. Surely if a select has a read lock the update should just wait before obtaining an exclusive lock and vice versa? This is happening on SQL Server 2005 not that I think this makes a difference.

    Read the article

  • Which svn client to install on Windows 7 machine?

    - by user246114
    I just got a new PC running Windows 7 (64-bit). I'd like to install an SVN client (command line only, I don't want TortoiseSVN). I'm not sure which of these to install: http://subversion.apache.org/packages.html#windows does anyone have any opinions on this? I tried going for the ones hosted by Tigris, but the downloaded zip says to read an install file hosted at their site, but the link is broken. Do we simply download, then call svn.exe as needed, no need for a real 'install'?

    Read the article

  • Visualise Workflow Diagram from plain text

    - by Dmitriy Nagirnyak
    Assuming there is a plain text with description of the workflow (Just plain English in some predefined format). Are there any tools (better online) to visualize the flow based on a plain text? What for: to store the description of the workflow in a source control system and be able to quickly remember/understand that.

    Read the article

  • c# - wmplib - playing 2 mp3 files but can get them in synic

    - by Ciarán
    I have 2 windowsMediaPlayer objects setup Both objects have the same mp3 song file but when I play them at the same time they are out of sync by a few seconds. The code I call to play them looks like this sound1.controls.play(); sound2.controls.play(); Is it just because one play method is executed before the other and thus one fast then the other. Is their anyway I could sync them? I have tired messing with the rate of one track to match the other, but not getting it prefect. Thanks

    Read the article

  • Save UIwebview contents to photo gallery

    - by user307410
    There's a video tutorial on u tube that shows how to perform this.It consists of a UIwebview and toolbar button to save the contents.Haven't had any luck making this work.Could someone have a look and see they can make it work.Many thanks in advance. http://www.youtube.com/watch?v=gDPca3JIc_s&feature=player_embedded# /////////////////////////////////////////////////////////////////// // // SaveWebViewController.h // SaveWeb // // // Copyright MyCompanyName 2010. All rights reserved. // import @interface SaveWebViewController : UIViewController { IBOutlet UIWebView *webview; } @property (nonatomic, retain) IBOutlet UIWebView *webview; [IBAction]saveWeb:(id)sender; @end //////////////////////////////////////////////////////////////////////////////// // // SaveWebViewController.m // SaveWeb // // // Copyright MyCompanyName 2010. All rights reserved. // import "SaveWebViewController.h" @implementation SaveWebViewController (IBAction)saveWeb:(id)sender { UIGraphicsBeginImageContext(webView.frame.size); [self.view.layer renderInContext: UIGraphicsGetCurrentContext()]; UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); UIImageWriteToSavedPhotosAlbum(viewImage, nil, nil, nil); } // The designated initializer. Override to perform setup that is required before the view is loaded. - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { // Custom initialization } return self; } // Implement loadView to create a view hierarchy programmatically, without using a nib. - (void)loadView { } //Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { [super viewDidLoad]; [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://google.com"]]]; } // Override to allow orientations other than the default portrait orientation. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return (interfaceOrientation == UIInterfaceOrientationPortrait); } (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } (void)viewDidUnload { // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } (void)dealloc { [super dealloc]; } @end

    Read the article

  • SVN Source control issues when merging changes

    - by HollyStyles
    I have seen where changes have been made on one code file by two developers code like this: x++ End up like this: x++ x++ where due to carriage returns being inserted/removed (I think) one line has become silently merged as two lines of the same code (no conflicts) Everything compiles but suddenly tests are failing and weird behaviour ensues. Should this be possible? How do I guard against it?

    Read the article

  • Forwarding emails from a domain

    - by Euwyn
    I generally use Google Apps to handle email domains. I'm unfortunately stuck in an infinite loop with Google [1] for one the domains I recently picked up. Right now I use Zerigo's awesome DNS services. How can I get [email protected] forwarded to my Gmail account? Better yet if this is a free/cheap solution and can work with multiple aliases going to different real email addresses ([email protected] - [email protected], [email protected] - [email protected]) [1] Long story. I alternate between "Sorry, you've reached a login page for a domain that isn't using Google Apps." and "This domain has already been registered with Google Apps." Seems like many others are having this issue and Google isn't doing anything about it.

    Read the article

  • VMWare Player vs Workstation

    - by Anjisan
    What's the difference between VMWare Player vs Workstation? Is it that Player is for non-commercial use and workstation isn't? For someone who builds and tests applications at home for non-commercial use, is it worth paying for a Workstation license? Do I get any benefits over Player? (Note: I realize there's open source solutions like VirtualBox, but am more interested in the differences between Player and Workstation.) Thanks!

    Read the article

  • Safely delete a TFS branch project

    - by Codesleuth
    I'm currently reorganising our TFS source control for a very large set of solutions, and I've done this successfully so far. I have a problem at the moment where I need to delete a legacy "Release Branch" TFS project that was branched for the old structure, and is no-longer required since I now host a release branch within the new structure. This is an example of how the source control now looks after moving everything: $/Source Project /Trunk /[Projects] /Release /[Projects] $/Release Branch Project /[Projects] /[Other legacy stuff] So far I've found information that says: tf delete /lock:checkout /recursive TestMain to delete a branch. TfsDeleteProject to delete a project tf delete seems to be only relevant when I need to delete a branch that is within the same project as the trunk, and TfsDeleteProject doesn't seem like it will delete the branch association from the source project (I hope I'm wrong, see below). Can someone tell me if the above will work, and in what order I should perform them in, to successfully delete the TFS $/Release Branch Project while also deleting the branch association (from right-click $/Source Project - Properties - Branches)?

    Read the article

  • New line in GridView cell

    - by Chris
    I'm binding a GridView to an LINQ query. Some of the fields in the objects created by the LINQ statement are strings, and need to contain new lines. Apparently, GridView HTML-encodes everything in each cell, so I can't insert a <br /> to create a new line within a cell. How do I tell GridView not to HTML encode the contents of cells? Maybe I should use a different control instead?

    Read the article

  • Finding if a path between 2 sides of a game board exists

    - by Meny
    Hi, i'm currently working on a game as an assignment for school in java. the game cuurently is designed for Console. the game is for 2 players, one attacking from north to south, and the other from west to east. the purpose of the game is to build a "bridge"/"path" between the 2 of your sides before your opponent does. for example: A B C D E F 1 _ _ X _ _ _ 1 2 O X X _ _ _ 2 3 O X O O O O 3 4 O X O _ _ _ 4 5 X X _ _ _ _ 5 6 X O _ _ _ _ 6 A B C D E F player that attacks from north to south won (path/bridge from C to A) my problem is, what algorithm would be good to check if the user have managed to create a path (will be checked at the end of each turn). you're help would be very appreciated.

    Read the article

  • Source Control - XCode - Visual Studio 2005/2008 / 2010

    - by Mick Walker
    My apologies if this has been asked before, I wasnt quite sure if this question should be asked on a programming forum, as it more relates to programming environment than a particular technology, so please accept my (double) appologies if I am posting this in the wrong place, my logic in this case was if it effects the code I write, then this is the place for it. At home, I do a lot of my development on a Mac Pro, I do development for the Mac, iPhone and Windows on this machine (Xcode & Visual Studio - (multiple versions installed in bootcamp, but generally I run it via Parallels)). When visiting a client, I have a similar setup, but on my MacBook Pro. What I want is a source control solution to install on the Mac Pro, that will support both XCode and multiple versions of visual studio, so that when I visit a client, I can simply grab the latest copy from source control via the MacBook Pro. Whilst visiting the client, he / she may suggest changes, and minor ones I would tend to make on site, so I need the ability to merge any modified code back into the trunk of the project / solution when I return home. At the moment, I am using no source control at all, and rely on simply coping folders and overwriting them when I return from a client- thats my 'merge'!!! I was wondering if anyone had any ideas of a source provider I could use, which would support both Windows and Mac development environments, and is cheap (free would be better).

    Read the article

  • Simple Scala actor question

    - by 7zark7
    I'm sure this is a very simple question, but embarrassed to say I can't get my head around it: I have a list of values in Scala. I would like to use use actors to make some (external) calls with each value, in parallel. I would like to wait until all values have been processed, and then proceed. There's no shared values being modified. Could anyone advise? Thanks

    Read the article

  • CoreLocation on iPod Touch, location caching and other conundrums...

    - by Moshe
    I have a few questions about Core Location. 1) Should the user refuse permission for my app to use core location, or core location is unavailable for some reason, is there a fallback? (Device Locale, for example?) 2)Can I cache a device's location for next time? Does Core Location do this itself? 3)I really need the sunset time in the user's area during the mid-spring season and I have a function to do that, once I have the Latitude and Longitude of the device. Perhaps I can just make an assumption about the time based on Locale? (Example: In the US, assume approximately 7:00pm.)

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >