Search Results

Search found 8247 results on 330 pages for 'smart phone'.

Page 211/330 | < Previous Page | 207 208 209 210 211 212 213 214 215 216 217 218  | Next Page >

  • Checking lazy loaded properties have been instantiated

    - by PaulG
    In a class which has a lazy loaded property, such as: private Collection<int> someInts; public Collection<int> SomeInts { get { if (this.someInts == null) this.someInts = new Collection<int>(); return this.someInts; } } Is it worth also having a property such as: public bool SomeIntsExist { get { return (this.someInts != null && this.someInts.Count > 0); } } And then using that property.. eg: if (thatClass.SomeIntsExist) { // do something with thatClass.SomeInts collection } or is this premature optimisation. Its certainly easier to roll with something like below, but it will instantiate the collection needlessly: if (thatClass.SomeInts.Count > 0) { // do something with thatClass.SomeInts collection } Is the compiler smart enough to figure things like this out? Is there a better way?

    Read the article

  • Best way to insert items from a Derived class's constructor into a Base class's private std::vector?

    - by Will
    I have these classes: class Base { ... private: std::vector<X> v; }; class Derived { Derived(X*, int n); } where the constructor of Derived is passed an array of item Xs, which I need to insert into my vector v in the Base class. (X is a smart pointer) Currently I see two ways to do this: 1) Create a function in Base: InsertItem(X*) that will insert an item into the vector. 2) Create a vector in Derived that contains the full list, then get it into Base by moving the entire vector. I dont see any advantages to #2, but was wondering if #1 was a good solution, or if there are better ways to do this. Thanks!

    Read the article

  • Are raw C++ pointers first class objects?

    - by Shailesh Kumar
    According to Wikipedia: An object is first-class when it: can be stored in variables and data structures can be passed as a parameter to a subroutine can be returned as the result of a subroutine can be constructed at runtime has intrinsic identity (independent of any given name) Somebody had once told me that raw pointers are not first class objects while smart pointers like std::auto_ptr are. But to me, a raw pointer (to an object or to a function) in C++ does seem to me to satisfy the conditions stated above to qualify as a first class object. Am I missing something?

    Read the article

  • Create a new output file in ant replace task

    - by Sathish
    Ant replace task does a in-place replacement without creating a new file. The below snippet replaces tokens in any of the *.xml files with the corresponding values from my.properties file. <replace dir="${projects.prj.dir}/config" replacefilterfile="${projects.prj.dir}/my.properties" includes="*.xml" summary="true"/'> I want those *.xml files that had their tokens replaced be created as *.xml.filtered (for e.g.) and still have the original *.xml. Is this possible in Ant with some smart combination of tasks and concepts ?

    Read the article

  • web service for business logic or data access layer

    - by luiscarlosch
    This post http://www.theserverside.net/tt/articles/showarticle.tss?id=Top5WSMistakes encourages me to create the web service for business logic layer but many people use it in the data access layer. I want to create a project where i want to access the same data repository from a desktop application, website and a cell phone. What would you recommend me? Is there any case it may be a good idea implement web services to both layers? thanks.

    Read the article

  • axWindowsMediaPlayer/window media player has stoped working?

    - by Madhup
    Hi, I am using axWnidowsMediaPlayer in my windows mobile application with compact framework 3.5 . It was working beautifully few days ago but now whenever i try to play a song from url it shows the message "Can not play the file.The file is either corrupted or the player does not support the format you are playing" The same url is not played by the phone's wmplayer also but when I try to play it with the systems wmplayer it plays the same url successfully.

    Read the article

  • Accelerometer data analysis

    - by jrrt
    Hello, I would like to know if there are some libraries/algorithms/techniques (python, if at all possible) that help to extract features from accelerometer data (extracted from and android phone, btw), like periodicity of movements, energy of acceleration and the like. Has anyone done this kind of task before? Thank you very much in advance :)

    Read the article

  • Can't find my installed application

    - by steve
    Greets, Made some app on android. I for the life of me can't get it to install on the phone as a stand alone application. It runs fine when I deploy from eclipse but never remains on the device. any idea whats happening? I put the apk file on a web server, went to the address downloaded and installed but still it wasn't to be found. I'm lost!

    Read the article

  • how to parse self closing tag in xml file

    - by ajay-sharma2
    Hi, I am working on an iphone application in which I am consuming a webservice. So i am parsing the XML file data. any idea about how to parse self closing tag like: State/ and how to read data of self tag like: Contact Email="[email protected]" Name="PhD" Phone="123-521-3388" Source="location"/ I am parsing xml file using NSXMLPARSER class methods and library Thanks,

    Read the article

  • Using windows CopyFile function to copy all files with certain name format

    - by Ben313
    Hello! I am updating some C code that copys files with a certain name. basically, I have a directory with a bunch of files named like so: AAAAA.1.XYZ AAAAA.2.ZYX AAAAA.3.YZX BBBBB.1.XYZ BBBBB.2.ZYX Now, In the old code, they just used a call to ShellExecute and used xcopy.exe. to get all the files starting with AAAAA, they just gave xcopy the name of the file as AAAAA.* and it knew to copy all of the files starting with AAAAA. now, im trying to get it to copy with out having to use the command line, and I am running into trouble. I was hoping CopyFile would be smart enough to handle AAAAA.* as the file to be copied, but it doesnt at all do what xcopy did. So, any Ideas on how to do this without the external call to xcopy.exe?

    Read the article

  • Question about OOP and objects.

    - by loddn
    I have a school assignment, a Dog Show. My assignment is to create a website where vistors can display results and Judges and Secretary can admin, crud. I have a small problem one part of the assignment. The result should be based on two protokols from different judges and after that checked by the secretary before the result is displayed for the user. I have to say i'm fairly new to programming and so i need some smart suggestions on how to design and implement this. The assignment should cover both a db and c# (.net mvc). Q1: How do i create a object (result)that depends on two other objects(protocol)? Is that even needed? Q2: How to solve this in a relational db?

    Read the article

  • Tool to automate converting inline css to external css?

    - by Tony_Henrich
    I am working on a site which is full of inline css. Is there a tool to automatically refactor the pages so that inline css is moved to an external css file? Preferably doing this in a smart way where it doesn't create duplicate css declarations so if I have two inline css like style="left-padding; 12px", it creates one css class instead of two? Adobe Dreamweaver can do this manually one inline css at a time. I prefer a tool to do all the work in one shot.

    Read the article

  • Renaming files: Visual Studio vs Version control

    - by Benjol
    The problem with renaming files is that if you want to take advantage of Visual Studio refactoring, you really need to do it from inside Visual Studio. But most (not all*) version control system also want to be the ones doing the renaming. One solution is to use integrated source control, but this is not always available, and in some cases is pretty clunky. I'd personally be more comfortable using source control separately, outside of Visual Studio, but I'm not sure how to manage this question of file renames. So, for those of you that use Visual Studio, which source control do you use? Do you use a VS integration (which one?) and otherwise, how do you resolve this renaming problem? (* git is smart enough to work it out for itself)

    Read the article

  • Python: find <title>

    - by Peter
    I have this: response = urllib2.urlopen(url) html = response.read() begin = html.find('<title>') end = html.find('</title>',begin) title = html[begin+len('<title>'):end].strip() if the url = http://www.google.com then the title have no problem as "Google", but if the url = "http://www.britishcouncil.org/learning-english-gateway" then the title become "<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <base href="http://www.britishcouncil.org/" /> <META http-equiv="Content-Type" Content="text/html;charset=utf-8"> <meta name="WT.sp" content="Learning;Home Page Smart View" /> <meta name="WT.cg_n" content="Learn English Gateway" /> <META NAME="DCS.dcsuri" CONTENT="/learning-english-gateway.htm">..." What is actually happening, why I couldn't return the "title"?

    Read the article

  • Qt: Dragging a widget to scroll the widget's parent QScrollArea?

    - by samsonite
    I've got a long horizontal QLabel displaying a png (the image shows a signal/time graph). Under that, I've got a QTableWidget. Both of these are in a QScrollArea because I want them to stay vertically aligned (the cells in the table correspond with the signal seen directly above them). I'm trying to add a handler to the QLabel such that the user can use the picture itself to scroll the scrollarea, rather than having to use the scrollbar. Is there a tried-and-tested way to do this? Directly setting the scrollarea's sliderPosition inside the QLabel's dragMoveEvent doesn't seem smart, because when the scrollarea scrolls it also leads to another dragMoveEvent on the (moving) QLabel.

    Read the article

  • Missing DLL Problem

    - by Liran
    Hi everyone. I have a C++ native application that was built under VS2005 (sp1),On machine A. (Debug Mode) Now,I need to run this application on a "clean" computer, Clean means it has no VS installed on. When i copy the runtime folder from machine A to the "clean" machine and try to activate the application it demands to reinstall the application. obviously missing DLLs are causing this problem cause on machine A the app works just fine, Is there any "clean" solution for this kind of problem besides gessing which DLLs are missing ? maybe a smart tool or installer that indicates which DLLs are missing at the runtime ? Thanks, Liran

    Read the article

  • Where is a good place/way to store Windows config files for Python scripts?

    - by thornomad
    I have a script/program I am working on that requires a configuration file (I am using ConfigParser). On linux, I will default to store these variables in ~/.myscript using the os.getenv('HOME') function. With Windows, I know I can use os.getenv('USERPROFILE') to find the User's "home" directory, however, is it a good idea to save a hidden file that way (ie, with the name .myscript)? I don't use Windows, obviously, but wanted to be smart about it for those who do. Is there a standard place/way to store these config variables on Windows?

    Read the article

< Previous Page | 207 208 209 210 211 212 213 214 215 216 217 218  | Next Page >