Search Results

Search found 11734 results on 470 pages for 'refer to itself'.

Page 9/470 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Does the "Supporting Multiple Screens" document contradict itself?

    - by Neil Traft
    In the Supporting Multiple Screens document in the Android Dev Guide, some example screen configurations are given. One of them states that the small-ldpi designation is given to QVGA (240x320) screens with a physical size of 2.6"-3.0". According to this DPI calculator, a 2.8" QVGA display equates to 143 dpi. However, further down the page the document explicitly states that all screens over 140 dpi are considered "medium" density. So which is it, ldpi or mdpi? Is this a mistake? Does anyone know what the HTC Tattoo or similar device actually reports? I don't have access to any devices like this. Also, with the recent publishing of this document, I'm glad to see we finally have an explicit statement of the exact DPI ranges of the three density categories. But why haven't we been given the same for the small, medium, and large screen size categories? I'd like to know the exact ranges for all these. Thanks in advance for your help!

    Read the article

  • jQuery sortable drop within itself.

    - by Janis Peisenieks
    So my question here is: Can I place a sortable element within another sortable element of the same level. Example: <ul class="sortable"> <li class="subsortable">Some text</li> <li class="subsortable">Some text</li> </ul> into: <ul class="sortable"> <li class="subsortable">Some text<li class="subsortable">Some text</li></li> </ul> I've been trying to do this for a day now, and I can't seem to find a way to do this.

    Read the article

  • is PHP itself transforming into a framework?

    - by Elzo Valugi
    At the beginning PHP was a scripting language. But after the introduction and improvement of OOP I see more and more objects added to the core. They started with SPL which grew a lot, now we have DOMDocument family, DateTime family which should be part of PECL, Pear or Zend Framework or implemented by each one of us. Shouldn't be php only for build-in functions and all these objects passed to something else? Example. DateTime class is part of the core and I see it very similar with Zend_Date.

    Read the article

  • Google maps KM bounds box reapplying itself on map zoom

    - by creminsn
    I have a map in which I apply a custom overlay using KMbox overlay to signify where I think the users general point of interest lies. What I want is to display this map to the user and allow them to click on the map to give me an exact location match of their POI. This all works fine except for when the user clicks on the map and changes the zoom of the map. Here's my code to add the marker to the map. function addMarker(location) { if(KmOverlay) { KmOverlay.remove(); } if(last_marker) { last_marker.setMap(null); } marker = new google.maps.Marker({ position: location, map: map }); // Keep track for future unsetting... last_marker = marker; } And to show the map I have this function. function show_map(lt, ln, zoom, controls, marker) { var ltln = new google.maps.LatLng(lt, ln); var vars = { zoom: zoom, center: ltln, mapTypeId: google.maps.MapTypeId.ROADMAP, navigationControl: controls, navigationControlOptions: {style: google.maps.NavigationControlStyle.ZOOM_PAN} , mapTypeControl: false, scaleControl: false, scrollwheel: false }; map = new google.maps.Map(document.getElementById("map_canvas"), vars); KmOverlay = new KmBox(map, new google.maps.LatLng(lat, lon), KmOpts); var totalBounds = new google.maps.LatLngBounds(); totalBounds.union(KmOverlay.getBounds()); google.maps.event.addListener(map, 'click', function(event) { addMarker(event.latLng); }); } I have a working example at the following link here

    Read the article

  • Get the path to Django itself

    - by andybak
    I've got some code that runs on every (nearly) every admin request but doesn't have access to the 'request' object. I need to find the path to Django installation. I could do: import django django_path = django.__file__ but that seems rather wasteful in the middle of a request. Does putting the import at the start of the module waste memory? I'm fairly sure I'm missing an obvious trick here.

    Read the article

  • keyboard in UIWebView shows and then hides itself on input focus

    - by Jake
    I have a page that's loading into a UIWebView (which takes 100% of the screen) on an iPad. When I touch a text field, the page positions the text field to the right place and the keyboard starts to come up, but then it turns around and goes back down and blur is called on the input field. When I try this same page in mobile Safari, the keyboard is able to deploy successfully. I can't figure out what the rules are for the keyboard to show successfully and stay up = and why this is different for uiwebview than safari. All my research on the subject has yielded no answers.

    Read the article

  • Call main() itself in c++?

    - by Mask
    int main() { cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!! system("pause"); return main(); } The above works,but it hardcoded the main(),is there a magic variable to get the current running function?

    Read the article

  • Java converting to Jython-Getting a class object within itself

    - by Bggreen
    I am attempting to convert Java code to Jython and am using the apache Log and LogFactory imports. I am attempting to emulate Foo.class in Jython The chunk of code is as follows: in Java import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; public class MyClass { private static final Log log = LogFactory.getLog(MyClass.class); public MyClass(Document dom) { //code } How can I emulate this same behavior of MyClass.class in Jython/Python?

    Read the article

  • How to join table to itself and select max values in SQL

    - by Jakub Konop
    I have a contracts table: contractId date price partId 1 20120121 10 1 2 20110130 9 1 3 20130101 15 2 4 20110101 20 2 The contract with greatest date being the active contract (don't blame me, I blame infor for creating xpps) I need to create query to see only active contracts (one contract per part, the contract with highest date). So the result of the query should be like this: contractId date price partId 1 20120121 10 1 3 20130101 15 2 I am out of ideas here, I tried self joining the table, I tried aggregation functions, but I can't figure it out. If anyone would have any idea, please share them with me..

    Read the article

  • HTML/JS/CSS issue getting bigger by itself

    - by Azzyh
    Here's the picture to begin with. I have this check box, that when you check, then with jQuery toggle(); it hides that you see in first half of the picture (#writeComment) and shows #SCtryVOTE (what you see in the other half picture, to the right). Now i dont know why but of some reason it expands when its checked, why i dont know, is it because it needs more place than it have or? how do i make this work without having problems when its checked. Here's coding: $('#tryout').click(function () { $('#writeComment').toggle(!$(this).attr('checked')); $('#SCtryVOTE').toggle($(this).attr('checked')); }); the js jquery script part, heres the table and divs HTML part: <input type="checkbox" id="tryout"> <table align="center" width="400" cellpadding="0" cellspacing="1" id="theBoxer"> <tr style="background: #686868;"> <td align="center" valign="top" width="70" height="25" style="border:1px #FFF solid;">Opret</td> <td align="center" valign="top" width="70" height="25" style="border:1px #FFF solid;">Opret</td> </td> </tr> <tr> <td align="left" valign="top" width="70" height="112" style=""> TEST </td> <td align="left" valign="top" width="70" height="112" style=""> <div id="writeComment"> Smid en kommentar:<br> <form action="javascript:DoInsert()" method="post"> <textarea id="kommentar" name="kommentar"></textarea><br /> <input type="hidden" name="fID" id="fID" value="<? echo $_GET["id"]; ?>"> <input type="submit" name="Submit" value="Sæt ind!"> </form> </div> <div id="SCtryVOTE" style="display: none;"> <form onsubmit="if (!this.comment.cleared) clearContents( document.getElementById('comment') ); return true;" action="javascript:DoSCInsert()" method="post"> <textarea onfocus=" javascript:clearContents(this); this.cleared=true;" rows="5" cols="40" id="comment" name="comment" <?php if($vis["username"] == $pusername) { echo "DISABLED"; } ?>>Tryk for at skrive. Skal være detaljeret og grundet.</textarea> <br>Ja: <input type="radio" value="Y" id="SCvoteY" name="vote"></input> Nej: <input type="radio" id="SCvoteN" value="N" name="vote"> </input> <input type="submit" id="SCstem" name="Submit" value="Stem!"> </form> </div> Maybe you need the CSS part too for these two boxes: #writeComment{ position: relative; left: 5px; top: 10px; } #SCtryVOTE{ position: relative; left: 5px; top: 10px; }

    Read the article

  • Is SQLite Manager refreshing itself properly?

    - by ahmet732
    I added new rows to my database through SQLiteManager but I cannot see those values in my tableview. My old values are seen. More interestingly, I deleted my database file but I can see my old values again in my tableview. When I created new database with new name, it sees that. How can I make it perceive new values?

    Read the article

  • Calculating percentiles in Excel with "buckets" data instead of the data list itself

    - by G B
    I have a bunch of data in Excel that I need to get certain percentile information from. The problem is that instead of having the data set made up of each value, I instead have info on the number of or "bucket" data. For example, imagine that my actual data set looks like this: 1,1,2,2,2,2,3,3,4,4,4 The data set that I have is this: Value No. of occurrences 1 2 2 4 3 2 4 3 Is there an easy way for me to calculate percentile information (as well as the median) without having to explode the summary data out to full data set? (Once I did that, I know that I could just use the Percentile(A1:A5, p) function) This is important because my data set is very large. If I exploded the data out, I would have hundreds of thousands of rows and I would have to do it for a couple of hundred data sets. Help!

    Read the article

  • BufferedWriter overwriting itself

    - by Danson
    I want to read in a file and create a duplicate of the file but my code only write the last line in the file. How do I make so that whenever I call write(), it writes to a new line. I want to create a new file for the duplicate so I can't add true to FileWriter constructor. This is my code: //Create file reader BufferedReader iReader = new BufferedReader(new FileReader(args[1])); //Create file writer BufferedWriter oWriter = new BufferedWriter(new FileWriter(args[2], true)); String strLine; //reading file int iterate = 0; while((strLine = iReader.readLine()) != null) { instructions[iterate] = strLine; } //creating duplicate for(int i = 0; i < instructions.length; i++) { if(instructions[i] != null) { oWriter.write(instructions[i]); oWriter.newLine(); } else { break; } } try { iReader.close(); oWriter.close(); } catch (IOException e) { e.printStackTrace(); }

    Read the article

  • PHP unlink OR rewrite own/current file by itself

    - by Email
    Hi Task: Cut or erase a file after first walk-through. i have an install file called "index.php" which creates another php file. <? /* here some code*/ $fh = fopen($myFile, 'w') or die("can't open file"); $stringData = "<?php \n echo 'hallo, *very very long text*'; \n ?>"; fwrite($fh, $stringData); /*herecut"/ /*here some code */ after the creation of the new file this file is called and i intent to erase the filecreation call since it is very long and only needed on first install. i therefor add to the above code echo 'hallo, *very very long text*'; \n ***$new= file_get_contents('index.php'); \n $findme = 'habanot'; $pos = strpos($new, $findme); if ($pos === false) { $marker='herecut';\n $new=strstr($new,$marker);\n $new='<?php \n /*habanot*/\n'.$new;\n $fh = fopen('index.php', 'w') or die 'cant open file'); $stringData = $new; fwrite($fh, $stringData); fclose($fh);*** ?>"; fwrite($fh, $stringData);]} Isnt there an easier way or a function to modify the current file or even "self destroy" a file after first call? Regards

    Read the article

  • Stop native web app from reloading itself upon opening on iOS

    - by cguedel
    I'm trying to build a "native web app" using HTML + JS on iOS. As you may know you can add such an application to the homescreen and it will more or less look just like a normal native app. However if I quit such an app and reopen it again it reloads the whole page again. This also happens when switching to such an application from another over the multitasking bar. Is this expected behaviour or is there a way to stop the device from doing this? As an example you can add the jqTouch-Demos from here to your homescreen and test it: http://jqtouch.com/preview/demos/main/

    Read the article

  • Attribute vector emptying itself

    - by ravloony
    Hello, I have two classes, derived from a common class. The common class has a pure virtual function called execute(), which is implemented in both derived classes. In the inherited class I have an attribute which is a vector. In both execute() methods I overwrite this vector with a result. I access both classes from a vector of pointers to their objects. The problem is when I try to access the result vector form outside the objects. In one case I can get the elements (which are simply pointers), in the other I cannot, the vector is empty. Code: class E; class A{ protected: vector<E*> _result; public: virtual void execute()=0; vector<E*> get_result(); }; vector<E*> A::get_result() { return _result; } class B : public A { public: virtual void execute(); }; B::execute() { //... _result = tempVec; return; } class C : public A { public: virtual void execute(); }; C::execute() { //different stuff to B _result = tempvec; return; } main() { B* b = new B(); C* c = new C(); b->execute(); c->execute(); b->get_result();//returns full vector c->get_result(); //returns empty vector!! } I have no idea what is going on here... I have tried filling _result by hand from a temp vector in the offending class, doing the same with vector::assign(), nothing works. And the other object works perfectly. I must be missing something.... Any help would be greatly appreciated.

    Read the article

  • How to ignore a test within the JUnit test method itself

    - by Benju
    We have a number of integration tests that fail when our staging server goes down for weekly maintenance. When the staging server is down we send a specific response that I could detect in my integration tests. When I get this response instead of failing the tests I'm wondering if it is possible to skip/ignore that test even though it has started running. This would keep our test reports a bit cleaner. Does anybody have suggestions?

    Read the article

  • Force content generated by javascript to reveal itself.

    - by atwellpub
    Hello, I'm generating some content through an API, accessed by javascript, and I cannot grab the source code of what is plainly displayed, post-load, on the browser. I can highlight the text and view the source of selected text (which is a firefox feature), but I will be using CURL to capture the data automatically with php... How can I capture the data? Is there a way to update the source(maybe through a DOM update) so it displays some how? Any help is appreciated.

    Read the article

  • C++ Function Calling Itself

    - by Ben
    Suppose I wish to have a function that fills an array either in pattern x,y,x,y,x,ywhere x and y are variables defined by some algorithm and x,y,z,x,y,z where x, y and z are variables defined by the same algorithm. This should continue for all number of variables. Is this a viable way to implement it. int recurse_n(int n) { while(n > 0) { --n; recurse_n(n); n = 0; // Use algorithm here } }

    Read the article

  • Define a method in base class that returns the name of itself (using reflection) - subclasses inheri

    - by Khnle
    In C#, using reflection, is it possible to define method in the base class that returns its own name (in the form of a string) and have subclasses inherit this behavior in a polymorphic way? For example: public class Base { public string getClassName() { //using reflection, but I don't want to have to type the word "Base" here. //in other words, DO NOT WANT get { return typeof(Base).FullName; } return className; //which is the string "Base" } } public class Subclass : Base { //inherits getClassName(), do not want to override } Subclass subclass = new Subclass(); string className = subclass.getClassName(); //className should be assigned "Subclass"

    Read the article

  • Creating an instance within the Class itself

    - by didxga
    What's going on when the assignment statement executed at Line 4, does compiler ignore the new operator and keep the foo variable being null or something else happen to handle this awkward moment? public class Foo { // creating an instance before its constructor has been invoked, suppose the "initializing" // gets printed in constructor as a result of the next line, of course it will not print it private Foo foo = new Foo();//Line 4 public Foo() { System.out.println("initializing"); } }

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >