Search Results

Search found 27607 results on 1105 pages for 'hello world'.

Page 70/1105 | < Previous Page | 66 67 68 69 70 71 72 73 74 75 76 77  | Next Page >

  • Why doesn't my text be bold when displaying on device screen

    - by john123
    My string.xml: <!--I try to bold my argument %s, like below:--> <string name="hello">Hello to: <b>%s</b> !</string> My layout main.xml: <LinearLayout ...> <TextView android:id="@+id/hello_txt" ... .../> </LinearLayout> My Fragment class: public class MyFragment extends Fragment{ TextView helloTxt; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { super.onCreateView(inflater, container, savedInstanceState); helloTxt = (TextView) findViewById(R.id.hello_txt); } @Override public void onStart() { super.onStart(); //pass "Monday" as the argument to my string helloTxt.setText(String.format(getString(R.string.hello), "Monday")); } } When I run my app on my device, I got "Hello to: Monday !" displaying on screen, but the "Monday" is not bold, but I used <b> in my string.xml. Why it is not bold??

    Read the article

  • RESTfully request sub-parts of a representation be of a certain content-type

    - by Grayside
    I am requesting (via Accept: application/json) that an API I'm designing respond as JSON. However, I want the values within that JSON to be specified to conform to text/plain or text/html depending on the capabilities of the client. What is the RESTful best practice for a "sub-type"? How would this work if I formally switched to HAL as the top-level container? Accept: application/json+text/plain { "value": "Hello World" } Accept: application/json+text/html { "value": "<h2>Hello World</h2>" }

    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

  • Regex in JavaScript

    - by dfjhdfjhdf
    Suppose we don't know how many slashes we could get in a string but we do not want any extra slashes. So if we get this string '/hello/world///////how/are/you//////////////' we should transform it to the form of '/hello/world/how/are/you/'. How to do it with the help of regular expressions in JavaScript?

    Read the article

  • BASIC Menu-driven program repeates twice after successful completion of first task.

    - by Zazu
    Hello, Im using Plato3 to write C programs. Im creating a menu-driven program but want to test out the basic concept of getting it to work #include<stdio.h> #include<ctype.h> int function1(); main(){ char s; do{ puts("\n choose the following"); puts("(P)rint\n"); puts("(Q)uit\n"); scanf("%c",&s); s=toupper(s); switch (s){ case 'P' : function1(); break; case 'Q' : return -1; break; } }while (function1()==0); } int function1(){ printf("Hello World"); return 0; } The problem is that once function1() returns the value 0, the whole program is echoed ... why ? Example : Running the program gives this : Hello WorldHellow World choose the following (P)rint (Q)uit Hello World choose the following (P)rint (Q)uit -- Any idea why ? Please help, thanks !!!!

    Read the article

  • How do I capture keystrokes on the web?

    - by Sean
    Using PHP, JS, or HTML (or something similar) how would I capture keystokes? Such as if the user presses ctrl+f or maybe even just f, a certain function will happen. ++++++++++++++++++++++++EDIT+++++++++++++++++++ Ok, so is this correct, because I can't get it to work. And I apologize for my n00bness is this is an easy question, new to jQuery and still learning more and more about JS. <script> var element = document.getElementById('capture'); element.onkeypress = function(e) { var ev = e || event; if(ev.keyCode == 70) { alert("hello"); } } </script> <div id="capture"> Hello, Testing 123 </div> ++++++++++++++++EDIT++++++++++++++++++ Here is everything, but I can't get it to work: <link rel="icon" href="favicon.ico" type="image/x-icon"> <style> * { margin: 0px } div { height: 250px; width: 630px; overflow: hidden; vertical-align: top; position: relative; background-color: #999; } iframe { position: absolute; left: -50px; top: -130px; } </style> <script> document.getElementsByTagName('body')[0].onkeyup = function(e) { var ev = e || event; if(ev.keyCode == 70 && ev.ctrlKey) { //control+f alert("hello"); } } </script> <div id="capture"> Hello, Testing 123<!--<iframe src="http://www.pandora.com/" scrolling="no" width="1000" height="515"frameborder="0"></iframe>--> </div>

    Read the article

  • ASP.NET: I'm getting strange output when styling a Label control...

    - by pkiyan
    .labelOne { border-width:thin; border-style:solid; border-color:Red; background-color:Silver; } <asp:Label ID="Label1" runat="server" CssClass="labelOne"> <h1>Hello world</h1> </asp:Label> <br /><br /> <asp:Label ID="Label2" runat="server" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" BackColor="Silver"> <h1>Hello world</h1> </asp:Label> Hello. In the code sample above I have 2 Label controls with their contents set to an h1 header tag. The first Label is styled using css, and the second with the Label's inline properties (both Labels have identical styling). But the first Label doesn't output properly, it's border is broken. If I replace the first Label's markup with plain "Hello world" text it renders properly, but it breaks again when I use markup. Can someone explain why this is happening?

    Read the article

  • Read/Write versus Create/Read/Update/Delete permissions difference

    - by archmeta
    From a practical standpoint, is there any real-world difference between Read/Write permissions and Create/Read/Update/Delete permissions? It would seem that if a user had the ability to 'create', he should always have the ability to 'update' or 'delete'? If this is correct, then read/write should always be sufficient, and there is no need to store separate Create/Read/Update/Delete permissions? Are there any real-world use cases in which a user should be given permissions to create but not update, or update but not delete, etc...?

    Read the article

  • Simple to program yet computationally difficult functions

    - by ViralShah
    I need an example of a slow Excel sheet that could exist in the real world. Problem is I'm not sure what sort of functions are computationally difficult. Are there any sort of (maths?) functions that are easy enough to program that they can be used in Excel, yet computationally expensive? Something which has a real world application is a bonus.

    Read the article

  • Get values between DIV tags?

    - by Khou
    How do I get the values in between a DIV tag? Example <div id="myOutput" class="wmd-output"> <pre><code><p>hello world!</p></code></pre> </div> my output values I should get is <pre><code><p>hello world!</p></pre>

    Read the article

  • Debugger console is not opening

    - by coure06
    I have created a simple hello world application in xcode using the command line utility. When i click on Build and Run. program successfully builds. I can see a message at status bar "Debugging of HelloMac ended normally" But debugger console on which Hello World message should appear is not opening.

    Read the article

  • About calling an subclass' overriding method when casted to its superclass

    - by Omega
    #include <iostream> class Vehicle { public: void greet() { std::cout << "Hello, I'm a vehicle"; } }; class Car : public Vehicle { public: void greet() { std::cout << "Hello, I'm a car"; } }; class Bike : public Vehicle { public: void greet() { std::cout << "Hello, I'm a bike"; } }; void receiveVehicle(Vehicle vehicle) { vehicle.greet(); } int main() { receiveVehicle(Car()); return 0; } As you can see, I'm trying to send a parameter of type Vehicle to a function, which calls greet(). Car and Bike are subclasses of Vehicle. They overwrite greet(). However, I'm getting "Hello, I'm a vehicle". I suppose that this is because receiveVehicle receives a parameter of type Vehicle instead of a specific subclass like Car or Bike. But that's what I want: I want this function to work with any subclass of Vehicle. Why am I not getting the expected output?

    Read the article

  • What is the 'accumulator in HQ9+?

    - by Koning Baard XIV
    I was just reading a bit about the HQ9+ programming language ( http://esolangs.org/wiki/HQ9 , http://en.wikipedia.org/wiki/HQ9%2B and http://www.cliff.biffle.org/esoterica/hq9plus.html ), and it tells me something about a so called 'accumulator' which can be incremented, but not be accessed. Also, using the + doesn't manipulate the result: code H+H result Hello World Hello World Can anyone explain me how this works, what this does and if it even makes any sense? Thanks

    Read the article

  • From iPhone to Android Question

    - by BahaiResearch.com
    (I'm coming from an iPhone dev world. ) In Android do we need to worry what OS version we compile against? In the iPhone world I would usually target a release that's at least 6 months old to limit the number of issues with installing on iPhones with old OSs. What strategy should I use when choosing what to compile against on the Android?

    Read the article

  • Perl, "closure" using Hash

    - by Mike
    I would like to have a subroutine as a member of a hash which is able to have access to other hash members. For example sub setup { %a = ( txt => "hello world", print_hello => sub { print ${txt}; }) return %a } my %obj = setup(); $obj{print_hello}; Ideally this would output "hello world"

    Read the article

< Previous Page | 66 67 68 69 70 71 72 73 74 75 76 77  | Next Page >