Daily Archives

Articles indexed Tuesday April 13 2010

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

  • how to change 1 to 2 .

    - by zjm1126
    when i store my kml string to databse,i be this : 2. <?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://www.opengis.net/kml/2.2"> <Placemark> <name>Simple placemark</name> <description>Attached to the ground. Intelligently places itself at the height of the underlying terrain.</description> <Point> <coordinates>-122.0822035425683,37.42228990140251,0</coordinates> </Point> </Placemark> </kml> so how to change it using jquery or javascript

    Read the article

  • ActionScript applying rotation of sprite to startDrag()'s rectangle bounds

    - by TheDarkIn1978
    i've added a square sprite to the stage which, when dragged, is contained within set boundaries. private function swatchBounds():Rectangle { var stageBounds = new Rectangle ( 0 - defaultSwatchRect.x, 0 - defaultSwatchRect.y, stage.stageWidth - defaultSwatchRect.width, stage.stageHeight - defaultSwatchRect.height ); return stageBounds; } if the square sprite is scaled, the following returned rectangle boundary works private function swatchBounds():Rectangle { var stageBounds = new Rectangle ( 0 - defaultSwatchRect.x * swatchObject.scaleX, 0 - defaultSwatchRect.y * swatchObject.scaleY, stage.stageWidth - defaultSwatchRect.width * swatchObject.scaleX, stage.stageHeight - defaultSwatchRect.height * swatchObject.scaleY ); return stageBounds; } now i'm trying to include the square sprites rotation into the mix. math certainly isn't my forté, but i feel i'm on the write track. however, i just can't seem to wrap my head around it to get it right private function swatchBounds():Rectangle { var stageBounds = new Rectangle ( 0 - defaultSwatchRect.x * swatchObject.scaleX * Math.cos(defaultSwatchRect.x * swatchObject.rotation), 0 - defaultSwatchRect.y * swatchObject.scaleY * Math.sin(defaultSwatchRect.y * swatchObject.rotation), stage.stageWidth - defaultSwatchRect.width * swatchObject.scaleX * Math.cos(defaultSwatchRect.width * swatchObject.rotation), stage.stageHeight - defaultSwatchRect.height * swatchObject.scaleY * Math.sin(defaultSwatchRect.height * swatchObject.rotation) ); return stageBounds; }

    Read the article

  • NSFetchedResultsController deallocated instance

    - by Jesse Armand
    Anyone ever encountered this ? -[NSFetchedResultsController _restoreCachedSectionInfo]: message sent to deallocated instance While performing fetch with performFetch: using NSFetchedResultsController instance. I'm sure the NSFetchedResultsController is retained before performing the fetch.

    Read the article

  • Stark Expo Needs You

    - by [email protected]
    Train to Become a Master Cloud Operative Can't wait until September to get your Oracle fix? Then come visit us at the Stark Expo now. Marvel Entertainment has turned itself into one of the hottest media companies of the digital age, and at the heart of Marvel's growth and transformation is Oracle technology. Now, this successful collaboration finds its way to the big screen, as Oracle joins forces with Marvel to launch a special showcase Website and movie trailer for the upcoming Iron Man 2. In Iron Man 2, Oracle is a proud sponsor of Stark Expo, a world-class tradeshow that depends on a cloud computing architecture to ensure that systems are free from overload. Starting today, visitors to the showcase Website are invited to become Master Cloud Operatives and keep Stark Expo up and running. Complete your training, test your troubleshooting skills in the Oracle Pavilion, and qualify to receive a free movie poster.

    Read the article

  • Looking to write a Tag class

    - by Austin Schneider
    I'm looking to write a Tag class (a tag is a string with no spaces). My first thought is to inherit from String: class Tag < String def initialize(str) raise ArgumentError if str =~ /\s/ super end end Does this look correct? Are there any other methods I should redefine?

    Read the article

  • redirecting back to php file

    - by tooepic
    hello again, following code is my php file that will list the people in my text file. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>viewlist php</title> </head> <body> <h1>List</h1> <?php $file = file("peoplelist.txt"); for($i=0; $i<count($file); $i++) { $person = explode(",", $file[$i]); echo "<hr />"; echo "<table cellspacing=10><tr><td>", $i+1,".", "</td>"; echo "<td>", $person[0], "<br />"; echo $person[1], "</td></tr></table>"; } ?> <hr /> <p> <a href="sortatoz.php" target="_self">Sort A-Z</a><br /> <a href="sortztoa.php" target="_self">Sort Z-A</a><br /> </p> </body> </html> what i want to do is, when i click Sort A-Z link, the file called sortatoz.php will sort the list in my text file and redirect back to viewlist.php with the list in sort order. below is my sortatoz.php: <?php header("Location: http://myserver/workspace/viewlist.php"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>sort a to z</title> </head> <h1>List</h1> <body> <?php $file = file("peoplelist.txt"); sort($file); for($i=0; $i<count($file); $i++) { $person = explode(",", $file[$i]); echo "<hr />"; echo "<table cellspacing=10><tr><td>", $i+1,".", "</td>"; echo "<td>", $person[0], "<br />"; echo $person[1], "</td></tr></table>"; } ?> <hr /> <p> <a href="sortvisitorsascending.php" target="_self">Sort Visitors A-Z</a><br /> <a href="sortvisitorsdescending.php" target="_self">Sort Visitors Z-A</a><br /> </p> </body> </html> now, when i click Sort A-Z link, it redirects back to viewlist.php...so I'm assuming the header() function is doing it's job. but the problem is...it's not sorting. i am very new with this, so bear with me and give me some guidance please. what can i do to my codes to redirect back viewlist.php with sorted list? thanks in advance.

    Read the article

  • Prevent checkins to SVN

    - by Joseph Mastey
    My team uses SVN for our software platform, and we create tags periodically to help keep module versions straight. Best practice, as I understand it, is not to modify a tag once it has been created. However, it seems that sometimes the temptation is too great and a modification is made to one of the tags. Is there a way to prevent these kinds of checkins, or at least make them a complete pain so that we can discourage them automatically? Thanks, Joe

    Read the article

  • What is your Wordpress 2.9 theme development workflow after getting PSD from client?

    - by metal-gear-solid
    What are useful and free resources to make Wordpress 2.9 themes? Is Dreamweaver helpful to make themes ? What are time saving tips? I'm using Dreamweaver CS3 on Windows. and my main browser is FF 3.6. I know some extensions of dreamweaver but those are not updated with wordpress versions. Should we edit theme files directly on live server or Local XAMPP option is better? Should i create XHTML CSS version of PSD then XHTML CSS to wordpress? After making XHTML CSS Version of PSD how to incorporate Wordpress 2.9 Tags in it? Has anyone tried this tool http://www.themedreamer.com/ is this really helpful?

    Read the article

  • How to refresh Mono ASP.NET page without restarting the web server?

    - by Hao
    When I make changes to a file, Mono ASP.NET doesn't see my changes, I have to do this: sudo /etc/init.d/apache2 restart I remember hen Mono ASP.NET executes ASP.NET it caches the compilation somewhere. Before, when the updated page doesn't come up, I just delete that cached compiled code. I just forgot the exact path How to make Mono ASP.NET that I have changed the program without restarting the web server?

    Read the article

  • BDC Security Issues

    - by geekspt
    We are planning to use BDC to read and probably write to a SQL Server content database on external server. I have heard that there are many security issues that you may run into or should be aware of before setting up BDC. has anyone faced or knows any security issues with BDC. Thanks.

    Read the article

  • How Can I Automatically Execute A Link In Internet Explorer

    - by Martin
    I am trying to create an application to print documents over the web. I have created my document, and made a web page with a meta refresh tag, along the lines of this: <meta http-equiv="refresh" content="3;http://example.com/download.epl2" /> I specify that the document has a content-type of application/x-epl2, and I have associated .epl2 files on my computer with a program that silently sends them to the printer. I have put the website into my trusted sites zone. Currently Internet Explorer pops up the "Open, Save, Cancel" dialog box with no option to automatically open the file. Is there a setting in IE6/7/8 that I can use to have IE just open the file without prompting?

    Read the article

  • Would this prevent the row from being read during the transaction?

    - by acidzombie24
    I remember an example where reads in a transaction then writing back the data is not safe because another transaction may read/write to it in the time between. So i would like to check the date and prevent the row from being modified or read until my transaction is finish. Would this do the trick? and are there any sql variants that this will not work on? update tbl set id=id where date>expire_date and id=@id Note: dateexpire_date happens to be my condition. It could be anything. Would this prevent other transaction from reading the row until i commit or rollback?

    Read the article

  • MongoDB RSS Feed Entries, Embed the Entries in the Feed Object?

    - by Patrick Klingemann
    I am saving a reference to an RSS Feed in MongoDB, each Feed has an ever growing list of Entries. As I'm designing my schema, I'm concerned about this statement from the MongoDB Schema Design - Embed vs. Reference Documentation: If the amount of data to embed is huge (many megabytes), you may read the limit on size of a single object. This will surely happen if I understand the statement correctly. So the question is, I am correct to assume that I should not embed the Feed Entries within a Feed because I'll eventually reach the limit on size of a single object?

    Read the article

  • How can I access a global pointer outside of a C function?

    - by patrick
    I am trying to access the data of*tkn within a different function in my program for example: putchar(*tkn); It is a global variable but its not working correctly. Any ideas? #define MAX 20 // globals char *tkn; char array[MAX]; ... void tokenize() { int i = 0, j = 0; char *delim = " "; tkn = strtok (str," "); // get token 1 if (tkn != NULL) { printf("token1: "); while ((*tkn != 0) && (tkn != NULL)) { putchar(*tkn); array[i] = *tkn; *tkn++; i++; } } }

    Read the article

  • iPhone: NSTimer Countdown (Display Minutes:Seconds)

    - by user298261
    Hello! I have my timer code set up, and it's all kosher, but I want my label to display "Minutes : seconds" instead of just seconds. -(void)countDown{ time -= 1; theTimer.text = [NSString stringWithFormat:@"%i", time]; if(time == 0) { [countDownTimer invalidate]; } } I've already set "time" to 600, or 10 minutes. However, I want the display to show 10:59, 10:58, etc. until it reaches zero. How do I do this? Thanks!

    Read the article

  • WinForm-style Invoke() in unmanaged C++

    - by Matt Green
    I've been playing with a DataBus-type design for a hobby project, and I ran into an issue. Back-end components need to notify the UI that something has happened. My implementation of the bus delivers the messages synchronously with respect to the sender. In other words, when you call Send(), the method blocks until all the handlers have called. (This allows callers to use stack memory management for event objects.) However, consider the case where an event handler updates the GUI in response to an event. If the handler is called, and the message sender lives on another thread, then the handler cannot update the GUI due to Win32's GUI elements having thread affinity. More dynamic platforms such as .NET allow you to handle this by calling a special Invoke() method to move the method call (and the arguments) to the UI thread. I'm guessing they use the .NET parking window or the like for these sorts of things. A morbid curiosity was born: can we do this in C++, even if we limit the scope of the problem? Can we make it nicer than existing solutions? I know Qt does something similar with the moveToThread() function. By nicer, I'll mention that I'm specifically trying to avoid code of the following form: if(! this->IsUIThread()) { Invoke(MainWindowPresenter::OnTracksAdded, e); return; } being at the top of every UI method. This dance was common in WinForms when dealing with this issue. I think this sort of concern should be isolated from the domain-specific code and a wrapper object made to deal with it. My implementation consists of: DeferredFunction - functor that stores the target method in a FastDelegate, and deep copies the single event argument. This is the object that is sent across thread boundaries. UIEventHandler - responsible for dispatching a single event from the bus. When the Execute() method is called, it checks the thread ID. If it does not match the UI thread ID (set at construction time), a DeferredFunction is allocated on the heap with the instance, method, and event argument. A pointer to it is sent to the UI thread via PostThreadMessage(). Finally, a hook function for the thread's message pump is used to call the DeferredFunction and de-allocate it. Alternatively, I can use a message loop filter, since my UI framework (WTL) supports them. Ultimately, is this a good idea? The whole message hooking thing makes me leery. The intent is certainly noble, but are there are any pitfalls I should know about? Or is there an easier way to do this?

    Read the article

  • Free mp3 merge for Mac OSX

    - by Lilly
    Hi, I need to merge several mp3 tracks into one, I use MAC OS X 10.5. I want to convert all my Harry Potter CDs to my iPod, but not every minute a new track (as it is on the CDs) but chapterwise. Where can I get a free software? Help, please! (I've already tried: Jfuse, but after I had merged a few chapters it said I had to buy it; emicsoft VOB Converter for MAC; File Stitcher; but since they all were shareware, for free they would only let me merge 2 files at once (that would take me days) or half of each file which is useless of course; iTunes advanced settings ("join CD tracks") when importing the CDs, but it would let me only join the complete CD, not chapters...) (Sorry for my English, hope you could understand what I wanted to say)

    Read the article

  • Logging in with webrat, celerity doesn't recognize that.

    - by Matthew Willhite
    I'm using cucumber with webrat, and I am just starting to integrate culerity/celerity. My webrat login steps have been working great, and I have them as a Background for many of my scenarios. The problem is that although I can log in successfully via webrat, my celerity specific step definitions don't seem to recognize that. I can check the session from the step def and it confirms that I have a valid user that is logged in. Any advice would be greatly appreciated! Thanks

    Read the article

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