Daily Archives

Articles indexed Friday June 18 2010

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

  • Is there a way to avoid putting the Perl version number into the "use lib" line for Perl modules in

    - by Kinopiko
    I am trying to install some Perl modules into a non-standard location, let's call it /non/standard/location. In the script which uses the module, it seems to be necessary to specify a long directory path including the version of Perl, like so: #!/usr/local/bin/perl use lib '/non/standard/location/lib/perl5/site_perl/5.8.9/'; use A::B; Is there any use lib or other statement which I can use which is not so long and verbose, and which does not include the actual version of Perl, in order that I don't have to go back and edit this out of the program if the version of Perl is upgraded?

    Read the article

  • how to fix this IE6 input bug

    - by CunruiLi
    var check = function(){ return false; } var submit = document.createElement("input"); submit.type = "image"; submit.src = "submit1.gif"; submit.onclick = check; _submitSpan.appendChild(submit); i created a form and append a input button, but i found it can't work in IE6, when click the button, the form auto submitted. can anybody help me.thank you.

    Read the article

  • Develop an iPhone / iPad Reader app from scratch

    - by Comma
    I'm developing a reader app for viewing and highlighting proprietary format documents. The documents are 2D. (Might add some cool page flip effects) The interface is similar to that of mobile safari. I have no prior experience with iOS development. Could you guys point me to the right direction? (Things I need to consider, tutorials, sample projects...) THX

    Read the article

  • Silverlight MediaElement Position Property Weirdness

    - by BarrettJ
    I have a MediaElement that is reporting its position incorrectly and weirdly, but consistently. It seems like when it gets to the last second of the audio (and it's always the last second, regardless if the sound is two seconds or 10), it doesn't update it's position until it finishes. Example output: Playback Progress: 0/3.99 - 0 Playback Progress: 0.01/3.99 - 0 Playback Progress: 0.03/3.99 - 0 Playback Progress: 0.06/3.99 - 1 Playback Progress: 0.07/3.99 - 1 Playback Progress: 0.08/3.99 - 2 Playback Progress: 0.11/3.99 - 2 Playback Progress: 0.14/3.99 - 3 Playback Progress: 0.19/3.99 - 4 Playback Progress: 0.23/3.99 - 5 Playback Progress: 0.25/3.99 - 6 Playback Progress: 0.28/3.99 - 7 Playback Progress: 0.3/3.99 - 7 Playback [SNIP] Playback Progress: 2.8/3.99 - 70 Playback Progress: 2.83/3.99 - 70 Playback Progress: 2.88/3.99 - 72 Playback Progress: 2.9/3.99 - 72 Playback Progress: 2.91/3.99 - 72 Playback Progress: 2.92/3.99 - 73 Playback Progress: 2.99/3.99 - 74 Playback Progress: 3/3.99 - 75 Playback Progress: 3/3.99 - 75 Playback Progress: 3/3.99 - 75 Playback Progress: 3/3.99 - 75 Playback Progress: 3/3.99 - 75 Playback Progress: 3/3.99 - 75 Playback Progress: 3/3.99 - 75 Playback Progress: 3/3.99 - 75 Playback Progress: 3/3.99 - 75 Playback Progress: 3.99/3.99 - 100 That is the result of: WriteLine("Playback Progress: " + Position + "/" + LengthInSeconds + " - " + (int)((Position / LengthInSeconds) * 100)); public double Position { get { return my_media_element != null ? my_media_element.Position.TotalSeconds : 0; } } public double LengthInSeconds { get { return my_media_element != null ? my_media_element.NaturalDuration.TimeSpan.TotalSeconds : 0; } } Anyone have any ideas why this is occurring?

    Read the article

  • Copying one form's values to another form using JQuery

    - by rsturim
    I have a "shipping" form that I want to offer users the ability to copy their input values over to their "billing" form by simply checking a checkbox. I've coded up a solution that works -- but, I'm sort of new to jQuery and wanted some criticism on how I went about achieving this. Is this well done -- any refactorings you'd recommend? Any advice would be much appreciated! The Script <script type="text/javascript"> $(function() { $("#copy").click(function() { if($(this).is(":checked")){ var $allShippingInputs = $(":input:not(input[type=submit])", "form#shipping"); $allShippingInputs.each(function() { var billingInput = "#" + this.name.replace("ship", "bill"); $(billingInput).val($(this).val()); }) //console.log("checked"); } else { $(':input','#billing') .not(':button, :submit, :reset, :hidden') .val('') .removeAttr('checked') .removeAttr('selected'); //console.log("not checked") } }); }); </script> The Form <div> <form action="" method="get" name="shipping" id="shipping"> <fieldset> <legend>Shipping</legend> <ul> <li> <label for="ship_first_name">First Name:</label> <input type="text" name="ship_first_name" id="ship_first_name" value="John" size="" /> </li> <li> <label for="ship_last_name">Last Name:</label> <input type="text" name="ship_last_name" id="ship_last_name" value="Smith" size="" /> </li> <li> <label for="ship_state">State:</label> <select name="ship_state" id="ship_state"> <option value="RI">Rhode Island</option> <option value="VT" selected="selected">Vermont</option> <option value="CT">Connecticut</option> </select> </li> <li> <label for="ship_zip_code">Zip Code</label> <input type="text" name="ship_zip_code" id="ship_zip_code" value="05401" size="8" /> </li> <li> <input type="submit" name="" /> </li> </ul> </fieldset> </form> </div> <div> <form action="" method="get" name="billing" id="billing"> <fieldset> <legend>Billing</legend> <ul> <li> <input type="checkbox" name="copy" id="copy" /> <label for="copy">Same of my shipping</label> </li> <li> <label for="bill_first_name">First Name:</label> <input type="text" name="bill_first_name" id="bill_first_name" value="" size="" /> </li> <li> <label for="bill_last_name">Last Name:</label> <input type="text" name="bill_last_name" id="bill_last_name" value="" size="" /> </li> <li> <label for="bill_state">State:</label> <select name="bill_state" id="bill_state"> <option>-- Choose State --</option> <option value="RI">Rhode Island</option> <option value="VT">Vermont</option> <option value="CT">Connecticut</option> </select> </li> <li> <label for="bill_zip_code">Zip Code</label> <input type="text" name="bill_zip_code" id="bill_zip_code" value="" size="8" /> </li> <li> <input type="submit" name="" /> </li> </ul> </fieldset> </form> </div>

    Read the article

  • DD-WRT RIP2 Router mode configuration

    - by Eduardo
    Can anybody tell me why my wireless router only redirects traffic to ADSL modem when it is on Gateway mode? These are the configurations when it is on RIP2 Router mode: ADSL Modem: ------------ LAN IP: 10.1.1.1 Subnet mask: 255.0.0.0 RIP v2 enabled in both directions Route: destination: 192.168.1.0 Subnet mask: 255.255.255.0 Gateway: 10.1.1.2 Wireless Router (DD-WRT) ------------------------ WAN IP: 10.1.1.2 WAN Subnet mask: 255.0.0.0 LAN IP: 192.168.1.1 LAN Subnet mask: 255.255.255.0 Operating mode: RIP2 Router Static Route: Destination LAN NET: 10.0.0.0 Subnet Mask: 255.0.0.0 Gateway: 10.1.1.1 Interface: LAN & WLAN

    Read the article

  • Operator & and * at function prototype in class

    - by Puyover
    I'm having a problem with a class like this: class Sprite { ... bool checkCollision(Sprite &spr); ... }; So, if I have that class, I can do this: ball.checkCollision(bar1); But if I change the class to this: class Sprite { ... bool checkCollision(Sprite* spr); ... }; I have to do this: ball.checkCollision(&bar1); So, what's the difference?? It's better a way instead other? Thank you.

    Read the article

  • NLog ASP.Net viewer

    - by krs43
    I am using nLog in a large financial application, but frequently need to bring up the logs of the last hour while the software is running and filter on specific loggers/levels. I want to log everything to SQL, and use an asp.net viewer. Do any such project exist? Are there some good example sites for this?

    Read the article

  • Use of metadatatype in linq-to-sql

    - by jess
    Hi, I had asked this question http://stackoverflow.com/questions/2442149/adding-more-attributes-to-linq-to-sql-entity Now, when I add Browsable attribute to generated entity in designer,it works.But,when I use the MetaDataType approach,and add Browsable attribute in partial class,it does not work "I added a MetaDataType class, and added browsable attribute to property,but seems to have no effect"

    Read the article

  • Delete link to file without clearing readonly bit

    - by Joshua
    I have a set of files with multiple links to them. The files are owned by TFS source control but other links to them are made to them. How do I delete the additional links without clearing the readonly bit. It's safe to assume: The files have more than one link to them You are not deleting the name owned by TFS There are no potential race conditions You have ACL full control for the files The machine will not lose power, nor will your program be killed unless it takes way too long. It's not safe to assume: The readonly bit is set (don't set it if its not) You can leave the readonly bit clear if you encounter an error and it was initially set Do not migrate to superuser -- if migrated there the answer is impossible because no standard tool can do this.

    Read the article

  • Is it posible to Build & Run on TWO iPhones/iPods at once?

    - by Dimitris
    When I connect two iPhones at the same time to my computer and Build and Run a project the app only installs and plays on one of the devices. Now, with the iPhone 3.0, that supports bluetooth peer-to-peer connectivity, to test a multiplayer project you have to install and run it on two devices at the same time. It would be very helpful to be able to do that with one click instead of: install on one phone, disconnect, connect the other, wait a 10 seconds to recognize the phone and install again and run... Is anyone aware of a method to do such a thing? Thanks

    Read the article

  • WPF ProgressBar - TargetParameterCountException

    - by Dr_Asik
    I am making my first WPF application, where I use the Youtube .NET API to upload a video to Youtube using the ResumableUploader. This ResumableUploader works asynchronously and provides an event AsyncOperationProgress to periodically report its progress percentage. I want a ProgressBar that will display this progress percentage. Here is some of the code I have for that: void BtnUpload_Click(object sender, RoutedEventArgs e) { // generate video uploader = new ResumableUploader(); uploader.AsyncOperationCompleted += OnDone; uploader.AsyncOperationProgress += OnProgress; uploader.InsertAsync(authenticator, newVideo.YouTubeEntry, new UserState()); } void OnProgress(object sender, AsyncOperationProgressEventArgs e) { Dispatcher.BeginInvoke((SendOrPostCallback)delegate { PgbUpload.Value = e.ProgressPercentage; }, DispatcherPriority.Background, null); } Where PgbUpload is my progress bar and the other identifiers are not important for the purpose of this question. When I run this, OnProgress will be hit a few times, and then I will get a TargetParameterCountException. I have tried several different syntax for invoking the method asynchronously, none of which worked. I am sure the problem is the delegate because if I comment it out, the code works fine (but the ProgressBar isn't updated of course). Thanks for any help.

    Read the article

  • How to Import flip video to Final Cut Pro and edit flip video in Final Cut Pro?

    - by Yinahd
    Final Cut Pro is a professional video editing application for Mac users and it is widely used even by many Hollywood people on professional movie post-production. If you are a flip video fan and you want to give professional editing to your flip videos, Final Cut Pro is a great choice. However, Final Cut Pro does not allow raw flip videos to be imported to Final Cut Pro and you will need to convert flip video to Final Cut Pro supported formats.

    Read the article

  • How to Price SEO

    To start off may people don't know what SEO (search engine optimization) really is and therefore very cautious about spending any amount of their hard earned money towards it. This can be a problem for SEO companies as it can be quite tricky how to price the work they do.

    Read the article

  • Math - Convert Arbitrary Length to Range From -1.0 to 1.0?

    - by TheDarkIn1978
    how can i convert a length into a range of -1.0 to 1.0? example: my stage is 440px in length and accepts mouse events. i would like to click in the middle of the stage, and rather than an output of X = 220, i'd like it to be X = 0. similarly, i'd like the real X = 0 to become X = -1.0 and the real X = 440 to become X = 1.0. i don't have access to the stage, so i can't simply center-register it, which would make this process a lot easier. also, it's not possible to dynamically change the actual size of my stage, so i'm looking for a formula that will translate the mouse's real X coordinate of the stage to evenly fit within a range from -1 to 1.

    Read the article

  • Help! Obj-C/Iphone programming: extracting string from html text and reading off line by line

    - by royden
    hihi, I have this html text response from a particular website: <tr><td valign="top"><img src="/icons/image2.gif" alt="[IMG]"></td><td><a href="crsdsdfs2221.jpg">crash-2221.jpg</a></td><td align="right">14-Jun-2010 14:29 Notice for every line, there is this href=".__", which is an image file with random name and random format. I would like to extract that string within the inverted commas out so that i can append it into a URL path and download the image. I've been looking through this documentation from apple: http://developer.apple.com/mac/library/documentation/cocoa/conceptual/strings/Articles/SearchingStrings.html#//apple_ref/doc/uid/20000149-CJBBGBAI on String programming but couldn't find one that fits my bill. Also after reading it, what code can I use to ensure that I will be reading the next line the next time my function is called( because I want to download the next picture). Hope some kind soul can help me out, thanks!

    Read the article

  • What happens if my IExceptionPublisher throws an Exception?

    - by Graphain
    Hi, I'm using the .NET Exception Management Application Block (EMAB). As part of this I am implementing IExceptionPublisher classes. However, I am wondering what happens if these publishers encounter an Exception. I had a bit of a look around and apparently they are meant to do something like this: try { /* Normal Exception Publishing */ } catch { ExceptionManager.PublishInternalException(exception, additionalInfo); } Source: One caveat: what happens if there is an exception in our custom publisher code, preventing the publishing to MSMQ? For that, we turn to the ExceptionManager.PublishInternalException method, which will publish the exception to the default publisher, which is the Windows application event log. However, PublishInternalException is both protected and internal so I would have to be implementing ExceptionManager, not IExceptionPublisher, to access it.

    Read the article

  • Failed to load viewstate

    - by Jen
    OK have just started getting this error and I'm not sure why. I have a hosting page which has listview and a panel with a usercontrol. The listview loads up records with a linkbutton. You click the link button to edit that particular record - which gets loaded up in the formview (within the usercontrol) which goes to edit mode. After an update occurs in the formview I'm triggering an event which my hosting page is listening for. The hosting page then rebinds the listview to show the updated data. So this all works - but when I then go to click on a different linkbutton I get the below error: Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3) Timestamp: Fri, 18 Jun 2010 03:15:54 UTC Message: Sys.WebForms.PageRequestManagerServerErrorException: Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request. Line: 4723 Char: 21 Code: 0 URI: http://localhost:1951/AdminWebSite/ScriptResource.axd?d=yfdLw4zYs0bqYqs1arL-htap1ceeKCyW1EXhrhMZy_AqJ36FUpx8b2pzMKL6V7ebYsgJDVm_sZ_ykV1hNtFqgYcJCLLtardHm9-yyA7zC4k1&t=ffffffffec2d9970 Any suggestions as to what is actually wrong?? My event listener does this: protected void RatesEditDate1_EditDateRateUpdated() { if (IsDateRangeValid(txtDisplayFrom, txtDisplayTo)) { PropertyAccommodationRates1.DataBind(); } else { pnlViewAccommodationRates.Visible = false; } divEditRate.Visible = false; } When I click my link button - it should be hitting this but the second time round it errors before hitting the breakpoint: protected void RatesEditDate1_EditDateRateSelected(DateTime theDateTime) { // make sure everything else is invisible pnlAddAccommodation.Visible = false; pnlViewEditAccommodations.Visible = false; RatesEditDate1.TheDateTime = theDateTime; RatesEditDate1.PropertyID = (int)Master.PropertyId; if (!String.IsNullOrEmpty(Accommodations1.SelectedValue)) { RatesEditDate1.AccommodationTypeID = Convert.ToInt32(Accommodations1.SelectedValue); } else { RatesEditDate1.AccommodationTypeID = 0; } divEditRate.Visible = true; } So my listview appears to be being rebound successfully - I can see my changed data.. I just don't know why its complaining about viewstate when I click on the linkbutton. Or is there a better way to update the data in my listview? My listview and formview are bound to objectdata sources (in case that matters) Thanks for the help!

    Read the article

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