How come sizeof(array)/sizeof(int) does not give me proper length of the array?
How to find the 'sizeof' (a pointer pointing to an array)?
Suppose we have functions $f:A→B$ and $g:B→C$. Prove that if $f$ and $g$ are invertible, then so is $g \circ f$. Suppose we have functions $f:A→B$ and $g:B→C$. Prove that if $f$ and $g$ are invertible, then so is $g \circ f$. Is the converse true? I.e., if $g \circ f$ is invertible, does it follow that $f$ and $g$ are both invertible?  I know that if $f$ and $g$ are invertible, then they are both injective and surjective. Therefore, I assume from this that I have to show $g \circ f$ is injective and surjective as well, thus proving it is invertible. However, I don't know how to show $g \circ f$ is bijective based only on the information I have. How do I root my Android device? Table cells larger than they are meant to be I've created a map system for a game that runs on the principle of drawing the picture of the map from tiles. There are many reasons for this which I won't go into here but if you really want to know then I'm sure you can find out how to contact me ;)  I have  so you can see exactly where the problem lies and the source. The issue is the line between the top 2 tiles and the bottom 2 tiles, I can't figure out why it's gone like this and any help would be appreciated.  In the source is a marker called "stackoverflow", if you search for "stackoverflow" when viewing source then it should take you to the table in question.  I have also uploaded an . There have been several discussions regarding code-only answers (answers that contain only code blocks with no textual explanation whatsoever):         Personally, I can't see why the quality filter should let such answers through at all. The main problem I have with code-only answers, especially once they're flagged as not an answer or very low quality, is that we can't determine at a glance whether these answers are:   Genuinely attempting to answer the question  answers Trying to correct an error in the question without actually answering it Random code dumps that may or may not relate to the question even by programming language or keyword(s) in the question   In particular, what exactly is an "informative code-only answer"? Does it mean the code is self-documenting? Does it mean the code substitutes code comments for a proper write-up? This is all very fuzzy. From  to the last question above:     I have never seen a code-only answer that couldn't be made better with the addition of appropriate text. They are of lower-quality than the same answer with some text.   This text makes all the difference, IMO, between an answer and a non-answer. Without it, it's often needlessly difficult to tell.  Existing code-only answers that are good-faith attempts to answer the question should be edited or downvoted, yes. But if the quality filter already tries to block code-only questions, why not block code-only answers too? These answers are often low quality, and (almost) always have ample room for improvement, just like questions. permission error when installing ttf-mscorefonts-installer/Can't drop privileges as file couldn't be accessed by user '_apt' Prevent Photos app on OSX from launching when plugging in device The Photos app opens whenever I plug in my phone.    How can this be prevented?  I have seen many solutions for the old iPhoto app that involve changing the "Connecting camera opens" option, but the new app has no such option. Custom kernel: fails to load firmware when module built-in I'd like to have all my modules built-in, but this fails with iwlagn:  iwlagn 0000:03:00.0: request for firmware file 'iwlwifi-6000-4.ucode' failed. iwlagn 0000:03:00.0: no suitable firmware found!   The microcode file exists in /lib/firmware and the whole thing works just fine if I compile iwlagn as module. I have no idea where it's looking for the file or what's wrong - any ideas? I have to design a circuit in which I have to transfer data through lasers (serial transmission of data). Now what I was thinking was to check if the laser light is on then '1' is passed and when the laser is off '0' would be passed. Now I need to check if a 1 or a 0 was passed.   How would I check for this and another problem I'm facing is if it's on it may keep on passing 1's. How would I check for this? I though of using LDR's (Light Dependent Resistors)? Would this be okay or it there a better method? Normal subgroup of prime index Generalizing the case $p=2$ we would like to know if the statement below is true.  Let $p$ the smallest prime dividing the order of $G$. If $H$ is a subgroup of $G$ with index $p$ then $H$ is normal. How do you keep user.config settings across different assembly versions in .net? Basically the problem is that each time the assembly version changes (i.e. the user installs a new version of the application) all their settings are reset the the defaults (or more accurately a new user.config file is created in a folder with a different version number as the name)  How can I keep the same settings when upgrading versions, since using ini files or the registry seem to be discouraged?  When we used Clickonce it seemed to be able to handle this, so it seems like it should be able to be done, but I'm not sure how. Are getters and setters poor design? Contradictory advice seen I'm currently working on a simple game in Java with several different modes. I've extended a main Game class to put the main logic within the other classes. Despite this, the main game class is still pretty hefty.  After taking a quick look at my code the majority of it was Getters and Setters (60%) compared to the rest that is truly needed for the logic of the game.  A couple of Google searches have claimed that Getters and Setters are evil, whilst others have claimed that they are necessary for good OO practice and great programs.  So what should I do? Which should it be? Should I be changing my Getters and Setters for my private variables, or should I stick with them? I am a novice user and I am trying to install Oracle Java. The process calls for me to access /usr/local/java, but here is the problem. I get as far as /usr/local, then this is the message I get:  leonard@leonard-MT6452:/usr/local$ dir bin  etc  games  include  java  lib  man  sbin  share  src  leonard@leonard-MT6452:/usr/local$ cd /java/ bash: cd: /java/: No such file or directory  leonard@leonard-MT6452:/usr/local$ rm -r ~/java rm: cannot remove ‘/home/leonard/java’: No such file or directory   Help? I often find myself in a situation where I am facing multiple compilation/linker errors in a C++ project due to some bad design decisions (made by someone else :) ) which lead to circular dependencies between C++ classes in different header files (can happen also in the same file). But fortunately(?) this doesn't happen often enough for me to remember the solution to this problem for the next time it happens again.  So for the purposes of easy recall in the future I am going to post a representative problem and a solution along with it. Better solutions are of-course welcome.     A.h  class B; class A {     int _val;     B *_b; public:      A(int val)         :_val(val)     {     }      void SetB(B *b)     {         _b = b;         _b-&gt;Print(); // COMPILER ERROR: C2027: use of undefined type 'B'     }      void Print()     {         cout&lt;&lt;"Type:A val="&lt;&lt;_val&lt;&lt;endl;     } };       B.h  #include "A.h" class B {     double _val;     A* _a; public:      B(double val)         :_val(val)     {     }      void SetA(A *a)     {         _a = a;         _a-&gt;Print();     }      void Print()     {         cout&lt;&lt;"Type:B val="&lt;&lt;_val&lt;&lt;endl;     } };       main.cpp  #include "B.h" #include &lt;iostream&gt;  int main(int argc, char* argv[]) {     A a(10);     B b(3.14);     a.Print();     a.SetB(&amp;b);     b.Print();     b.SetA(&amp;a);     return 0; } Some GUI apps use OS X location services, but I want to retrieve a Mac's physical location from the . This could be useful for running scripts, switching settings etc. The mechanism should be , not a Geo IP service (data too low-res, needs online connection).  Minimum requirement is output of longitude and latitude. Nice would be a number indicating the precision. Super nice: a geocoder that provides location names. Planet where humans fight for access to algae Fully transparent windows in Pygame? Is it possible to get a fully transparent window in Pygame (see the desktop through it)?  I've found how to create a window without a frame, but there doesn't seem to be any obvious way to make it transparent.  I'd be willing to tie into system-specific technology/frameworks as long as there are solutions for both Windows and Mac OS X, but I'm not sure which direction to be looking.  The only topic I was able to find , which isn't something I can do for this particular project (needs to be Pygame). How to remotely display my Android on my PC? There is a thing which is called miracast, it can mirror the display of the Android phone to another monitor, but my screen doesn't have this function, am I possible to do it in Ubuntu? How can I reduce the ever-increasing time to push a subtree? $ KC $ spaces imply $ US $ spaces , but vise versa is false. Is it possible to accept the alternative hypothesis? I'm aware of several related questions here (e.g., , ) but I don't know the definitive answer for my question below.  Suppose a hypothesis test where we want to test whether a coin is fair or not. We have two hypotheses:  $H_0: p(head)=0.5$  $H_1: p(head)\neq0.5$  Suppose we use 5% significance level, there are two possible cases:   When we obtain the data and find that the p-value is less than 0.05, we say "With significance level 5%, we reject $H_0$."  p-value is greater than 0.05, then we say "With 5% significance level, we cannot reject $H_0$."   My question is:      In case 1, is it correct to say "we accept $H_1$"?   Intuitively, and from what I have learned in the past, I feel that "accepting" anything as a result of hypothesis testing is always incorrect. On the other hand, in this case, since the union on $H_0$ of $H_1$ covers the whole "space", "reject $H_0$" and "accepting $H_1$" look exactly the same to me. On another thought, I can also think of the following idea, which says it is incorrect to say "we accept $H_1$":     We have an evidence strong enough to believe that $H_0$ is not true, but we may not have an evidence strong enough to believe that $H_1$ is true. Therefore, "rejecting $H_0$" does not automatically imply "accepting $H_1$"   So, what is the right answer?