Posts
 
Reputation
Joined
Last Seen
Ranked #2K
Strength to Increase Rep
+6
Strength to Decrease Rep
-1
40% Quality Score
Upvotes Received
56
Posts with Upvotes
49
Upvoting Members
34
Downvotes Received
157
Posts with Downvotes
105
Downvoting Members
23
21 Commented Posts
~178.40K People Reached
Interests
want to be better than any one else
PC Specs
windows 7 ultimate, 32-bit OS, 4 GB RAM, 500 GB hard-disk
Favorite Tags

301 Posted Topics

Member Avatar for vegaseat
Member Avatar for deceptikon

how did you come across this thing? Did your code fail because of this ? Or have you read this somewhere ? Secondly please explain this : "The reason for this is that long and int can have the same range. strtol will return LONG_MIN or LONG_MAX if there's an …

Member Avatar for Salem
8
2K
Member Avatar for Duki
Member Avatar for LastMitch

try "heroine" kareena looking damn good and overall movie worthful to be wachted. good work arjum! ;)

Member Avatar for LoanHensley
6
6K
Member Avatar for ss125

@ss125, same here. I am also completing my graduation in India and also placed at good firm. actually, there fee structure is not suiting me. they are damn damn costly. yes, i have good score in GMAT, GRE, but may be cost can be the deciding parameter atleast for Indians. …

Member Avatar for rajanraveendran
0
401
Member Avatar for nitin1

Hi, How can I pass a c# string to C++ side of the app? Right now, I have all handling in Const char * format . When I pass c# string, c++ working fine when using Platform::String . But there is no good way of converting Platform::String to const char …

Member Avatar for ddanbe
0
5K
Member Avatar for nitin1

Hi, I am facing an issue in string to const char pointer conversion. I am doing stuff in the fun() but here i am just giving my example. Here it the code: // Helper function string fun() { string abc = "Daniweb"; // print here #1 return abc; } // …

Member Avatar for AssertNull
0
3K
Member Avatar for nitin1

Hi guys, Here is the question: I have Activity A, Activity B. Now, A --> B . Now, pressed the home button. Now, go to any image & "open with" will show my app. when pressing my app as the option, it will hit Activity A. When it will hit …

0
211
Member Avatar for nitin1

Hi everyone, How are you? Starting some thread after long time :) Actually, I have a group of 25 people. I have 20-25 mobile devices in my group. So, I have assigned 1-2 device on each person's name(as an owner). But, people in the group ask each other for the …

Member Avatar for Agilemind
0
237
Member Avatar for nitin1

Hi, I have one function (in a library I can't change the code) which takes a key and returns a Object. This code is written in java. I am calling this function from cpp code. I am accepting the result as jobject. 1. Added key as "key1" & value as …

Member Avatar for JamesCherrill
0
2K
Member Avatar for nitin1

Hi, I have been working on JNI. I have one doubt. When I call any native method from android activity (Java code), then we get jclass object from jobject instance we get in the native method as a parameter. Why do we need it actually? Here is a snippet from …

0
182
Member Avatar for nitin1

Hi, I have one CSS. .buttonSize { min-width : 58% } Actually, I have two buttons, with text "Hovers" & "Copy". My button without any css taking spaces which can wrap the text size. This way size of two buttons is not same. What I tried: a) I have hacked …

Member Avatar for rproffitt
0
249
Member Avatar for nitin1

Hey, I have been reading Java oracle tutorials. I read this thing. Suppose, for example, class MsLunch has two instance fields, c1 and c2, that are never used together. All updates of these fields must be synchronized, but there's no reason to prevent an update of c1 from being interleaved …

Member Avatar for JamesCherrill
0
276
Member Avatar for nitin1

Hi, I have been working in Java for more than 8-9 months now. I want to have deep understanding of Java concepts now. For ex: Collections properties, threading, interfaces detailed concepts etc. I mean I have been using all these things for a while now but want to know about …

Member Avatar for nitin1
1
297
Member Avatar for nitin1

Hi all, Actually, this question is not related to some coding or logic from my project. But, as I am doing hard and harder projects (acc. to me & my exp.), I am focussing more on design part of my projects. When I present my design to team members for …

Member Avatar for JamesCherrill
0
1K
Member Avatar for nitin1

Hi, I am creating a form in jsp. <form action="" method="post"> <input type="hidden" name="status_1" value="0" /> <input type="checkbox" id="status_1" name="status_1" value="1" /> <input type="hidden" name="status_2" value="0" /> <input type="checkbox" id="status_2" name="status_2" value="1" /> <input type="hidden" name="status_3" value="0" /> <input type="checkbox" id="status_3" name="status_3" value="1" /> <input type="submit" /> </form> I was …

Member Avatar for AndrisP
1
512
Member Avatar for nitin1

Hi, I am stuck with a problem. I have two Date objects (util class objects). I want the difference between these two dates as the number of days between them? I am using Java 8. Can you please help me with this? Searched the web a lot. Some are saying …

Member Avatar for JamesCherrill
0
835
Member Avatar for nitin1

Hi, I was using booleans earlier in my class. --> isProductRestricted --> internal --> isProductGlobal I am using lombok too. So putting @Data at the top of class too. But, now I changed these boolean to Boolean variable. I got errors where ever `Object.isInternal()` was used. I am not getting …

Member Avatar for nitin1
0
367
Member Avatar for nitin1

Hey, I have one class Company and one Item class which is an object in Company class as shown: public abstract class Company { @Inject private ItemClass item; void companyMethod() { this.item.itemMethod(); } } public class ItemClass { public void itemMethod() { // logic } } So, many class inherits …

Member Avatar for JamesCherrill
0
220
Member Avatar for nitin1

Hey, I have visited Daniweb after few months. I have seen "API" options in my profile. How can we use it? Is it similar to fb apis, twitter apis? Thanks.

0
238
Member Avatar for nitin1

public class MainActivity extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ParseObject.registerSubclass(MyFirstClass.class); Parse.initialize(this, "Id", "Id"); Button button = (Button)findViewById(R.id.button1); button.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { callSearch(); } }); ParseUser user = new ParseUser(); user.setUsername("username"); user.setPassword("password"); /*user.signUpInBackground(new SignUpCallback() { @Override public void done(ParseException arg0) { …

Member Avatar for peter_budo
0
207
Member Avatar for nitin1

I have read few articles on google but I am still confused when to use what. I have come across checked and unchecked exceptions. I have one exception which I need to define. Let say, when xyz is null, I need to throw the inconsistentcyException which I will catch in …

Member Avatar for JamesCherrill
0
230
Member Avatar for Bhavesh Nariya

There are many ways to do it. You can use the XOR operations as ruberman has done it. You can try one more method using addition and substraction: void swap(int a,int b) { a = a + b; b = a - b; a = a - b; } It …

Member Avatar for Oddytech
-3
2K
Member Avatar for Reverend Jim

Although, My speaking skills are fine, but I make lot of grammtical errors while writing. Can you suggest some ways so that I cam improve my writing and speaking skills ? As many of you have English as your mother tongue language, but I don't have this thing with me.I …

Member Avatar for Reverend Jim
7
5K
Member Avatar for nitin1

Hi, Actually, I want to make one Singleton class which will create one instance for one thread. I mean if we have 10 threads, then Singleton will create only one object for one thread. IF same thread will ask for one more instance it will return the same instance. Basically, …

Member Avatar for vijayan121
0
338
Member Avatar for sureshshan1292

I know answers for approximately 80% of the problems above. but it will be against rules if i help u without watching your effort in this. thanks. :-)

Member Avatar for ekambaram
2
3K
Member Avatar for nitin1

I built one Sync code. I am using eclipse for the same. Actually my code is working fine in eclipse. But when I run it in Tizen OS device. I am using beecrypt library for the same. I have one line auto_ptr<Mac>(Mac::getInstance("HmacSHA256")); Actually, it is throwing exception on this line. …

0
143
Member Avatar for nitin1

I have made very simple code to larn the functionality. String str = "ABC"; InputStream input = new ByteArrayInputStream(str.getBytes()); BufferedReader reader = new BufferedReader(new InputStreamReader(input)); System.out.println(Character.valueOf((char) reader.read())); System.out.println(reader.read()); System.out.println(reader.read()); System.out.print(reader.read()); Secondly this one, String str = "ABC"; InputStream input = new ByteArrayInputStream(str.getBytes("UTF-8")); System.out.print(input.read()); System.out.print(input.read()); } output is same for the …

Member Avatar for JamesCherrill
1
3K
Member Avatar for nitin1

I have one project named P2PTicTac. I have one file named layout.java. and one with CLient.java. I have made simple GridView in layout file with 9 buttons in 3*3 Grid. I have run two threads in client.java. One for reading the data from server and one for writing data to …

Member Avatar for JamesCherrill
0
1K
Member Avatar for nitin1

public class Input { static InputStream reader = null; /** * @param args * @throws IOException * @throws InterruptedException */ public static void main(String[] args) throws IOException, InterruptedException { Test test = new Test(); test.start(); String str = "1 21"; // Scanner scan = new Scanner(System.in); try { reader = …

Member Avatar for JamesCherrill
0
136
Member Avatar for nitin1

I read about cherry-picking. It says: You have one branch x1 and branch x2. You want to take one commit from many commits of x2 and want to merge it with x1. You have 4-5 commits in x1 and now you take one commit or range of them and want …

Member Avatar for ddanbe
0
228
Member Avatar for nitin1

I read many articles on Web regarding this. I am able to understand what static_cast does. I am not to properly understand why, and when we have to dynamic cast. There is something "we can downcast the pointer when it is polymorphic". I am not able to understand what they …

Member Avatar for mike_2000_17
0
5K
Member Avatar for nitin1

Hi, I am learning Git system these days. I have made a new folder in ubuntu and in terminal did this: 1. git init 2. then made a file testfile1.txt 3. then made a branch using "git branch newbranch" 4. then checkout to this branch. 5. then, made a new …

Member Avatar for sepp2k
0
206
Member Avatar for nitin1

#include<iostream> using namespace std; class Singleton { static Singleton * s; Singleton() { } public: ~Singleton() { s = NULL; } static Singleton * getInstance(); void print() { cout<<this<<endl; } }; Singleton* Singleton::s=NULL; Singleton* Singleton::getInstance() { if(s == NULL) { s = new Singleton(); } return s; } int main() …

Member Avatar for deceptikon
0
335
Member Avatar for deceptikon
Member Avatar for nitin1

#include<iostream> using namespace std; int add(int x,int y) { int ans=0; int carry=0; for(int i=0;i<=31;i++) { int p = (1<<i)&x; int q = (1<<i)&y; int r = p ^ q; r = r^(carry<<i); ans = r | ans; if(p&q || p&(carry<<i) || q&(carry<<i)) carry = 1; else carry =0; } …

Member Avatar for rubberman
0
165
Member Avatar for nitin1

I have come across one question: find the size of two 2-D arrays when double pointers are given for them.Then find, if we can muliply these two matrices(those mathematics rules). finally we have to multiply the matrices. I have asked this question(small part of this question) earlier also. someone answered …

Member Avatar for Moschops
0
191
Member Avatar for nitin1

Why can we virtual destructors but can't have virtual constructors? I have searched like anything. I got confused a lot after reading few articles on web. Please explain with some good example. Thanks in advance.

Member Avatar for serpi90
0
141
Member Avatar for nitin1

I am working on a project and I need one CmakeList.txt file, Config file, spec file. I searched a lot. tutorials are telling how to make these files and all. Please tell me from scratch what they are and what is the use of these files? Please provide links also …

Member Avatar for mridul.ahuja
0
278
Member Avatar for nitin1

Can anyone give me an idea how to do this? I have a list(C++) of bytearray and I want to fire a post request to the server using CURL library? I have searched a lot and they say to set the CURL_POSTFIELDS but that requires a char * field. I …

Member Avatar for glenn_3
0
144
Member Avatar for nitin1

I am damn confused between these two terms. Can anyone explain this using some example? Thanks in advance.

Member Avatar for mike_2000_17
0
2K
Member Avatar for nitin1

This problem is troubling me from so long time. There are N scientists, K black holes, and any scientist can query about radius, size and temperature of any blackhole. You have to answer three kinds of query basically: 1)Given Scientist queried for which blackholes,Given scientist queried for which attributes 2) …

Member Avatar for nitin1
0
156
Member Avatar for nitin1

int find(int x) { for(int i=0;i < n; i++) { if(a[i]==x) return i; } return -1; } int find(int x) { for(int i=0;i < n/2; i+=2) { if(a[i]==x) return i; if(i+1 < n && a[i+1]==x) return i+1; } return -1; } int find(int x) { for(int i=0;i < n/3; i+=3) …

Member Avatar for Duoas
0
211
Member Avatar for nitin1

Please tell me the difference between these three. I know the basic meaning but don't know exact meaning of all of them. Please explain a very good example if possible. Thanks in advance.

Member Avatar for rubberman
0
255
Member Avatar for nitin1

**With a 2^32 address space and 4K ( 2^12 ) page sizes, this leave 2^20 entries in the page table. At 4 bytes per entry, this amounts to a 4 MB page table, which is too large to reasonably keep in contiguous memory. ( And to swap in and out …

Member Avatar for Moschops
0
200
Member Avatar for nitin1

I am very confused with static functions. Can I override them? If no, then why? I searched web a lot but i am still not clear. Please tell with one example if possible. Thanks a lot.

Member Avatar for Duoas
0
4K
Member Avatar for nitin1

I am using namespaces from a long time now. But, I don't know why we need them at the end? Why do I need to write using namespace std; OR std::string Why do we have to do this? Why have they made it this way? Can you elabroate this thing? …

Member Avatar for Itecg
0
275
Member Avatar for Deepesh_1

@mike Hats off to you. Great answer. One , the length of your answer, secondly your way of explanation. +1. :)

Member Avatar for mike_2000_17
1
418
Member Avatar for nitin1

I have learnt basic android in the last month. I have learnt about fragments, listview, adapters, acitivties, intents, content providers, databases, animations. I want some basic apps' ideas in which I can implement these things and can improve my learning? I am not too good in Java also. I know …

Member Avatar for Slavi
0
132
Member Avatar for nitin1

/* package whatever; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; class Test{ public static void main(String args[]){ String Str = new String("WelcometoTutorialspoint.com-"); int i=0; System.out.println("Return Value :" ); for (String retval: Str.split("-", 2)){ System.out.println(retval); System.out.println(i); i++; } i=0; System.out.println(""); System.out.println("Return Value :" ); for (String …

Member Avatar for nitin1
0
169

The End.