Daily Archives

Articles indexed Tuesday May 18 2010

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

  • Get latitude and longitude using map interface

    - by Dave Jarvis
    Problem Allow website users to enter four latitude and longitude coordinates. Proposed Solution Integrate Google Maps API, and add a click event handler, similar to: http://itouchmap.com/latlong.html http://stackoverflow.com/questions/2770421/how-retrieve-latitude-and-longitude-via-google-maps-api http://marcgrabanski.com/article/jquery-google-maps-tutorial-basics The data would populate into a hidden form field. Questions What other ways (besides <input type='text' ... />) outside of Google's API are available to solve the problem? How would you restrict the number of lat/long points the user can choose? Would using those coordinates violate Google's Terms of Service? Thank you!

    Read the article

  • JMF. Create new custom streamdatasource

    - by Afro Genius
    Hi there. I am looking to create a means of building a DataSource object (and hence a Processor) that gets data from a stream instead of a file, RTP, and so on. I am writing a module for a much larger application that is meant to transparently transcode audio data. Going through the JMF docs only specify how to create a source from file however I need to be able to create a source from a stream within my application. Any idea where I can start looking?

    Read the article

  • Value of text box disapears - binding viewmodel to a tab (content control)

    - by Eli Perpinyal
    Based on the MVVM example by Josh Smith, I have implemented the multi tab option which binds to a different tab to a different view model using a simple datatemplate that binds a viewmodel to a view. <DataTemplate DataType="{x:Type fixtureVM:SearchViewModel}"> <SearchVw:SearchView/> </DataTemplate> The issue that I'm having, is when I switch tabs and then switch back again, the value in the textbox disappears. When I bind the Text in the textbox to a value in the ViewModel it does not disappear. This is fine, and I can overcome this but I am having another issue for example with the position of the scroll bar in a grid disappearing once the tab has lost focus. Why is the value disappearing? I'm assuming it is a WPF sub system task that cleans up resources!? how can I avoid this? I also feel it might be slowing down my app.

    Read the article

  • Monitoring File Changes in C#

    - by Pcstalljr
    Hi there, I'm using C# for a mini project of mine, I am trying to monitor files that are changed, Deleted, And/or created. And export that to a file. But I am not quite sure how to monitor files. Any ideas?

    Read the article

  • Suggestions on implementing an iPad magazine app

    - by alku83
    I've been tasked with creating a magazine style app for iPad. Ideally it would look a little something like the Zinio app: http://www.zinio.com/ipad/ . This app is effectively a shell, allowing you to sample magazines (eg. read the first few pages) and select them for download. The magazines appear to have some sort of overlay, allowing you to interact with some things (eg. tap to watch a video). A few questions that come to mind: How would I go about delivering content to the user? In-app purchases aren't really an option, as some content will need to be delivered for free. Is it possible to download a package and make this available within the application? What format would be suitable for displaying the magazine? Sequential images, PDF, ebook? I'll need to have some form of interactivity. I guess I could have some form of lookup table, which would include information such as if the user taps on this page, within these coordinates, then launch this item. Anyone dealt with any similar issues?

    Read the article

  • PyQt threads and signals - how to properly retrieve values

    - by Cawas
    Using Python 2.5 and PyQt, I couldn't find any question this specific in Python, so sorry if I'm repeating the other Qt referenced questions below, but I couldn't easily understand that C code. I've got two classes, a GUI and a thread, and I'm trying to get return values from the thread. I've used the link in here as base to write my code, which is working just fine. To sum it up and illustrate the question in code here (I don't think this code will run on itself): class MainWindow (QtGui.QWidget): # this is just a reference and not really relevant to the question def __init__ (self, parent = None): QtGui.QWidget.__init__(self, parent) self.thread = Worker() # this does not begin a thread - look at "Worker.run" for mor details self.connect(self.thread, QtCore.SIGNAL('finished()'), self.unfreezeUi) self.connect(self.thread, QtCore.SIGNAL('terminated()'), self.unfreezeUi) self.connect(self.buttonDaemon, QtCore.SIGNAL('clicked()'), self.pressDaemon) # the problem begins below: I'm not using signals, or queue, or whatever, while I believe I should def pressDaemon (self): self.buttonDaemon.setEnabled(False) if self.thread.isDaemonRunning(): self.thread.setDaemonStopSignal(True) self.buttonDaemon.setText('Daemon - converts every %s sec'% args['daemonInterval']) else: self.buttonConvert.setEnabled(False) self.thread.startDaemon() self.buttonDaemon.setText('Stop Daemon') self.buttonDaemon.setEnabled(True) # this whole class is just another reference class Worker (QtCore.QThread): daemonIsRunning = False daemonStopSignal = False daemonCurrentDelay = 0 def isDaemonRunning (self): return self.daemonIsRunning def setDaemonStopSignal (self, bool): self.daemonStopSignal = bool def __init__ (self, parent = None): QtCore.QThread.__init__(self, parent) self.exiting = False self.thread_to_run = None # which def will be running def __del__ (self): self.exiting = True self.thread_to_run = None self.wait() def run (self): if self.thread_to_run != None: self.thread_to_run(mode='continue') def startDaemon (self, mode = 'run'): if mode == 'run': self.thread_to_run = self.startDaemon # I'd love to be able to just pass this as an argument on start() below return self.start() # this will begin the thread # this is where the thread actually begins self.daemonIsRunning = True self.daemonStopSignal = False sleepStep = 0.1 # don't know how to interrupt while sleeping - so the less sleepStep, the faster StopSignal will work # begins the daemon in an "infinite" loop while self.daemonStopSignal == False and not self.exiting: # here, do any kind of daemon service delay = 0 while self.daemonStopSignal == False and not self.exiting and delay < args['daemonInterval']: time.sleep(sleepStep) # delay is actually set by while, but this holds for N second delay += sleepStep # daemon stopped, reseting everything self.daemonIsRunning = False self.emit(QtCore.SIGNAL('terminated')) Tho it's quite big, I hope this is pretty clear. The main point is on def pressDaemon. Specifically all 3 self.thread calls. The last one, self.thread.startDaemon() is just fine, and exactly as the example. I doubt that represents any issue. The problem is being able to set the Daemon Stop Signal and retrieve the value if it's running. I'm not sure that it's possible to set a stop signal on QtCore.QtThread, because I've tried doing the same way and it didn't work. But I'm pretty sure it's not possible to retrieve a return result from the emit. So, there it is. I'm using direct calls to the thread class, and I'm almost positive that's not a good design and will probably fail when running under stress. I read about that queue, but I'm not sure it's the proper solution here, or if I should be using Qt at all, since this is Python. And just maybe there's nothing wrong with the way I'm doing.

    Read the article

  • Cannot pull newly-added top-level directory into sparsely-checked out SVN repository

    - by Tim Keating
    Our SVN repository is quite large, and pulling the whole thing takes some time. When checking out at home, I was pleased to discover the sparse checkout feature; I checked out the whole repository to a depth of 1, then pulled each top-level directory (directly under the trunk) that I needed to a depth of infinity. Until now this has been brilliant. Recently I added a new directory under trunk. When I do a svn up, I get nothing. The TLD I added will not sync. I normally use Tortoise SVN, so I tried doing this from command line. I tried explicitly specifying the name of the directory, adding --depth infinity, adding --force. None of these tricks has worked. What am I missing?

    Read the article

  • An implementation of Sharir's or Aurenhammer's deterministic algorithm for calculating the intersect

    - by RGrey
    The problem of finding the intersection/union of 'N' discs/circles on a flat plane was first proposed by M. I. Shamos in his 1978 thesis: Shamos, M. I. “Computational Geometry” Ph.D. thesis, Yale Univ., New Haven, CT 1978. Since then, in 1985, Micha Sharir presented an O(n log2n) time and O(n) space deterministic algorithm for the disc intersection/union problem (based on modified Voronoi diagrams): Sharir, M. Intersection and closest-pair problems for a set of planar discs. SIAM .J Comput. 14 (1985), pp. 448-468. In 1988, Franz Aurenhammer presented a more efficient O(n log n) time and O(n) space algorithm for circle intersection/union using power diagrams (generalizations of Voronoi diagrams): Aurenhammer, F. Improved algorithms for discs and balls using power diagrams. Journal of Algorithms 9 (1985), pp. 151-161. Earlier in 1983, Paul G. Spirakis also presented an O(n^2) time deterministic algorithm, and an O(n) probabilistic algorithm: Spirakis, P.G. Very Fast Algorithms for the Area of the Union of Many Circles. Rep. 98, Dept. Comput. Sci., Courant Institute, New York University, 1983. I've been searching for any implementations of the algorithms above, focusing on computational geometry packages, and I haven't found anything yet. As neither appear trivial to put into practice, it would be really neat if someone could point me in the right direction!

    Read the article

  • Deferring signal handling in Linux

    - by EpsilonVector
    I'm trying to figure out how to block a signal in Linux kernel 2.4 (user space) from invoking its handler, but keep it available to be handled later, preferably as soon as I re activate the handling of said signal. The function sigprocmask seem to come up in all my search results, but I can't find a good, clear description that explains whether the blocked signal gets "saved" to be handled later, and if so where and how do I handle it when I'm ready for it. Can someone please clarify what's going on, preferably with a code example? Thanks in advance.

    Read the article

  • How to create Web services and link it to Smart device Application?

    - by Crimsonland
    I am a fresh graduate and hired to develop Smart Device Application.They use Data logic Memoir with windows CE 5.0. Even though i have novice skills in programming in vb.net,I just finish my project and applications for Data logic memoir wherein the data has been save to text file or SQL compact server database in the Handheld Device and use Active Sync Connection to pass Data into H/PC to Desktop P.C and Vice Versa.I just shift now to C#.net and start learning it and i just successfully transpose my Smart Device Project from VB to C#. But now i want to Start Projects linking The device to server using Web services but i don't have any idea how to begin?

    Read the article

  • which touch event to use to slide an image??

    - by hemant
    i am using the following function to move a ball from one location to another wherever user touches the screen..right now i dont have an i-phone to test my application and i am new to i-phone application programming so i wanted to know does this event will also make the ball slide from one point to another wen user maintains the touch?? -(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch=[[event allTouches] anyObject]; CGPoint location=[touch locationInView:touch.view]; fball.center=location; }

    Read the article

  • Suppressing line specific XCode compiler warnings

    - by MrHen
    Similar to Ben Gottlieb's question, I have a handful of deprecated calls that are bugging me. Is there a way to suppress warnings by line? For instance: if([[UIApplication sharedApplication] respondsToSelector:@selector(setStatusBarHidden:withAnimation:)]) { [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide]; } else { [[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO]; //causes deprecation warning } All I care about is that line. I don't want to turn off all deprecation warnings. I would also rather not do something like suppress specific warnings by file. There have been a few other circumstances where I wanted to flag a specific line as okay even though the compiler generates a warning. I essentially want to let my team know that the problem has been handled and stop getting bugged about the same line over and over.

    Read the article

  • SQL Server Express 2008 using (local) in connection string

    - by Jeff
    Is it possible to connect to a SQL Server Express 2008 database in ASP.NET with a server name of (local) like "server=(local);integrated security=SSPI;database=DBNAME"? I'm working with another developer on a project and it's getting annoying having to have 2 different version of web.config because he is using SQL Server 2008 and (local) works, but I can't seem to get it to work with SQL Server 2008 Express locally. The database is located on the same computer as the .NET code in case that matters. Thanks.

    Read the article

  • SEO Can Really Help Your Company

    As the corporate world becomes ever more information hungry, SEO has become an integral part of marketing strategy. Most companies know that having a website is good for business but few understand how to make it work properly for them. Engaging a reputable SEO firm to do the work for them is the best way forward because if you cannot be found when potential customers are looking for you, you will not have an effective presence online.

    Read the article

  • Guide to Building a Website - Top 5 Tips For Keyword Page Optimization

    Keyword page optimization is full of strange technical terms - meta tags, keyword tag, HTML tags, etc. In this guide to building a website we will look closely at how search engines scan your website and the fact that the relevancy is the main factor for Google. You might realize that these buzzwords might not have the same weight as before.

    Read the article

  • Three Things For Good SEO in Article Writing to Earn Money Online

    Article marketing is becoming more popular every day. This is a tactic that is used by a lot of professionals as it can get you a high page rank quicker and much more effectively get high traffic within a short time period. If you are looking to utilize this strategy, you need to understand that it is not only great content that will get you there, but also implementing a great optimizing strategy that will get you higher in searches. These are the steps to move quickly!

    Read the article

  • Did You Know? What PreCon would I take if I were attending TechEd?

    - by Kalen Delaney
    TechEd starts in 3 weeks, and I'm not going to make it this year. I had very much wanted to visit New Orleans post-Katrina and see the recovery for myself. I attended a couple of TechEd's there many years ago, but my primary reason for visiting that fabulous city was because my daughter went to school there. She graduated from Tulane University in 1999, but it just so happened that every time TechEd was there, it was after school was over for the year, so I never got to combine my conference trip...(read more)

    Read the article

  • XSLT string with HTML entities - How can I get it to render as HTML?

    - by Kache4
    I'm completely new to using XSL, so if there's any information that I'm neglecting to include, just let me know. I have a string in my XSLT file that I can display like this: <xsl:value-of select="@Description/> and it shows up, rendered in a browser like: <div>My text has html entities within it</div> <div>This includes quotes, like &quot;Hello World&quot; and sometimes whitespaces.&nbsp;</div> What can I do to get this string rendered as html, so that <div></div> results in newlines, &quot; gives me ", and &nbsp gives me a space? I could elaborate on things I've already tried that haven't worked, but I don't know if that's relevant.

    Read the article

  • InternetReadFile() corrupting downloads in C

    - by Lienau
    I'm able to download text documents (.html, .txt, etc) but I can't download images or exe's. I'm pretty sure that this is because I'm using a char, and those files are binary. I know that in C# I would use a byte. But what data-type would I use in this case? char buffer[1]; DWORD dwRead; FILE * pFile; pFile = fopen(file,"w"); while (InternetReadFile(hRequest, buffer, 1, &dwRead)) { if(dwRead != 1) break; fprintf(pFile,"%s",buffer); } fclose(pFile);

    Read the article

  • PHPUnit Selenium captureScreenshotOnFailure does not work?

    - by user342775
    I am using PHPUnit 3.4.12 to drive my selenium tests. I'd like to be able to get a screenshot taken automatically when a test fails. This should be supported as explained at http://www.phpunit.de/manual/current/en/selenium.html#selenium.seleniumtestcase.examples.WebTest2.php class WebTest { protected $captureScreenshotOnFailure = true; protected $screenshotPath = 'C:\selenium'; protected $screnshotUrl = 'http://localhost/screenshots'; public function testLandingPage($selenium) { $selenium->open("http://www.example.com"); $selenium->fail("fail"); ... } } As you can see, I am making the test to fail and in theory when it does it should take a screenshot and put it in C:\selenium, as I am running the selenium RC server on Windows. However, when I run the test it will just give me the following: [root@testbox selenium]$ sh run PHPUnit 3.4.12 by Sebastian Bergmann. F Time: 8 seconds, Memory: 5.50Mb There was 1 failure: 1) WebTest::testLandingPage fail /home/root/selenium/WebTest.php:32 FAILURES! Tests: 1, Assertions: 0, Failures: 1. I do not see any screenshot in C:\selenium. I can however get a screenshot with $selenium-captureScreenshot("C:/selenium/image.png"); Any ideas or suggestions most welcome. Thanks

    Read the article

  • How to get a reference to a control in the view?

    - by Kevin
    If I have a UIScrollView set up in the view via the Interface Builder, how do I get a reference to it in the ViewController implementation? I want to programmatically add labels to the scroll view. For example, in C# if you have a textbox declared in the UI/form, you can access it by simply using the ID declared for that textbox. It doesn't seem this simple in objective c. Thanks Kevin

    Read the article

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