Search Results

Search found 3407 results on 137 pages for 'happy'.

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

  • initialization of objects in c++

    - by Happy Mittal
    I want to know, in c++, when does the initialization of objects take place? Is it at the compile time or link time? For ex: //file1.cpp extern int i; int j=5; //file2.cpp ( link with file1.cpp) extern j; int i=10; Now, what does compiler do : according to me, it allocates storage for variables. Now I want to know : does it also put initialization value in that storage or is it done at link time?

    Read the article

  • jQuery table rebuild

    - by Happy
    We have a table: <table> <tr> <td>1</td> <td>2</td> <td>3</td> <td>4</td> <td>5</td> <td>6</td> <td>7</td> <td>8</td> <td>9</td> <td>10</td> </tr> </table> We update this table by throwing into each <tr> only 3 <td>. It must look like: <table> <tr> <td>1</td> <td>2</td> <td>3</td> </tr> <tr> <td>4</td> <td>5</td> <td>6</td> </tr> <tr> <td>7</td> <td>8</td> <td>9</td> </tr> <tr> <td>10</td> </tr> </table> How can we do this? Thanks.

    Read the article

  • static initialization confusion

    - by Happy Mittal
    I am getting very confused in some concepts in c++. For ex: I have following two files //file1.cpp class test { static int s; public: test(){s++;} }; static test t; int test::s=5; //file2.cpp #include<iostream> using namespace std; class test { static int s; public: test(){s++;} static int get() { return s; } }; static test t; int main() { cout<<test::get()<<endl; } Now My question is : 1. How two files link successfully even if they have different class definitions? 2. Are the static member s of two classes related because I get output as 7. Please explain this concept of statics.

    Read the article

  • jQuery parent()

    - by Happy
    jQuery snippet: $(".sliders dt a").click(function(){ $(this).parent().parent().parent().find(".triggers a").removeClass("active"); return false }); HTML: <div class="triggers"><a href="#" class="active">Hide all</a></div> <dl class="sliders"> <dt><a href="#">text</a></dt> <dd>text</dd> </dl> Three .parent() is used, to catch .triggers block. Is there any way to merge them?

    Read the article

  • jQuery table replace

    - by Happy
    We have a table: <table> <tr> <td width="10">1</td> <td>text 1</td> </tr> <tr> <td width="10">2</td> <td>text 2</td> </tr> <tr> <td width="10">3</td> <td>text 3</td> </tr> <tr> <td width="10">4</td> <td>text 4</td> </tr> <tr> <td width="10">5</td> <td>text 5</td> </tr> <tr> <td width="10">6</td> <td>text 6</td> </tr> <tr> <td width="10">7</td> <td>text 7</td> </tr> <tr> <td width="10">8</td> <td>text 8</td> </tr> <tr> <td width="10">9</td> <td>text 9</td> </tr> <tr> <td width="10">10</td> <td>text 10</td> </tr> </table> We update this table by throwing into each <tr> 3 <td>, each <td> with width="10" attribute must be deleted. It must look like: <table> <tr> <td>text 1</td> <td>text 2</td> <td>text 3</td> </tr> <tr> <td>text 4</td> <td>text 5</td> <td>text 6</td> </tr> <tr> <td>text 7</td> <td>text 8</td> <td>text 9</td> </tr> <tr> <td>text 10</td> </tr> </table> How can we do this? Thanks.

    Read the article

  • jQuery && Google Chrome

    - by Happy
    This script works perfectly in all the browsers, except Google Chrome. $(document).ready(function(){ $(".banners-anim img").each(function(){ var hover_width = $(this).width(); var hover_height = $(this).height(); var unhover_width = (hover_width - 30); $(this).width(unhover_width); var unhover_height = $(this).height(); $(this).closest("li").height(unhover_height); var offset = "-" + ((hover_height - unhover_height)/2) + "px"; $(this).closest("span").css({'position':'absolute', 'left':'0', 'top':'25px', 'width':'100%'}); $(this).hover(function(){ $(this).animate({width: hover_width, marginTop: offset}, "fast") },function(){ $(this).animate({width: unhover_width, marginTop: 0}, "fast") }); }); }); Chrome doesn't recognize changed image attributes. When width of the img changes, height also changes. Even not in Chrome.. $(this).width(unhover_width); var unhover_height = $(this).height(); unhover_height gives 0. Full code of this script (html included) - unhover_height Please help to fix this. Thanks.

    Read the article

  • jQuery include css

    - by Happy
    How to add css to <body>, written in javascript file like this: <style type="text/css"> .popup-bg { position: fixed; left: 0; top: 0; width: 100%; height: 100%; background: #eee; } </style> Thanks.

    Read the article

  • static initialization order fiasco

    - by Happy Mittal
    I was reading about SIOF from a book and it gave an example : //file1.cpp extern int y; int x=y+1; //file2.cpp extern int x; y=x+1; Now My question is : In above code..will following things happen ? 1. while compiling file1.cpp, compiler leaves y as it is i.e doesn't allocate storage for it. 2. compiler allocates storage for x, but doesn't initialize it. 3. While compiling file2.cpp, compiler leaves x as it is i.e doesn't allocate storage for it. 4. compiler allocates storage for y, but doesn't initialize it. 5. While linking file1.o and file2.o, now let file2.o is initialized first, so now: Does x gets initial value of 0? or doesn't get initialized?

    Read the article

  • output redirection in UNIX

    - by Happy Mittal
    I am a beginner in UNIX. I am finding some difficulty in input/output redirection. ls -l temp cat temp Here why temp file is shown in the list and moreover, it is showing 0 characters. wc temp temp cat temp here output is 0 0 0 temp. Why lines, words, characters are 0. Please help me to undestand this concept.

    Read the article

  • CodeMirror 2 - (readonly and editable code)

    - by Happy Hacking
    Can CodeMirror 2 be used to set part of the code to be uneditable? I do not wish to do it like fully editable code. Example: Code inline: example public static void main(String args[]){ //content } I hope to be able to make Line 1 and 3 uneditable BUT able to edit lines in between them adding characters/spaces increasing the number of lines inside the method as we speak AND still unable to edit the starting and closing bracket lines.

    Read the article

  • jQuery catch img

    - by Happy
    We have a script used for each .item: $(".item").each(function(){ item_link = "http://..."; block = $('.block', this); $.get(item_link, function(data) { var src = $('img.slide', data).attr('src'); block.html(src); }); }); item_link variable is uniquie for each query. There can be 100 .item or more. The problem is - server has limit on connections at the same time, that why some .item get var src, some not. The best solution is to use just one .get at the same time. I think there should be some counter, if .get is finished - it gives message "I'm finished, you can start" to the next .get and so on. How to do that? Thanks.

    Read the article

  • jQuery catch td

    - by Happy
    Trying to catch td with style: <td style="color: #333;"> Hope this should work, but it doesn't: td:[style='color: #333;'] Any idea? Thanks.

    Read the article

  • How to access object from array in if condition

    - by Happy
    Accesing array objects in javascript OBJ_ARRAY[j][i] = { "x1": w * i, "y1": h * j, "x2": w * (i + 1), "cell_color": "blue", "y2": h * (j + 1), "name": (i + 1 * (j * 10)) + 1, "z-index": 10, "status":isnotactive } I have this cell array and all its x1,y1 x2,y2 are generated dynamically. for eg. if want to compare OBJ_ARRAY[5][5].x110 then alert if(( OBJ_ARRAY[5][5].x1) > 10)) ; { alert("Done"); } It does not work any idea how it can be fixed?

    Read the article

  • jQuery cycle query

    - by Happy
    We have a script used for each .item: $(".item").each(function(){ item_link = "http://..."; block = $('.block', this); $.get(item_link, function(data) { var src = $('img.slide', data).attr('src'); block.html(src); }); }); item_link variable is uniquie for each query. There can be 100 .item or more. The problem is - server has limit on connections at the same time, that why some .item get var src, some not. The best solution is to use just one .get at the same time. I think there should be some counter, if .get is finished - it gives message "I'm finished, you can start" to the next .get and so on. How to do that? Thanks.

    Read the article

  • jQuery ajax get

    - by Happy
    There are many class="item" blocks on the page. For each one there is different var item_link and ajax request. Ajax searches for src attribute of .message img and throws it to var src. $(".item").each(function(){ var item_link = "http://..."; $(this).prepend('<div class="src"></div>'); $.get(item_link, function(data) { var src = $('.message img', data).attr('src'); }); }); How to print var src to <div class="src"></div>? Thanks.

    Read the article

  • jQuery update link

    - by Happy
    Here is html: <a href="http://site.com/any/different/folders/picture_name.jpg">Go and win</a> <a href="http://site.com/not/similar/links/some_other_name.png">Go and win</a> How to add some text after last "/" in href attribute (before picture_name.jpg) of each link? The script should give something like: <a href="http://site.com/any/different/folders/user_picture_name.jpg">Go and win</a> <a href="http://site.com/not/similar/links/user_some_other_name.png">Go and win</a> Here user_ is added. There can be any length of the link.

    Read the article

  • Online image resizer

    - by Happy
    Searching for some script or service for online image resizing. I should have the ability to throw my imagelink, like http://site.com/bigimage.jpg, and it must give me this image after resizing like http://site-were-image-resized.com/sdf4234f21f.png. It would be amazing, if I can give some values, like height and width. If I upload script on my own site, it should have the ability to resize external images from some domains. Tryed to use http://www.darrenhoyt.com/demo/timthumb/, but it doesn't work with external images.

    Read the article

  • How to Read a specific element value from XElement in LINQ to XML

    - by Happy
    I have an XElement which has content like this. <Response xmlns="someurl" xmlnsLi="thew3url"> <ErrorCode></ErrorCode> <Status>Success</Status> <Result> <Manufacturer> <ManufacturerID>46</ManufacturerID> <ManufacturerName>APPLE</ManufacturerName> </Manufacturer> //More Manufacturer Elements like above here </Result> </Response> How will i read the Value inside Status element ? I tried XElement stats = myXel.Descendants("Status").SingleOrDefault(); But that is returning null.

    Read the article

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