java null pointer exception Android studio

I'm trying something. I'm want to create new object and add in list. But I get NullPointerException. My code is private List<HisseModel> hisseListe=null;` HisseModel model = new HisseModel();         model.setSymbol("abv");         model.setChange("123");         model.setCurrency("234");          HisseModel model2 = new HisseModel();         model2.setSymbol("abv2");         model2.setChange("1232");         model2.setCurrency("2342");          hisseListe.add(model);         hisseListe.add(model2);`  Why it's not working ?


Consider this code:    lst = [['a']*5]*4 lst[1][1] = '*'   And this code:    lst= [['a'] * 5 for i in range(4)] lst[1][1] = '*'   What makes them different?  Thanks


Novel. An alien captures a man and tests his capabilities, Man hides his abilities and overcomes the alien to take control of his ship

Probably a USA paperback read 70s or 80s in English. (The tone of the story was probably light-hearted.)  Alien visiting the Solar System discovers primitive humanoid life on Earth (Chemical Rockets have only just allowed man to reach the moon) and Captures a man for study and testing. He sticks him in a MRI type machine to do a detailed study of his brain and body to determine the human intellect and capabilities. (I think it was looking for a race to use as cannon fodder in their wars? or to use as slave labor? or looking for races which might be a threat?)  I think it was going to take a while for the computers to process the data to produce a report.  Meanwhile the alien put the man in a chamber or contraption that was like an exercise machine. To test his physical capabilities. The alien would select a skill on the controls, and the machine would then start painfully - bending, flexing, contorting, and manipulating the mans body. After which the man was able to preform that skill with ease. For example from being able to just shuffle a deck of cards, to a master card manipulator able to do riffs, spreads, dealing 2nds, 1 hand cuts and shuffles, etc. in just a few minutes.  The alien also tries to teach/implant his language, so he can talk to him with out having to learn the primitive humans language. But the man fools him into thinking that the language implant failed. So he can only speak a bare minimum of the alien language (like baby talk) and that the advanced concepts of the language did not take. (that the human mind to simple to understand them)  I think the man might have been a conman or criminal. Someone good at hiding their reactions/fooling people.  I THINK the ships computer was controlled by voice, so when the alien went to sleep, the man activated the computer (he now knew the language) to teach him A LOT more. (ex. Fighting skills, alien ship operations, etc) and then returns to his cell when the alien wakes up. (This might have been repeated for a few nights)  The alien is now also studying Earth and learning its Technological levels, political climate, history, etc.  Suddenly the alien freezes, obviously very panicked, and ask the man something like, Your race only learned to fly powered heavier-than-air crafts only 70 years ago? You put men in orbit 10 years ago? You went from leaning to fly, to safely landing a man on your moon in less than 70 Earth years? Humans went from theory to a working Nuclear Fission reactor and a Nuclear Bomb in less than 5 years?  And then he activates the Nav systems and sets course to leave the Solar system and max speed, so he could get clear to either activate his FTL drive or transmit his research data back home. (All the while muttering the alien equivalent of "Oh My God, Oh My God, Oh My God")  He tells the man that his race took about 500-1000(?) years to go from flight to rockets, and 200-300(?) to develop nuclear fission and bombs. Most other races they have meet in their explorations have taken longer.   About this time the computer finishes its report and says the due to the accelerated tech advancement of humans they will surpass the aliens in 50-100(?) years.  He needs to report back home how dangerous the humans are and they need to be destroyed as soon as possible.  At which point the human takes full control of the ship. (He has learned the ins and outs of the ships control systems, whereas the alien is just a pilot, Not a tech, he knows what commands or buttons to press to operate the ship, but not how to manipulate the system to regain control.  This is all I remember of the story, I believe this was only about half of the book, and there was much more as the man (by himself?) turned the tables on the alien race.


Not able to connect to WiFi after installing ubuntu 17.04

I installed Ubuntu 17.04 alongside Windows 10 and after successful installation I am not able to connect to the WiFi network to complete some other activities.  I tried all the solutions suggested like modifying NetworkConfig.conf and restarting the network service but nothing worked for me.  $ lspci -knn | grep Net -A3; rfkill list   Following is the result when execute the above command:  06:00.0 Network controller [0280]: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter [168c:0036] (rev 01)     Subsystem: Dell QCA9565 / AR9565 Wireless Network Adapter [1028:020c]     Kernel driver in use: ath9k     Kernel modules: ath9k 07:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 10) 1: phy0: Wireless LAN     Soft blocked: no     Hard blocked: no 2: dell-wifi: Wireless LAN     Soft blocked: no     Hard blocked: yes 3: dell-bluetooth: Bluetooth     Soft blocked: no     Hard blocked: yes 4: hci0: Bluetooth     Soft blocked: no     Hard blocked: no


If I connect to TS over RDP and after that run application which resides on SBS 2003 server (shared app directory), do I need to buy SBS 2003 CAL beside TS CAL?


'^M' was added to my file after when moving from Win to Linux

I created a .txt file on Win 8 [using sublime] (with copied text for here) and moved it to my VM running Linux.  I used cat tmp.txt >> .bashrc to append those lines into .bashrc but mysterious ^M were added in the end of every line (I noticed after sourch .bashrc failed).  I removed those and now it's fine, but where did they come from?  Before and After image:


In the proof of matrix solution of Least Square Method, I see some matrix calculus, which I have no clue. Can anyone explain to me or recommend me a good link to study this sort of matrix calculus?  In Least-Square method, we want to find such a vector $x$ such that $||Ax-b||$ is minimized.   Assume $r=Ax-b$  $\Rightarrow\|r\|^2=x^TA^TAx-2b^TAx+b^Tb$  $\Rightarrow \nabla_x \|r\|^2=2A^TAx-2A^Tb$  In the end we set the gradient to zero and find the minimized solution. I understand the whole idea, but I just don't know how exactly we did matrix calculus here, or say I don't know how to do the matrix calculus here. For example, can anyone tell me how we got those transpose in $\|r\|^2$(By what rule?) and how we got the gradient?(how do we take the gradient exactly in matrix format)?  I'll really appreciate if you can help me out. Thanks!


How can I recover deleted files in Windows 8?

I deleted a few hundred files using del /S.  My backup failed, and I need to recover as many of these as possible - preferably without taking the hard drive out and using another machine.  The directory the files were in still exists.


The speed of the top of a sliding ladder

A $5$m ladder is leaning against a wall. If the bottom of the ladder is pulled along the ground away from the wall at a constant rate of $0.4$m/s, how fast will the top of the ladder be moving down the wall when its bottom is $3$m away from the wall.   Is my solution wrong? How come I can't get the correct answer?  x=horizontal axis , y=vertical axis Area=XY/2, when X=3,  A=6m^2, dx/dt=0.4m/s  Y=2A/X  dy/dx=-2A/x^2.....A=6,x=3      =-12/9  dy/dt=dy/dx * dx/dt      =-12/9 * 0.4      =-0.533333


Evaluate $\frac{1}{2 \pi} \int_0^{2 \pi} \frac{1 - r^2}{1 - 2r \cos(\theta) +r^2}d\theta$

Let $0 < r < 1$. Compute $$\frac{1}{2 \pi} \int_0^{2 \pi} \frac{1 - r^2}{1 - 2r \cos(\theta) +r^2}d\theta$$ The hint is rewrite this integral as a complex line, but I still don't know how to to it


How long does it take for chat profiles to update?

Following scenario:   user registers, has 1 point user visits chat, notes he cannot post because of only 1 point and needs 20 user goes back to SO, answers a question. gets enough points to chat user goes back to chat, but his profile still shows 1 point   Now my questions:   How long does it take for the profile on chat to update? Is there a way to force updating?   Update: Logging in and out did not help.


Tag links in "About Me" in your Stack Exchange profile (for all sites) link to a 404 page

When looking at your profile page for the entire Stack Exchange network, if you link to specific tags in the About Me section, clicking on them takes you to a 404 page instead of following them to the correct site. For example, if you  and click on one of the tags in the About Me section, you will see the 404 page. However, if you click a tag in the bottom section under Top Questions, it does take you to correct site. (Obviously, this is because the question is tied to a community and the About Me section is not.) Understanding that the same tag may be used on many different Stack Exchange sites, I can see four possible solutions:  When clicking on a tag in the general Stack Exchange profile, take the visitor to a page summary within the SE site that lists all SE communities with the tag the profile's owner has been active within so they may follow it into the correct site(s).  When the user is editing their profile, any tags inserted with [tag:tagname] inherit the site that the profile is being edited on. So, if I edit my profile on Stack Overflow and save it across all network sites, all my tags would point to Stack Overflow since it was the last place I edited my profile. (Probably not the ideal solution.)  Strip the tag links out of the About Me section when viewing a profile on the general Stack Exchange site.  Do nothing.


Adding Objective C compiler to GCC 4.7.2

I finished building the GCC 4.7.2 with C, C++ and Go compilers on my Ubuntu 12.04. I now want to add the Objective C compiler, is it possible to add it to the previous build? If so, how should i proceed?   Thanks.


Python print variable but not the value assigned to that variable

I have a list of lists of values. In some instances, I have to print names of the lists but not their values.   onesoil = [dates_bwn_twodates('2019-03-22','2019-04-09'),onemod] sixsoil = [dates_bwn_twodates('4/10/2019','4/29/2019'),sixmod] explist = [onesoil,sixsoil]   print(explist[0])  >>  [dates_bwn_twodates('2019-03-22','2019-04-09'),onemod]   Above is fine but I want to print the name but not is value.   My expected output   print(explist[0]) >> onesoil    How to achieve this?


Where can I ask questions related to Windows?

What would be the right Stack Exchange community to ask questions related to Windows operating system, and Windows software? Particularly in my case, I wanted to ask questions related to oracle's virtual box.  Example of the question is as:     Why can't a con folder be named in windows?


How does really the // round the result?

I'm facing a (for me) strange behaviour of the // operator in python.  When I compute, e.g., 5.//0.25 I become the right result, i.e.   >>> 5.//0.25 20.0   But   >>> 5.//0.2 24.0   Instead of  >>> math.floor(5./0.2) 25   Can anyone explain me this results? Why is the result of the // 24.0?   EDIT: The given link  does not really answer the question exhaustively. In fact, with this answer one can not understand why the floor of the normal division give the right result. The real answer should explain how does // work, as was done by polku in the comments  And perhaps I had to write this from the beginning: why is this happening?  >>> print('%.17f' % (5./0.20000000298023224)) 24.99999962747097726 >>> print('%.17f' % (5./0.2)) 25.00000000000000000   EDIT2: This question should really be reopened, since it's answers isn't given in the suggested duplicate question, but rather in @polku's comment.


Clinet-side solutions to prevent DNS amplification without rate limiting on an open DNS server?

Are there alternative ways to operate an open/forwarding DNS server, without having to use rate limiting or other means of traffic inspection to prevent being used for DNS amplification attacks?   Within a given network, the DNS server can be easily restricted to only answer to specified IP adresses, but given the increased usage of mobile devices I would like to avoid this restriction.  (lets ignore VPNs for this question)  Can you point me to any alternative approaches that try to prevent access to the DNS server  or amplification attacks by other means then actually keeping track of requests and client behaviour?    Are there any client-side solutions, less heavy than a VPN, to authenticate to a DNS server?  edit: as this question has been marked as a duplicate to an unrelated question, I have edited the title to include "client-side".  This is not a duplicate.  I have mentionend the traditional way to to limit the effects of an  amplification attack on the server in my question and I tried to indicate my search by mentioning the VPN based solutions.


MacBook Pro charge cycle counter in battery?

In a MacBook Pro, is the counter for charge cycles in the battery or in the motherboard?   (I'm thinking it should be in the battery, but I've taken apart a MacBook Air, and those batteries don't appear to have any place to put a counter.)


Scorched3d worked then stopped. Unistalled and reinstalled did not help. Running Ubuntu 16.04.04LTS. I think it was after installing new release.  I think the problem is the Ubuntu 16.04.4LTS. The newer version has no Scorched3d in the Ubuntu Software Center. I have 3 systems. After updating to new version. Scorched3D will not install and work after updating.  ron@RonsComputer:~$ sudo objdump -p $(type -p scorched3d) | grep NEEDED  NEEDED libwx_gtk2u_adv-3.0.so.0  NEEDED libwx_gtk2u_core-3.0.so.0 NEEDED libwx_baseu-3.0.so.0 NEEDED libfreetype.so.6 NEEDED libz.so.1 NEEDED libSDL-1.2.so.0 NEEDED libSDL_net-1.2.so.0 NEEDED libexpat.so.1  NEEDED libstdc++.so.6 NEEDED libm.so.6 NEEDED libgcc_s.so.1 NEEDED libpthread.so.0 NEEDED libc.so.6   ron@ron-desktop ~ $ objdump -p $(type -p scorched3d) | grep NEEDED | awk '{print $2}' | xargs -n 1 dpkg -S  libwxgtk3.0-0v5:amd64: /usr/lib/x86_64-linux-gnu/libwx_gtk2u_adv-3.0.so.0.2.0 libwxgtk3.0-0v5:amd64: /usr/lib/x86_64-linux-gnu/libwx_gtk2u_adv-3.0.so.0 libwxgtk3.0-0v5:amd64: /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.2.0 libwxgtk3.0-0v5:amd64: /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0 libwxbase3.0-0v5:amd64: /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0.2.0 libwxbase3.0-0v5:amd64: /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0 libfreetype6:amd64: /usr/lib/x86_64-linux-gnu/libfreetype.so.6.12.1 libfreetype6:i386: /usr/lib/i386-linux-gnu/libfreetype.so.6 libfreetype6:amd64: /usr/lib/x86_64-linux-gnu/libfreetype.so.6 libfreetype6:i386: /usr/lib/i386-linux-gnu/libfreetype.so.6.12.1 zlib1g:i386: /lib/i386-linux-gnu/libz.so.1.2.8 zlib1g:amd64: /lib/x86_64-linux-gnu/libz.so.1 zlib1g:i386: /lib/i386-linux-gnu/libz.so.1 zlib1g:amd64: /lib/x86_64-linux-gnu/libz.so.1.2.8 libsdl1.2debian:amd64: /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0.11.4 libsdl1.2debian:i386: /usr/lib/i386-linux-gnu/libSDL-1.2.so.0 libsdl1.2debian:i386: /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4 libsdl1.2debian:amd64: /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0 libsdl-net1.2:amd64: /usr/lib/x86_64-linux-gnu/libSDL_net-1.2.so.0 libsdl-net1.2:i386: /usr/lib/i386-linux-gnu/libSDL_net-1.2.so.0 libsdl-net1.2:amd64: /usr/lib/x86_64-linux-gnu/libSDL_net-1.2.so.0.8.0 libsdl-net1.2:i386: /usr/lib/i386-linux-gnu/libSDL_net-1.2.so.0.8.0 libexpat1:i386: /lib/i386-linux-gnu/libexpat.so.1.6.0 libexpat1:amd64: /lib/x86_64-linux-gnu/libexpat.so.1 libexpat1:amd64: /lib/x86_64-linux-gnu/libexpat.so.1.6.0 libexpat1:i386: /lib/i386-linux-gnu/libexpat.so.1 libstdc++6:amd64: /usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21-gdb.py libstdc++6:i386: /usr/lib/i386-linux-gnu/libstdc++.so.6 libstdc++6:amd64: /usr/lib/x86_64-linux-gnu/libstdc++.so.6 libstdc++6:amd64: /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 libstdc++6:i386: /usr/lib/i386-linux-gnu/libstdc++.so.6.0.21 libstdc++6:i386: /usr/share/gdb/auto-load/usr/lib/i386-linux-gnu/libstdc++.so.6.0.21-gdb.py libc6:amd64: /lib/x86_64-linux-gnu/libm.so.6 libc6:i386: /lib/i386-linux-gnu/libm.so.6 libgcc1:amd64: /lib/x86_64-linux-gnu/libgcc_s.so.1 libgcc1:i386: /lib/i386-linux-gnu/libgcc_s.so.1 libc6:i386: /lib/i386-linux-gnu/libpthread.so.0 libc6:amd64: /lib/x86_64-linux-gnu/libpthread.so.0 libc6:i386: /lib/i386-linux-gnu/libc.so.6 libc6:amd64: /lib/x86_64-linux-gnu/libc.so.6 ron@ron-desktop ~ $


Grid based Collision Detection between circles

I am working on a 2d arcade game where I have 5 types of circles with different sizes: The ship, the missiles, and 3 types of monsters.  This is what it looks like:    Currently I'm using brute force collision detection where I check every missile vs. every monster without taking probability of collision into account. Sadly, this makes the process REALLY slow.  This here is my Grid class, but it's incomplete. I'd greatly appreciate your help.      public class Grid {      int rows;     int cols;     double squareSize;     private ArrayList<Circle>[][] grid;      public Grid(int sceneWidth, int sceneHeight, int squareSize) {         this.squareSize = squareSize; // Calculate how many rows and cols for the grid.         rows = (sceneHeight + squareSize) / squareSize;         cols = (sceneWidth + squareSize) / squareSize; // Create grid         this.grid = (ArrayList[][]) new ArrayList[cols][rows]; //Generic array creation error workaround     }  The addObject method inside the Grid class.     public void addObject(Circle entity) { // Adds entity to every cell that it's overlapping with.         double topLeftX = Math.max(0, entity.getLayoutX() / squareSize);         double topLeftY = Math.max(0, entity.getLayoutY() / squareSize);         double bottomRightX = Math.min(cols - 1, entity.getLayoutX() + entity.getRadius() - 1) / squareSize;         double bottomRightY = Math.min(rows - 1, entity.getLayoutY() + entity.getRadius() - 1) / squareSize;          for (double x = topLeftX; x < bottomRightX; x++) {             for (double y = topLeftY; y < bottomRightY; y++) {                 grid[(int) x][(int) y].add(entity); //Cast types to int to prevent loosy conversion type error.             }         }     }   But that's where I am at a complete loss. I'm not even sure the source code I provided is correct. Please let me know how to make the grid based collision work. I've read basically every tutorial I could get my hands on but without much effect.  Thanks.


How to resize bar chart image using matplotlib?

I show bar chart image with this code. print(df['a'][1:].astype(int).plot.bar())  The image is very small I try to resize image by using matplotlib like this code. plt.figure(figsize=(4,3)) plt.plot(df['a'][1:].astype(int).sum())  when I run I show empty image without bar chart. How to fix it?


Why is Firefox trying to use Okular to open downloads?

I'm asking my question here because I can't find an answer anywhere else and the Ubuntu forums have not helped at all.  I am running Firefox and Ubuntu 11.04 on a Dell Dimension 9200. Everything was working fine up to the point where I opened a file in Firefox...  I downloaded several file using Firefox 4.01. While downloading the files Firefox opened the small Downloads browser window as is normal. I then right-clicked on a PDF file and chose Open with Okular. The file did not open. I did a right-click on the same file and chose Open Containing Folder. This failed as well.  The problem I now have is every time I try to open anything from the Firefox Downloads browser window it tries to open it with Okular. I also cannot right-click the file and use Open Containing Folder because it also tries to open in Okular. Everything now tries to open in Okular. What is stranger still is that now if I try to open any of my folders fro the Ubuntu Places menu (such as Home Folder, Videos, Pictures, etc.)  they all try to open in Okular. None of them actually open and all I get is the following error message:     Failed to execute  default file manager. Failed to execute child process " /user/bin/okular"   I have uninstalled and reinstalled both Okular and Firefox. I even deleted all of the Firefox preference files and I still get this error message.  I am also wondering if it may be that my Kensington Exper Mouse trackball driver/software has associated all of these actions with the right-click on the mouse (that is, everything that happens with the right-click tries to open in Okular).  Any suggestions on how to correct this problem?


I want to switch from Ubuntu to Mint.  Can I somehow turn my laptop's Ubuntu install into a virtual machine that I can then run on my computer so that I can refer to all my applications and settings and such there for when I want to configure my new mint install?


Least action principle and its quantum mechanical view

In Feynman's lecture (I am forgetting the volume number) while explaining the least action principle he mentions that the system actually follows all possible configuration paths. $\exp(iS/\hbar)$ superposes constructively for the values of action $S$ for which it is stationary with respect to the variations of the path. This argument is comprehensible but what is the actual quantum mechanical basis of this argument?


Representing a distance matrix in the plane

I've worked with observations as vectors with both continuous and categorical variables. In both cases one can use dimensionality reduction techniques such as PCA (in the latter case through Correspondence Analysis).  This has been very useful for me to draw the observations in the plane (by taking the 2 first components).  But I don't know an equivalent method for drawing points from a distance matrix. I know the result won't preserve all distances in general, but just an approximation is fine (as when removing components from PCA). To put a concrete example, words with "edit distance" (there are variations which are true metrics).  Is it reasonable to just do PCA on the distance matrix itself and draw the first 2 components? Or is there a better way?  Bonus: in the best case scenario, I would like to work without evaluating my distance function for all pairs (I've read there are space partitioning data structures, but haven't tried them; this is related to the efficient solution to kNN I believe).


Let $f \in C[0,1]$ and $f(0)=f(1)$.   How do we prove $\exists a \in [0,1/2]$ such that $f(a)=f(a+1/2)$?  In fact, for every positive integer $n$, there is some $a$, such that $f(a) = f(a+\frac{1}{n})$.  For any other non-zero real $r$ (i.e not of the form $\frac{1}{n}$), there is a continuous function $f \in C[0,1]$, such that $f(0) = f(1)$ and $f(a) \neq f(a+r)$ for any $a$.  This is called the Universal Chord Theorem and is due to Paul Levy.  Note: the accepted answer answers only the first question, so please read the other answers too, and also this answer by Arturo to a different question:     This is being repurposed in an effort to cut down on duplicates, see here: .  and here: .


analyzing binary mortality data collected at different remeasurement intervals. Bonus for R implementation

I am replicating an analysis that models tree mortality data. Data are structured such that forest sites are revisted at some random interval, which is recorded. It is then determined if a tree lived or died over that random interval, generating 0 1 mortality data (if a tree dies, it gets a 1 in the dependent variable). The interval between initial and final observation varies continuously, from 5-15 years. This is relevant, as the more time that passes, the more likely a tree will die.   Here are some pseudo data for R:  mort <- c(0,1,0,0,0,0,0,1,1,1,1,0,1,0,0,0,0,0,0,0,1,0) interval <- runif(length(mort), 5, 15) pollution <- rnorm(length(mort), 25,5) data<- data.frame(mort, interval, pollution)   I am trying to replicate an analysis which uses a logistic regression model for binary mortality data using the the logit transformation. Authors then model how pollution affects tree mortality rates. In the manuscript the authors write, "because recensus is not annual, we relate annual mortality probability, pi, of tree i to the observed binomial data on whether that tree lived or died Mi via a Bernoulli likelihood,    where ti is the time interval between successive censuses."  My question: How would I implement this using the glm function, or something analagous, in R? Note: I understand modeling this as a hazard function would also be appropriate, but it is not what I am interested in.


I'm trying to work out the safest way to confirm some details about an uploaded file - e.g. file extension, file size (bytes), file dimensions (if image), etc.  I've found several methods to get the extension but they all seem to be based on manipulating the file name, which is very trivial to fake.  For image dimensions I've been using getimagesize(). For file size I've been using filesize.  I'm working with sensitive data, so want to have every point of entry to the site secure. Is there a safer way to get all of this data on an uploaded file?  Thanks in advance for any help.


String passed as function parameter is undefined

When I pass a string to a function as a parameter, it returns undefined. Why is that?  let a = 'b';  let test = (a) => console.log(a);  test(); // undefined


$x + \frac1y = y + \frac1z = z + \frac1x$, then value of $xyz$ is?

If $x,y,z$ are distinct positive numbers, such that $$x + \frac1y = y + \frac1z = z + \frac1x $$ then value of $xyz$ is?  $$A)\ 4\quad  B)\ 3\quad C)\ 2\quad  D)\ 1$$  My attempt:  1.I equaled the equation to '$k$'. Using the AM-GM inequality, I found that $k>2$ (the equality does not hold because all are distinct). However, this, I couldn't put to much use. 2. For the next attempt, I substituted the values of $x$ and $y$ in terms of $z$ and $k$ in $xyz$. What I am getting is $xyz=zk^2 - k - z$. That's the farthest I could do..Please, help.


Access private methods variables in another java class in same package.

I am new to java. Can anyone please tell me best way to access private method variables in another class. Thank u


Short story where aliens are observing humans then attack

I'm looking for a story where it's being told from the "alien's" perspective about them observing Earth in its primitive times via telescopes from systems away.  They see us at our worst with war, violence and decide that we need to be purged for the good of the universe or something.  As the missiles are flying they keep observing and see us mature compassion and stuff but it's too late to stop the attack.  The attack hits and then they receive a message from Earth saying we're coming for you.


An example of no linear map from a vector space to itself that satisfy $T(v+w)=T(v)+T(w)$?

What is an example of a map $T$ from a complex vector space $C$ to itself such that $T(v+w)=T(v)+T(w)$. but $T$ is not linear.


Can anyone tell me how to make guake terminal be part of the start-up applications?

How can I add Guake terminal to the start-up applications?


I was wondering if it's safe to upgrade Maverick Meerkat to Natty (I believe I'm fully aware of the bugginess of Natty at the moment). The only thing that's of concern is altering of other partitions during the install.   Will it wipe any partitions out?


In writing a two-column paper, I want to insert two figures. Fig. 1 has two subfigures (a) and (b); Fig. 2 has a single figure. So in total, there are three figures, each occupying about 1/3 of the entire page width.   I know commands like "figure*" can insert multiple subfigures in a SINGLE figure environment, but not for this case. Any thoughts?


In Java (or, to be honest, any computer language), to increment an int, you do as so:  // Option 1 - efficient int x = 0; x++; // x = 1  // Option 2 - works, but is ugly int y = 0; y = y + 1; // y = 1;   How would you do this to a boolean?  // Standard way to // oppose a boolean boolean isTrue = false; if(isTrue){     isTrue = false; } else if(!isTrue){     isTrue = true; }   Is there not a shortcut to change a boolean? For example, if the boolean was true, is there a way to change it with just a small shortcut like x++;?


Left and right coset calculation for matrix

If $$ G = \left\{  \begin{pmatrix} c & a \\ 0 & 1 \end{pmatrix} c,a\in (\mathbb{R}) : c \neq 0 \right\}  $$ and assume G is a group under matrix multpication $$  H = \left\{ \begin{pmatrix} 1 & x \\ 0 & 1 \end{pmatrix}: x\in\mathbb{R} \right\} $$ Find  the left and right cosets of H in G and show that they are equal  So far I have done the following: $gH = \begin{pmatrix} c & a \\ 0 & 1 \end{pmatrix} \begin{pmatrix} 1 & x \\ 0 & 1 \end{pmatrix}$  $=\begin{pmatrix} c & cx+a \\ 0 & 1 \end{pmatrix}$  To calculate the right coset, choose $g' =\begin{pmatrix} c' & a' \\ 0 & 1 \end{pmatrix}, c' a' \in G$:  Then $Hg'=\begin{pmatrix} c' & x+a' \\ 0 & 1 \end{pmatrix}$  How does $gH$=$Hg'$ in this case?


Picking random points in the volume of sphere with uniform probability

I have a sphere of radius $R_{s}$, and I would like to pick random points in its volume with uniform probability.  How can I do so while preventing any sort of clustering around poles or the center of the sphere?    Since I'm unable to answer my own question, here's another solution:  Using the strategy suggested by  for picking points on the surface of a sphere: Let $\theta$ be randomly distributed real numbers over the interval $[0,2\pi]$, let $\phi=\arccos(2v−1)$ where $v$ is a random real number over the interval $[0,1]$, and let $r=R_s (\mathrm{rand}(0,1))^\frac13$. Converting from spherical coordinates, a random point in $(x,y,z)$ inside the sphere would therefore be: $((r\cos(\theta)\sin(\phi)),(r\sin(\theta)\sin(\phi)),(r\cos(\phi)))$.  A quick test with a few thousand points in the unit sphere appears to show no clustering.  However, I'd appreciate any feedback if someone sees a problem with this approach.


The robo-approvers are killing my will to review edits

Already I have lost all hope of looking at late answers etc. It's just a parade of meh. I can't make any kind of intelligent decision because I can't see the other answers to the question, for instance. There's no Looks Good, only Skip, and those feel different to me. So I've been more interested in .  But people keep approving crap while I'm looking at it. Two or three "the post was already approved; please visit to edit" and I'm just "screw this whole thing".  Can we do something like one reject bounces all existing votes: you need three approves in a row? Because a lot of people are stupidly approving and actually driving me away from the queue.    Note this is less about letting bad edits through and more about keeping reviewers motivated.


I have an element with the following style:  p {   color: 'red'; }   When I'm trying to get the element color by running the following code:    const styles = window.getComputedStyle(pElem);   const value = styles.getPropertyValue('color');   I'm getting the color in RGB format. How I can get the real value - 'red'?  I need this functionality for testing purposes, for example:  expect(p).toHaveStyle({color: 'red'});


After upgrading to 20.04, my screen does not blanks after the given timeout.  When I performed the upgrade, I got a notification of the upgrader that screen blanking would be disabled.  After the upgrade, I think i set everything to enable it again, but it does not work apparently. Here are 2 screenshots of my settings:    Did I overlook some setting?  [Edit] Output of gsettings list-recursively | grep idle-delay  org.cinnamon.desktop.session idle-delay uint32 900 org.gnome.desktop.session idle-delay uint32 60  (process:26641): GLib-GIO-WARNING **: 19:12:59.864: Failed to parse translated string '['attachment',‘bijlage’,'attaching','attached',‘bijgevoegd’,'enclosed',‘ingesloten’]' for key 'attachment-reminder-clues' in schema 'org.gnome.evolution.plugin.attachment-reminder': 14:expected value  (process:26641): GLib-GIO-WARNING **: 19:12:59.864: Using untranslated default instead.   [edit 2] Output for command echo $XDG_SESSION_DESKTOP  ubuntu   Output for dpkg -l | grep cinnamon  ii  cinnamon-desktop-data                                       4.4.1-3                                       all          Common files for Cinnamon desktop apps ii  cinnamon-l10n                                               4.4.2-2                                       all          Translation files for the Cinnamon desktop ii  cinnamon-session                                            4.4.1-1                                       amd64        Cinnamon Session Manager - Minimal runtime ii  cinnamon-session-common                                     4.4.1-1                                       all          Cinnamon Session Manager - common files ii  libcinnamon-desktop4:amd64                                  4.4.1-3                                       amd64        Cinnamon library for loading .desktop files   [edit 3] output for gsettings get org.gnome.desktop.lockdown disable-lock-screen  false


Why doesn't apt-get autoremove remove my old kernels?

My boot partition is on a SSD, so it doesn't have room for more than about 8 installed kernel versions, and eventually some kernel update will fail to install because my boot partition is full of old versions. There are many questions out there about how to remove old versions (even how to automate the process), but my question is simply this: Why doesn't apt-get autoremove detect and remove them automatically, and is there a way I can make it do so? I mean, apt-get is what installed them anyway, so it knows about them, so why does it choose to leave all old versions around?


How can I prove that a flight was delayed by more than 4 hours?

My grandma is trying to request compensation under  from Air Transat, as her flight from England landed 4 hours past the scheduled arrival time in Canada. She recorded the time, but her telephone obviously isn't probative evidence.   But Air Transat refused, and countered:     The delay of your flight was under the 4-hour mark. Regulation EC261/2004 does not apply.   So how can she prove the delay of more than 4 hours, free of charge?


Someone who likes to taste everything, like food and drink. But I don't mean a glutton


pure-whitespace edits cannot be submitted

This has been discussed before (e.g. ) but the explanations point to something other than the edit.  Every time I try to just add four whitespace characters to convert a code block to actual code, it is rejected with the following error:        Is this desired behavior or is there something about my account that prohibits me from making those changes?


Is it possible to know from apt if the package was installed explicitly or as a dependency of another package?

Let's say there are A, B and C package.  A and C were installed manually with apt-get install, and B is a dependency of A and was installed by apt automatically.  Is it possible to know that with some apt-* or dpkg command?


14.04 Trusty+Gnome: how do I add application icons onto the top panel?

Ubuntu 14.04 Trusty Tahr, Gnome. How do I add application icons on the top panel?  This is what I had on Precise:    And this is what I have on Trusty:    I tried icon dragging and the right click, but they only launch the application.  EDIT: note that this question is about Ubuntu 14.04 Trusty Tahr, the thing that worked in previous releases (such as Precise) does not work anymore.


In this story, we are introduced to a couple that is "poor" (i.e. not rich). The story goes on for a bit.  At the end of the story, we realize that being poor means that they are required to buy and consume material goods. Rich people are not required to do so.  This has been bugging me for quite a while. I read it back in the 80's or 90's, out of a library book.


Why PC reboots when there’s a power failure even with UPS?

I've purchased a Line Interactive UPS 1200VA. It's supposed to give 8~20min backup (as written in the manual). This UPS has transfer time < 10ms. It works fine when the mains is active.  But the problem is that when the power went off, the PC also went off for a fraction of a second and started rebooting.   The strangest thing though is that it has to be a proper power failure by the service supplier. If I just turn off the power at the wall plug, the UPS kicks in immediately and the PC carries on working fine.  What's the solution of that? What should I do?  My hard drive was physically damaged because of improper shut down & restart. I've 5~8 times power outage in my country so I badly need an UPS.


I was reading a book and it said:"The coastline length of the United States proper is 22,860 km. What does "United States proper" mean here? Another phrase would be:"Her family lived outside the city proper". Is the word "proper" a noun here? What is its definition in this context?


Can't understand Frequency and Bandwidth

I just don't get it. How bandwidth is the factor that the data rate and the capacity are based on? Let's say we're using Amplitude Modulation. The main factor here is the ability to change the amplitude! The difference between the maximum and minimum frequency can be 0. Who cares? How can Niquist come and say that Capacity=2*B*n? Just tell me how bandwidth states the speed and the capacity, please. Thank you! Oh, Please use understandable English :)


How to put paragraph after a figure in latex?

I want to put a paragraph after an image but latex always put the paragraph before the image. how can I do it? Thank you.


Could we define proper $\mathbb Q$ module structure on ring of integer $\mathbb Z$? Any comments are welcome.


How do I tell which components survived after a power supply failure?

A couple days ago I booted up Left 4 Dead, but then heard a pop and my computer turned off. It smelled like dead electronics so I unplugged the computer. I figured it was a power supply failure, so I ordered a new Corsair HX520 and tried to install it today, hoping that was the only thing that needed replacing.  However my computer most emphatically did not work. Case fans turned on, a few motherboard lights and optical drive power lights turned on, but neither my GPU fan or my CPU fan turned on. Also one of my hard drives sprayed a few sparks from its underside and a bit of smoke came from it. I figure that one is dead. There was also no signal to the monitor or beep codes. I quickly turned the computer off to avoid any potential CPU overheating and tried with only 1 stick of RAM and no hard drives and got the same result.  What does this mean? Does the GPU fan not turning on mean the video card is shot? What does the CPU fan not turning on mean? Is the motherboard dead as well, or the CPU, or both? Should I just spring for a new computer at this point?  (edit) Also, can a power supply failure hurt your RAM?


I think I'm on the right track, but I just don't know how to put it all together.   Also $ b\neq 0 $  I have the following:  If $ b|c $ , then $a + c = a + bq, q \in \mathbb Z$   If the $\gcd(a,b)$, say $d$, divides $a$ and $b$  Then $ d|bq $ and hence $ d | a  + bq$  Thus $d | a+c$  The problem is I don't know how to show $d$ is the $\gcd(a +c, b)$ even though I know it divides both of them. Can someone help me with this?


I went to check some of my queries against UNIX & Linux this morning and noticed that the results all had dates older than a week. Going to   query, I see that U&L is among the sites whose most recent posts/comments are 2020-04-19 instead of 2020-04-26, as expected. Partial results of incompletely-refreshed sites are:  ... StackExchange.Meta                    2020-04-19 05:15:09 comments  StackExchange.Ubuntu                  2020-04-19 05:08:40 comments  StackExchange.Stats                   2020-04-19 05:06:54 comments  StackExchange.Ubuntu                  2020-04-19 05:02:17 posts     StackExchange.Programmers             2020-04-19 04:51:22 comments  StackExchange.Programmers             2020-04-19 04:48:14 posts     StackExchange.Gaming                  2020-04-19 04:46:57 posts     StackExchange.Stats                   2020-04-19 04:40:08 posts     StackExchange.Meta                    2020-04-19 04:36:48 posts     StackExchange.English                 2020-04-19 04:34:46 comments  StackExchange.Math                    2020-04-19 04:32:38 comments  StackExchange.Tex                     2020-04-19 04:25:59 posts     StackExchange.Math                    2020-04-19 04:22:14 posts     StackExchange.Tex                     2020-04-19 04:19:32 comments  StackExchange.Unix                    2020-04-19 04:17:12 comments  StackExchange.English                 2020-04-19 04:15:42 posts     StackExchange.Unix                    2020-04-19 04:15:31 posts     StackExchange.Gis                     2020-04-19 04:14:44 posts     StackExchange.Electronics             2020-04-19 04:11:13 comments  ...   Sorting by date doesn't make it obvious to me where the refresh died/stopped, but hopefully this post alerts the correct people.


Jedi have understudies called Padawans. What is the Sith equivalent of a Padawan?


Nondeterministic functions in sql partitioning functions

How are non-deterministic functions used in SQL partitioning functions and are they useful?


What happens if you do sudo passwd without specifying a user?

I wanted to change my own password (as an admin) so I did the following command:  sudo passwd   and then it prompted for a password but when I tryed to relog, my password was not changed. I'm now wondering what password did I changed since it did prompted me to enter a password but I'm not sure what password did it changed exactly.  I know that if I do sudo passwd <MY_USER> it works, I'm just wondering without a user what happens.  Thank you


I have Ubuntu 10.04 on my computer, with Windows 7 next to it. Instead of upgrading to 10.10, I feel like doing a clean install. However, I don't want to erase my Windows, even though I barely ever use it. My question is: how would I remove Ubuntu 10.04 from my drive and install Ubuntu 10.10 in place, without losing any space or anything, or losing Windows 7?


How can the charging time of a cell phone battery be calculated?

Suppose I have a 20 AmpHour battery at 4V (as in, the actual capacity of the battery is 80 Watt hours). And I'm using a 10V 2A charger to charge it (this is a 20 Watt charger). How can the charge time be calculated?  Is it 4 hours?  Note: The charge time is definitely not 20Ah/2A = 20h as a lot of people state, since these numbers are close to the actual values for most fast-charging smartphones today, and the charge time should be of the order of 1 hr).  Note 2: Please explain using the fundamentals of physics, instead of obscure formulae.  Since the charger is at 10V and the battery is at 4V, how does this affect the charging?


Calling Macro from inside Macro - Error Compile Error: Expected variable or procedure, not module - Private Sub App

I have been copying code moslty to work on and learn macro's in Word. I have got it working where I can get a MsgBox to appear before printing, but I would like it to call another module/macro to compartmentalize the modules.  For testing, this works:  Private Sub App_DocumentBeforePrint(ByVal Doc As Document, Cancel As Boolean) MsgBox "Before Print" End Sub   But if I do:  Private Sub App_DocumentBeforePrint(ByVal Doc As Document, Cancel As Boolean) Call Greeting End Sub   Which is a working macro that I have which simple opens a MsgBox and says "Greetings", I get the following error:  Compile Error: Expected variable or procedure, not module   How can I call another Macro inside this Private Sub App*?


Can we have Data Explorer send you back to the page you were on after logging in?

If you log in to Stack Exchange from any page (as far as I know) on https://stackexchange.com or any sites like https://scifi.stackexchange.com, the URL looks something like this and redirects to the page you clicked the log in button on after you log in:     1   However, on Data Explorer, which likes to log me out, there is no such method (I use "Log in using Stack Exchange" and when you log in it kicks you back to the homepage.  Can we get some sort of system so that when you log in to Data Explorer, you go back to the page you were on?  1if I were sent there by a button, returnurl would actually display as (in Firefox) as https%3a%2f%2fscifi.stackexchange.com%2f. I changed it for clarity when reading the question.


Through a random point inside the circle, we draw $4$ lines with $45$ degrees between each other. Prove, that the total area of odd pieces, equals total area of even pieces.    I suppose there is a solution using integrals, but maybe there is geometric solution as well.


How did Gwen come to this universe even before the portal was open?

So as we all know Gwen came into the picture even before the portal was open in Spider-Man: Into the Spider-Verse, while other Spidermen came into the current universe after the portal was open and the main Spiderman died.  How did that happen? Did Wilson Fisk open the portal before that fight as well?


I would like to create a XeLaTeX layout where  multicol's columns (two in this case, no figures, text only) are tilted where they meet. The lines still should be ordinary lines below each other, but the start/end points of each line should glide a bit each line for it to look something like this:  xxxxxxxxxx  xxxx xxxxxxxxxx  xxxx xxxxxxxxx  xxxxx xxxxxxxxx  xxxxx SECTION   xxxxxx xxxxxxxx  xxxxxx xxxxxxx  xxxxxxx xxxxxxx  xxxxxxx xxxxxx  xxxxxxxx xxxxxx  xxxxxxxx xxxxx  xxxxxxxxx xxxxx  xxxxxxxxx xxxx  SUBSECTION xxxx  xxxxxxxxxx   So not the whole column is tilted, but one gets narrower while the other one gets wider.  I've seen examples using \parshape, but those I found are based that one counts lines and more or less manually defines the shape. I also would need that LaTeX keeps the multicol functionality (page breaks, text flow, ...) and does this automatically on each page for a longer chapter.  How do I create such a layout? If multicol is not easy to mix with this layout, what would be an alternative?


No solution to "Bone Heat Weighting: failed to find solution for one or more bones" blender 2.8

I have this issue but not found any solution working for me. I am new to blender and modelling, and I am aware that my model is far from perfect. But my armature is quite simple. I have tried to clean the mesh, remove some wrong faces...but I still have the issue when parenting...Thank you for any idea !


Lost all the data after installing Ubuntu 12.10

I installed Ubuntu 12.10 on my Laptop. While installing two options were available:   Install Ubuntu alongside Windows 7 Replace windows 7   My Laptop had 3 drives. Windows 7 was installed on C: drive and there was data on other two drives. I chose option to Replace Windows 7.  But now in Ubuntu, there is only one drive. Its size is approximately equals the hard-disk size and it is almost free, so it seems like all the data is lost.  Could anyone please help me on this? Would it be possible to recover the lost data?


How do I get the key values from $_POST?

echo $_POST["name"]; //returns the value a user typed into the "name" field   I would like to be able to also return the text of the key. In this example, I want to return the text "name". Can I do this?


Operation of ` with echo when trying to awk

How come     echo `echo "foo"`   works but    echo `awk '{ print "foo" }'`   doesn't?


How to properly use (s) and syntax for one or many nouns in a sentence

Where can I find informative material detailing how to properly use (s) and syntax for accounting for one or many nouns in a sentence?  Example:  If there was freezing weather, the heated enclosure(s) for the dry, preaction, and/or deluge valve(s) were/was checked to make sure it/they was/were adequately heated.  If it is one enclosure and one valve, then this makes sense: If there was freezing weather, the heated enclosure for the dry, preaction, and/or deluge valve was checked to make sure it was adequately heated.  If it is more than one valve and more than one enclosure, then this makes sense: If there was freezing weather, the heated enclosures for the dry, preaction, and/or deluge valves were checked to make sure they were adequately heated.  If it is more than one valve, and only one enclosure, then this makes sense: If there was freezing weather, the heated enclosure for the dry, preaction, and/or deluge valves were checked to make sure they were adequately heated.  I'm looking for a robust way to handle all scenarios in one sentence.


On Ubuntu 19.04 and all its official flavors I observed that if I boot the LiveUSB in UEFI mode, there are options for live session and installation with safe graphics written beside them. However these options aren't available in legacy mode.    So, what is the purpose of this safe graphics mode? Is there any specific reason why they included in 19.04 and not on previous releases such as 16.04, 18.04 and 18.10?


What happens when calling this non-existent constructor?

When compiling this c++ code, I get an error on the last line.  #include <iostream>  class TestClass {  public:     TestClass(int val)          : value(val)     {     }      int getValue()     {         return value;     }  private:     int value;  };  int main() {     TestClass b();     std::cout << b.getValue() << std::endl;      }   The compiler (gcc on Ubuntu 14.04) complains:  error: "request for member ‘getValue’ in ‘b’, which is of non-class type ‘TestClass()’"   Now my question is: What exactly does b contain? The compiler doesn't complain about TestClass b().


QuickStart basic layout/template for web development?

I'm looking for a quick start or template, or something, to get a web site's basic layout done quickly and looking fairly professional, and then let me do the coding.  I don't want a CMS, as this is for a highly customised reporting application, but I need something like frame header and two columns and frame footer.  I can design the pretty reports for the wide right hand column myself, as the left hand column menu.


I want to ensure that my program can only be run by user xyz using root privilege. To do this, I set the setuid bit with:  chmod u+s program1.sh ls -l program1.sh rwsr-x--- 1 root house 1299 May 15 23:54 program1.sh   Also, I added user xyz to the house group so that only xyz and root can run program1.sh.  In program1.sh there is  id -u   so that it can show me the effective ID.  Running program1.sh as root, it shows root. But running with the xyz account, it shows xyz. It seems that it didn't run with root privilege. I don't know what's wrong here.


I am writing a command which is given below.  if ["$avg" -ge "80"]; then echo "PASS" else echo "FAIL"   I am getting an error like:   x.0000000000000000 integer expression expected  and the result of if -else statement is always wrong.   Pls help and suggest necessary changes.


How to convert a javascript object with methods to JSON and back to object with methods?

I've tried for a couple hours to convert the following object to JSON string:  car = {      go : function(){         alert('accelerating');     }  }   When I convert using JSON.stringify(car), it returns {}, because methods won't work with json strings. So I thought there must be some sort of hack for that.  My question is: What is the quickest way to transform this object into a string and then back to an object, keeping its methods?


Why must $v$ be $< c$ in the Lorentz transformations? Do these equations not apply to light?

I was trying to understand how things look from the perspective of light. Looking at the Lorentz transformations, it seems that the universe would contract along the direction of movement into a plane, and time would stop. But I have heard that these equations cannot be applied to light speed, when $v=c$.  Why don't the Lorentz transformations apply when $v=c$?


steel pipe with solid core rod resistance to bending

What I wanted to ask is would a piece of solid stock inside a pipe increase the ability to resist bending ? putting together the strength of tubular steel pipe with a solid core rod.


Gerunds:Having+past participle and being+past participle

Here are two sentences:     My having been to South-Korea helped me learn the languages when I took the classes.      Being accepted to Harvard university was the greatest day of my life.   Is it common or natural way to write such 'having+past participle' and being+past participle construction in formal writing? Or should I use the other alternatives for these? Are these construction encouraged in writing? And What about in spoken English? Thanks.  source


What is this rhetorical scheme or literary device called?

I can't recall the name of the rhetorical scheme or literary device involved with using the same word more than once within the same sentence but with different meanings:  "The only thing we have to fear is fear itself."    fear - verb fear - noun   "Turn right right here."   right - adv. directional right - adv. in this place   "My feet are but feet away."   feet - noun lower appendage feet - noun distance


TeXstudio not large enough to use on a 4k display

Using TeXstudio, the icons and menus are almost invisible on my 4k display (3840 x 2160 pixels, 28").  Is it possible to adjust the graphics so that TeXstudio could be usable on my 4k display?


How to fix null error in getWidth() on bitmap

In my application i want to select image from gallery and compress it. For compress i use this library :   I wrote below codes for it, but when i run the application and select image from gallery, it throws force close  and show below errors in logCat :   My activity codes :       @Override     public void onActivityResult(int requestCode, int resultCode, Intent data) {         super.onActivityResult(requestCode, resultCode, data);         if (resultCode == RESULT_OK) {             if (requestCode == REQUEST_TAKE_PHOTO || requestCode == REQUEST_PICK_PHOTO) {                 if (data != null) {                     // Get the Image from data                     Uri selectedImage = data.getData();                     String[] filePathColumn = {MediaStore.Images.Media.DATA};                      Cursor cursor = getActivity().getContentResolver().query(selectedImage, filePathColumn, null, null, null);                     assert cursor != null;                     cursor.moveToFirst();                      int columnIndex = cursor.getColumnIndex(filePathColumn[0]);                     mediaPath = cursor.getString(columnIndex);                     cursor.close();                      postPath = mediaPath;                     uploadImageToServer(postPath);                 }              }         } else if (resultCode != RESULT_CANCELED) {         }     } }     private void uploadImageToServer(String imagePath) {         if (imagePath == null || imagePath.equals("")) {             return;         } else {             showpDialog();             Map<String, RequestBody> map = new HashMap<>();             File file = new File(imagePath);             try {                 compressedImage = new Compressor(getActivity())                         .setMaxWidth(2000)                         .setMaxHeight(1400)                         .setQuality(90)                         .setCompressFormat(Bitmap.CompressFormat.JPEG)                         .setDestinationDirectoryPath(Environment.getExternalStoragePublicDirectory(                                 Environment.DIRECTORY_PICTURES).getAbsolutePath())                         .compressToFile(file);             } catch (IOException e) {                 e.printStackTrace();             } }   LogCat error :   Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference                                                                        at id.zelory.compressor.ImageUtil.decodeSampledBitmapFromFile(ImageUtil.java:70)                                                                        at id.zelory.compressor.ImageUtil.compressImage(ImageUtil.java:33)                                                                        at id.zelory.compressor.Compressor.compressToFile(Compressor.java:60)                                                                        at id.zelory.compressor.Compressor.compressToFile(Compressor.java:56)                                                                        at com.app.android.Fragments.NewAddressFragment.uploadImageToServer(NewAddressFragment.java:486)                                                                        at com.app.android.Fragments.NewAddressFragment.onActivityResult(NewAddressFragment.java:353)                                                                        at android.support.v4.app.FragmentActivity.onActivityResult(FragmentActivity.java:156)                                                                        at android.app.Activity.dispatchActivityResult(Activity.java:7295)   Show error for this line : .compressToFile(file);  UPDATE : show this error just for some images no all images! How can i fix it? please help me


I use Ubuntu on desktops and laptops and am making a custom script to set things up for my school. I just discovered  to improve power comsumption for the laptops and want to include it in my script. Most of what I hear is great.  and  seem to recommend it. Yet, it is not included with any version or derivative of Ubuntu that I know of. , but Ubuntu requires adding a third party PPA. So, this leads me to believe that is has enough issues or is too new to include by default or even in the default repositories.    Am I asking for trouble by installing it on desktop hardware, or will it just stay in the AC mode and have no effect? Will I likely see any kernel freezing or instability with Ubuntu 12.04 and TLP? Has anyone had any cause to remove TLP?


Why is gravity viewed as a curvature of spacetime and not the electromagnetic force?

There are four known forces in the universe. Two of these forces are the force of gravity and the force of electromagnetism. The first is the result of the mass of the object that has the gravity. The second is the result of charge in both the affected particle as well as the particles that generated the electrical and magnetic fields. Since both forces operate over spacetime why isn't there a model that common to both?


Write an entire function in terms of 2 entire functions

This question was asked in complex analysis end term of previous year and I am trying to solve it to gain some experience. I need help with following question:  If f and g are entire functions with no common zeroes and if h is an entire function show that h can  be always written as h=fF+gG.with some entire functions F and G.  I am completely stumped on which theorem should I use to solve it as this question seems very hard for me and I am unable to get any intuition. Also, not much assignments  were given to us by course instructor due to Covid-19 and so it's a problem as I am often blank on how to approach some questions. Entire functions are functions which are holomorohic on all of $\mathbb{C} $ . Kindly shed some light on solution of this problem.


Is there a way to compress files at different compression levels inside a single 7zip file?

Some files are compressed using their own compression scheme and some aren't.  If I try Max compression on an already compressed file, I'll get 1%-2% better compression at most.  The amount of time wasted compressing those files are worthless.  I want 7zip to use the Store or Fast level of compression instead of Max for those already compressed files, while using Max on the uncompressed files.  I can do this if I go into the directory and make 2 different 7z files for multiple different kinds of file types stored in that folder.  But is there a way to store these differently compressed files inside the same 7zip file?  The files that aren't already compressed will be compressed and the ones that are will just be stored.  Has anybody found a way to do that?


What to do if my LSTM model doesn't learn

I have taken text input then converted to a sequence of values and fed it to LSTM model where my loss is not reducing and accuracy is abnormal.  The above image is about training and validation accuracy. Here I have taken 10 epochs but even for 100 epochs or 1000 epochs the graph is similar.  The above image is about training and validation loss, there is no change in it. No reduction in loss. How can I make my model learn. The considered learning rate is 0.05 Model Architecture is model = tf.keras.Sequential([tf.keras.layers.Embedding(vocab_size, embedding_dim),tf.keras.layers.Bidirectional(tf.keras.layers.LSTM(embedding_dim,dropout=0.3)),tf.keras.layers.Dense(embedding_dim, activation='relu'), tf.keras.layers.Dense(2, activation='softmax')])


Given a sequence of bounded fractions, what the range of the sum of their numerators divided by the sum of their denominators?

If  $$ \frac{b_1}{a_1}, \frac{b_2}{a_2}, \dots, \frac{b_n}{a_n} $$ lies within $[\alpha, \beta]$, does $\frac{\sum_{i=1}^nb_i}{\sum_{i=1}^na_i}$ lies within the same range? (Given that $\sum_{i=1}^na_i \neq 0$.) If the answer is no, what about the situation that $a_n\gt 0$?


where is the mistake with my fake proof?


How to serialize DateTimeOffset propety to (UTC) milliseconds using Newtonsoft.Json?

Please note that this is not about time conversion, but about converting JSON/C# types  I am need serialize and deserialize an object with a property DateTimeOffset but her value need be in milliseconds format when serialized; when deserialize, convert it to DateTimeOffset again. I came to this point:  public class JsonDateTimeOffsetAndMillisecondsConverter: JsonConverter {     public override bool CanConvert(Type objectType)     {         return objectType == typeof(DateTime);     }      public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)     {         var t = long.Parse((string)reader.Value);         return new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddMilliseconds(t);     }      public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)     {         // How to write in json the datetime property as milliseconds?        } }   But I not know how to serialize in milliseconds now. Can someone help me?


Find source of mysterious ring tone sound on computer

My computer is currently ringing like a telephone. It's like there is a telephone ringing! No programs that should be doing this are open. How can I determine what is causing the ringing?!


So, this is my second D&D campaign as a dungeon master and I wanted to try it with more than 3 people. I told 5 other people that they could join in and we will start in a month.   However, I’ve read that over 5 people will create complications. Should I try it with 8 people, if so then how?   If not, I’ll just do 5. I know this is more of a personal problem question, but in the name of D&D I need some help please.


I'am solving Euler's project and right now triyn to solve 9 task.  The solution I've found is in 3 nested loops:  for ai in range(1, 100):    for bi in range(1, 100):       for ci in range(1,100):           if ai + bi + ci == 25 and ai * ai = ci:              break   but when last if find the solution for-loops continues and I wanna break all of them.  Is it posible? I thougt about using some flags but it's additional check for each step and makes execution longer.


Java relative performance of math operators

Hi does anyone have any references on the relative performance/cost of Java math operators?   Ideally something like in Code Complete 2 (which I don't have on hand right now)  where it might look something like this:   addition: 1 subtraction: 2 multiplication: 10 division: 100 logarithm: 600 exponent: 500   Thanks.


How can you render a lightning bolt using Cycles?


Software center says: "check your internet connection" but I do have a connection

I am running ubuntu 14.04 on an Acer aspire netbook all was going well until the latest updates. Now my wireless connection is very unstable and I have just gone to download K3b writing software from the ubuntu software centre and i keep getting an error saying   Failed to download package files  check your internet connection  Failed to fetch http://gb.archive.ubuntu.com/ubuntu/pool/universe/libq/libqapt/libqapt2_2.1.70-0ubuntu4.1_i386.deb 404  Not Found [IP: 91.189.92.200 80] Failed to fetch http://gb.archive.ubuntu.com/ubuntu/pool/universe/libq/libqapt/libqapt2-runtime_2.1.70-0ubuntu4.1_i386.deb 404  Not Found [IP: 91.189.92.200 80] Failed to fetch http://gb.archive.ubuntu.com/ubuntu/pool/universe/libq/libqapt/qapt-batch_2.1.70-0ubuntu4.1_i386.deb 404  Not Found [IP: 91.189.92.200 80]   I clearly have an internet connection  thanks in advance


Unity 17.04 Desktop Launcher problem for PyCharm

I have just installed the final 17.04 Release.  Having problems with the Unity Launcher (not Dash, don't use that), compared to what has always worked in 16.04 & 14.04.  [To create a shortcut on Launcher I always run the program first from the shell, then when it's running I right-click its icon in Launcher and Lock to Launcher: if that is not the right way to do things let me know.]  Installed PyCharm (2017.1.1) via tar image from JetBrains.  When running I Lock to Launcher its icon as usual.  But when I exit PyCharm the icon is removed from Launcher (no other app behaves like this)?  EDIT in response to @Videonauth's comment:  From Unity Dash "pycharm" does not find any matching application.  It is "installed" by untaring into /usr/share and I did a ln -s ../share/pycharm/pycharm-community-2017.1.1/bin/pycharm.sh /usr/bin/pycharm, as I did in 16.04.  However, I see in my 16.04 that Dash does find "pycharm", and shows its icon (then again, it's already locked to Launcher, if that makes a difference).  OTOH, under 16.04 I initially did some kind of "Ubuntu install" of PyCharm.  I had problems (can't recall what, may well have been to do with unable to then get updates), and was advised to remove that and do by manual untar method; but it might have left something around to be found from dash, I don't know.  So: What is the relevance of whether it is found in Dash/what do I have to do?  And the fact that you ask that and talk about locking it from there, are you saying that my method of running an app from terminal and locking it while running is not a good idea?  OK, I have just found .  I must look at that....


How to assign page number of label to hyperlink

I'm quite new with Overleaf and I have following problem: I want to make clickable table of contents to my thesis. It turned out that package hyperref works only with numbered chapters and sections. I still have some unnumbered chapters like abstract, foreword and introduction and I want to add them manually to toc.   So I decided to use the implementation where I try to figure out for example the page number of abstract with \pageref command, when there is created label inside of abstract with \label command.  Here is the example code:  \begin{abstract} \label{hyp:abstract}  Some text...  \end{abstract}   .sty file  . . . \addtocontents{toc}{\protect\contentsline{chapter}{ABSTRACT}{}{page.\pageref{hyp:abstract}} } . . .   Edit: These chapters abstract, foreword and introduction are not exactly chapters but headers and own similar kind of structures compared to \chapter.  I have tried several ways of implemented this but always get hundreds of errors and I have no clue what is the proper way to do it. Thanks in advance!


Decimal representation of $2^n$ starting digits

Prove that for any finite sequence of decimal digits, there exists an $n$ such that the decimal expansion of $2^𝑛$ begins with these digits.  I want to solve this by circle rotations, I found some hints that say that $log_{10} 2$ is an irrational number so the rotation in $S^1$ by this angle implies that every point has a dense orbit, but Im not able to understand why you need the angle of rotation equals to $log_{10} 2$ to conclude for a fixed sequence of finite numbers there exist a $n$ such that the first digits of $2^n$ are this sequence. I need some help to understand the problem and why the hint is useful (despite that $log_{10} 2$ is irrational) Thanks


Rocket propelled by a giant monochromatic laser

I am preparing for my quals and stumbled across the following problem, and although it only requires undergraduate-level physics, I feel I can't piece everything together.  "A rocket of mass $m_0$ is propelled by a giant monochromatic laser mounted on the back of the rocket. The laser emits a beam with a power of $P_0$ watts and a frequency $f_0$, both measured in the rest frame of the rocket. When the beam is turned on, the rocket is driven in the opposite direction by the recoil.  (a) At $t=0$, the laser is turned on, with the rocket's velocity initially at rest in the Earth's reference frame. Calculate the instantaneous acceleration of the rocket.  (b) If the rocket is moving at velocity $v$, what is the instantaneous beam power as measured in the Earth's reference frame?   (c) The laser is kept going until the speed of the rocket reaches $v=0.9c$. What is the rest mass of the rocket at this point?"  I work in units where $c=1$. For (a), in the Earth's reference frame, I get a momentum $p(t) = \gamma m_0 v + h f$, where $\gamma = \frac{1}{\sqrt{1-v^2}}$ and $f = f_0 \sqrt{\frac{1-v}{1+v}}$ because of the Doppler shift in frequency as the rocket travels further away. Differentiating w.r.t time, I get  $$ \frac{dp}{dt} = \gamma^3 m_0 a - \frac{\gamma a}{(1+v)} h f_0 $$  This is as far as I get. Equaling $dp/dt=0$ for conservation of momentum make the $a$ cancel out, and there isn't any other time dependency to differentiate $v(t)$.  For part (b), we can say that in the frame of the rocket, $P_0 = r h f_0$, where $r$ is the rate of emission of photons. In the frame of the Earth, we can therefore write   $$ P(t) = \frac{dE}{dt} = \frac{d}{dt} \left( \gamma m_0 + r h f \right) = m_0 \gamma^3 v a - \frac{\gamma a}{(1+v)}  P_0 $$  but since I don't have $a$, there's not much I can do. Also, I am not sure if $r$ needs to be corrected with a proper time factor when we boost between frames.  Also, for part (c), my first intuition was to say that the rest mass was $m_0$, but now I am thinking that the rocket's total mass decreases because we need to account for the energy lost from the laser. I am slightly confused as to what I need to take into account.


Disprove or prove using delta-epsilon definition of limit that $\lim_{(x,y) \to (0,0)}{\frac{x^3-y^3}{x^2-y^2}} = 0$

I want to prove if the following limit exists, using epsilon-delta definition, or prove it doesn't exist:$$\lim_{(x,y) \to (0,0)}{\frac{x^3-y^3}{x^2-y^2}} = 0$$  My attempt:  First I proved some directional limits, like for $y=mx$ , and $y=ax^n$, and for all of them I got 0. So I conjectured that this limit exists and it's 0. Then I have to prove: $$\forall \delta \gt 0 : \exists \epsilon \gt 0 : \|(x,y)\| \lt \epsilon \rightarrow \left| \frac{x^3-y^3}{x^2-y^2}\right| \lt \delta$$  First I noted that $\frac{x^3-y^3}{x^2-y^2} = \frac{(x^2+xy+y^2)(x-y)}{(x+y)(x-y)} = \frac{x^2+xy+y^2}{x+y}$.  Then I did $\left|\frac{x^2+xy+y^2}{x+y}\right| \leq \left|\frac{x(x+y)}{x+y}\right|+\frac{y^2}{\vert x+y\vert} = \vert x \vert + \frac{y^2}{\vert x+y\vert}$  Using $\|(x,y)\| = \vert x\vert + \vert y\vert$ and assuming  $\|(x,y)\| \lt \epsilon$  $\vert x\vert + \vert y\vert  = \vert x \vert + \frac{ y^2}{\vert y \vert} \geq \vert x \vert+\frac{y^2}{\vert y\vert+\vert x\vert}$  but I can't continue from that since $\vert x + y \vert \leq \vert x \vert + \vert y \vert$ .  I don't know what else to try.


Can I answer my own question by citing a comment?

The best answer on one of my questions is in the comment section. I don't want to bother the commenter by asking for a formal answer so that I can give it the love (upvote and accept) that it deserves. Is it acceptable to answer my own question with a summary of the comment, maybe providing additional insight? (I did this , just now).


Cant boot OS from USB/DVD after deleting linux partition

After trying in google for almost 2 days I came here to post this.  I had Windows and linux in my hard disk. I tried to format linux but mistakenly deleted the partition. It got hung and forcefully restarted it. Then while system startup      grub rescue   cmd prompt is coming.   I tried to use bootable USB with Windows and linux (one at a time) to repair/boot from it but getting stuck at initial stage itself and not going to the partition phase.  I googled and tried a lot no. of ways of how to use grub rescue to find the boot partition and boot but no solution. My initrd.img is missing for errorneously deleting the partition.  What can I do right now? I just want to get inside, format and install any OS.  Thanks in advance.  Edit : Solutions that are present in other sites includes using windows recovery cd or boot repair cd etc. but these things works only when your CD/USB gets booted in your PC, that is happening in my case. Whenever I try to use a bootable CD/USB to repair/format, but it is getting stuck in initial phase itself. It does not reach the screens where you get options.


Is it possible to circumvent the limits of a 90 day Schengen visa by re-entering using a different passport? (I have more than 1)

I understand the limitations of the Schengen visitor's visa - I can stay no more than 90 days with the past 180. My question is, can I leave the area and return on a different passport and begin a new 90 day visa? The passports I have are US, Canadian and British. Like other's, I'm bummed that my British passport no longer affords me the right to visit the Schengen area for as long as I wish. Thank you for your responses.


If $X$ follows a Binomial distribution with parameters $n$ and $p$, what can we say on the distribution of $n\choose x$ and $x\choose n$ ? ($x$ is realization of $X$).


Why $\text{GL}_2(\mathbb{C})$ is connected?  I know this question answered several times here, but I don't want to jump directly into a rigorous proof, rather I am looking for an intuitive view.


Are there any image badges like those on  for Careers.SO?         I would like to add a nice image to my website profile.


I've read about this in so many web sites but none of them explicitly states the difference between URI and URL.  what are the specific differences? and can somebody give me examples for both URI and URL ..


Looking for search-engine with flexible dates and single airline operated for layovers.

I have been looking for a search-engine which can do the following route India to Montreal (Montréal–Pierre Elliott Trudeau International Airport - YUL) . I had been trying to have the following functionality in the search-engine -  a. Give the best prices for the month, let's say Departure in December 2016 and arrival in January 2016 (dates are/can be somewhat flexi) although my travelling dates are somewhat different.    b. Costs should be in INR   c. Both the flights should be preferably operated by the same carrier.   d. some sort of price graph to have some sort of historical data.   I tried three servics, azair of US, akbartravels.net  and couple of other search-engine sites but neither of them were fulfilling all the obligations.


For some reason this throws a PDOException.  $stmt = $db->prepare('DELETE FROM ?'); $stmt->execute([$table]);   The error I get is "General error: 1 near "?": syntax error". I echoed $table right before prepare and it shows an existing table name.  I initialized $db like this.   $db = new PDO("sqlite:my.db");  $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);  $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 1);   I'm using PHP 5.4.4.


Biblatex not showing with biber + apa style...help me, please.  \documentclass[a4paper,12pt]{report} \usepackage[utf8]{vietnam} \usepackage{filecontents} \begin{filecontents*}{mybib.bib} @BOOK{RonCal11th,   author =       {{Ron Larson}{, Bruce Edwards}},   title =        {Calculus},   publisher =    {Cengage Learning},   year =         {2018},   edition =      {11th},   keywords =     {english}, }  @BOOK{NBK2015,   author =       {Nguyễn Bá Kim},   title =        {Phương pháp dạy học môn Toán},   publisher =    {Nhà xuất bản Đại học Sư Phạm},   year =         {2015},   keywords =     {vietnam}, } \end{filecontents*} \usepackage[backend=biber,style=apa,]{biblatex} \addbibresource{mybib.bib} \begin{document} \printbibliography[heading=subbibliography,keyword={vietnam},title={Tiếng Việt}] \printbibliography[heading=subbibliography,keyword={english},title={Tiếng Anh}] \end{document}


I checked this  and this  - it is good, but it requires sudo rights.  I need that this command may be performed by any user, for this reason I am using next command   ps -ef | grep sshd: | grep -v grep   and getting following result:  [owner@localhost ~]$ ps -ef | grep sshd: | grep -v grep root      3175  2217  0 15:09 ?        00:00:00 sshd: [accepted] //Here just oppened putyy from windows pc sshd      3177  3175  0 15:09 ?        00:00:00 sshd: [net]      //same as above root      8062  2217  0 12:34 ?        00:00:00 sshd: root@pts/8  root     24241  2217  0 13:37 ?        00:00:00 sshd: root@pts/10 root     31515  2217  0 14:38 ?        00:00:00 sshd: owner [priv] //non-root user connected 503      31567 31515  0 14:38 ?        00:00:00 sshd: owner@pts/12 //the same as above line   How to filter out only real connections? What are the meaning of keywords "priv", "accepted", "net"?  P.S. I need to do it without sudo rights.


How do I refresh the review queue to clear non-existent reviews?

I'm a moderator at Robotics, and I have a persistent indicator for questions in my review queue, despite the fact that there aren't any.   I can open an incognito tab and log in, I can open in Internet Explorer, I hit F5 - nothing will get those numbers to go away. It's been 4 for a while now, but that number is prone to change on a seemingly random basis. It's frustrating for me because I tend to ignore it completely since it doesn't indicate correctly, and then posts go by without attention.   I posted this question on  a while back. Previously I could get the number to go away eventually by logging completely out and then back in, but that doesn't clear it any more.   Is there something else that I'm supposed to be doing? This problem isn't the end of the world, but it's the only nagging grievance I have about the site and I'd like to get it resolved.   Screencap:    EDIT  Regarding the  already asked, the only answer states,     "[S]omeone needs to keep an eye on things to make sure stuff is actually getting done."   How do I know what "stuff" needs to get done when the number doesn't appear to mean anything?     "If that number is high or growing, then there's a problem."   What is the problem? How do I know what to do? What does the number mean?  That question links to a  as related, where the OP says, "This should be something that you can get to 0 every day."   In comment to the accepted answer to that question, moderator Shog9 says,      "this is everything in review, even stuff that you, personally, can't review. Super-expensive to personalize this - so the alternative is simply not having an indicator. Think of it as... A reminder to encourage your peers to review."   There's no built-in direct/private message system, so how exactly are we supposed to "encourage" our peers to review?  Further, I'm not just a super-user, I'm a moderator. It was frustrating when I had access to all of the tools, but now I'm a moderator and there's still stuff I'm not allowed to see?   So, to refine/distinguish this question and separate it from the others:  What am I supposed to do about the review number when all of the queues are empty for me?  (This is really just a rephrasing of my original question - the only thing with a question mark, that says, "Is there something else that I'm supposed to be doing?")


Using a comma before “which”, and whether to use “which” or “that”

I have two sentences in my personal statement which I am not sure about.  Additionally, it will expose me to multiple cultures which will enhance my patient interaction and networking skills, and allow me to become an effective leader. Also, I would like to establish a research center that will conduct research on different aspects of clinical pharmacy which will improve the healthcare system in my country and make Egypt a leader in healthcare services.  I am not sure if I am using “which” and “that” right or not and whether to put comma before which or just leave it like that.


How does an ARM MCU run faster than the external crystal?

So before this I only worked with simple 8 bit Atmel MCUs and I realized on my development board schematics it has only a 12Mhz crystal, yet the MCU operates at  up to 100MHz. (I think the default is 80MHz. I only made it higher once for fun. It's just a simple line in the code.)  How does it do that? Why does an Atmega328, for example, run at the used crystal speed?


When I log into my Ubuntu terminal tty1, I get a message failed to connect to http://changelogs.ubuntu.com/meta-release  I try various things, then I get an error message telling me could not resolve us.archive.ubuntu.com  If I ping us.archive.ubuntu.com -c 4: ping: archive.ubuntu.com: name  or service not known  And the same message for sudo apt-get update. I did not set any proxy; I left it blank during install. My internet connectivity is apparently disabled and I could not configure it. I tried rebooting but nothing changed.


What kind of insect is this found in North America in April?

I noticed this small insect that probably measured 5 mm in length on my coat lapel. Not sure whether or not it had been inside or landed outside on my coat. Photos were taken in Nashville, Tennessee, USA in April. It was alone and I have never seen an insect like this one before. Just trying to figure out whether this bug is harmless or something that could be a problem. . Here is another photo taken of the same insect.


Let $T\in\mathcal L(V)$. Show that if $T^n=0$ then $I-T$ is invertible

Let $T\in\mathcal L(V)$. Show that if $T^n=0$, for some $n\in\Bbb N_{>0}$, then $I-T$ is invertible.   I can show that the above is true whenever $\dim V<\infty$, but I dont know how to prove it if $\dim V=\infty$. I dont know where start because nearly all my knowledge of linear algebra is based on finite dimensional spaces.  I though a sketch for a proof by contradiction, assuming that $I-T$ is not invertible but $T^{n-1}\neq 0$ and $T^n=0$ for some $n\in\Bbb N_{>0}$, but I dont know what to do from here because $I-T$ not being invertible doesnt necessarily means that $I-T$ is not bijective (I was thinking to try to reduce the problem to show that $I-T$ is bijective), it can be the case that $I-T$ is bijective but discontinuous, hence not invertible.  Maybe the exercise would need to add that $V$ is finite dimensional, but this is not stated so I assumed that I must show that the statement is true also when $\dim V=\infty$.  Some help will be appreciated, thank you.


Giving the formula of a line through points in projective geometry

I'm having some trouble with giving the formula through 2 (or more) points in projective geometry.  For example I have P=(1:0:0), and Q=(1:1:1).  How do I find a formula of a line through these points?  I thought I had to use $ax_0+bx_1+cx_2=0$, but then you get a line  L=   {$(x_0,x_1,x_2)|x_1=x_2=x_3=0$} ?  Or for two points with for example $P=(1:0:0)$ and $Q=(m_1,m_2,m_3)$? Would that be $(1,x,x)$?


Kernel of homomorphism $f(x)=e^{2\pi ix}$

The book I am reading is giving an example of the first isomorphism theorem for groups. It says to consider the homomorphism $f:(\mathbb{R},+)\to(\mathbb{C}^{\times},\times)$ defined by $f(x)=e^{2\pi ix}$. It claims that the kernel of $f$ is $\mathbb{Z}$, but there's something that bothers me.  I thought: How come we don't just write $f(x)=e^{2\pi ix}$ as $f(x)=(e^{2\pi i})^{x}=1^{x}=1$? Then the kernel would be $\mathbb{R}$, wouldn't it?  Well, I do see that if $x=\frac{1}{2}$, for example, then $f(x)=e^{\pi i}=-1$, so not every real number is sent to 1. But I can't figure out what is making this inconsistency.  Am I misunderstanding the identity $e^{2\pi i}=1$? (The way I was taught that was by first writing out the series for cosine and sine.) Sorry if this is a really dumb question, I just couldn't figure out what was going wrong.


Is there a way to   \footcite{key}   or  \fullfootcite{key}   such that in the text there are no upper index numbers but numbers enclosed in brackets? Correspondingly, the footnote citation should begin with (e.g.)  [1]   and not with an upper index number.


Indicate if a new contributor is new to Stack Exchange, or new to the current Stack

I just came across a question by a new contributor to a Stack (in this case, ), as indicated by the new contributor indicator. Since it was an ID request, I launched into a comment linking to  and was about to invite them on the [tour], when I checked their network accounts and found that they had 17k+ rep on Stack Overflow.  Now I know that not everyone will welcome new contributors like that, but still, it would be useful to have an indication if a new contributor is new to Stack Exchange and may not even realise they can edit their own posts (yes, I've encountered those; self-answering just to add new information), or merely new to the current Stack and may only need a couple of pointers on topicality and tagging conventions. Likewise, someone may be a regular on the main Stack, but new to meta.  So please, expand the new contributor indicator to indicate if a user is new to the current Stack, new to the current Meta, new to Meta in general, or new to the Stack Exchange Network.    I realise that a reputation of 101 may indicate a user having received the association bonus, so they may have some experience elsewhere on the Stack Exchange Network. However, that doesn't tell me if they're 200+ on their highest reputation account, or 20k+. The former may still need some help using basic features while the latter doesn't.    I came across a request to . That sounds useful as well, so I've edited my question to incorporate that request.


I am using Mean Absolute Value(MAE) and Mean Squared Error(MSE) as my evaluation parameters for the regression model. I am trying to predict the future values for time series model and have used CNN fro the same. However, my CNN model is giving very low values for MSE compared to MAE. On such example is  MAE:0.04978915070122473, MSE:0.004155844765967494   I know for sure that MAE has to be always less than MSE since we are squaring the coefficients in MSE.


Why are old questions suddenly showing up in DIY? Many are 1-5 years old

Recently I've seen questions that are quite old (1-5 years) suddenly appear on DIY recent questions. I don't seem to be able to close them as "late answers" , maybe I don't yet have enough reputation points to do that, but that's not the issue. The issue why did this suddenly start happening


Don't Starve "select (originally right mouse)" and "left" are bound to A

My steam game don't starve has the action that "right mouse" would usually do is bound to a and move left is also bound to a. I tried deleting all my don't starve files and i cant find the right bind command to bind right mouse to its original action. I haven't played the game in over a year. PLEASE HELP!!!


how do I show similar matrices have the same eigenvalues?  I really have no idea, any detailed explanation would be thoroughly helpful.  thank you


Setting CRS automatically on Raster using QGIS?

I'm currently working with the Semi-Automatic Classification Plugin to help ID agricultural plots. However, when I attempt to set up the training I am given the error message.      Error [61]: Projection error. Try to assign projection to raster   /Users/User/Documents/University/Thesis/Map   Layers/Rasters/orthophoto2015_1m.tif   The Raster is projected for EPSG 2039 ITM. Despite this, every time I load the Raster or save my work I am either asked to select a CRS, if one is not assigned as a default. I don't run into issues with training on rasters that have their own projection already.  In short, how do I set up a raster file so that it is automatically assigned a CRS without having to select one manually or have it set to that of the project?


Are there people who travel continuously, but still manage to make money on the go?

If yes, how do they do it? What are some examples and options? How hard is it to become one of them?  P.S. I am not talking about people who write travel blogs or make money by writing about their traveling experiences. I am talking about people who manage to find jobs or create value temporarily as they travel, and make money and travel more with that money.


If $2^{k} + 1$ is prime, prove that $k$ has no other prime divisors than $2$.

I am trying to prove this by contradiction:  Assume $2^{k} + 1$ is prime.  By definition of odd number $2^{k} + 1$ is odd because $2^{k} + 1 = 2\cdot 2^{k-1} + 1$  Then $2^{k} + 1 \pmod{2} \equiv 1 \pmod{2}$   Because $2^{k} + 1$ is odd, $2^{k}$ has to be even. Let $k = ab$  I am stuck here, can someone help me?


I have uploaded Object Owner records and Object Contractor records. Also I have a Junction Object OwnerContractorAssociation. I have already established many to many relationship using junction object. But to populate records in Junction Object, I am unable to figure out the way to achieve it. Please guide on how to do it.   Thank you.


Is the following number transcendental? $$0.23571113171923293137\dots$$(Obtained by writing prime numbers consecutively from left to right, in the decimal expansion)


I am developing iOS apps and I hate, that always when I connect my iPhone to my Mac to install and test an app, the iPhone gets charged. Is there any possibility to connect my iPhone to my Mac without charging the phone?    My Environment: -  iPhone 4S (No Jailbreak) -  MacBook Air3,2 (Late 2010)


What would torsion in spacetime look like?

Christoffel symbols explain the gravity we observe in our daily lives. Say I have a region of spacetime with high , so general relativity isn't a good description of the region. In that region, be it a room or a Solar system depending on what would make for a good thought experiment, what would be empirically different from GR's predictions? We'll focus on classical effects, viz. something like  or whatever else would be a "mainstream" theory with torsion.


Suitable Phone camera Specs for Amateur photography?

I'm a beginner in learning photography(as a hobby). Since I'm not ready to buy a camera at the moment, what specs/features should I ensure to be present on my phone camera to help me pursue photography as a hobby?


Change name of all PNG files in directory recursively

I have a directory called assets and it contains a file structure similar to this:  ├── a │   ├── b │   │   ├── c.png │   │   └── d.png │   └── b2 │       ├── e.png │       ├── f.png │       └── g.png └── a2     └── b3         └── h.png   How can I change the name of all the images in this structure to the pattern NAME_old.png where NAME is the original name of the file? (For example, c.png would be changed to c_old.png)  I have a feeling that it has something to do with sed/awk/grep and using pipes, but I haven't the faintest idea how to use these tools and reading documentation doesn't really help.


echo "<script type='text/javascript'>alert('Success!');history.go(-1);</script>";   I'm using this to display Success and go back to form after submit the form. But I want to extend this code to clear input fields too. How should I do this?  Thank You!


Is it possible to delete an object from inside its own function? [Python]

I was wondering if I could delete an object from inside its own function. Here's what I'm thinking:  class ball:     def __init__(self, a):         self.a = a      def update(self, t):         if t >= self.a:             del self # Need help here  myBall = ball(120)  for i in range(0, 1000):     myBall.update(i)


Is it possible to add an icon in front of a field name?   I have a field name called Tel and would like to put a phone icon in front of it?   I've searched for a while and can't seem to find an answer to this.


How can I take good interior pictures (for selling the house)?

I'm about to put my house on the market, and I'd like to hear some tips for making the best possible photographs, specifically for this purpose.  Among things I should like to hear comments about are these:   Use a fairly wide-angle lens Use low ISO and small aperture for sharpness and low noise (of course, this implies a tripod and long exposures)   Tweak the colour temperature to make the interiors "glow"? Plus, of course, any other suggestions   FWIW, I'm using an EOS-M, probably with the 11-22mm lens (though I could also use one of the other two EF-M lenses), with DXO Optics Pro for post-processing.  I appreciate there isn't one single 'right' answer to this, but I couldn't find a button to turn it into a community wiki question. Anyone with the right combination of authority and opinion, please feel free to do so.


Do you need to spell it as food or as feed? Or is that different between UK english and USA english?


I read (not all but) many questions about automatic bounty awarding. e.g.:  and .  And in  I found:     ... after all. If you think the upvotes are fraudulent, you should   report the post to the mods. ...   But how?  Background: I asked  about Ruby on Rails and Haml. After 'bountying' it, I got an answer that does not even fit to my question. So I voted it down, but for some reason it got the additional three votes to qualify for the automatic award system. And the answer would not be qualified for upvoting (it's confusing, and no explanation) even it would fit to my question.  And it's the copy of .


Could dark energy be the effect of gravity at great distances?

This may be a silly question, but is it possible that dark energy and gravity are related to each other?   Space-time is deformed everywhere in space by objects with mass. The more massive the object, the more deformation in the local area, and, as a result, the more concentrated space-time is within that deformation. However, where is the "extra" space-time coming from to be able to form these super-concentrated regions of space-time? Is that what we observe as dark energy?  Is it possible that at great enough distances, gravity could be pulling space-time apart due to the lack of mass in the great voids of space? Not only that, but if there was enough mass in a part of space to have a little more gravity than the surrounding area, it could prevent that area of space from being "stretched out." Thus, might dark matter just be regions of space where space-time is denser than the surrounding regions?  I'm sure these aren't new ideas, but I'd like to know what premises and assumptions are incorrect.


Marketing Cloud Mobile Push SDK - Switching app user

I'm currently building a clienteling app that integrated the Mobile Push SDK on both iOS and Android and encountered some issue on switching the account.  I found that when I login to user A, and set contact key to A, the Inbox Messages will be send to this device. However, I logout user A and switch to a user B, I should set the contact key to B. But seems the inbox messages are associated with the Device instead of Contact, I can still see the inbox messages that were sent to contact A previously.  My question is, how should we deal with this situation, to prevent from seeing the previous inbox messages if the contact key has been changed?


Here are a few questions, I wish you could enlighten me.   Is it possible to combine processing power of 2 computers? How do I do it?


How to solve $\:\frac{d^2x}{dt^2}=-\frac{k}{m}x$ type of differential equations?

So how to solve the differential equation $\:\frac{d^2x}{dt^2}=-\frac{k}{m}x$.? I know how to solve normal differential equation such as:$\:\frac{dx}{dt}=x$, but the  above is new to me. I suppose how can I integrate for $x$ when we have $\:\frac{d^2x}{dt^2}$ Note I am trying to derive the equation of simple harmonic motion. .


Does the density of matter increase as we approach the big bang?

I am interested in knowing whether it is clear (undisputed) that the density of matter/energy increases as we approach the time of the big bang?   Does this follow from the FLRW metric?


$$\cos \frac{2π}{2013} +\cos \frac{4π}{2013} +\cdots+\cos \frac{2010π}{2013} + \cos \frac{2012π}{2013}$$  How to sum it up? *Calculator is not allowed.


I know that the DM can give you enchanted items, but can players spend gold and downtime to enchant their own?


Creating a "Screen" class that handles every print command for my program, getting a null pointer exception

I'm trying to use a class ("Screen") to handle all instances of System.out.print in my other classes. However I am getting a null pointer exception from my main method when I try to run my code to test it it.  I can't figure out what exactly is causing this error, any tips would be appreciated.  Main Class  public class AtmTest {  public static void main(String[] args) {     // TODO Auto-generated method stub     //Screen.displayMessage(null);       AtmTest test = new AtmTest();  }  public AtmTest(){     //write way to start all processes     new ATM();  }   }  This is the ATM class where I am first tyring to call the Screen class to display a message to the console, and where my code stops running.  public class ATM {  private boolean userAuthenticated; private int currentAccountNumber;  private static final int BALANCE_INQUIRY = 1; private static final int WITHDRAWAL = 2; private static final int DEPOSIT = 3; private static final int EXIT = 4;  private Keypad keypad; private Screen screen; private BankDatabase bankDatabase;  public ATM(){ //new Screen(); //screen.displayMessage("hey");  run(); }  public void run(){       screen.displayMessageLine("Welcome!");      authenticateUser();     displayMainMenu();     performTransactions();   }  This is the screen class that is supposed to control all outputs for the program.  public class Screen {    public Screen(){   }  public void displayMessage(String a){      System.out.print(a); }  public void displayMessageLine(String a){     System.out.println(a); }  public void displayDollarAmount(double a){     System.out.println("$" + a); //make to two decimal places }