consider i have many methods in jscript..  method1()  method2()  method3()  Now method1() and method2() are independent. where method3() is called by both the methods. I want to know from which method method3() is getting called. either method1() or method2()
function main() {    Hello(); }  function Hello() {   // How do you find out the caller function is 'main'? }   Is there a way to find out the call stack?
I have already read the question about  but this is not what I want, I want to be able to click on the file in Dash or in Nautilus and be able to open it with the specified app.  For example I have this case right now:  When I click on an EXE file it does not get executed by Wine, instead I get the following:    If I try to look for Wine in the Open With context menu option it is there. I am fine executing it from there the first time, but then the following times Wine does not appears selected in the main Context menu:    I then went to Properties to the Open With Tab to look for Wine. It was not in the Default apps nor was it in the Recommended ones when I clicked and search on Show other applications    This is not limited to EXE extensions. It also has happened with MKV files, MP4 files, JPG, PNG, MP3 and even SVG and CSS. So instead of trying to find a way of solving it for one, I want a way that can be done to any type of extension that can:   Make the app the default of that extension Appear on the context menu in Nautilus when I right click on the file Appears on the "Open With" tab on the Property window of the file Correctly executes the specified app when I click on the file with Dash   This might sound like it should be common sense for an app to execute the file but it does not always work like that. So for the cases where it actually does not work, how to fix it. A reset of the extension?, An update of the files that can open said extension?, an addition of the app via a command line or GUI tool? When I try to play multiplayer I type in the only server I know, which the game says was right, then click Play and it loads. Then it says Can't connect to server: bad log in. How can I fix this? i have a huuuuge problem.  Created a snapshot and image from my instance...instance has 1000GB of disk.  Now i need to reduce it but everytime i try to create an image or a snapshot from that, i get the same error "Disk need to be at least 1000GB".  There is a way to reduce disk size directly on instance? Some workaround? I have a .tiff and a .tfw file that I want to change into a GeoTIFF. When I try to open the file in ArcMap and ENVI 5.0, it is successful. However, in Google Earth it is not.  Is there anyway to create the GeoTiff in ArcMap or ENVI? Unresolved external symbol on static class members Very simply put:  I have a class that consists mostly of static public members, so I can group similar functions together that still have to be called from other classes/functions.  Anyway, I have defined two static unsigned char variables in my class public scope, when I try to modify these values in the same class' constructor, I am getting an "unresolved external symbol" error at compilation.  class test  { public:     static unsigned char X;     static unsigned char Y;      ...      test(); };  test::test()  {     X = 1;     Y = 2; }   I'm new to C++ so go easy on me. Why can't I do this? Combining randomForests in R, why are the err.rate, mse and rsq components NULL From ?combine in :     The confusion, err.rate, mse and rsq components (as well as the   corresponding components in the test compnent, if exist) of the   combined object will be NULL.   Why are the err.rate, mse and rsq components for the combined NULL? Is there an efficient way to re-calculate these metrics?  I ask because I would like to figure out a way to use the oob re-sampling method with the parRF model in . What if the universe is rotating as a whole? 12.04.3 can start only after I press "resume" in rescue mode (every boot) - problem with Nvidia driver I've tried to install maybe ten Linux distros on my new PC, and every time I have problems with video drivers: black screen or visual artefacts.  I was able to install only Ubuntu 12.04.3 64-bit, but also with problems: black screen on startup (sometimes all was normal when I used Live mode before install, sometimes I was not able to load Live Mode - Ubuntu says that I have problems with video and gives me a choice with four elements, one of them "use safe graphics mode", but I even can't choose this - the system is frozen).   In tty I installed nvidia-current, but it didn't help me. Every boot I need to press ESC and enter rescue mode and just press Resume and after this the system boots normally. If I try to do a normal restart I get a black screen after Ubuntu logo again.  I tried switching nvidia driver in the options - I have version 319-updates and version 319 [Recommended], but neither works.  I have Palit GeForce GTX650, all updates. How to add a guest account without a password? MacOS High Sierra: An error occurred while verifying firmware Why was my "shopping list" question closed? My question was closed for being a "shopping list question", even though it was very much related to the topic of the site. Why? Error with \newcommand using \multicolumn in table I want to define a new command \tableheadline that (1) formats the headline text in some way and (2) takes an optional argument for spanning multiple columns while centering the headline.  I tried the following implementation:  \documentclass{minimal}  \newcommand{\tableheadline}[2][1]{\multicolumn{#1}{c}{\textit{#2}}} % \newcommand{\tableheadline}[2][1]{\multicolumn{1}{c}{\textit{#2}}}  \begin{document}   \begin{tabular}[\textwidth]{cc}      \tableheadline[2]{C}     \tableheadline{A} &amp; \tableheadline{B} \\     0 &amp; 1 \\     2 &amp; 3 \\   \end{tabular} \end{document}   This, however, gives me an error:  ! Misplaced \omit. \multispan -&gt;\omit                    \@multispan l.8 \tableheadline[2]{C}   I also get the error when I do not even use the optional argument (see commented line in the MWE). Any ideas what I am doing wrong? Auto size image to page size in InDesign I've got an InDesign document with 100 A4 pages.   I've got 100 assets (a mixture of .jpg and .pdf files) and I want to place 1 per page. If an image is not the proportion of the A4 page I would like to get it as big as it can be on the page before it hits into the margin. Ex. if it's a portrait image it should be as large as it can be before hits the top/bottom margin. If it's a landscape image it should be as large as it can be before hits the left/right margin.   At the moment I'm dragging each file across and resizing them manually. Is it possible just drop them on the page and get them auto resized ? If you have an array of Java objects which have a primitive type (for example Byte, Integer, Char, etc).  Is there a neat way I can convert it into an array of the primitive type?  In particular can this be done without having to create a new array and loop through the contents.  So for example, given  Integer[] array   what is the neatest way to convert this into  int[] intArray   Unfortunately, this is something we have to do quite frequently when interfacing between Hibernate and some third party libraries over which we have no control.  It seems this would be a quite common operation so I would be surprised if there's no shortcut.  Thanks for your help! How to study/prepare for the Salesforce Developer Certification I am fairly new to Force.com development (less than a year). I did not learn it from the ground up. So I think it will be good to study for the developer exam to strengthen my basics and improve my overall knowledge of Force.com + it will be great to have this certification.  Now it's surprising that there is not a lot of great information on the web about how to go about obtaining this certification. Most other major certifications have dedicated study guide books available but there are few for Force.com and I don't think any of them are official.   The official page has little information. The Study guide gives a broad description of the topics in the test.   I see a lot of the esteemed members are here certified developers. I think if you guys could give us a little information, hints/tips and some advice on how to prepare for this exam, it will really be of great help. Also is DEV401 required/helpful?  Also if we could get recommendations for great resources(books, online training etc) and practice tests it will be awesome. Making the bibliography appear in the table of contents What is the terminology for data aggregated via summed totals versus data aggregated via means? The two types of data differ in that if you decide to decrease the temporal (time) resolution of the first type of data you take the mean of lower the resolutions. With the second you take the sum over the lower resolutions. Here is a concrete example  Gas Used (kWh), Outside Air Temperature (C), Time Resolution (Minutes) 100, 20, 20 140, 22, 20 120, 21, 20   Here the hourly (60 Minute) resolution data is clearly  360, 21, 60   and is found by averaging the temperature and summing up the gas used.  What I really wish to know is what the names for each of these types of data are called. I understand that this question is not the best but it is hard to ask a question about something whose names you do not know. If you have a better way of articulating the question then please go ahead and edit it. I dont need this vertices and/or edge. What is the best way to get rid of them? Working with large numbers in PHP To use  as you would require when using the  with large numbers (100,000+), it calls for some very large calculations.  When I multiply two large numbers (eg: 62574 and 62574) PHP seems to cast the result to a float. Getting the modulus value of that returns strange values.  $x = 62574 * 62574; var_dump($x);          // float(3915505476) ... correct var_dump($x % 104659); // int(-72945)  ... wtf.   Is there any way to make PHP perform these calculations properly? Alternatively, is there another method for finding modulus values that would work for large numbers? Isn't finding the inverse of $a$, that is, $a'$ in $aa'\equiv1\pmod{m}$ equivalent to solving the diophantine equation $aa'-mb=1$, where the unknowns are $a'$ and $b$? I have seem some answers on this site (where the extended Euclidean Algorithm is mentioned mainly) as well as looked up some books but there is no mention of this. Am I going wrong somewhere or is this a correct method of finding modular inverses? Also can't we find the Bézout's coefficients by solving the corresponding diophantine equation instead of using the extended Euclidean Algorithm?