It was an interview question that a List contains 5 objects like Organisation, Employee, Address,Country etc. How will you know which object is the heaviest one without running through java agent. There is one condition that all the objects available inside Arraylist are not serializable. Basically interviewer wants know how to write code know the size of the objects available inside ArrayList so that you can now that a particular object is heavier. Please provide me help. Once again let me put the conditions once again.   You can not use any profiler tool. All the objects are not serializable. You can run though java agent.   You have to write code to test and run as normal java program.
I have an application that reads a CSV file with piles of data rows.  I give the user a summary of the number of rows based on types of data, but I want to make sure that I don't read in too many rows of data and cause OutOfMemoryErrors.  Each row translates into an object.  Is there an easy way to find out the size of that object programmatically?  Is there a reference that defines how large primitive types and object references are for a VM?  Right now, I have code that says read up to 32,000 rows, but I'd also like to have code that says read as many rows as possible until I've used 32MB of memory.  Maybe that is a different question, but I'd still like to know.
Whenever I'm running or playing a game, I consistently run into an issue of setting atmosphere. I've realized the best way to do this is through more effective, engaging descriptions of settings, actions, and objects that the characters see and feel.  As a player, I feel that my actions are generally "I attack the goblin," or some variation thereof, but I'm afraid that I'll stumble over my words and further confuse the other players and I'll resort to "I attack the goblin" as to not drag the game out longer.  As a DM, my issue tends to be more with setting atmosphere with settings, locations, and objects. Effectively, the flavor texts that comes with walking into some amazing location that the characters (not necessarily the players) should be suitably impressed by. My goal here is to engage the players with some degree of spectacle, and be more inquisitive in their environment and whatever lies within it.  How can I create more descriptive, concise flavor text for the games I play in? What is the relationship between symmetry and degeneracy in quantum mechanics? Tools to get a pictorial function call graph of code I have a large work space which has many source files of C code. Although I can see the functions called from a function in MS VS2005 using the Object browser, and in MSVC 6.0 also, this only shows functions called from a particular function in a non-graphical kind of display. Additionally, it does not show the function called starting from say main(), and then the functions called from it, and so on, deeper inside to the leaf level function.  I need a tool which will give me a function call graph pictorially with functions callee and caller connected by arrows or something like that, starting from main() to the last level of function, or at least showing a call graph of all functions in one C source file pictorially. It would be great if I could print this graph.  Any good tools to do that (need not be free tools)? Most commented post should be the first post in the blog WordPress default setting is, most recent post is the first post of the blog.  But, I need to "Most commented post should be the first post in the blog". ( Categories page as well as home page) Proving that the tangent to a convex function is always below the function Find a circle's radius with three known tangent lines I need to find the equation for a circle (mainly its radius) which is tangent to the following three lines:  $y = 0$  $y = \tan(70)x$  $y = -1.428148x + 0.790201$  For the last tangent line equation, I know that it is tangent at the point $(0.371272, 0.259968)$ However, for the other two I do not know the exact point of tangency, only that the circle is tangent to them. Can more than one antibody bind the same antigen I'd like to clear something up about antibodies that I'm not sure I've understood in the articles I've read. Looking at concepts such as "affinity maturation", "monovalent antigens" and "polyvalent antigens" it seems as if there are multiple antibodies which can bind to the same antigen. (Although I think I'm right in saying that individual antibodies can only bind to one antigen?) However, when I read sentences like "It has been estimated that humans generate about 10 billion different antibodies, each capable of binding a distinct epitope of an antigen" on the Wikipedia page (for antibody) it does make it sound like it's one antibody per antigen? Is this the case? Or is it one antibody per epitope. Either way, to put this question in a nutshell:  Is it true to say that the same substance could bind with (and, therefore, be recognised by) more than one antibody, or not?  Also, if the answer is no, does that mean that antibodies with different binding affinities are classed as the same antibody or not? $\require{enclose}\enclose{horizontalstrike}{\rm Greatest}\!$ Least prime factor of $n$ is less than square root of $n$, proof I remember reading this somewhere but I cannot locate the proof. What makes someone deserving of a Ph.D.? Few days back while attending a thesis defense, one Professor was asking the defender why does he think, he deserves the degree. I was wondering since then, is there really any general answer for that? or the answer should be given describing my own work and then emphasis them how it is important for research field?  I asked the question here to know your opinion about it and to list down what could be the possible answers to this question. Why does a candle blow out when we blow on it? Our breath is 16% oxygen and only 4% CO2 What is the difference between "why are you worried" and "why you are worried"? What is the difference between these two sentences?     Why are you worried?   Why you are worried?   Which one is correct? I have the message:   Error Broken count &gt;0 Check if you are using third party repositories. If so disable them, since they are a common source of problems. Furthermore run the following command in a Terminal: apt-get install -f Details: The following packages have unmet dependencies: firefox-globalmenu: Depends: firefox (= 19.0+build1-0ubuntu0.12.04.2) but 19.0+build1-0ubuntu0.12.04.1 is installed   Any suggestions? I have a long-running Python server and would like to be able to upgrade a service without restarting the server. What's the best way do do this?  if foo.py has changed:     unimport foo  &lt;-- How do I do this?     import foo     myfoo = foo.Foo() Received an email intended for another person Should there always be a comma after "therefore","However" etc.? I'm struggling with the following question;     For every graph $G$ such that $K_3 \not\subseteq G$ (i.e. $G$ does not contain a triangle), prove that $\chi(G) \leq 2\sqrt{n} +1$ (where $\chi(G)$ denotes the chromatic number).   Any hints? I really cannot see the connection between the triangle-free nature of $G$ and a chromatic number being bounded above by $O(\sqrt{n})$. Let $a$ and $b$ be non-zero integers, and $c$ be an integer. Let $d = \gcd(a, b)$. Prove that if $a|c$ and $b|c$ then $ab|cd$. Let $a$ and $b$ be non-zero integers, and $c$ be an integer. Let $d = hcf(a, b)$. Prove that if $a|c$ and $b|c$ then $ab|cd$.   We know that if $a|c$ and $b|c$ then $a\cdot b\cdot s=c$ (for some positive integer $s$). $(ab|c)$  Then doesn't $ab|dc$ since $ab|c$?  I feel like I'm misunderstanding my givens.    Can we say $\operatorname{lcm}(a,b)=c$,  $\operatorname{hcf}(a,b)=d$, and $\operatorname{lcd}(a,b) \operatorname{hcf}(a*b)=a*b$? Thus, $ab|dc$  as $dc = ab$. What tense should I use after the conjunction 'lest'? Must it always be an infinitive? Can I see images and watch movies inside the terminal emulator Why is the gravitational force always attractive?