Daily Archives

Articles indexed Sunday June 13 2010

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

  • word ladder in python

    - by user365523
    I'm trying to create a word ladder program in python. I'd like to generate words that are similar to a given word. In c++ or java, I would go through each valid index in the original string, and replace it with each letter in the english alphabet, and see if the result is a valid word. for example (pseudocode) for (int i = 0; i < word.length(); i++) { for (every character c in the alphabet) { change the letter of word at index i to be c. if the result is a valid word, store it in a list of similar words } } . However, this doesn't seem like a very "python" way of doing things. How would I approach this problem in python?

    Read the article

  • Best way to play MIDI sounds using C#

    - by jerhinesmith
    I'm trying to rebuild an old metronome application that was originally written using MFC in C++ to be written in .NET using C#. One of the issues I'm running into is playing the midi files that are used to represent the metronome "clicks". I've found a few articles online about playing MIDI in .NET, but most of them seem to rely on custom libraries that someone has cobbled together and made available. I'm not averse to using these, but I'd rather understand for myself how this is being done, since it seems like it should be a mostly trivial exercise. So, am I missing something? Or is it just difficult to use MIDI inside of a .NET application?

    Read the article

  • SQL SERVER What is Denali?

    I see following question quite common on Twitter or in my email box. “What is Denali?” Denali is code name of SQL Server 2011. Here is the list of the code name of other versions of SQL Server. In 1988, Microsoft released its first version of SQL Server. It was developed jointly by Microsoft and [...]...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • sSMTP Configuration Question

    - by SevenCentral
    I've installed sSMTP on Ubuntu 10.04 via: sudo apt-get install ssmtp My configuration file is: # # Config file for sSMTP sendmail # # The person who gets all mail for userids < 1000 # Make this empty to disable rewriting. [email protected] # The place where the mail goes. The actual machine name is required no # MX records are consulted. Commonly mailhosts are named mail.domain.com mailhub=smtp.gmail.com:587 # Where will the mail seem to come from? #rewriteDomain= # The full hostname hostname=somedomain.com # Are users allowed to set their own From: address? # YES - Allow the user to specify their own From: address # NO - Use the system generated From: address #FromLineOverride=YES [email protected] authpass=**** usestarttls=yes Am I transmitting my credentials in clear text? Is calling ssmtp a secure operation? Thanks.

    Read the article

  • Autohotkey: clipboard enhancements don't work in Google Docs word processor

    - by Robert Mark Bram
    Came across this amazing AutoHotkey tip in an earlier question: Clipboard enhancements ; Append to clipboard (cut) ^+x:: clipboardBefore = %clipboard% Send ^x ClipWait, 2 clipboard = %clipboardBefore% %clipboard% return ; Append to clipboard (copy) ^+c:: clipboardBefore = %clipboard% Send ^c ClipWait, 2 clipboard = %clipboardBefore% %clipboard% return Source: most useful autohotkey scripts But the append copy and cut don't seem to work in Google Docs (word processing). Anyone know how they can be fixed? Rob :)

    Read the article

  • Simplest way to add stills to MP3 audio soundtrack

    - by Ambrose
    I have some audio and want to add visuals to it and upload to YouTube. Nothing fancy, just like slides, image_A from 00:00:00 to 00:00:05 then image_B from 00:00:50 to 00:00:30 and so on. I have recent Mac and Windows machines to do this on. I'd like to do it on free or demo software if I can. Please give a bit of a hint how to get started if you can. I took a look a iMovie, but ... where to start, if you haven't actually got video?

    Read the article

  • Application crashes when running in iPhone simulator 3.2 (Works fine in simulator 3.0)

    - by amitabh
    I just upgraded to SDK 3.2. My application runs in Simulator 3.0 in debug mode but when I change the Simulator to run with 3.2 it crashes with EXEC_BAD_ACCESS. It is crashing at objc_msgsend method. int main(int argc, char *argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; int retVal = UIApplicationMain(argc, argv, nil, nil); <======== THE STACK TRACE starts here. [pool release]; return retVal; } Any idea what is going on? I have absolutely no clue. Any help/suggestion will be greatly appreciated? Thanks A

    Read the article

  • What is the exact rule of jQuery's animate() parameters?

    - by Jian Lin
    jQuery 1.4.2's animate() API spec is .animate( properties, [ duration ], [ easing ], [ callback ] ) but it seems that we can supply duration, callback, and no easing .animate({left: '+= 100'}, 600, doThis) and it will work. But if we supply easing and callback and no duration .animate({left: '+=100'}, 'swing', doThis) then the easing won't be taken into effect. So what exactly is the API supposed to be?

    Read the article

  • How to compile and build C# projects with Ant and Mono?

    - by Wing C. Chen
    I am currently working on a project with both java and C# codes within. Java takes the major role in this project. However, C# still takes a small part in it. I am using Ant to build the projects, and would very much like to use it to build C# too. I have learned that it's possible to build C# under Ant with the help of Mono. Can anybody provide any link of tutorial or guidance here? I was trying to google for it. But I haven't found any comprehensive data.

    Read the article

  • Help creating a predicate for use with filteredArrayUsingPredicate

    - by johnbdh
    I am trying to learn how to use predicates and so am trying to replace the following working code with filteredArrayUsingPredicate... [filteredLocations removeAllObjects]; for (NSString *location in locations) { NSRange range = [location rangeOfString:query options:NSCaseInsensitiveSearch]; if (range.length > 0) { [filteredLocations addObject:location]; } } Instead I am trying.... [filteredLocations removeAllObjects]; NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF contains %@", searchText]; [filteredLocations addObjectsFromArray: [locations filteredArrayUsingPredicate:predicate]]; I am not getting the same results with the predicate as I am with for loop rangeOfString. With the range of string for example searchText returns an 8 item array while with the same value returns only 2 with the predicate. Another example, hono will find honolulu in the locations array while it will not find anything using the predicate. As I understand it SELF represents the object object being evaluated ie. the locations array, so I think that is the correct syntax. Any help would be appreciated Thanks, John

    Read the article

  • about feeding of pythons

    - by djz
    i want to feed python but i cant see them eating live once . do they eat dead one ... and if i feed them a chicken leg piece which is boiled for the python to look like the live pray due to its heat will he eat ??? .. plz answer ....sir.....

    Read the article

  • Exclude subexpression from regexec in c++

    - by wyatt
    Suppose I was trying to match the following expression using regex.h in C++, and trying to obtain the subexpressions contained: /^((1|2)|3) (1|2)$/ Suppose it were matched against the string "3 1", the subexpressions would be: "3 1" "3" "1" If, instead it were matched against the string "2 1", the subexpressions would be: "2 1" "2" "2" "1" Which means that, depending on how the first subexpression evaluates, the final one is in a different element in the pmatch array. I realise this particular example is trivial, as I could remove one of the sets of brackets, or grab the last element of the array, but it becomes problematic in more complicated expressions. Suppose all I want are the top-level subexpressions, the ones which aren't subexpressions of other subexpressions. Is there any way to only get them? Or, alternatively, to know how many subexpressions are matched within a subexpression, so that I can traverse the array irrespective of how it evaluates? Thanks

    Read the article

  • How to effectively measure developer's work hours?

    - by twk
    I have a few software developers working for my projects and I would like to provide them a way to register time they spent on real development. There is good will to register development hours, no force, but we try to avoid techniques like excel sheets register because this is so uncomfortable. I can track svn commits, but this is unreliable. Developers also helps supporting different projects during the day, so assuming they work on one project by whole day is not true. I've seen utilities that popups a message every hour to confirm the project you're working on but this is annoying. Some kind of active-window-title-anaylzer might help (you can get solution name from there in the case of Visual Studio) but I have no experience with such idea. If you have any experience with programmers/designers work hours registration, please share with me. Thanks

    Read the article

  • help me with the following sql query

    - by rupeshmalviya
    could somebody correct my following query, i am novice to software development realm, i am to a string builder object in comma separated form to my query but it's not producing desired result qyery is as follows and string cmd = "SELECT * FROM [placed_student] WHERE passout_year=@passout AND company_id=@companyId AND course_id=@courseId AND branch_id IN('" + sb + "')"; StringBuilder sb = new StringBuilder(); foreach (ListItem li in branch.Items) { if (li.Selected == true) { sb.Append(Convert.ToInt32(li.Value) +", "); } } li is integer value of my check box list which are getting generated may be differne at different time ...please also suggest me some good source to learn sql..

    Read the article

  • Scroll UITableView so that the header isn't visible

    - by DASKAjA
    I've got a UITableView with a UISearchBar as the tableViews.tableHeaderView. Just like the new Mail.app, Notes.app, etc. in 3.0. I want to hide the SearchBar until the user drags it in his sight. My attempt only works when there're a couple of items in the tableView, so that the tableView actually wants to scroll. I call this in loadView: NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0]; [self._tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:NO]; Nevertheless it seems that Apple handles such a serachbar differently. After draging out the searchbar it doesn't seem to be bounded to the tablecells anymore (in Notes.app, not in Mail.app). But perhaps Apple has a distinct method for that new 3.0 behaviour, and I just can't find it?

    Read the article

  • Why can't I multiply a float?

    - by Dpp
    I was quite surprised why I tried to multiply a float in C (with GCC 3.2) and that it did not do as I expected.. As a sample: int main() { float nb = 3.11f; nb *= 10; printf("%f\n", nb); } Displays: 31.099998 I am curious regarding the way floats are implemented and why it produces this unexpected behavior?

    Read the article

  • SQL Server 2008 R2 CTP Installer crashes instantly after starting it

    - by Adrian Grigore
    Hi, I'm trying to update my existing SQL server 2008 SP1 installation with SQL Server 2008 R2 (November CTP). I started the setup and chose the upgrade option and after some time the installer told me to reboot. As soon as I confirmed with OK, it crashed. After rebooting I can't even run the setup file anymore. it crashes instantly without an error message. What's the recommended way of troubleshooting this? Thanks, Adrian

    Read the article

  • Need to incorporate Timezone Selection (UTC) within Web App

    - by tonsils
    Hi, I need to incorporate a Timezone dropdown selection within my web app, which I need to use within an Oracle database. I basically require the user to select their timezone and I then need to use this against time stamp info stored within the Oracle tables. Unsure where/how to build this Timezone selection list within my page - example how-tos would be great. Would like this to be UTC. Thanks.

    Read the article

  • Generating Random Records Date Wise

    - by Julian
    I work for a non-profit organization where we send volunteers to aided schools everyday. I am creating a site to display this info and am using SQL server express. I want some help regarding a query so here's my first post We have 15 volunteers currently who will go to 4 different schools to teach. Here are some conditions: We have to create a 'new' group comprising of 1 Leader and 4 TeamSupporters 'every day' except Sunday who will go to teach everyday If a person becomes a Leader in a week, he cannot become a leader again for the same week. A leader can become a TeamSupporter in the same week. Moving ahead, we can have more number of school to target, so 4 is not a constant Here's how the output should look like School1 School2 School3 School4 Jun14 Leader V6 V6 V6 V6 Support1 V3 V3 V3 V3 Support2 V9 V9 V9 V9 Support3 V12 V12 V12 V12 Support4 V1 V1 V1 V1 Jun15 Leader V2 V2 V2 V2 Support1 V7 V7 V7 V7 Support2 V9 V9 V9 V9 Support3 V8 V8 V8 V8 Support4 V11 V11 V11 V11 Jun16 Leader V9 V9 V9 V9 Support1 V6 V6 V6 V6 Support2 V4 V4 V4 V4 Support3 V3 V3 V3 V3 Support4 V14 V14 V14 V14 and so on..

    Read the article

  • How to decode a html string using xslt

    - by John ClearZ
    I am trying to style an rss feed using xslt. I want to display an image that is stored in the tag on the feed. The problem is it is encoded to display as text on the page instead of being rendered. The following is an example of part of the string. 1). <description>&lt;img src="http&amp;#58;&amp;#47;&amp;#47;buavhw.blu.livefilestore.com&amp;#47;y1ppCokLxFJSG2cmyPdvg... I had to add extra coding to the string above to get it to appear properly here. The string below is how it appears when I paste it directly into the text box. 2). <description><img src="http&#58;&#47;&#47;buavhw.blu.livefilestore.com&#47;y1ppCokLxFJSG2cmyPdvg... If I copy and paste it again from the preview window it only then becomes the following string. 3). <description><img src="http://buavhw.blu.livefilestore.com/y1ppCokLxFJSG2cmyPdvg...

    Read the article

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