How to effectively apply combination of Block and Stream Cipher?

I have used TrueCrypt but it uses a cascaded encryption. I want to know about encrypting a file using two ciphers with each cipher having different key.  Cipher A (Block Cipher) - with Key KA  Cipher B (Stream Cipher) - with Key KB  First I am encrypting a file with Cipher A (KA). Again I am encrypting a file using Cipher B (KB).  Does this, in any way, make the final encrypted file vulnerable? Or, rather, leave some loopholes.  One other approach I thought is to compress a file before applying second cipher so as to make it more random.  Cipher A -> ZIP -> Cipher B  How secure is this and in which mode the two ciphers be operated to achieve high security?  ** Edited **  Both the keys are different. Encrypted file also does not contain any key.


How to prove $(-1)\cdot x = -x$ in a field?

I am having some hard time understanding the concept of field.   I understand the 6 axioms:   Associativity Distributivity Computability Closure Inverses Identities   The exercise I am trying to solve is the following:  Given F is a field, prove for any x belongs to F, x multiply -1 = -x.  P.S. Can anyone give me some tips regarding how to prove this type of questions that involves proofs in a field?


TurboC - malloc() in "compact" memory model

I am using good old Borland's TurboC compiler for DOS. When I use malloc() on compact memory model and write anything to the allocated memory, program freezes at some point (I suspect malloc() returns pointer to somewhere I shouldn't write). When I do the same on small memory model, it works fine.  I took a look on the allocated memory and the pointer the malloc() returns, using this small piece of code:  #include <stdio.h>  unsigned char *x; unsigned int i; unsigned int mds, mss;  #define X(a) x[i+(a)]  int main(void) {      // show current SS and DS     asm {         mov AX, DS         mov mds, AX         mov AX, SS         mov mss, AX     }     printf("ds=%04x, ss=%04x\n", mds, mss);      // allocate memory and show the pointer     x = (unsigned char*)malloc(128);     printf("x=%p\n", x);      // write out contents of the allocated memory     for (i = 0; i < 128; i += 16)         printf("%p: %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n", &x[i], X(0), X(1), X(2), X(3), X(4), X(5), X(6), X(7), X(8), X(9), X(10), X(11), X(12), X(13), X(14), X(15));      free(x);     return 0; }   When I compile this for small memory model, I get:  tcc -ms -IC:\turboc\include -LC:\turboc\lib -etest.exe test.c  ds=02f9, ss=02f9 x=05f2 05f2: 00 00 00 ... 00 0602: 00 00 00 ... 00 ... 0662: 00 00 00 ... 00   When I do the same with compact memory model, I get:  tcc -mc -IC:\turboc\include -LC:\turboc\lib -etest.exe test.c  ds=034f, ss=0391 x=0000:0004 0000:0004: 08 00 70 00 ... 08 00 70 00 0000:0014: 54 ff 00 f0 ... a5 fe 00 f0 ... 0000:0074: a4 f0 00 f0 ... 60 14 00 f0   The pointer 0000:0004 looks suspicious to me and I suspect it to point somewhere outside the heap. I do not recognize the contents, but if I write to the memory, the program freezes.  What am I doing wrong and what should I do to get correct pointer from malloc()? Any suggestion will be appreciated.


If I want to find the continued fraction of $\sqrt{n}$ how do I know which number to use for $a_0$? Is there a way to do it without using a calculator or anything like that? What's the general algorithm for computing it? I tried to read the wiki article but was overwhelmed and lost. I tried Googling but couldn't find a website that actually explained this question.  If anyone has a good site that answers these questions either, please let me know. Thanks!


$|Z_1| = | \frac{v(1+\alpha) + \sqrt{v^2(1+\alpha)^2-4\alpha}}{2}|$  Triangle inequality |x+y|=|x|+|y|  Where x= $\frac{v(1+\alpha)}{2}$ and $y= \frac{\sqrt{v^2(1+\alpha)^2-4\alpha}}{2}$  I've been stuck on this problem now for a couple of days and I'm having a difficult time proving this case.   I'm trying to prove that $|Z_1| \leq 1$ while using triangle inequality.   Where in Case I: $−1\leq \alpha \leq 0$ and $0<v<1$  I was wondering if anybody can assistance me on this problem. I want to thank you ahead of time for your cooperation.


Hi I am a quite beginner in java.  Is it a good way to create construcors with many parameters like in my BookLibrary program?  public class Book implements Serializable {  private String title; private String directorName; private String directorSurname; private String type; private int issueYear; private List<String> actorNames; private List<String> actorSurnames; private Tuple<String, String> directorFullName;   public Book(String title, String directorName, String directorSurname, String type, int issueYear,             List<String> actorNames, List<String> actorSurnames, Tuple<String, String> directorFullName){     this.title = title;     this.directorName = directorName;     this.directorSurname = directorSurname;     this.type = type;     this.issueYear = issueYear;     this.actorNames = actorNames;     this.actorSurnames = actorSurnames;     this.directorFullName = directorFullName; }   Or is there any better idea to create such a constructor?


If $A$ is a non-empty set, then $A \notin A$

Exercise 3.2.2 Use the axiom of regularity and the singleton set axiom to show that if $A$ is a set then $A \notin A$.  Axiom of Regularity: If $A$ is a non-empty set, then there is at least one element x of A which is either not a set, or is disjoint from A.  Singleton Set Axiom: If $a$ is an object, then there exists a set $\{a\}$ whose only element is $a$, we refer to $\{a\}$ as the singleton set whose element is $a$ Furthermore, if $a$ and $b$ are objects, then there exists a set $\{a,b\}$ whose only elements are $a$ and $b$    I think I can give the proof when A is the non-empty set which contains finite elements. However, can anyone give any hint for the general case?  Suppose $A \in A$   Then eixsts $x$ such that either $x$ is not a set or $x \cap A$=$\emptyset$  Then it is clear thar $x \ne A$ (if $x = A$, then $x \cap A \ne \emptyset$)  We observe that as an element, $A$ $\ne$ $x$, $A$ $\in$ $A$  Then $A$ $\in$ $A-x$   Define the new set $A-x$ as $A_1$  then exists $x_1$ such that $A \in A_1-x_1$  After finite steps  we find that $A \in \emptyset $  which leads to contradiction.


Java NullPointerException / Type Generics Question

I have created a Linked List class from scratch in Java. The goal is for this Linked List class to be immutable. I am using generic types (suspected part of issue). The class has three attributes:   boolean isEmpty; T data; LinkedListClass<T> next;   There are also two constructors for creating this class, one is private and the other public:  private LinkedListClass(boolean isEmpty, T data, LinkedListClass<T> next){      this.isEmpty = isEmpty;     this.data = data;     this.next = next;  }   ...  public LinkedListClass(){          LinkedListClass<T> newList = new LinkedListClass<T>(true, null, null);      }   The reason for this is so the user does not have direct access to the variables isEmpty, data and next. So when the user creates a Linked List, the aforementioned variables are assigned to true, null and null respectively by default. N.b. Any method that appends or changes the list in such a way that it is not empty anymore, will hence change the isEmpty value to false.  I have made a copyList() function:   public LinkedListClass<T> copyList() {      LinkedListClass<T> clonedList = new LinkedListClass<T>();      if(this.isEmpty) {          return clonedList;     }      clonedList = new LinkedListClass<T>(false, this.data, this.next.copyList() ); //this is line 32       return clonedList;   }   In the main method I am simply calling the copy function like so:  public class prog7 {  public static void main (String args[]) {      LinkedListClass<Integer> list1 = new LinkedListClass();     LinkedListClass<Integer> list2 = new LinkedListClass();     list2 = list1.copyList();                                 //this is line 7  }   }  Upon compiling, the following error occurs:  Exception in thread "main" java.lang.NullPointerException at LinkedListClass.copyList(LinkedListClass.java:32) at prog7.main(prog7.java:7)   I think the NullPointerException is thrown because when creating a LinkedListClass<T>, two of its values are null. So when trying to change them or reference them, the exception is thrown. One workaround I have considered is replacing null in the public LinkedListClass<T> constructor with the int value 0. However my IDE complains that the expected type is T, but I am providing it with an int. So I think this may be a question regarding type generics.


How do I keep my bluetooth headphones from connecting to my windows 10 machine when it's connected to my phone?

My laptop (running Win10) repeatedly "steals" the bluetooth connection for my headphones while they're connected to my phone. The only way I've been able to prevent the headphones' connection from switching to the laptop is to play some media or make a phone call immediately after reconnecting to my phone, or to unpair the headphones from the laptop.  The headphones are Plantronics Backbeat Go 2, and the specifications from the Plantronics product page give the following information for the Bluetooth entry:      Bluetooth v2.1:   A2DP 1.2, AVRCP, HFP v1.5, HSP v1.1   Thanks in advance!


Where is the line drawn with domain names which include a trademark?

A search on google for "iphone developer" turns up loads of websites which have "iphone" in them, a trademarked name by Apple.  So I'm led to believe that having a domain such as iphonedeveloper.com is ok? Well, you're still using Apple's trademark, but it would be hard to brand yourself otherwise. You're an IPHONE DEVELOPER... right?  Well, what if I want to provide a website where users pay to get a list of the best offers from Ebay? I might have a domain like ebaydeals.com (I don't... i'm just speculating!).  Now I've heard that places like Ebay are really hot on the trigger and fire out emails to people who register domains like that straight away. But whats the difference?  In both cases I'm making money from the trademark, effectively, so is it just down to how lenient the company who owns the trademark is? Or are there rules? Is there a specific "line" you don't cross?  Thanks


How to define a variable on Debian 10 command line?

I am defining a variable on Debian 10 command line but getting the error.  Do anyone know how can I do that?    Thank you,


Upgrading from a modern smartphone camera without going all in on a DSLR kit

Some flagship-level smartphones today come with excellent cameras, at least for their own use-cases. Sometimes you don't really need more than that in most of the photos you'll shoot, and thinking about a "better" camera experience isn't an easy task if you already have a "good enough" smartphone camera sensor.  However, I am looking to "upgrade" my photographical experience, without spending too much on high-end equipment and lenses, but at the same time without going for cheaper quality models that modern smartphones might actually beat in some cases.  Finding the right balance is not an easy task, you might look at a photo and say, "My smartphone shoots better than this", or look at another photo and think, "It does look better, but I don't see much of a difference to justify the price", and today's world of modern standalone cameras is not small, it certainly has many different models, which is why I've come here to ask, is there any camera model that satisfies or at least comes very close to my requirements? I am aware that I might be vague, and some photography professionals may perhaps request much more details than what I've offered you, but I hope you understand the gist of what I'm trying to say, even if I cannot express it well in words.  I have looked at mirrorless/MLIC models, but I'm not sure if they're the right type for my use case.


Is it possible to include in the Title tag the number of notifications a user has? For example, say a user has 5 notifications in their inbox. The title would have (5) right before the rest of the title. In the case that there are no notifications, it would look normal.  This would allow users to be able to have a Stack Exchange page (from any Stack Exchange site) open and be doing something else and monitor their notifications. If they see they get a new one, they can quickly switch to the tab and see what it was.  I would think that this would be easy to implement. Assuming that there is a variable that holds how many notifications are in the inbox (used at the time for displaying that number on the inbox icon), you guys could call for that variable in the beginning of the Title tag. Here is an example, say the assumed variable is called inboxNotif and is in PHP.  <title>(<?php echo $inboxNotif; ?>) <?php echo $title; ?></title>   I am assuming that <?php echo $title; ?> is also used in displaying the title of the page; even if it is not, it is still there for demonstrative purposes. Nonetheless, the concept is there.


From what I understand, the net movement should be zero since AC is periodic and the charges should not move anywhere.   Are they picked up by a receiver or something when they are pushed just far enough??


How do I pipe colored diff output to less?

I've been using git diff, which produces colored output. However, I now find I need to use ordinary diff for something, and it's producing a lot of output that is hard to read because of the lack of colors. How do I make diff produce a readable, colored output? Ideally while piping it to less, for easy review of large files.


Order-preserving injections of ordinals into $[0,1]$

The usual "matchstick" representation of an ordinal number can be thought of as an order-preserving injection of that ordinal into the interval [0,1]. For example, here's a representation of $\omega^2$:    One can use this technique to visualize even larger and larger ordinals; for instance, $\omega^3$ would look the same as the above, but each individual matchstick would be replaced with yet another infinite triangle leading to the next matchstick, so that there are three layers of infinite triangles. So long as there's an order-preserving injection from your chosen ordinal into $[0,1]$, this technique will work to help you visualize it.  So my question is: what is the supremum of all ordinals for which an order-preserving injection exists in this way? Is it the first uncountable ordinal? The initial ordinal of $2^{\aleph_0}$? Something smaller? Something larger?


Let A be an $n \times n$ matrix. Prove that $dim(span{I_n,A,A^2,...}) \leq n$.   I am thinking about the theorem( Let T be a linear operator on a finite-dimensional vector space V, and let W denote the T-cyclic subspace of v generated by a noznero vector $v \in V$. Let k=dim(W), then ${v,T(v),T^2(v),...,T^{k-1}(v)}$ is a basis for W). I am also encouraged to think about Cayley-Hamilton theorem, but I don't see the interconnection here. Can someone point out what to do? Thanks.


Discrepancy between User page and League page reputation totals

I was recently poking about and noticed that there is a discrepancy between the reputation shown on the  page and the  page. For me, the site shows I have 9507 for the year and the league shows I have 9950. The monthly and quarterly totals differ too. Other player have similar discrepancies. Why is there a discrepancy ?


How to upsert(update if exists, else insert) into a table using jdbcTemplate

I have to update a row in the table if Id is already presents, else insert a new row in the database using Spring Jdbc Template. I tried using MERGE query but since i am operating on a single table, I could not able to pass my insertion parameter values from outside(Merge insert params should come from DB) as shown below.   MERGE INTO TABLENAME INDS USING (SELECT PRIMARY_ID SIC FROM TABLENAME  WHERE PRIMARY_ID = '223456789') E ON (INDS.PRIMARY_ID=E.PRIMARY_ID)  WHEN MATCHED THEN UPDATE SET INDS.ROW_MOD_ID='ManualUpdate', ROW_MOD_TMST=sysdate WHEN NOT MATCHED THEN INSERT  (INDS.PRIMARY_ID, INDS.ROW_CRE_ID, ROW_CRE_TMST) VALUES ('223456789', 'ManualInsert', sysdate);   I am using Oracle DB and worried about the performance. Is there any spring feature to address my problem? Any help is much appreciated.


Plugins crashing with "No module named qgsprojectionselectionwidget" in Windows?

My  works on Ubuntu (at least for me, and all fatal bugs reported so far are solved), but when I run it on QGIS installed from the official 2.10.1 64-bit installer for Windows (on Windows 7 64-bit), I can't install it due to following error:  This plugin is broken No module named qgsprojectionselectionwidget   Another user reported it this problem as well. but with another error message (I don't know which operation system and architecture does he have, but I'd guess Windows and 64-bit EDIT: I guessed wrong, he has Mac OS X):  This plugin is broken No module named qgsmaplayercombobox   Both refer to widgets in the GUI form, which I built through Qt Designer in Ubuntu. Qt Designer is packed with QGIS installer for Windows as well and claims to contain the same QGIS custom widgets, so the problem shouldn't be in those widgets missing, and QGIS should recognize them - but it doesn't.  So how to fix it? My plugin is still experimental, so I can just add "sorry, doesn't work under Windows" to the metadata, but it's not a real solution.  EDIT: the same behavior confirmed on 32-bit version too.  Now I found a good hint in comment to : use os.path.join to make the paths cross-platform. This is easy for the few hardcoded paths I have, but the errors seems to suggest the problem is deeper, perhaps even in Qt. How can I handle this problem in my plugin without tweaking anything else?


Neukirch’s Number Theory – why is $ℂ \otimes_ℚ K → K_ℂ,~z \otimes a ↦ (j(z)a)_τ$ an isomorphism?

In §5 of chapter 1 of Neukirch’s Algebraic Number Theory on Minkowski theory, it is claimed that $$ℂ \otimes_ℚ K → K_ℂ,~z \otimes a ↦ zj(a)$$ yields an isomorphism. Here, $K$ is an algebraic number field, $K_ℂ = \prod_τ ℂ$ (where $τ$ runs through all field embeddings $K → ℂ$) and the map $j$ is given by $$j \colon K → K_ℂ,~a ↦ (τa)_τ.$$  I’m having a hard time seeing this isomorphism. What’s the inverse map?


Shouldn't "five minute walk" be "five minutes walk" in this sentence?

Recently, while skimming through an article I came across a sentence which is as follows.  The five minute walk will connect you with life.  My rationale says it should have been "five minutes" and not "five minute". Kindly advise where am I going wrong?


Can my Windows 8 login password be different from my Microsoft Account password?

I am currently logging into Windows 8 with my Microsoft Account. I have recently begun to utilize LastPass and would like to change my Microsoft Account password to a very long and very complex password. Unfortunately, the autologin and copy-paste features offered by LastPass plugins in a web browser are not available on a Windows Login Screen.  As such is there anyway to utilize a Microsoft Account to login to Windows and have the password be different for the computer? Or do I need to setup a local account and just associate it with the Microsoft Account?


How to disable internet search results in start menu post Creators Update?

It  to disable internet search results in start menu searches before the Windows 10 Creators Update, but I've just clean installed a new Windows 10 Pro image and that setting is gone. Is there some way to disable it through editing the registry/etc?


Do singularities have a "real" as opposed to mathematical or idealized existence?

I was thinking of, for example a Schwarzchild metric at r=0, i.e. the gravitational singularity, a point of infinite density. I realise that there are different types of singularities--timelike, spacelike, co-ordinate singularities etc. In a short discussion with Lubos, I was a bit surprised when I assumed they are idealized and I believe he feels they exist. I am not a string theorist, so am not familiar with how singularities are dealt with in it.  In GR, I know the Penrose-Hawking singularity theorems, but I also know that Hawking has introduced his no-boundary, imaginary time model for the Big Bang, eliminating the need for that singularity. Are cosmic strings and other topological defects singularities or approximations of them (if they exist).  In what sense does a singularity exist in our universe? --as a real entity, as a mathematical or asymptotic idealization, as a pathology in equations to be renormalized or otherwise ignored, as not real as in LQG, or as real in Max Tegmark's over-the-top "all mathematical structures are real"?


Prove that  $\cos\left({\pi \over 11}\right)\cdot\cos\left({2\pi \over 11}\right)\cdot\cos\left({3\pi \over 11}\right)\cdot\cos\left({4\pi \over 11}\right)\cdot\cos\left({5\pi \over 11}\right)={1 \over 32}$  My solution starts here LHS $= \cos\left({\pi \over 11}\right)\cdot\cos\left({2\pi \over 11}\right)\cdot\cos\left({3\pi \over 11}\right)\cdot\cos\left(2\pi-{3\pi \over 11}\right)$  Then I changed the last expression to $\sin {3\pi \over 11}$ but Now what to do next?


Which form of the verb "come" is correct?

"Does creativity comes with insanity?"    OR     "Does creativity come with insanity?"  Which of the above sentence is grammatically correct and why? What effect does using the word “Does” causes on the verb usage in the sentence?


Given a field, the field of algebraic elements over it in an algebraically closed field extension is again algebraically closed?

Let $\mathbb F$ be a field and $\mathbb  K $ be an extension field of $\mathbb F$  such that $\mathbb K$ is algebraically closed.   Let $\mathbb L$ be the field of all elements of $\mathbb K$ which are algebraic over $\mathbb F$. Then $\mathbb L_{|\mathbb F}$ is an algebraic extension.   My question is : Is $\mathbb L$ algebraically closed ?  I am trying to prove the existence of algebraic closure, so please don't assume that every field has an algebraic closure.


Test class for Case History Related list

On a VF Page, I am displaying Case's history related list with a custom tabular format. I am querying Case history object in an Apex class (under Constructor):  caseHist = [Select OldValue, NewValue, Field, CreatedDate, CreatedBy.Name,                        CreatedBy.FirstName, CreatedBy.LastName                        From CaseHistory Where CaseId =:currentCase.Id ORDER BY CreatedDate DESC];   Just using a return method to get the data:   public List<CaseHistory> getCaseHistory(){     return caseHist; }   On VF page:  <apex:repeat value="{!caseHistory}" var="casHistory">

                         {!casHistory.CreatedBy.LastName}, {!casHistory.CreatedBy.FirstName}

                         Changed {!casHistory.Field} from {!casHistory.OldValue} to {!casHistory.NewValue}

                         {!casHistory.CreatedDate}

 </apex:repeat>   My understanding is: In a test class, we are not actually committing any records to the database to update few fields and get the tracking history for those. Now I am wondering, how could I get 100% of my Apex class's code coverage? Right now, I got 73% covered.


Problem with complex equation $\sin z=\cos z$

I attempted to solve $\sin{z} = \cos{z}$ I used Eulero formulas for complex sin and cos. Then, in order to eliminate \i from sin's denominator, I raised to square, but then I get an impossible equation. Is it the right way?  Edit: I saw another discussion, but I want understand if my method is correct


Verify that the unbounded function belongs to $W^{1,n}$

Verify that if $n > 1$, the unbounded function $u = \log \log \left(1+\frac 1{|x|}\right)$ belongs to $W^{1,n}(U)$, for $U=B^0(0,1)$.   This is PDE Evans, 2nd edition: Chapter 5, Exercise 14.  In order to show that $u \in W^{1,n}$, where $W^{1,n}$ is a Sobolev space containing the function $u$ itself and its first-order derivative.  Differentiating $u=\log \log\left(1+\frac 1{|x|}\right)$, I obtain (and please verify if you would like) $$u_{x_i}=\frac 1{\log \left(1+\frac 1{|x|}\right)}\frac 1{1+\frac 1{|x|}} \frac{x_i}{|x|^2}.$$  Given $u'=v$ in the weak sense, should I show, according to definition, that $$\int_{B(0,1)} u \phi' \, dx = -\int_{B(0,1)} v\phi dx$$ for all test functions $\phi \in C_c^\infty(U)$? The integration by parts formula comes to my mind here.    Or, should I be employing material from Section 5.6 (Sobolev inequalities) of the textbook? In particular, they discussed on page 280 the borderline case $p=n$, which mentions:     The borderline case p=n. We assume next that $$p=n.$$ Owing to Theorem 2 (page 279) and the fact that $p*=\frac{np}{n-p}\to+\infty$ as $p \to n$, we might expect $u \in L^\infty(U)$, provided $u \in W^{1,n}(U)$. This is however false if $n>1$: for example, if $U=B^0(0,1)$, the function $u=\log \log\left(1+\frac 1{|x|}\right)$ belongs to $W^{1,n}(I)$ but not to $L^\infty(U)$.


SQL-Like Inner Join on IDs in Two Layers in QGIS

Using QGIS v2.6.0-Brighton.  This question is not about editing layers geographically in anyway. It is merely trying to find data from two layers as you would in an SQL Query and append an extra ID to the second layer.  I have one polyline layer each identified with two different IDs. There is a point layer also with one of these IDs, I wish to find this corresponding ID and append them as a column to the point layer.  How do I do this without finding each row individually and typing it in manually (i.e. larger scale)? I would prefer to use SQL like syntax but if there is a GUI as well that would be ideal. Happy to install official plugins.


Why Pandas Dataframe (and Python) have a strange float-precision decimal value assignment which impacts rounding?

Hope anyone can help explain the following behavior and how to fix it I have a DataFrame like this: l = [[1, 50, 3, 4.003], [1, 50, 4, 5.002], [2, 10, 3, 5.003], [2, 50, 2, 5.004]] df = pd.DataFrame(l, columns=["a", "b", "c","d"])  df # Output:     a   b   c   d 0   1   50  3   4.003 1   1   50  4   5.002 2   2   10  3   5.003 3   2   50  2   5.004  Now if I do a simple sum of column "d" row1 + row2 I should expect a result of 9.005, right? Well wrong, instead I get 9.004999999999999, this is what I do: sum = df.loc[0]["d"] + df.loc[1]["d"] sum # Output: 9.004999999999999  This affects the outcome of rounding to 2 decimal points after the sum. I did some research on the internet and it might have to do with number of bytes used on the float64 data type but is there a way to overcome this issue? By the way when I try the same with regular python variables it does the same thing: d0 = 4.003 d1 = 5.002  d0 + d1 # Output: 9.004999999999999  The challenge is that if I need to round the results to two decimals I want to get 9.01 and not 9.0 round((d0 + d1), 2) # Output: 9.0  # It should have been 9.01  So when we have thousands or even millions of records one would have to identify which values are having the point-precision error before summing and rounding to avoid this issue?, it will be very impractical, any other suggestions?


How to auto-login in Xubuntu or Ubuntu Server with XFCE?

In spite of setting auto-login in the Xubuntu settings (XFCE/System/Users and Groups) I have to login each time when I start up the computer. How can this be changed?


Professor McGonagall was born in 1935 according to the official timeline. Yet, she appears to be teaching in Hogwarts in 1927, and long before that taught Newt and Leta.


Canceled my flight to Miami and go to a different location in the U.S. does my ESTA work?

I recently asked about the safety of my travel to Miami.  Now I had to cancel my hotel in Miami and I will not take my flight to Miami. Instead I go to Vegas or NY.  On my ESTA appliance I had to name an address where I will stay in the U.S. I gave the address of the hotel I booked. Now I am concerned that I have to apply a new ESTA or change my old one, does anyone know how this works out? I don't want to end up being returned at the U.S. Airport.


Call to a member function bindParam on a non-object

I'm trying to do a different sql statement in case that the user submit the search form. I'm trying with this code below, but I'm getting an error and I'm not understanding why, because the code seems gode for me.   Do you see here something that can be the cause of these errors?  Errors Im getting:     Call to a member function bindParam() on a non-object in $readNews->bindParam        Notice: Undefined variable: readNews in $readNews->bindParam(':begin', begin, PDO::PARAM_INT);        Fatal error: Call to a member function bindParam() on a non-object in   F:\Xampp\htdocs\projeto\admin\posts\noticias.php on line 53   My code:  $pag = (empty($_GET['pag']) ? '1' : $_GET['pag']); $maximo = 5;  $begin = ($pag * $max) - $max;     if (isset($_POST['search']))  { $search = $_POST['search']; if(!empty($search) && $search != 'Title:') { $readNews = $pdo->prepare("SELECT * FROM news WHERE title LIKE CONCAT('%', :search, '%') ORDER BY data DESC LIMIT :begin, :max"); $readNews->bindParam(':search', $search); } }        else { $readNews = $pdo->prepare('SELECT * FROM news ORDER BY data DESC LIMIT :begin, :max'); }  $readNews->bindParam(':begin', begin, PDO::PARAM_INT); $readNews->bindParam(':max', $max, PDO::PARAM_INT); $readNews->execute(); $resultReadNews = $readNews->rowCount();


Ability for mods to hard-delete a question or revisions

We get some questions from time to time where the OP has posted his access codes or API keys to various online systems, like Twitter, Facebook, etc.  These questions tend to linger in the flag queue for a long time since moderators do not have the ability to completely remove a revision or even the whole question, we can only do a soft-delete.  As such, a flag is usually left by a moderator for a dev/team to look at, and I suspect the devs/the team has enough to do because those flags tend to be sitting in the queue for at least a day, often drawing multiple flags from the OP to have his question deleted. In other words, since the question cannot be fixed without a complete delete, without a dev, the OP gives up waiting for his question to be fixed and instead requests it to be completely deleted. It would be nice if we could avoid that.  Would it be possible to get a function where moderators could completely remove a revision and/or the whole question, as long as multiple moderators agree? What I mean is that I could flag the question/revision for a hard-deletion, and 1-2 other moderators would have to agree by flagging in the same way. Once it has accrued enough such flags, it is gone. Optimally the flag would require the first moderator to write a short explanation of why this is necessary as well.  This would mean the moderators could fix such things themselves, without involving or waiting for a dev/the team to handle it, and still not be able to remove anything completely by themselves, a consensus is needed.


Bounty indicator disappears when voting on a question

If an answer received a bounty, the green bounty indicator will disappear when voting on the question.


What was the first movie to feature zombie babies?

I was watching the Talking Dead for the Walking Dead season two finale, and they talked about not actually being able to show a child being shot.  But they have shown zombie children.  But this made me think:  Assuming there have been zombie TV shows or movies which shows a baby, infant, or toddler which has been zombified, which was the first one?


Is there another way to transfer my village to a new device?

I'm getting rid of my current iPhone and change it for another iPhone 5s.  The thing is, the Game Center account I am using right now is not the same one my village is linked to, apparently. I have tried like four different Game Center accounts I might have used to no avail - the game keeps saying this is the wrong account.  Is there a way to tell what Game Center account is my village linked to currently? Is there another way to transfer my village to the new device?


Periodic function implies periodic primitive?

If $f$ is a periodic function with $T = \pi$, does that mean that $F$ (a primitive of $f$) has the same period ? What about the inverse implication (periodic primitive implies periodic function) ?


Is there anywhere (in canon) where the Doctor's real name is ever revealed? I know that several people do know it or learn it at some point (like the Master, River, and Clara for example), but is it ever revealed to us?


I use Linux Ubuntu, but I would like to change to Graphic User Interface (not specific looks like Windows). Are there any opportunities to change the Gnome GUI in Linux Ubuntu?


How can I add a program to Startup Applications using a python script?

I want to add a python script to startup using another python script. Is there a way to do that?


Show that $n^5/5 + n^3/3 + 7n/15$ is an integer for every n

So far I have combined the fractions to get $ \ (3n^5 + 5n^3 +7n)/15 \ $ and that is equal to $[n(3n^4 + 5n^2 + 7)]/15$. So I need to show that $15\mid n(3n^4 + 5n^2 + 7)$.  Case 1: 15 divides $n$. Then we are done.  Case 2: 15 does not divide n. Then I need to show that $15\mid(3n^4 + 5n^2 + 7)$. This is where I am stuck. Can someone please tell me if I am going in the right direction or if I need to do it a different way?


I have a 64gb usb stick and it's now corrupting files that I place on it. On my previous computer I had Gparted (PCLinux) and that did the trick for a bit. Now I have Ubuntu I can't seem to find Gparted.  Is there an addon store for Ubuntu where I can find Gparted? Or is the another way to fix my usb stick?  Thanks.


I've had a link on my webpage to one of my Stack Overflow answers for a long time now. For fun, I track it with Google Analytic events, so I know for sure that I've received more than 1000 clicks. Yet I haven't even gotten a booster badge for it.  Here's a screenshot for the click events from Google Analytics:    I doubt that there are less than 1000 unique IP addresses there.  Here's the webpage with the link. See side panel (or below article if you're on mobile).    It's linked on every Java article on that site. The link looks as follows:  In Java, difference between default, public, protected, and private   I know it's an answer (.../a/...) link and not a question link, but according to  these have counted in the past, and there is a record of @balpha stating that they should count.  What gives?


Modal vs Non-Modal vs Auxiliary modal vs Conjugated Verb   How are these kinds of verb related to each other? Specially Non-Modals and Conjugated Verb. Is the "Auxiliary modal" just another name for "Auxiliary verb"?


Is it possible to find out who used a SQL-Server login?   Let's assume we suspect a person to abuse a SQL login that is supposed to be used by an application only to logon to SQL-Server. Is the domain user who used the SQL login logged anywhere, so that we can make a conclusion who used it?


What should happen when the marked duplicate of a question is deleted?

(which has pending delete votes, but is still visible) was marked as a duplicate of  (which has already been deleted).  The above is an example of when the duplicate system breaks. The Possible Duplicate banner is still present, but most users won't be able to see the linked question.  even recommended a scraper that allowed them to view the question in (er...) question.  My question is what should happen to questions like these? Should the duplicate be unmarked? That may not be the best because in this case, both questions are off-topic and deserve deletion. What else could be done?


Why is there a difference between manually calculating a logistic regression 95% confidence interval, and using the confint() function in R?

Dear everyone - I've noticed something strange that I can't explain, can you? In summary: the manual approach to calculating a confidence interval in a logistic regression model, and the R function confint() give different results.  I've been going through Hosmer & Lemeshow's Applied logistic regression (2nd edition).  In the 3rd chapter there is an example of calculating the odds ratio and 95% confidence interval.  Using R, I can easily reproduce the model:  Call: glm(formula = dataset$CHD ~ as.factor(dataset$dich.age), family = "binomial")  Deviance Residuals:     Min      1Q  Median      3Q     Max   -1.734  -0.847  -0.847   0.709   1.549    Coefficients:                              Estimate Std. Error z value Pr(>|z|)     (Intercept)                   -0.8408     0.2551  -3.296  0.00098 *** as.factor(dataset$dich.age)1   2.0935     0.5285   3.961 7.46e-05 *** --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1   (Dispersion parameter for binomial family taken to be 1)      Null deviance: 136.66  on 99  degrees of freedom Residual deviance: 117.96  on 98  degrees of freedom AIC: 121.96  Number of Fisher Scoring iterations: 4   However, when I calculate the confidence intervals of the parameters, I get a different interval to the one given in the text:  > exp(confint(model)) Waiting for profiling to be done...                                  2.5 %     97.5 % (Intercept)                  0.2566283  0.7013384 as.factor(dataset$dich.age)1 3.0293727 24.7013080   Hosmer & Lemeshow suggest the following formula:  $$ e^{[\hat\beta_1\pm z_{1-\alpha/2}\times\hat{\text{SE}}(\hat\beta_1)]} $$   and they calculate the confidence interval for as.factor(dataset$dich.age)1 to be (2.9, 22.9).  This seems straightforward to do in R:  # upper CI for beta exp(summary(model)$coefficients[2,1]+1.96*summary(model)$coefficients[2,2]) # lower CI for beta exp(summary(model)$coefficients[2,1]-1.96*summary(model)$coefficients[2,2])   gives the same answer as the book.  However, any thoughts on why confint() seems to give different results?  I've seen lots of examples of people using confint().


Test question in review queues does not change comment date correctly

While reviewing questions in the review queue, sometimes StackOverflow will change the question dates and hide votes to test if the reviewer is paying attention or not.     While the date of the question is hidden, the date of comments remains the same as the original. So the reviewer can easily spot the mismatch and determine that it is a Test question.    Either we should change the comment date also or hide the comments completely.      In the screenshot, as you can see that question was asked a few mins ago but comments are 10 days old.


Difference between the two way of performing Kolmogorov-Smirnov normality test

There are 2 ways to perform Kolmogorov-Smirnov test in SPSS:   Analyze; Nonparametric Tests; 1-Sample K-S Analyze; Descriptive Statistics; Explore; Plots; Normality plots with tests   What is the difference between these two tests? Their results are different! When should we use each of them?


Is it legal to have 2 flights in the air at the same time with the same flight #?

My son was flying from a Rochester NY to Washington Dulles on flight 4578. They were to land, pickup passengers, then continue to Raleigh. The flight from Rochester was delayed so late arriving in DC. While in the air, the same flight number left DC to Raleigh - obviously different plane. How does that happen?


I am trying to see if this integral converges or not, so we have $$\int_{1}^{\infty}\frac{1}{x^{1+\frac{1}{x}}}$$ Using P-Test I know if $1+\frac{1}{x}>1$, then this integral converges, but could the $x$ be negative so $1+\frac{1}{x}<1$?? then the integral diverges? Thanks


Question: Consider a metric space $(X,d)$  1) Show that if $x$ is a convergent sequence in $(X,d)$, then it is a Cauchy sequence in $(X,d)$.  Suppose $(X,d)$ is complete. Let $f\colon X \to X$ be a contraction, i.e., there exits a $\beta\in(0,1)$ such that, for all $x,y \in X$, we have $d( f(x) , f(y) )\le \beta d(x,y)$. Let $x_0\in X$. Define the sequence $x$ inductively by the formula $x_n=f(x_{n-1})$ for $n\in\mathbb{N}$.  2) Show that $x$ is a Cauchy sequence, and therefore convergent.  3) Show that a limit point of $x$, say $\alpha$, is a fixed point of $f$, i.e., $\alpha=f(\alpha)$.  4)Show that $f$ has a unique fixed point.  My try for part 1:  If $x$ is a convergent sequence in $(X,d)$ then there exists $x_0 \in X$ and $M \in \mathbb{R}$ such that for all $x \in X$, $d(x,x_0) \le M$  This implies $|x-x_0| \le M$ . This proves it is Cauchy sequence.


Can someone explain to me the "meaning" of the dissipative operator ?     I am a bit confused. Thanks in advance.


I want to add a background image in my beamer presentation. The thing is that when I use  \usebackgroundtemplate{ \includegraphics[width=\paperwidth, height=\paperheight]{cern-logo.jpg} }   in my preamble, the image has its true colors, meaning that it is not opaque or transparent. Is there  a way to achieve that?


UK Visitor visa refused, despite lots of evidence

I have done some searching on this forum and found some really good advice. I am attaching a copy of the letter and my thoughts on it. Here's hoping that someone could interpret this visa refusal letter in more detail and perhaps advise on what could be done with a second application to secure an approval.  I am trying to invite a friend to visit the UK for 11-day holiday later this year, but the visitor visa was refused based on 3 points: V4.2(a), (c) and (e).  Taking each in turn: (a) & (c) - reasons given were based on the earnings of the applicant. - UKVI stated "From the financial information provided, I am not satisfied that the proposed trip is proportionate to your income and finances and is therefore credible".  It looks as if the ECO has based the decision of intention to return home after the trip solely on the applicant's earnings with no consideration given to the home ties of the applicant and evidence supplied to demonstrate this, such as their marriage certificate, birth certificates of 3 children, letter from employer stating full time employment status (since 2007, payslips and bank statements to corroborate the employment aspect. Plus details on the application letter that the applicant lives in their own family-owned home. In addition to this, return flights were booked in advance, which demonstrated an intention to leave at the end of the holiday. (Flights were very cheap, so I was not concerned about losing this money).  (e) - UKVI did not believe that applicant could meet the cost of the 11-day trip! (to be honest, I would agree). That is why I happily completed a full financial sponsorship undertaking, providing evidence of my home status, utility bills/correspondence from HMRC, evidence that I am an employed professional and will be taking leave for the proposed 11-day stay, payslips, 12 months of my bank statements showing funds solely available to me way in excess of what would be needed to financially cover an 11 day trip. (> £4,000!), and a regular income, etc to establish no financial messing around in an attempt to deceive. All this plus a full covering letter to summarise the application, my support of it and the evidence provided by myself.  So the visa was refused as the ECO considered that the applicant would try to work in UK! For 11 days? Seriously. I thought the provisions in V4.3 of the Immigration Rules allowed an applicant to be fully sponsored, but it appears this is not the case?  I thought we had put together a very strong application, so I was (and still am) confused as to why a refusal was issued.  I think I have a fairly good grasp of the visa procedures so I don't necessarily need legal advice in that area. I would happily make another application, but I do not see how any subsequent application would be significantly different as circumtances are unlikely to change.  I have written to the Home Office to ask for clarification on what additional evidence would be required to satisfy UKVI, but nothing received back yet (will be very surprised if I do hear anything.)  So if anyone has any gems of wisdom, additional evidence that you think could improve a subsequent application, I would love to hear from you.  Thank you for reading.


Can I delete statements that express thanking from questions?

There are many questions on many Stack Exchange sites that have paragraphs thanking people in advance which may cover a large fraction of the question area and I think it's NOT necessary to express the thanking since the website is for questions and answers and also people who answer the question will receive reputation.  So can I edit posts that have 'thank you' paragraphs?


My husband has a beard in his passport photo, can he shave it off and still be able to board the ship?

My husband has a beard on his photo passport photo but he wants to shave it before we go on our cruise, will this be a problem for him when boarding the ship?


Middle click to paste is making scrolling impossible in Terminal on my thinkpad keyboard because of middle click pasting.   I'd prefer to just disable it on that app, but globally would be fine.   I found this question with 1 answer but I had too much trouble with Karabiner (it broke hyperdock) and it's specifically about how to disable middle click for terminal, not globally:


I want to get a visa from the Swedish embassy to visit Sweden. May I visit France using the same visa?


Repeated Encryption using same/different Encryption systems

I would like to know if there are any security risks/gains from encrypting twice, i.e. $$\text{plaintext}\xrightarrow{encrypt}\text{intermediate text}\xrightarrow{encrypt}\text{ciphertext}.$$ I would like to know if there are known gains/risks to what I'm looking at. Perhaps certain pairs of systems are compatible while others are detrimental. Or perhaps some systems are obviously its own inverse (like the one-time pad).  I would like to hear your thoughts and if there is a survey paper, that would be great as well. Thanks!


How can I produce a 'ring (or wheel) chart' like that on page 88 of the PGF manual?

I really like the 'ring chart' or 'wheel chart' given as an example on page 88 of the PGF manual. It is like a pie chart, but with a label in the centre. Unfortunately, the manual doesn't give the source for that chart. Does anyone have an example? Thanks.


Uninstalling old QGIS versions to save disk space?

I would like to clean up disk space used by old versions of QGIS.    Can I use the Windows Uninstaller without damaging the current installation or should I only delete the directory in the Programs folder?    The screen shot of my installed versions is shown in the picture.


Can I get exactly the same pdf document (sha1) when I recompile latex document?

If there are no date/time specific variables in tex content (just text)... Can I after running xelatex command get the same .pdf (byte to byte) when .tex file isn't changed?


Interesting question on Fibonacci numbers.

Ran across this interesting question about the Fibonacci numbers but quite unsure how to go about it, any ideas ?


Why I can't execute script with only execution permission?

At the moment I am playing around with linux on my raspbery pi and Im trying to learn how the permission system works.  I created a group of two users one of them created a python script in his own documents folder with the permissions: -rwx--x---.  The other group member should execute the file with the command python hello.py but he says permission denied.  The only way is to give the group also reading permission so: -rwxr-x---  Why is the execution permission not enough to execute the python script?


ls listing directory argument does not work as per expected

I wish to list all directories only (not files) in my current dir. I expected ls -ld ./* to return only directories as man page states      list directories and not contents   Currently the command returns all files and directories under current directory.  Alternatively I have the below command which can achieve my requirement but i was thinking if there was an inbuilt option to achieve the same  ls -lF ./ | grep ".*/$"


How do you run a Python script as a service in Windows?

I am sketching the architecture for a set of programs that share various interrelated objects stored in a database. I want one of the programs to act as a service which provides a higher level interface for operations on these objects, and the other programs to access the objects through that service.  I am currently aiming for Python and the Django framework as the technologies to implement that service with. I'm pretty sure I figure how to daemonize the Python program in Linux. However, it is an optional spec item that the system should support Windows. I have little experience with Windows programming and no experience at all with Windows services.  Is it possible to run a Python programs as a Windows service (i. e. run it automatically without user login)? I won't necessarily have to implement this part, but I need a rough idea how it would be done in order to decide whether to design along these lines.  Edit: Thanks for all the answers so far, they are quite comprehensive. I would like to know one more thing: How is Windows aware of my service? Can I manage it with the native Windows utilities? What is the equivalent of putting a start/stop script in /etc/init.d?


Creating an object from string and using as monitor in synchronized block

I am using an annotation on some classes and by reflection I get some string of that annotation which is unique for every class. I am thinking of using that string to synchronize a block of code, but I want to block access of the code only if annotation string value is same, if string is not same than another thread can enter a perform its task. I know that I can't use string directly and ints don't have monitor so I can't use hashcode directly. Is this way going to create any issue when I use jMeter to load test this piece of code. public class LockObject {     private String lockString;     public LockObject(String lockString) {        this.lockString = lockString;    }     public int hashCode() {        returns hashcode for string;    }     @Override    public boolean equals(Object obj) {    } }  public class TestClass {     public void someMethod() {        String annotationString = "fetchedByAnnotation that i use on some class by reflection";        //what i want if string is same then second thread won't enter this block        synchronized (new LockObject(annotationString)) {            //some task based on that string        }    } }


prove by induction that $\sum_{k=0}^n {n \choose k} = 2^n$

I have proved previously that $\sum_{k=0}^n {n \choose k} = 2^n$ by using the binomial theorem. I was wondering, however if it were possible to solve this using a proof of induction.


Text color after a Tikz node at the beginning of a section in ConTeXt

I think I found a bug in the behaviour of tikz under ConTeXt. If an heading (a section, for example) is typeset in some color and it is followed by a tikz picture (either with a \tikz command or with \starttikzpicture ... \stoptikzpicture) which contains a node, the following text inherits the color of the heading. This does not happen if one of the following conditions occurs:   the picture is not at the beginning of the section, that is there is some text before it, or the picture does not contain any node.   A MWE showing the (non-working) example and the correct cases is the following:  \setupcolors[state=start] \usemodule[tikz] \setuphead[section][color=red]  \starttext \section[title=A section] \tikz{\node[draw]{Inside a node};} If the section starts with a tikz picture which contains a node, the following text inherits the color of the previous heading.  \section[title=Another section] If there is text before an node \tikz{\node[draw]{node text};}, the text color is OK.  \section[title=A third section] \tikz{\draw (0,0) --(1,0);} If there aren't nodes in the tikz picture, the text color is OK.  \stoptext   Am I doing anything wrong? If not, is there any workaround?


Best way to determine if a method is returning a primitive?

I'm looking through a list of methods and want to identify those that return a primitive (or a primitive wrapper class). Other than a big switch statement is there a simple way to do this?  Method[] methods = fooObj.getClass().getMethods(); for(int i = 0; i < methods.length; i++) {     Method m = methods[i];     Class c = m.getReturnType();     if(c == void.class) {         println("does not return anything.");     }     if( ??? ) {  // <--- what expression to use?         println("a primitive, or primitive wrapper, is returned.");     } }


Incrementing MAX_SAFE_INTEGER in Javascript

How can this be explained that I get a result that ends in 92 for the first two calculations, and 94 for the third one?       console.log(Number.MAX_SAFE_INTEGER + 1); //...92     console.log(Number.MAX_SAFE_INTEGER + 2); //...92     console.log(Number.MAX_SAFE_INTEGER + 3); //...94


Is it possible to give sudo access to only a particular command?

Background: I have a development machine with LAMP setup. Several developers would access the machine from time to time. Every time they make some change in a configuration file they will need to restart the apache server using sudo service apache restart or sudo /etc/init.d/apache2 restart  The Question:  What I want now is that every developer who accesses the machine does not have a sudo access to everything. Rather, he/she should only be able to run the service command using sudo and nothing else. Is it possible to do that?


I have heard that you should keep the registry clean on Windows. Is this actually important or is it just myth?


How to convert Console application to winforms?

I want to do some changes here, I want to convert this application to winforms. And i want to store these output into a text file, How can I do it? please help  using System; using System.Threading; public static class Program { public static void Main() {      // Create a Timer object that knows to call our TimerCallback   // method once every 2000 milliseconds.   Timer t = new Timer(TimerCallback, null, 0, 1000);   // Wait for the user to hit <Enter>    Console.ReadLine(); }  private static void TimerCallback(Object o)  {    // Display the date/time when this method got called.   Console.WriteLine(DateTime.Now);   // Force a garbage collection to occur for this demo.   GC.Collect();  } }   Output of this application.   Source


Evaluate $\displaystyle \lim_{n\to \infty}\sqrt[n]{n!}$

I am trying to evaluate the $\lim(\sqrt[n]{n!})$ using 2 theorems (2 proofs)   Theorem 1: Let $\{c_n\}$ be any sequence in $\mathbb{R}^+$. Then, $\displaystyle \underline{\lim}\frac{c_{n+1}}{c_n}\leq \underline{\lim}\sqrt[n]{c_n}$ and $\displaystyle \overline{\lim}\sqrt[n]{c_n}\leq \overline{\lim}\frac{c_{n+1}}{c_n}$.    so with 1. I have $\frac{(n+1)!}{n!}$ =$n+1$  which is $\overline{\lim}=\infty$   and 2 with $\sqrt[n]{n!}\geq\sqrt[n]{(n/2)^{n/2}}$=$\sqrt{\frac{n}{2}}$ which is $\overline{\lim}=\infty$  is it valid?  P.S I was not using theorem 1 right


How can I establish "shared" variables for all Bash instances on a machine?

How can I establish these shared variables forever on all Bash instances?  export PATH=/Developer/NVIDIA/CUDA-5.5/bin:$PATH export DYLD_LIBRARY_PATH=/Developer/NVIDIA/CUDA-5.5/lib:$DYLD_LIBRARY_PATH


i could not find any examples on how i can set a password using scp to transfer files remotely via from command like    currenty wrote this:  scp “/localFolder/localFile.txt” userName@172.11.111.345:”/RemoteFiolder/AA/”   Where do i enter the password on this script that wil run automatically?


find an example which is not obtained by attaching a square root of an element of F?

Give an example of a degree 2 extension K of a field F of characteristic two which is not obtained by attaching a square root of an element of F  my trial :i was  taking  $x^2-a$ = $0$  as $K=F(\sqrt a)$  as i don't know the next step ,,,Pliz help me as how to find the example


What is a good way to introduce Euler's totient function?

I was thinking of this question and when I googled I couldn't find any MSE results, but I found one from Reddit. I just wanted to ask the question here and post the answer as community wiki just so MSE could have some discussion. If you want this taken down, you can comment and I'll take it down.  The  from u/matqkks:      I need to introduce Euler's totient function but I don't want to start with the definition. What applications and impact does this function have? I need something which will can be used to hook students into why Euler's totient function is important.   If you have other ideas for good ways to teach this function, please add your answer!  Edit: another good tactic is if someone knows of some problem (that's natural enough to formulate) where we do stumble across the totient function early on, but in fact the problem is so "deep" that even though its "purpose" is to introduce the totient function (in terms of why/how a mathematician would come up with such a definition), it's also a good springboard into harder number theory questions, kind of like in this thread: .


How can I use the expanded value of a shell variable in the name of another variable?

I'm starving trying to make the following thing work:  #!/bin/bash MARCOMIN=1 MARCOMAX=3 ENZOMIN=1 ENZOMAX=3 GIOVANNIMIN=1 GIOVANNIMAX=3 VALUEMARCO=12 VALUEGIOVANNI=4 VALUEENZO=12  for i in MARCO ENZO GIOVANNI; do         echo $$iMIN is $i\'s MIN         echo $$iMAX is $i\'s MAX         echo $VALUE$i is $i\'s VALUE done  exit 0   It doesn't writes macro as I'd like, though.  me@myhost:~$ bash test.sh 20341iMIN is MARCO's MIN 20341iMAX is MARCO's MAX MARCO is MARCO's VALUE 20341iMIN is ENZO's MIN 20341iMAX is ENZO's MAX ENZO is ENZO's VALUE 20341iMIN is GIOVANNI's MIN 20341iMAX is GIOVANNI's MAX GIOVANNI is GIOVANNI's VALUE   Obviously this is only one of my test. I tried many different ways of writing macros this way but I can't fix it. Found many similar questions here and on SO, but none matched my case.  bash -x test.sh follows:  + MARCOMIN=1 + MARCOMAX=3 + ENZOMIN=1 + ENZOMAX=3 + GIOVANNIMIN=1 + GIOVANNIMAX=3 + VALUEMARCO=12 + VALUEGIOVANNI=4 + VALUEENZO=12 + for i in MARCO ENZO GIOVANNI + echo 21466iMIN is 'MARCO'\''s' MIN 21466iMIN is MARCO's MIN + echo 21466iMAX is 'MARCO'\''s' MAX 21466iMAX is MARCO's MAX + echo MARCO is 'MARCO'\''s' VALUE MARCO is MARCO's VALUE + for i in MARCO ENZO GIOVANNI + echo 21466iMIN is 'ENZO'\''s' MIN 21466iMIN is ENZO's MIN + echo 21466iMAX is 'ENZO'\''s' MAX 21466iMAX is ENZO's MAX + echo ENZO is 'ENZO'\''s' VALUE ENZO is ENZO's VALUE + for i in MARCO ENZO GIOVANNI + echo 21466iMIN is 'GIOVANNI'\''s' MIN 21466iMIN is GIOVANNI's MIN + echo 21466iMAX is 'GIOVANNI'\''s' MAX 21466iMAX is GIOVANNI's MAX + echo GIOVANNI is 'GIOVANNI'\''s' VALUE GIOVANNI is GIOVANNI's VALUE + exit 0


How to get and store a coordinate y value so that it can be printed elsewhere?

Is it possible to get and store a specific y value from a plot coordinate, so that it can be printed somewhere else (for example inside a node)? \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.17} \usepgfplotslibrary{fillbetween} \begin{filecontents}{data-fake5.dat} x       y   1       0   2       3   3       1   \end{filecontents} \begin{document} \begin{tikzpicture}    \begin{axis}[ axis x line*=bottom, axis y line*=left,  ] \addplot[name path=myplot] table[x=x,y=y] {data-fake5.dat};  %\node at (1,1.5){\printy{myplot}{2}}; %this should print the y value of the plot 'myplot` associated with x=2, which is 3 \end{axis}   \end{tikzpicture}  \end{document}   desired result:


Is Morocco currently safe to visit despite the Ebola outbreak?

I'm travelling to Morocco over the Easter period, and while I am aware that the current Ebola outbreak is mainly in Guinea, Liberia and Mali, and would have to cross the Sahara to get to Morocco, is it wise for me to go to Morocco at this time?  What are some basic precautions I can take in the case that the Ebola virus travels to Morocco?


Intuitive Explanation of Bessel's Correction

When calculating a sample variance a factor of $N-1$ appears instead of $N$ (see this  ).  Does anybody have an intuitive way of explaining this to students who need to use this fact but maybe haven't taken a statistics course?


How to prove the trigonometric equality $\tan(\pi/7) \tan(2\pi/7) \tan(3\pi/7)= \sqrt 7$?

I want to prove this equality holds:  $$\tan\big(\frac{\pi}7\big)  \tan\big(\frac{2\pi}7\big)  \tan\big(\frac {3\pi}7\big)= \sqrt 7.$$  Please help me.  Thanks.


It might be a duplicate of this   But it's kinda different as $\lim f(x)$ and $\lim g(x)$ exists on $a$.   '' if $f(x) < g(x)$ for all $x$ and $\lim f(x)$ and $\lim g(x)$ exist on $a$, then $\lim_{x \to a} f(x) < \lim_{x \to a} g(x)$? ''  I can't think of any counter example, but I'm neither able to prove it. I'm a newbie in math.Please help!  Thanks in advance :)


Transit visa for 5 hours layover in Chicago (USA)

I am from India and I have Canadian student visa, i booked a ticket with British airways which has 2 layover 1 st in London and 2 nd in Chicago (USA). So ,do I need transit visa during the 5 hours layover in Chicago airport? My final destination is Toronto (Canada).


I have a custom post page like this:      <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args = array("post_type" => "post", "post_type" => "viaggi", "orderby" => "date", "order" => "DESC", "paged" => $paged, "posts_per_page" => 12); $loop = new WP_Query($args); while ($loop->have_posts()) {     $loop->the_post();     $thumb = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'gallery');     $url = $thumb['0'];     ?>  <article id="post-<?php the_ID(); ?>" class="col-lg-4 col-xs-12 ricette-box">     <?php do_action( 'estore_before_post_content' ); ?>
         <?php if ( get_theme_mod('estore_postmeta', '') == '' && get_theme_mod( 'estore_postmeta_date', '') == '' ) { ?>          <?php }         if ( has_post_thumbnail() ) { ?>             <?php the_post_thumbnail( 'estore-featured-image' ); ?>         <?php } ?>
     <?php         if ( is_single() ) {             the_title( '
', '
' );         } else {             the_title( '
', '
' );         }     ?>

         <a href="<?php echo esc_url( get_the_permalink() ); ?>"><?php the_time( get_option( 'date_format' ) ); ?>             <?php estore_entry_meta(); ?>
                 <?php the_excerpt(); ?>
                     <a href="<?php echo esc_url( get_the_permalink() ); ?>" class="btn"><?php esc_html_e( 'Read more', 'estore' ); ?>

      <?php do_action( 'estore_after_post_content' ); ?>
  <?php } ?>

  <?php  wp_reset_postdata();   ?>   I want to add numeric pagination. How to add?


Getting a NullPointerException when doing exact same thing but in another class

I want to create a play() method with Track in the method parameters but I can't do this in my controller class as the play is an action and actions can't have parameters (or it must be an ActionEvent).  So I thought of creating another class to apply play logic instead and just pass to this method in the new class instead of doing everything there.  @FXML private void play() {     play.setText("Pause");     Track selectedTrack = playingTable.getSelectionModel().getSelectedItem();      if (selectedTrack != null && selectedTrack != playingTrack) {         player.stopSong();         player = new TrackPlayer(selectedTrack);         playingTrack = selectedTrack;         player.playSong();     } else {         switch (player.getStatus()) {             case READY:                 player.playSong();                 break;             case PLAYING:                 player.pauseSong();                 play.setText("Play");                 break;             case PAUSED:                 player.playSong();                 play.setText("Pause");                 break;             default:                 System.out.println("Wtf?");         }     }     updateInfo(); }   This is my play() method now inside my controller class (which is working correctly). I want to change it so I can do the following  if(selectedTrack != null) {     manager.play(selectedTrack); } else {     System.out.println("Track not selected / null"); }   manager being another class which would have the following method  public void play(Track track) {     controller.setPlayTxt("Pause");      if (track != null && track != playingTrack) {         player.stopSong();         player = new TrackPlayer(track);         playingTrack = track;         player.playSong();     } else {         switch (player.getStatus()) {             case READY:                 player.playSong();                 break;             case PLAYING:                 player.pauseSong();                 controller.setPlayTxt("Play");                 break;             case PAUSED:                 player.playSong();                 controller.setPlayTxt("Pause");                 break;             default:                 System.out.println("Wtf?");         }     } }   However whenever I click on a song (that is not null) and press play I get a NullPointerException on the line manager.play(selectedTrack);  Why? I know that the object is not null, and have checks for it, and this is the exact same way I do it originally (which works) but when I change this to be a pass to another class I get NullPointerException.


Is it ever correct to say "Me and Jon are going to the movies"?


How to block any app from being installed?

My mom has an android tablet and she doesn't even know what a site is, her e-mail, or even the password of her facebook account. She's an average user. The internet is facebook in her eyes. She has no need for apps or anything, it's just, only, precisely facebook. All is facebook.  How can I completely disable installing apps in android so they can't be installed in any way or form, I mean, not by URL, not by clicking, not by app store, not even by another program. Just disable the entire thing altogether.  Doesn't need to be safe, have locks, passwords etc. I'm not trying to secure the device from intruders, attackers or robbers, I'm trying to secure it from its very own user.  Please help. I just had to remove two anti-virus apps that were opening adware pages when she tried to open facebook lite, and that's obviously a no-go, apps which she "had not installed." Clearly there's some voodoo going on here for them to just popup, or maybe she just did it unknowingly, but none of that's relevant. How can you just disable installs so this couldn't ever happen again?


What "Earth-Origin" animals exist in the canon Star Wars universe?

When I was a young teen, I really got into reading the few Star Wars novels that existed at that time.  After I exhausted the then current run of books (there were only about 5 or 6 of them), I decided to read the novelizations of the original trilogy.  I no longer own those novels so I can't look up the reference, but I recall that during the beginning of A New Hope, when Luke and Obi-Wan rode into Mos Eisley on Luke's land speeder, Lucas mentioned something of there being a "dog barking".  This always struck me as odd because this was a reference to an animal from Earth in a universe where clearly most creatures were completely unique.  After noticing the reference to a dog I then noticed on my next viewing of ESB that there was a snake on Dagobah.  This has made me curious for years.  What other Earth-based creatures have made their way into the "official" Star Wars universe and where do they appear?


import environment variables in a bash script

I set some environment variables in a terminal, and then run my script. How can I pull in the variables in the script? I need to know their values. Simply referring to them as $MY_VAR1 doesn't work; it is empty.


How is replaceable text shown in a terminal?

For example after doing apt-get update, it shows Reading package lists... 82% with the percentage changing in the same line.  How is that achieved? Is it possible to use it in a bash script?


summation and inequality induction proof

I have to use induction to prove the following inequality:  $\sum_{k=1}^{2^{n}} \frac{1}{k} \geq 1 + \frac{n}{2}$.  So the base case is $n=1$ and it's true because both sides will equal $\frac{3}{2}$.   If we assume $n=m+1$ we get   $\sum_{k=1}^{2^{m+1}} \frac{1}{k} \geq 1 + \frac{m+1}{2}$.  But I'm not sure how to prove that the LHS=RHS.  Is it true to say this:  $\sum_{k=1}^{2^{m}} \frac{1}{k} + \frac{1}{m+1} \geq 1 + \frac{m+1}{2}$?


Why does shifting the integration line from the real-axis not affect the integral $ \int_{-\infty}^\infty e^{-x^2} dx $?

I know that $$ \int_{-\infty}^\infty e^{-x^2} dx = \sqrt{\pi}, $$ and clearly this integral is invariant under translation along the real axis. But today I learned that $$ \int_{-\infty}^\infty e^{-(x+ik)^2} dx = \sqrt{\pi} $$ holds for any choice of constant $ k \in \mathbb{R}$, so we even have translation invariance along the imaginary axis. Why is that?


I need a regex that will match the following line:  {"httpStatus": "OK", "payload": {"status": "OK"}, "httpCode": 200}   but not  {"httpStatus": "OK", "payload": {"status": "OK", "config": {}}, "httpCode": 200}   So basically it should match the string if it not contains config  For checking if the string contains status the regex is:  (?=\"status\": \"OK\")


I have a question about a step in proving $(M^\perp)^\perp=\overline{M}$ where $M$ is a linear subspace of a normed vector space $E$. And $M^\perp=\{f\in E^*|\langle f,x\rangle =0\}$  This is the proof from Brezis book:  Proof: Assuming the other direction, show $\subset$ direction. Suppose there exists $x_0\in (M^\perp)^{\perp}$ such that $x_0\notin \overline{M}$. Then, Hahn-Banach says there exists a hyperplane that strictly separates $\{x_0\}$ and $\overline{M}$. Thus there are some $f\in E^*$ and $\alpha\in\mathbb{R}$ such that $$ \langle f,x\rangle <\alpha<\langle f, x_0\rangle, \forall x\in M$$  Since $M$ is a linear space it follows that $\langle f,x\rangle =0$(WHY??), for all $x$ and $\langle f, x_0\rangle >0$. Therefore $f\in M^\perp$ and consequently $\langle f, x_0\rangle =0$, a contradiction.  Can someone tell me why the place (WHY??) is true? I couldn't find out the line follows from the fact that $M$ is a linear space.  Thanks


Check if a process such as deletion or update is done through data Loader or any other application using apex

I have a trigger that will call a batch process if my data is updated or deleted.It is working well but the problem is that, when I try to delete my data using data loader, i've encounter and error saying."Attempted to enqueue too many concurrent batch". What I want is to detect if a deletion or update is done by data loader or other application that will process the data through batch. So far I tried to use the System.isBatch() but it seems it is not the solution. I still encounter the problem. What is the possible solution for this ? Please help.   Thank you...


What are the requirements for MAAS and OpenStack?

What is the minimum number of computers needed to install MAAS and OpenStack? Also, what are the hardware requirements for all nodes with OpenStack?


Wrong architecture or manufacturer - conflicting information

This is what I get from the set processor(Environment variable) command in 64-bit Windows 7:  PROCESSOR_ARCHITECTURE = AMD64 PROCESSOR_IDENTIFIER = Intel64 Family 6 Model 58 Stepping 9, GenuineIntel  And this is what I get in "System Information":  Processor: Intel(R) Core(TM) i3...  But how? What type of architecture and processor am I using?


Setting the PATH so it applies to all users, including root/sudo

The instructions in  work to set the PATH for all 'normal' users. However, if I do sudo -s and then printenv PATH the updated path is not shown. I've taken a look at for example , but this does not seem to make sense to me, perhaps as I'm from a Windows background. Is there any way to set the truly system-wide path, such that the entries are inherited by absolutely every process running on the system?


Prove the existence of a real number satisfying a property

Let $x_1, x_2, . .  , x_n$ real numbers from $[0, 1]$. Prove there is   $x \in [0, 1]$ so that $|x - x_1| + |x - x_2| + . . . + |x - x_n| =\frac n 2$     My attempt  Let $f:[0,1] \rightarrow R, f(x)=|x - x_1| + |x - x_2| + . . . + |x - x_n|$. Because $f$ continous, the image of $f$ is an interval. To prove $\exists x \in [0,1]$ so that $f(x)=\frac n 2$ it is enough to find two values $a,b \in [0,1]$ so that $f(a) \le \frac n 2 \le f(b)$. I failed to find these values.  Also, a solution without function continuity will be appreciated.


How do I find all n values for which the equation $\phi (n) = 8$ holds?

I've heard all kinds of different ways to solve this problem, yet haven't been able to apply them specifically to the number 8 (Worked fine for 6 for example). I'd love to see a well-explained solution, is possible. Thank you.


GNOME: supend on laptop lid close no longer works since 19.10 upgrade

I'm quite positive that this used to work flawlessly in 19.04 (and past releases) but no longer does after a release-upgrade to 19.10 (kernel 5.3.0-24, ThinkPad X1 Carbon gen 5 in case this matters).  I have the corresponding switch set in GNOME-Tweaks and have also attempted to manually edit /etc/systemd/logind.conf as suggested , namely uncomment and adjust the following lines, followed by a reboot:  $ grep -v '^#' /etc/systemd/logind.conf [Login] HandleLidSwitch=suspend HandleLidSwitchExternalPower=suspend HandleLidSwitchDocked=suspend LidSwitchIgnoreInhibited=yes   (strictly speaking, only the first one ought to be required but, just in case, I also added lines 2 & 3, as well as #4 for good measure...  Looking at the output of systemctl status systemd-logind, I see the following:  Dec 17 17:56:50 x1c5 systemd-logind[8959]: Lid closed. Dec 17 17:57:03 x1c5 systemd-logind[8959]: Lid opened.   So the lid events are correctly detected.  To rule out any issue with the suspend process itself, I have also set my power button to suspend in Settings->Power->Suspend & Power Button, for testing purposes.  Pressing the power button now results in this in the output of systemctl status systemd-logind (after a successful suspend-resume cycle):  Dec 17 18:13:58 x1c5 systemd-logind[8959]: Power key pressed. Dec 17 18:14:28 x1c5 systemd-logind[8959]: Delay lock is active (UID 121/gdm, PID 9215/gsd-power) but inhibitor timeout is reached. Dec 17 18:14:39 x1c5 systemd-logind[8959]: Operation 'sleep' finished.   Bottom line: lid events are detected correctly and suspend works flawlessly - but not on lid close...  Any idea how I can get the suspend on lid-close feature back to life?  I can of course use the workaround with the power button but it's a little too easy to forget and result in laptop overheating in bag etc...  --- edited to add ---  Got a little further courtesy of , although the issue isn't the exactly as described.  Here's a smoking gun:  $ systemd-inhibit --list --mode=block WHO       UID  USER      PID  COMM           WHAT                                                     WHY                                                         MODE  gdm       121  gdm       2231 gsd-power      handle-lid-switch                                        External monitor attached or configuration changed recently block gdm       121  gdm       2252 gsd-media-keys handle-power-key:handle-suspend-key:handle-hibernate-key GNOME handling keypresses                                   block user      1000 user      3017 gsd-media-keys handle-power-key:handle-suspend-key:handle-hibernate-key GNOME handling keypresses                                   block   This suggests that the lid close action is being blocked because "External monitor attached or configuration changed recently".  I do connect my laptop to a monitor using a USB-C cable but as I write this, it's been undocked and running on batteries for nearly 3 hours (GNOME settings only shows my laptop display as available).  However it looks like systemd or whichever component is responsible for this still incorrectly believes the external display is attached and - per the ticket - suspend isn't supported by GNOME in such scenarios...  Interestingly the gsd-power process (PID 2231) is owned by gdm rather than my UID.  Killing it restores the suspend-on-lid-close functionality.  Need to figure out why this process exists... When actually connected to external display, systemd-inhibit --list --mode=block reports a 2nd gsd-power process owned by the interactive user; which appears correct and sufficient.


How to ensure my software is not easy to pirate

I want to make my python program less pirateable. I know it's fruitless to make it entirely secure, but I want it to be at least somewhat easier than copying copying the installer and throwing it on piratebay.  I've looked into verifying the MAC address of the user, but that either requires them to run the software first, or to give me their MAC address to get the software.  I've also looked into spreading out the files after installation, but once again that only works if they don't just copy the installer  It's python, so it's not going to be hard to reverse engineer, and it's a desktop application, so it's going to be pirated. But a tiny amount of security will prevent the average user from just pirating it I hope.


Why every definition is an "iff"-type statement?

Suppose that we are trying to define a mathematical object $M$. The statement of the definition generally takes the form (or some of its equivalent variant),     A mathematical object is said to be $M$ $\color{red}{\text{if}}$ it satisfies some property or properties, say $P$.   It is said that the inclusion of "$\color{red}{\text{if}}$" in the definitions can be easily replaced by "$\color{blue}{\text{iff}}$". In other words, the above definition is equivalent to saying,     A mathematical object is said to be $M$ $\color{blue}{\text{iff}}$ it satisfies some property or properties, say $P$.   In Fraleigh's book on Abstract Algebra it says,        But I think that a definition is only an $\color{red}{\text{if}}$-type statement. Take for example the definition of a (Euclidean) triangle      A geometric object is said to be a triangle $\color{blue}{\text{iff}}$ it has three sides.   This definition includes two parts,     A geometric object is said to be a triangle if it has three sides.   and,     If a geometric object is a triangle then has three sides.   But the second part is clearly nonsense if we assume that we have exactly one definition of a triangle for in the second part we have to know what a triangle actually is and by our assumption the definition of a triangle is provided by first part.  So, my question is,     Why is every definition an "if and only if" type statement ?


How many ohm is the ADC port internal resistance of the atmega8?

I am trying to link a digital pin to a pad that's already wired to an ADC. I was wondering how many ohm the ADC port internal resistance is.


Why pointer to an abstract class doesn't invoke derived class member function when implement as following

Following, there is a Abstract class "Shape" and two derived classes "Rectangle" and "Circle" I am using Base class pointer to an object and initializing it to derived object.  Why the last one also prints "Rectangle"?  #include <iostream> #include <string>  class Shape { public:     virtual void show() = 0; };  class Rectangle : public Shape { public:     void show() {         std::cout << "Draw Rectangle" << std::endl;     } };  class Circle : public Shape { public:     void show() {         std::cout << "Draw Circle" << std::endl;     } };  int main() {      Shape *s = new Rectangle();     s->show();      Circle c;     *s = c;      s->show();      return 0; }   Both prints "Rectangle". Why the last one doesn't print "Circle"  But if I do  Circle *c = new Circle(); s = c; s->show();   Then it prints "Circle"


How can I get LaTeX to warn about unreferenced figures and unused labels in general?

When writing documents, I consider it to be necessary that all figures and tables are referenced (\ref) in the text, whether or not I've remembered to \label them. LaTeX does not currently warn if a figure or table is not referenced. Is there a way to ensure that this is flagged up as a warning?  Note that I am specifically concerned about figures and tables, not chapter or section headings; it will be no good looking just at \labels that don't have an associated \ref.  In other words, it should report boo and not report bla in the following MWE:  \documentclass{article} \begin{document} \section{BLA}\label{bla} \section{BOO}\label{boo} In Section~\ref{bla} we do something. \end{document}


I read this book about 10 years ago, in French, but I don't know if it was a translation or the original language.  The story takes place in a big city, where each district is painted in a different colour. And the colour depend of the wealth of the people living in it. For example, the poorest peoples lives in the Grey district, in small appartments. But richest peoples lives in the Yellow district (I am not really sure of this colour...), in big villas.  About the story in itself, I remember that we were following a teenager (male I think but not sure), from the Grey district. He ends up going into the Yellow district and encounter another teenager (female I think but not sure). At some point they had to ran away, and went in a large underground passage, and maybe went out of the city. And maybe they encountered a big monster at some point, but I can't tell for sure.  Anyone know about this book?


Why do we limit the definition of a function?

Why do we limit the definition of a function to only one y per x?  For example, the square root function.  We only allow the principal square root of a number, rather than, say, the square root of 9 being both 3 AND -3.  Why is this?  Thanks!


I am solving a problem about probability and I need to show this inequality: $$p^2q+q^2r+r^2p+pq^2+qr^2+rp^2\geq 6pqr,$$ where $p,q,r\in[0,1].$  I tried writing it as  $$p^2(q+r)+p((q+r)^2-8qr)+qr(q+r)\geq 0,$$ or equivalently, $$p^2(q+r)+p(q+r-2\sqrt{2qr})(q+r+2\sqrt{2qr})+qr(q+r)\geq 0.$$ Since $p,q,r\in[0,1]$, the only thing that remains to check is that $q+r-2\sqrt{2qr}$ is non-negative, but this need not be true.  I then tried a second approach:  I tried using multivariable calculus to find the minimum of  $$f(p,q,r)=p^2q+q^2r+r^2p+pq^2+qr^2+rp^2-6pqr,$$ but then I get $$Jf(p,q,r)=\begin{pmatrix}q^2+r^2+2p(q+r)-6qr\\ p^2+r^2+2q(p+r)-6pr\\ p^2+q^2+2r(p+q)-6pq\end{pmatrix},$$ and solving $Jf=\mathbf{0}$ seems quite difficult too.   Question: Can anyone help with either of the above approaches, or if not, give a hint on how to solve this problem?


Why is the derivative of sine function is only cosine function?

Is there any other way to prove it rather than proving it using the formula by definition ?


How can buoyancy lift an object if the object is resting on the bottom?

The situation I am thinking about is that, for example, lets say that there is a block that weighs 10N outside of water, when it is put into water its apparent weight is 2N. From this it can be inferred that the buoyant force is 8N. So if the buoyant force is less than the weight, I would think that the object is completely submerged, resting on the floor of the container. Is this correct? and if it is how can there be a buoyant force, when there is no water below the block to be pushing it up if it is resting on the bottom of the container


For what values of $a$ the series $\sum \limits_{n=1}^{\infty} \frac{a^n}{n^\sqrt n}$ converges?

It's clear that the series converges for $|a| \leq 1$ but what about $|a|>1$?


I have a game which uses a timer. I want to make it so the user can select a button and it pauses that timer and when they click that button again, it will unpause that timer. I already have code to the timer, just need some help with the pausing the timer and the dual-action button.  Code to timer:  -(void)timerDelay {      mainInt = 36;      timer = [NSTimer scheduledTimerWithTimeInterval:1.0                                          target:self                                        selector:@selector(countDownDuration)                                        userInfo:nil                                         repeats:YES]; }  -(void)countDownDuration {      MainInt -= 1;      seconds.text = [NSString stringWithFormat:@"%i", MainInt];     if (MainInt <= 0) {         [timer invalidate];         [self delay];     }  }


Upgrade python from 3.5.2 to 3.6.2 in Ubuntu 16.04 LTS

How to upgrade python from 3.5.2 to 3.6.2 via terminal?


I'm a little bit confused! what is the domain of this function:  $$ \ln(x) ^{ \ln(x) } $$  this function, in fact, is:  $$ \exp(\ln(\ln(x))\cdot\ln(x)) $$  so the domain would be: $$ x>1 $$  But: $x$ can "also" take on the value (for example) :$$\sqrt[3] {e^{-1}}$$  then there would be some other numbers, not included in $x>1$, in the domain of the function.


What does this bag with a checkmark on it next to Roblox usernames mean?

This is really confusing me. Please, can someone tell me what this means? Notice how to the left of some of these usernames is a checkmark symbol.


Is there a way to get the tests inside of a TestCase to run in a certain order? For example, I want to separate the life cycle of an object from creation to use to destruction but I need to make sure that the object is set up first before I run the other tests.


Issue when promoting a second server as domain on R2 2008

I'm in an odd situation here.  I've upgraded my network to a 2008 domain from a 2003 with out any issue, this works fine and all the FSMO are in one DC,  I was about to install a second domain on a 2008R2 and this error is coming up again and again.  I The problem is I keep getting an area telling me that I need to run adprep /domainPrep /forestPrep, but when I run it on the first DC, it tells me this has already been run and updated and it is aborted. Does anyone have any ideas on why I can't add a Server 2008 machine as a domain controller?


Finding the remainder of $11^{2013}$ divided by $61$

How am I suppose to find the remainder when $11^{2013}$ is divided by $61$?


I have 3 queries:  SELECT `update`.`id` AS `id`, `update`.`type` AS `type`, `update`.`date` AS `date`, `update`.`like` AS `like`, `update`.`dislike` AS `dislike` FROM `updates` AS `update` WHERE `type` = '1' ORDER BY `date` DESC LIMIT 1  SELECT `update`.`id` AS `id`, `update`.`type` AS `type`, `update`.`date` AS `date`, `update`.`like` AS `like`, `update`.`dislike` AS `dislike` FROM `updates` AS `update` WHERE `type` = '2' ORDER BY `date` DESC LIMIT 1 (1)  SELECT `update`.`id` AS `id`, `update`.`type` AS `type`, `update`.`date` AS `date`, `update`.`like` AS `like`, `update`.`dislike` AS `dislike` FROM `updates` AS `update` WHERE `type` = '3' ORDER BY `date` DESC LIMIT 1 (1)   I need to get last date for each type. How can I get it in one query?  Thank you.


Programmatically display a window in the secondary monitor in Mac

I am writing a Cocoa application with multi monitor support. It has a window controller which loads a UI from a NIB file. I would like this window to appear on the secondary monitor rather than the primary one. Is it possible to achieve this programmatically ? Please note that it is not a full screen window, and the window does not have a menu bar.


How To Group Records By Value In A Specific Field?

I have a List of records of type abc__c. abc__c is a custom object. The record has a field called code__c. What I am trying to accompolish is to group the records in the list based on the code__c.  For example the list might have :  Code__c     abc__c record 30       (Record 1) 40       (Record 2) 40       (Record 3) 50       (Record 4) 30       (Record 5)   I want to group these records based on Code__c in a Map. There could be any number of code__c which is populated dynamically. It is not static. how can I loop through the list and store the records as a list for a particular code__c(Id) in Map?


Group Policy Objects stopped applying to most security groups

I have a Server 2008 R2 Domain with quite a few Group Policy Objects that should be applied to various OUs and security groups (Using security filtering).  I got reports from users that they were missing certain settings and things like mapped drives. When I started investigating the problem, I found that almost every single GPO in our domain has simply stopped being applied.  There are a few GPOs (Like the default domain policy) that are still being applied, and it looks like the one thing they have in common is that these policies are all applied to the 'Authenticated Users' builtin group. Whereas all other GPOs use security filtering on various other security groups.  I have run lots of RSOP tests (Planning and Logging) which both show that only the GPOs applied to 'Authenticated Users' are being run. The other GPOs don't even show up under the "GPOs that were not applied ..." section of gpresult. I have checked permissions, GPO inheritance, and a few other basic but common GPO problems, all of which seem fine. I tried creating a some brand new GPOs, and applying them to brand new security groups, however these were also not applied.  I have not noticed any other issues with Active Directory, authentication against these security groups for other functions (such as file permissions) all seem to be working as expected.   I'm at a total loss to explain why these GPOs just suddenly stopped getting applied, for no apparent reason. Does anyone have any ideas what might be going on, or how to continue troubleshooting?


Does anyone else want a way to flag an interesting question?  I'm thinking of a case where a new question comes up on the front page of a site, I can't answer it, BUT I would be interested in the answer.  Especially on the more general interest sites than Stack Overflow where you are browsing general questions rather than looking for specific answer to an immediate problem. Since it is likely to disappear from the page before being answered, all I can do is bookmark it in my browser or post a pointless comment "to follow".  Propose a way to flag an interesting question and have new activity on this question show up on my account page in the same way as an activity on a question/answer I have written.


Reinstalled windows 7 now can't get access to dual boot

I had a dual boot setup with a Debian based distro (crunchbang) as primary and win 7 also installed. Recently I reinstalled win 7 on it's existing partition but now the boot loader is gone and win 7 starts automatically.  How do I get the boot loader back to select my is at boot? Think it was grub running previously. I don't want to reinstall crunchbang if at all possible.


I have added a  via:  Runtime.getRuntime().addShutdownHook(myShutdownHook);   It works fine normally, but not when I click the red stop button in Eclipse. Is there a way to make the shutdown hook be called in Eclipse?


Probability distribution in the coupon collector's problem

I'm trying to solve the well known Coupon Collector's Problem by explicitly finding the probability distribution (so far all the methods I read involve using some sort of trick). However, I'm not having much luck getting anywhere as combinatorics is not something I'm particularly good at.   The Coupon Collector's Problem is stated as:  There are $m$ different kinds of coupons to be collected from boxes. Assuming each type of coupon is equally likely to be found per box, what's the expected amount of boxes one has to buy to collect all types of coupons?  What I'm attempting:  Let $N$ be the random variable associated with the number of boxes one has to buy to find all coupons. Then $P(N=n)=\frac{|A_n|}{|\Omega _n|}$, where $A_n$ is the set of all outcomes such that all types of coupons are observed in $n$ buys, and $\Omega _n$ is the set of all the possible outcomes in $n$ buys. I think $|\Omega _n| = m^n$, but I'm not even sure about that anymore, as all my attempts so far led to garbage probabilities that either diverged or didn't sum up to 1.


How can i analyse this multi-stage transistor amplifier?

i am supposed to measure the node voltages around the circuit and then determine the current flowing in the nodes as well as transistors? Can you please tell me the way of doing it .. appreciate it a lot.


How can I restrict a user from executing sudo -su? I.e., disable this -su option for sudo allowed users.


I've taken a look at the related questions , , etc. This case seems slightly different.  A user has asked the same question twice with slightly different wording, but there is absolutely no extra information. The newer question clearly says:     Sorry for the duplicate question as I am not getting any reply.   How do we handle this case? The user seems fairly well-established (>500 rep). Do we just mark as dupe or is there a specific mod request? Do you see an opportunity to educate?  Here are the questions:


How to pass parameters in batch file and zip the file using 7z.exe?

I need to create a batch file as per below requirements  1) pass path1 & path2 while running the batch file  exl: testrun.bat E:\ERP\test1.txt E:\ERP\header.txt  2) Need to store these command line paths values in batch file  exl: var1=E:\ERP\test1.txt var2=E:\ERP\header.txt  3) zip the path1 using PKZIPW.exe or 7z.exe and create new o/p zip file  exl: 7z.exe u -tzip E:\Erp\Test1.zip var1  4) copy path2 in newly created o/p file  exl: copy /b var2+test1.zip E:\Erp\Final_output.zip


Trying to understand relativistic action of a massive point particle

I got badly lost in derivation of relativistic formulas for energy and momentum.  I stumbled upon relativistic action as follows (which should explain relativistic motion of a classical particle):  $$ S = \int Cds=C\int_{t_i}^{t_f}\sqrt{c^2-(x')^2}dt $$  Where $C$ is some constant (depends on what kind of physics we put in equation) and $s$ is relativistic interval. Later on Lagrangian $$ L(x')\equiv C\sqrt{c^2-(x')^2} $$ is used in derving relativistic energy and momentum.  I am familiar with Lagrangians and symmetry rules which connect energy and momentum to Lagrangian formalism. What I do not understand is this action - weren't action sum over time? Why all of a sudden it is sum over relativistic interval?


I am logging in to a windows 7 enterprise machine on a corporate network.  Occasionally when I rdp in to the machine the screen is entirely blank.  This is specific to the operator id.  If I log in with another user id the screen appears normally.  I have noticed that if I don't quit the remote session and try to log in from another machine (bumping first connection) the screen will usually go black.  I have also noticed that network issues can initiate the problem, but this is rare.  I have seen the rdp - reconnecting icon flash and than the screen go black.  Any ideas on what can be causing this problem?  One other note: processor utilization spikes to about 50% (1 core) when the screen goes black.


I was wondering if there is a way to export in DXF from QGIS (version 3.4.4) this type of line (The one with the "E" as a pattern).     Here is how the line was created    Currently, when I export this type of line, the symbols are not kept and the result is two superposed polylines: one which is the green polyline and the other which is a black polyline with the same thickness as the size of my symbols "E".


I have function like this (got it form some website long ago):  function flv2mp3() {     ffmpeg -y -i "$1" -acodec libmp3lame "$(echo -n "$1" | sed -e 's/\.[^\.]*$//').mp3" }   and I'm trying to call that function in loop:  find . -name 'Rage*' -not -name '*.mp3' -print0 | \ while read -d '' -r file; do    flv2mp3 "$file"; done   but got wierd result, it seems that it's after first invocation I 've got something like this:  stream #1:   keyframe=1   duration=0.023   dts=94.923  pts=94.923   size=388 stream #1:   keyframe=1   duration=0.023   dts=94.946  pts=94.946   size=381  Enter command: <target>|all <time>|-1 <command>[ <argument>]   and it waiting for input, what's going on? I can call flv2mp3 function without the loop just fine and it covert video to mp3.  I've also tried to put this:  flv2mp3 "$(echo -n $file | sed 's%./%%')"   because the files have ./ at the beginning but got the same results.


SQL comma delimited list as a single string

In our business we have a main base account and then subordinate accounts under the baseaccount. 1.)  How do I get all the accounts into a single column including the base account (comma delimited)?  I've used this code before on other datasets and it works great.  I just can't figure out how to make this work with all the multiple joins.      SELECT DISTINCT     A.acctnbr as baseacctnbr,          STUFF((SELECT ', '+c1.ACCTNBR FROM [USBI].[vw_FirmAccount] a1     inner join [USBI].[vw_RelatedAccount] b1 on a1.firmaccountid = b1.basefirmaccountid      inner join [USBI].[vw_FirmAccount] a2 on a2.firmaccountid = b1.relatedfirmaccountid     inner join USBI.vw_NameAddressBase c1 on b1.relatedfirmaccountid = c1.firmaccountid         where c1.AcctNbr = c.ACCTNBR         FOR XML PATH ('')),1,1, '') AS ALLACCTS  FROM [USBI].[vw_FirmAccount] a     inner join [USBI].[vw_RelatedAccount] b on a.firmaccountid = b.basefirmaccountid      inner join [USBI].[vw_FirmAccount] a1 on a1.firmaccountid = b.relatedfirmaccountid     inner join USBI.vw_NameAddressBase c on b.relatedfirmaccountid = c.firmaccountid  where a.acctnbr = '11727765'   and c.restrdate <> '99999999'   and c.closerestrictind <> 'c'   and c.iscurrent = '1'   and b.iscurrent = '1'   My Output:    I would like to see the comma delimited list like this: 11727765, 11727799, 11783396, 12192670  I've gone through all the other questions on adding data to a single string and I can't find a solution here.  Not a duplicate.


I am confused as to what the sizeof function returns.    Suppose I enter the following into a program for sizeof, and this is what is returned:   sizeof(char) ==  1 sizeof(int) == 4 sizeof(float) == 4 sizeof(long) ==  8 sizeof(double) == 8 sizeof(void *) == 8   sizeof Pointer is 8. So if I malloc a long array:  long *array = (long *)malloc(64)   Would this sizeof() inserted into the malloc of my long array be equivalent?  long *array = (long *)malloc(8*sizeof(long))   Now if I have a struct:  typedef struct treenode {     struct treenode *left;     struct treenode *right;     void *content; } Treenode;    And I run sizeof(Treenode), do I add all the elements of the struct together?     Pointer + Pointer + void * = 8 + 8 + 8 = 24   I tried running this in a program, however I get sizeof(Treenode) to return 12.  I am also wondering why when I create a new struct like this:    typedef struct country {     char city[40];     int population;     int rank; }   and try to malloc(sizeof(country *)) only 8 bytes are allocated instead of the bytes of the struct.    Finally when I do sizeof("Korea"), why is my return value 6 and not 5? Should it not be 5 because there are only 5 chars in the string?