Increase test coverage for query IsSandbox =true

I am checking for sandbox with help of query select Id from Organization where IsSandbox =true limit 1  but now in production and developer org my code coverage is going down to 33%  as this query is not getting satisfied.  How should i increase this code coverage?


The Share menu in iOS 13 got a redesign, and the Stack Exchange iOS app is no longer compatible with it. I can still use it to copy the link, but when I try close the menu, it remains stuck. Opening another app and then returning automatically dismisses the menu, but then I can't use the back button anymore to return to the question list. (I'm still able to refresh the page, so it's a navigation issue.)    Ironically, I discovered this bug while trying to mark  as a duplicate; in the app, the quickest way to do that is to use the Share menu to copy the link to the original question to the clipboard...   App Version: 1.6.6.2 Device: iPhone 7 Plus OS Version: Version 13.1 (Build 17A844)


How to hide users from the GDM login screen?

I have recently added several new users, that I need for qmail. Now they appear in the box in the login screen and clutter it, and I have to scroll to find my user. How can I hide those users from the login box?


I'm trying to answer the following question:  By counting a set in two ways, prove the following formula  $$ \sum_{i=0}^k {m \choose i}{n \choose k-i} = {m+n \choose k} $$  I found some similar examples on this site and came to the conclusion of saying the following for the answer  We can say that $m$ represents the number of boys and $n$ represents the number of girls and that we are picking $k$ number of people from the total number of boys and girls for the right side of the equation.  For the left side, we say again that there are $m$ boys and $n$ girls and that we are picking $k$ number of boys and girls but we are picking $i$ boys and then $k-i$ girls.  This is a much as I could do with the question with my current understanding. I don't know if this constitutes as a full proof or if I have to add more to it, and if I do have to add more I don't know what I'm missing. If someone could point me in the right direction it would be greatly appreciated.


atheros AR9285 compatibility with wpa2 enterprise

I have a asus u32u and just install the ubuntu 13.10. I'm new working with linux and need a little help.  My pc has a Qualcomm Atheros AR9285 and I can connect to my Wi-Fi, my problem is in my college, where i can connect via cable but not via Wi-Fi.  My college Wi-Fi:   security: WPA2 Enterprise authentication: Protected EAP (PEAP) inner authentication: MSCHAPv2   Any question, just ask. If you need me to put some information about my pc, please leave the respective code.


How to make Fractions in \array environment from being tiny and squishing up?

I am a new Latex user who's having problems when writing fractions in the \array environment. The text becomes compressed to where reading what I wrote becomes a challenge, and I have so far spent hours finding a solution to my problem with no luck. I want to the \array environment to look similar to the equations not in the \array environment.   \begin{proof}     We proceed by induction.     \begin{enumerate}         \item Let $n = 1$. Then \[ \frac{1}{1(1+1)} = \frac{1}{2} = \frac{1}{1+1} = \frac{1}{2} \]     Therefore, the base case holds.         \item Assume now by Induction that \[ \frac{1}{1 \cdot 2}+ \frac{1}{2 \cdot 3}+\frac{1}{3 \cdot 4} + \dotsb + \frac{1}{n(n+1)}=\frac{n}{n+1} \] holds for some $n \in{\mathbb{N}}$. We now show that \[ \frac{1}{1 \cdot 2}+ \frac{1}{2 \cdot 3}+\frac{1}{3 \cdot 4} + \dotsb + \frac{1}{(n+1)(n+2)}=\frac{n+1}{n+2} \] We write \[ \begin{array}{lll}             \frac{1}{1 \cdot 2}+ \frac{1}{2 \cdot 3} + \dotsb + \frac{1}{(n+1)(n+2)} & = & \frac{1}{1 \cdot 2}+ \frac{1}{2 \cdot 3} + \dotsb + \frac{1}{n(n+1)} + \frac{1}{(n+1)(n+2)}  \\               & = & \frac{n}{n+1} + \frac{1}{(n+1)(n+2)} \\              & = & \frac{(n+1)^{2}}{(n+1)(n+2)} \\              & = & \frac{n + 1}{n + 2}.         \end{array} \]         \end{enumerate} By Induction, \[ \frac{1}{1 \cdot 2}+ \frac{1}{2 \cdot 3}+\frac{1}{3 \cdot 4} + \dotsb + \frac{1}{(n+1)(n+2)}=\frac{n+1}{n+2} \] for every $n \in{\mathbb{N}}$.


The following packages have unmet dependencies:  winehq-stable:i386 : Depends: wine-stable:i386 (= 5.0.2~focal) E: Unable to correct problems, you have held broken packages.  I am getting this error message Could anyone let me know how to rectify the problem? Also I am getting errors while running sudo apt update command, does that have something to do with this?


Given $a,b,n \in \mathbb N$, prove that $a-b|a^n-b^n$. I think about induction. The assertion is obviously true for $n=1$. If I assume that assertive is true for a given $k \in \mathbb N$, i.e.: $a-b|a^k-b^k$, I should be able to find that $a-b|a^{k+1}-b^{k+1}$, but I can't do it. Any help is welcome. Thanks!


Linear quadratic cubic system of equation

I have been trying to make something out of this system of equations for quite sometimes now  $x+y+z=4\\x^2+y^2+z^2=38\\x^3+y^3+z^3=106$  I have tried direct substitution but the equation keeps expanding, and keeps getting complicated. I have also tried multipling by $x,$ $y,$ $z$ in several ways. But it was all a futile effort.  Any insight to this??


Show by using logical connectives laws that $(P\to Q) \land (Q \to R) $ is equivalent to $(P \to R) \land [(P \iff Q) \lor (R \iff Q)]$

I am having trouble with a problem in the book I'm self-studying from. It says the following:     Show that $(P\to Q) \land (Q \to R) $ is equivalent to $(P \to R)$   $\land [(P \iff Q) \lor (R \iff Q)]$ by using logical connectives   I have dedicated so far a hefty amount of time on this problem, and now I'm asking you guys advice/hints or solution as to how to solve this problem. Here is one of the methods I used. Point any flaws that I made.  $(P\to Q) \land (Q \to R) $   (Conditional Law)  $(\neg P \lor Q) \land (\neg Q \lor R) \Rightarrow$  (Distributive Law)  $[(\neg P \land \neg Q)] \lor [Q \land (\neg Q \lor R)] \Rightarrow$  (Distributive Law)  $[(\neg P \land \neg Q) \lor (R \land \neg P)] \lor [(Q \land \neg Q) \lor (R \land Q)] \Rightarrow$  Contradiction  $[(\neg P \land \neg Q) \lor (R \land \neg P)] \lor [(Contradiction) \lor (R \land Q)] \Rightarrow$  (Contradiction Law)  $[(\neg P \land \neg Q) \lor (R \land \neg P)] \lor [ (R \land Q)] \Rightarrow$  Typically at around step five I get stuck or get confused because the problem gets messy.  I know you could show it by using the truth-tables. However, the problem says use logical connectives. My questions are: Am I on the right track into solving this problem? Did I make any mistakes? What advice/hints would you give me in my path to solving this problem?  Edit Some of you guys want me to list the laws. Here they are:     DeMorgan's laws      $\neg(P \land Q) \equiv \neg P \lor \neg Q$      $\neg(P \lor Q) \equiv \neg P \land \neg Q$      Commutative laws      $P \lor Q \equiv Q \lor P$      $Q\lor P \equiv P \lor Q$      Associative Laws      $P \land (Q \land R) \equiv (P \land Q) \land R  $      $(P \land Q) \land R \equiv P \land (Q \land R)  $      Idempotent Laws      $P \land P \equiv P$      $P \lor P  \equiv P$      Distributive Laws      $P \land (Q \lor R)  \equiv (P \land Q ) \lor (P \land R)$      $P \lor (Q \land R)  \equiv (P \lor Q) \land (P \lor R)$      Absorption Laws      $P \lor (P \land Q) \equiv P$      $P \land (P \lor Q) \equiv P$      Tautology Laws      $P \land (tautology) \equiv P$      $P \lor (tautology) \equiv (tautology)$      Contradiction Laws      $P \land (contradiction) \equiv (contradiction)$      $P \lor (contradiction) \equiv P$      Conditional laws      $P \to Q \equiv  \neg P \lor Q$      $P \to Q \equiv  \neg (P \land \neg Q)$


What can be said about roots of equation like   $$ x^{13} - e^{-x} + x - sin(x) = 0$$  If we assume f (x) to be above equation then f'(x) is positive, but I am not sure doing it this way. Is there some other general method?


There are a lot of different side effects an item can have, and I assume that things like magic find have no influence on any of "our" found items at all.  However, I'm not sure about other things. For example:   Do followers get life-steal on weapons, too? Does increased orb healing make any difference? What about +experience after kills? Will my follower level up faster?   and probably a lot more.  Is there some general rule as to what effects of an item apply to followers, and which don't?


How can know if a proof technique can actually prove something? Specifically, induction

Induction is an incredible tool to prove some propositions. Although it seems that these propositions require some level of simplicity for us to be able prove them using only induction. If we wanted, for example, to prove Fermat's last theorem using induction on the exponential, I think we would have a hard time.  Regardless of that, if $\phi$ (n) is the statement:$n > 2$  $\land$  $x^n + y^n = z^n$ has no natural solutions. Since Fermat's last theorem is now proved the statement: $\phi (0)$ $ \land $ $\forall x(\phi(x) \implies \phi(x+1))$ is trivially true. (trivially in the sense that it follows directly from Wile's proof of Fermat's last theorem). Then, using in the Induction Scheme, we can conclude that $\forall x \phi (x)$  So, the induction scheme over our statement is provable. But i doubt that anyone would ever be capable of proving Fermat's last theorem using only induction.  Is there a formalization of the concept of "proof technique"? Are there current theories which could, theoretically, prove that if a computer is programmed to only search for proofs using induction, it would never be capable of proving Fermat's last theorem?  I apologize if this question is too vague. If a moderator believes this question is not meant for this website, please delete this.  Edit: In my research I found some paper called "natural proofs", in which it shows that any proof using certain technique, directly related to a combinatorial property, would not be enough to prove that P != NP. But it seems to me, at least in my ignorance, that the proof is too connected with Complexity Theory, and I wouldn't know if we can generalize this for other methods of mathematics. Has this been done before?


Can we begin a sentence with a 'number'?

3 more votes from other users are needed to close this question.   This is the message I got hovering the mouse over close voting tab.   I wonder can we begin any sentence with a numeric value? Is it good practice?


List all files that return exceptions to a listbox C#

I'm creating a method to handle file exceptions.  I have listed all files in a directory and search for subdirectories and list all files in those subdirectories too on the C:\Users\ folder  listBox1.Items.AddRange(Directory.GetFiles("C:\\Users\\", "*", SearchOption.AllDirectories));   Some files are protected by windows, and when you run a command for those files it gives me an exception.  If there is any possible, How can I save the files that returned the exception to another listbox when the exception happens and continue listing the files to first listbox?


Testing Classification on Oversampled Imbalance Data

I am working on severely imbalanced data. In literature, several methods are used to re-balance the data using re-sampling (over- or under-sampling). Two good approaches are:   SMOTE: Synthetic Minority Over-sampling TEchnique () ADASYN: Adaptive Synthetic Sampling Approach for Imbalanced Learning ()   I have implemented ADASYN because its adaptive nature and ease to extension to multi-class problems.  My question is how to test the oversampled data produced by ADASYN (or any other oversampling methods). It is not clear in the mentioned two paper how they performed their experiments. There are two scenarios:  1- Oversample the whole dataset, then split it to training and testing sets (or cross validation).  2- After splitting the original dataset, perform oversampling on the training set only and test on the original data test set (could be performed with cross validation).  In the first case the results are much better than without oversampling, but I am concerned if there is overfitting. While in the second case the results are slightly better than without oversampling and much worse than the first case. But the concern with the second case is if all minority class samples goes to the testing set, then no benefit will be achieved with oversampling.  I am not sure if there are any other settings to test such data.


Prevent scrambled eggs from sticking to stainless steel

I'm having the hardest time preventing scrambled eggs from sticking to stainless steel cookware. I've tried bringing the eggs to room temperature before cooking, slowly heating the pan, loads of butter (tasted great, still stuck), adding milk to the eggs. How can I prevent scrambled eggs from sticking to stainless steel?


What is forward invocation? What it is supposed to do? Why it is ever used?

I came across this code in a project, where it is using NSInvocation. I want to know what it is supposed to do, and why would we ever need that. Simple explanations would be appreciated. I am posting the code.  // Public interface @interface CCDelegateSplitter : NSObject  - (void) addDelegate: (id) delegate; - (void) addDelegates: (NSArray*) delegates;  @end  // Private interface @interface CCDelegateSplitter () @property(strong) NSMutableSet *delegates; @end  @implementation CCDelegateSplitter  - (id) init {     self = [super init];     _delegates = [NSMutableSet set];     return self; }  - (void) addDelegate: (id) delegate {     [_delegates addObject:delegate]; }  - (void) addDelegates: (NSArray*) delegates {     [_delegates addObjectsFromArray:delegates]; }  - (void) forwardInvocation: (NSInvocation*) invocation {     for (id delegate in _delegates) {         [invocation invokeWithTarget:delegate];     } }  - (NSMethodSignature*) methodSignatureForSelector: (SEL) selector {     NSMethodSignature *our = [super methodSignatureForSelector:selector];     NSMethodSignature *delegated = [(NSObject *)[_delegates anyObject] methodSignatureForSelector:selector];     return our ? our : delegated; }  - (BOOL) respondsToSelector: (SEL) selector {     return [[_delegates anyObject] respondsToSelector:selector]; }  @end


x$A^{100 }$ where $A = \begin{bmatrix} 1 &2 \\ 3& 4 \end{bmatrix}$

Compute $A^{100 }$ where   $A = \begin{bmatrix}  1 &2 \\ 3& 4 \end{bmatrix}$.   I can  calculate $A^{100}$  using a calculator, but  my question  is that  is  there  any  short formula/method   or  is their any trick  to find the  $A^{100}$?


Compare 2 arrays and filter matched elements

var array1 = ["AL", "CA", "IN "]; var array2 = ["AL", "AL", "CA", "CA", "IN", "IN", "WI", "WY"];  My desired o/p: ["AL", "CA", "IN"]     var array1 = ["AL", "CA", "I"]; var array2 = ["AL", "AL", "CA", "CA", "IN", "IN", "WI", "WY"];  My desired o/p: ["AL", "CA"]  I tried like this: const intersection = array1.filter(element => array2.includes(element));  console.log(intersection) But i am getting o/p : ["AL", "CA"]. Can some one help me on this. I want to compare 2 arrays and find the result with matched elements,I searched a lot but could not get a solution .please help me in advance.


Extract a list of strings from a file, only from first column

I wanted to extract a list of numbers (string.txt) from masterFile.list. masterFile.list is separated by | and contained more than one column. I am only interested with the line, where its first column contained number matched in the string.txt file. string.txt: 3075 3078 3076  masterFile.list 3078    |       Auxenochlorella pyrenoidosa (H.Chick) Molinari & Calvo-Perez, 2015      |                   |       authority       | 3079    |       Auxenochlorella pyrenoidosa 3078    |               |       scientific name | 3076    |       Chlorella pyrenoidosa H.Chick, 1903     |               |       authority       | 3077    |       Chlorella vulgaris var. viridis Chodat, 1913    |               |       authority 487     |       ATCC 13077      |       ATCC 13077 <type strain>        |       type material   | 460     |       DSM 23076       |       DSM 23076 <type strain> |       type material   |  expected output: 3078    |       Auxenochlorella pyrenoidosa (H.Chick) Molinari & Calvo-Perez, 2015      |                       |       authority       | 3076    |       Chlorella pyrenoidosa H.Chick, 1903     |               |       authority       |  Most of the previous post I have found only allow the extraction of single string, and limit match to first column. Is it possible to extract more than one string at a time?


Extending  , why is the definite article placed in front of rivers but not lakes?


Connect to WiFi network through Ubuntu terminal

I am using my WiFi network adapter on the laptop to connect to the internet on Ubuntu 10.04. I have tried the following steps and got the below messages on the Ubuntu terminal. Please let me know what has gone wrong. Thank you.  I have used the following instructions I have seen on a web page.   Open the terminal. Type ifconfig wlan0 and press Enter. You will not see any output in the terminal, as this command just turns your wireless card on. Most wireless cards are designated wlan0. If yours has a different designation, use that instead. Type iwconfig wlan0 essid name key password and press Enter. Replace name with the actual network name, and replace password with the actual security key for the network. If your wireless network does not require a security key, do not enter key password. Type dhclient wlan0 and press Enter to obtain an IP address and connect to the WiFi network.   What I see on the terminal are given below.


I am trying to make some graphs in my android application but I am getting NullPointer Exception at findviewbyid(). Since I am plotting graphs at different tab so I have used a separate fragment for graphs.  EDIT: My question is different. I know where and how I am getting null pointer exception but as I am new to Android,I don't know how to remove it in this particular situation.  Code for the graph fragment:  public class Graphs_tab extends android.support.v4.app.Fragment { @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {     View rootView = inflater.inflate(R.layout.graphs_tab,container,false);         GraphView graph = (GraphView) getView().findViewById(R.id.graph);         LineGraphSeries<DataPoint> series = new LineGraphSeries<>(new DataPoint[]{                 new DataPoint(0, 1),                 new DataPoint(1, 5),                 new DataPoint(2, 3),                 new DataPoint(3, 2),                 new DataPoint(4, 6)         });         graph.addSeries(series);     return  rootView; }}   Xml code :  <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:paddingBottom="@dimen/activity_vertical_margin"     android:paddingLeft="@dimen/activity_horizontal_margin"     android:paddingRight="@dimen/activity_horizontal_margin"     android:paddingTop="@dimen/activity_vertical_margin"     tools:context=".MainActivity">      <com.jjoe64.graphview.GraphView         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:id="@+id/graph" /> </RelativeLayout>


Can I purchase a Ubuntu system on a CD or DVD and install it myself? Or can I ship my brand new PC to you for you to perform this?


I have accidently installed ubuntu on my windows 8 64bit partition. I have only had one partition. Now i cannot go back. Can  you help me with a solution to go back to my windows 8?


Is there a way to explain quantum mechanics without invoking complex numbers?

"Every possible history starting from a particular state and ending at a particular state is assigned a complex number by some predefined rules in particular that the complex number is the product of the complex numbers assigned to each part of the history.  The complex numbers are summed and the square magnitude gives the probability for the final state given the initial state."  This is my very brief summary of the essence of quantum mechanics. The problem is that it necessitates the definition of the sum and product of complex numbers. Feynman used arrows instead in some public lectures. Do you know of any better explanations that don't involve complex numbers or little arrows?   Also, the definition is not entirely true as you have to regulate the sums or do Wick rotation tricks otherwise you just get infinity. Which sort of suggests that this definition might not be the best.


PMD rises `Validate CRUD permission before SOQL/DML operation`

Let's say we have        if(Schema.SObjectType.PermissionSetAssignment.isCreateable()){             List<GroupMember> usersToInsert = new List<GroupMember>();             for(AggregateResult usr : [SELECT assigneeId                                         FROM PermissionSetAssignment                                         WHERE ((PermissionSet.IsOwnedByProfile = TRUE                                                     AND PermissionSet.profile.name IN :profileNames)                                                         OR PermissionSet.name IN :permissionSetNames)                                                     AND assigneeId NOT IN (SELECT UserOrGroupId                                                                             FROM GroupMember                                                                             WHERE Group.Name = :groupName)                                          WITH SECURITY_ENFORCED                                         GROUP BY assigneeId]){                 usersToInsert.add(new GroupMember(UserOrGroupId = (Id)usr.get('assigneeId'), GroupId = groupId));             }             insert usersToInsert;         }  why we face PDM issue? is it possible to avoid it? (Updated) it doesn't work if I even add WITH SECURITY_ENFORCED to SOQL query


Stderr sometimes gets redirected to /dev/null

Sometimes when i am working in a shell i suddenly find out that standard error has been linked to /dev/null. If i open a new shell it is back to normal.  I am using zsh with oh-my-zsh and prezto. I have looked over the rc files but i cannot find any reason why this should happen seemingly at random.


JavaScript for-in loop with array -- get current key

say I have some kind of function range which creates an array from min to max, like range(4,10). Say I want to loop through this array with a for-in loop like so:  for(i in range(4,10)) console.log(i);   If you try something like this out, you will notice that i starts from 0, not from 4. Is there a simple way (I guess without just adding the minimal ammount and without storing "range(4,10)" in a variable) to access the current value that is being looped through in the array? I believe in C# the syntax would be something like i.Key, does a similar property exist in the i variable? Or is there some kind of keyword that the value to the right of "in" is stored in within that scope that can be used for indexing?


How do gamepad buttons interact with the PCB?

How do the buttons (like A, B, X, Y, and D-Pad) on game pads (such as the Xbox controller) interact with the PCB? If my question sounds vague, refer to the pictures below:    Are A/B the same as C/D? In game, the D-Pad (left) shows up as "Axis", while the buttons (right) just show up as "button".  What are A/B/C/D called, and what are they made of? It all looks and feels like rubber, but if that were the case then it wouldn't have any effect on the electrical properties of the PCB in that area (right?).  How does the logic of A/B and C/D work? How does B pressing on A (or D pressing on C) send a signal to the computer saying "button X has been pressed"/"D-Pad UP has been pressed"?  For reference, I know how a push-button works; it makes and breaks physical connections, which in turn impedes or allows electrical current to flow. But I can't see how that happens in this picture.  Also, here's a picture of the other side of the PCB (it might help).


Stuck at purple screen when booting (GTX 1080) 16.04

I am getting stuck at a purple screen when trying to boot Ubuntu using the GTX 1080ti.  There are literally dozens of questions describing the same problem but none of the answers are solving my problem.  The most common answer is to boot using the integrated graphics card, install the Nvidia drivers, and then reboot the system with SecureBoot off (and through the 1080 this time).  I tried that but still get the hanging purple screen. I've tried with both nvidia-375 (apt-get) and nvidia-384 (ppa), but neither seem to work. It's still just stuck at the purple screen.  Any ideas?  Video card: Nvidia GTX 1080ti  Motherboard: ASRock z270 K6  Ubuntu: 16.04.3


This night, I've noticed nginx was not responding to requests. After some investigation, I found that it was using 100% of the CPU and error.log was full of messages like this one:  2013/05/28 00:11:31 [alert] 31211#0: accept() failed (24: Too many open files)   But more importantly, checking access.log discovered requests like this one:  193.169.124.92 - - [28/May/2013:00:11:46 +0300] "h50bno34mx9943tz0i2lvhpq8um396v66k4oosu0l78e8q3x0gz4up5a57h744z24y7l4y27q6f9731zgg9jhv536ny9n7nl25p4t4885luo4148gu8ha18yu9eqvir1qr771k959hm6vzqkv45i790dy3bl3dcjqdi6o52kwp31zxkvb229sb67ee8l24534067365l5xy1e3t5h368ek9681cvw907463s8t06m1u09x7fce1zt192tjod9e9enp279203liw50oz7ij94i7gv6921kgv74onc56dh4933r4agaxfwaaq2q45w345846kkxy21w557yxv249j71803frw53j080fmlm0510ae0m6p238d23junzma6y6q6x762a4358mdxc57i4lnh4ei1810y040hzc02m5ha3g5e7s058os5px399f24988a429yd3g36090x524u3ep1n0wpjeny533859dl837358w9u74y3qlr24f565572se7qw914y4ed1gugx711bgb5145232h05kf1vphr6c2ycc313hk664ldwgx707t06k3gf79345770n0t050e97c966y7925z06725f7ph9126yiv22u96d7fsugjagilc09670kts5h7w90f33hwptdjp27u1n0o34028n8j2z1474h0au7sda41z654s0uoqjd1ehji7101862we13srsz5xb1gf11z91t5jc3r4c447u5d018h9s3666cb3g5pts5120rt5fe7g598bnxcaf506y213de4lalsy51d80dg6wncw571ys5466wy28078js27y1ren6ph75jlq54h86su6f2765b1it0h21mp6h6vu5fzk0q75q1d2ad6z4eo6hs44885xt6f4io98xhgd21h9178qr0r43019ek570to59p99i3bxq39mro6qi02wzb92lx614r247rx35x6q191u0iq1wrlp7c21c5u1m30j14c5g57fk91by06896m3" 400 173 "-" "-"   What would you suggest? How to prevent this types of attacks? Is this a known pattern?  UPD. I now can say the requests were sent from about 50 IP addresses for about 20 minutes. There were 2510 requests all in all. That's what I got from nginx logs. I suppose not all the requests were logged. And I don't see requests like this before in the logs. (I have logs since 6th Apr).


WordPress plugin how to run function when button is clicked

I am writing a WP plugin. I have created a button for the user to click in thw WP dashboard. I need to run a function when a user clicks the button, shown with a red arrow. The code snippet for the button is:
<button class="button button-primary">Update Media Titles and ALT Text</button>
. I have already created the function in my class like so:  public function kh_update_media_seo() {      //update media files title and alt tags here }   I can handle the code that goes in the function alone, I only need help making the button in the WP dashboard fire off this specific function when clicked.  Pardon me if this sounds dump or straight forward. It's my first time doing this.  My plugin is a one file plugin if that helps.


Why resistor values are non-linear? What makes sense in 470 ohm?

I never figured that out. Why do we have 220 ohm and 470 ohm, rather than 100 ohm, 200 ohm, 300 ohm?  Any particular reason? maybe it's just legacy from old manufacturing process.


Show reflexive normed vector space is a Banach space

$X$ is a normed vector space. Assume $X$ is reflexive, then $X$ must be a Banach space.  I guess we only need to show any Cauchy sequence is convergent in $X$.


Creating restricted accounts on phone running Lollipop

Can we create restricted user on phone running Android Lollipop? Seems that restricted users are not supported on mobile but only on tablet (mobile has only simple user no restricted user option).  Reference:


What is the difference between all the different types of version control?

After being told by at least 10 people on SO that version control was a good thing even if it's just me I now have a followup question.  What is the difference between all the different types of version control and is there a guide that anybody knows of for version control that's very simple and easy to understand?


Apache - Phantom long requests returning 408?

I am having intermittent problems with sites that are running on apache - the boxes would spontaneously work themselves into a tizzy taking up all available CPU and memory in the process.  To this end, I decided to give an apache module called mod_log_slow a shot to see if I could get to the bottom of things.  This is what mod_log_slow returns on your average request if it takes more than 1 second:  VFz-@RFSe6WBtx2tOdv0qgAAAAw [07/Nov/2014:12:23:05 -0500] elapsed: 1.25 cpu: 0.04(usr)/0.01(sys) pid: 8059 ip: 1.2.3.4 host: www.example.com:80 reqinfo: GET /dining?start=20& HTTP/1.1   You can see how this log is generated by taking a look at the , but it should be relatively self-expanitory.  However, I soon discovered that there were some lines in the slow log that stuck out like a sore thumb.  1f7b:545d003d:0 [07/Nov/2014:12:24:13 -0500] elapsed: 53.33 cpu: 0.02(usr)/0.00(sys) pid: 8059 ip: 1.2.3.4 host: (null):80 reqinfo: (null)   No host?  No request?  No unique id?  Held open for 53 seconds?  I found the exact request in the normal access log as well, but it was equally perplexing:  1.2.3.4 - - [07/Nov/2014:12:24:13 -0500] "-" 408 - "-" "-"   What in the wide wide world of sports is going on here?


Is this possible that new without bracket but delete with bracket in C++

I know that to create array in C++ use new []  and delete this array use delete []  I wonder if I create a object and delete this with delete []  Test * a = new Test; delete [] a;   Well... it works... but is it safe? should I use delete without bracket?


Is there a single website where one can get to know about all upcoming international conferences?

It's very important for a research professional (such as a Statistician) who needs to work on multidisciplinary fields to attend international conferences and see what's going around in the field of research. However, sometimes information contained in the websites about the upcoming conferences are too subject specific (e.g. there's so many related to computer science).   Is there any website that 'gathers information' (rather than just providing information from the user submitted ones) on all conferences irrespective of particular subject areas?  If there is any website about conferences that is related to Statistics and the fields which has its use, it'll do for me as well. Thank you for your reading.


I am asked to show that the irrational numbers are not a countable union of closed subsets of $\mathbb{R}$ given that if a complete metric space is the countable union of of closed subsets then at least one of them has a nonempty interior.  So far: I assume that the irrationals are the countable union of closed subsets of  $\mathbb{R}$. I know that the irrationals are uncountable, so we cannot have this union consist of all singleton subsets. Therefore these closed sets must consist of intervals of irrational numbers.   At this point I cannot see how these intervals must all have a nonempty interior. Since each of these sets is closed, its closure is itself, and and so the closure minus the boundary of the interval should be nonempty given that any interval no matter how small contains infinitely many rationals and irrationals.   Can someone please point me in the right direction and/or point out the flaws in my reasoning?  Thanks


How can I upgrade an old iMac from 10.6.8?

Model: iMac11,2 (Core i3-550, MC509LL/A)   It was shipped with Snow Leopard 10.6.4, and I managed to update to 10.6.8 via Apple Software Update. After some research I found that this old iMac is capable of running Sierra (10.12.x) and made a few attempts to upgrade.  I noticed that I must first upgrade it to Lion (10.7.5) or El Capitan (10.11.6), both of which are no longer available from the Mac App Store.   But, all info I found from Google tells me to upgrade via MAS. (That's why I'm adding a month in the title.) Any ideas?


Groups of order $n^2$ that have no subgroup of order $n$

For which $n$ is there a group of order $n^2$ without a subgroup of order $n$.  Such groups can not be nilpotent.   This question is related to .


I've been noticing the cpu usage go up, back down for a couple minutes, and then go up again, and vice-versa...  Not constant but it happened several times. (almost always up to 23% cpu constant when it happens)  This happened just now only with firefox interaction, got skype and LoLClient running too..  Looking at it in Process Explorer, i see two files taking approximately 10% each:  ntoskrnl.exe dxgmms1.sys  The problem is after looking up that dxmgmms1.sys i found that it stands for "Microsoft DirectX Graphics MMS system driver file." and i can't remember updating it at all. The other one i believe it's what's enabling or something since it's kinda part of the Windows kernel?  I've done sfc couple months ago when i first noticed this, runned malware scans, windows always up-to-date and everything.  How can i fix this?  Edit: It happened again, i done a xperf scan as suggested:     xperf -on latency -stackwalk profile -buffersize 1024 -MaxFile 512   -FileMode Circular && timeout -1 && xperf -d highCPUUsage.etl   I uploaded the file to my dropbox, can someone tell analyze it or something? Or should i post on the msdn forums?    Thanks to whoever helps, hope i recorded it correctly, it displayed  when i started the trace.


I have a pretty simple table that needs to span multiple pages. This seems like a job for either the / package or the  package.   The voting on the answers to this  suggest that longtable is the preferred package, yet xtab is much newer and has been revised since that question was asked.  What are the differences between xtab and longtable and when is one preferable to the other?


Disable ssh password authentication by user

Is it possible to enable ssh password authentication for one user on a system and disable it for an other.  If you add  ChallengeResponseAuthentication no PasswordAuthentication no UsePAM no   to /etc/ssh/sshd_config you disable it for all users  Adding it to ~/.ssh/config doesn't seem to work


Sql query max/min only on the highest group

How can we achieve in getting the max and min values that is group by group. eg query, select country,max(size) from tablename group by country, this will query each max values of a group column data output is -> country  |  size myr      |  456 usd      |  123 eur      |  909   expected output should only show the max size which is 909 from eur country  |  size eur      |  909


Almost all the books of algebra or group theory give following types of applications of Sylow theorems:  A group of order $...$ is not simple. A group of order ... has normal Sylow subgroup.  Even in math.stackexchange, there are many questions with above title and they involve questions which are related to proving above type of statements. Are there any other type of applications of these theorems of Sylow?


Excel VBA code Private Sub Worksheet Change Power function not working

I'm making a worksheet where the wind speed defines the potential energy of the location. This value is the basis of a few sheets in the same Excel file. I'm trying to write a code that where I10 is the wind speed and I12 is the potential kWh on that location. I want both I10 as I12 to be input cells where you can either say: I want to know what wind speed I need to generate 4000 kwh i.e. or my wind speed is 4.2 m/s what will my potential energy be?  This is what I made so far, but I don't get the power function to work. At the moment I defined the cell I12 (The kWh's) without VBA as =(2208,5/(54,872))*I10^3 where I10 is the windspeed.  VBA code behind sheet which doesn't work:  Private Sub Worksheet_Change(ByVal Target As Excel.Range)     If Target.Address = "$I$10" Or Target.Address = "$I$12" Then          WIND = Range("I10")         KWH = Range("I12")          Application.EnableEvents = False          If Target.Address = "$I$10" Then             Range("I12").Value = (2208.5 / (54.872)) POWER(WIND,3)         Else             Range("I10").Value = POWER( KWH (2208.5 / (54.872)),(1/3)          End If     End If     Application.EnableEvents = True End Sub   Potential solution, but not working at the moment.  Function MyPower(Number As Double, Exponent As Double) As Double     MyPower = Number ^ Exponent End Function


I am trying to replicate a material with these nodes and they use a power node and it’s not on blender. i’m using 2.92


I saw this sample code at Oracle Certification website and someone here can explain me the concept of static {} ?  public class Sequence {  Sequence() {     System.out.print("c "); }  {     System.out.print("y "); }  public static void main(String[] args) {     new Sequence().go(); }  void go() {     System.out.print("g "); }  static {     System.out.print("* "); }  }


Toggle Panel on/off without unregistering class

I'm trying to add a boolean to my addon preferences menu that when toggled will remove the selected panel. Unfortunately I have no idea how to do this without registering/unregistering which doesn't work once unregistered. Any ideas?     if bpy.context.scene.hideCryptoBool == True:         bpy.utils.unregister_class(bpy.types.DARROW_PT_cryptoPanel)      if bpy.context.scene.hideCryptoBool == False:         bpy.utils.register_class(bpy.types.DARROW_PT_cryptoPanel)      return {'FINISHED'}


Uncountable minus countable set is uncountable

Problem statement  Prove that if $A$ is an uncountable set and $B$ is a countable set, then $A\setminus B$ must be uncountable.  What I think  The statement does not mention $A$ and $B$ relationship. I think there are two possibilities:   If $A \cap B = \emptyset $, then $A\setminus B$ is trivially uncountable If $A \cap B = B$, then $B \subset A$ and as a bijection can not be made between $A\setminus B$ and $\mathbb{N}$, $A\setminus B$ is uncountable.   And there is where I'm stuck. How can I prove that a bijecton can't be made?  TIA.


In which situations does a wizard's patronus change due to love?

My friend and I were talking about this. The only two instances mentioned in which patronuses change into a loved one's patronus, is when the love is unrequited (Snape to Lily, Tonks to Lupin). My friend thinks a wizard's patronus only changes with unrequited love, while I think that is too specific and weird.     "You'd better put that cloak back on, and we can walk up to the school" said Tonks, still unsmiling. As Harry swung the cloak back over himself, she waved her wand; an immense silvery four-legged creature erupted from it and streaked off into the darkness.   "Was that a Patronus?" asked Harry, who had seen Dumbledore send messages like this.   "Yes, I'm sending word to the castle that I've got you or they'll worry. Come on, we'd better not dawdle."      The Half-Blood Pricne - page 157 & 158 - Bloomsbury - chapter 8, Snape Victorious        "Hagrid was late for the start-of-term feast, just like Potter here, so I took it instead. And incidentally," said Snape, standing back to allow Harry to pass him, "I was interested to see your new Patronus."      The Half-Blood Pricne - page 160 - Bloomsbury - chapter 8, Snape Victorious        "But I don't care either, I don't care!" said Tonks, seizing the front of Lupin's robes and shaking them. "I've told you a million times...."   And the meaning of Tonks's Patronus and her mouse-colored hair, and the reason she had come running to Dumbledore when she had heard a rumour someone had been attracked by Greyback, all suddenly became clear to Harry; it had not been Sirius that Tonks had fallen in love with after all.      The Half-Blood Prince - page 624 - Bloomsbury - chapter 29, The Pheonix Lament   And...     "But this is touching, Severus," said Dumbledore seriously. "Have you grown to care for the boy, after all?"   "For him?" shouted Snape. "Expecto Patronum!"   From the tip of his wand burst the silver doe: She landed on the office floor, bounded once across the office, and soared out of the window.      Deathly Hallows - page 687 - Bloomsbury - chapter 33, The Prince's Tale   But if it changed for any love, wouldn't that mean that couples would end up with the same patronuses? For example, if Lily fell in love with James, couldn't her patronus become a stag, which in turn would make Snape's a stag, too? And is it only romantic love? Does a parent's patronus change to their child's? But then that seems way too general. Everyone would have the same patronus.   Is this only strong, passionate love? But how would that be judged? That would put down all other kinds of love.   (edit: I know Lupin did love Tonks back, but as , he was still rejecting her)


Java Nullpointer Exception after null check

I know what a NullPointerException is and why it is thrown what is unclear to me is why it is thrown in my example since "a" is set to a new instance of my class in which the constructor of the class assigns a value to appointmentDate.   if(a==null){         return false;     }     if(a.getAppointmentDate().before(Calendar.getInstance())){         throw new InvalidCalendarException("date before now");     }     When executing this code a Nullpointer Exception is thrown in the second if-condition and I have no idea why since this point shouldn't be reached in cased a is null ( a is an instance of a class with a private java.util.Calendar attribute). In the constructor of said class the attribute is set according to input. Can someone please help me? I have been trying to get a solution for several hours now :(


How can I install Swift on Ubuntu 19.04?

According to  its supported platforms are:   Ubuntu 14.04 Ubuntu 16.04 Ubuntu 18.04   Is there any way to install it on a machine running Ubuntu 19.04?


Ceil value of numbers with a non zero number after a lot of trailing zeroes after a decimal point

How to get the ceil value of numbers like 1.000000000001 to 2 as it is giving 1 by default(i am using CPP),I came across a problem where I needed to calculate ceil(1000000000,999999999) and it is giving 1,is there any other method to de the same??


Why does the definition of a square root for a number not include its solution's negative counterpart?

While practicing math for the SAT, I came across the question-   What is the sum of the solutions to $\sqrt{3x+13} = x+3$?  The first step I did was to make it a quadratic from the given equation.  Working with the quadratic, $x^2 + 3x -4$, I factored it down to $(x+4)(x-1)$.  I then checked each solution with the original equation. For $x=1$, I found the equation to hold true as $\sqrt{(3*1)+13} = 1+3$  My question then comes from when I tried to check $x=-4$.  $\sqrt{(3*-4)+13} = -4+3$  $\sqrt{(-12)+13} = -1$  $\sqrt{1} = -1$ (Or so I thought)  The answer to the problem was 1 as it did not include $x=-4$ to be a proper solution. Upon seeing this, I decided to do some research.  According to the book, , by I.M. Gelfand, Alexander Shen:     "To be exact, a square root of a nonnegative number $a$ is a nonnegative number whose square is equal to $a$"   For example: $\sqrt{25} = 5$ and $5^2 = 25$  What confuses me is why we cannot also include $-5$ as a solution to the square root, because $-5^2 = 25$


Proving $\sum_{i=1}^ni^2=\frac{n(n+1)(2n+1)}{6}$ with Induction

I've been watching countless tutorials but still can't quite understand how to prove something like the following: $$\sum_{i=1}^ni^2=\frac{n(n+1)(2n+1)}{6}$$    The ^2 is throwing me off, I really wish I can show you what I've already tried but I have absolutely no clue where to start. I've also looked around for similar problems but can't find any that start with ^2.  I appreciate all help whatsoever, thank you!


Does the Virtual PC XP Mode need safety measures?

Does the Virtual PC XP-Mode (or any other virtualized mode) require safety measures, such as antivirus or a firewall?  I'm just wondering if the XP-Mode would be a large security loophole, since it's so much more integrated into Windows 7. Actually I'm wondering the same for Portable Ubuntu, are their any safety measures I should undertake, so that I don't open a backdoor on my computer.


Can I fit 26 x 2.2 tyres to my 26 x 2.25 wheels on my mountain bike?

(Not sure of year)   Specialized Rockhopper Currently has 26x2.25 tyres, desperately need replacing though,  Mostly used on roads or grass, but trails occasionally   I'm not a professional, I just like riding my bike


Let $x$ and $y$ be integers such that $x ≡ 3$ (mod $9$) and y ≡$ 4$ (mod $9$). Is it possible that $ 20x + 3y^3 ≡ 6$ (mod $9$)

I have problem answering this question. I know the answer is not possible but I by simply substitute the 3 and 4 but I have clue why so. Can anyone give me an explanation or a correct way to answer this question properly.  Any help is appreciated. Thanks :)


Consider this sentence :  "I was going down the hill and on my step down I saw a guy who appeared to be disguised".  "I was going down the hill and on my step down I saw a guy that appeared to be disguised".  which is correct usage of English in such case that or who?


How do these icicles seem to defy gravity and form in my ice cube tray in my freezer?

I've been seeing this effect in this particular freezer since we purchased it a couple of years ago and I finally want to know the answer. In the picture below you can see that certain ice cubes will form an icicle even though this is just water poured into our ice cube trays.  There is nothing above the the ice cube tray (just the top of the freezer) and it is about 8 inches away.  These are not formed by water dripping, but seem to be formed by water being pulled up and freezing? Is this some form of static electricity at work? Here's another snapshot from the side.


How can we print line numbers to the log in java

How to print line numbers to the log. Say when outputting some information to the log, I also want to print the line number where that output is in the source code. As we can see in the stack trace, it displays the line number where the exception has occurred. Stack trace is available on the exception object.  Other alternative could be like manually including the line number when printing to the log. Is there any other way?


In the book calculus made easy, page 22 the case of the negative power for   $y=x^{-2}$    $$\begin{align}  y+dy & =(x+dx)^{-2}\tag{1}\\ \\ & = x^{-2}\left(1+\frac{dx}{x}\right)^{-2}\tag{2} \end{align}$$  How do they get from $(1)$ to $(2)$?  And why isn't the binomial function applied to the second line but applied on the third line (the line that comes after line $(2))$?


What does fulfilled next to Beta Site name in Area 51 mean?

What does it mean for a site to have fulfilled next to its name in the ?  The reason I ask is that I moderate Genealogy & Family History and noticed that it is the only site of about a hundred which is "tagged" in that way.


Here is my code snippet:  public void joinRoom(String room) throws MulticasterJoinException {   String statusCheck = this.transmit("room", "join", room + "," + this.groupMax + "," + this.uniqueID);    if (statusCheck != "success") {     throw new MulticasterJoinException(statusCheck, this.PAppletRef);   } }   However for some reason, if (statusCheck != "success") is returning false, and thereby throwing the MulticasterJoinException.


How do I suppress stderr warning messages from a command inside command substitution?

touch ~/deleted/$(echo "directory_"$(readlink -f foo)|tr '/' '\') 2> /dev/null   where foo is a directory  It's reading the full pathname of foo and creating it as a file replacing all '/' with '\' and putting a directory_ in front so the directory  /home/test/foo would create a file directory_\home\test\foo  It does exactly what I want except a warning keeps printing tr: warning: an unescaped backslash at end of string is not portable   a. I don't know what that means b. I would like it to not show  I tried to redirect stderr to /dev/null but it doesn't work. How do I suppress it?


Did Obi-Wan Kenobi ever become more powerful?

In Star wars: IV A New Hope, Obi-Wan says to Darth Vader:     You can't win, Darth. If you strike me down, I shall become more powerful than you could possibly imagine.    What did he mean by this? Was he bluffing? Was he alluding to him being able to help Luke as a Force Ghost? Or was he talking on behalf of The Force?


How to control the dimensions of \colorbox

I want a long narrow horizontal colored rectangle, something more like a thick line, but I cannot get the height below a certain amount. The best I can come up with is:  \documentclass[11pt]{book} \usepackage{color} \begin{document} xxxxx\colorbox{red}{% \phantom{------------------} }% xxxxx  \end{document}   where the number of - controls the length but I would like at most half the height of:    I have tried various solutions proposed for questions about height of boxes but was not able to find anything that did it. Did I miss anything?


public class StrEqual {     public static void main(String[] args) {         String s1 = "hi";         String s2 = new String("hi");          System.out.println(s1);         System.out.println(s2);          if(s1 == s2){             System.out.println("s1 and s2 are equal");         }         else{             System.out.println("s1 and s2 are not equal");         }     } }   In the above code s1 and s2 both referring to the string "hi". But why the output of the program is- 's1 and s2 are not equal' ? Thank you


How can photons have frequency without vibration?

If photons have frequency then they must vibrate. So i was wondering, what kind of vibration do photons have? But according to physicists, photons do not vibrate. Can someone explain me, how is that possible?


Can a possessive S be attached to nouns that are not human beings (or animals)?  For example, instead of saying "the back of the chair", can I say "the chair's back"?   I remember learning that not everything can get a possessive s, but this issue is not clear to me.


I am trying to talk to the PyQGIS API for use in a 3rd party application using the offical .dmg image provided on the QGIS homepage.  After setting PYTHONPATH to /Applications/QGIS3.4.app/Contents/Resources/python and initializing everything as stated in , I am facing the following error when running from PyQt5.QtGui import or from qgis import *:    ImportError: dlopen(/Applications/QGIS3.4.app/Contents/Resources/python/PyQt5/QtGui.so, 2): Library not loaded: @executable_path/../Frameworks/QtGui.framework/QtGui   Referenced from: /Applications/QGIS3.4.app/Contents/Resources/python/PyQt5/QtGui.so   Reason: image not found   Looks like I need to set some linkers or similar?   Side facts: - I have no problems when using the homebrew version of QGIS). - I am on macOS 10.14.6 (Mojave)


Let $a$ be a quadratic residue modulo $p$. Prove that the number $b\equiv a^\frac{p+1}{4} \mod p$ has the property that $b^2\equiv a \mod p$.

Let $p$ be a prime satisfying $p\equiv 3 \mod 4$. Let $a$ be a quadratic residue modulo $p$. Prove that the number $$b\equiv a^\frac{p+1}{4} \mod p$$ has the property that $b^2\equiv a \mod p$. (Hint: Write $\frac{p+1}{2}$ as $1+\frac{p-1}{2}$.) This gives an easy way to take square roots modulo $p$ for primes that are congruent to $3$ modulo $p$. \textit{Hint:} Write $\frac{p+1}{2}$ as $1+\frac{p-1}{2}$ and use Exercise $3.36$.) This gives an easy way to take square roots modulo $p$ for primes that are congruent to $3$ modulo $p$.  I assume that the proof comes directly from the proof of quadratic residues but I am not sure how.


I have a request like this.  "SELECT *  FROM st_items WHERE item_id < " . $_POST['id'] . " AND item_board=" . $_POST['board'] . " ORDER BY item_id DESC LIMIT {$itemLoad_limit}"   WHERE item_id < " . $_POST['id'] . " It works as it should.  But when I add AND item_board=" . $_POST['board'] . "  I have a Fatal error.     Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]:   Column not found: 1054 Unknown column '' in 'where clause''   Can you help me figure out what the problem might be?


I have just made up a adjustable regulator circuit using the LM 317T, the input is approx 33 V, and output 16 V, but the LM 317T when cold regulates at 16 V, but once the LM 317T gets very hot the voltage drops to around 13 V, and is not regulating, my load is drawing approx 150 mA, can anyone please advise.


Where to upload/publish gigabytes of experiment data

I have conducted experiment that had unexpected result which goes against  consensus in my community and I worry whether it will be accepted by other researchers. For that reason I would like to make all my work public - the resources, the programs, the results.. Is there online service where I can publish the data for free and obtain DOI number that I can reference in my paper?  It makes over 2GB when packed.  I have heard that such services exist for people in biology and medical research but I work on transportation systems which is rather different (we do not produce so much data usually). I plan to submit the paper to journal published by IEEE.


Why to add both HTTPS & HTTP versions to Google Webmasters?

What are reasons, that we have to add 2 versions of same domain to Google  Webmasters:  http and https ?    as they refer to same domain, we have extra headache to have 2 items instead of 1.   Why? Is there any workaround?


Is there an easy way to add a required symbol like '*' after the html <label> text content in the default user registration form?  I'd like the Username and E-mail labels to display: Username * and Email *  I've tried using CSS, as in:  #registerform p label::after {     content:" *";     color: red; }  But the asterisk appears under the text field, not beside the text.  I checked the Codex but couldn't find a WP filter, so does this mean I need to create an entirely custom registration form?


Game states & passing data between scenes

I'm not entirely sure if I'm doing this right, but I always considered the scene system in Unity as some sort of state management (rather than e.g. a level system) which allows to group the contents (entities, components) into the usual main states of the game (menu, ingame), which can then be invoked or replaced together.  Now I have a very specific concern and I have no clue how to deal with that in Unity, mostly because of it's abstractions from code and other restrictions:  My game features a procedurally generate terrain where as I'd like to tweak the generator before actually launching it. The tweaking is done in some sort of 'pre-game' state (as part of the main menu) where the values are stored in e.g. TerrainData model class. Usually in other engines, I'd to it like this:   Providing an UI within the menu state to tweak the parameters of the game Storing the parameters in a view model (and data model) Instantiate the ingame state (which requires said data model in the .ctor Pass the data model to a generator and start the generation   Now, here are the main problems:   Most types in unity (scenes, monobehaviors) do not allow constructors because they use it for themselves It doesn't seem possible to instantiate scenes manually (there's only e.g. Application.LoadLevel("") which only takes the name of the scene, not a instance reference etc. it doesn't seem possible to pass data between scenes, without reverting to awkward workarounds such as singletons, playerprefs, DontDestroy etc. which are all not really suitable for this case.   So, how can I properly solve this? Is there a better way to manage states rather than scenes? Prefabs maybe?  Backlink to UntityAnswers question:


I would like for equations to share the same counter as subsections. For example if my document is:  \documentclass{article} \begin{document} \section{A} \begin{equation} 1+1=2 \end{equation} \subsection{X} \begin{equation} 1+1=2 \end{equation} \begin{equation} 1+1=2 \end{equation} \subsection{Y} \begin{equation} 1+1=2 \end{equation} \end{document}   I would like this output (produced here through a sneaky use of \tag):   Something similar to how theorems of amsthm can be "siblings" with another counter. I am aware of the \numberwithin command of amsmath, but this is not what I want. I am also aware of the aliascnt package, but since "equation" is an existing counter, it doesn't work.


What is the correlation if the standard deviation of one variable is 0?

As I understand, we can get correlation by normalizing covariance using the equation  $$\rho_{i,j}=\frac{cov(X_i, X_j)}{\sigma_i \sigma_j}$$  where $\sigma_i=\sqrt{E[(X_i-\mu_i)^2]}$ is the standard deviation of $X_i$.  My concern is what if the standard deviation equals zero? Is there any condition that guarantees it cannot be zero?  Thanks.


Installing .tgz driver for Asus USB-N13 Wifi adapter

I've recently bought a USB wifi adapter, and wanted to install the driver, it's in the form of a .tgz so I'm unsure how to do this  Here is the driver:


How do I get a centered charge into the ring with chemfig?

I would like to draw a Sydnone with chemfig. How do I get the -+ into the ring?     \documentclass{article}   \usepackage{tikz} \usepackage{chemfig}  \begin{document}   \chemfig{N**5(-[,,1]\chembelow{N}{H}-[,,1]-[,3,1](=[,1,1]O)-[,3,]O-[,3])} \end{document}


Includegraphics detects wrong fileformat

I like to include an image with   \includegraphics[width=5cm]{./images/My_Image.svg.png}   where the image is an png file that had been converted with inkscape from an svg and therefor the filename-ending is .svg.png on linux.   Now pdflatex does not recognize it as an png  ! LaTeX Error: Unknown graphics extension: .svg.png.   What can I do, besides renameming the file?  Renaming does not work, because the files are needed in exacly that name from somewhere else, my last idea would be to use symlinks, but I would prefer a "latex-only" solution


I have a module and created twig templates there. I just followed the documentation here:   I want to include a JS file from the twig. And the JS file is located inside the module folder. I have this code in the twig:  <script src="/{{ directory }}/js/script.js"></script>   But the directory is returning the theme path NOT the module path. How can I get the module path inside the twig?


How to choose a proper contraction "it's not" versus "it isn't"?

I'm aware that both it's not and it isn't are contractions of the same phrase, it is not.  Till today, I was convinced that choosing them depends on desired emphasis. This way, choosing it's not allows one to make an emphatic stress on not:     It's NOT my fault!   ...and other than that it's just a matter of style, not grammar.  Recently, I was watching :     M: An argument isn't just contradiction.   A: It can be.   M: No it can't. An argument is a connected series of statements intended to establish a proposition.   A: No it isn't.   M: Yes it is! It's not just contradiction.   A: Look, if I argue with you, I must take up a contrary position.   M: Yes, but that's not just saying 'No it isn't.'   A: Yes it is!   M: No it isn't!     I was surprised they have never used it's not during the whole sketch. This confused me a lot as it opposed my prior understanding: two people contradicting each other would rather use it's not. More than that, at 01:42 they have used you did NOT and then you DIDN'T, which must indicate that the latter is more pathetic than the former.  So, how to choose a proper contraction between "it's not" versus "it isn't"? Which one is more emphatic, and how come a contracted variant looks more pathetic than the expanded one?


Having a hard time understanding "Rotate & Scale" "Apply an objects transformation to it's data"

I'm new to Blender and purchased a course on Udemy--"Complete Blender Creator: Learn 3D modelling for Beginners". I'm having a hard time wrapping my head around "Rotate & Scale" "Apply an objects transformation to it's data". I know how to do it, but the instructor doesn't go into much detail. What is it's purpose? Would someone mind explaining it to me like I'm five? Thanks


Insert small line above an item in a list without adding extra space (Continued)

This is a follow up to . I would like to control the length of the horizontal line to be the same widths as the widest \item in the list. Below, I am manually passing in the text on which to base the length. While that is an acceptable workaround, I thought I'd see if there was some easy way to eliminate the parameter to \sepitem.  Code: \documentclass{article}  \usepackage{enumitem} \usepackage{xcolor} \usepackage{calc}  %% Adapted from  %%    https://tex.stackexchange.com/questions/341614/ %%            insert-small-line-above-an-item-in-a-list-without-adding-extra-space \newcommand\sepitem[1]{\item\raisebox{1.90ex}[0pt]{\rlap{\color{orange}\rule{\widthof{#1}}{0.8pt}}}}  \newcommand{\ShortText}{Short text.} \newcommand{\LongText}{Somewhat wider text.}  \begin{document} \begin{enumerate}[noitemsep] \item \ShortText \item \ShortText \sepitem{\ShortText}A \end{enumerate} %% ------------------- \begin{enumerate}[noitemsep] \item \LongText \item \ShortText \sepitem{\LongText}A \end{enumerate}  \end{document}


How to achieve this kind of axis with pgfplot ? Image taken from Szymon Beczkowski's awesome PhD thesis design ()    I may provide you with some data to play with.  \documentclass{standalone} \usepackage{pgfplots}  \begin{document} \begin{tikzpicture} \begin{axis}[xlabel={$L$ [H]},ylabel={$\hat{I}_{DM}$ [A]},axis lines*=left,grid,xtick=data]   \addplot coordinates {(948e-6,1.61981) (1.5e-3,1.02377) (2e-3,0.769047) (2.5e-3,0.614994) (3e-3,0.503511)}; \end{axis} \end{tikzpicture} \end{document}


How to remove old kernel versions automatically?

I know number of ways to remove old kernel versions manually. Is there any way to remove old kernel versions automatically? Automatically, in the sense i don't have to do the same thing each time the kernel gets updated.


Is there a way to not cut off large tables with page breaks?

Say I have a large table larger than the page, how can I make it so that the second page displays the headers from the previous page and also doesn't split a row in half. Something similar to CSS like:  thead { display: table-header-group } tfoot { display: table-row-group } tr { page-break-inside: avoid }


I want to return the exact sum of given number

my method sum(String .. numbers) return the sum of the number in array  my array always contains contains valid floating numbers in the form of string sometimes the provided implementation return a wrong sum example  sum ("99.35","1.10) return 100.4499999999999 when I try the round method, it generates exception  How can I do to return the exactly sum  class calculator{ static String sum(String ...numbers) { double total=0; for (String number:numbers) {`total+=Double.parseDouble(number);} return  String.copyValueOf(total);}   the solution is here  static String sum(String ...numbers) { double total=0; String S = null; for (String number:numbers) { total+=Double.parseDouble(number);        String x = String.valueOf(total);     NumberFormat nf = new DecimalFormat("#.###");      S = nf.format(total);}     return String.valueOf(S);}


Why does defining main() with no return type compile with no error?

I was just testing this code by compiling it with GCC (g++);  #include <stdio.h>  main(int argc, char **argv){      printf("something");  }   It seems to build and run fine with just a warning saying;  ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]   Though I defined main() with no return type and not returning any value to it. I then decided to test the same code by compiling it with Visual C++ compiler but it efficiently threw the error:  missing type specifier - int assumed. Note: C++ does not support default-int   and the build was not successful.   I was expecting GCC to throw an error and stop compiling instead of a warning and letting it build successfully.   Why does GCC give main() such privilege of not letting it know its return type?


Sudden gvfs error when issuing la command

I have started  la ~   with the output  ls: cannot access .gvfs: Permission denied   I've done quite a bit of googling but haven't found a solution. Any ideas what is wrong?


What is the difference between a measurement and any other interaction in quantum mechanics?

We've learned that the wave function of a particle collapses when we measure a particle's location. If it is found, it becomes more probable to find it a again in the same area, and if not the probability to finding it in the place that was checked decreases dramatically.  My question is about the definition of measurement. What makes a measurement different from any other interaction between two particles (gravity and EM fields for example)?  In reality, almost every particle interacts with any other particle, so shouldn't there be constant collapse of the wave function all the time? If this happens we're right back in classical mechanics, aren't we?


$\sum_{n=1}^\infty (\sqrt{n+1}-\sqrt{n})/n$ convergent or not with the limit comparison criterion

I have to chech if the $\sum_{n=1}^\infty (\sqrt{n+1}-\sqrt{n})/n$ converges or not with the limit comparison criterion. Could someone help me with this one?


When people talk about Galois theory they often say that the basic idea behind it is that certain numbers are "algebraicaly indistinguishable".  I never really understood what this means in a way that doesn't make any reference to the concept of field automorphism.   So is there some intuitive way of looking at this?


700 instead of 755 permissions on auto-mounted USB HDD?

I'm running Ubuntu 12.10 (kernel 3.5.0-21-generic) on a laptop, and seem to have run into a strange problem with an auto-mounted external FAT32 USB HDD: The permissions of the drive's mount-directory, and everything in it, is mapped to "drwx------" (700) after the auto-mount. The USB-mounted HDD is a Western Digital WDC WD5000BPVT-22HXZT3 (SATA-2); I have another one of these built into the laptop, and that one runs like a charm.  From my understanding the permissions should be 755 instead, and the 700 setting causes serious problems with my backup program (lucky backup); the software simply cannot backup anything anymore because it cannot access the directories on the USB drive. However, manually copying the data to the USB HDD (using nautilus or the terminal) doesn't cause access problems. This might be connected, as these programs access the files directly, not indirectly using a cron-job like the backup tool.  I did a lot of googling today to try and find similar cases with sollutions, but none worked so far; the best hint I found was that the permissions may get reset to 700 whenever the mouning procedure finds a problem with the USB HDD, for whatever reason. If checked the logs, and found that the device was indeed causing "HDIO_GET_IDENTITY failed for '/dev/sdc': Invalid argument" warnings because of hdparm, so I set the "nohdparm" option in the GRUB_CMDLINE_LINUX_DEFAULT setting in /etc/default/grub. Checking the logs indicates this took care of the warnings, but sadly didn't change the USB HDD permissions back to normal.  Then I tried another idea that suggested defining a USB mount policy, but no luck there either, it didn't change anything. Therefore my questions remain: what are the reasons for FAT32 USB HDDs being auto-mounted with permission 700? And if this is intended, are the powers that be aware how much software is NOT using the current user to access files? is this in any way connected with this 3-Year-Old Bug?  is there a workaround that doesn't involve avoiding FAT32 on the USB HDDs? After all I like being able to directly access data backups from multiple OS's ...  Thanks in advance ...


Better ways to parse text adventure commands?

Currently I have got a system set up where I split each sentence handed to me into it's baser parts and then compare each word against a list of known words. Once I have the verbs, adjectives and nouns contained in each sentence (ignoring all other words in the sentence) I go left to right in the list and try and create a recognisable command from it. However this doesn't allow for multiple commands in one line.  e.g. get the shiny sword and hit troll.   This would read get, shiny, sword, troll. It would ignore the hit part because currently I've only written the parser to handle one verb per line, but this would not be a recognisable command and would tell the player that it doesn't know what they're asking them.  I think my current system of tokenising the words and parsing them as arguments to an arbitrary action function is simple enough but not very elegant.   So I was just wondering what are some good ways to implement text adventure parsers? Are there any tried and true algorithms or ways to approach it?


I am not sure how to fight The Wall of Flesh. I have Meteor Armour, a Minishark, Star-cannon and Space Gun. I've tried once and wasn't able to kill it. What is the best strategy to defeat the Wall of Flesh?


I am having trouble in understanding the difference between a contrapositive and a contradiction. For example, on one of my practice exam, there was a question that asked to prove that $n$ is even if $n$ is an integer and $n^2 + 5$ is odd using both a contrapositive and a contradiction. When I proved it, I assumed $n$ is odd and assigned it to $2k + 1$. What method am I using right now? How would the other method look like.


c# overriding operator in MyString class returns the same object

I want to override -- operator for MyString class. It should find the shortest word in string. Here is code:  class MyString {     private string data;     public string Data     {         get { return data; }         set { data = value; }     }      public MyString(string s)     {         Data = s;     }      public MyString(MyString s)     {         Data = s.Data;     }      public static MyString operator --(MyString s)     {         var words = s.Data.Split();         int l = 99999, ind = 0;         for (int i = 0; i < words.Length; i++)         {             if (words[i].Length < l)             {                 ind = i;                 l = words[i].Length;             }         }         MyString result = new MyString(words[ind]);         return result;     } }   When I try to use it like this:      MyString s1, shortest;     s1 = new MyString("one two three");     shortest = s1--;     Console.WriteLine(shortest.Data);   it returns "one two three" instead of "one". How can I fix it?


How do I edit HTML styles with CSS? Unknown property name

Example:  <table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">   How would I edit the "cellspacing" value using only CSS?


Whenever I asked my grade school and college teachers why $\frac00$ is undefined, they would show me a graph of $\frac1x$ and point out the vertical asymptote at $0$, noting that "Since it approaches $-\infty$ from the left and $\infty$ on the right, it could be $-\infty$, $\infty$, or anything in between. So, we say it's undefined."  My question is, then, why isn't it $\Bbb R$, or even $\{\Bbb{R,C}\}$?


Suppose I have a line like this:  abc + def - vfg *   I want my output to be like this:  abc  def  vfg   If only a single operator is there, I can replace: \r\n+ with + but how to do it irrespective of all operators?  Is this possible using regex in Notepad++?


Number of solutions in a field of order $32$

Let $F$ be a field of order $32$. Then find the number of non-zero solutions $(a,b)\in F\times F$ of the equation $x^2+xy+y^2=0$.  As , $|F|=32$ , so $(F\setminus\{0\},.)$ forms a group of order $31$, which is prime. So , $F\setminus \{0\}\simeq\mathbb Z_{31}$.  Then how I proceed ?


First line of tag excerpts not always shown on Tags page

While browsing through the tags on Chess Stack Exchange, I found something remarkable on :    That's not the complete excerpt for that , which reads     An opening variation where the opponent is tempted to make a bad move.   The first line is simply not shown. This is not a CSS/design issue, the first line simply isn't included in the HTML.  The same thing happens a few pages later:


I was wondering how I can compare multiple strings in one line. I tried using the || but it doesn't work for booleans or strings. this is what my code is like:  }else if(question != "a" || "b") {     System.out.println("Sorry that isn't an A or a B");   For those who marked it duplicate, I checked over 200 questions here on stack overflow, and none worked. The one @Chrylis posted actually didn't help. they were just asking about the difference in == and .equals()


Python assign a variable use if condition

I want to assign a variable when if statement is true. What's wrong with this assignment?     b = 1 if  3 > 2   File "<stdin>", line 1     b = 1 if 3 > 2                  ^ SyntaxError: invalid syntax


I am a final year PhD in UK in a scientific discipline and I am writing my thesis. I have already published 2 journal papers and I have submitted 2 more papers for publications. My department does not allow a "publications-based" thesis so I need to write a thesis in the context of a book etc.   As I write my thesis in a couple of places, especially in the literature review, I tend to reuse sentences from my publications. I try to restate them a bit, maybe change some words for their synonyms etc. but it is practically me writing about what I wrote before. It goes without saying that I cite/quote me at the end of a passage if I say something non-obvious (I found that slightly funny. :) ). The problem is that occasionally I am just explaining for instance how a certain estimation technique works; in that case I cite the original authors and not myself. The syntax in those occasions though is practically the same as the original passage I used in my publication; as I have explained it once and was consider good, I find no reason to reinvent myself (I do a mild rewording as I mentioned but that is quite insignificant). Same things goes for listings. I do cite my paper in the beginning of a big list as the list's source but the list itself is almost identical as the one in "my" paper; in those cases I don't use quotations, just attribution "[]".  Is there an obvious guideline? The basic definition of plagiarism "reproducing the work of another person's as your own" is not (directly) applicable to me because I am the other person (almost *); if I am using other people's work I do cite them but I don't cite myself, citing them, in quotation marks!  I am a bit "fuzzy" about how not to plagiarize myself in my thesis (I have had no problem regarding my journal publications).  (* In all publications mentioned I am the first -but not sole- author.)


What to return from function that returns a struct type in case of error?

I'm implementing a queue in C and, following general advice of using as little dynamic memory as possible, have the following for my nodes:  struct qnode {     struct message_t message;     struct qnode* next; };  struct message_t {     char prefix[BUF_SIZE];     char command[CMD_MAXLEN];     char params[MAX_PARAMS][BUF_SIZE]; };     Since I'm only dealing with message_ts and not pointers to them, my dequeue function has the following signature:  struct message_t dequeue(struct message_q* q);   Is there a convention on what to return from this type of function if there is an error (in my case, what if the queue is empty)? For now, I'm returning a struct message_t with all fields set to "0".  My other alternative would be to use pointers to message_t everywhere, and then return NULL in case of error. I'd like to know the pros and cons of each approach, as well as some of the best practices in my specific case.


Why does a user session have to be completely closed when groups change?

Adding a user to new groups in linux is easy -- you just need the following command: # adduser user group  But this doesn't really do anything till you log off and then log in anew. When you have a GUI session, for instance Xserver, you have to completely shut it down. I know that there's the newgrp command to "log in to a new group", but the question is why does the user session have to be restarted so the new group settings could be applied?


Least squares - why multiply both sides by the transpose?

The formula:  $A^T(b - Ax) = 0\\ A^Tb = A^TAx\\ x = (A^TA)^{-1}A^Tb$  What is the reason for multiplying both sides by the transpose of A?


I've seen a couple of good examples of creating modifiers and applying them to objects, but they don't seem to be working for me. Or at least are only working part way.  My function takes a modifier type (in my test case, 'UNION') and a list of objects. The first object is the target and the rest are going to be the modifications.  When this executes, my target still has the stack of modifiers attached to it. I have to manually push the Apply button in the UI for each one. How can I make that happen in my script?  def applyModifier (self, mod, items):     target = items[0]     for i in range(1, len(items)):         objB = items[i]         boo = target.modifiers.new('Booh', 'BOOLEAN')         boo.object = objB         boo.operation = mod         bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Booh")         bpy.context.scene.objects.unlink(objB)     return target   The subordinate objects do unlink from the scene, so I know that bit of code is executing properly.


I have the function  $$f(x,y)=(1+x^2+y^2)^{\frac{1}{x^2+y^2+xy^2}}$$ and I want to evaluate the limit as $(x,y)$ approaches zero.  I have started thinking of a solution but get stuck. Taking the direct limit is not possible since that would make an undefined function. Approaching $(0,0)$ from different lines e.g $y=x$ and $y=0$ both gives hints that the limit could be $e$ but that does not really show anything.  I tried switching to polar coordinates which gives me $$(1+r^2)^{\frac{1}{r^2+r^3\cos(t)\sin^2(t)}}$$  Was it a good idea to switch to polar coordinates, can it be solved continuing with this approach, or could the function $f$ maybe be simplified and solved in a different way?


Locating the coordinates of a element in a 2D Array

I am currently working on this application where I want to find the coordinates of a particular element in a 2D array. I've initiated the 2D array as: String[][] initGrid = new String[height][width]  the contents of this grid were read in from a .in file: 0 0 A 0  with the code: for(int i = 0; i < height; i++) {     for(int j = 0; j < width; j++) {         initGrid[i][j] = in.next();     } }    But when I tried to find the co-ordinates of "A" in the grid with this following code: for(int i = 0; i < initGrid.length; i++) {     for(int j = 0; j < initGrid[0].length; j++) {         if(initGrid[i][j] == "A")             System.out.print(i);             System.out.print(j);             }     } }  It won't print for some reason. Some guidance would be greatly appreciated!


R linear regression - how to handle when some factors significant while others aren't

I'm playing with the Titanic data set, and trying to figure out what to do about the results I got from a lm that predict the age of the passenger.    How should I handle the Cabin values? Some Cabin levels are significant, while others aren't -- but they're all under the same 'Cabin' column.  So if I want to predict the age of a passenger, should I omit the cabin levels that aren't significant? What's best practice here?  Thanks!


In a Poisson model, what is the difference between using time as a covariate or an offset?

I recently discovered how to model exposures over time using the log of (e.g.) time as an offset in a Poisson regression.  I understood that the offset corresponds to having time as covariate with coefficient 1.  I'd like to better understand the difference between using time as an offset or as a normal covariate (therefore estimating the coefficient). In which situation should I want to use one method or the other?  UPGRADE: I don't know if it is interesting, but I ran a validation of the two methods using randomly split data repeated 500 times and I noticed that using the offset method leads to a larger test error.


I just want to know how to solve:  $$\ 5x=0.01^x$$   I have tried to use logarithms. It would be a huge help if someone could help because no matter what I do $\ x$ always gets stuck in a logarithm.  Edit: Sorry, I changed the questions to match.


prove the function f(x)= Seq(Abs(x)) is uniformly continuous on its domain  would someone please check my work. Thank you in advance .


It has been claimed that at U.C.L.A. at least 40% of the students live on campus. From a  sample of 250 students, 90 live on campus. Does the evidence support this claim at a  = 0.01 .  What i did is   Ho: P is greater or equal to 0.4  Ha: P is less than 0.4  The critical value comes out to be -2.33 from the table  Now how to calculate the test statistics?


If $p^3+p=q^2+q$ where $p$ and $q$ are prime numbers,    Find all the solutions (p, q)    I tried to solve this exercise using that:  $p^2 = -1(\text{mod} \, q)$ and $q = -1(\text{mod} \, p)$;     So: $q+1=ap$ and $p^2+1=bq$, where $b$ and $q$ integers.   Then I tried to solve a quadratic equation, but I could not finish the problem


tiggers orders without explicitly settings?

I have a table which has 3 triggers of update (just for the scenario)...  I didnt explicitly used the sp_settriggerorder command to set the order.  What is the order of the Triggers ?  How can I find the Order ,by query ?   p.s.  the ExecIsFirstUpdateTrigger doesn't help me here since its working only if I use sp_settriggerorder to set the order. ( but in my case ive just created 3 update triggers - so how can i get the order ?)


I have an older hp pavilion all in one pc and after upgrading to 15.04 whenever I tell the computer to shutdown while in unity (haven't tried other DEs) it goes to the login screen as if I'd only pressed logout. It will then shutdown if I select shutdown from the menu in lightdm. But why is it doing this?


There is any good program to download YouTube videos? I am using Ubuntu 14.04 32-bit.


I am stupid.  I installed Xubuntu on my PC and used it's dual boot.  Then, I changed my mind and decided I didn't want it.  So, being stupid, I deleted the linux partitions using windows, figuring that if I deleted them and merged them with the windows partition, it's bootloader would go away and Windows would boot.  Obviously I don't know much about this kind of stuff, and when I restarted my computer to test what I did, the linux bootloader tried to boot, and couldn't find the partition.  So, now it goes straight to grub rescue:  error: no such partition. Entering rescue mode... grub rescue >    I have tried youtube solutions, but please note I do not have a recovery disk for windows and I cannot make an xubuntu usb, but I do have access to my BIOS.  I am considering just getting a new hard drive and installing windows on it, but I don't want to.  I would also appreciate it if anyone has a way I can access the hard drive, though my happy ending would be a way to just get it to boot windows again.  If you have any strategy at all to do this, no matter how complex it is, I would like to at least hear it.  Thanks!  Here's where I'm at from youtube:  error: no such partition. Entering rescue mode... grub rescue> set cmdpath=(hd0) prefix=(hd0,msdos5)/boot/grub root=hd0,msdos5 grub rescue> set boot=(hd0,msdos5) grub rescue> set prefix=(hd0,msdos5)/boot/grub grub rescue> insmod normal error: no such partition. grub rescue> normal unknown command: 'normal'. grub rescue>


My old passport in which an ECR was stamped,with passport expiry date in 2017.I got a Dubai visit visa on its passport number but later on as I was told that it'l be a problem for me to travel to Dubai so I got a new passport re-issued with ECNR with a new passport number.  So will it be a problem for me to travel or do I have to get my UAE visit visa details of my old passport number change to my new passport number?


What is the difference between a port and a socket?

This was a question raised by one of the software engineers in my organisation.  I'm interested in the broadest definition.


How to create a page category of products in Commerce 2?

Usually in commerce 1 did: Display-products (node), in which field "Catalog" of taxonomy-term. Create a displays. Go to the term page and see all products! Great!  In commerce 2 tried to do but failed, probably because product is not a node, and the view for taxonomy, only works on him and no teaser.  Tell me, how do organized easy catalog on commerce2?  Preferably without the panels and search_api. Thank you.


Let $\Omega \subset \mathbb R^n$ be a smooth, bounded and open. Assume that $u=0$ if $u\in H^1(\Omega )$ and satisfies $$-\Delta u-u=0\quad \text{on }\Omega \quad \text{and}\quad \partial _\nu u=u=0\quad \text{on }\partial \Omega .$$ This property is know as unique continuation principle. Let $f\in L^2(\Omega )$ and assume that $v$ is a solution to $-\Delta v-v=f$ in $\Omega $. Prove $$\|v\|_{H^1(\Omega )}\leq C(\|f\|_{L^2(\Omega )}+\|v\|_{H^{1/2}(\partial \Omega )}+\|\partial _\nu v\|_{H^{-1/2}(\partial \Omega )}).$$  There is just things that I don't understand in the proof.    Proof : Assume by contradiction there exist sequences  $v_n\in H^1(\Omega)$ and $f_n\in L^2(\Omega)$ such that  $$\|v_n\|_{H^1(\Omega)}=1\quad\text{ and}\quad \|f_n\| _ {L^2(\Omega )}+\|v_n\| _ {H^{1/2}(\Omega )}+\|\partial _\nu v_n\| _ {H^{-1/2}(\partial \Omega )}\to 0.$$ By the Reileigh-Kondrashov compactness theorem there exists a weakly convergent subsequence of $\{v_n\}$ in $H^1(\Omega)$ such that $\{v_n\}$ converges strongly in $L^2(\Omega),$ i.e.,  $\nabla v_n\rightharpoonup \nabla v$ in $L^2(\Omega)$ and $v_n\to v$ in $L^2(\Omega)$ (after relabeling the subsequence). Multiplying the equality $-\Delta v_n-v_n=f_n $ by any function $\varphi\in H^1(\Omega)$ and integrating by parts we get   $$\int_\Omega \nabla\varphi\nabla v_ndx=\int_\Omega \varphi v_n+ \int_\Omega \varphi f_n+\int_{\partial\Omega}\partial_\nu v_n\varphi \ \ \ (1).$$  Sending now $n$ to infinity, the second and the third summand will go to zero by our contradiction assumption, thus we get by the weak convergence $v_n\rightharpoonup v,$  $$\int_\Omega\nabla\varphi\nabla v=\int_\Omega\varphi v \ \ \ \  (2).$$  On the on the other hand if we take $\varphi=v_n$ in (1) and let $n$ go to infinity we get $\|\nabla v_n\|^2\leq 2\|v_n\|^2$  for $n$ big enough. Now, (2) implies that  $$-\Delta v-v=0$$ in the weak sense. Also, by the definition of $H^{1/2}$ and $H^{-1/2}$ norms and the strong convergence $v_n\to v$ we get  $$\|v\| _ {H^{1/2}(\partial \Omega)}=\|\partial_\nu v \| _ {H^{-1/2}(\partial\Omega)}=0,$$  Question 1 : I don't understand how we get $\|v\| _ {H^{1/2}(\partial \Omega)}=\|\partial_\nu v \| _ {H^{-1/2}(\partial\Omega)}=0.$ The thing I know is that $\|v\|_{H^{1/2}(\partial \Omega) }=\int_{\partial \Omega } \hat u(x)(1+|x|)^2dx$ and $\|\partial_\nu v\|_{H^{-1/2}(\partial \Omega )}=\sup_{\|\varphi \|=1}|\left<\partial _\nu v,\varphi\right>|$. So how do I get that those norms are $0$ ?  thus from the given unique continuation principle we get $v=0$ in $\Omega.$ From the strong convergence $v_n\to v$ we get $\|v_n\| _ {L^2(\Omega)}\to 0$, thus the inequality $\|\nabla v_n\|^2\leq 2\|v_n\|^2$ implies $\|v_n\| _ {H^1(\Omega)}\to 0$ which is a contradiction.   Question 2 : Why the inequality $\|\nabla v_n\|^2\leq 2\|v_n\|^2$ implies $\|v_n\| _ {H^1(\Omega)}\to 0$ ?


Registry key / GPO to disable and block Windows 10 upgrade?

One of our remote Windows 7 Professional users just reported that he received an Upgrade Reservation Offer for Windows 10. It appears the  running in his system tray is legit. So far, this is only seems to be hitting  devices that are not domain-joined.  Short of uninstalling/hiding the Windows Update that enabled the upgrade, is there any way to disable the Upgrade App (and of course the upgrade itself)?


Why is a proton assumed to be always at the center while applying the Schrödinger equation?

Why is a proton assumed to be always at the center while applying the ? Isn't it a quantum particle?


The question I have is:   Prove that the minimum number of cycles is $m-n+1$ in a connected graph. Where one cycle is a path that starts that begins and ends at the same vertex. Where $m$ is edges and $n$ is the vertices.   I have no idea where to start. A few hints would be appreciated. Please do not provide me with the answer.


Prove that there is a natural bijection between the set of $R[x]$-module structures on $M$ and $\mathrm{End}_{R-\mathsf{Mod}}(M)$.

From Algebra Chapter $0$ by Aluffi:        Suppose $\alpha: R \to \mathrm{End}_{\mathsf{Ab}}(M)$ is an $R$-module structure on $M$. I would like to extend this to $R[x] \to \mathrm{End}_{\mathsf{Ab}}(M)$ which would be an $R[x]$-module structure on $M$.  This really amounts to defining how the polynomial $x$ should act on an element $m \in M$, which I am not sure how to define.  How can this be done?


What does the Additional Magical Secrets feature's "of a level you can cast, as shown on the Bard table" mean for multiclassed bards?

For instance, if you're a sorc 12 / bard 6, and you get the 's Additional Magical Secrets feature:     At 6th level, you learn two spells of your choice from any class. A spell you choose must be of a level you can cast, as shown on the Bard table, or a cantrip. The chosen spells count as bard spells for you but don’t count against the number of bard spells you know.   Is the level of spell you can select based on your spell slots (which at 18th level are high), or solely on the bard table of known spells (which would mean 3rd level)?


How to add the total marks using probsoln

I am trying to add the total marks at the end of an exam paper using probsoln. All the questions are in a seperate file and I just use \loadallproblems to add them to the exam paper. I add the number of marks for each question in the "Question File" with \marginpar{[\marklabel{2}]}. Is there any way (other than adding it manually!) to add all the marks together and add this number at the bottom of the exam paper? Here is the code I am using, I can't find any way to add this total:  \documentclass[a4paper]{report} \usepackage{probsoln} \newcounter{myprob} \newenvironment{myproblems}   {\par\setcounter{myprob}{0}}   {\par} \newcommand\MyProb{%   {\par\medskip\centering\refstepcounter{myprob}{\LARGE \bfseries Question : Vraag \arabic{myprob}}\par\bigskip}%   }  \renewcommand{\solutionname}{\bfseries MEMORANDUM}  \loadallproblems{Questions}   \showanswers  \begin{document}  \begin{myproblems} \foreachproblem{\MyProb\thisproblem} \end{myproblems}  \end{document} \endinput   Would appreciate any help!!


How long can I visit the UK within one year's time?

I am a Canadian citizen w/ a Canadian passport.  I went on a student visitor visa from September 11 2014 to December 17 2014. I'm returning on May 2 and leaving July 30 of this year as a tourist. How long am I able to visit the UK within a 365 day period? Does the fact that there is a period of time between my visits change anything?  I know I'm only allowed to stay as a general visitor/tourist for 6 months at a time. But as these two separate trips total just over 6 months, I am concerned that I will not be allowed to stay this long.


Are the various "Zelda" games supposed to take place in a common universe?

In the various Zelda video games, there seems to be a common mythology, and at least some potential to be in the same place. Do the various Zelda games take place in the same world, or is there no intent to do so?


Different sorting schemes in text and bibliography

Using biblatex with bibtex, I would like to order my references in the bibliography by author name.  This works fine:  \usepackage[backend=bibtex, sorting = nyt, %name, year, title]{biblatex}   However this behaviour also applies to citations in the text, when quoting several authors. for instance:  \parencite{Wang_1976, Albert_2011}   gives      (Albert et al. 2011, Wang et al. 1976)   Where I would like the citation to appear in chronological order. Changing sorting to ynt, solves this issue, but disrupts the ordering in the bibliography instead. I can't get my head around it...  Obs: I use sharelatex.


I found this in my math book. I have solved a). Exercise b) is to prove the derangement sum by induction.  A derangement of $n$ elements is a permutation where none of the elements keep its original placement. Let $a_n$ be the number of possible derangements of n elements. a) Show that $a_1=0$, $a_2=1$. Write all the derangements of the elements in $(A,B,C)$ and the elements in $(A,B,C,D)$. Show that the recursion formula is: $a_n = (n-1)(a_{n-1} + a_{n-2})$  My answer: For placing element $1$ there are $(n-1)$ possibilities. If field $i$ does not take element 1, there is one forbidden element for each field, and there are $a_{n-1}$ possibilities left. If field $i$ does take element $1$, the problem is reduced to $a_{n-2}$. Because of that the formula is $a_n = (n-1)\left(a_{n-1} + a_{n-2}\right)$.  b) Show by induction that: $a_n=n!\left[1 - \frac{1}{1!} + \frac{1}{2!} -... + (-1)^n\frac{1}{n!}\right]$.  My thoughts: I know how to prove it by the principle of inclusion and exclusion, but not induction. I guess the recursion formula from a) can be used.


How do developers organize large Apex/Visualforce projects?

A month ago my company asked me to build a small demo of Apex/Visualforce, to proof-of-concept the idea that we could have an interface inside of Salesforce, for the data we make available to 3rd parties as an API. We assumed we would eventually release this as a managed package, via the Salesforce App Exchange.   I started out writing Apex and Visualforce code in my text editor. With my web browser, I would login to my developer account on Salesforce, then open the Developer Console. To move my text to Salesforce, I would copy-and-paste it from the text editor to the forms provided in the Developer Console.   That worked okay when I only had 6 or 7 or 8 files. But now I have 30 files and the number will continue to grow. My project is getting unwieldy.   To keep the files organized, on my own local machine I adopted a directory hierarchy that's been common for years in MVC frameworks such as Ruby On Rails:   app:      controllers      models      views  tests:   This works locally, but I'm still transferring the text in these files to Salesforce via copy-and-paste.  I know some companies spend millions of dollars to customize Salesforce. I know there are some very large Apex/Visualforce projects out there. How are these typically organized? What tools do developers commonly use to interact with Salesforce.


How to read simultaneously from two files and print them line by line, bash?

I want to write an script which has as arguments two files F1 and F2 and prints them alternatively; first will be written F1's first line, then F2'2 second line and so on. If one of them has less lines than the other, when we finish to print the shorter one, the script should write the longest until the end.  My idea was:  1) Check if there are not 2 arguments -> echo and exit 2) Check if F1 or F2 aren't files -> echo and exit 3) Body:  exec 3 < $1 exec 4 < $2 i=0 j=1 while read -u 3 line && ((i==0)) do echo line; echo  ((i++)) ((j--))     while read -u 4 line && ((j==0))     do         echo line; echo  ((j++)) ((i--))    done  done  exit $?   Doubt: This would only work if both files have the same number of lines. How can I improve this to extend this solution to files with different size?


I am trying to get the answer $\int \sqrt{2+\tan x} dx$  What I did was to write $2+\tan x$ as $\frac{2\cos x+\sin x}{\cos x}$ but then find no way. Is there any simple form or should I proceed some other way ?


Why on printenv I cannot see the HOSTNAME enviromental variable?

On my ubuntu machine where I rin the following command:  printenv | grep HOSTNAME   Shows no output whilst when I do the following on terminal:  echo ${HOSTNAME}   Output is shown. SO I wanted to know why in printenv does not shows the HOSTNAME environmental variable?


I just found a couple of salmon fillets in my freezer that seem to have been there for about two years. Are they still edible, or should I bin them?


How to vertically center align text in table?

As you can see in the picture below, I have a table that doesn't look so great and that's because am unable to figure out how to change the veritical alignment on the text in the table. For example, I want the start and the caret symbols to be vertically center aligned in the table so it looks more polished and clean.  Am using   \begin{table}[H] \begin{tabular}{|l|l|} \end{tabular} \end{table}


Question Regarding Portable Ubuntu on Flash Disk

I'm currently trying to install Ubuntu on my Flash Disk. I have been successful in installing and using rufus to put the OS on the Flash Disk. What I'm worried about is when installing Ubuntu, it asks me the installation type (erase disk and install ubuntu or something else). It says that it doesn't detect any other operating systems. Does that mean I can erase disk and install ubuntu without deleting everything on my PC (Windows 10)? I'm sorry if this question is bad, has been answered already, or doesn't have much details. Sorry and thanks in advanced! Edit 1: I'm installing Ubuntu 20.04.1 LTS Edit 2: Sorry for not mentioning this. I'm using a pc that has Windows 10 on it's hard disk. I'm currently trying to install ubuntu on a usb that's connected to said pc.


What is analogous of "chivalrous" for opposite gender?

chivalrous  Chivalrous is an adjective that is generally used for men. Is there an adjective that can be used to describe women in a similar fashion?


I understand that energy is conserved when a force is applied to the end of a lever and magnified closer to the pivot point. However, I would like to know how it is the force is transferred and magnified between the atoms of the lever.