Techbirds | Knowledge Hub | Page 17

In order to make the b2body and attach it to the world,fixtures are added to the b2body(either one fixture or more are attached to a single b2body).For counting the no. of fixtures in a particular defined area,we can use QueryAABB. in .h file,write;

int count=0; //call back function counting num of fixtures bool ReportFixture(b2Fixture* fixture) { foundBodies.push_back( fixture->GetBody() ); return true;//keep going to find all fixtures in the query area }

int count=0;

//call back function counting num of fixtures

bool ReportFixture(b2Fixture* fixture)

{

foundBodies.push_back( fixture->GetBody() );

return true;//keep going to find all fixtures in the query area

}

in .cpp file,write the following code in the function where to

Read More →

451 total views, no views today

How to listen for a Webview starting and finishing loading a URL in Android : public class myWebClient extends WebViewClient { ProgressDialog pd; @Override public void onPageStarted(WebView view, String url, Bitmap favicon) { // TODO Auto-generated method stub pd = ProgressDialog.show(getActivity(), null, “Loading…”); pd.show(); super.onPageStarted(view, url, favicon); } @Override public void onPageFinished(WebView view, String url)

Read More →

465 total views, no views today

As enum is a special kind of class ,we can do more than just list the enumerated constant values.we can add Constructors,instance variables,methods and something really strange Known as Constant specific class body. The simplest way is to treat your enum values as object that can each have their own instance variables. Then we can

Read More →

554 total views, no views today

I was facing problem to align content vertically or horizontally center than I use this code to resolve the issue.

Html 5 .container{ height:500px; width:500px; text-align:center; display:table-cell; vertical-align:middle; background:red; font-size:30px; color:#fff; font-family:verdana; } Centered text in Middle

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

    

        Html 5

        

            .container{

                height:500px;

                width:500px;

                text-align:center;

                display:table-cell;

                vertical-align:middle;

                background:red;

                font-size:30px;

                color:#fff;

                font-family:verdana;

            }

        

    

    

        

            Centered text in Middle

        

    

Thanks 744 total views, no views today

744 total views, no views today

First of all install the black pattern by_fluctuemos-d5mermc.pat. You have to double click the icon. It’s that simple. Step 1 First of all install the .pat file named black_pattern_by_fluctuemos-d5mermc.pat. You have to double click the icon. It’s that simple. Step 2 Create a new document. Set width to 600px and height to 450. Resolution must

Read More →

786 total views, 1 views today