I guess I've been somewhat ignorant when it comes to the finer details of pcb layout. Lately I've read a couple of books that try their best to lead me on the straight and narrow. Here is a couple of examples of a recent board of mine, and I have highlighted three of the decoupling caps. The MCU is a LQFP100 package and the caps are 100nF in 0402 packages. The vias connect to ground and power plane.     The top cap (C19) is placed according to best practices (as I understand them). The other two are not. I haven't noticed any problems. But then again the board has never been outside the lab.  I guess my question is: How big a deal is this? As long as the tracks are short, does it matter?  The Vref pins (reference voltage for the ADC) also have a 100nF cap across them. Vref+ comes from an onboard TL431 shunt regulator. Vref- goes to ground. Do they require special treatment like shielding or local ground?    EDIT    Thanks for great suggestions! My approach has always been to rely on an unbroken ground plane. A ground plane will have the lowest possible impedance, but this approach may be too simplistic for higher frequency signals. I've made a quick stab at adding local ground and local power under the MCU (The part is an NXP LPC1768 running at 100MHz). The yellow bits are the decoupling caps. I'll look into paralleling caps. The local ground and power are connected to the GND layer and the 3V3 layer where indicated.  The local ground and power are made with polygons (pour). It's going to be a major rerouting job to minimize the length of the "tracks". This technique will limit how many signal tracks can be routed under and across the package.  Is this an acceptable approach?


How to avoid Exif data rotating images automatically after upload?

an image has been taken upside down, then rotated with any software, then uploaded to my Drupal website and it shows how it was originally taken because it read the Exif metadata.   Is there a way to avoid this?  or, if that's not possible,  how can I add a rotation Image Style drop down that the editor can select when creating the node?  Based on the picture preview, after uploading the picture, the editor would select an Image Style that would set the orientation of the picture right. if the picture is upside down, the editor could selec


How to enable and disable Add-ons via Python?

Problem I'm creating an addon loader that allows developers to test their addon in realtime from their external development environment (like eclipse and pydev). Since Blender does not reload all addons automaticly I have to deactivate and reactivate the addon (the refresh button does just update the addon list) My Idea I thought I could dig a bit in the Blender sourcecode and use the original code that activates and deactivates an addon. I found several things (in space_userpref.py line 1227 & line 1263) that could do what I want, but it never worked. I need the simplest way of de- and reactivating an addon with a known name.


My visa was refused and all the necessary documentations were provided but the decisions don't add. So better clarifications are needed. Thanks


What do the Squared Brackets stand for in $\mathbb{Z}[\mathrm{i}] $

What do the Squared Brackets stand for in e.g.  $\mathbb{Z}[\mathrm{i}] $?


injective holomorphic function on a convex set

Let $G$ be a convex area and $f:G \rightarrow \mathbb C$ be a holomorphic function (with continious derivative). Prove: If $|f'(z)-1|\lt 1,$ then f is injective on $G$  Could anyone give me a hint ? I dont know how to tackle this problem


Finding out Ip address from a Hostname using only Javascript

I was trying to create a github.io site which have a URL box where we can enter any URL and as an output, I need the IP address of the URL entered by the user. I tried several methods but none of them worked. I tried to get solutions from so many similar questions in stackoverflow but all of them are returning the users IP address instead of the IP address of the URL the user entered.   Is there a way to create this in Only Javascript (+HTML) ?


Leave-One-Out-Cross-Validation error for least squares linear regression

In LOOCV, in general, the model has to be fit n times (n being the number of observations). The test error is then estimated as a mean of all the individual test errors.  Hastie and Tibshirani mention in section 5.1.2 of their  that with least squares linear or polynomial regression, the cost of LOOCV reduces to that of a single model fit, given by  $CV_{(n)} = \frac{1}{n}\sum_{i=1}^n (\frac{y_i - \hat{y_i}}{1 - h_i})^2$  where $\hat{y_i}$ is the $i$th fitted value from the original least squares fit, and $h_i$ is the leverage statistic.   Could you please explain how this result can be proved? Even after getting the estimate for the test error, how is the model chosen?


How can I "cat" a file and remove commented lines?

I'd like to know if there is a way that I could cat file like php.ini and remove all lines starting with ;  For example, if the file contained this:  ;   - Show all errors, except for notices ; ;error_reporting = E_ALL & ~E_NOTICE ; ;   - Show only errors ; ;error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR ; ;   - Show all errors except for notices ; error_reporting  =  E_ALL & ~E_NOTICE   and I ran the correct command cat | {remove comments command}, then I would end up with:  error_reporting  =  E_ALL & ~E_NOTICE   Note - I assumed that cat would be the best way to do this but I'm actually fine with the answer using another utility like awk, sed, egrep, etc.


Does the sign of scores or of loadings in PCA or FA have a meaning? May I reverse the sign?

I performed principal component analysis (PCA) with R using two different functions (prcomp and princomp) and observed that the PCA scores differed in sign. How can it be?  Consider this:  set.seed(999) prcomp(data.frame(1:10,rnorm(10)))$x              PC1        PC2  [1,] -4.508620 -0.2567655  [2,] -3.373772 -1.1369417  [3,] -2.679669  1.0903445  [4,] -1.615837  0.7108631  [5,] -0.548879  0.3093389  [6,]  0.481756  0.1639112  [7,]  1.656178 -0.9952875  [8,]  2.560345 -0.2490548  [9,]  3.508442  0.1874520 [10,]  4.520055  0.1761397  set.seed(999) princomp(data.frame(1:10,rnorm(10)))$scores          Comp.1     Comp.2  [1,]  4.508620  0.2567655  [2,]  3.373772  1.1369417  [3,]  2.679669 -1.0903445  [4,]  1.615837 -0.7108631  [5,]  0.548879 -0.3093389  [6,] -0.481756 -0.1639112  [7,] -1.656178  0.9952875  [8,] -2.560345  0.2490548  [9,] -3.508442 -0.1874520 [10,] -4.520055 -0.1761397   Why do the signs (+/-) differ for the two analyses? If I was then using principal components PC1 and PC2 as predictors in a regression, i.e. lm(y ~ PC1 + PC2), this would completely change my understanding of the effect of the two variables on y depending on which method I used! How could I then say that PC1 has e.g. a positive effect on y and PC2 has e.g. a negative effect on y?    In addition: If the sign of PCA components is meaningless, is this true for factor analysis (FA) as well? Is it acceptable to flip (reverse) the sign of individual PCA/FA component scores (or of loadings, as a column of loading matrix)?


No content displayed in native Android app

This happens in all questions on all Stack Exchange sites.   App Version: 1.0.85 Device Manufacturer: Motorola Device Model: Nexus 6 OS Version: 6.0.1 (2756745)


This is my class  public static class FeedItem {     public int likesCount;     public boolean isLiked;      public FeedItem(int likesCount, boolean isLiked) {         this.likesCount = likesCount;         this.isLiked = isLiked;     } }   This is the other class where i utilised the FeedItem Class  class PostViewHolder extends RecyclerView.ViewHolder {     FeedItem feedItem;     FeedItem getFeedItem() {         return feedItem;     } }   Then i use it in an animation file   FeedItemHolderInfo feedItemHolderInfo = (FeedItemHolderInfo) preInfo; FeedAdapter.PostViewHolder holder = (FeedAdapter.PostViewHolder) newHolder;  animateHeartButton(holder); updateLikesCounter(holder, holder.getFeedItem().likesCount);   Now in the MainActivity has a method where i update the arraylist   public void updateItems(boolean animated) {     feedItems.clear();     feedItems.addAll(Arrays.asList(             new FeedItem(33, false),             new FeedItem(1, false),             new FeedItem(223, false),             new FeedItem(2, false),             new FeedItem(6, false),             new FeedItem(8, false),             new FeedItem(99, false)     ));     if (animated) {         notifyItemRangeInserted(0, feedItems.size());     } else {         notifyDataSetChanged();     } }   But the app crashes at point  updateLikesCounter(holder, holder.getFeedItem().likesCount);   With the error being shown as     java.lang.NullPointerException: Attempt to read from field 'int com.example.alsongdunstan.thefaithapp.ui.adapter.FeedAdapter$FeedItem.likesCount' on a null object reference   Here i have even tried initialising the object from MainActivity before i call the updateItems Method   itemList.add(new FeedAdapter.FeedItem(124,false));   Though another error arises which i dont want. Some here Thanks


Limit of a sequence $\sqrt{1+\sqrt{\underbrace{1+ \ldots +\sqrt{1}}_{n}}}$

$\sqrt{1+\sqrt{\underbrace{1+ \ldots +\sqrt{1}}_{n}}}$  I think the limit is $2$ for intuitive reasons. Now, to prove it, I need to use the definition of a sequence's limit. So, I need to solve the following inequality  $|\sqrt{1+\sqrt{\underbrace{1+ \ldots +\sqrt{1}}_{n}}}-2| < \epsilon$  for an arbitrary $\epsilon$. But I'm not sure it is possible. One implication of the inequality is   $\sqrt{1+\sqrt{\underbrace{1+ \ldots +\sqrt{1}}_{n}}} < \epsilon + 2$  What I found out is the same as  $ \underbrace{( \ldots ((}_{n-1}\epsilon + 2\underbrace{)^2 - 1)^2 \ldots )^2}_{n-1} - 2 > 0$  But I'm not sure it is solvable in this form.


How to use multi expression methods in Entity Framework query

I use same EF query multiple times in my application so I need something like this:  private Expression<Func<Student, bool>> StudentIsActive() {     return (x) => !x.IsDeleted && x.ItemsNumber > 0 && x.Sort > 0 && x.Status == StudentStatus.Active; }  private Expression<Func<Student, bool>> StudentIsBusy() {     return (x) => x.Mode == ModeType.Busy && x.Jobs.Count() > 0; }   I want to use same logic in multiple of my queries, like:   var students = context.Orders.Where(x => StudentIsActive() && StudentIsBusy()).ToList();   Does any one have any idea about this? how could I use AND or OR logic between expression methods?


Where can I find a compatible graphics driver for an old unsupported graphics card?

So here's the problem. I have a rather old laptop, bought it in 2007. It's an Acer Aspire 5100-5023 if that means anything to anyone. It has an integrated graphics card, ATI Radeon Xpress 1100. ATI (I guess AMD now) no longer provides legacy support for this card.  Now I have Ubuntu 12.10. It has xorg 1.13. Unity wont run correctly with out that version of xorg. However, any existing catalyst drivers aren't compatible with xorg 1.13. The OpenGl drivers I currently have seem to be sufficient for my usualy activities. Any graphics problems encountered thus far have been tolerable, I'm even at 1920x1080 resolution (I have a monitor attached, the built in screen on my laptop could never dream to do that. It's really a dinosaur now.)  The problem arises when I try to run games. Particularly I've been trying to run Starcraft 2 through PlayOnLinux which is a front end for Wine. I have to enable the debugger to see what's wrong and it points to OpenGl not being able to render a 3d environment. Particularly err:winediag:wined3d_dll_init The GLSL shader backend has been disabled. You get to keep all the pieces if it breaks. But that's irrelevant information to my problem.  SO here's my question: What is the best alternative graphics driver for my graphics card? The proprietary drivers are not compatible with the current version of xorg while OpenGl drivers are inefficient. There are probably people working on creating a compatible driver, but I figure I'd ask to see if there are any projects out there for creating the driver that I so need.  Chances are there are other older graphics cards that are in need of compatible drivers. With such a need there is bound to be a solution.  This information may or may not be relevant. The output of dmesg | grep -i radeon is      [   64.010927] [drm] radeon defaulting to kernel modesetting.     [   64.010933] [drm] radeon kernel modesetting enabled.     [   64.011036] radeon 0000:01:05.0: power state changed by ACPI to D0     [   64.011042] radeon 0000:01:05.0: power state changed by ACPI to D0     [   64.012906] radeon 0000:01:05.0: VRAM: 256M 0x0000000070000000 - 0x000000007FFFFFFF (256M used)     [   64.012911] radeon 0000:01:05.0: GTT: 512M 0x0000000080000000 - 0x000000009FFFFFFF     [   64.012954] [drm] radeon: irq initialized.     [   64.022849] [drm] radeon: 256M of VRAM memory ready     [   64.022852] [drm] radeon: 512M of GTT memory ready.     [   64.053820] [drm] radeon: 3 quad pipes, 1 z pipes initialized.     [   64.074991] radeon 0000:01:05.0: WB enabled     [   64.075003] radeon 0000:01:05.0: fence driver on ring 0 use gpu addr 0x0000000080000000 and cpu addr 0xf04fe000     [   64.799739] [drm] radeon: ring at 0x0000000080001000     [   64.812571] [drm] radeon legacy LVDS backlight initialized     [   64.812576] [drm] Radeon Display Connectors     [   64.814687] [drm] radeon: power management initialized     [   65.090504] fbcon: radeondrmfb (fb0) is primary device     [   65.090827] fb0: radeondrmfb frame buffer device     [   65.090840] [drm] Initialized radeon 2.18.0 20080528 for 0000:01:05.0 on minor 0   The output of sudo lshw -c display is        *-display                           description: VGA compatible controller            product: RS482 [Radeon Xpress 200M]            vendor: Advanced Micro Devices [AMD] nee ATI            physical id: 5            bus info: pci@0000:01:05.0            version: 00            width: 32 bits            clock: 66MHz            capabilities: pm vga_controller bus_master cap_list rom            configuration: driver=radeon latency=66 mingnt=8            resources: irq:17 memory:c0000000-cfffffff ioport:9000(size=256) memory:b0100000-b010ffff memory:b0120000-b013ffff   Also when I go to see the graphic's menu under system information it said that the driver was unknown. However, this time when I went to check it it said "Gallium 0.4 on ATI RS480 " while earlier today it was unknown. I don't know if this has something to do with me playing around with playonlinux or a recent update.


Where do packages installed/upgraded with APT get stored?

As time goes by we tend to do apt-get install and add or replace software.  Are these archived in some form or do they get auto-cleared after installation? And if it doesn't get auto-cleared, it would mean that a clean up is needed, isn't it?  Finally, if they're not auto-removed, can we reuse these packages on different machines?


logistic regression - complete/quasi-separation

What is the implication if I don't fix a logistic regression that has complete or quasi separation? can I still read the marginal effects or are they not going to be valid?   My exercise is actually to just find out which independent variables are most predictive of Y.   I read some responses to complete/quasi-separation and I tried using logistf package for R but got this error message "NA/NaN/Inf in foreign function call logistf". why does this arises?


Can I generate in C# auto-property with default value?  public class MyClass {      MyClass()      {          Reason = "my reason";      }       public string Reason{ get; set; } }


Explanation of unpredictable behaviour of tee

I encountered a behaviour that I don't understand while testing a script that sums the outputs from repeated executions of a program. To reproduce it create the text files out, which represents the output of my program, and sum, the file that holds the sum of the values returned on previous executions and which starts out as a copy of out,  cat > out << EOF 2 20 5 50 EOF cp out sum   The strange thing happens on running  paste out sum | awk '{$1 += $3; $2 += $4; NF = 2; print}' | tee sum   several times (15-20 times might be needed). Each time it runs, this command should add to the values in sum the corresponding values in out and write the results back to sum. What I get is that it works an unpredictable number of times, then sum reverts back to  2 20 5 50   I have later learned that  and solved the issue using a temporary file, still, this behaviour baffles me:   why does … | tee sum work at all (even if only for a limited number of iterations), while … > sum never overwrites sum? why doesn't it work a predictable number of times?


Comparing negatives (It is nice not to be rude.) vs. (It isn't nice to be rude.)

What is the difference in style and meaning between the following two in terms of the adjective "nice"?   (It is nice not to be rude.) (It isn't nice to be rude.)   besides, what is the difference in style and meaning between the following two in terms of the verb "decide"?   (I decided not to come) (I didn't decide to come.)


Let (X,d) be a metric space. Let $\varepsilon > 0$ and let $x \in X$. We view X as a topological space w.r.t. the topology induced by d and write $$\overline{B}_{\varepsilon}(x) = \{x' \in X \mid d(x,x') \leq \varepsilon\}$$ for the closed $\varepsilon$-ball around x. I need to show that: $\overline{B_{\varepsilon}(x)} \subset \overline{B}_{\varepsilon}(x)$ I know that $B_{\varepsilon}(x) \subset \overline{B}_{\varepsilon}(x)$ So if I show that $\overline{B}_{\varepsilon}(x) \subset X$ is closed, then I am ready I think, since the closure of a set is the smallest closed subset of X that contains this set. How do I show that $\overline{B}_{\varepsilon}(x) \subset X$ is closed? I think I can show this to show that the complement is open. But I don't know how.


When I teleport a container (e.g. a chest or bag), do the contents go with it?

The  spell allows one to teleport an object:     This spell instantly transports you and up to eight willing creatures of your choice that you can see within range, or a single object that you can see within range, to a destination you select. If you target an object, it must be able to fit entirely inside a 10-foot cube, and it can't be held or carried by an unwilling creature.   Suppose I want to send a chest full of items to someone far away. If I cast teleport on the chest to send it to them, do the contents go with it, or do they stay behind and spill out onto the floor where the chest used to be?  Does the answer change if, instead of a mundane container, I use a ?


What's the earliest a planet could have been formed?

From what I know the Earth is ~4 billion years old and the universe is ~14 billion years old.   Are there factors that prevented the Earth from forming for that first ~10 billion years?  Perhaps planets that formed closer to the center of the universe/big bang could have formed earlier?  So in essence I'm asking what is the earliest that a planet could have formed and what are the factors/scenario/circumstances for this to happen?


Integral of $\int_{\mathbb{R}}e^{-\frac{x^{2}}{2}}\left(\cos\left(\pi nx\right)\right)dx$

I was in need to urgently solve this integral. I already know the result in the closed form, does anybody know how to solve it?  \begin{equation}  \int_{\mathbb{R}}e^{-\frac{x^{2}}{2}}\left(\cos\left(\pi nx\right)\right)dx=\sqrt{2\pi}e^{-\frac{n^{2}\pi^{2}}{2}}, \end{equation} If anybody already knows it is welcome, otherwise I guess I will have to look tomorrow with more calm


Evaluate $\sum\limits_{k=3}^{k=7} {(k+1)\choose (7-k)}$

I came across this problem in which we had to evaluate $$\sum\limits_{k=3}^{k=7} {(k+1)\choose (7-k)}$$ All I could think of was to put in the values of k and get $${4\choose4}+{5\choose3}+{6\choose2}+{7\choose1}+{8\choose0} = 34$$ Is there a more efficient way (possibly using binomial concept) to solve this sum?


How do I write a correct micro-benchmark in Java?

How do you write (and run) a correct micro-benchmark in Java?  I'm looking for some code samples and comments illustrating various things to think about.  Example: Should the benchmark measure time/iteration or iterations/time, and why?  Related:


After installing Ubuntu 19.04 I can't set the hotkey to change the keyboard layout to Alt+Shift. I'm opening to Settings -> Devices -> Keyboard searching for Input and trying to set Alt+Shift but nothing is happening. Any ideas?


How to recover my list of who's naughty and nice?

This year, I finally made the switch to Ubuntu Linux. *  One of my elves (who knows a thing or two about computers) helped me migrate from my old Windows Me computer to a newer machine with Ubuntu installed.  I don't know anything about databases or spreadsheets or anything like that. I used to use Notepad to keep track of who's been naughty or nice. My elf friend recommended gedit as a replacement for Notepad (elves like Gnome for some reason...) and I was able to open and edit the files (naughty.txt and nice.txt) no problem.  As I was checking my email this morning, I encountered the following message:    Naturally, I copied-and-pasted the command into a terminal and ran it. It asked for my password, which I carefully entered. After a few minutes, everything stopped working. My elf friend came over and muttered something I couldn't understand and quit his job on-the-spot.  So now Santa is stuck. Can you please help me recover the lists? Time is starting to run out since I need the files back by December 24.  Anything would be appreciated. In exchange for assistance, I am willing to accept removal requests for the naughty.txt list.  * If I'm going to represent charity to the world, I ought to reflect that in my choice of operating system, no?


Lebesgue integral of a bounded measurable function over a measurable subset of a measurable set of finite measure.

Let $f$ be a bounded measurable function on a set $E$ of finite measure. For a measurable subset $A$ of $E$, show that $\int_A f=\int_E f\cdot\chi_A$, where $\chi_A$ is a characteristic function on $A$ and $\int_A f$ is the Lebesgue integral of $f$ on $A$.   How am I going to establish this? Help please. Thanks


Access data in Visualforce/Formula fields through Custom Junction Object

I have three custom objects: Entity, Residency, and Address. Entity and Address have a many-to-many relationship; Residency is the junction object (two master-detail relationships.).  Is it possible to access fields on a related Address object from an Entity object? For example, to implement a formula field on Entity which automatically finds the Current Address based on Address move-in date. Or to show one or more objects from the Residency related list (which contains columns from Address objects) in a Visualforce page with standardController="Entity"?  I've used Apex to look at the fields on Entity objects, and Residency__r is not one of them. What are some work-arounds to access data in both directions in a double master-detail relationship? Should I instead create a many-to-many relationship using lookups?  Thanks!


My registrar blocked my account and will not release my domain name. How should I register it with other registrars?

I have registered a .buzz domain and after a week my registrar, blocked my account and changed the who-is info and name servers.   When I got in touch with them, they told me that because they cannot work with my country, I live in Iran for clarification, they have blocked me out and I should wait until the registration period ends like a full year, if I want to register it with other registrars, and they will not either let me to transfer my domain!!!  As I have found out they have parked my domain and are showing they own ads and there is also a button for getting more information about how to buy it!!!  What should I do now to get back my domain from them?! I should have some rights on that domain anew because I have registered it for the first time, and its not seems logical that they can hold my domain name just because they don't want to work with me. Please help me. I should also say that they have refunded my money but the problem is that I need my domain name not my money.


How to assess the similarity of two histograms?

Given two histograms, how do we assess whether they are similar or not?  Is it sufficient to simply look at the two histograms? The simple one to one mapping has the problem that if a histogram is slightly different and slightly shifted then we'll not get the desired result.  Any suggestions?


I have tried researching this topic on grammarly and on this website (), but still am unsure.   Which is correct?  His gaze turned up, as if there were an imaginary light bulb there.  Or  His gaze turned up, as if there was an imaginary light bulb there.  I say “were” because I think this is subjunctive, but my friend says it’s “was.”  Thanks


How to change the background color only for the current page?

How can I change the background color only for the current page? I found that I can change the color with \pagecolor{color} but that unfortunately changes the color for all pages after this command. Any ideas how to limit this command only to the current page?


System.LimitException: Too many SOQL queries 101   I am getting this error on below line  List <Call_Report_Attendees__c> cra =  [Select id,  currencyIsoCode,Call_Report__c from Call_Report_Attendees__c where Call_Report__c  in:setAttendeeId];   Please help me remove this error.


how to append words of two files word by word

I have two files with the same number of words and column fields in each line. I want to append these two files word by word. For example:  File 1:  A1 B1 C1 D1 E1 B1 C1   File 2:  A2 B2 C2 D2 E2 B2 C2   The output should be (the number of words should be respected):  A1_A2 B1_B2 C1_C2  D1_D2 E1_E2 B1_B2 C1_C2


Relativistic velocity addition from time dilation

I'm trying to derive the relativistic velocity addition equation using the time dilation equations but I get a wrong result. Assume the widely used scenario in which there are 3 clocks: O, A and B. A is moving relative to O at velocity $v$. B is moving relative to A at velocity $w$. Find the velocity of B relative to O (in O's frame of reference). The time dilation equations says:  $$t_A = t_O \sqrt{1-v^2/c^2}$$  $$t_B = t_A \sqrt{1-w^2/c^2}$$  $$t_B = t_O \sqrt{1-u^2/c^2}$$  From these 3 equations we want to derive $u$. Then we get:  $$t_O \sqrt{1-u^2/c^2} = t_O \sqrt{1-v^2/c^2} \sqrt{1-w^2/c^2}$$  $$1-u^2/c^2 = (1-v^2/c^2) (1-w^2/c^2)$$  $$1-u^2/c^2 = 1-v^2/c^2-w^2/c^2+v^2 w^2/c^4$$  $$u^2 = v^2 + w^2 - v^2 w^2/c^2$$  This is different from the equation  $$u = \frac{v + w}{1+v w/c^2}$$  Why doesn't the derivation of velocity using the time dilation equations alone work?


How could Kowalski remember what happened in New York? And is the movie explanation?

Whoever saw the trailer is able to see that Kowalski plays a major role in the Fantastic Beasts: The Crimes of Grindelwald.      But at the end of the end of Fantastic Beasts and Where to Find Them, every Muggle was obliviated. So how does it come, that he remembers what happened?   In Fantatic Beasts II there was one explanation for it:      According to Kowalski, he could remember everything, because the magic Newt did only erased bad memories. So he kept most of his memories - and Queenie Goldstein helped with the rest of the memories. But I don't buy it. At the end of Fantastic Beasts I, he couldn't remember Queenie at all - he only had some weird memories and baked weird bread. Is that a plothole?


VS Code doesn't open from command line as root

I'm using Ubuntu 18.04.5 LTS (Bionic Beaver). I'm trying to run VS Code using these commands: >> sudo -s # mkdir ../user-data-dir # cd <project_path> <project_path># code . --userdata-dir ../user-data-dir <project_path>#  I used to launch VS Code using these commands as root before, but now it is not working. I get no errors in the command line. code . does open VS Code if I'm not running as root. Help please?


jQuery :contains selector isn't working as expected

I'm trying to select calendar event titles that have a specific word and use this to change the background colour of the event.  Please see my code below. This changes all events to have the background colour of red even if event title doesn't contain the word 'Test'. I've even changed 'Test' to 'uhrguqhergoieqhrgeurgherogih' but it still changes everything.   Unfortunately I can't see anything similar on SO so hopefully one of you could help me out please! :)  Thanks in advance!  $(window).on('load', function() {     if($(".fc-event-title:contains('Test')"))     {       $('.fc-event').css('background-color', 'red');     } });


Why does this crash at use of a null reference parameter, and not where it is initialized?

I tested the following code in gcc 4.8.3 and msvc v120.  #include <iostream> using std::cout;  void bar(int &x) {     cout << "bar\n";     int y = x; // Crash here... } void foo(int *x) {     cout << "foo\n";     bar(*x); // No crash here... } int main() {     foo(0);     return 0; }   output:  $ ./test foo bar Segmentation fault (core dumped)   I expected that it would crash upon the *x, however it crashes when the int reference is dereferenced.  It was compiled with the following g++ -O0 -std=c++11 -pedantic -o test test.cpp.  Does anyone have an explanation for this behaviour?  How is the reference initialized without dereferencing the null pointer?


Automatically sync Meetup events with Google Calendar

Is there anyway to automatically have my  event calendar sync up with Google Calendar, or even Outlook?  Update  I want to do this for all of my groups at once (not each individual group)


Graphics horribly corrupted on Ubuntu 16.04 in VirtualBox, showing random strips of pixelated colors

Inside a VirtualBox VM, I have installed myself an Ubuntu 16.04.1 LTS Server installation. However, when I installed the ubuntu-desktop package and rebooted, this happened:    Exact command I used: sudo apt-get update; sudo apt-get install ubuntu-desktop ..and then a reboot command.  This just seems like a corrupted top-left portion of the screen, as my cursor can appear in view (but corrupted):    This is a purely graphical issue because I can use the keyboard to successfully progress to a desktop:    Note: On startup it shows correct graphics for a split-second then reverts to glitch.    Any help on this?


Wine installation problem with ubuntu 17.10 64bit

So, I just installed Ubuntu 17.10 on my 64 bit PC. After that I went to install chromium, spotify and other daily things I use on my PC. But then I needed to install some sort of program to be able to play Paladins on it.  I went to google it and found out that I need to use Wine. Fine. I went to their website and did everything I was asked. Here's what I did:   I went to the "Download" page. I clicked on "Ubuntu - WineHQ binary packages for Ubuntu 14.04, 16.04, and 17.10" "If your system is 64 bit, enable 32 bit architecture (if you haven't already)". I also did that too. When I ran the code: sudo dpkg --add-architecture i386 I get this: dpkg: error: unknown option --add-arhitecture I ignored it (Maybe I was a fool for doing that), and moved on. I did the rest of the things that returned "OK" but then I run this code: sudo apt-get install --install-recommends winehq-stable and I get this error: E: Unable to locate package winehq-stable   Now, I don't know if it is from my Ubuntu installation as I took it from their website so I suppose it is a "clean" installation. I used PowerISO tools to create a bootable USB. Everything went perfect on the installation, so I don't think it is from the OS itself. Thank you if you at least tried to help me.


Find $\lim_{n \to +\infty} \frac{1}{n}\sqrt[n]{\frac{(2n)!}{n!}} $ using Riemann integral

Wonder how to determine this limit by the use of Riemann integral. The limit is as follows:  $$\lim_{n \to +\infty} \frac{1}{n}\sqrt[n]{\frac{(2n)!}{n!}} $$  My instructor told me that the usage of Riemann integral gives spectacular result. Checked Rudin, but did not find any valuable references.  I am very interested in seeing how this "spectacular result" emanates.  Help/advices/solutions very, very appreciated!


Regex all character plus some punctuation character

My code works fine for characters a-z and .,?!. Is it possible allow all Cyrilic (Russian, Serbian) and Scandinavian characters as well as .,?!?  $('#myInput').bind('keydown', function(event) {   switch (event.keyCode) {     case 8: // Backspace     case 9: // Tab     case 13: // Enter     case 37: // Left     case 38: // Up     case 39: // Right     case 40: // Down       break;     default:       var regex = new RegExp("^[\wa-zA-Z0-9.,?!/]+$");       var key = event.key;       if (!regex.test(key)) {         event.preventDefault();         return false;       }       break;   } });


What is the expression to suggest a few dates and times to meet?

Let's say a friend of mine tells me the following:     Nice! Let’s meet up for a drink this week.   And I want to say, "Sure let's do it. I will propose a few ..., and you tell me if either of them works for you."  I cannot come up with an idiom or other expression that works.


Alternative combinatorial proof for $\sum\limits_{r=0}^n\binom{n}{r}\binom{m+r}{n}=\sum\limits_{r=0}^n\binom{n}{r}\binom{m}{r}2^r$

I have a question with regards to combinatorics. I am supposed to show the following combinatorial identity: $\sum\limits_{r=0}^n\binom{n}{r}\binom{m+r}{n}=\sum\limits_{r=0}^n\binom{n}{r}\binom{m}{r}2^r$.   The algebraic way is to consider the coefficient of $t^m$ in the expansion of $(1+t)^n(1-t)^{-(n+1)}$. For $r\in\{0,1,\cdots,n\}$, we have the coefficient of $t^{n-r}$ in the expansion of $(1+t)^n$ to be equal to $\binom{n}{r}$, and the coefficient of $t^{m+r-n}$ in the expansion of $(1-t)^{-(n+1)}$ to be equal to $\binom{m+r}{n}$. By the addition and multiplication principles this will show that the coefficient of $t^m$ in the expansion of $(1+t)^n(1-t)^{-(n+1)}$ will be equal to $\sum\limits_{r=0}^n\binom{n}{r}\binom{m+r}{n}$.  On the other hand, we note that $(1+t)^n(1-t)^{-(n+1)}=(1+\frac{2t}{1-t})^n(1-t)^{-1}=\sum\limits_{r=0}^n\binom{n}{r}2^rt^r(1-t)^{-(r+1)}$. As the coefficient of $t^{m-r}$ is equal to $\binom{m}{r}$, this implies that the coefficient of $t^m$ in the expansion of $(1+t)^n(1-t)^{-(n+1)}$ is equal to $\sum\limits_{r=0}^n\binom{n}{r}\binom{m}{r}2^r$.  What I am thinking of, is to think of a way to prove this identity without the use of the generalized binomial series. I was trying to think of a combinatorial method to solve this problem. In particular, I was trying to prove the combinatorial identity as follows:  Firstly, let us be given a class of $n$ boys and a class of $m$ girls, where $n\leq m$. Choose a team $A$ of $r$ boys, and choose a team $B$ of $r$ girls, and finally choose any subset (may be empty) of boys from $A$ to clean the classroom, where $r\in\{0,1,\cdots,n\}$. For each value of $r$, we see that there are $\binom{n}{r}$ choices for $A$, $\binom{m}{r}$ choices for $B$, and subsequently there are $2^r$ ways to choose a subset from $A$. In this way we get the number of ways to do so to be equal to the expression on the RHS of the identity.  What I am struggling though, is to be able to count the number of desired ways in a way that will give me the expression on the LHS of the identity. I tried firstly to choose the boys to clean the classroom before choosing the sets $A$ and $B$, but I wound up with some messy expression that does not seem close to matching the expression on the LHS.  I would like to know if there is another way of looking at this method (or I could have been missing out on something), or if there is any other combinatorial method (or any other algebraic method that does not involve the use of generalized binomial series) that one could think of to show the desired identity.


ORACLE: SQL Query to extract last entry date per category


For $x,y\in\mathbb{N}$ how many ordered pairs $\left(x,y\right)$ satisfy   $\dfrac{1}{x}+\dfrac{1}{y}=\dfrac{1}{pq}$ where $p,q$ are distinct primes?


We want to concatenate the function name and variable name. This should occur on click of a <a> tag.   How can we concatenate the function and variable name?  Issue:   we are getting error message fn_dataId() is not defined   Desired output:  fn_dataId() should be fn_some123();  What we tried    $(function() {     $('.link').on('click', function() {       console.log('clicked');       var dataId = $(this).attr('data-id');       console.log('data id - ' + dataId);              // What we tried, but didn't work.        fn_dataId();      }); }); <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <a data-id="some123" class="link"> Click here </a>


working with selected file in any folder

Please note, when we click on copy command on context menu in the file manager the selected file is copying. just like that i want to get the selected file in any folder  to split vedio with ffmpeg command  .  i think you get my request for help  please try to understand, for example i opened a folder and selected a file i want to know the command to store this file"s  name with full path in a  bash script variable


Is there a plugin or a software where I can visualize my spatial queries from PostGIS? I remember I have used something similar to this in the past for the Oracle database but I can not recall the name of it.


Badge for ????????? tag - I guess the non-ascii characters are converetd to ?'s

On Russian.stackexchange.com there is a  that was      Earned at least 100 total score for at least 20 non-community wiki answers in the ?????????? tag   However there is no such tag on this site. Looks like it is some cyrillic-named tag that was converted to a bunch of question marks.


How to crop a vector shapefile according to raster?

I am trying to clip a vector shapefile- points according to a DEM in QGIS. I used GDAL function and polygonized the DEM. Then I ran the Vector-Geoprocessing tools-clip in order to crop the vector data points. The whole QGIS crashed couple of times while doing this and I have never achieved any results. Could you please suggest any alternative steps for me? Many thanks!


Missing frame numbers with PaloAlto theme

The following MWE does not print frame numbers with MacTeX 2017 (beamer v3.50, LuaTeX 1.0.4):  \documentclass{beamer} \usetheme{PaloAlto} %\beamertemplatenavigationsymbolsempty \setbeamertemplate{footline}[frame number] %\setbeamertemplate{page number in head/foot}[framenumber]  \begin{document} \begin{frame}   \frametitle{Test}   Bar \end{frame} \end{document}     But it works with TeXLive 2016 (beamer v3.41, LuaTeX 0.95.0):    Using setbeamertemplate{page number in head/foot}[framenumber] instead of \setbeamertemplate{footline}[frame number] does not help. How can I fix it?


How can I use : and ; in independent clauses

How can I know the second clause explains the first one in these sentences  Spain is a beautiful country; the beaches are warm, sandy and clean.  Remember the old saying: Be careful what you wish for.  He got what he worked for: he earned that promotion.   I know that if the second clause explains the first one we use a colon and if not we use a semicolon. But in these sentences how can I know if the second one explains the first one or not? In the first sentence I think the second clause is defining the first one and a colon must be used ... but that's not what I see. Thank you


Forgot my Gmail Password,alternate id is not accessible and no mobile No

I forgot my gmail password and my alternate id is also not accessible. I haven't provided my mobile number. Now am not able to access mail and facebook account. How can I reset my gmail password. I haven't used my account for about 6 months. I tried the normal rest process but didn't worked. Any help is highly appreciated.


What is the difference?   He is not home. He is not at home.   Can I use these two phrases interchangeably?


How can I create a menu entry for GRUB which boots Ubuntu in console mode?

It would be easier if I can create an entry in the GRUB menu to boot between GUI and console. I don't want X to start sometimes. Does GRUB support that kind of feature?


When to use 'will' and when to use 'shall'?

I always get confused in using will and shall.  Same way when to use must and should.


Is there a way to, in JavaScript running in the client's browser, access a local file for IO in following manner? The file is being appended to regularly (every ~25ms). We want to read every new line as it comes in. Preferably asynchronously (we get some kind of signal, or a callback executes) when anything is appended. Is this possible? If so, how?  My experience with Javascript is limited to D3, so a basic explanation on how or why/why not this is feasible would be appreciated. I can totally understand this not being possible due to security reasons.  EDIT: Just to make it clear, the file is on the clients computer. The file is just a text file. The process appending to it is a native process on the client's machine.


Prove $\sum_{n= -\infty}^{\infty} \frac{1}{(t+n)^2} = \frac{\pi^2 }{\sin^2(\pi t)}$ using f(x)=1-|x| and Poisson summation formula

I'd like to prove   $$\sum_{n= -\infty}^{\infty} \frac{1}{(t+n)^2} = \frac{\pi^2 }{\sin^2(\pi t)}$$  by using the Poisson summation formula. There is a way to do it by firstly taking the Fourier transform of $f(x) = 1 - |x|$ for $|x|\le1$ and $f(x) = 0$ for $|x|>1$. There's a next step which I can't work out, and then you apply the Poisson summation formula.  I get the Fourier transform of f(x) as $\frac{2(1-cosy)}{y^2}$ but can't work out the next step so I can apply Poisson summation formula.   There's also a comment in a previous post back in April by user Lost about having done it. But I can't find any tips. I know it's possible.  Thanks in advance.


One of my Fellows asked me whether total induction is applicable to real numbers, too ( or at least all real numbers ≥ 0) . We only used that for natural numbers so far.  Of course you have to change some things in the inductive step, when you want to use it on real numbers.  I guess that using induction on real numbers isn't really possible, since $[r,r+\epsilon]$ with $\epsilon > 0$, $r \in \mathbb R$ is never empty.  Can you either give a good reason, why it isn't possible or provide an example where it is used?


Is a test with small effect size and high sensitivity meaningful or useful?

From      What is true is that trivially small effects can be found with very large sample sizes. That does not suggest that you shouldn't have such large sample sizes. What it means is that the way you interpret your finding is dependent upon the effect size and sensitivity of the test. If you have a very small effect size and highly sensitive test you have to recognize that the statistically significant finding may not be meaningful or useful.   Why "If you have a very small effect size and highly sensitive test you have to recognize that the statistically significant finding may not be meaningful or useful"?


In S2 E13 of the Arrow, Felicity pulls up an image of a car that was used in the robbery of snake venom from a zoo.  The car's license plate read "KAZ 547".  She states that the car is a rental and the address for the rental spot was somewhere in the Glades.  Now, a "KAZ" on license plates indicates that the car is from Kansas.  Does this mean that Starling City is in Kansas?  Or is this just another attempt by the writers to keep the true location of the city hidden?  Or, am I missing a really obvious fact about rental cars?


Transport equation $u_t + xu_x + u = 0$ with $u(x_0, 0) = \cos(x_0)$

I have been studying PDEs using Peter Olver's textbook. I have learnt how to solve equations such as $u_t + 2u_x = \sin(x)$ subject to an initial condition such as $u(0,x) = \sin x$. Letting $\epsilon = x - 2t$ and $u(t,x) = v(t,\epsilon)$, I then plug this into the transport equation.   However, I am not sure how to define a characteristic to solve the following equation   $$u_t + xu_x + u = 0, \qquad u(x_0, 0) = \cos(x_0)$$   because it has a variable 'speed' term $x$ and it is also not homogenous because of the term $u$.   A solution would be very helpful so I can see how to approach these problems.


How to batch rename files with PowerShell

I have 14,000 pictures sorted into files by year and month but taken with multiple cameras. I want the file name to reflect the date taken. All of my pictures are .jpg.   For example all pictures taken on October 16, 1998 are in a folder directory called   ..\1998\10 October\1998 10 16\   I want the all the pictures to be named 19981016_0001.jpg,  19981016_0002.jpg etc.   I can get to the point where it list the folder I want to change. But I'm unable to actually change it. I created a temp file of copies in case I messed it up. I started by typing   cd "C:\Documents and Settings\Brooke LastName\Desktop\Temp   then after successfully getting my file to load I used a formula I found on this site.  ls *jpg | Foreach {$i=1} {Rename-Item _ -NewName ("$($.19981016){0:00000000#} .jpg" -f $i++) -whatif}   The error I got said  Unexpected token ' .19981016' in expression or statement.   At line:1 char:12 + $.19981016 <<<<   I found several formulas on the web, but most created files that would number with parenthesis for example vacation (1).jpg. I want a four digit counter 0001 after an underscore at the end of my date.  Could someone help me out and give me dummy instructions? I have zero programming knowledge.


Collapsing arcpy script parameter categories by default?

Within an arcpy script, I've set up categories using the style sheet found in the ArcGIS installation folder. I have a couple categories created within the tool validator.  .... def initializeParameters(self):     self.params[2].category = "Intersections"     self.params[3].category = "Intersections"     self.params[4].category = "Intersections"     self.params[5].category = "Intersections"     return   This shows my parameters in their proper categories, however, when you start the script, the categories are shown expanded by default. Is there something in the style sheet I can change to make sure they are collapsed by default?    I'm also curious if anyone knows of a way to move these categories up and above some other "non category" parameters in the script.


I would like to use my wifi doggle in my pc (ubuntu 12.04). I am able to connect to my access point through the GUI. I would like to do the same in the terminal.  My access point uses WEP. So I typed the following commands  iwconfig wlan0 mode managed key 6d6f6e6579 iwconfig wlan0 essid "AccessPoint" dhclient wlan0   after typing dhclient wlan0 it waits like 1-2 min then outputs nothing and cannot connect to the Access Point.  iwconfig output:  wlan0 IEEE 802.11bgn ESSID:"AccessPoint"       Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm       Retry long timit:7 RTS thr=2347 B Fragment thr:off       Encryption key:6D6F-6E65-79       Power Management:off   I would appreciate any suggestion


I can't install CMake on Ubuntu 18.10 because I get an error: Ign.:1 http://pl.archive.ubuntu.com/ubuntu cosmic-updates/main amd64 linux-libc-dev amd64 4.18.0-17.18 Error:1 http://security.ubuntu.com/ubuntu cosmic-updates/main amd64 linux-libc-dev amd64 4.18.0-17.18   404  Not Found [IP: 153.19.251.225 80] E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_4.18.0-17.18_amd64.deb  404  Not Found [IP: 153.19.251.225 80]  When I try to use upgrade, I get next error: E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied) E: Failed to lock directory /var/lib/apt/lists/ W: Problem przy odlinkowywaniu pliku /var/cache/apt/pkgcache.bin - RemoveCaches (13: Brak dostępu) W: Problem przy odlinkowywaniu pliku /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Brak dostępu)


In tex documents of mathematics, sometimes title of section involves some math symbols, such as   \section{Groups with $G'=Z(G)$}   However, using dollar sign in title of section always shows some warning.   What should be the way to write title of sections involving math symbols?


How to get Nautilus "real" compact mode in Ubuntu 13.04?

Ubuntu 13.04 have fully absent compact mode. Nautilus allows only icon view and list view.   List view isn't the same as compact mode - well, it's easy to switch off unneeded columns, but what about multicolumn files display?   Is it possible to return habitual compact mode back?


public List<Video> filtra_data(string date)             {                 List<Video> lista_filtrata = new List<Video>();                 for (int i = 0; i < listavideo.Count; i++)                 {                     if (listavideo[i].Data.Contains(date) == true)                         lista_filtrata.Add(listavideo[i]);                 }                 return lista_filtrata;             }   i made this method to filter a list of movies using the date as parameter but when, on the form, i put the input in the textbox and i press the button it raises an exception on the for: object reference not set to an instance of an object, any ideas? thank you everyone


Unit testing that events are raised in C# (in order)

I have some code that raises PropertyChanged events and I would like to be able to unit test that the events are being raised correctly.  The code that is raising the events is like  public class MyClass : INotifyPropertyChanged {    public event PropertyChangedEventHandler PropertyChanged;       protected void NotifyPropertyChanged(String info)    {         if (PropertyChanged != null)         {             PropertyChanged(this, new PropertyChangedEventArgs(info));         }    }       public string MyProperty    {        set        {            if (_myProperty != value)            {                _myProperty = value;                NotifyPropertyChanged("MyProperty");            }        }    } }   I get a nice green test from the following code in my unit tests, that uses delegates:  [TestMethod] public void Test_ThatMyEventIsRaised() {     string actual = null;     MyClass myClass = new MyClass();      myClass.PropertyChanged += delegate(object sender, PropertyChangedEventArgs e)     {          actual = e.PropertyName;     };      myClass.MyProperty = "testing";     Assert.IsNotNull(actual);     Assert.AreEqual("MyProperty", actual); }   However, if I then try and chain the setting of properties together like so:  public string MyProperty {     set     {         if (_myProperty != value)         {             _myProperty = value;             NotifyPropertyChanged("MyProperty");             MyOtherProperty = "SomeValue";         }     } }  public string MyOtherProperty {     set     {         if (_myOtherProperty != value)         {             _myOtherProperty = value;             NotifyPropertyChanged("MyOtherProperty");         }     } }   My test for the event fails - the event that it captures is the event for the MyOtherProperty.  I'm pretty sure the event fires, my UI reacts like it does, but my delegate only captures the last event to fire.  So I'm wondering: 1. Is my method of testing events correct? 2. Is my method of raising chained events correct?


How to test whether ICCs from different groups are significantly different?

I need to compare two generalizability (G) coefficients for data that are from two separate populations. G coefficients are a type of intraclass correlation coefficient (ICC).   The literature on statistically comparing G coefficients is sparse by all accounts, so I thought that the best I might do was find out the recommendation for statistically comparing ICCs. I've considered Fisher's Z, but I know ICCs are not normally distributed.


Recently, iMessage won't sign in on my MacBook Air (10.8.4). I opened up Messages a couple of days ago, and my iMessage account was signed out. Upon trying to sign back in, I get a message reading:     The registering device does not have the appropriate credentials.   And login fails. Anyone else have this issue?


Centering a slash (not) over a (mathematical) glyph?

My aim is to construct a relational symbol which is graphically equivalent the standard infinity sign (coded by\infty) crossed exactly in the middle of it. Yet I am not able to overcome something. To be more precise:    I would like to have slash sign moved exactly to the middle position of the infinity sign. The above was defined in the following way:  \documentclass{standalone} \begin{document} \newlength{\length} \settowidth{\length}{$\infty$} \newcommand\ninfty{\mathrel{\infty\hspace{-0.5\length/}}}   $\ninfty$ is not what I am aiming at.  \end{document}   So as you can see my idea was to define the length equal to the length of the infinity sign and then place slash sigh it halfway through it. As it can be seen above it was rather please quarter-way (backwards).  Could you please explain what I did wrong and how can I exactly determine the middle point (in terms of width) of a given mathematical glyph? Or a glyph in general?


Is there quick way to calculate Pi to a certain amount of digits? i.e. If I wanted to calculate pi to say, 35 decimal places, is there a way I could do that? Also, I don't mean finding the digits manually, I more meant is there an algorithm or formula I could have a program run to find pi to an exact length. Thanks.


Understanding Javascript object references while implementing LinkedList

I am implementing a simple singly linked list in Javascript. class Node {    constructor(data) {       this.data = data;       this.next = null;    } }  class LinkedList {    constructor() {       this.head = null;    } }  I initially wrote an appendNode method like so: appendNode(data) {    const node = new Node(data);    let curr = this.head;     if (curr) {       while (curr.next) curr = curr.next;       curr.next = node;    } else curr = node; }  This does not work, head is never set, the LinkedList does not get built out with repeated calls to appendNode. Rewriting appendNode like so: appendNode(data) {    const node = new Node(data);     if (this.head) {       let curr = this.head;        while (curr.next) curr = curr.next;       curr.next = node;    } else this.head = node; }  Does work. I suspect this has something to do with how Javascript handles object references, but searching around for other implementations of LinkedList in JS or the technical details of JS object references has borne no fruit.


Probably some obvious mistake in java I've made which I can't find (java)

I just started using Java yesterday. I've tried researching but didn't find anything I could make use of. The problem is that no matter what I type as an Input the program always outputs "Hell" and "Hello fmdas". I think I should write the if (BetOrPlay != "Bet"); Line as else if (BetOrPlay != "Bet"); But the program doesn't allow me to do that.  import java.util.Scanner;  public class MoneyMaker {      static Scanner Choice = new Scanner (System.in);       public static void main(String[] args)     {         System.out.println("Do you want to bet your coins or earn more by playing this game?");         try         {              if (Choice.hasNextLine())             {                 String BetOrPlay = Choice.nextLine();                 if (BetOrPlay == "Bet");                 {                     System.out.println("Hell");                 }                 if (BetOrPlay != "Bet");                 {                     System.out.println("Hello fmdas");                   }                    }            }         finally         {             Choice.close();         }        } }


Why / how does this C code compile? and What does it do?

I have a C code, in which a do loop is started in the first branch of a switch statement. What is weird, is that the rest of the branches of the switch statement are inside the body of the do loop. First, how is it possible that this code compiles? Second, what does it possibly do?   void f(char *x, char *y, int z) {     int z2 = (z + 7) / 8;     switch(z % 8) {         case 0: do { *x++ = *y++;         case 7: *x++ = *y++;         case 6: *x++ = *y++;         case 5: *x++ = *y++;         case 4: *x++ = *y++;         case 3: *x++ = *y++;         case 2: *x++ = *y++;         case 1: *x++ = *y++;                 } while(--z2 > 0);     } }


Using the top command in the terminal lists processes, sorted by their CPU usage (and you can change it to sort by another parameter)  Is there an equivalent for the GPU?


Add pagination in a lightning: datatable

I have received the documentation and I have not found the option to add a page to the table.


What are the advantages of 10-bit monitors?

To support 10-bit color the following are needed:   A monitor supporting it. A GPU supporting it (only AMD FirePro and NVIDIA Quadro support this?). Compatible software. Unless I am mistaken there are very few programs out there supporting 10-bit color. Photoshop is a notable example.   The questions are about how 10-bit monitors perform in comparison with 8-bit monitors:   In which situations would a 10-bit monitor give a noticeable advantage over an 8-bit monitor (say, for professional photography)? Have 10-bit monitors been compared against 8-bit monitors based on subjective or objective tests? What were the results? Human eyes can see only 10m colors, so would using a monitor with 1b colors make a difference?


Sequence of triangles with exponentiated sides

Let $a,b,c\in\Bbb R^+$. For any given $n\in\Bbb N$ there exists a triangle with sides $a^n,b^n,c^n$. Show that at least two of $a,b,c$ are equal.   I know that you can create inequalities for $a^n,b^n,c^n$, but what's next?


Why is my input incrementing by more than one from this jQuery statement?

My code below is currently cloning a row from a table to another table on click of table row. Once that happens I'm appending an increment and decrement button and a input text value to the end of the row (The input value changes upon click of increment and decrement button). This works perfectly if there is only one row, but once there are more than one my buttons will increment or decrement based on how many rows are attached to table. Why is this happening?  "initComplete": function() {   $("#itemsAvaliableList tr").on("click", function() {     var items = [];     $("#item-table tbody tr[id='no-item-row']").hide();     $("#backToList").hide();     $("#acceptButton").show();     var newTr = $(this).closest("tr").clone();     // Increment button that goes next to added items in Screen Entry     var newIncrementButton = "<input class='qty' size='5' type='text' value='1' name='Quantity' onkeypress='return isNumberKey(event)'/><button class='ml-3 btn btn-danger qtyminus' display= 'inline-block;' id='valueChange'>-</button> <button id='valueChange' class='qtyplus btn btn-success'>+</button>	"     items.push(newTr);     newTr.appendTo($("#item-table tbody"));     $(newTr).append(newIncrementButton);      $('.qtyplus').on('click', function(e) {       e.preventDefault();       var num = Number($(this).siblings('.qty').val());       $(this).siblings('.qty').val(++num);     });      $('.qtyminus').on('click', function(e) {       e.preventDefault();       var num = Number($(this).siblings('.qty').val());       $(this).siblings('.qty').val(--num);     });    }); }


I have a multivariate time series data set having 6 variables. I have to predict the sixth variable at the next time step given the expected values of other five at the next time step. I am using LSTM for prediction. The data set is small (170*6), have 170 observations. Splitting the data set into three i.e. train/test/split doesn't seem a probable option in this case.   As far as I know, input sequences (of fixed length) over which the LSTM learns are assumed independent. So my question was, can one sequence be left out for validation just like in the case of a cross sectional data problem.


I’m reading  on the subgroup structure of classical subgroups. According to Corollary 2.2 (d), since $8=2^3$ is a prime power of even number $2$, ${\rm PSL}(2,8)$ has a maximal subgroup ${\rm PSL}(2,2)=S_3$. But ${\rm PSL}(2,8)$ has exactly $3$ conjugacy classes of maximal subgroups.  The three non-conjugate maximal subgroups of ${\rm PSL}(2,8)$ are $C_9\rtimes  C_2$, $C_7\rtimes C_2$ and $C_2^3\rtimes C_7$, none of which is $S_3$. I believe I misunderstood something when reading the reference, but I don’t know what that is. Could you give me some help? Any help would be appreciated.


Is the set of irrational numbers smaller than the set of real numbers?

I am not a mathematician, but I study it for fun.  I know that Cantor showed that the infinite set of the real numbers is larger than the rationals since the real numbers are uncountable and the rationals are countable.  The real numbers include rational and irrational numbers and the irrational numbers are uncountable.  Is the set of irrational numbers smaller than the set of real numbers, the same size, or does this question not make sense?  Thank you!


How can I change the print color in Python?

I want to use the normal print() statement of python but with a given color (e.g. green) Is this possible in Python?


Why is my nic ethN suddenly called p18pN?

After a reboot my network interface eth1 is now called p18p1 messing up my network setup. What causes this change of name?  I'm using Linux 4.0.5 on Ubuntu 15.04.


Is there a level requirement or stat requirement for getting legendary items? Or do they simply drop that infrequently that they're hard to find? Are legendary weapons more likely to drop for high level characters? I'm nearly 150 hours into this game, and have yet to get one.


According to , (1) a ** b is numerically computed via (2) exp(b * log(a)), let's say at least for float, real and positive a & b. Or does it? I don't suppose complex and negatives are also handled this way. My ultimate question is whether (2) confers any numeric precision or stability advantage over (1), which is 'no' if they're same, and the answer lies in CPython but I don't know where exactly. How does Python compute a ** b?


"last year" vs. "the last / whole of the last year" vs. "whole the last year"

I would have question related to other question I asked today. I know that:   last year refers to something that happens in the last year (which could be yesterday if today is 1.1.) the last year — means the last 365 days including today.   But what about "for the whole of the last year" and "for the whole of last year"? In an answer I received it is mentioned that this "of" disctincts between last year and last 12 months, which I thought is done by "the"?


Do all windows applications work in ubuntu with wine? Can I use Microsoft office in ubuntu using wine application.


How do I respond to a terminal prompt before it is asked?

I'm trying to automate the installation of CUDA on an Ubuntu 18.04 VM template as part of the startup script. I'm very new to bash and cloud computing in general. When I run the command to install CUDA, mid-installation I am always prompted to choose a country and a language from a list of options by entering the corresponding ID numbers. Basically, when I run: sudo apt-get -y install cuda  I know I'm going to have to manually enter "31" and "1" for the install to complete. As a relative n00b at all this, my question is thus "How do I automate those inputs so I don't have to manually type them in every time I spin up a fresh copy of this VM template?" My initial approach was this: printf "31\n1\n" | sudo apt-get -y install cuda  But this does not seem to work the way I expected it to. No input is autofilled. My end goal is to have everything taken care of in one startup script that I don't have to touch. I appreciate any and all help, and I apologize if my question has been answered elsewhere (if it has, I've been unable to find it and would greatly appreciate being directed to it!)


How to add a package from a later version of an ubuntu?

I am on ubuntu 12.04 and I want to install tesseract-ocr 3.03 via apt-get. I found  package, which seems like it is for ubuntu 14.  Is there a way to install it without installing the full upgraded operating system?


Badges I've earned aren't always showing up in the Achievements dialog

Recently, I used all of my daily 40 upvotes on an SE site (Android SE). However, the achievements dialog only showed one of the badges - not two.  Here's a screenshot.    In the screenshot, the Badges section of the website shows that I have earned the Suffrage badge a minute ago, but the achievements dialog doesn't show this - it only shows the Vox Populi badge (and the notification for that badge took about 5 minutes to show up, even with changing pages and looking at the dialog).  Both the badges should be shown in the notifications when I get them, not one of them 5 minutes later.


Show that $\sqrt{4 + 2\sqrt{3}} - \sqrt{3}$ is rational.   I've tried to attempt algebra on this problem. I noticed that there is some kind of nesting effect when trying to solve this. Please help me to understand how to attempt to denest this number.  Any help would be greatly appreciated.


Different behaviour of eval " command \"$@\" ", "$@", and "$(echo $@)" when used as arguments

I would like to pass multiple arguments to the Tor browser (firefox) programatically through a function arbitrarily entitled tor. This is so as to command tor search terms and voila! My search terms. When using these three variations,  ~/tor-browser_en-US/Browser/start-tor-browser -search "$(echo $@)"  eval "~/tor-browser_en-US/Browser/start-tor-browser -search \"$@\""  ~/tor-browser_en-US/Browser/start-tor-browser -search "$@"   only the first two lines seem to perform identically. They result in a single Tor browser window searching for terms of arbitrary textual content. However, the third line results in one new search window per word.  Why this behavior?  Let me clarify. I am not searching for workarounds but rather am just interested in an explanation regarding the bahviour.


How to export a large list of variables in Bash?

I use Bash 4.3.48(1) and I have a .sh file containing about 20 variables right under the shebang. The file contains only variables.  This is the pattern:  x="1" y="2" ...   I need to export all these variables in a  way: For example, one export to all vars, instead say 20 export for 20 vars.  What's the most elegant way (shortest, most efficient by all means) to do that inside that file?  A for loop? An array? maybe something simpler than these (some kind of collection sugar syntax)?


Using Poisson Summation Formula, how do you evaluate the following infinite sum $\sum_{k=1}^{\infty}\left(\frac{\sin(tk)}{k}\right)^2$?   The Poisson Summation Formula states that: $\sum_{k=-\infty}^{\infty}f(2\pi k)=\frac{1}{2\pi}\sum_{k=-\infty}^{\infty}\hat{f}(k)$.  I tried playing around with the idea that if $f(x)=\mathbf{1}_{[-1,1]}$ then $\hat{f}(\xi)=2\frac{\sin(i\xi)}{i\xi}$. How should I go ahead from here to compute the summation?


If I visit this site using "Communities" menu or by by visiting  then I see this set of buttons:    There is no "Newest" question tab.  To have "Newest" I have to click burger menu (the leftmost button on top with 3 vertical lines), choose "Questions", then I am at  and buttons become:    Only then I am able to enjoy the site the way I like (and I like to see newest questions as one can guess, not old ones, not featured, not active, not bugs, not reqs, not hot, not week, not month.. shall I continue?)  I noticed this on Arquade .  I am not sure, but I think it was changed with when new UI comes. Is there an easy way to make me happy? Clicking every time burger menu (3 clicks instead of just one) is quite annoying as you can guess. I would enjoy even more if "Newest" was default mode, but someone decided it should be "Active".


Why don't the currents clash in a 3 phase delta connection?

Consider 3 windings, a, b and c. L1 is connected to A, L2 to B and L3 to C. The 3 windings are then connected in delta.  If we could freeze frame the voltage waveform where L1 and L2 are positive maximum and L3 is negative, what will the current direction through the windings look like? Particularly through the bridge which connects a1 to b2...   Will we at any point have the current from 2 different phases going towards each other?


Problem 4.2, pg 98, John Lee's smooth manifold: Suppose $M$ is a smooth manifold (without boundary), $N$ is a smooth manifold with boundary, $F:M \rightarrow N$ is smooth. Show that if $p \in M$ is a point suchthat $dF_p$ is nonsingular, then $F(p) \in Int N$.      I could not really find a contradiction if $F(p) \in \partial N$. Let $(U,(x^i))$ be chart of $p$, and $(V, (y^j))$ chart of $F(p)$. Then we have the coordinate representation  $$ v^i \frac{\partial}{\partial x^i} \Big|_p \mapsto \Big(\frac{\partial F^j}{\partial x^i} v^i \Big) \frac{\partial}{\partial y^j}\Big|_{F(p)}$$ being nonsingular doesn't really imply any thing (?)     Also, what happens when $p \in \partial M$?    Hints would be appreciated!


Use certain version of JRE / JDK for certain programs

I use ArchLinux, and an IDE called PyCharm. On its , it recommends using Java 6 instead of OpenJDK. ArchLinux has an OpenJDK package (jdk7-openjdk) that I have installed, installed, and from what I had read in the , it should be possible to install Oracle Java 6 along side OpenJDK 7 via a packages called jdk6-compat and jre6-compat, which install these versions of Java in /opt/ instead of the normal location.  However, after installing jdk6-compat and jre6-compat, I still see that I am running OpenJDK 7 when I run the following:  % java -version java version "1.7.0_09" OpenJDK Runtime Environment (IcedTea7 2.3.3) (ArchLinux build 7.u9_2.3.3-1-x86_64) OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode)   ...even after I have set JAVA_HOME and added /opt/java6/bin to my PATH in my .zshrc file.  How can I get PyCharm (or other applications) to use Oracle Java 6 instead of OpenJDK?  Thanks, and apologies if I've posted in the wrong place.  Other information that might be helpful:   Using Gnome 3 as DE


I'm currently learning chemistry for the first time, and loving it. I have a reasonably good physics and maths background and it's great to see things like spherical harmonics in quantum mechanics "take shape" through chemistry in the form of orbitals. Overall, I am seeing a lot of physics and some mathematics present. However my source is not entirely rigorous, at least by my standards.   Could anyone recommend a text or source that explains chemistry topics from a physics point of view rigorously? Examples of questions I am struggling with (from a physical viewpoint) are Why do bondings occur? What is the distance of seperation? Why is a water molecule bent?   Any help appreciated!


How to achieve a multiple merged photograph

Can any one tell me how i can achieve multiplicity photography.  Please refer the link below.  Let say a child is playing in garden and we are merging 10 to 12 images into a single image?


Cannot delete user - running '/usr/sbin/userdel' failed: Child process exited with code 16

When I tried to delete a user using the User Accounts window under Settings, I get the following error message:  running '/usr/sbin/userdel' failed: Child process exited with code 16  How can I delete this user?


I have recently discovered reviewing posts and am working towards the respective badges. However, the majority of the time (even now) I use the mobile app, rather than the desktop. Therefore I was very disappointed when I couldn't find a way of reviewing posts while on the app.  Feature request: add in a way for people to review posts while on the app, for both iOS and Android.  Personally, I think that having a button to access this would be best placed  in the iOS app, but that's just my opinion.  What do you think? Is this a plausible idea?


Do you need to specify the "defaults" option in fstab?

The  specifies the options of / to be defaults,noatime, but on my installation the default fstab is created with the options of rw,relatime. The  covers the atime issues. What I am curious about is the defaults option. The man page for mount says:  defaults Use the default options: rw, suid, dev, exec, auto, nouser, and async. Note that the real set of all default mount options depends on kernel and filesystem type.  See the beginning of this section for more details.  Are the default options used only if the defaults option is provided or are they used in all cases? Do I need defaults in my fstab?


I know how to prove this by induction but the text I'm following shows another way to prove it and I guess this way is used again in the future. I'm confused by it.  So the expression for first n numbers is: $$\frac{n(n+1)}{2}$$  And this second proof starts out like this. It says since:  $$(n+1)^2-n^2=2n+1$$  Absolutely no idea where this expression came from, doesn't explain where it came from either.  Then it proceeds to say: \begin{align} 2^2-1^2&=2*1+1 \\ 3^2-2^2&=2*2+1\\ &\dots\\ n^2-(n-1)^2&=2(n-1)+1\\ (n+1)^2-n^2&=2n+1 \end{align} At this point I'm completely lost. But it continues to say "adding and noting the cancellations on the left, we get" \begin{align} (n+1)^2-1&=2(1+2+...+n)+n \\ n^2+n&=2(1+2+...+n) \\ (n(n+1))/2&=1+2+...+n \end{align}  Which proves it but I have no clue what has happened. I am entirely new to these math proofs. Im completely lost. I was great at high school math and calculus but now I haven't got the slightest clue of what's going on. Thanks


Author information on revision view overflows its content

I just checked one random edit and saw this:  I think the reputation should be shorted to 889k. Anway that bronce badges are overflowing the box.


I'm looking to try and run the same stored procedure multiple times with different parameters but at the same time.   I'm using SQL 2014  The reason for this is that the procedure takes around 7 hours to complete. It actually does the same process many times. So for instance it might build a new database and tables for each branch.   What I want to do is break down the stored procedure so I can run in per branch but then run each query in parallel. I've run tested this by running it in separate query windows and it runs almost 80% quicker.   Can anyone give me a dummies guide into running queries in parallel?


How can I investigate if an object appears through a camera in BGE?  Ray sensor does not suit me cause it is one line, while I am searching for the whole screen.


I'm planning to purchase a Sony ILCE-QX1-QX1 camera. It seems to be based on the Sony Alpha 5000 or 5100 platform. How fast of a memory chip, and which technologies, can it take advantage of? That is, how much should I spend on the flash memory chip to get the most out of it?  It is especially interesting that it takes Sony's memory as well as MicroSD.  (My Canon 60D for example takes UHS-1 but doesn't really go much faster than Class 10 (UHS is a different protocol) while the 70D will take full advantage. )


I'm trying to troubleshoot proofs for an article in a Springer (linguistics) journal. It'd be useful to test out some potential solutions myself rather than describing what I want to the typesetters and asking them to figure things out.  However, I can't figure out how to approximate the Springer math font. It looks similar in some respects (e.g., delimiters) to newtxmath, but other things look unlike any package I'm familiar with (e.g., the Greek letters, mathsf/mathtt).  Is there any way to approximate Springer's latex style (in particular, the math font), or is this impossible without whatever proprietary tools they're using?  Editing to add a photo of a representative formula. The delimiters and the alphabetic letters are very newtxmath, the \lambda and binary/relational operations are not.


Ubuntu 18.04 system broken after uninstalling openssl

I am very new to Ubuntu and to rails. I tried to do a bundle install after installing rails through rvm, but I had an error back with the openssl. I looked online for a solution and I uninstalled the openssl with this command sudo apt-get remove --purge openssl After that chrome and software center disappeared, I am not able to even install the software center and I have this message back when I try to do so. Package software-center is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source  E: Package 'software-center' has no installation candidate  How can I fix it?  Thank you


Given: Let $n$ be an integer. Then $n^2=3a$ for some integer $a$ if and only if $n=3b$ for some integer $b$.  Proof real number $\sqrt{3}$ is an irrational number.  Here is I have so far: Assume $\sqrt{3}=a/b$ where $a,b$ are integers.  Then $a^2=3(b^2)$, which means $a^2=3c$, where $c$ is some integer.  next is what I'm confused about: With the given fact I can get $a=3d$ where $d$ is integer in order to let $a^2=3c$  I'm not quite sure how to continue this.. Can someone please help?


When I have a Windows VM, how do I upload my website to it?

This is a really stupid question, I know, but I have literally zero experience on setting up a website/web app from the server level - I've always used a third party like Arvixe or GoDaddy.  So, I have an Azure VM that I can remote into.  I need to (obviously) set up my website on it.  I've already installed IIS, so I would imagine that the website would go into the      inetpub > wwwroot   folder, right?  Does one usually just copy and paste the files over, FTP, etc.?  What's the typical, accepted way to "upload" your website/web app to your VM?


Entity Component System: system and components relation

I'm planning to develop a game in C# (but I don't think that language matters) and I'll be using Entity Component System since I know by design that my game will have a lot of different game items with different twisted behaviours and logics. I have some experience using Unity ECS which I find very easy and intuitive. I've also programmed games in the past using the old "inheritance approach" and I found that pattern very not scalable. As far as I know, a pure ECS (which is not what Unity implements) works like this:  A GameObject is just a collection on Components, it may be seen as a wrapper class or as a shared index in some parallel arrays of Components. A Component is a collection of data (basically a record) which holds the data needed by its relative System to handle it. It does not implements game logic itself. A System is a world object which loop through each GameObject which has a component it can process and update game logic of that component.  My point is: if the Systems are the ones responsible for the actual game logic update (practically speaking, the game logic code is written inside the system), is there a 1:1 relation between every component and every system ? Let me explain with an example: let's say I have 2 components:  RenderSpriteComponent RenderLightSourceComponent  The first one does a simple 2D sprite rendering (using OpenGL or whatsoever); the second one send a light source to the rendering shaders. They do similar operations but with some actual differences. My question is: since they behaviour is different, should I implement two different Systems which will handle them separatly? If not, should I add a bunch of IF statements or overloads to handle those two components inside the same System? From my point of view both ways seem unnecessary, especially if the ECS should improve code scalability. Using one of those approach would force me either to implement a different system for each component I have (implying a lot of GameObjects loops) or either to fill my Systems with if and overloads making them impossibile to understand after a certain point. Furthermore, from what I can see and understand, Unity implements a different version of this pattern in which every component implements its own logic (in the Update method) and the GameObject is a wrapper class which has an internal list of components to update. Systems don't exist at all (or if they do they do, they do so for other reasons). This implementation looks easier and more "elegant" from my point of view, but I can't understand why it's not so spread and everyone sticks to the "classic" ECS implementation which has those "problems" I've described above. At the same time, I do not have control over the priority of the components updates, which can be useful in some cases. I understand there isn't an "absolute" better way to design your game structure, but I'd like to know how is generaly implemented. Or which factors would make a way better than the other.


How to get the URL of the current page in C#

Can anyone help out me in getting the URL of the current working page of ASP.NET in C#?


Is there a dash like feature in lubuntu, so I can easily search everything?

Is there a dash like program in lubuntu that can be launched either by single or double Super tap. I would want to search, and be able to see a lit of all my apps, preferably in icon form, like the dash. However, I would be happy if it didn't have all the features of the dash, and was more like the , which is simply an application launcher.  Whenever I switch to my lubuntu machine, I miss the ease of access to all my programs.  If there is not, what is the key to open the "Start" menu?


Computationally efficient estimation of multivariate mode

Short version: What's the most computationally efficient method of estimating the mode of a multidimensional data set, sampled from a continuous distribution?  Long version: I've got a data set that I need to estimate the mode of. The mode does not coincide with the mean or median. A sample is shown below, this is a 2D example, but an N-D solution would be better:    Currently, my method is   Calculate kernel density estimate on a grid equal to the desired resolution of the mode  Look for the greatest calculated point   Obviously, this calculates the KDE at a lot of non-plausible points, which is especially bad if there are a lot of data points of high dimensions or I expect good resolution on the mode.  An alternate would be to use a simulated annealing, genetic algorithm, etc to find the global peak in the KDE.  The question is whether there's a smarter method of performing this calculation?


Is it correct to say "he had to withdraw due to a knee injury"?

This sentence is from google dictionary. I only know that "due to" is used for a noun in the sense "caused by", for instance, His defeat was due to lack of practice. Can it also be used with verb like withdraw?


OK to implement a multi-argument command w/o using braces?

A user on Chemistry SE mentioned a very nice shortcut to use in implementing a command for partial derivatives (see comments section of question: ):  Suppose you want to create the following partial derivative:  \left(\frac{\partial U}{\partial p}\right)_{\!T}   using this command:  \newcommand{\pd}[3]{\left(\frac{\partial #1}{\partial #2}\right)_{\!#3}}   The standard use of the command would be:  \pd {U}{p}{T}   However, since each argument is only a single character, this is sufficient:  \pd UpT   If one needs to typeset numerous partial derivatives, this is a great time-saver.    Indeed, you can even use a hybrid approach, where braces are eschewed for single-character arguments, but used for multi-character arguments.  For example, to implement this:  \left(\frac{\partial U}{\partial p}\right)_{\!T, n_i}   One would write this:  \pd Up{T, n_i}   This seems to leverage what is a standard shortcut in LaTeX for single-argument commands (e.g., we drop the braces when the argument of a superscript or subscript command has only one character). But, for this usage (multi-argument user-defined commands) are there cases in which this (seemingly non-standard) approach would create a problem?


What tools and techniques are used to test UI changes?

Stack Exchange sites are used on a lot of different browsers, at screen sizes ranging from huge 4k monitors to small phones, at window sizes ranging from full-screen to 1024px (sometimes smaller), on computers with resources ranging from "I never see a beachball/hourglass" to "I get by, mostly", sometimes with configuration changes for accessibility (like larger fonts or keyboard shortcuts or voice).  That's got to be a bear to test.  In the spirit of , I'm curious how SE goes about testing design changes and UI more generally.  I seem to recall from the Joel Test in past SE job posts that SE doesn't employ QA folks, and the design team isn't large.  How do y'all test the SE design in all its variant environments and still get new work done?  This question overlaps with , but that question seems to be more about implementation and automation. You can write unit tests to verify that clicking on a UI thing still works and never notice that the actual display of that thing is off, for instance. I'm really more focused on the design here and the answers might be different.


Can I probe cross-level interactions without random slope in a hierarchical linear model?

I have a HLM model with significant variance in the level 1 intercepts across groups but no significant variance in the level 1 slopes across groups and find significant cross-level moderation effects. Does it make sense to interpret these or are random slopes a necessary condition for probing cross-level interaction effects?


Prove that there exists only one prime number of the form $p^2−1$ where $p≥2$ is an integer

By factoring  $p^2 − 1$, we have $(p + 1)(p - 1)$.   I know that $p = 2$ which gives $3$ is the only solution.  However, how do I prove that $p = 2$ is the only integer which gives a prime?


Why does minipage have different top/bottom margins for math environments?

My goal is to create a framed minipage environment that will contain text and math environments in varying combinations. I noticed that the top (and bottom) margin of the minipage is quite a bit larger if the first (and last) entry is a math environment (than it is if the first thing is normal text).  I tried to extract the relevant parts into a MWE:    \documentclass{article} \usepackage[fleqn]{amsmath}  \begin{document} \setlength{\mathindent}{-.15em} \setlength{\abovedisplayskip}{0pt} \setlength{\belowdisplayskip}{0pt} \setlength{\abovedisplayshortskip}{0pt} \setlength{\belowdisplayshortskip}{0pt}   \fbox{     \begin{minipage}{.1\linewidth}       XXX \\       XXX     \end{minipage}   }   \fbox{     \begin{minipage}{.1\linewidth}       \begin{align*}         \textnormal{XXX}       \end{align*}       \begin{align*}         \textnormal{XXX}       \end{align*}     \end{minipage}   } \end{document}   Which results in:     So why are there larger top/bottom margins for math environments and how do I get rid of them?


Difference between stream cipher and block cipher

I read that     A typical stream cipher encrypts plaintext one byte at a time, although a stream cipher may be designed to operate on one bit at a time or on units larger than a byte at a time.   (Source: , William Stallings.)  A block cipher encrypts one block at a time. The block may be of size one byte or more or less. That means we can also encrypt a block of one byte by help of a stream cipher as a stream.  So, what exactly is the difference between a stream cipher and a block cipher?


Can some software physically damage hardware?

I know a question similar to this one has been asked before however it was about installing a 32bit OS on a 64bit laptop. My question is more about damaging the hardware.  I was wondering if there was a way of interfacing with hardware from the OS or Terminal layer in a way to damage it beyond repair (actual physical damage, not just faulty hardware).   Could you bypass security measures and run a CPU so hard that the ceramic actually breaks?   Could you write or interface with a HDD in a way that would cause physical damage to the platters?   Could you mess around with memory and fry RAM?   Can you blow a NIC?   I'm interesting in knowing the limit to which the software can reach when looking at a system as a whole.


How would I go about to get this to work? I've searched but I can't get it to work still. Should I just put the a() function in the b function even if I add more variables?  counter = 1  def a():     az = 1     bz = 2     cz = 3  def b():     a()     if counter > 0 :         print az, bz, cz  b()


Is there a law against hotels denying guests to have visitors

I've been staying at a hotel for a few weeks now. When I checked into the room the clerk at the desk said that I can't have visitors. A few days later a gentlemen came to ask about something and said he was visiting his daughter who was staying at the hotel. It was as often completely ignored his question and said she has to leave for having a visitor. The gentleman was a retired federal agent and said that was against the law to do that. What's up with that? Is this true or what?


While looking through an old codebase of ours, I came upon this little snippet:  var getElementByXpath = function (path) {     return document.evaluate(path, document, null, 9, null).singleNodeValue; };   Why did they declare a variable and assign an anonymous function to it, rather than simply create a named function? How is that any different from the (much more normal and common) following?  function getElementByXpath(path) {     return document.evaluate(path, document, null, 9, null).singleNodeValue; };


What happens to the reputation/upvotes after serial upvotes?

Today I faced this kind of situation. Suddenly I get repeated up votes from a particular user (4 up votes) and today I reached the reputation limit of 200.  Assume if those votes are reversed, would I be gaining the up votes/reputation I got after reaching 200?    Is there not a mechanism to report this kind of serial upvotes?


Let's say I have two simple vectors: $[0, 1]$ and $[1, 0]$.  Their Kronecker product would be $[0, 0, 1, 0]$.  Let's say I have only the Kronecker product. How can I find the two initial vectors back?  If my two vectors are written as : $[a, b]$ and $[c, d]$, the (given) Kronecker product is:  $$[ac, ad, bc, bd] = [k_0, k_1, k_2, k_3]$$ So I have a system of four non linear equations that I wish to solve: $$\begin{align*} ac &= k_0\\ ad&= k_1\\ bc&= k_2\\ bd &=k_3. \end{align*}$$  I am looking for a general way to solve this problem for any number of initial vectors in $\mathbb{C}^2$ (leading my number of variables to $2n$ and my equations to $2^n$ if I have $n$ vectors).  So here are a few specific questions:  What is the common name of this problem?   If a general solution is known, what is its complexity class?  Does the fact that I have more and more equations when $n$ goes up compared to the number of variables help?  (Note: I really didn't know what to put as a tag.)


I am receiving this error message when I'm trying to uncompress a .tgz archive:  $ tar -zxvf OVM_EL5U3_X86_EBIZ12.1.1_DB_VIS_PVM.tgz.1 gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now   As you can see, the file name ends with .tgz.1.  When the file name is .tgz.0 it will be uncompressed with no error by the tar -zxvf command.


Using VS 2005 SP1  I have a solution which contains an windows project and a web service project. The windows application calls the web service. I have a breakpoint in the first line in the web service method. When I run the windows app in debug mode, the call to the web service gets executed and returns but the breakpoint in the web service doesn't get triggered.  Is there a special set up to get the debugger to single into the web service?


Height one prime avoidance in normal domains

Let $R$ be a Noetherian normal domain.  Let $X$ be the set of height one prime ideals of $R$, and let $\mathfrak p \in X$.  Can one have  $$ \mathfrak p \subseteq \bigcup_{\mathfrak q \in X \setminus \{\mathfrak p\}} \mathfrak q? $$ Moreover, if this is impossible in a Noetherian normal domain, can it happen in a Krull domain?


How to fix 3D Acceleration for Vmware Workstation 9?

I have recently installed Vmware workstation 9 on Ubuntu 12.04  & i have migrated my VM's from windows to Ubuntu 12.04 . Now i am getting openGL error & it says no 3D acceleration as shown in pic below        How Do I Fix It ?


Ubuntu 16.04 in virtual box stuck in login loop

I was using Virtualbox 5.1.4, and I was running Ubuntu 16.04 as my guest os on windows 10 host os. Everything was running perfect. Then yesterday the system freezed because I was running a lot of tasks. Then I rebooted the virtual machine. Next thing I knew I was stuck in the login loop. I tried a bunch of different things, like using mv .ICEauthority .ICEauthority.bak and some others, but none of them worked... One thing noticeable is that for some reason my environment variable was  messed up, because almost all my commands cannot be used directly (e.g I have to do /bin/mv .ICEauthority .ICEauthority.bak)  [Edit]I have also tried to disable my nvidia video card by using prime-select command, but it it prompted "command not found"  Any method that would log me into unity is much appreciated, as long as it keeps my data intact.  My environment file looks like this: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"  My .profile looks like this:


Is there a way to organize TeX by-product files?

I rarely need the ancillary files TeX produces when compiling a document (.aux, .log, .out, .synctex.gz). In fact, I've only ever had to read the .log, and that's only a few times. Is there a way to write them to a separate directory, so that my working directory only contains .tex and .pdf files?


I am wondering if its possible to use a base class as parameter in function but when calling the function passing a derived class?  In .h file  class parent {     virtual void foo(); }  class child_a: parent {     void foo(); }  class child_b: parent {     void foo(); }   in main.cpp  void bar(parent p) {      // Doing things }  int main() {     child_a a;     bar(a);     return 0; }   Or do i have to use overloaded functions? it there another way to do it?


For any integers $m,n>1$ , does there exist a group $G$ with elements $a,b \in G$ such that $o(a)=m , o(b)=n$ but $ab$ has infinite order ?

For any integers $m,n$ , both greater than $1$ , does there exist a group $G$ with elements $a,b \in G$ such that $o(a)=m , o(b)=n$ but $ab$ has infinite order ?


HTML & PHP headers look fine but accents will still appear as �

I'm facing a quite new situation. I'm not an expert about charset, but as far as I know, all the chain should use the same encoding system.  If I put accents directly in the html code, they'll look fine. However, when I fetch data from my mysql database, all of them will be displayed like this : �, no matter if I echo them in the body or using scripts.  On the page, I have set this :  <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr"> <head> <?php header('Content-Type:text/html; charset=UTF-8'); ?> <?xml version="1.0" encoding="UTF-8"?> <meta charset="UTF-8"> <meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>   Regarding the database : the server uses UTF-8 Unicode (utf8) utf8_general_ci The table utf8_general_ci The fields utf8_general_ci  I'm running out of ideas.


Image of the tensor product of strict maps of Banach spaces

Let $f:A\to C$ and $g:B\to D$ be bounded linear maps of Banach spaces with closed image. Will $f\widehat{\otimes}g:A\widehat{\otimes}_\pi B\to C\widehat{\otimes}_\pi D$ also have closed image? What about injective tensor products?


Verb agreement in “It is you who has/have come”

Today I was playing the video game Assassin’s Creed Syndicate on my PC. In a mission where the player whose name is Evie Frye meets a guy, the guy says I thought Jacob was coming but  that     I am glad that it is you who have come.    After hearing this, I got a little bit confused because  I would have used has instead. So native English speakers, could you please tell me which verb is suitable to use here?


How to write startup script for Systemd?

I have 2 graphics cards on my laptop. One is IGP and another discrete.   I've written a shell script to to turn off the discrete graphics card.  How can I convert it to systemd script to run it at start-up?


What is the best way to run multiple subprocesses via fork()?

A python script need to spawn multiple sub-processes via fork(). All of those child processes  should run simultaneously and the parent process should be waiting for all of them to finish. Having an ability to set some timeout on a "slow" child would be nice. The parent process goes on processing the rest of the script after all kids are collected.  What is the best way to work it out? Thanks.


Why does a cyclist/motorcyclist bend when making a turn?

I've seen this very prominently in the Olympics


Possible Duplicate:    When a sentence ends with an abbreviation, should there be two periods or one?  Welcome to ACME Inc. We are glad to have you on board. Welcome to ACME Inc.. We are glad to have you on board.  I would assume that only one is appropriate because I've never seen two used (and it looks awful), but if so, does the period "belong" to the end of the sentence or the abbreviation? I ask because I came across this while writing HTML, and the last word needs to be a link, so I wasn't sure if the period belongs within it.  Welcome to  We are glad to have you on board. Welcome to . We are glad to have you on board. Welcome to . We are glad to have you on board.  Usually a link should not include punctuation at the end of the sentence, but should include it as the end of an abbreviation in the middle or beginning of a sentence. Which of these links seem more appropriate? If only one period is used, who "owns" the period: the abbreviation or the sentence?


Is sour cream in super markets made in the traditional way?

Is sour cream in super markets made in the traditional whey? (Ha ha, just kidding.)  The traditional method of making sour cream is easy to describe: milk is spun using a centrifuge so as to extract a heavy cream, which is 1 part cream, 9 parts milk. (Cream for butter is lighter than this). The heavy cream is then cooled to thicken it, then the temperature is increased to about 85F. A small amount (1:20) of sour cream is added to initiate fermentation and the cream is gently stirred for 2 hours, then allowed to sit for 6 hours or to taste. When it is sour, it is refrigerated. In this state it can last for 2-3 months.  Modern recipes I have seen for home cooks obviously do not follow this method, because it requires having a milk separator and raw milk. Instead these recipes mix in buttermilk with light cream, or other methods, which are not true to the original method. However, I am wondering if store-bought sour creams follows the traditional method, or do modern commercial processes use light cream also?