Backyard experiments to falsify the Flat Earth theory

I recently became aware that the flat Earth theory still exists in the 21st century, and has colored the views of a friend of mine. Roughly speaking, the tenets are:   The Earth is a flat disk, with the south pole blown up into a circular "ice wall" where one would expect Antarctica to be.                                              The sun and moon are either spheres or disks floating above the earth and moving in a spiral pattern with the seasons. NASA is part of a conspiracy to conceal the truth, and sends us animations and faked photo shoots.   The Flat Earth Theory is a scientific theory, in the sense that it makes falsifiable predictions about the universe that can be seen to match observation (or not). What are some good arguments or backyard experiments that could convince a layman that in fact the Flat Earth Theory is false?  A similar question and useful related reading is , but it focuses more on the theoretical and conceptually simple side, applicable to the proverbial "numskull cousin". This question is more focused towards convincing a doubtful scientific person using (preferably low-tech) experiments and observations.


There's a sentence within a novel that I don't understand. Can you break it down for me?     The boy with fair hair lowered himself down the last few feet of rock   and began to pick his way toward the lagoon. Though he had taken off   his school sweater and trailed it now from one hand, his grey shirt   stuck to him and his hair was plastered to his forehead. All round   him the long scar smashed into the jungle was a bath of heat   What scar? Is the scar "the bath of heat"? Why does it say all round and not "all around"?


How does this button work without any circuit closing device?

This may be a stupid question, but I have searched online for a little bit and can't seem to find my answer. I am working on a circuit board that uses buttons that i've never seen before. These buttons just have a metal lead around them and an LED in the middle (for lighting up the button I'd assume) but how does a button like this even work? I've attached some pictures to show you what i mean.    this is the back of the push buttons from the device


How to ask the another question within the less than 20 minute on the StackOverflow?

TO ask a another question within 20 minute  on the Stack overflow not possible,


Splitting a string without delimiter and save it in an array

I would like to split three letters such as WER into three independent letters. as follows:  W = array[0] E = array[1] R = array[2]   I tried the command   WER | cut -c1 but I could not save the new string W in a variable.  I tried   set var1 = WER | cut -c1 and it didn't work.


Why is there no option to install ubuntu alongside windows 10

I want to dual boot windows 10 and ubuntu but I can't see the option to install alongside windows 10 during ubuntu installation. Yet ubuntu installer recognizes windows 10. My pc has 4 partitions. Please help


Why do I have to press the shutter button twice on my Canon 6d Mark II?

I am new to photography and trying to learn everyday. I've noticed when shooting in manual mode and using the Viewfinder like most professionals use, when I press the shutter button down you have to like click it twice in order for it to take the photo. I've watched Youtube videos of pros shooting and they shoot in manual and it snaps the picture quick!  When I press it down it's like something inside the camera closes, and then when I press again it captures the image and the view finder opens back up. I want it to just snap the photo when I press it. I tried turning off the shutter button focus and using the back AF button and it still happens.  Is there a setting I need to change? This is why I liked using the Live View Screen to shoot, because it snaps it right when i want it to. There isn't this, like, double tap on the shutter button.


What are [..] called above enum / class definition?

Sorry for the silly question, but I came across the following C# code and I'm wondering what the [Flags] portion is and what it does.  [Flags] public enum UserFlags {      //... }   Thank you in advance.


I just edited someone's post so that it would be more readable.  Basically, I just added some line breaks and spaces into their sql code so that it now takes a reader about 5 seconds to comprehend what the query is doing instead of 50.  It was rejected on the basis that the edit was too minor.  I respect that decision in that if there's a rule that minor edits should be rejected then they were following that rule.  I am just curious to know why that is a hard rule.  Is it just to prevent having too many edits?


$2^n + 1$ is prime $ \implies n$ is a power of $2$

I was wondering why I can't do this this way by proof by contradiction of the contrapositive. So I want to prove $$2^n + 1 \quad \text{is prime} \implies n = 2^k \quad \text{for some} \ k\in \mathbb{Z}.$$ By contrapositive, $$n \neq 2^k \quad \text{for all} \ k \in \mathbb{Z} \implies 2^n + 1 \quad \text{is composite.}$$    Then I want to prove by contradiction: Suppose $n \neq 2^k \quad \forall k\in \mathbb{Z}$ and $2^n + 1$  is prime. Why can't I give one counterexample to prove that this is false (contradiction)? Since if $n:= 3$ then $2^3 + 1 = 9$ which is composite, hence, $2^n + 1$ being prime (hypothesis) cannot be true, so by proof by contradiction, $2^n +1$ must be composite?


Hamilton-Jacobi equation and method of solving it

So, this equation we get when we find  that makes new hamiltonian=0. There are 4 main transformations: F1(q,Q,t), F2(q,P,t), F3(p,Q,t), F4(p,P,t). On practice and in every book I've seen, we use F2 and F1 to solve Hamilton Jacobi equation, but can we use F3 and F4?


What is the nilradical of $\mathfrak{gl}_n$?

I'm really embarrassed to ask but what is the nilradical of the Lie algebra $\mathfrak{gl}_n(\mathbb{C})$, i.e. the set of ad-nilpotent elements of $\mathfrak{gl}_n(\mathbb{C}) = \mathrm{Mat}_n(\mathbb{C})$$? This must be standard knowledge but I couldn't find a reference.  Clearly, all nilpotent matrices and all diagonal matrices are in the nilradical. What else?


I will be using a business visa 90 days in Russia, Have anyone faced problems by custom or police about "what kind of business I'm doing?"

I will soon receive a buiness visa after one month duration is 3 months. I might sound funny, but will I get into a trouble if im not a buiness man?? I dont even have work, but I mean I have saved my money. But like buiness visa require me to fill in some working information , so I randomly fill in some working information that i have worked before. Will this be a problem??  Have any one also traveled in Russia over 30 days as buiness visa holder? If so please I really hope I can hear from you , I have no one to ask in Taiwan.  Is there some regions that business visa holder can't enter? Because I know there are a lot of region that tourist visa holder can not enter, but I mean I'm a business holder.


Why does a java.lang.String not equal a hardcoded String?

I've been developing for a CraftBukkit Minecraft server. This gives me a good API to work with. This API includes the onCommand method, which allows me to implement new commands.  I've just been trying to do that, but when I send a command such as /example arg0, for some reason I can't compare with arg0 from my code. I'm trying to check for when args[0] == "on", yet although args and args[0] are both defined and I set args[0] to "on", the comparison still returns false.  private CBPlugin pluginReference;  public NerfTntExecutor(CBPlugin plugin) {     // (...)     pluginReference = plugin; }  public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {     if (sender.hasPermission("command.op.nerftnt")) {         if(args.length > 0) {             // (...)             sender.sendMessage(args[0]);             sender.sendMessage(args[0].getClass().getName());             if(args[0] == "on")                 sender.sendMessage("true");             return true;         }         else {             sender.sendMessage("Not enough arguments!");             return false;         }     }     else {         pluginReference.getLogger().info("No permission");         return false;     } }   The sender.sendMessage calls display the data given back to the person who sent the command. In this case, args[0] is displayed as "on" and args[0].getClass().getName() gets shown as java.lang.String - the type of the argument. However, the next line if(args[0] == "on") is false.  Why is this? I seem to be comparing a String to another String, and they both have the same contents. Why should a comparison of the two return false?


MySql : Updating all except the first row

I went through the previous answer like , but it gives me the following error : You can't specify target table 'table_name' for update in FROM clause. I have a table with say 3 columns (id -> auto increment primary id) :  id, roll_no and attendance  And for selected roll numbers having many entries each, except the first entry I want to update all entry attendance field as P. The query which I wrote is following : UPDATE tbl_class_attendance     set attendance = 'P'   where id NOT IN     (Select min(id)        from tbl_class_attendance       WHERE roll_no IN ('25', '45', '55')       GROUP         BY roll_no;  But it gives me the above error. I also went through other answers asking to use two select queries but there the answer I didn't find completely easy to understand as well as difficulty in executing for my selected list of roll numbers. So, is there a way to update? EDIT : Answer given below


Problem with accents and special characters in document, using Legrand Orange Book template

I am writing a series of documents, that I want to show the best look I can get. In the process, I found an amazing template, that of course I would like to use with those documents.  From the very start, I was in trouble. I made a lot of investigation, but I cannot solve my problem with the accents, that not show in the final PDF. Of course, I get lot of errors in the compilation process.  The curious fact is that in the titles (index, chapter, subchapter, and so on) the accents look grood. But, in the text, te text show with no accents and special characters.   I got the template as is. In fact, the only change I made to the template is the language, that is   \usepackage[english]{babel}   for    \usepackage[spanish]{babel}   In my opinion, the error that show my problem is  ! Package inputenc Error: Unicode char \u8:éri not set up for use with LaTeX. See the inputenc package documentation for explanation.   but I don't know how can I solve it.


I have been facing a very hard time ranking up in . Whenever I play a ranked games some of my teammates always manage to screw the match up. It has absolutely nothing to do with me. The fight starts within the teammates(not me) till it goes so aggressive that someone starts feeding intentionally or leave the game. I tried the to calm them down with a 40 % success ratio. For all the Gold and diamond players out there, Is it normal or I am too unlucky.  I am currently  stuck in Silver division I and seems that there is no way to rank up for me.  Any tips will be sincerely appreciated. I pray to god that I find good players in matchmaking.


How do I simplify $\frac{\sqrt{4+h}-2}{h}$?

I know this looks like a dumb question, but how do I simplify this? Does it uses some square root property or factorization? The wolfram alpha has no step-by-step solution for this, so it may use some crazy technique, I guess.  $$\frac{\sqrt{4+h}-2}{h} = \frac{1}{\sqrt{4+h}-2}$$


How do I replace caps in URL in Google Analytics

I have a Google Analytics account for a site I now am helping with.  There is a history where no filters were applied and I would like to apply a filter to make all the URLs lowercase to match them up.  I see plenty on removing querystrings and such but nothing along the lines of replacing all uppercase chars with lowercase ones.  Is it possible?


$T^{k+1} = 0$, where $k$ is a positive integer. Prove that $I + T + T^2 + \dots+ T^k = (I - T)^{-1}.$  My proof: Let $T$ be a $m \times n$ square matrix with the same number of $m$ rows and $n$ columns. $K$ must be greater than zero.   $$I = I^2 * I^{-1}$$ $$T = T^2 * T^{-1}$$ $$T^{k-1} = T^k * T^{-1}$$ $$I-T^{-1} = \frac{1}{I-T}$$  $$I + T + T^2 + \dots + T^k = (I-T)^{-1}$$  $$I + T + T^k + T^2 + \dots + T^{k-1} = (I-T)^{-1}$$  $$I + T + T^k + T^2 + \dots + T^kT^{-1} = (I-T)^{-1}$$  I'm a bit stuck. It seems like one of those $P*P^{-1}$ problems.  Is what I am doing overkill to the proof?  I need directions.


Summing up the area on a polygon by a certain attribute result

I wish to know if there's a tool on QGIS equivalent to the Excel's "SUMIF".    I have a shapefile of a land use and cover that's classified by the attribute with the name of the classes, for example: "vegetation", "urban centers" and "pastures". My goal is to calculate the area of each class, but since it's composed by various polygons, I need to add up all the areas from all polygons that were put in the same class.  Like I mentioned in the beginning of the question, I know that Excel has a function that can do such thing for me, but it turns out that the sum made by excel doesn't match the area's total given by QGIS.  English is not my first language, so if the explanation isn't clear enough, I'll be glad to rephrase it.


I have a conjecture. I have a problem proving or disproving it.      Let $w \in \Lambda^k(V)$ be a $k$-vector. Then $W_w=\{v\in V: v\wedge w = 0 \}$ is a $k$-dimensional vector space if and only if $w$ is decomposable.   For example, for $u=e_1\wedge e_2 + e_3 \wedge e_4$ we have $W_u = 0$.


Which one is correct: "students' birthday" or "students' birthdays"?

I know that "children" is a plural noun and "birthday" is a countable noun, but I saw this sentence in a book:     Children have a birthday cake at their birthday.    Why is "children" (which is a plural noun) followed by "a birthday cake" instead of by "birthday cakes," and why is "their" followed by "birthday" instead of by "birthdays"?


Does anyone know if the spacetime diagrams appearing in Takeuchi's book on relativity were created using a dedicated LaTeX package?  Amazon has a preview of the book; the diagrams appear in chapter 3, though I would also be interested in the other drawings in the book.   Update:


Expressing the arctan function in a different form?

Could someone explain why this is the case? Or at least tell me which formula has been used. I do not understand how it is possible to take out one of the terms in the fraction contained in the argument of the arctan function. Thanks


I have built myself a generic collection class which is defined like this.   public class StatisticItemHits<T>{...}   This class can be used with int and string values only. However this  public class StatisticItemHits<T> where T : string, int {...}   won't compile. What am I doing wrong?


Linear Regression on sorted Dependent variable

This question may sound silly. Can we sort the dependent variable Y of a dataset and apply Linear Regression on it. What I think is, it introduces Bias on the model and it will perform poorly on unseen data. Please correct me if I'm wrong. What are all the other reasons on why we should not do it. Explain with an example.  Example: Matching $x_1, x_2, \ldots, x_n$ with $y_{(1)}, y_{(2)},\ldots, y_{(n)}$(sorted asc) where $y_{(j)}$ is the $jth$ smallest value of $y_1,\ldots, y_n$.


Only two groups of order $10$: $C_{10}$ and $D_{10}$

Show that up to isomorphism there exist only two groups of order 10: $C_{10}$ and $D_{10}$. I need some help on this question. I only know the basic definitions of isomorphism. Any hints?


I have the following problem:  "Assume $R$ is an ID. For each maximal ideal $M$ let $R_M$ be the localization $(R \ M)^{−1}R$ considered as a subset of $Frac(R)$. Show that $\cap_M R_M = R \ (⊆ Frac(R))$ where the intersection is over all maximal ideals $M$."  Was given a hint saying to take $q$ in the intersection and consider the ideal $\{r \in R; rq \in R\}$ but I am not sure how to work with these things. Can someone give me some others hints in order to make my work easier and try to explain me how to see an arbitrary element in the localization ring?   Thank you very much, everyone!


Would you be able to see yourself in a mirror in front of you as you two are in a room traveling at the speed of light?

Veritasium talked about this in one video. If you are in a room or a train, plane, car or whatever just a closed space traveling at the speed of light and you put a mirror in front of you, could you see your reflection? I think the answer is no because light can't travel 2 times "c", light can't travel from you (because you already go to that speed) to the mirror.


How to find image style URL from within twig template?

I'm implementing a node template that uses an image twice; once in a 'normal' way (i.e. using the image style defined in the field's display configuration for that view mode), and the other is as a css background-image property.  I need one of two things:   (ideally) a way to get the URL for a different image style of the same image. a way to get the URL for the image field.   I'm struggling to use dump() and kint() to help myself to an answer. They both output far far too much (thanks to embedded links to "parent" etc.) and seem to not have the info I need. e.g. looking at dump(content.field_image) output the actual URL of the image is not there (so where does it come from such that it can be rendered with {{ content.field_image }}?!). kint() on the other hand dies completely if I pass an argument to it and the top-level version is again far too big to navigate. Debugging was soo much easier with phptemplate + xdebug. (Yes I know it's good that themers can't drop the database.)  There's an answer to (1) that implies , but I don't understand why I can't get the existing URL in (2)?


What is the best way to handle large numeric inputs in C++ (for example 10^100)?   For algorithms I usually switch over to ruby and I sometimes use strings.  Any other good methods?


Duplicate icons, and some old ones in Dash

My issues is that I've some how managed to get duplicate icons (picture below) and some older icons. When I click on the duplicate / old icons it just takes me to the system settings. This is driving me mad, is there any way I can remove them without having to reinstall?


Performance implication of selecting all fields from MYSQL table

I use PHP and MYSQL on a Linux webserver and have usually programmed to select all the field of records matched - ie 'SELECT * FROM table1 where field1 like query'.  In some cases (as in producing an on-screen index) I then only use 4 or 5 fields from the returned records which have 50 fields.  I imagine if I want to use, say, 49 fields, then selecting all 50 makes sense; but there may be a point (ratio ?) where selecting only the fields required may be more efficient.  Is there a performance implication selecting all the fields rather than selecting just the fields required ?


Ububtu 14.04 64 bit Network not working after update

I just updated ubuntu 14.04 on 01-30-16 and now my netwoking is not working. If I go to settings and try to open networking, I get the message "the system network services are not compatible with this version". Any help would be appreciated. I don't want to reinstall if I don't have to.


All variables are integers with a value somewhere between 0-99, inclusive. ax + b % 100 = n and you are given everything except x. Example: 65x + 6 is congruent with 81 mod 100. I am trying to find a way to determine the potentially valid values of x without resorting to brute force.  Is there a known method more efficient than brute force for a problem like this?  If so, can anyone explain how the congruencies are found and/or possibly point me in the direction of any tutorials, books, or videos?


The current task was truncating doubles to separate the decimals from the double. For example, if it was 5.98, was supposed to print '.98'. Not very hard. The way the system wants me to do it is by casting the double to an int, thereby truncating it. Then, I would subtract the int from the double to get the decimal. It worked... kind of. I was trying to retrieve the '.8934' from 57.8934, but the system printed '0.8933999999999997'. I'm only supposed to be using doubles and ints and casting. import java.util.Scanner;  class U1_L6_Activity_Three {   public static void main(String[] args) {          Scanner scan = new Scanner(System.in);          System.out.println("Please input a decimal number:");     double n = scan.nextDouble();          int a = (int)n;          double b = n-a;          System.out.println(b);        } }


Unmet Dependencies while Installing default-jre

I am getting the following error while trying to install default-jre. How can I solve this issue?  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming.  The following information may help to resolve the situation:  The following packages have unmet dependencies: default-jre : Depends: default-jre-headless (= 1:1.7-43ubuntu4) but it is not going to be installed Depends: openjdk-7-jre (>= 7~u3-2.1) but it is not going to be installed E: Unable to correct problems, you have held broken packages.


How can I make my push() method work properly within private ArrayLists and other constraints **below**?

I am working on coding something as an assignment we are working with stacks and queues right now.  This is the first part of what I have in the Stack.java file:  import java.util.*;  class Stack {  private ArrayList<Integer> array; /* this should implement a Stack that holds Integers. It should have a constructor and the methods push(Integer), pop()and toString(). */     public void push(int value)     {         // adds the value to the end of the array         array.add(value);     }   A small part of runner class is:    class Main {  public static void main(String[] args) {     Stack myStack = new Stack();    myStack.push(1);    myStack.push(2);    myStack.push(3);    myStack.push(4);    myStack.push(5);    myStack.push(6);   The error message I get is   "Exception in thread "main" java.lang.NullPointerException     at Stack.push(Stack.java:12)     at Main.main(Main.java:5)"   What is wrong?


Bluetooth not detecting devices with ubuntu 16.04

Sorry to ask a repetitive question.  I read and tried multiple solutions posted in last 3 to 4 hours but couldn't succeed. Bluetooth ON and visibility ON  but neither detect any device nor visible to other devices.  I 'm not good with Ubuntu, not even know that what exactly following commands do , can someone point me towards right direction  output of lsusb is  Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 04f2:b52d Chicony Electronics Co., Ltd  Bus 001 Device 002: ID 0a5c:216d Broadcom Corp.  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub   lspci -knn | grep Net -A2; lsusb  03:00.0 Network controller [0280]: Broadcom Corporation BCM43142 802.11b/g/n [14e4:4365] (rev 01)     Subsystem: Hewlett-Packard Company BCM43142 802.11b/g/n [103c:804a]     Kernel driver in use: wl Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 04f2:b52d Chicony Electronics Co., Ltd  Bus 001 Device 002: ID 0a5c:216d Broadcom Corp.  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub   output of     rfkill list   0: phy0: Wireless LAN     Soft blocked: no     Hard blocked: no 1: brcmwl-0: Wireless LAN     Soft blocked: no     Hard blocked: no 3: hci0: Bluetooth     Soft blocked: no     Hard blocked: no   For dkms status  bcmwl, 6.30.223.271+bdcom, 4.4.0-72-generic, x86_64: installed bcmwl, 6.30.223.271+bdcom, 4.4.0-75-generic, x86_64: installed bcmwl, 6.30.223.271+bdcom, 4.4.0-78-generic, x86_64: installed bcmwl, 6.30.223.271+bdcom, 4.4.0-79-generic, x86_64: installed bcmwl, 6.30.223.271+bdcom, 4.4.0-81-generic, x86_64: installed bcmwl, 6.30.223.271+bdcom, 4.4.0-83-generic, x86_64: installed   dmesg | grep -i blue  [   12.207904] Bluetooth: Core ver 2.21 [   12.207919] Bluetooth: HCI device and connection manager initialized [   12.207921] Bluetooth: HCI socket layer initialized [   12.207924] Bluetooth: L2CAP socket layer initialized [   12.207928] Bluetooth: SCO socket layer initialized [   12.541892] Bluetooth: hci0: BCM: chip id 70 [   12.557906] Bluetooth: hci0: faisal-HP-Notebook [   12.557910] Bluetooth: hci0: BCM (001.001.011) build 0000 [   12.709950] bluetooth hci0: Direct firmware load for brcm/BCM.hcd failed with error -2 [   12.709954] Bluetooth: hci0: BCM: Patch brcm/BCM.hcd not found [   14.711794] Bluetooth: hci0 command 0x1003 tx timeout [   21.446442] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [   21.446445] Bluetooth: BNEP filters: protocol multicast [   21.446448] Bluetooth: BNEP socket layer initialized [   58.953015] Bluetooth: RFCOMM TTY layer initialized [   58.953020] Bluetooth: RFCOMM socket layer initialized [   58.953024] Bluetooth: RFCOMM ver 1.11 [  538.154130] Bluetooth: hci0 command 0x1003 tx timeout [ 1088.482264] Bluetooth: hci0 urb ffff8802519c5cc0 failed to resubmit (2) [ 1101.185972] Bluetooth: hci0: BCM: chip id 70 [ 1101.201973] Bluetooth: hci0: faisal-HP-Notebook [ 1101.201977] Bluetooth: hci0: BCM (001.001.011) build 0000 [ 1101.201993] bluetooth hci0: Direct firmware load for brcm/BCM.hcd failed with error -2 [ 1101.201995] Bluetooth: hci0: BCM: Patch brcm/BCM.hcd not found [ 1103.205069] Bluetooth: hci0 command 0x1003 tx timeout


find -exec throws error even with ending plus ('+') sign

So I am aware that we have to end find -exec  commands with ; or +, but I cannot fathom why is this not working:  find . -type f -name "*.mp3" -exec mv {} . +   when this is working  find . -type f -name "*.mp3" -exec mv {} . \;   My first suspect is the plus sign is might have been unescaped, but \+ doesn't work either. Then I thought that mv might have interpreted + for something else, but I couldn't figure out how to work around it. Any help will be greatly appreciated!


Not returning first match in a piped regex

txt = 'Teena is Positive. Sara is Negative' reg = re.compile(r'(Teena|Sara).*(Positive|Negative)') result = re.search(reg, txt).group(1) print(result)   This returns 'Negative' while I expected 'Positive'. I assumed that the first match is returned. What am I doing wrong??


What is the Minimum GPA for admission in a graduate school in a respectable science university in the US?

I am thinking about applying to graduate studies in physics related Phd or master degree in the US, but my GPA is very low, 2.4/4.0 to be specific. I wonder if there are respectable universities in the US that can accept such low average? Notes:  -I have some experience in research from my undergrad. -I had my Undergraduate degree in physics from a respectable Canadian university.  Thanks in advance!


Theoretical motivation for using log-likelihood vs likelihood

I'm trying to understand at a deeper level the ubiquity of log-likelihood (and perhaps more generally log-probability) in statistics and probability theory.  Log-probabilities show up all over the place: we usually work with the log-likelihood for analysis (e.g. for maximization), the Fisher information is defined in terms of the second derivative of the log-likelihood, entropy is an expected log-probability, Kullback-Liebler divergence involves log-probabilities, the expected diviance is an expected log-likelihood, etc.    Now I appreciate the many practical and convenient reasons.  Many common and useful pdfs are from exponential families, which leads to elegantly simplified terms when log-transformed.  Sums are easier to work with than products (esp for differentiating).  Log-probs have a great floating point advantage over straight probs.  Log-transforming a pdf often converts a non-concave function into a concave function.  But what is the theoretical reason/justification/motivation for log-probs?  As an example of my perplexity, consider the Fisher information (FI).  The usual explanation for intuiting the FI is that the second derivative of the log-likelihood tells us how "peaked" the log-likehood is:  a highly peaked log-likelihood means the MLE is well-specified and we are relatively sure of its value, while a nearly flat log-likehood (low curvature) means many different parameter values are nearly as good (in terms of the log-likelihood) as the MLE, so our MLE is more uncertain.   This is all well-and-good, but isn't it more natural to just find the curvature of the likelihood function itself (NOT log-transformed)?  At first glance the emphasis on the log-transform seems arbitrary and wrong.  Surely we are more interested in the curvature of the actual likelihood function.  What was Fisher's motivation for working with the score function and the Hessian of the log-likelihood instead?  Is the answer simply that, in the end, we have nice results from the log-likelihood asymptotically? E.g., Cramer-Rao and normality of the MLE/posterior.  Or is there a deeper reason?


lastname and firstname initials in biblatex bibliography

Is there a fast way to automatically show lastname and then initials in the bibliography/References list? I use biblatex package with natbib and authoryear style. F.ex, the author is listed as Peter Nielsen but should be Nielsen, P.  \usepackage[style=authoryear,natbib]{biblatex} \bibliography{mylib.bib}  \begin{document}  \printbibliography \end{document}   Thanks in advance!


I have the following string:  DB Results:
ripster.ultima
raghav.jhavar

   I want to extract "ripster.ultima" and "raghav.jhavar", so I used the following regex:  (?<=
)(.*)(?=<\/b><\/center>)  Now, this works in some cases, but not in all:   In the link above, the first example is a single line. When I put in a single line, it does not select the individual strings. However, if its separated by a new line as seen in the second example, the strings I want are highlighted.   How do I get the strings in the first example?


How to find the original file through multiple symlinks?

I've run into situations where symlinks point to other symlinks causing me to have to run multiple ls commands to try to trace where the base file is stored.  For example if I want to know the location of java program I run on centos I usually start with /bin/java and have to go 3-4 symlinks deep before I find the actual file's location. Is there a simple clean command that will trace along all symlinks until it finds a real file and give me the location of the base file?


Is there a way using Python's standard library to easily determine (i.e. one function call) the last day of a given month?  If the standard library doesn't support that, does the dateutil package support this?


Base class method being called instead of derived, even when passed by reference

I have 3 classes: A, B, and AnotherClass. Where B is derived from A:  class A { public:     A(){}     virtual void method() {//default action} };   Then I have a derived class, B:  class B : public A { public:     B(){}     void method() {//redefine action} };   And AnotherClass:  class AnotherClass { public:     AnotherClass(A& a);     A a;     anotherMethod(){ a.method()} }; AnotherClass :: AnotherClass(A& a) : a(a) //initialization   So, if I construct an object of AnotherClass with an object of B:  B b(); AnotherClass myObj(b);   Keep in mind, since B inherits from A, and AnotherClass accepts an object of A, I am able to successfully pass in a B object as the argument.  And I call:  myObj.anotherMethod();   I expect this to execute anotherMethod(), and when it does, I expect it to call the REDEFINED method() that belongs to B, but instead it calls the default method() defined in A  I was thinking my problem is because I specify the argument of AnotherClass as an object of class A. However, I do not want to change this argument to an object of class B because I also have classes C, D, and E, that also inherit directly from A. So I want to use the base class as the argument type so I am not limited to only being able to pass in a b object. But, I read some older posts on this site and most proposed solutions was to pass the derived object (b) by reference, which I am doing.  Can someone explain why this is happening?


After upgrading to 15.04 , one computer is very, very slow to boot -several minutes, instead of ~20sec.  I do not know if this helps:  graphical.target @1min 40.961s └─multi-user.target @1min 40.961s  └─kerneloops.service @1min 36.392s +16ms  └─network-online.target @1min 36.391s   └─network.target @1min 30.948s     └─wpa_supplicant.service @1min 31.430s +6ms       └─basic.target @1min 30.414s         └─sockets.target @1min 30.414s           └─acpid.socket @1min 30.414s             └─sysinit.target @1min 30.412s               └─networking.service @1.941s +49ms                 └─apparmor.service @1.383s +555ms                   └─local-fs.target @1.381s                     └─media-andre-6564\x2d3236.mount @2min 17.386s                       └─local-fs-pre.target @1.375s                         └─systemd-remount-fs.service @1.328s +41ms                           └─systemd-fsck-root.service @1.197s +129ms                             └─system.slice @324ms                               └─-.slice @323ms  andre@andre-Latitude-E5520:~$ systemd  Failed to create root cgroup hierarchy: Permission denied Failed to allocate manager object: Permission denied


My USB stick is connected but not showing in cmd/diskpart/list disk?

My USB stick is showing in  {This PC} but I can't format it or enter it (It says I/O error) I tried using Command Prompt but the same thing happened It shows that in diskpart the usb stick doesn't show up in the command list disk but it shows when I type list vol and it shows unusable and cannot be formatted because of an error that's called I/O tried it on another computer but the same thing happened as you can see in these screen shots that I took even diskpart can't format the corrupted Toshiba USB stick is there any solution that you might suggest I should try ?


Could the randomness of quantum mechanics be the result of unseen factors?

The possibility of randomness in physics doesnt particularly bother me, but contemplating the possibility that quarks might be made up of something even smaller, just in general, leads me to think there are likely (or perhaps certainly?) thousands of particles and forces, perhaps layers and sub layers of forces, at play that we do not know about. So this got me thinking about quantum mechanics.    I'm no physicist, but I do find it interesting to learn and explore the fundamentals of physics, so I'm wondering: Could the randomness found in radioactive decay as described in quantum mechanics be the result of forces and / or particles too weak / small for us to know about yet resulting in the false appearance of randomness?  Or rather, can that be ruled out?


Colors in conditional formatting based on cell hex values

I am looking for a solution to change the background and font color of a cell based on hex-values in another cell.  I am managing a google spreadsheet for an online basketball league. I have several sheets where there should be formatting based on the team name. For example, in the standings, the cell with the team name should appear in the teams' colors. With conditional formatting I am able to say (sloppy way:) if team name = xyz -> background color = #aaaaaa, font color = #bbbbbb  I want to have a single sheet where I can "store" these team colors, so if a team has a change in their team art, I don't have to change the conditional formatting on 100 different sheets, but just on a "color" sheet and everything gets updated after that.  So in the end, I want to have a sheet named "color" (or whatever) where I have 3 rows "team name", "color 1" and "color 2". If I change values in these cells, the whole document should update all cells where these team colors are used.  Does anybody have a solution for this?


elementary set theory (cartesian product and symmetric difference proof)

I've figured out the following statement is true but I was wondering how you actually go about proving something like this?   $A \times (B \triangle C) = (A \times B) \triangle (A \times C)$


Can you explain this "Theory of Everything"?

I recently come across with an amazing equation of Theory of Everything; I wonder if TOE has been formulated (???) I found this equation on a website, check it out . While seeing briefly this equation, I simply don't understand what this means because there are no explanations of all the units used in this formula (e.g. ψ, Φ, i, A, α, etc). What is W? Can you explain what the units are and what all of these mean? Does this formula be the real formula of TOE? Thank you :)


What does "+0" mean of the earned bounty?

The following is a screenshot of earned bounties I got from 's profile page. What does the +0 means here as minimum bounty is 50? Does it mean he initially got the bounty and then removed from the provider? But I do remember that bounty cannot be gotten back after given.  Can someone explain what's going on here?


Wifi not being recognized by 2011 Mac mini running Ubuntu 20.04

I switched my 2011 mac mini to ubuntu 20.04 a while back and it worked perfect for about 4 months. Then last week I turned my computer on and the wifi label in the top right simply disappeared and this computer no longer recognizes wifi. When I look in the settings under wifi, nothing appears except "No Wi-fi Adapter Found". The wifi worked perfectly before this. I didn't fiddle with anything it just stopped working one day. I can't install anything because of this and I don't know how to get it back or switch back to mac. Any suggestions?


I've looked through quite a few other posts about this issue and they always seem to get resolved by some iTunes or document storage that the Mac is accidentally tracking as part of the "other" storage. But my Mac has no files on it except for System files and Steam. I used it a long time ago but wiped everything clean, now there's 87GB of other files somewhere? I don't see them in any directory, DiskDaisy shows them as in hidden hidden space, but I don't have the money to pay for DiskDaisy to do Admin Scan. I just want to be able to use my Mac again lol. No TimeMachine, no caches that I can find, I've tried quite a few things so far  I'll continue looking while I wait to see if this gets any responses, getting frustrated here :/


So i cant install katoolin on my ubuntu  lienux@JPC:~$ su Password: root@JPC:/# git clone https://github.com/LionSec/katoolin.git Cloning into 'katoolin'... remote: Enumerating objects: 253, done. remote: Total 253 (delta 0), reused 0 (delta 0), pack-reused 253 Receiving objects: 100% (253/253), 95.77 KiB | 554.00 KiB/s, done. Resolving deltas: 100% (145/145), done. root@JPC:/# cp katoolin/katoolin.py /usr/bin/katoolin root@JPC:/# chmod +x /usr/bin/katoolin root@JPC:/# chmod +x /usr/bin/katoolin root@JPC:/# chmod +x /usr/bin/katoolin/katoolin.py root@JPC:/# katoolin katoolin: command not found root@JPC:/#   Im running ubuntu 18.10 64-bit


f uniformly Lipschitz, integral from 0 to inf of |f(x)|  inf.

Suppose f: [0,inf) -> R is uniformly Lipschitz and the integral from 0 to inf of |f(x)| < inf. Then|f(x)| converges to 0 as x -> inf. Prove this by proving the contrapositive. ie. negate the limit portion and show via the properties given by f that the integral will be infinite.  I'm lost here. For the limit, I think I'd need to choose an epsilon so that the limit does not converge to 0. Then, I somehow use that f is Lipschitz (not totally sure what that means aside from |f(x) - f(y)| < M |x-y|) to show that the integral is infinite (don't totally know how to show that, either). Any help would be greatly appreciated.


Can the Heisenberg Uncertainty Principle be explained intuitively?

I have heard several pseudoscientific explanations about the  and find them hard to believe.  As a mathematician mainly focusing on functional analysis, I have a considerable interest in this matter. Although I still have no idea about it, I aim to truly understand it one day. For now, the question is:  Can the Heisenberg Uncertainty Principle be explained so that a non-scientist can at least get a correct idea of what it says and what not?  One of the most heard explanations is the one that says naïvely that while trying to determine the position of a particle you send energy (light) so you modify its speed, therefore making it impossible to determine the speed. If I understand well this should only be a some sort of metaphor to explain it, right?


Can't boot Windows 10 after Ubuntu 16.04 was installed

after installing Ubuntu 16.04, when I choose in grub startup menu to boot in Windows 10 it restart PC but loop again in grub start up menu. I tried - boot repair (to correct it - "recomended change") - sudo update-grub also. So as I wrote after installing Ubuntu 16.04, when I select Win10 in grub, it restart computer, but again shows grub bootup menu... Basic information - older desktop (no UEFI), - 1. installed Win Xp, 2. Windows 10, both load without problem, - Win10 shut down, but fast boot was not disabled (in ubuntu I can see other drives, but ubuntu cannot mount them) - 3. installed Ubuntu 16.04  As first on HDD I had 2 NTFS partitions (50 and 70GB), on the first was Win XP, I split it ( 50GB to 20GB Win XP and new 30GB) and on new part I install win 10. After this I split the second partition (70GB in 30GB and 40GB) and on the 30GB I install Ubuntu 16.04 (the partition during installation was split into 20GB - system and rest /shows 8,6GB/ as "HOME"), after few restart I try to choose Win 10 during booting, but as I wrote earlier, I cannot access Windows.   When you can help me, thank you for your answer/help  PS.: When I correct installation (using Win 10 installation disk) - fix MBR, I can run Win10 (including Win XP) - but of course not Ubuntu. So then I again reinstall Ubuntu 16.04, but problem occurs again, and I cannot access my Window installations...!


Knife tool randomly snaps to weird places and creates weird geometry

So, I have been experiencing problems using the knife tool.   Normally, when I am using the knife tool it just creates a straight line between the two points I click.  However, sometimes when I am about to confirm a cut, . (it is trying to inform me that I have cut through an edge, but I did not go through that edge and it is far away from the path I am cutting). When I click and confirm the second point, it cuts from the first point, through a weird path, usually to somewhere off my screen, and back to the second point.   This is an urgent project, help will be greatly appreciated :)  Software: Blender 2.81 2019-11-20 release  Hardware: MacBook Pro 13 inch, Late 2018, 2.3 GHz Quad-Cure Core i5, Iris Plus 655


How can maximum likelihood be used to estimate parameters for a Weibull distribution?


Safely turning a JSON string into an object

Given a string of JSON data, how can I safely turn that string into a JavaScript object?  Obviously I can do this unsafely with something like:  var obj = eval("(" + json + ')');   but that leaves me vulnerable to the JSON string containing other code, which it seems very dangerous to simply eval.


Getting "unable to verify macOS" when upgrading to Catalina

I am using version 10.14.6 of macOS currently. When I try to upgrade to macOS Catalina using software update panel, I get this error every time.   "unable to verify macos"   MacBook Pro (15-inch, 2018)  NOTE the installation process starts and after 4-5 minutes this error comes up.


Short story where an alien convinces a human to exchange consciousness with it

While reading  question, I recalled that I had read a similar story in my English textbook. The details were a bit different from this question though. An alien (who I think is a convict) convinces a human to exchange consciousnesses with it because it wants to be free. The human appears to be reluctant but at the end, it is revealed that       the human is suffering from some disease and will die soon and is happy to have gone through with the exchange.   I read it ~10 years ago at school and some of the details are probably wrong.


Python - Passing function arguments directly to cls()

I came across a code snippet as follows -   @classmethod def new(cls, **props):     '''Creates a new Thread instance, ensuring a unique _id.'''     for i in range(5):         try:             thread = cls(**props)             session(thread).flush(thread)             return thread             ...... continued   The name of the class it is defined is 'Thread'. This code creates a new thread object but I'm not able to understand how this particular code is trying to do that from the code in try block.  cls is a function?


I have added an mp3 file as a static resource, can someone please help me to call that resource in the lightning component so when I hit the button it will play that static resource  as per the Salesforce documentation I have tried below but instead of playing the sound it is displaying the message.


I am a Zimbabwean and have stayed in South Africa for 60 days. How long do I have to exit the country before returning?

I have been doing a bunch of yachting courses here in South Africa and would like to know if I can exit and re-enter South Africa on the same day to get a new visa?


When is it acceptable to call GC.Collect?

The general advise is that you should not call GC.Collect from your code, but what are the exceptions to this rule?  I can only think of a few very specific cases where it may make sense to force a garbage collection.   One example that springs to mind is a service, that wakes up at intervals, performs some task, and then sleeps for a long time. In this case, it may be a good idea to force a collect to prevent the soon-to-be-idle process from holding on to more memory than needed.   Are there any other cases where it is acceptable to call GC.Collect?


"The volume boot has only 0 bytes disk space remaining"

After a recent update, I'm getting an alert saying:  The volume boot has only 0 bytes disk space remaining   But my computer has plenty of HD space free. Does anyone know how I resolve this. (If it's relevant, I'm using the whole disk encryption feature of the alternate install image for Ubuntu 12.04).


How to make a material a texture for use in other 3d applications

I have an asset I am selling, and I am using a material that has shaders only Blender has. Is there a way to make the material act as a texture so it can work in other 3D software like 3DS Max and Maya? if it helps, i have the node setup:    I think it has something to do with baking, which I have no idea what it is or how to use it. Oh, forgot to add, it is a procedural leather texture. Is it possible for a material that has no textures to be exported and used in a different software? Would be very helpful.


let $\alpha$ be a cycle of length $s$, say $\alpha = (a_1, a_2, \ldots, a_s)$  Prove $\alpha^2$ is a cycle if and only if $s$ is odd.  Let me start off by saying I am in my 5th week of Group Theory.  I often have trouble getting these problems started.  This is my first proof based course.    I believe $\alpha^2 = (a_2, a_3, \ldots, a_1)$  Any tips on where to go from here would be great.  Also...if there are any tips for starting proofs like these in general, I could really use them! My teacher teaches as if a proofing class was a pre-req, which it was not.


Let $X:=S^1 \times S^1$ be the torus.   Is the zero and second singular cohomology group $\mathbb{Z}$, the first $\mathbb{Z}^2$ and otherwise vanishing?   To show this: One first computes singular homology which gives that the zero and second homology group equals $\mathbb{Z}$ and first homology group equals $\mathbb{Z}^2$. Using universal coefficient theorem and that homology groups are free over $\mathbb{Z}$, we get the desired.  I was just wondering, because I wanted to compute cohomology groups of the sheaf of locally constant function with values in $\mathbb{Z}$, which should coincide with the singular cohomology group, but in this case I get that the first cohomology group equals $\mathbb{Z}^4$.


Probability that $n$ trials will succeed given that $k$ succeeded

I'm not sure exactly how to ask this, or if there is such a thing.  I'm new to statistics and have just studied confidence intervals and confidence levels of survey data, such as the confidence of population mean being within the certain interval around the sample mean.  I'd like to measure some confidence in data accuracy.  I'm doing some data munging at work, basically copying some data from a source, manipulating it a bit, and then storing it in a database. I'd like to be able to tell my manager that I'm confident that the data is accurate to a certain level.  I plan on verifying the data with another tool, sampling the calculated data vs. original data (say randomly picking 10000 entries of the 62000000 and recalculating to verify), and assuming the entire sample matches, report that I am x% confident that the entire set of calculated data is correct.  However, I'm not sure what I'm measuring.  I don't want to measure a mean, but instead the accuracy of n% of the population, and infer if that means that m% is indeed accurate.  Can I only be confident that if I verify n% of the population is accurate, that only n% is accurate?


Can I travel to Svalbard and back from Norway on a Dutch Identity card?

I'm traveling to Svalbard from the UK via Norway in a couple of weeks and would like to travel on my Dutch identity card. Is this possible?


Including pdfpages renders rotated RevTeX 4.1 pdfLaTex output

This happened when I updated MikTeX to the latest version (as of time of this post) and tried the  regarding adding pdf pages to RevTeX documents. Running the code below produced text rotated by 90 degrees while commenting out the line which includes the pdfpages packages produces regularly positioned text. Note that the page number was not rotated. Can anyone reproduce this and what is the cause of this?  \documentclass[english]{revtex4-1} \usepackage{pdfpages}  % Including PDF  \makeatother \usepackage{babel} \begin{document}  Lorem ipsum dolor sit amet...  \end{document}


Locate command is returning too many results

I made the mistake of copying the same files to different partitions with good intentions of pruning (deleting) them from the source or target(s) later. Now when I try to locate them I get too many results from locate command:  rick@alien:~$ locate "display-auto-brightness" /etc/cron.d/display-auto-brightness /home/rick/Pictures/display-auto-brightness conky.png /home/rick/Pictures/display-auto-brightness systray.png /home/rick/Pictures/display-auto-brightness-config 1.png /home/rick/Pictures/ps display-auto-brightness.png /lib/systemd/system-sleep/display-auto-brightness /mnt/e/etc/cron.d/display-auto-brightness /mnt/e/lib/systemd/system-sleep/display-auto-brightness /mnt/e/usr/local/bin/display-auto-brightness /usr/local/bin/display-auto-brightness   The locate command is automatically placing the * wild card after the search string and returning extra undesired results. The .png files should not be returned.  Why is locate returning too many results?


How does the Axiom of Foundation prevent an infinitely descending membership sequence?

According to Wolfram, the axiom of foundation is equivalent to, ""A set contains no infinitely descending (membership) sequence". Why is this true?


My warlock thinks he can use Mask of Many Faces to cast Disguise Self an unlimited number of times each day, and that the effect will last for a whole day.  Is his understanding of this invocation correct?


I installed Ubuntu onto my hard drive (from this website), then I transferred it onto my USB flash drive.  When I try to boot it up it doesn't show up on my screen. What am I missing?


Algebraic integers of $\mathbb{Q}(\sqrt{m})$ for $m$ a squarefree integer

I'm currently reading Marcus' "Number Fields," and I'm having difficulty proving the following result:  Corollary 2.2: Let $m$ be a squarefree integer. The set of algebraic integers in the quadratic field $\mathbb{Q}(\sqrt{m})$ is $$ \left\{ a + b \sqrt{m} : a,b \in \mathbb{Z} \right\} $$ if $m \equiv 2,3 \pmod{4}$; and$$ \left\{ \frac{a+b\sqrt{m}}{2} : a,b \in \mathbb{Z} ~,~ a \equiv b \pmod{2} \right\}$$ when $m \equiv 1 \pmod{4}$. $\square$  It is easy enough to see that the claimed sets do, indeed, consist of algebraic integers. The other half of the proof proceeds something like this: suppose that $\alpha = r + s \sqrt{m}$ is an element of $\mathbb{Q}(\sqrt{m})$. Then $\alpha$ is a root of the polynomial $$ x^2 - 2rx + r^2 - s^2m $$ In particular, this means that $\alpha$ is an algebraic integer if and only if both $2r$ and $r^2 - s^2 m$ are integers. At this point, the proof stops, and says that this implies the result. And therein lies the problem: I don't see how to make the connection. I do know, for example, that if one of $r,s$ is an integer, then the other one must be, too, i.e., either both are integers, or both are not. However, I cannot get any further than that. Can anyone give me a gentle nudge in the right direction? Thank you very much!


I am trying to run a script like :  ./script.sh file  but I am receiving ( if I use a txt file ):  =:        cannot open `=' (No such file or directory) test.txt: ASCII text Second   If I use a gz file:  =:           cannot open `=' (No such file or directory) test.txt.gz: gzip compressed data, was "test.txt", last modified: Wed Jul 20 09:17:58 2016, from Unix Second   ( I have the script and the file in the same directory )  script:  #!/bin/bash  file = $1  if [[ $file == *.gz ]];then      echo "First" else     echo "Second"  fi


What is correct?  Australia constantly improves its roads.  Australia constantly improve their roads.  Australia constantly improves their roads.   Thank you!


is this right way to validates an email address in the form

1st post here so bear with me lol   just wanted to check my work here i have a form that validates a email address but with the change to php 5.3 now errors   can some one please look over my change and tell me what im missing as it not working   OLD WAY  function valid_email($email) { // check an email address is valid if (ereg('^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$', $email)) return true; else return false; }   NEW WAY  function valid_email($email) { // check an email address is valid if (preg_match(('^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$', $email)) return true; else return false; }   form sends with no email validation. i no its prob some thing simple but i cant work it out   thanks in advance


What is the difference between int parseInt(String s) and Integer.valueOf(String s)? Also What is radix with a numerical parameter {10 or etc}

I have used these two in Java and BlueJ but I am not sure where the difference between these two lies. Also in my book in the description given for parseInt there is a mention of radix 10. What exactly is radix 10?


My husband and I have co-signed for our son's car loan, and also he is listed on our car insurance coverage. If he gets in an accident, can we be sued?


I've heard from several places that the  is generally a bad place to find information about the rules of the game.  I don't really understand this distrust, since it's an official document from the company that makes the game.  Why is it that many people feel that the D&D 3.5 FAQ is not a valid source for rules clarifications?  I'm not necessarily looking for a list of every single thing that's wrong with the FAQ; such a list could be prohibitively long for this format.  I'm mainly looking for an overview of the main perceived issues with the document.  If such a list exists elsewhere, I wouldn't mind a link to such a list, though.  I've spent a few minutes trying various google searches for this topic, and everything that I could find was either not applicable, clearly biased, or required reading dozens of forums in order to find anything useful.


I am a beginner in LaTeX. There are some commands that I don't understand (for example \mathop and \operatorname). I want to find some material about them, but I don't know where to look.  What is a good general reference for looking up LaTeX commands? To which book or website should I refer?


How to open terminal, split to 9 terminals and switch between them using one script?

I would like to open a terminal, split it to lets say 9 parts (3x3) and execute some bash script. But for each terminal part different script.   Can this be done using perl, python or even bash?  How can I switch between those little terminals without using keyboard shortcuts?  Oh, by the way, I'm using terminator. And if there is some other terminal emulator that enables such a functionality, which is it?


Null Pointer Exception in writing java object to csv file

I want to convert Json file to CSV file. I passed data from json to java object then I try to write Java object to CSV file but it gives NPE. It probably not correctly gets the data from JSON. I'm not sure what it is.  Class for reading json to java object  public Student convertJson(File jsonFile)  {     Gson gson = new Gson();     Student std;      try{         std = gson.fromJson(new FileReader(jsonFile),Student.class);         return std;      }     catch (FileNotFoundException e) {         return null;     } }   Class for converting object to csv  private final String SEPARATOR = ", "; public void toCSV(List<Student> student) {  try{     BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("group.csv"),"UTF-8"));      for(Student std: student){          StringBuffer oneLine = new StringBuffer();         oneLine.append(std.getEmail());         oneLine.append(SEPARATOR);         oneLine.append(std.getName());         oneLine.append(SEPARATOR);         oneLine.append(std.getScoreGroup());         oneLine.append(SEPARATOR);         oneLine.append(std.getCommentGroup());          bw.write(oneLine.toString());         bw.newLine();      }     bw.flush();     bw.close();  } catch (IOException e) {     e.printStackTrace(); }   Main   File newfile = new File(pathName);     List<File> files= file.findFile(newfile);  // step 1 find files and return arralist of files     System.out.println(files);         List<Student> students = new ArrayList<>(); // array list of objects Student     ReadJson fiel = new ReadJson();             // parses passed json file and returns Student file      List<Group> info = new ArrayList<>();     java.util.Collections.sort(info);      for(int i=0;i<files.size();i++){         Student temp = fiel.convertJson(new File(files.get(i).getName()));         students.add(temp);     }       ConvertJSONFiles json = new ConvertJSONFiles();     json.toCSV(students);   Error  Exception in thread "main" java.lang.NullPointerException at ca.cmpt213.as2.ConvertJSONFiles.toCSV(ConvertJSONFiles.java:16) at com.company.Main.main(Main.java:44)   Disconnected from the target VM, address: '127.0.0.1:63683', transport: 'socket'  New problem: Now it says it cannot read because there should be object not array.     Exception in thread "main" com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 2 column 13 path $.group       at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:224)       at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129)       at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220)       at com.google.gson.Gson.fromJson(Gson.java:888)       at com.google.gson.Gson.fromJson(Gson.java:826)       at ca.cmpt213.as2.ReadJson.convertJson(ReadJson.java:17)       at com.company.Main.main(Main.java:36)


I see lots of Hot Network Questions which don't have lots of votes and views (after becoming hot network question, it gets both lots of votes and views).  How are they selected? Is this purely random or picked by human hands?


Hook before inserting user into database

I'm working on airsoft website using woocommerce. One of my client's needs is to prevent a user to register if his name or mail is in a blacklist (I don't know yet if I'll use a csv file, a json or a simple array).  So I have to execute some validations before insert the user to the database. But I didn't succeed in finding the good hook.


default mount point changed for external HD

The default mount point for my external HD changed when upgrading from 13.04 to 13.10. Now the username is added as an extra level before the hd label.   So it used to be   /media/nameofhd   and now it became   /media/username/nameofhd   This breaks a lot of links I have set up to this disk.  I know that I can mount it manually and even automatically through /etc/fstab. What I want to know is why this behaviour changed and how I can change it back to the original?  blkid and fdisk don't show anything suspicious.  thx!


How to disable the WiFi using network-manager permanently?

How to disable the wifi on boot? I'm using network-manager to manage the wifi connection and when I disable this, setting is temporary to the current session.  Exists therefore a method to make persistent settings for network-manager? thanks


How can Data wish to be human if he is emotionless?

In Star Trek: TNG, how can Data wish to be human if he is emotionless? How could he wish for something (anything) since that would involve desire, which is an emotion?


When I press tab for autocomplete in bash I get: "Cannot parse arguments: unknown option -r"

My tab key's autocomplete function is not working.  Instead, it spits out this error message: Cannot parse arguments: unknown option -r


I am trying to loop through all files located in a directory ending in .txt and rename them (replacing beginning with end). However I would like to take the output from this for loop and pipe it to a bash file so that I can check the file and make sure what I have written does what I want it to, then I can just execute the .bash file if what I see fits the task. I've tried  for file in *.txt ; do mv $file ${file//beginning/end} ; done | rename.bash   however this renamed the file and created an empty rename.bash


How to bake muffins with a convection oven and steam

I'm trying to bake muffins with a convection oven that has a steaming function. Without using steam, the muffins' edges will set first whilst the middle remains soft and when that rises, the muffins will end up pointy. Introducing steam seems to solve this issue and the muffins will rise evenly this time. However, they will shrink after a couple minutes on the rack. Please note that we're talking here about high protein muffins with added whey protein. They're also sugar-free, gluten-free and low-fat (I know, right? Sounds impossible!). So the batter has a higher than usual liquid content to mitigate for the lack of gluten, fats and sugar and high protein and fibre content which would lead to a very dense and heavy product. How to approach this type of product with this type of oven?


Get the clicked object that triggered jquery blur() event

Suppose I do this:  $(target).blur(function(e){   //do stuff });   Is there a way to fetch the object that was clicked on in order to trigger the blur action?  I tried using e.target, but that appears to be returning the object attached to the blur action rather than the clicked object.


How to open terminal from within a folder using contextual menu?

I want to create a shortcut to open a Terminal window from within a folder using contextual menu in Mavericks. What is the procedure to do so?


What should I do when I add too much salt to rice?

I accidentally added extra salt to my rice. Is there anything I can do now?


$(\forall n \in \mathbb{Z}):n^{3} \equiv n$ (mod $6$)

[This is not a duplicate, since I am seeking for an alternative proof for this problem] This is a problem from Proofs and Fundamentals, by Ethan D. Bloch.  Show that, for all $n \in \mathbb{Z}$, $n^{3} \equiv n$ (mod $6$).  I wrote my proof as follows and I would really appreciate if you could check it:  Proof: Let $n \in \mathbb{Z}$. Note that $n^{3} - n = (n-1) \cdot n \cdot (n+1)$, so the former is the product of three consecutive integers. By the Division Algorithm, we know that $n = 3q + r$, with $q,r \in \mathbb{Z}$ and $r \in \{0,1,2\}$. Since we have three consecutive integers, we know that each is either equal to $3k$, or $3k + 1$, or $3k + 2$ for some $k \in \mathbb{Z}$. Let’s suppose that $n = 3k$ for some $k \in \mathbb{Z}$ (the argument is similar for the rest two cases, so for the sake of briefness I will omit here). It follows that $n-1 = 3k - 1 = 3k - 3 + 2 = 3(k-1) +2$ and $n+1 = 3k +1$. We have to possibilites on the parity of $k$. If $k$ is even, then $k=2j$ for some $j \in \mathbb{Z}$. Hence $n = 3 \cdot 2 \cdot j = 6k$. Hence $n^{3}-n=6k(n-1)(n+1)$ and $k(n-1)(n+1) \in \mathbb{Z}$. Therefore $n^{3}-n \equiv 0$ (mod $6$) and then $n^{3} \equiv n$ (mod $6$). If $k$ is odd, then $k = 2i + 1$ for some $i \in \mathbb{Z}$. Hence $n + 1 = 3(2i+1) +1 = 6i + 4 = 2(3i+2)$. It follows that $n^{3} - n = (n-1) (3k) (2(3i +2)) = 6k(n-1)(3i+2)$ and $k(n-1)(3i+2) \in \mathbb{Z}$. Thus $n^{3}-n \equiv 0$ (mod $6$). Therefore $n^{3} \equiv n$ (mod $6$). This completes our proof. $\square$  I would also like to know that if there is other way to prove this result? (In the book, Bloch gives a hint that says to note that $n \equiv 0$ (mod $6$), or ..., or $n \equiv 5$ (mod $6$) and then in each case to compute $n^3$ (mod $6$), but I don’t know how this will work as a proof... any idea?). Thank you for your attention!


What type of armor should I use as a thief?

In past versions of the elder scrolls and many other RPGs, thieves play with light armor. Is this also the case for skyrim?  As far as I understand, both heavy and light armor affects sneaking, but as you are playing close combat, you will want to have at least some armor.   What type of armor is common for a thief, and why?   Is using spells for armor(stoneflesh etc) a good idea, or do they cause detection?


If condition won't work Google Spreadsheets

I have this formula and it doesn't work: =IF(A1="oui","1",if(A1="non","0",""))  I asked a couple of friends to test it, and oddly, it works fine with them!  What did I do wrong? And how do I fix it?


Is a transit visa required for airport terminal change in Dubai?

I would like to travel to  (free zone area in Iran) via Dubai Airport.  At Dubai Airport I arrive at terminal 1, and my flight to Qeshm leaves from terminal 3.  How can I pass from Terminal 1 to Terminal 3? Will I require a transit visa?


How to act when a researcher doesn't respond to an e-mail?

When asking an unknown researcher about their work (and, most specifically, the data they used and the availability of it) via e-mail, what timeframe could one expect as a "normal" one in which an answer would be expected? If you don't get an answer within this timeframe, how one tactfully go about persisting, if at all?  This is, of course, after .


Reference request about Thm which use Transversality to compute Homotopy Groups

I'm following the following , and my attention was caught by Theorem $1.1.4$. I am unable to find any reference of the proof. Could you suggest me some books in which there is a proof of this theorem?


Characterizing the Homotopy of Path-Connected Space

I am currently really stuck and confused about the following problem from Topology II of Encyclopaedia of Mathematical Sciences (Springer, Novikov/Fuchs):  Give an example of two path-connected spaces that are weak homotopy equivalent but not homotopy equivalent.  The problem is that I am not sure if there are such examples at all considering the Serre fibration lacking for path-connected spaces or their basis.  Could you enlighten me?


Let's say I have an array list of BaiGiangModel which I need to sort by title first. I was able to sort it using this code  list.sortWith(compareBy({it.title}))   However, the result is not perfect. Instead of getting 9 Number in front of 10 Number order, I get 10 Number then 9 Number. Everything else is fine. Any suggestions? Below is my array list.      var list= ArrayList<BaiGiangModel>()     val model1 = BaiGiangModel("10 Number")     val model2 = BaiGiangModel("9 Number")     val model3 = BaiGiangModel("A Number")      list.add(model1)     list.add(model2)     list.add(model3)   result print is: 10 Number, 9 Number, A Number  or let say I add Number 1, Number 19, Number 9 to my current list, my sorted result returns this   10 Number, 9 Number, A Number, Number 1, Number 19, Number 9


Optimal strategy for n consecutive throws of a dice and deciding if the current value is the result

You have a six sided dice. You roll the dice and decide if you want to stop and keep the current value as your result. If not you try again. You can at most throw the dice n times. If you throw it n times you have to keep the last result.  What is the optimal strategy to get the highest expected result? How to proof that this is the optimal strategy?  Example (n=3): Strategy is "Stop if you have a 5 or better". Applying this strategy you would throw 3 5 and have a result of 5. Or throw 4 1 2 and have a result of 2 as no more throws are available.


What is the range of currents that I can safely draw out of a 9V battery without damaging it?  I am planning to design an experiment and I don't want to draw too much of current out of a battery and damage it.


How to parse "Prince Andrew shook his head, laughing as a man laughs?"

"Prince Andrew shook his head, laughing as a man laughs." I guess it might be a participle clause about two actions happen at the same time in the past. So it could be "Prince Andrew shook his head when he laughed as a man laughs" but why there is comma before "laughing"?   As I saw on the grammar website, the comma should be placed if the sentence is like "emerging from the cocoon, moth swings the wings" (it's my one example). But if you wanna leave out the comma, then sentence should be like "moth swings the wings emerging from the cocoon", shouldn't it?


I have a list of strings List<string> str = new List<string> str.Add("test1"); str.Add("test2"); str.Add("test3");  After some processing this list goes to some service where the list gets modified and can have any of the three values "test1"," test2", "test3" or all of them. I want to filter this list based on the strings: "test1"," test2", "test3" and dump it into some another object. How do I filter it without giving hardcoded string values? How do I do it in C# using Linq?


For some reason, be it some bad habit or something else, I can not understand why the statement "p only if q" would translate into p implies q. For instance, I have the statement "Samir will attend the party only if Kanti will be there." The way I interpret this is, "It is true that Samir will attend the party only if it is true that Kanti will be at the party;" which, in my mind, becomes "If Kanti will be at the party, then Samir will be there."   Can someone convince me of the right way?  EDIT:  I have read them carefully, and probably have done so for over a year. I understand what sufficient conditions and necessary conditions are. I understand the conditional relationship in almost all of its forms, except the form "q only if p." What I do not understand is, why is p the necessary condition and q the sufficient condition. I am not asking, what are the sufficient and necessary conditions, rather, I am asking why.


How do I punctuate a quoted question that doesn't end a sentence?

I want my character to ask a question, but I don't know the rules to punctuation. I'll give an example. Is it:     "Are you ready to go?" He asked his wife.   Or is it:     "Are you ready to go," He asked his wife.   I'm not sure on this, because I've seen authors do it both ways, and people have said to do it both ways. I just want to do it the most correct way there is.


Login to Ubuntu after update if you don't know user name and password

I bought Laptop Dell Inspiron 15-3552 4113/SDPP/2015 5100  12439497278 Service tag (s/n) 5PQ5LJ2 MFG YR 2017 with Ubuntu 16.04.6 LTS already installed and after one update  on screen apair login user name and password which I don't know it. I check with shift/esc/space to reach at Grub menu to change the user name and password but nothing works. Please help me!


I want to create a problem booklet consisting of some questions and images on the marginpar. How to make sure the images properly float on the marginpar?  If you carefully see the left image below, you will notice that the most bottom image gets cropped as it is not properly floated.     \documentclass[twoside,12pt]{book} \usepackage[     a4paper,     vmargin=2cm,     outermargin=9cm,     innermargin=2cm,     marginparwidth=7cm,     marginparsep=20pt ]{geometry}  \usepackage{graphicx} \usepackage{marginnote} \usepackage{caption} \usepackage{lipsum}  \newcommand\MarginFig[1]{% \marginpar{\includegraphics[width=\marginparwidth]{example-image-a} \captionof{figure}{#1} \label{#1}}}    \begin{document} \chapter{Higgs Boson} \lipsum[1-3]  \begin{enumerate} \item \MarginFig{1} \MarginFig{2} \MarginFig{3} \lipsum[1-2]  \item \MarginFig{4} \MarginFig{5} \MarginFig{6} \lipsum[1-2]  \item  \MarginFig{7} \MarginFig{8} \MarginFig{9} \lipsum[1-2]  \end{enumerate} \end{document}   This question is a continuation of .  Edit 3  Bonus questions (without prizes): Among the permutation of  \MarginFig{n}, \MarginFig{n+1}, \MarginFig{n+2}, and \lipsum[1-2], which one will produce the best floating?


How to unquote a urlencoded unicode string in python?

I have a unicode string like "Tanım" which is encoded as "Tan%u0131m" somehow. How can i convert this encoded string back to original unicode.  Apparently urllib.unquote does not support unicode.


I was trying to make a uv map test for my guitar so i hit smart uv map just to see how is all going but it wont apear in the uv/image editor, i tried making some seams but nothing. I made some uv maps before and they always appeared in the uv/image editor


Example that seems to violate conservation of angular momentum

Mass m is rotating on a horizontal friction-less plane around a tiny hole. A massless string is connected to mass m and the other end of it is slowly pulled. Taking the center as our origin we see that there are no torques on the body so the angular momentum is conserved. When the body is at  the center the angular momentum will be zero since $r=0$ violating the conservation principle ? What have I incorrectly done?


How to prevent phone operator from opening spam popups?

My phone operator, Movistar Argentina, is sending a lot of spam. I managed to block most of the SMS, however it has now also started opening ad popups on my phone (see below).     I've looked at  but I cannot find the "SIM Toolkit" app anywhere on my phone to disable it. Is there any other way to block this?


Can you disable logging in as other users over ssh?

I have a Macintosh server computer with 3 users: admin, git, and server. Admin is the only administrator on the computer, while git and server are normal users. I can log in to all 3 over ssh, using public key authentication only for admin and server, while password authentication is enabled for git.  In short, I want to be able to log in directly to all 3 accounts via ssh, but only be able to switch accounts using su when I logged in first using admin. Is there a way to configure this in sshd_config?  Alternatively, is there a way you can disable su only for certain users?  The server is a a Mac Mini running macOS 10.13.5 and I am using the SSH server from the sharing menu, if that info is important.


Is it possible to create matter? In a recent discussion I had, it was suggested that with enough energy in the future, "particles" could be created.   It seems like this shouldn't be possible due to conservation but perhaps I could be wrong. Would any of you Physics masters care to elaborate?  (Note... I will understand the basics, I am by no means an expert.)


Is there a way to change the "active" collection? I can check witch collection is currently selected with this code:  >>> bpy.context.collection bpy.data.collections['My Collection']   But I can't change it using this property because is read-only. Is there a way to do that?    EDIT  After some research I found out part of the solution. I can use this code to get and set the active layer collection.  # Get the current active layer collection and store it in x x = bpy.context.view_layer.active_layer_collection # Select another layer collection from the outliner, # then use this code to restore x as active bpy.context.view_layer.active_layer_collection = x   the new problem is that x is not a Collection object, is a LayerCollection and we can't pass any collection created with the method:  myColl = bpy.data.collections.new('My Collection') bpy.context.scene.collection.children.link(myColl)   So the refined question is: How to obtain a LayerCollection for a particular Collection to change the Active Collection?


How can I disable ACL on ext4 filesystem?

I'd like to disable ACL in /etc/fstab when mount. How can I do that?


I have a bootable usb stick that has Ubuntu 12.10 on it, so I loaded it onto my computer which is semi old because it was really full and ubuntu is nice software when it works. And all went well until I booted it up the first time and it said that the Compiz thing was missing and I looked that up on the internet and I must have typed 20 different codes into terminal, and nothing seemed to work. Can you please help? I dont know what to do anymore and the only thing I can do it open up terminal because nothing pops up on the screen. Thanks :)


Is casting user input to an integer sufficient to sanitize it?

Quoting from :     Everything submitted is initially treated like a string, so forcing known-numeric data into being an integer or float makes sanitization fast and painless.   This was the sanitization method I had independently come up with for a quick and dirty query (looking up a name in a table from a numeric ID); the only variable being plugged into the query is the ID, and I know the ID should be greater than zero and less than 255, so my sanitization is as follows (with a little bit of validation thrown in too):  $id = (int)$_REQUEST['id']; if ($id < 1 || $id > 255) errmsg("Invalid ID specified!"); $name = $DB->query("SELECT name FROM items WHERE id=${id}")->fetch_all()[0][0];   Is this sufficient to prevent SQL injection attacks or any other malicious attacks based on the user-specified value of $id, or can it still be exploited?  NOTE: the ID/name are not "sensitive", so if some input inadvertently casts to "1" or another valid ID value, I don't care. I just want to avoid antics along the lines of .


This should be very straightforward but it's got me stumped!  Lets say i have a page: mysite.com/mypage.jsp  When it gets submitted to itself the url is: mysite.com/mypage.jsp?myvalue=blah  I've got the following code which never equates to true, what am i doing wrong?  String myvalue = request.getParameter("myvalue");  if ( myvalue == "blah" ) {  out.print("
You submitted the page, my value = " + myvalue + "
" );  } else {   out.print("
Page not submitted yet, my value = " + myvalue + "
" ); }


Is it possible to write "time" to bash history?

I love to know how long my CLI commands take so I often preceded them with time - sometimes I forget. Also I don't keep a record of long running commands so can't see if they vary over time.  My bash history looks like this:   1428  05/23/19 22:04:14 git status  1429  05/23/19 22:04:17 git add .  1430  05/23/19 22:04:19 git status   I've added the date/time by putting export HISTTIMEFORMAT="%m/%d/%y %T "  in my bashrc file.  Question: Is there a way to automatically record the time all all bash commands and insert that to the bash history? So for example my history would look like:   1428  05/23/19 22:04:14 (0.015) git status  1429  05/23/19 22:04:17 (0.035) git add .  1430  05/23/19 22:04:19 (0.016) git status   My shell is Terminator on Ubuntu so if there's a feature of Terminator above and beyond bash then that works too.


Let $a,b,c$ be non-negative real numbers , then $\frac{(a+b+c)^2}{3}\ge a\sqrt{bc}+b\sqrt{ca}+c\sqrt{ab}$?

Let $a,b,c$ be non-negative  real numbers , then is it true that   $\dfrac{(a+b+c)^2}{3}\ge a\sqrt{bc}+b\sqrt{ca}+c\sqrt{ab}$ ?


Find the limit of $\lim\limits_{(x,y)\to (0,0)} \frac{x^2y^2}{x^2y^2+(x-y)^2}$

Find the limit of $$\lim\limits_{(x,y)\to (0,0)} \frac{x^2y^2}{x^2y^2+(x-y)^2}$$   So, I know that $$\lim\limits_{x \to x_0} f(x)=c \Leftrightarrow \forall (x_n)\subseteq D\setminus\{x_0\}, x_n\to x_0: f(x_n)\to c \, (n\to \infty)$$  Let $x_n=\left(\frac{1}{n},\frac{1}{n}\right), y_n=\left(\frac{1}{n},0\right):$ $$f(x_n)=\frac{\frac{1}{n}^4}{\frac{1}{n}^4}=1\\ f(y_n)=\frac{0}{...}=0\\ \Rightarrow f(x_n)\neq f(y_n)\, (n\to \infty)$$  So the limit doesn't exist. Correct?


We transpose a matrix $A$ by replacing $A_{ij}$ with $A_{ji}$, for all $i$ and $j$.  However, in case $A$ has more than two dimensions (that is, it is a tensor), I don't know how to apply the transpose operation.   If A has dimensions $3\times 3 \times 8$, then what will replace $A_{ijk}$?  If $A$ has shape $3\times 3\times 8\times 8$, then what will replace $A_{ijkl}$?


Where can I ask an open discussion question?

I would like to ask a question about Java that doesn't have a specific answer. It's a question to see what people think and to share their opinion.    Will Stack Overflow tolerate this, or is there another Stack Exchange resource where I may ask a question like this?


So I was taught that:  Kinetic Energy (of electron) = Energy (of photon) - Ionization Energy  If E(photon) = IE, then KE=0 of the electron.   What does this physically/theoretically mean?   My current thoughts/interpretation is that enough energy/force is applied to ionize the electron so it is 'sufficiently far' from the atom, and then I guess it just moves with whatever speed it is moving at with natural kinetic laws, since no more energy/force is being applied....?  Any clarifications would be greatly appreciated, thanks in advance.


Update GCC compiler in Ubuntu 14.04 to 4.9

Can I upgrade my GCC compiler now in Ubuntu 14.04? Has the final usable version (4.9) been released?


employ, employer, employee - can I generalize this pattern to (verb), (verb)er, (verb)ee?

As a non-native speaking programmer, I need a general pattern to name input and output variables of operations where the variables are of the same type and I noticed that employ, employer employee is a great pattern. Can I use this for any verb?  Are the following correct?   merge, merger, mergee (the function is called merge, the one everything is merged into is called merger and the mergees are the ones that go into the merge) split, splitter, splitee (the function is "split", the original item is the "splitter" and the "splitees" are the results) connect, connector, connectee transfer, transferer, transferee approve, approver, approvee support, supporter, supportee manage, manager, managee   And so on.  If no, how do I decide when I can do this and when I can't?


Why can't regex find letters inside words?

I'm unclear as to why  re.compile("h").match("ohs")   Returns None, but it works if I remove the "o".


Wrong axis order in geotools crs when reading from EPSG:4326

Map<String,Object> params = ...; // postgis params DataStore dataStore = DataStoreFinder.getDataStore(params); SimpleFeatureCollection collection=...;// collection to save SimpleFeatureType schema = collection.getSchema(); dataStore.createSchema(schema); // but it creates with name "polygon" MyUtils.save(collection,dataStore);  // saves to database   schema before save: collection.getSchema().getCoordinateReferenceSystem().getCoordinateSystem().toString() :  EllipsoidalCS["GCS_WGS_1984",  AXIS["longitude", EAST],  AXIS["latitude", NORTH]]   postgresql table column definition:   fid          serial NOT NULL the_geom     geometry(Point,4326) Name         character varying(93)   But when I read a collection from the same source, I face: schema after read: collection.getSchema().getCoordinateReferenceSystem().getCoordinateSystem().toString():    EllipsoidalCS["Ellipsoidal 2D CS. Axes: latitude, longitude. Orientation: north, east. UoM: degree",  AXIS["Geodetic latitude", NORTH],  AXIS["Geodetic longitude", EAST],  AUTHORITY["EPSG","6422"]]   The problem is that the x y coordinates are displaced in the schema but the point values are not. I gues geotools cannot decode "EPSG:4326" correctly. CRS.decode(string,boolean longitudeFirst) guides to solution and a related question answered , but we can't change the collection.getSchema(). Problem of that question was creating a CRS with corrent axis order, but my problem is reading a feature collection with correct CRS.


Removing internal geometry before 3D printing

I am pretty new to Blender but I looked at some tutorials on how to build my own structure etc. I found one  at about 2:05 minutes, where they select all inner vertices with some clicks and removes them afterwards.  Can somebody help me to redo this on my objects? I have for example two cubes and they intersect each other. My next steps are joining these two cubes, I click in edit mode on Mesh > Faces > Intersect  Then I choose Self intersect and now I am losing track of the video, where he does Link select and inverts the selection and then magically he just removes the selected parts...  Can somebody help me on this a little.  If I let the internal geometry stay, my printouts in the printer get holes and other ugly stuff...  EDIT  Since I got now an answer where some people up voted but it is still not working in my example.  I added a screenshot  Here I have two cubes moved against each other. The answer from Gwenn suggests to use Select > Internal Faces but in my case there is only Select > Interior Faces. I guess this is a typo but it is also selecting nothing. When I click on Select > Non Manyfolds there is also no selection :-(  After following some links and checking the '3D Printing Tools' add on, I found the check function there which tells me how many problems where found in before printing (visible in the screenshot). It says no Manyfolds, maybe thats the reason. But I still have the problem of empty spaces within the 3D print where the two cubes overlap.  Again, I just created two cubes and moved them against each other until they intersect.  The only possible solution by now is to use a boolean modification, Difference and select the second cube. In this case the overlapping part gets removed from one of the cubes. Not very handy but by now the only solution which works.


What is the proper terminal-way to shutdown?

I was trying to shutdown my PC through SSH. I executed  sudo shutdown now  The user was logged-out and Ubuntu starting turning off, but it froze at the last screen with the Ubuntu logo and the loading dots. Any idea where the problem might be?  Also, what's the difference between shutdown and halt? What other similar commands are there?


Let $a$ and $b$ be two integers such that $\left(a,b\right) = 1$. Prove that $\left(a+b, ab\right) = 1$.   $(a,b)=1$ means $a$ and $b$ have no prime factors in common  $ab$ is simply the product of factors of $a$ and factors of $b$.  Let's say $k\mid a+b$ where $k$ is some factor of $a$.  Then $ka=a+b$ and $ka-a=b$ and $a(k-l)=b$.  So $a(k-l)=b, \  a\mid a(k-1)$ [$a$ divides the left hand side] therefore $a\mid b$ [the right hand side].  But $(a,b)=1$ so $a$ cannot divide $b$.  We have a similar argument for $b$.  So $a+b$ is not divisible by any factors of $ab$.  Therefore, $(a+b, ab)=1$.  Would this be correct? Am I missing anything?


Run a cron job every minute, meaning of syntax

I read somewhere that you can add a cron job to run every minute like this:  #min hour day month weekday command */1   *    *    *    *     <your command>   What does the /1 part mean? Can I omit it?


Free 100 rep on every Stack Exchange account including the parent account?

I got a 100 rep association bonus for every one of my Stack Exchange accounts when I passed 200 rep on Stack Overflow. But I was a little surprised when I saw that I got 100 rep for my Stack Overflow account as well. It was the account which caused the bonus to happen on all other sites.   I didn't understand the logic behind this, to give the bonus for the parent account as well. I'm happy to get it, and if it's a bug please don't take it away again. But is it?


What should be the MANTRA for styling radio-buttons and checkboxes?

I am trying to style all the HTML elements by making a custom style sheet. Till now, i have succeeded in making only the radio-buttons and check-boxes.  is the link for the demo. I wanted to know what are the formal guidelines for UI designing while styling these controls so that they appear more clickable. And what more could be done to make the example more pleasant looking.


Trying to write doskey with spaces and "/"

I'm trying to right doskey named that takes an argument. It should execute:  C:\User\Mercurius\Music\youtube-dl.exe -x --audio-format mp3 -f bestaudio "https://www.youtube.com/watch?v=ARGUMENT_HERE"   I tried this:  doskey youtube.com/watch?v=C\User\Mercurius\Music\youtube-dl.exe -x --audio-format mp3 -f bestaudio "https://www.youtube.com/watch?v=c2gSzYLJ8sY"   Then I tried using it but it failed:  C:\Users\Mercurius\Music>youtube.com/watch?v= 'youtube.com' is not recognized as an internal or external command, operable program or batch file.   May you please help


In a ring $(A,+, \cdot)$ if $aba = a$ then $bab = b$ and all non zero elements in $A$ are invertible.

Let $\left(A,+, \cdot\right)$ be a ring with $1$  that satisfies the following condition:  For any nonzero $a\in A$, there exists a unique $b\in A$ such that $aba = a$.  Show that $b$ also satisfies $bab = b$, and that all nonzero elements of $A$ are invertible.


Proof that a density proportional to Gaussian is Gaussian

I try to develop Bayesian estimation for one dimensional Gaussian with unknown $\mu$ and known $\sigma$. I got  \begin{align} p(x|D) &= \int p(x|\mu)p(\mu|D) d\mu  \\        &=\int \frac{1}{\sigma \sqrt{2\pi}}\exp\left(-\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^2\right)\frac{1}{\sigma_n\sqrt{2\pi}}\exp\left(-\frac{1}{2}\left(\frac{\mu-\mu_n}{\sigma_n}\right)^2\right)d\mu  \\        &= \frac{1}{2\pi\sigma\sigma_n}\exp\left(-\frac{1}{2}\frac{\left(x-\mu_n\right)^2}{\sigma^2+\sigma_n^2}\right)f(\sigma,\sigma_n)  \\        &\text{ where }  \\ f(\sigma,\sigma_n) &= \int \exp\left(-\frac{1}{2}\frac{\sigma^2+\sigma_n^2}{\sigma^2\sigma_n^2}\left(\mu-\frac{\sigma_n^2x+\sigma^2\mu_n}{\sigma^2+\sigma_n^2}\right)^2\right)d\mu \end{align}  Now, It says that $p(x|D)$ is proportional to  $$\exp\left(-\frac{1}{2}\frac{\left(x-\mu_n\right)^2}{\sigma^2+\sigma_n^2}\right)$$  as a function of x and hence $p(x|D)$ is normally distributed with mean $\mu_n$ and variance $\sigma^2+\sigma_n^2$.  I am asking for an explanation and/or proof for why $p(x|D)$ is proportional to the $\exp$ term $\Rightarrow p(x|D)$ distibuted normally.  Edit: this answer I got is general. I am asking for an explanation for this case.


How would I punctuate Sunday, November 19 6:30 to 7:30 PM when giving the date and start/end time of an event?


Zip an archive without including parent directory

I want to zip many folders in a directory tree like so   V-  something.txt  folder  folder  g.jpg  h.jar   When I try to zip it, it ends creating a zip archive with the v folder instead of the contents of it (the sub directories and files)  How can I avoid this?


What's the meaning of "on notice" and "under advisement"?

Can someone please give a clear definition and distinction of these terms, as when a public figure is asked a difficult question and says: "I'll take that on notice" or "I'll take that under advisement."


Draw a Line Between Two Points described by Trigonometric Calculations

Suppose I have two points the unit circle corresponding to 30 and 60 degrees from the x-axis.  I want to draw a line between these two points.  \documentclass[border=5mm]{standalone}  \usepackage{tikz}   \usepackage{calculator}   \usetikzlibrary{rulercompass}   \usetikzlibrary{intersections,quotes,angles}   \usetikzlibrary{calc}  \begin{document}   \begin{tikzpicture}     \draw (\cos(30), \sin(30)) -- (\cos(60), \sin(60));   \end{tikzpicture} \end{document}   But this does not execute.  What is the correct way?


My gdm login screen looks like this:     not like:    How to make it took like the second image?


Using Binomial Theorem to prove divisibility

How to use the binomial Theorem to prove that for all integers $x$ and $y$, $a\mid (a+b)^n-b^n$. I am stuck after expanding the expression, which is $$ a \mid \sum_{m=0}^n \binom{n}{m}a^{n-m}b^m-b^n $$ Could anyone please give me a hint about how to proceed after this step? Greatly appreciated!


What is the lexical scope of a function declared in another function's parameters

While coding, i faced a problem in resolving variables in a code similar to the code below:   function foo(callback) {      callback();  }  foo( function(parameter) {       // how variables are resolved here? what is the outer scope?        console.log('helloWorld');  });    The questions are:  how variables are resolved inside the anonymous function defined in foo parameters spot?  I know that javascript resolve variables using the lexical scope, but in that function, what is the outer scope ?


Summoning based on direction player is facing

I'm trying to create a jetpack with the new elytra by summoning in exploding creepers behind you to boost you, but I can only do it in one direction. I'm using this command:  /execute @e[type=Player,name=CheeseTruffles] ~-4 ~ ~ summon Creeper ~ ~ ~ {Fuse:0}   But it only hits you in one spot. Is there anyway to make the summoning location depend on the place you're looking?


How to derive addition of velocities without the Lorentz transformation?

Lorentz contraction and time dilatation can be deduced without Lorentz transformation. Can you deduce also the theorem of    $$w~=~\dfrac{u+v}{1+uv/c^2}$$   without Lorentz transformation? Using just the constancy of light speed.


Make somebody laugh Vs crack somebody up

Suppose someone makes you laugh so much that your stomach starts to hurt. In this case do the following sentences mean the same if you want to tell that person about what he has done:        You made me laugh so much that my stomach hurts.   You cracked me up so much that my stomach hurts.


Representation of rational number in special form

Prove that any positive rational number $\dfrac{m}{n}$ can be represented as $\dfrac{a^3+b^3}{c^3+d^3}$ where $(a,b,c,d)\in \mathbb{N}^4$.  Can anyone give a full solution please? Unfortunately I have no idea in particular for $m=2$ and $n=1$.


How to distinguish Nexus 7 (2012) and Nexus 7 (2013)

I am having trouble with Bluetooth Low Energy (BT 4.0) on a Nexus 7.  I think I may have a 2012 model.  How to tell if I have a 2012 or 2013 version of the Nexus 7?


Forgive me if this has been answered, as my phone isn't letting me search StackOverflow. I searched Google but couldn't find any information.  I'm an aspiring programmer learning C++.  While I'm reading people's questions and such, I see the term "O(n)" releatively often.    Could anyone shed some light on this and tell me what that means?


What is the difference between summation and integration?

In high school we are studying Integral calculus   Before this we have studied summation which have symbol called 'sigma' $\sum $  Both works similar, sums up the numbers in domain   So my question is what is the difference between the two??  Because I am new to calculus, I don't know too much about calculus.  Please help!!


Is there a bijection from $[0,1)$ to $\mathbb R ?$

I know a   continuous bijection  from $[0,1)$ to $\mathbb R$  cannot exists but what happens if we lift the restriction of continuous $?$  Can there exists a bijection , not necessarily continuous from $[0,1)$ to $\mathbb R ?$   $(0,1)$ is bijective with $\mathbb R.$ Although I doubt that would be any useful here.


Hot Network Questions favicons are completely shuffled around

A few of the Hot Network Questions icons are shuffled around for some reason. For instance, "Really, really hard wood - how is it cut and formed" is not a Workplace link, it is a worldbuilding link. Then "Using a fake name for book" is a writing link rather than a worldbuilding one. "Is main a valid Java identifier?" is Stack Overflow, not some general Stack Exchange.  I've opened  in an incognito window to test with no cache and I can still reproduce this.


Well, I've been a victim of Ddos attacks and I really can't figure out how to avoid it. On some machines it works, while on some it doesn't or probably I'm doing it wrong in some way,  Attackers are using multiple IPs to attack my game server ports that make my game-server output 1mb/s to each IP Address, these are UDP reflective attacks technically. Here is how I see to protect them,      iptables -A INPUT -p udp -m state --state NEW -m recent --set --name DDOS --rsource       iptables -A INPUT -p udp -m state --state NEW -m recent --update --seconds 1 --hitcount 5 --name DDOS --rsource -j DROP   Technically this would block every attacker on UDP ports. I check if the attacker is blocked using "iftop" or "tcpdump" when I see that the output to attacker's IP becomes 0, this confirms me that the protection is working.  On my CentOS 6 machine running iptables 1.4.7, I am using similar method to block it and its really weird that it works sometimes and the next hour it doesn't. After a lot of tries, I restarted my system and iptables, protection worked fine and attacker was blocked. I logged into my system today and he is attacking me again and although I restarted iptables, hes not getting blocked. I dont want to restart my system again and again to make it work so what could be the issue?  Also, some people say UDP is state-less but whatever it technically is - I've always used this command and it has worked before for me, why not now or why partially now?