Search Results

Search found 9082 results on 364 pages for 'c functions'.

Page 157/364 | < Previous Page | 153 154 155 156 157 158 159 160 161 162 163 164  | Next Page >

  • Disable animations when ending search in iPhone

    - by camilo
    Hi. A quicky: is there a way to dismiss the keyboard and the searchDisplayController without animation? I was able to do it when the user presses "Cancel", but when the user presses the black "window thingy" above search field (only visible while the user hasn't inserted any text), the animation always occurs, even when I change the delegate functions. Is there a way to control this, or as an alternative, to disable the user to end searching by pressing the black window? Thanks in advance.

    Read the article

  • How do you return a pointer to a base class with a virtual function?

    - by Nick Sweet
    I have a base class called Element, a derived class called Vector, and I'm trying to redefine two virtual functions from Element in Vector. //element.h template <class T> class Element { public: Element(); virtual Element& plus(const Element&); virtual Element& minus(const Element&); }; and in another file //Vector.h #include "Element.h" template <class T> class Vector: public Element<T> { T x, y, z; public: //constructors Vector(); Vector(const T& x, const T& y = 0, const T& z =0); Vector(const Vector& u); ... //operations Element<T>& plus(const Element<T>& v) const; Element<T>& minus(const Element<T>& v) const; ... }; //sum template <class T> Element<T>& Vector<T>::plus(const Element<T>& v) const { Element<T>* ret = new Vector((x + v.x), (y + v.y), (z + v.z)); return *ret; } //difference template <class T> Element<T>& Vector<T>::minus(const Element<T>& v) const { Vector<T>* ret = new Vector((x - v.x), (y - v.y), (z - v.z)); return *ret; } but I always get error: 'const class Element' has no member named 'getx' So, can I define my virtual functions to take Vector& as an argument instead, or is there a way for me to access the data members of Vector through a pointer to Element? I'm still fairly new to inheritance polymorphism, fyi.

    Read the article

  • Jump to function declaration in php

    - by aeonsleo
    HI, I have the following ide's for php Dreamweaver php-Eclipse Textpad I wish to jump to a function's definition which is located in another file which is not yet open. How could I do that. I am studying a websites code and have the entire directory struction in my local root folder. I come accross certain functions and I dont know in which file their definition is. Pls suggest something.Thanks

    Read the article

  • mysql_query -- question about results "location"

    - by Andrew Heath
    Forgive me if this is a particularly stupid question! mysql_query($query) returns a boolean, but you can also assign it to a variable $results = mysql_query($query) and then use the other mysql_ functions to extract data. Out of curiosity, how does mysq_query($query) act as both a boolean and a data container at the same time? What's happening "under the hood" during these steps? (yes, I am a n00b..., please be kind!)

    Read the article

  • 'Locale' configuration and its relationship with Windows API

    - by The Kaykay
    Can the locale configuration of a system OR the keyboard type configuration of that system in anyway affect which API is called at the Kernel level? To be specific, if a program is invoking 'CreateFile()' API then the windows API documentation says that the call gets delegated to either CreateFileA or CreateFileW. If that program is being run on a system present in China with a Chinese Keyboard then which of the two functions will be called?

    Read the article

  • Add text to every line in text file using PowerShell

    - by Joshua
    I'd like to add characters to the end of every line of text in a .txt document. #Define Variables $a = c:\foobar.txt $b = get-content $a #Define Functions function append-text { foreach-Object { add "*" } } #Process Code $b | append-text Something like that. Essentially, load a given text file, add a "*" the the end of every single line of text in that text file, save and close.

    Read the article

  • [CakePHP] I am so confused. What should I write in the default.ctp

    - by kwokwai
    Hi all, I am learning cakePHP, everything seems alright except that I am very confused of how to make use of the default.ctp and what should be put inside the Elements folder. Here is the default.ctp file that I have been using since my very first lesson on learning cakePHP: (I copied from this URL http://book.cakephp.org/view/96/Layouts) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title><?php echo $title_for_layout?></title> <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"> <!-- Include external files and scripts here (See HTML helper for more info.) --> <?php echo $scripts_for_layout ?> </head> <body> <!-- If you'd like some sort of menu to show up on all of your views, include it here --> <div id="header"> <div id="menu">...</div> </div> <!-- Here's where I want my views to be displayed --> <?php echo $content_for_layout ?> <!-- Add a footer to each displayed page --> <div id="footer">...</div> </body> </html> But the problem is that the layout will take effect to all web pages that I have created. Let's see the case that I have recently encountered. In one of the .ctp files, I need to use JQuery function and I need to ass some and tags in the .ctp file. Here are the and tags I used: <Script language="javascript"> $(document).ready(function() { // some functions here }); </Script> <style type="text/css"> { #toppage{ width:800px; } But when I followed the default.ctp file, I noticed that these tags (i.e. and ) happened to appear below the tag. As far as I know, the and self-defined Javascript functions should be put inside the tag of the HTML instead. I have considered to add the and in the default.ctp file, but then these codes would appear in every web pages instead of just a particular web page. Please help.

    Read the article

  • Prototype's update not working with IE

    - by xain
    Hi, I'm having problems updating a div's content in IE using .update; I also tried with innerHTML with no success. My script works fine with firefox and chrome, but I need to make it work with IE too (neither 7 nor 8 accept the functions). Any hints ? Thanks in advance.

    Read the article

  • need a project design tool

    - by santosh
    I am looking for simple and easy to use tools through which I can get project's visual picture of folder/file tree stucture , its classes, functions and objects, relations between classes and files.

    Read the article

  • How do I use multiple where clauses in GHCi?

    - by T.R.
    I'm playing around with GHCi for the first time, and I'm having some trouble writing multi-line functions. My code is as follows: Prelude> :{ Prelude| let diffSquares lst = abs $ squareOfSums lst - sumOfSquares lst Prelude| where Prelude| squareOfSums lst = (fst (sumsAndSquares lst))^2 Prelude| sumOfSquares lst = snd (sumsAndSquares lst) Prelude| sumsAndSquares = foldl (\(sms,sqrs) x -> (sms+x,sqrs+x^2)) (0,0) Prelude| :} It gives the following error: <interactive>:1:142: parse error on input `=' Could someone kindly point me in the direction of what I'm missing?

    Read the article

  • jquery and mobile browser compatiblity?

    - by fractalbit
    I want to build a relatively simple version of my site for mobile phones but i will definately need javascript and jquery for many functions. Googling didn't help to find an answer. How is compatibility of jquery with popular browsers in mobile phones? I am talking for smartphones. For example the deafult browsers for these platforms Windows mobile 6+ Android 1.5+ iphone 3g and let's add opera mobile. Has anyone tried it?

    Read the article

  • Share your conky tips / scripts / .conkyrc

    - by Chad Birch
    I've just started tinkering with conky, and I'm hoping the StackOverflow crowd can share some of the cool things they've done with this tool. Scripts and .conkyrc files specifically geared towards developers would be especially good to see. Some good examples of developer-centric functions would be repository-monitors or heck, even something that monitors StackOverflow. Screenshots of what the functionality actually looks like would be appreciated as well.

    Read the article

  • Specializating a template function that takes a universal reference parameter

    - by David Stone
    How do I specialize a template function that takes a universal reference parameter? foo.hpp: template<typename T> void foo(T && t) // universal reference parameter foo.cpp template<> void foo<Class>(Class && class) { // do something complicated } Here, Class is no longer a deduced type and thus is Class exactly; it cannot possibly be Class &, so reference collapsing rules will not help me here. I could perhaps create another specialization that takes a Class & parameter (I'm not sure), but that implies duplicating all of the code contained within foo for every possible combination of rvalue / lvalue references for all parameters, which is what universal references are supposed to avoid. Is there some way to accomplish this? To be more specific about my problem in case there is a better way to solve it: I have a program that can connect to multiple game servers, and each server, for the most part, calls everything by the same name. However, they have slightly different versions for a few things. There are a few different categories that these things can be: a move, an item, etc. I have written a generic sort of "move string to move enum" set of functions for internal code to call, and my server interface code has similar functions. However, some servers have their own internal ID that they communicate with, some use strings, and some use both in different situations. Now what I want to do is make this a little more generic. I want to be able to call something like ServerNamespace::server_cast<Destination>(source). This would allow me to cast from a Move to a std::string or ServerMoveID. Internally, I may need to make a copy (or move from) because some servers require that I keep a history of messages sent. Universal references seem to be the obvious solution to this problem. The header file I'm thinking of right now would expose simply this: namespace ServerNamespace { template<typename Destination, typename Source> Destination server_cast(Source && source); } And the implementation file would define all legal conversions as template specializations.

    Read the article

  • how to access objects in run-time in qtp?

    - by Onnesh
    We have a function which accesses two types of controls like button and list box in standard windows app. The function uses only the control name as arguments, so there is no way qtp could understand what type of control it is. how to resolve this? Write 2 separate functions- 1 for button & another for list box?

    Read the article

  • Where to go from PHP?

    - by dabito
    I'm a seasoned PHP programmer and I really like the way it works and find it very fun to work with (performance could be improved and some functions renamed, but nothing too serious). However, I took a java seminar and now Im very interested in using GWT for upcomming projects, although I think the learning curve can be steep. Should I really go through with this change (PHP JAVA)? Where to begin?

    Read the article

  • Making a Game Without Graphics?

    - by cam
    Is it possible or even constructive to make a game without any graphics (but is intended to become graphical) I'm not good with graphics at all, so I'd like to write the skeleton for the game then have a graphics programmer/artist fill in the rest. I could write up all the major classes, and their interactions, and all the major functions/parts of the game. If so, what should I do to make it easier to integrate graphics into the game later on (every drawn object should have a Draw, Rotate, Collide, etc method) ?

    Read the article

< Previous Page | 153 154 155 156 157 158 159 160 161 162 163 164  | Next Page >