Let a data set like this:         |   Attribute1     Attribute2    Attribute3 -------------------------------------------------- Obs_1  |        1,00           10,00    4500,00 Obs_2  |        1,10           80,00    3200,00 Obs_3  |        0,90          137,00    95000,00 …      |        …              …        … Obs_100|        1,05          -65,00    17000,00   As you can see, attributes have different ranges; furthermore, their summary statistics would likely return very different distributions.  Now let you want to apply clustering via K-means: how can this affect final result? If you imagine a 3D space with data points, coordinates belonging to Attribute1 are massed over $x$-axis, while those belonging to Attribute3 are likely to be strewn over $z$-axis because of very different scale.  My guess is that this overweights Attributes3 when it comes to minimize Euclidean distances to find cluster means: I guess that K-means finds out that about every Obs_i falls in the same cluster according Attribute1, therefore it finds out that Attribute3 is the real discriminant that should be chosen to create clusters.  My question: if my guess is correct, does this mean that some form of standardization should be applied before K-means? Standard score seems a good choice.

What are the best (recommended) pre-processing steps before performing k-means?


I use last H2 (current master) and Hibernate 5.14.14 as JPA provider. I have the following column in table:  ID INT NOT NULL AUTO_INCREMENT   and the following field in entity:  @Column(name = "ID") @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer id;   And this is my code:  //POINT A entity.getId() = null entityManager = entityManagerFactory.createEntityManager(); entityManager.getTransaction().begin(); entityManager.persist(entity); entityManager.getTransaction().commit(); //POINT B entity.getId() = null.   My question - at point B according to JPA specification entity.getId() must return the value that database (H2) generated for this column (I mean next ID for the row) or null? I need to know, why I have null at point B - is the problem in H2/Hibernate or in my understanding of JPA.

Is it possible to use a DB sequence for some column that is not the identifier/is not part of a composite identifier?   I'm using hibernate as jpa provider, and I have a table that has some columns that are generated values (using a sequence), although they are not part of the identifier.  What I want is to use a sequence to create a new value for an entity, where the column for the sequence is NOT (part of) the primary key:  @Entity @Table(name = "MyTable") public class MyEntity {      //...     @Id //... etc     public Long getId() {         return id;     }     //note NO @Id here! but this doesn't work...     @GeneratedValue(strategy = GenerationType.AUTO, generator = "myGen")     @SequenceGenerator(name = "myGen", sequenceName = "MY_SEQUENCE")     @Column(name = "SEQ_VAL", unique = false, nullable = false, insertable = true, updatable = true)     public Long getMySequencedValue(){       return myVal;     }  }   Then when I do this:  em.persist(new MyEntity());   the id will be generated, but the mySequenceVal property will be also generated by my JPA provider.  Just to make things clear: I want Hibernate to generate the value for the mySequencedValue property. I know Hibernate can handle database-generated values, but I don't want to use a trigger or any other thing other than Hibernate itself to generate the value for my property. If Hibernate can generate values for primary keys, why can't it generate for a simple property?


Right now I do a netstat -n | grep 3306 and nothing come. Beside I try to connect using:  $ mysql -h127.0.0.1 -u root -p Enter password:  ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (61)   to connect and see the error below. Even so, when I use:  $ mysql -hlocalhost -u root -p   no problem at all to connect to the server.  All this indicated me that MySQL Server installed the official installer on OS X 10.10 Yosemite, not allow networks connection to the server. How I enable that feature?  EDIT TO MAKE A POINT WY IS NOT A DUPLICATE QUESTION  Suggestions for solve this problem can be found in a lot of places like , but none of those solutions worked for me. I will explain what I did, so MySQL on OS X gurus can suggest new things ;)   I install MySQL following  Copy sample of my.cnf   sudo cp /usr/local/mysql/support-files/my-innodb-heavy-4G.cnf /etc/my.cnf    I can stop and start the service using the   I tested without success:  :     Just comment out bind-address= altogether. When you do that, it will   bind to all addresses. Also make sure that you don't have   skip-networking enabled in your my.cnf.   I tested with bind-address comment out as well as skip-networking comment out. I tested with bind-address = 127.0.0.1 and with bind-address = 192.168.1.77 too.  I really don't what else to do. I'm testing that MySQL server is not listening to any TCP port using two commands:   netstat -n | grep 3306, showing nothing. mysql -h 127.0.0.1 -u root -p and mysql -h 192.168.1.77 -u root -p, receiving Can't connect to MySQL server on... error   Any Help?

In my Ubuntu's /etc/mysql/my.conf, I have:  bind-address = 192.168.2.20  # My external IP   It works fine from remote, but when I want to connect locally,  says: java.net.ConnectException: Connection refused at com.mysql.jdbc.StandardSocketFactory.connect.  So when I want to work locally, I change my.cnf to:  bind-address = 0.0.0.0   And it starts working locally, but then it doesn't work from remote anymore.  How to make MySQL accesible both from remote AND local?


Whenever I create a new file in my home directory the same file also appears on my desktop, when I remove the file from the desktop, the same file also get removed from my home directory. What can I to do to fix this issue?

Files in my SSD get duplicated on my Desktop. When I delete any folder/file it gets automatically deleted from the second location (Home) and when I create a folder in any of the locations it gets created in both places.  Take this screenshot for reference:    I am running Ubuntu 19.04 LTS.


What is the best practice to have a column header alignment, should it be left or center aligned? On click of the column header the columns can be also sorted. Numeric values will be right aligned by default.

In a grid structure, I understand you should right-align numbers in the cells.  Should you also right-align the headers for these columns?


lets say I have a list [1,1,1,1].  I want to iterate over all the possible combinations while every index of the list must contain a number from 1 to n.  in other words, i want to make a for loop that will go over all the combinations.  like: [n-35, n-5, 1, n], [1, 1, 1, n], [n, 1, n, n-19]. I hope you get the idea.  does anyone has any idea how to do this?

I have a list with 15 numbers in, and I need to write some code that produces all 32,768 combinations of those numbers.   I've found  (by Googling) that apparently does what I'm looking for, but I found the code fairly opaque and am wary of using it. Plus I have a feeling there must be a more elegant solution.  The only thing that occurs to me would be to just loop through the decimal integers 1–32768 and convert those to binary, and use the binary representation as a filter to pick out the appropriate numbers.   Does anyone know of a better way? Using map(), maybe?


I want to upload files to my servers at Digital Ocean and AWS. I can do that via the terminal using scp or sftp, but I want to automate this and do it in Python or any other programming language. In case of Python, how can I upload a file to a server in high level, should I use sftp client? Any other options?

I'm working on a simple tool that transfers files to a hard-coded location with the password also hard-coded.  I'm a python novice, but thanks to ftplib, it was easy:  import ftplib  info= ('someuser', 'password')    #hard-coded  def putfile(file, site, dir, user=(), verbose=True):     """     upload a file by ftp to a site/directory     login hard-coded, binary transfer     """     if verbose: print 'Uploading', file     local = open(file, 'rb')         remote = ftplib.FTP(site)        remote.login(*user)              remote.cwd(dir)     remote.storbinary('STOR ' + file, local, 1024)     remote.quit()     local.close()     if verbose: print 'Upload done.'  if __name__ == '__main__':     site = 'somewhere.com'            #hard-coded     dir = './uploads/'                #hard-coded     import sys, getpass     putfile(sys.argv[1], site, dir, user=info)   The problem is that I can't find any library that supports sFTP.  What's the normal way to do something like this securely?    Edit:  Thanks to the answers here, I've gotten it working with Paramiko and this was the syntax.  import paramiko  host = "THEHOST.com"                    #hard-coded port = 22 transport = paramiko.Transport((host, port))  password = "THEPASSWORD"                #hard-coded username = "THEUSERNAME"                #hard-coded transport.connect(username = username, password = password)  sftp = paramiko.SFTPClient.from_transport(transport)  import sys path = './THETARGETDIRECTORY/' + sys.argv[1]    #hard-coded localpath = sys.argv[1] sftp.put(localpath, path)  sftp.close() transport.close() print 'Upload done.'   Thanks again!


If I push a body with f =5N.The body also exerts a force of 5N on me(Action reaction pair).If the resultant is zero , how does the body move at all.

Given Newton's third law, why is there motion at all? Should not all forces even themselves out, so nothing moves at all? When I push a table using my finger, the table applies the same force onto my finger like my finger does on the table just with an opposing direction, nothing happens except that I feel the opposing force. But why can I push a box on a table by applying force ($F=ma$) on one side, obviously outbalancing the force the box has on my finger and at the same time outbalancing the friction the box has on the table? I obviously have the greater mass and acceleration as for example the matchbox on the table and thusly I can move it, but shouldn't the third law prevent that from even happening? Shouldn't the matchbox just accommodate to said force and applying the same force to me in opposing direction?


I'm using the package:  \usepackage[acronym]{glossaries}   and defining them as:  \newacronym{abs}{ABS}{Agent-Based System}   and calling it using:  \gls{abs}   But is there any way to not list the acronym in the \makeglossaries section if the acronym only appear once? If they only appear once I still want it to work normally in the document (e.g., for the text "Agent-Based System" to appear) but I don't necessarily want to create an acronym for it.   I've found this answer which gets me half way to what I want, but acronym still shows up in the \makeglossaries.

I'm writing a paper where I have a lot of acronyms. Some are mentioned all the time whereas others only a few. I read that it is possible to create a new glossary and to place all the acronyms that I don't want to show in that list.  I was wondering, though, if there is a way to automate the addition or exclusion of acronyms to the list that is shown based on how often they're used. For example let's say I define  \newacronym{am}{AM}{Additive Manufacturing} \newacronym{osrx}{OSIRIS-REx}{Origins, Spectral Interpretation, Resource Identification, Security, Regolith Explorer}   and two lists, shown_acronyms and hidden_acronyms. In my text I use \gls{am} 10 times whereas \gls{osrx} only twice. Is there a way to make Latex check how many times each one is used and add them to the appropriate list when compiling the document?


Let be $P_k = \{n | n = p_1 \cdot \ldots \cdot p_k, p_i = \text{prime numbers not necessary different} |\}$  $P_1 = \text{set of primes }$, $P_2 = \text{integers with exactly two primes factors}$, ....  We know that $|\{n \in P_1, n \leq x \}| = \pi(x) \sim x/\log x$-.   Is there any approximation for $$ | \{ n \leq x | n \in P_k \} | = |\{ n \leq x | n = p_1 \cdot \ldots \cdot p_k, p_i = \text{prime numbers not necessary different}\}|$$

This is my first question.   Let $a_1, a_2,\ldots, a_k$ be natural numbers $\leq n$ with $m$ prime factors.  Let $p_1, p_2, \ldots, p_r$ be the prime numbers $\leq n$.   Let $$C_{m,n} = \frac{\sum_{i=1}^{k}a_i}{\sum_{i=1}^{r}p_i}$$ Does the following limit exist when $m\geq 2$? Obviously, when $m=1$,  $C_{1,n}=1$.  $$\lim_{n\to \infty} C_{m,n}$$  I have some guesses but not defendable enough.  My best,  The FM.


How do I put an micro SD card on an LG phone as internal storage.

I recently upgraded to 6.0.1 Marshmallow on my Galaxy S5 and I would like to adopt an SD card as internal storage.  However, there is no option to do this.  When I format the SD card, there is no "Internal" option, only a "Portable" option.      I am using this SD card:    I have tried formatting the SD card in windows, deleting the partition in windows, and even wiping the parition in windows.  But Android always wants to add it was portable storage.    How can I force Android to add this as internal storage?  EDIT: According to this article, .  So it's likely the S5 doesn't support adoptable storage either.  I'm looking for a way to enable it using the adb command line if possible now.


I am new to Linux and Ubuntu. I installed the latest Ubuntu LTS 14.04.3 over Virrtualbox version 5.0.12. The problem is I cannot get proper resolution. It is just 800x600 default and I want to set it to 1920x1024 but am not able to do so. The resolution option in display setting is disabled. It might be some basic setting but since I am new I don't know. Can somebody help me out? I also don't see auto resize Guest Display as active in view settings..

I am running Ubuntu 14.04 from Windows, using virtualbox 5.0. I tried several options to make size of Ubuntu in virtual box larger, but none helped so far.   I am using latest virtual box with latest guest add on installed. sudo apt-get install virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11 I went to Ubuntu 'software and Updates' and made sure that under 'Additional Drivers' tab, 'using x86 visualization solution...' is active. In virtualbox window, under view->virtual screen 1, all 'resize to' options are disabled.   None of these options helped. This is frustrating. Any comments or help? Can the problem be I am using 64 bit system? Does this problem occurs in earlier/later versions? If not, please suggest a 'good' version of Ubuntu for virtualbox.


Do spells learned naturally persist after transmigration?  By standing next to a pupil, a master gets access to all spells the pupil has. By leveling that spell from 0 to 1, the master gets it "permanently". Will the master still have that spell after transmigration?

I'm mainly asking this for Disgaea: Afternoon of Darkness, given I have enough Mana to reincarnate a character into 4 different types of Mages (Green, Blue, Red, Star), a Cleric and then a Warrior, would the Warrior have all the spells learned from the previous classes?


Let $R$ be a ring and $I$ an ideal of $R$, and let $\phi : R\longrightarrow R'$ be a ring homomorphism.   Studying by myself, I have a conjecture the following: $$R/I \cong \phi[R]/\phi[I].$$ This formula is such a beautiful result. But, I found the error when the homomorphism is not one-to-one. So, I want to modify this formula as possible.   My trial is the following.  First, assume the homomorphism $\phi$ is one-to-one. But, this revision may be useless because its assumption is too strong.  Second, in order to use the first isomorphism theorem, if $\psi : R\longrightarrow \phi[R]/\phi[I]$ is a canonical homomorphism, then the modification of our formula is $R/\ker\psi \cong \phi[R]/\phi[I]$.   Except the above modifications, do you have another modification? Please let me know!

Let $\phi: R \to S$ be a surjective homomorphism. Prove that $\frac{R/ \ker \phi}{(\ker \phi + J)/ \ker \phi} \cong \frac{S}{\phi(J)}$ for an ideal $J$ of $R.$  Obviously, $S \cong R/ \ker \phi$(first isomorphism theorem) and $\phi(J)$ is an ideal of $S$, since $\phi$ is surjective( $\forall s \in \phi(J), s = \phi(j)$ for some $j \in J, \forall s' \in S, s' = \phi(r)$ for some $r \in R$, so $ss' = \phi(j)\phi(r) = \phi(jr) \in \phi(J)$, and $ss' = \phi(r)\phi(j) = \phi(rj) \in \phi(J)$ ).  However, I'm having trouble with going on. If it's important, I mean a unitary ring by a ring.


I am leetcoding, when doing recursion, I used to define an internal function which does the recursion job and some variables in the outer function. like this: def recur(root):   res = []      def bt(node):     # specific recursive job in this function     # and modify outer res        bt(root)   return res  This writing style always works but today when I want to define a variable out the inside function like this: class Solution:     @staticmethod     def is_balanced(root):         fla = True          def post_tr_verify(node):             if not node or not fla:                 return 0             left = post_tr_verify(node.left)             right = post_tr_verify(node.right)             if abs(left - right) > 1:                 fla = False                 return 0             return max(left, right) + 1          post_tr_verify(root)         return fla  it reminds me 'UnboundLocalError: local variable 'fla' referenced before assignment', I fixed it by add one sentence inside the post_tr_verify function: nonlocal fla. But I still can't figure out why my writing style doesn't work this time. Why this error comes? My previous writing recursion example: class Solution:     @staticmethod     def permute(nums):         cur, res = [], []         print(id(res))          def bt(li):             if li and len(li) == len(nums):                 res.append(cur[:])                 print(id(res))                 return             for ele in nums:                 if not li:                     cur.append(ele)                     bt(cur)                     cur.pop()                 elif ele not in li:                     cur.append(ele)                     bt(cur)                     cur.pop()          bt(cur)         return res  if __name__ == '__main__':     so = Solution()     print(so.permute([1, 2, 3]))  The running result of this snippet shows the res has been successfully referenced since they shown the same id value. Why the fla one doesn't work?

The following code works as expected in both Python 2.5 and 3.0:  a, b, c = (1, 2, 3)  print(a, b, c)  def test():     print(a)     print(b)     print(c)    # (A)     #c+=1       # (B) test()   However, when I uncomment line (B), I get an UnboundLocalError: 'c' not assigned at line (A). The values of a and b are printed correctly. This has me completely baffled for two reasons:   Why is there a runtime error thrown at line (A) because of a later statement on line (B)? Why are variables a and b printed as expected, while c raises an error?   The only explanation I can come up with is that a local variable c is created by the assignment c+=1, which takes precedent over the "global" variable c even before the local variable is created. Of course, it doesn't make sense for a variable to "steal" scope before it exists.  Could someone please explain this behavior?


Let $A, B$ be subsets of a metric space $X$. If $A$ is compact and $B$ is closed, show that the distance between $A$ and $B$ is achieved.   Attempt at a proof:    Let $A$ be compact and $B$ be closed. Let $m=d(A,B)=\inf_{b\in B} d(A,B)$. Then, there are two possibilities: (a) $\exists b\in B$, $d(a,b)=m$. If this is the case, we're done. (b) $\forall b\in B$, $d(a,b)>m$. In this case,     there exists a sequence $\{b_n\}\subseteq B:$ $d(a,b_n)\rightarrow m$ as $n\rightarrow\infty$ by definition of infinum. Then there exists a subsequence $\{b_{n_k}\}$: $d(b_{n_1},a)>d(b_{n_2},a)>...$ which is monotonic decreasing. Then note that $d(b_{n_k},a)<d(b_{n_1},a)<\infty$. So it's a bounded sequence. Now I want to show that it has a convergent subsequence that converges to $b\in B$ and then I want to do the same for $A$. And then finally to show that $d(a,b)=m$ in fact. Any clues to how to get there?

Claim: Let $X$ be a metric space. If $A,B\in X$ are disjoint, if A is compact, and if B is closed, then $\exists \delta>0: |\alpha-\beta|\geq\delta\;\;\;\forall\alpha\in A,\beta\in B$.  Proof. Assume the contrary. Let $\alpha_n\in A,\beta_n\in B$ be chosen such that $|\alpha_n-\beta_n|\rightarrow0$ as $n\rightarrow \infty$.  Since A is compact, there exists a convergent subsequence of $\alpha_n\;(n\in\mathbb{N})$, $\alpha_{n_m}\;(m\in\mathbb{N})$, which converges to $\alpha\in A$.  We have   $$|\alpha-\beta_{n_m}|\leq|\alpha-\alpha_{n_m}|+|\alpha_{n_m}-\beta_{n_m}|\rightarrow0 \;\;\;as\;\;m\rightarrow\infty.$$ Hence $\alpha$ is a limit point of B and since B is closed $\alpha\in B$, contradiction.  Is my proof correct? I feel as though I am missing something simple which would trivialize the proof.


How do I delete the last n lines of an ascii file using shell commands?

Is there a way to head/tail a document and get the reverse output; because you don't know how many lines there are in a document?  I.e. I just want to get everything but the first 2 lines of foo.txt to append to another document.


Prove by induction that $3^n > n^2$   I tried to prove this but I finally got to a point from where I could not proceed any further.  I tested this and this relation seems to be true for all $n \in \mathbb N$.   (1) The first step: $3^1 > 1^2$, the inequality holds.  (2) I assume that this relation inequality holds for all natural numbers smaller than or equal to some $k$, and so $3^k > k^2$  (3) The inductive step:  $$3^{k+1} =3 \cdot 3^k > 3k^2 =k^2 + k^2 + k^2$$ This would be great if I could show that $k^2+k^2 > 2k +1$ for all natural numbers. Unfortunately, this is simply not the case for $n=1$, because $2 < 3$. And so my idea does not work. Is there an alternative way to tackle this problem?

Prove that $$3^n > n^2$$  I am using induction and I understand that when $n=1$ it is true. The induction hypothesis is when $n=k$ so $3^k>k^2$. So for the induction step we have $n=k+1$ so  $3^{k+1} > (k+1)^2$ which is equal to $3\cdot3^k > k^2+2k+1$. I know you multiple both sides of the induction hypothesis by $3$ but I'm not sure what to do next.


I'm quite new to Linux but I need to install Wordpress on a Debian Wheezy machine.  I have been reading tens of websites to prepare for this and they seem to say that Wordpress should NOT be installed as the root user. I created a normal user called Myname and I will try to do the installation with that user. But in all the tutorials the SUDO-command seems to be used.   So my questions are these:   How do I, acting as root user, give the Myname user SUDO priviledges? How can I know which SUDO priviledges I should be giving Myname? Do I need to be specific or can I give a broad range of them?

I have an account named as Chankey (local user). I had to use some commands like viewing the shadow file etc. I tried it using sudo command     sudo vim /etc/shadow   It said:      Chankey is not in the sudoers file. This incident will be reported.   How can I add this user Chankey to the sudoers file?


although I found it didn't work for me, or at least I did something wrong.  These are the folders that I would like to remove.   Basically so it will look like it did in windows 7.  Thanks.

I would like to customize the folders in the Default Folders group of My computer. It is not necessary to have the same folders appear on the left sidebar and in the middle view. How can I do that ?


When I run the following code, it will return a 0. It should return 50.00.   System.Debug((100/200)*100);     I'm certain this is a simple solution. But haven't been able to find out the reason why. I have also tried it with decimals i.e.   System.Debug((100.00/200.00)*100);

Ok I hope I am mising something here as I really don't want this to be a bug.   The following piece of code returns 2. Per my understanding of the ceiling functionality, the result should be 3 because 7/3 is roughly 2.33333 and the ceiling should return 3.   Is this a bug or am I missing something? Thanks.   Integer pageNumber = (Integer) Math.ceil(7/3);   This returns 2 and not 3 as expected.   It works fine on other input. For example:  Integer pageNumber = (Integer) Math.ceil(8/5);   This returns 2 as expected.


I would like to be able to show a slide and then on the next transition place an opaque text box at some position over the text which explains some aspect of it.  This is an example which doesn't work well.  \documentclass{beamer} \usepackage{default} \usepackage[pangram]{blindtext} \usepackage{lipsum} \usepackage[absolute,overlay]{textpos} \setbeamerfont{title}{size=\Huge} \setbeamercolor{background canvas}{bg=black} \setbeamercolor{normal text}{fg=white} \setbeamercolor{title}{fg=white} \setbeamercolor{frametitle}{fg=yellow} \begin{document} \begin{frame} \lipsum[50] \pause \begin{textblock*}{64mm}(32mm,0.25\textheight)     \begin{exampleblock}{}         This is wrong!     \end{exampleblock} \end{textblock*} \end{frame} \end{document}   In my case I have white text with a black background.  How can you do this?    Using the linked question I get:  \documentclass{beamer} \usepackage{lmodern} \usetheme{Luebeck} \usepackage{lipsum} % <= to insert dummy text \usepackage[absolute,overlay]{textpos} \setbeamerfont{title}{size=\Huge} \setbeamercolor{background canvas}{bg=black} \setbeamercolor{normal text}{fg=white} \setbeamercolor{title}{fg=white} \setbeamercolor{frametitle}{fg=yellow} \begin{document} \begin{frame} \frametitle{Example of block over the text} \lipsum[1] \only<2>{ \begin{textblock*}{64mm}(32mm,0.25\textheight)     \begin{exampleblock}{}     This is wrong!     \end{exampleblock} \end{textblock*} } \end{frame} \end{document}   How can I make the text block have white text on a black background and get rid of the block of color at the top of it?

I need to position an example block:  \begin{exampleblock}{}    Proposed and implemented \end{exampleblock}   Without disturbing other frame content. Something like:  -------------------- ------------- -------------------- -------------------------- -----------    --/============\--------- -----|            |-- -----| Proposed   |-------- -----| and        |-------- -----| implemented|------ -----\============/ -------------------- --------------------------    -----------------   Let it overlay the text behind it. And not to be taken into account during layouting.  Update The Claudio Fiandrino's way is not apropriate to me, because, i need an Itemize environment working inside, and it would be great, if block style is the same as theme-style.


I am using Drupal 8.4.  I am trying to dynamically create/update field data for a content type.  Is there a way to get the type of a field (e.g. text, image, file upload) for a content type?

I want to programmatically create a custom content (custom content created via the admin UI). Before the creation, I want to check the types of fields of my custom content.  My custom content contains a field "body" (type text), a field "description" (type text), an int field (type int), an attached file field (type fid ?).  I tested several ways; this is my last try.  // I get the entity object "my_custom_content" $entity_object = NodeType::load("my_custom_content"); dpm($entity_object); //Work perfectly   $test = \Drupal::getContainer()->get("entity_field.manager")->getFieldDefinitions("my_custom_content",$entity_object->bundle())   The code returns an error:     The my_custom_content entity type does not exist.   With this $entity_object, how can I get the list of the fields of my custom content?  I see the EntityFieldManager class, the FieldItemList class, but I still do not understand how to play with Drupal 8.


When I export my model to FBX I am finding the faces what doesn't exist in Blender project. I mean the faces that cover the actual speaker. They are not hidden, an it actually is on face where I used boolean tool. I don't really know what I might be doing wrong and where to start.

After learning that booleans were apparently "bad" in my past question of this same problem, I decided to learn to use the knife tool instead to cut windows and doors in my ship.  Old thread:   Unfortunately, despite using the knife tool and everything looking allright in Blender, when exporting to fbx and using in ClothingToolCHECKED of the Nvidia apex cloth simulation, the cut outs were extremely deformed. This is the second time this has happened, even though I'm not using booleans!  This is very frustrating, as it took me a long time to redo the parts of my ship that had booleans in them.  Here are images of what I mean:  Blender:    fbx export:


First Way function User(firstName, lastName) {     this.firstName = firstName;     this.lastName = lastName; } User.prototype.login = function() {     console.log(`${this.firstName} Logging in.....`); }  Second Way function User(firstName, lastName) {     this.firstName = firstName;     this.lastName = lastName;     this.login = function() {         console.log(`${this.firstName} Logging in...`);     } }   Both seems to be producing the same results. Are there any situations to choose one over another?

What's the difference between  var A = function () {     this.x = function () {         //do something     }; };   and  var A = function () { }; A.prototype.x = function () {     //do something };


This is the line C-3PO speaks when he meets BB-8 in The Force Awakens (2015):  C-3PO: Come along, BB-8, quickly. Yes, I must get my proper arm reinstalled.  That means they know each other even before.

A lot of people will probably gloss over this fact, but it looks like C-3PO meets BB-8 for the first time in this scene 0:20:                                But how does C-3PO know BB-8's name? Is there a time where C-3PO meets BB-8 before this and knows his name?


I have a very simple series circuit which I originally built hoping to measure voltage from an Arduino, but while calibrating realized an irregularity, so stripped it down to its basic parts.         – Schematic created using   The circuit now consists of a lithium-ion battery (unknown Ri), a 10Mohm resistor, and a 1Mohm resistor. When measuring the voltage drops across these resistors, the voltage does not add up.  Unlike in previously asked questions, I am not referring to a small margin of error around 5-10%. Instead, the voltage when measured across both resistors is 3.68V. R1 has a measured voltage of 1.78V across it, and R2 has a voltage of 0.17V across it. This does not add up by a very large margin, and I have no idea what could be causing it.  I have considered possible bad connections across the wires and in the breadboard, and have not been able to find any significant voltage drops to make up for the 1.7V difference. I'm at a loss for what could be causing what appears to be a violation of KVL and would appreciate any explanation for this.

I am having a hard time answering one particular question about our experiment.. In our experiment, R1 and R2 were set to 1Meg each and later to 10k... I understand the need for R1 and R2 a bit. Without R1 and R2, the voltage sharing wouldn't exactly be 50-50 for both D1 and D2 because no two diodes are completely identical. D1 and D2 will both have the same leakage currents (without R1 and R2) since they are just in series. However, they probably will have non-identical IV curves, so this particular leakage current will result to V@D1 /= V@D2.  The question I am having a hard time is that, why is V@R1 + V@R2 /= 10v when R1 = R2 = 1Meg?... One the other hand, those two voltages add up (to 10v) when R1 = R2 = 10k... I included the 60 ohm source resistance in my diagram for completeness. However, as I can see, both D1 and D2 are reversed biased and thus, they offer a very large (reverse resistance) which should be much greater than the 60 ohms. Even with the parallel combination of 1Meg and D1 reverse resistance, it should still be much greater than the 60 ohms. I tried thinking of an answer in terms of the RD1reverse//R1 = Req1 and RD2reverse//R2 = Req2. Req1 + Req2 (series) should still be much more than 60ohms and I thought that the 10v should still show up at the node of D1 cathode. Yet in our experiment, V@R1 + V@R1 < 10v.  Can anyone point me out if I am thinking this in a wrong way? Some tips/first step hint would really be appreciated  Edit: question answered thanks to @CL. Assuming D1 and D2 are open during reverse bias for simplicity and noting that Rmultimeter = 10Meg, V@R2 (shown on multimeter) = 10v * (1Meg//10Meg)/((1Meg//10Meg)+1Meg+60) = 4.76v measured.


Suppose $X_i\in\mathcal{L}^2$ with expectation $0$ such that $\sum_{i=1}^\infty \mathbb{E}[X_i^2]/i^2<\infty$ and suppose they are pairwise non correlated. Does then the SLLN still hold?

Kolmogorov proved, that, as one considers independent (not necessary equally distributed) Random Variables: $\{X_n\}_{n\ge0}\subseteq \mathcal L^2$   With $\mathrm{Var} (X_n)=\sigma^2_n$ and without loss of generality $E[X_n]=0$.  If $\sum_{n=0}^\infty \frac{\sigma^2_n}{n^2} \lt \infty$ then SLLN holds, that is:  $$\frac1n\sum_{k=0}^n X_k \rightarrow 0 \,\,\,\,\,\,\,\,\,\,\,\,\,\text{a.s.}$$  Something different:  Also it is known, that if $\sup_{n\ge0}\sigma^2_n =: v \lt \infty$ pairwise uncorrelated $(X_n)_{n\ge0}$ will suffice for SLLN to hold.  My question in view of this situation: Is it possible to weaken the condition of $(X_n)_{n\ge0}$ beeing independent and instead merely consider pairwise uncorrelated $(X_n)_{n\ge0}$?


For the sum $$\sum_i^n {n-i \choose i}$$  I evaluate it for $n=1,2,3,4,5$  For $n=1$ we have $$\sum_{i=0}^1 {1-i \choose i} = {1 \choose 0} + {0 \choose 1} = 1 + 0 = 1$$ For $n=2$ we have $$\sum_{i=0}^2 {2-i \choose i} = {2 \choose 0} + {1 \choose 1} + {0 \choose 2} = 1 + 1 + 0 = 2$$ For $n=3$ we have $$\sum_{i=0}^3 {3-i \choose i} = {3 \choose 0} + {2 \choose 1} + {1 \choose 2} + {0 \choose 3} = 1 + 2 + 0 + 0 = 3$$ For $n=4$ we have $$\sum_{i=0}^4 {4-i \choose i} = {4 \choose 0} + {3 \choose 1} + {2 \choose 2} + {1 \choose 3} + {0 \choose 4} = 1 + 3 + 1 + 0 + 0 = 5$$ For $n=5$ we have $$\sum_{i=0}^5 {5 - i \choose i} = {5 \choose 0} + {4 \choose 1} + {3 \choose 2} + {2 \choose 3} + {1 \choose 4} + {0 \choose 5} = 1 + 4 + 3 + 0 + 0 + 0 = 8$$  And we can see the pattern $$1,2,3,5,8,....$$ which makes me think about the Fibonacci sequence  One can also evaluate $n=0$ $$\sum_0^0 = {0 - i \choose i} = {0 \choose 0} = 1$$  And so we have $$1,1,2,3,5,8,....$$  Now  to prove that it is really the Fibonacci sequence, Can I prove it by induction ?  By starting from $n =2$, we have $$\sum_{i=0}^n {n-i \choose i} = f(n) = f(n-1) + f(n-2)$$  Do we start with a base case $n=2$,  $$\sum_{i=0}^2 {2-i \choose i} = 2 = f(1) + f(0)$$  And so the base case works.  Now assume it works up to $n = k$ (Strong Mathematical Induction)  That is we assume it works up to $$\sum_{i=0}^k {k -i \choose i} = f(k-1) + f(k-2)$$  Now we consider $k + 1$, Now I am stuck here. Any suggestions ?

I need to prove that there is the following equality:  $$ \sum\limits_{k=0}^n {n-k \choose k} = F_{n} $$ where $F_{n}$ is a n-th Fibonacci number.  The problem seems easy but I can't find the way to prove it. Could you give me any hints? I'm looking for a combinatorial proof.


Most of my doubts about his healing ability were answered .   Deadpool has one of the greatest healing factors in the Marvel universe. As mentioned :     Deadpool possesses a superhuman healing factor derived from that of the mutant Wolverine that allows him to regenerate damaged or destroyed areas of his cellular structure at a rate far greater than that of an ordinary human. As such, he can regrow severed limbs or vital organs.   However, I have a slight confusion about Deadpool's regenerative limit. What is the deciding factor which chooses to grow into a complete 'Pool? Hypothetically, for example, if he's blasted into several pieces, will we have multiple 'Pools? (that would be fun though!)

If you cut Deadpool exactly in half, which half would regenerate and grow the rest of his body?  Or would both halves regenerate a complete Deadpool?  Has this happened in the comics? (I haven't had a chance to read them ALL).  Would this be a plausible way to 'clone' Deadpool?  Edit: I should also clarify that I'm talking about the possibility of him being split down the middle, not severed at the waist, which has happened in a comic and his legs simply grew back.


Suppose I have an  who has a Wisdom score of 3, and is level 9 (or greater) so has a "mutagen bonus" of 3+. If this character uses the celerity mutagen, the following effects apply:  Your Dexterity score increases by an amount equal to your mutation score, as does your Dexterity maximum. Side effect: Your Wisdom score decreases by amount equal to your mutation score.  This would mean the mutagen drops the blood hunter's Wisdom score to 0 (or less, if they're higher level). What consequence does using the mutagen have for this character?

D&D 5E does not seem to have rules for ability score damage (that I could find), although it does mention that if CON is decreased, your maximum HP is reduced. In addition, the Shadow monster in the Monster Manual has a Strength Drain attack that deals 2 Strength damage. The attack says that if a character's Strength reaches 0, the character dies. Are there any general rules for ability damage in 5th Edition?


I am currently waiting for the renewal of my expired residency permit from Malta. I have in hand an authorisation to stay in the country.  I need to travel back home to Canada before I receive the new card and then enter the EU again. Will I be entitled to use the 90-day visa free on my way back?  Thanks for your help :)

I'm living in Germany with a blue card. Some days ago I've come to Korea but I forgot to take my blue card. I'm going back to Germany from Incheon airport (Seoul) and will stop over in Heathrow airport (London) and will go back to Tegel airport (Berlin).  How can I go back to Berlin without my blue card? I can ask my wife to bring the card to Tegel airport if it would help, but I'm not sure if I can take the flight at Heathrow airport or even at Incheon airport.  Update  I've asked via another channel and just got an answer saying that he had accidentally put his blue card in the baggage but he was able to enter the country after the security guy checked through the system. That said, more official answer would be welcome.  Update 2  I've come to Germany without any problem, but it was possible as I had Beiblatt attached to my passport, which has the expiration date of my visa. The staff at the check-in desk has checked the document and the German border guard also has checked it. Nobody asked me for the blue card in my case. So I don't know what would have happened if I had neither.


I miss the old , which allowed me, at a glance, to see network activity, memory status and CPU activity.    How do I get something like this back on Bionic Beaver (GNOME on Wayland) ?

I have 4GB RAM. When I open Firefox, IntelliJ IDEA or VS Code and some other application my memory is about used up thus my machine hangs and I can't do anything. I can't even close any applications.    Date and time are shown in the top bar so that I can view it any time without any thing typing.   If I would view memory status in this way without typing anything then I can make a decision whether to open an application or whether this application may put my machine in hanging state or not.    Is it possible in Ubuntu 18.04 LTS?


I have to find the following limit:  $$\lim_{n \to \infty} \sum_{k=1}^n\frac{1}{k\cdot 2^k}$$  The exercise also provides me with the following function definition:  $$ f_n(x) = \frac{x^n}{1-x} $$  I tried to integrate this function by parts on the interval $[0, \frac12]$ and it led me something like this:  $$ I_n = \int_0^\frac12 \frac{x^n}{1-x} \, dx = \log2 - \frac{1}{2^n} + n\int_0^\frac12 x^{n-1} \log(x-1) \, dx $$.  This seems to look like a part of my sum terms but I don't know how to finish the integration and I cannot complete the limit. Could you help me please?

What would be the sum of the following series?  $$\sum_{n=1}^{\infty} \frac{1}{n \cdot 2^n}$$  Thanks


I've been working on this homework problem for a while now and I can't seem to figure it out.  The problem is as follows:  Prove that for any sets $A$ and $B$, $P(A) \cup P(B) = P(A\cup B)$ then either $A\subseteq B$ or $B\subseteq A$. I'm having trouble understanding what it means to have an equation as one of my hypotheses.  I looked online and I couldn't find anything online, so hopefully this is alright.  Thanks!  Any help would be appreciated

Prove that for any sets $A$ or $B$, if $\mathcal P(A) \cup \mathcal P(B)= \mathcal P(A\cup B)$ then either $A \subseteq B$ or $B \subseteq A$. ($\mathcal P$ is the power set.)  I'm having trouble making any progress with this proof at all. I've assumed that $\mathcal P(A) \cup \mathcal P(B)= \mathcal P(A\cup B)$, and am trying to figure out some cases I can use to help me prove that either $A \subseteq B$ or $B \subseteq A$.   The statement that $\mathcal P(A) \cup \mathcal P(B)= \mathcal P(A\cup B)$ seems to be somewhat useless though. I can't seem to make any inferences with it that yield any new information about any of the sets it applies to or elements therein. The only "progress" I seem to be able to make is that I can conclude that $A \subseteq A \cup B$, or that $B \subseteq A \cup B$, but I don't think this gives me anything I don't already know. I've tried going down the contradiction path as well but I haven't been able to find anything there either.  I feel like I am missing something obvious here though...


I am trying assignment problems of an Institute in which I don't study. I am unable to think about this problem.      Problem ->Prove that every positive integer can be expressed uniquely as $N = a_0 + a_1 2 + a_n 2^n $ and all $ a_i $ belongs to $\{0, 1\}$.    Can someone please help.

A binary number is a string $r_mr_{m-1} \cdots r_1r_0$ where $m \in \mathbb{N}$ and $r_i \in \{0,1\}$ for $i=0,\ldots,m$. The string represents the positive integer $r_m2^m+r_{m-1}2^{m-1}+\cdots+r_12+r_0$. Prove by induction that every positive integer is represented by some binary number.  How do I prove p(x),p(k) and p(k+1). Or Strong induction?


I have a new Nikon D850, and I'm using the Nikon SB-910 flash. When I take a shot, the flash pops 3 short flashes. Then the shutter engages, and the full flash goes off. The batteries are OK.  Does anybody have any ideas what the issue could be?

I have a Nikon D200 and I'm using the SB 800 flash. I've been using this flash for a year and now when I take a shot the flash pops 3 short flashes and then the shutter engages and the full flash goes off. The batteries are OK. Does anybody have any ideas what the issue is?


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

Is it possible to have your bash history save the total execution time of every command you run?  i.e. as if every command were prefaced with 'time' and the result was stored in the history along with the command?  clarification: I already know that you can add a timestamp of when the command was started - but I would like to know the total execution time, not just when it was started.


Summary of the problem: I have two disks re-configured as RAID 1. instead of copying the data to the empty disk, it deleted the data from the non-empty disk.  Here's what happened: 1. In the last few days, I reinstalled windows 8 twice. 2. I had 2 disks configured as RAID 1 and 1 SSD contained the OS. 3. While reinstalling windows 8 (1st time) on the SSD, I might have removed the RAID configurations from BIOS. 4. I made changes to the raid disk. 5. I reinstalled windows 8. 6. I noticed I see 3 disks (1 SSD, raid-disk1, raid-disk2) 7. Raid-disk1 was updated to my last changes (done after installing windows 8 for the 1st time) 8. Raid-disk2 was updated to BEFORE installing windows 8. 9. I formatted raid-disk2 10. I set SATA configuration to RAID in BIOS. 11. After restart, the disks was automatically configured as RAID and with status rebuild. 12. In windows 8 I get both disks as EMPTY!  How do I restore the data?   Thanks A LOT! Omer

Summary of the problem:  I have two disks re-configured as RAID 1. instead of copying the data to the empty disk, it deleted the data from the non-empty disk.  Here's what happened:  1. In the last few days, I reinstalled Windows 8 twice.  2. I had 2 disks configured as RAID 1 and 1 SSD contained the OS.  3. While reinstalling Windows 8 (1st time) on the SSD, I might have removed the RAID configurations from BIOS.  4. I made changes to the RAID disk.  5. I reinstalled Windows 8.  6. I noticed I see 3 disks (1 SSD, RAID-disk1, RAID-disk2)  7. RAID-disk1 was updated to my last changes (done after installing Windows 8 for the 1st time)  8. RAID-disk2 was updated to BEFORE installing Windows 8.  9. I formatted RAID-disk2  10. I set SATA configuration to RAID in BIOS.  11. After restart, the disks was automatically configured as RAID and with status rebuild.  12. In Windows 8 I get both disks as EMPTY!  How do I restore the data?


I'm new in JavaScript I have this object that want to exclude 2 keys :  "age":20 and "university":"HCC".   As a result, I want to see "name:"Sam" and "class":55 as the only properties in the object.  var b = {      "name":"Sam",     "age":20,     "university":"HCC",     "class":55 }

Say I create an object as follows: let myObject = {   "ircEvent": "PRIVMSG",   "method": "newURI",   "regex": "^http://.*" };  How should I remove the property regex to end up with new myObject as follows? let myObject = {   "ircEvent": "PRIVMSG",   "method": "newURI" };


I had Ubuntu 18.04 running, and installed windows after without doing dual boot process, and now the system does not let me boot with ubuntu.  Is there any way I can 1) do the dual boot or 2) go back to the original status without formatting/deleting/destroying what is in ubuntu partition.  Please help.

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back?


Let us define:  $\bigcap \emptyset  = \{ x|\forall A(A \in \emptyset  \Rightarrow x \in A)\} $  I understood that this cannot be defined. Somehow it enables Russell's paradox to exist. Why is that?

Let $\mathbb S = \varnothing$.      Then from the definition: $ \bigcap \mathbb S = \left\{{x: \forall X \in \mathbb S: x \in X}\right\}$      Consider any $x \in \mathbb U$.      Then as $\mathbb S = \varnothing$, it follows that: $\forall X \in \mathbb S: x \in X$ from the definition of vacuous truth.      It follows directly that: $\bigcap \mathbb S = \left\{{x: x \in \mathbb U}\right\}$      That is: $\bigcap \mathbb S = \mathbb U$. ()   Proofwiki uses the above "proof" to "prove" that intersection of the empty set is the whole universe.   My question is, is the use of vacuous truth really allowed in axiomatic set theory, like ZFC? I don't see how the use of vacuous truth is justified.   The next problem I can think of is that we cannot really "define" the elements of empty set (to my knowledge, there is no element in empty set) so how can we then prove as the above proof did? This seems to contradict the use of vacuous truth.  And of course, there is issue of using the whole universe as a set, and I don't think this is allowed.... (Maybe proof above is using a different axiomatic set theory, as I am using ZF-minded thoughts...)


I am building a zen subtheme in which I try to adjust my menus from:

             ...

             ...

   too:

 <----- mark the very first

             ...

             ...

 <----- mark the very last li element

   another example:

 <----- mark the very first

             ...

   I know I can handle each menu item with theme_preprocess_menu_link but I didn't find a solution to have the very first and last item marked as I need to? Any suggestions?

I've searched and found variations of this question but I've never found an answer that seemed to work. I need to add a class to the
 elements, currently the main menu is rendered like this:  print theme('links__system_main_menu', array(     'links' => $main_menu,     'attributes' => array(         'id' => 'slidemenu',         'class' => array(             'links',             'inline',             'clearfix'         )     ),     'heading' => t('') ));   As far as I can tell, this only sets up the
 element of the main menu, so I was wondering if there's a way to edit the attributes of the 'links' part.  ---EDIT---  Alright, I think I solved it. Apparently you can use theme_links__system_main_menu in templates to override the whole thing. I ended up doing this:  function mytheme_links__system_main_menu($variables) {     $html = '
';     $html .= '
';      static $linkClass = 1;      foreach ($variables['links'] as $link) {                         $html .= '
' . l($link['title'], $link['href'], $link) . '
';         ++$linkClass;     }      $html .= '
';     $html .= '
';      return $html; }   Not entirely sure if this is correct Drupal, though it did solve my issue!


Let $x,y,a,b~\text{and}~ c\in \mathbb{R}$ such that $a,b>0$. Then show that $ax^2+by^2+2cxy \geq 0$ and $(ab-c^2)>0$. Please help to prove this. I tried AM GM inequality but did not  succeeded.

I know that for any nonzero $x,y\in\mathbf{R}$,  $$ax^2+by^2+cxy > 0,$$  where $a,b,c\in\mathbf{R}$. What can I deduce about $a$, $b$, and $c$?    For example, letting $x=1$ and $y=0$, I know that $\boxed{a>0}$. Letting $x=0$ and $y=1$, I know that $\boxed{b>0}$. Letting $x=y=1$, I know that $\boxed{c>-(a+b)}$.  What else can I deduce about $a$, $b$, and $c$? How will I know when it's time to stop looking? (Is that last question even answerable?)


According to the triangle that is formed in the third quadrant we have to calculate $ \tan (\alpha) = \frac {3}{4} $. How do I calculate the latter without using a calculator?

To write in polar form you use this formula $$z=a+bi=r \left(\cos \theta+i\sin\theta \right)$$ I want the polarform for this rectangular function$$4\sqrt2(-1+i)$$  See this for more information


In Harry Potter, the fact that "The wand chooses the wizard" becomes a main plot point. Wands will not work for you properly if they either didn't choose you, or if you didn't win them in battle. But in The Deathly Hallows, after escaping from Malfoy Manor, Ollivander crafts and sends Luna a new wand by Owl Post as a thank you for helping keep him alive while imprisoned. Luna appears to have no problem wielding the wand, yet she neither won it, nor, it seems, was she chosen by it. So how does it work for her?

We know that wands choose their owners as we saw Harry buy his wand at Ollivander's in HP1.  We also know that wands can be made for their owners as we saw in HP7: Ollivander makes a wand for Voldemort as-well as Wormtail having a new one created for him.  But if the wand chooses the owner, how can you guarantee that the new wand will choose you, if you ask someone to create it for you?    As a clarification, this is not the same as  since that question is asking specifically about the Elder Wand, which is known to behave differently to other wands. Also, that's asking about the whole "winning over" scenario, whereas this question asks about a wand being built for the intended owner.


How do I create an enumeration style like in the picture below (I mean things that look like concave { and })?    The Comprehensive Symbol List doesn't seem to know anything about those symbols. Googling didn't yield any useful results as well. I'm starting to suspect these symbols to be user-defined in some way.

I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?


I don't understand when i use these three method separately. 1)instance method 2)class method 3)staticmethod  class CustomClass:      # instance method     def add_instance_method(self, a,b):         return a + b      # classmethod     @classmethod     def add_class_method(cls, a, b):         return a + b      # staticmethod     @staticmethod     def add_static_method(a, b):         return a + b

What is the difference between a function decorated with  and one decorated with ?


I'm a java student who wants to get a better understanding of the big-O efficiency.   For this problem, it is assumed that doIt() has an efficiency of O(n).       j=n;   while (j>0) {      doIt();      j = j / 2;  }  i = 1;  while (i < n) {  i = i * 2;  doIt();  }   What would be the big o efficiency of this algorithm, and why would it be that efficiency (such as O(n logn), O(n^2), O(n^2 logn), etc.).

I'd prefer as little formal definition as possible and simple mathematics.


When choosing what RAM to install on a computer and what OS to run how do you determine the amount of RAM that will actually be used and not just recognized?  for example here is my machine:   How did the (3.15 usable) get calculated?

I recently upgraded my computer's RAM to 4 GB. My 32-bit Windows installation shows only 3574 MB of the memory. How can I make Windows use the full amount of RAM?


I have records of data with many columns. One of the columns being date & time. Check the sanpshot for view. Now I want to run a query to display data from particular date to particular date. I am writing following code in php but it doesn't work and actually query doesn't work. Second condition in code when nothing is coming in POST works but not vice versa.    $d1=date("d/m/Y", strtotime($_POST['frm'])); $d2=date("d/m/Y", strtotime($_POST['to'])); $query;  if(empty($_POST['frm'])){     if(empty($_POST['to'])){         $query = mysql_query("select * from ordermng where status = '$xno' ", $link);    }       }       else{     $query = mysql_query("select * from ordermng where (status = '$xno') between date  = '$d1%' and date = '$d2%' ", $link); }

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I need to plot data where some of the consecutive coordinates are very close to each other. There seems to be something weird jitter appearing when this is done using thick lines, as may be seen in the figure below.  What can I do to get rid of this annoying jitter while still using a thick line style? I would prefer doing this without cleaning the data file before it is presented to pfgplots.  The code for generating this plot is as follows:  \documentclass[a4paper]{article} \usepackage[a4paper,margin=10mm]{geometry}  \usepackage{tikzscale} \usepackage{pgfplots} \pgfplotsset{compat=1.11,compat/show suggested version=false}  \usepackage{filecontents}  \begin{document}  \begin{filecontents}{line.dat} y               x 0.030253        -0.074843 0.057078        -0.075733 0.072498        -0.036123 0.074581        -0.047017 0.058578        -0.062860 0.050274        -0.119600 0.056557        -0.075105 0.070009        -0.108146 0.050349        -0.076270 0.095860        -0.047266 0.071306        -0.068749 0.084431        -0.072772 0.108305        -0.115240 0.112039        -0.099893 0.108454        -0.082722 0.088435        -0.096626 0.113089        -0.151948 0.171604        -0.164238 0.147025        -0.136150 0.170872        -0.134639 0.187245        -0.152217 0.147094        -0.124690 0.188067        -0.129349 0.206525        -0.127766 0.194892        -0.109653 0.213251        -0.150639 0.228910        -0.115494 0.270712        -0.092827 0.277597        -0.078565 -8.361062       84.157746 \end{filecontents}  \begin{filecontents}{line.tikz} \begin{tikzpicture} \begin{axis}[x tick label as interval=false,axis equal] \addplot[blue,ultra thick] table[x=x,y=y] {line.dat}; \addplot[red] table[x=x,y expr={\thisrow{y}+4}] {line.dat}; \end{axis} \end{tikzpicture} \end{filecontents}  \begin{figure} \includegraphics[width=\columnwidth,height=40mm]{line.tikz} \end{figure}  \end{document}

I am trying to plot some experimental data. When I plot the data using tikzpicture/pgfplots, the data seems "noisy". It becomes less "noisy" when I use the keyword each nth point={n}, where I increased n to 1, 10, 50, 100 (see attached picture). However, when increasing n, I am essentially not being true to my recording.  I was wondering if you could help me remove the "noise" that seems artificial while using my whole data set.   every n={1}   every n={10}   every n={50}   every n={100}   The code I use is as follows:  \documentclass[11pt]{article} \usepackage{tikz} \usetikzlibrary{plotmarks} \usepackage{amsmath} \usepackage{pgfplots} \usetikzlibrary{matrix} \usetikzlibrary{decorations.pathmorphing,patterns} \usepgfplotslibrary{external} \tikzsetexternalprefix{figurescache/} \pgfplotsset{compat=newest} \tikzset{external/system call={lualatex \tikzexternalcheckshellescape -shell-escape -synctex=1 -halt-on-error -jobname "\image" "\texsource"}} \tikzexternalize[mode=list and make] \begin{document}  \begin{tikzpicture}[scale=0.6] \begin{axis}[hide x axis, ymax={90}, ymin={-90}, xmin={0}, xmax={400}] \addplot[very thick, color=black, each nth point={1}]table[x=t,y=rec]  {./data/fig1data.dat}; \end{axis}  \end{tikzpicture} \end{document}   Edit: @Darthbith suggested I add the option /tikz/line join=bevel to my axis. It does a phenomenal job in removing the noise. There is a tiny bit of jaggedness when you zoom in to the plot, but it is already great.  is the link to data I have used in the plots I have attached to this post.


Given a basis for $\mathbb{Q}(\sqrt{2},\sqrt{3},\sqrt{5})/\mathbb{Q}$.   Considering $\mathbb{Q}(\sqrt{2},\sqrt{3})/\mathbb{Q}$ then, $\lbrace 1, \sqrt{2}, \sqrt{3}, \sqrt{6} \rbrace$ is a basis.  But $\lbrace 1, \sqrt{2}, \sqrt{3}, \sqrt{5}, \sqrt{6}, \sqrt{10}, \sqrt{15} \rbrace$ is not a basis for $\mathbb{Q}(\sqrt{2},\sqrt{3},\sqrt{5})/\mathbb{Q}$. I Know that $[\mathbb{Q}(\sqrt{2},\sqrt{3},\sqrt{5}):\mathbb{Q}]=8$.  I would like some help. My difficulty is not to prove that a given set is a basis, I can not find a basis.

I'm having trouble finding a basis for $\mathbb{Q}(\sqrt{2},\sqrt{3},\sqrt{5})$. So far I know that $[K=\mathbb{Q}(\sqrt{2}):\mathbb{Q}] = 2$ and $[L=\mathbb{Q}(\sqrt{2}, \sqrt{3}):K] = 2$, but it's harder to extend $L$ to $L(\sqrt{5})$. Namely I'm trying to prove that $x^2-5$ is irreducible over $L$ by showing that $\sqrt{5} \notin L$ as follows:  Assume by contradiction that $\sqrt{5} \in L$. Then we have   $$\sqrt{5} = a + b\sqrt{2} + c\sqrt{3} + d\sqrt{6}$$ with $a,b,c \in \mathbb{Q}$. Squaring both sides and using independence of basis gives the following nasty system of equations:  $$-5+a^2+2b^2+3c^2+6d^2 = 0$$ $$ab + 3cd = 0$$ $$ac + 2bd = 0$$ $$ad + bc = 0$$  I can't see how these equations contradict the assumption that $\sqrt{5} \in L$.


The quotient topology is defined as follows:  Let $X$ be a topological space and $\pi: X\to Y$ a surjective function. We call the by $\pi$ induced topology $\tau_{Y,\pi}$ quotient topology where $U\subseteq Y$ open iff $\pi^{-1}(U)\subseteq X$ open.  It is easy to see, that this defines indeed a topology:  We have $\emptyset, Y\in\tau_{Y,\pi}$:  $\emptyset, Y$ are open, since $\pi^{-1}(\emptyset)=\emptyset$ open and $\pi^{-1}(Y)=X$ open.  For $U, V\subseteq Y$ open, we have $U\cap V$ open:  $\pi^{-1}(U\cap V)=\underbrace{\pi^{-1}(U)}_{\text{open}}\cap\underbrace{\pi(V)}_{\text{open}}$ open.  Let $I$ be an index set and $i\in I$. Let $U_i\subseteq Y$ open for every $i\in I$. Then $\bigcup_{i\in I} U_i$ open:  $\pi^{-1}(\bigcup_{i\in I} U_i)=\bigcup_{i\in I}\underbrace{\pi^{-1}(U_i)}_{\text{open}}$ open.  Hence $\tau_{Y,\pi}$ is indeed a topology.  But why has $\pi$ to be a surjective function?  One does not need this property to show, that the condition above defines a topology.  Is the proof correct?  What do we need the condition, that $\pi$ is surjective for? Is it just so we have the equivalent relation $x\sim y\Leftrightarrow f(x)\sim f(y)$.  And then we take $Y=X/\sim$. But there is no such relation defined.  I know that quotient maps have to be surjective in general. But what would happen if we had just a function $f: X\to Y$ and define a topology in the same way?  Thanks in advance.

Definition. Let $X$ and $Y$ be topological spaces; let $p : X \to Y$ a   surjective map. The map $p$ is said to be a quotient map provided a   subset $U$ of $Y$ is open in $Y$ if and only if $p^{-1}(U)$ is open in $X$.      Definition. If $X$ is a space and $A$ is a set and if $p : X\to A$ is a surjective map, then there exists exactly one topology $\tau$ on   $A$ relative to which $p$ is a quotient map; it is called the quotient   topology induced by $p$.      Definition. Let X be a topological space, and let $X^*$ be a partition of $X$ into disjoint subsets whose union is $X$. Let $p : X  \to X^*$ be the surjective map that carries each point of $X$ to the element of $X^*$ containing it. In the quotient topology induced by $p$, the space $X^ *$ is called a quotient space of $X$   It seems that to induce a quotient topology by using $p$, we don't need the property of $p$ being surjective. Why do we require a quotient map to be surjective? Are there some important applications of the surjection property? To prove a function is a quotient map, do we need to explicitly prove the function is surjective ?   Does the following picture give some intuition? It's from Wikipedia. The next stage of this gif is the $S^2$ obtained by gluing the boundary (in blue) of the disk $D^2$ together to a single point.


We are stating that energy neither be created nor be destroyed. Then where does it come from?

Did the law of conservation of energy apply to the earliest moments of the Big Bang? If so, what theoretical physics supports this?   I hear that Einstein's theory of relativity disputes the law of conservation of energy- so does that mean the law is false, or only some aspect of it?


So I have this executable jar file with a username and password and runs but value doesn't ever continue correctly. Here is an example:  public static void main(String[] args) {                 System.out.println("Hello. I am a program created by Moocow9m. What is your name?");                 InputStream stream = System.in;                 Scanner scanner = new Scanner(stream);                 String input = scanner.next();                 if (input == "armystich"){                 System.out.println("Welcome CODE NAME: ArmyStich!");                 scanner.close();                 }                 else {                 System.out.println("Hello " + input + ". Nice to meet you.");                 scanner.close();                 }         }     }   All would work except it would always return to else. Please help.

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I'm using the document class amsart, which defines the section counter as follows:  \newcounter{section}   However, I want the section counter to reset to zero every time I start a new part. Thus, I put in the preamble of my document the following code:  \newcounter{section}[part]   However, since the section counter was already defined in amsart, I'm receiving the error message:  Command \c@section already defined.   What is the appropriate way to redefine the section counter?

Some document elements (e.g., figures in the book class) are numbered per chapter (figure 1.1, 1.2, 2.1, ...). How can I achieve continuous numbering (figure 1, 2, 3, ...)?  And vice versa: Some document elements (e.g., figures in the article class) are numbered continuously. How can I achieve per-section numbering?  \documentclass{book}% for "vice versa" variant, replace `book` with `article`  \begin{document}  \chapter{foo}% for "vice versa" variant, replace `\chapter` with `\section`  \begin{figure} \centering \rule{1cm}{1cm}% placeholder for graphic \caption{A figure} \end{figure}  \end{document}   Bonus question: Is it possible to adjust the numbering of the sectioning headings themselves? Can I, e.g., switch from per-chapter to continuous numbering of sections in the book class?


My laptop is by Dell. I looked up beep error codes on their site and the page I found (it no longer exists) only mentioned 3 beep codes but my computer is making 4 beeps. So perhaps this means something else.  What does 4 beeps mean when you turn on your computer? I googled more and I've seen it mention system timer (I have no idea what that means or how to fix it) and forums that mention to try and take out RAM.  Any ideas?  -edit1- I took out the RAM, now I get 2 beeps and looking that up failed.  -edit2- I put one RAM stick back in and it worked. I put both back in and it still worked?? Well... it works now and has been for the last 2 hours. These beeps may be "Power On System Test (POST)" code. I am unsure though.

Due to the amount of beep codes a PC can give, there are many questions on Super User about beep codes! I'm hoping this post will help to provide a community answer about all (dare I say all?) beep codes, with my fictional question.  When I try to turn my PC on, I hear some beeps. This is not beeping from the HDD or fan, but from the motherboard. Regardless of the number of beeps, what do the beeps mean?


How can I tell Wolfram Alpha that I only want it to evaluate my function for natural numbers?   For example  $ 2n $, assuming n integer used to work, but not anymore. Is there a new syntax I can use?  Edit: Since this was marked as duplicate: The question popped up a couple years ago already, but the syntax seems to be a little different now. The answers given back then don't work anymore.

How can I tell Wolfram Alpha that some variables are natural numbers, when I want to solve a equation?  An example of what I want to do:  $\binom{n}{k}\cdot p^k \cdot (1-p)^{n-k} = \frac{1}{\sqrt{n\cdot p \cdot (1-p)}}\cdot \frac{1}{\sqrt{2 \cdot \pi}} \cdot e^{-\frac{1}{2} \cdot \left(\frac{x-np}{\sqrt{n \cdot p \cdot (1-p)}}\right)^2}$ solve for $x$ with $n,k \in \mathbb{N}$, $0 \lt p \lt 1$.


I installed ubuntu 12.04 and I added "Terminal" to the launcher bar, the default size of the terminal is a bit small, after some googling here is how I made the disaster change:   At HUD menu, type "preference" and I see the option of Edit > preference, this is as I expected After I clicked the option, I forget the exact steps, but somehow I came to some configuration panel and there is a checkbox for terminal "custom" and I checked it now an input box is enabled and I type gnome-terminal --geometry 160x50   Now the problem comes, whenever I click the terminal button at the launcher bar, new terminal windows pops up endlessly from everywhere, I cannot do anything any more except logout or shutdown.  The weird thing is, after I come back, I cannot get that Edit > preference any more when I type "preference" in HUD, I tried "Edit", "preference".   To be clear, I still can use the computer as long as I do not click that terminal button, but I really want to use terminal to run commands.  Help is appreciated greatly!  Update -   OK, figured out.  Go to /home/jibin/.gconf/apps/gnome-terminal/profiles/Default and open that xml file, I can see the options I changed at the GUI, remove them and terminal runs good.  The preference HUD is back also, it is actually Profile Preference and it is only available when terminal is open.  Continue my ubuntu-ing...

I fooled around with the colors and stuff, in the terminal, and now want to go back to the maroon and white default config of the the terminal. What files do I have to delete?


I haven't thought too hard about this, so it might be easy. Analysis counterexamples aren't my strong suit. One slick way of phrasing the definition of a Lie Group is as a group object in the category of smooth manifolds. In particular, this forces the group multiplication to be smooth. You can also ask for groups in the category of, say, $C^1$ manifolds (or any $C^k$). However we know (by a theorem of Whitney) that any $C^k$ manifold already has smooth structure by restricting the atlas (). Question: Are there groups whose multiplication is $C^1$ but not $C^2$? What about $C^k$ but not $C^{k+1}$? It seems like such objects should exist, but I haven't encountered them, and I can't find any by a quick google. Thanks in advance ^_^

The definition of "Lie group" typically restricts to a smooth manifold.  If we instead define a "Lie group" to be a topological manifold such that multiplication and inversion are continuous, is the manifold necessarily smooth?  Is the smooth structure unique if we want a smooth Lie group?  I believe the answer is yes, since a connected Lie group structure is determined by the Lie algebra, but my search attempts failed.


Gravitational pull on moon due to sun is almost twice than that of earth on moon.  Then why doesn't moon escape towards sun like on solar eclipse?

The sun pulls on the moon with a force that is more than twice the magnitude of the force with which the earth attracts the moon. Why, then, doesn’t the sun take the moon away from the earth?


I have several jars of canned grape jelly that are at least 10 years old. Are they still safe to eat?

How do I know if a given food or ingredient I have is still good, or if I should discard it?  How can I best preserve a food or ingredient?     This broad question is intended as a "general reference" question to quickly answer many how long will food keep for? questions. Please feel free to edit this question to expand and clarify as needed.


A BBC reporter, Melissa Hogenboom, talks about her father in this BBC article "":     My dad does not fall into any of the risk categories for dementia. There is no family history of it. He’s always been slim, healthy and active. This is part of why the disease is so devastating – it can affect anyone and we still do not understand why.   Is this 'why' a fused relative word or an interrogative word?  EDIT  This question does NOT have an answer in the earlier question .   There, the answer by John Lawler cites, and is solely based on, Haj Ross's paper "."   The paper, however, is irrelevant in that both conjunctive and disjunctive wh-clauses are interrogative clauses.   In fact, more than a month ago, I posted a comment to John Lawler's answer and asked about his opinion on the alleged misquoting of the paper and the writing up of an answer based on the misquoted paper. But unfortunately, I have not heard from him ever since.    So, whoever cited John Lawler's answer there as an answer to my question should go to that earlier question/answer and "read" the answer, the paper, and my comment there, although I think they should have done all that before marking this question as a "duplicate," whatever that means.

Would you differentiate which are relatives and which are interrogatives? (And I want to know the sub-category (sub-name) of each below, if they are.)        “You can keep it,” said Harry, laughing at how pleased Ron was. (Harry Potter and the Sorcerer's Stone)   Disgusted that the Slytherins had lost, he had tried to get everyone laughing at how a wide-mouthed tree frog would be replacing Harry as Seeker next. (Harry Potter and the Sorcerer's Stone)   His questions showed me how complex and mysterious were certain institutions of the Church which I had always regarded as the simplest acts. (James Joyce, Dubliners)   "I don't give a damn how you lost it as long as you keep it hidden." (Ralph Ellison, Invisible Man)   We revenged ourselves on Leo Dillon by saying what a funk he was and guessing how many he would get at three o'clock from Mr. Ryan. (James Joyce, Dubliners)    The duties of the priest towards the Eucharist and towards the secrecy of the con-fessional seemed so grave to me that I wondered how anybody had ever found in himself the courage to undertake them. (James Joyce, Dubliners)    I noticed how clumsily her skirt was hooked at the back and [8.] how the heels of her cloth boots were trodden down all to one side. (James Joyce, Dubliners)      As Dr. McCawley says:     It is often difficult to distinguish free relatives from interrogative complements, and indeed many examples are ambiguous between the two interpretations. (James D. McCawley, 1988. p.431)   It’s very difficult to distinguish which is relative and which is interrogative. A Korean blogger says, how in “How I spend my free time is a private matter.” is a nominal relative [free relative or fused relative], but in “I want to say how pleased I am to receive this award.” it's an interrogative.   This differentiation is somewhat easy: for the first how functions as CGEL says “combines the function of head of the NP and precuclear element in a modifying relative clause.” And the latter how functions as not referring to something known, something concrete, which can be specified ().


GitHub specify  how commit messages should be written, even down to the tense. This is contentious and there is  around how they should be written, but the majority go with GitHub.  On the Stack Exchange network, I've seen edit summaries written in the past, present, future, present perfect, ... ad nauseam. Is there any particular style guide or a set of recommendations for this type of thing?

I often see that revision comments are formatted to be in lowercase and items are separated by a ;     edited title; deleted 41 characters in body   So my question is: what rules do I need to be aware of when leaving revision comments?   Do they need to be in lowercase? How can I separate some items of my coments? Punctuation: do the comments need a full stop? Other remarkable aspects?


This just happened tonight.  Without warning and for no reason at all, the little triangle next to the folders on the desktop just disappeared.  So I cannot easily see the contents of the folders, I have to double click them.   But it's only on the desktop, all other folders have the triangles.   I only have one display.  I checked all the settings I could and did not see anything.  I don't even know what those triangles are called.

I'm having a problem with, as far as I can tell a single folder (~/Pictures) in the Finder's List View mode. When I navigate to other folders they display normally, it is only my Pictures folder that is wrong.  The issues are:   The header is not being displayed in the standard way The folders do not have a disclosure triangle to see its contents.   I have tried deleting the folder's .DS_Store and .localized files and restarting the Finder, repairing Disk Permissions with Disk Utility, and finally cold booting the machine.   I'm at a loss as to what could be causing this.  My machine is a MacBookPro w/Retina running 10.8.4.    Notice that the column headers are being drawn differently and the disclosure triangle to the left of the folder names is missing.


I'm having some problems with my bibliography in Texmaker. My code is:  \documentclass[11pt, a4paper]{article} \usepackage{graphicx} \usepackage{amsmath} \usepackage{natbib} \usepackage[utf8]{inputenc}     \usepackage{natbib} \usepackage[usenames,dvipsnames]{xcolor} \usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry} \begin{document}  ....  \cite{Johnson} \bibliographystyle{plain} \bibliography{mybib}  \end{document}   I also created a new file (File > New) that I saved as mybib.bib:  @Article{Johnson, author = {Edgar G. Johnson and Alfred O. Nier}, title = {Angular Aberrations in Sector Shaped Electromagnetic Lenses for Focusing Beams of  Charged Particles}, journal = {Physical Review}, year = {1953}, volume = {91}, number = {1}, }  @phdthesis{Zoran, author = {Zoran Racic}, title = {\'Etude et essais du spectromÃ¨tre Ã  plasma {DYMIO} de la  mission {MARS 96}}, publisher = {UniversitÃ© Pierre et Marie Curie}, year = {1996} }   When I compile my .tex file, I only have a [?] appearing.  Could you tell me what my mistake is?

I've browsed the forums and found a number of posts that have addressed this issue, but none of the solutions seem to work for me. I have the following script that I just copied from the bibtex home page to get familiar with it. Instead of the citation number I get a question mark. I compile using Latex+Bibtex+Latex+Latex+PDFLatex+ViewPDF just as has been previously suggested and the problem persists.   \documentclass[11pt]{article} \usepackage{cite}  \begin{document}  \title{My Article} \author{Nobody Jr.} \date{Today} \maketitle  Blablabla said Nobody ~\cite{Nobody06}.  \bibliography{mybib} \bibliographystyle{plain} \end{document}   My bibliography (Bib.bbl)  @misc{ Nobody06, author = "Nobody Jr", title = "My Article", year = "2006" }    Looking at previous posts one thing that is concerning is that my .bbl looks empty as shown below. Further, I don't have a .blg  \begin{thebibliography}{}  \end{thebibliography}


When reading on the wikipedia page of  they said :   " A reverse process to regression, where instead of a future dependent variable being predicted from known explanatory variables, a known observation of the dependent variables is used to predict a corresponding explanatory variable "  Indeed, this confuses me ! For me I see calibration is a special case of regression, and not a reverse regression. So, can some one explain the  stated in wikipedia, or in general what is the difference between regression and calibration?

I have a set of experimental data points. I performed the measurements in triplicate, for each of the point of the data set. Therefore, I can draw each data point with the standard deviation of each triplicate. See the picture attached.  In experimental sciences, it is common to report a value with its standard deviation. Ex: a mean, +/- the std.  I can calculate a linear regression for the data set. If I have the equation of the linear regression, I can calculate x for any y. Let's take y=50 -> x=11.69  Now, is there a way to evaluate the "dispersion" of this extrapolated point ? Something like 11.69 +/- something.  I know it should be the other way around, like 50 +/- something for x=11.69, but then I could use the equation to transform it to x.  Basically what I'm asking: is there a global "standard deviation" for a complete linear regression ?  EDIT: When I say "any y", I mean that y will not be an experimental value. I choose it to be 50.


Problem  Let $S = \sum_{n=1}^{\infty}\frac{(-1)^n}{n\log^2(n+1)}$.   Determine the series converges absolutely or conditionally.   Attempt  $S=\sum_{n=1}^{\infty}( -1)^n a_n$   $a_n$ is monotonically decreasing and it approaches zero when $n$ approaches infinity. So series is convergent .   Doubt  How to check for absolute convergence?  Ratio test fails here. Root test is of no use.  I have attempted comparison tests using the fact that $n>\log(n)$, but no success there also.

Consider the series   $$\sum_{n=1}^\infty\frac{(-1)^n}{n\log^2(n+1)}.$$   Determine whether it converges absolutely or conditionally.   My attempt  S=$\sum_{n=1}^{\infty}( -1)^n$ an   an  is monotonically decreasing and it approaches zero when n approaches infinity. So series is convergent .   Doubt  How to check for absolute convergence? Ratio test fails here.


My bash script is supposed to start a process (let's say, run less) and bring it back to foreground every time the process is suspended (e.g. by pressing CTRL-Z).  If I just keep repeating the commands, it works as expected:  #!/bin/bash set -m echo foo | less # (User presses CTRL+Z to suspend the process) echo "going back..." sleep 1 fg # (User presses CTRL+Z to suspend the process) echo "going back..." sleep 1 fg # ... etc.   However, it fails inside a loop:  #!/bin/bash set -m echo foo | less while true; do     echo "going back..."     sleep 1     fg done   Why does the second script exit the second time I suspend less and not keep looping? Am I missing a side effect of what loops in bash do?

Why is it that using bash and suspending a while loop, the loop stops after being resumed? Short example below.  $ while true; do echo .; sleep 1; done . . ^Z [1]+  Stopped                 sleep 1 $ fg sleep 1 $   I'm familiar with signals, and I'm guessing this may be the natural behaviour of bash here, but I'd like to better understand why it behaves in this particular way.


There's one tweak of my phone I'm applying/removing through two some pretty simple shell scripts. But going to terminal emulator and typing the script names each time aside, the tweak actually makes on-screen keyboard unusable and may necessitate adb access to start deactivate.sh  Is there a way to launch the scripts from the home screen - just place them as icons, the way you can just double-click a .bat file on your desktop on Windows?

I'm using terminal-ide  which is basically a terminal for android with all sorts of utilities. One is able to create bash scripts for example. Is there a way to create an icon on the home screen that will launch one of these scripts?


I am trying to create a shell that allows a user to input "ping" commands and use CreateProcess() to execute the command based on user input. I am running into trouble getting the ping command to work when dealing with variables. For example the code below works just fine as long as I have the L in front of the string. However, the string has to be given by user input so after some research I ran across a possible substitution of the L cast in the form of a wchar_t variable.  if (strcmp(buffer, "ping") == 0 || strcmp(buffer, "ping &") == 0){         LPCTSTR path = L"C:\\Windows\\System32\\PING.exe";         LPTSTR link = L"-t www.yahoo.com";         CreateProcess(path,             link,             NULL,             NULL,             0,             0,             NULL,             NULL,             &start,             &info);         if (strcmp(buffer, "ping") == 0){             WaitForSingleObject(info.hProcess, INFINITE);         }         CloseHandle(info.hProcess);         CloseHandle(info.hThread);          printf("MyShell: ");         scanf("%s", buffer);   If I do this change, it stops working (console crashes, no output).           wchar_t wideC = "-t www.yahoo.com";         LPCTSTR path = L"C:\\Windows\\System32\\PING.exe";         LPTSTR link = wideC;   I've tried casting different types of variables both in the CreateProcess() arguments and outside. I don't know what else to do. How can I get the user scanf() into a variable that will work as an argument for creating a process?

This seems like a pretty softball question, but I always have a hard time looking up this function because there seem there are so many variations regarding the referencing of char and tchar.


I am reopening an issue about:     RuntimeError: ERROR 000824: The tool is not licensed   Since I could not find the answer to my problem in previous issues.  I am running a script.py in Anaconda. The scripts requires arcpy that I can import to python.  When I run the script, everything seems alright until the end where I get the following error:   File "C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\sa\Functions.py", line 4483, in Times     in_raster_or_constant2)   File "C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\sa\Utils.py", line 53, in swapper     result = wrapper(*args, **kwargs)   File "C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\sa\Functions.py", line 4480, in Wrapper     ["Times", in_raster_or_constant1, in_raster_or_constant2]) RuntimeError: ERROR 000824: The tool is not licensed.  I have checked my extensions in ArcMap and all of them are ticked. In addition, I have a license for ArcGIS that I had previously authorized.  I cannot figure it out and I don't know which tools are not licensed.

My Arcpy code is not working in ArcMap 10.1 because an error with the last line:      Error 000824: The tool is not licensed.    I have all my extensions turned on, so I don't know why I would be getting this error. It seems I only need to import arcpy.sa.   Did I do this correctly, or are there other modules that should be imported for this code to work?  import arcpy, os, string, glob, sys from arcpy import env from arcpy.sa import *  env.workspace = r"C:\VMshared\small_example_valley8\SD2part" outFolder = r"C:/VMshared/small_example_valley8/SDpartINT/INT"  for rasterFile in arcpy.ListRasters("*.tif"):     oName, oExt = os.path.splitext(rasterFile + ".tif")     outRaster = os.path.join(outFolder, oName + ".tif")      arcpy.gp.Int_sa(rasterFile,outRaster)


I would like to know if bonsai type of a tree is a separate species from its normal version. Do they differ by genes, or is it just a matter of different physical care?  Can I grow a bonsai tree from seed of a normal outdoor tree (of course, I understand that not every species will endure being dwarfed)? Can I grow a normal outdoor tree from some seeds labeled "bonsai"?

With practice one can create a bonsai; no complicated modification of the DNA in a high-end lab required. The bonsai will even beget bonsai fruit.   What I am curious about is - if such bonsai fruit is planted again, will it give rise to a normal, or a bonsai tree?


Why does a smaller aperture size have a high depth of field? What is the physics behind this?

There are several questions here about , about , and about . And of course there's the basic . And plenty of  questions. There's related questions like . But there's no be-all-end-all question asking:  What exactly determines depth of field in a photograph?   Is it just a property of the lens? Can lenses be designed to give more depth of field for the same aperture and focal length? Does it change with camera sensor size? Does it change with print size? How do those last two relate?


I'm trying to enter in a reminder for payday.  I'm paid on the 15th of each month.  However, if the 15th falls on a Saturday or Sunday, I'm paid on Friday.  I have no problem entering a recurring event on the 15th.  It's not having it fall on a weekend that I can't figure out.   Someone asked a  but that is always setting a reminder on the 14, so that some months it would be early. It seems this person was trying to make Friday events fall on a Thursday and Sunday events fall on a Monday.  I want anything on Saturday or Sunday to fall on Friday.  I'm hoping to make an .ics event that I would import into my calendar.   worked for me to enter the event for the last day of the month but I can't figure out how to edit it to work on the 15th.  I was trying to edit BYSETPOS and it didn't work.

I would like to create a reminder on Google Calendar every month on the 15th, but if the 15th in that month is a Friday/Saturday, I want it automatically to set it to the closest Sunday/Thursday. Is this possible?


While self studying cosmology as well as reading around I can't find a satisfactory answer to this question. My thinking is that in principle universe could have started already infinite or as a thiny speck.   The first case is as to say that I can imagine a collection of thiny speck or it is wrong? This picture indeed let me think of space as already existing unless those infini speck of something can imagined as not having volume .  But at least they should have had one at about the Planck scale.   Conversely, if I think of only one speck, I do understand that it could have generated the observable universe as well the "outer" one (via inflation, right? ) but I have troubles to see how the cosmological principle can be used in very very far parts of the universe. In other words why it should/could have a size exceeding those compatible with inflation (this latter is a mind blowing factor, but not infinite).  I am not arguing about currently standard ideas, I try to visualize them .  Edit: or simply it was infinite but space did have to start its expansion? This and its consequences are impossible to visualize but conceptually could make sense. However, there should be an horizon problem at enormous scale exceeding the inflation range.... really confusing

TV documentaries invariably show the Big Bang as an exploding ball of fire expanding outwards. Did the Big Bang really explode outwards from a point like this? If not, what did happen?


So about 6 months ago I set up a wheezy server and at the same time I installed MySQL even though I didn't need it.  I've now updated to Jessie and need the database but can not remember the password as I made it rather secure. I thought I wrote it down somewhere but can not find it sigh. This is rather a noob thing to do and I am quite embarrassed by it.  Thank you in advance for your help.

I have a MySQL database that I "inherited" and I was not given the admin credentials.  I do however have access to the box that it runs on.  Is there a way to either recover the admin credentials or create new ones?


There is a short-cut for finding the inverse of 2x2 matrices     Can someone please explain why it works ? because I can't find any proof ?

I am looking for a derivation for the inverse of a 2x2 matrix. I am also wondering why the determinant is involved in the expression. I am familiar with high school maths and linear algebra. If there is an intuitive reason for expression i would also be interested in that.


I try to display customer profile on my apps, but these line of code makes app crash when I click on the profile button(profile page)  the error said that Attempt to invoke virtual method 'void android.widget.EditText.setText(java.lang.CharSequence)' on a null object reference  my name and address can be displayed but not my email and my phone number which is weird why it happen like that?   I check my database it contains data, I got stuck here on how to solve my problems because the code can't read my email and phone number but can ready my name and address.  public class CustProfileActivity extends AppCompatActivity {      TextView email;     EditText name, address, phone;     Button update;      DatabaseReference databaseReference;     FirebaseAuth firebaseAuth;     String userId;      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_cust_profile2);          name = findViewById(R.id.name);         address = findViewById(R.id.address);         update = findViewById(R.id.update);           databaseReference = FirebaseDatabase.getInstance().getReference("Customer").child("");         firebaseAuth = FirebaseAuth.getInstance();         userId = firebaseAuth.getUid();          databaseReference.addValueEventListener(new ValueEventListener() {             @Override             public void onDataChange(@NonNull DataSnapshot dataSnapshot) {                 Customer cust = dataSnapshot.child(userId).getValue(Customer.class);                  name.setText(cust.name);                 address.setText(cust.home_address);                 phone.setText(cust.telephone_number);                 email.setText(cust.email);              }              @Override             public void onCancelled(@NonNull DatabaseError databaseError) {              }         });     <TextView         android:layout_marginTop="10dp"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:text="Phone No"         android:textSize="13sp"/>      <EditText         android:id="@+id/phone"         android:layout_width="match_parent"         android:layout_height="wrap_content" />       <TextView         android:layout_marginTop="10dp"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:text="Email"         android:textSize="13dp"/>      <TextView         android:id="@+id/email"         android:hint="email@gmail.com"         android:layout_width="match_parent"         android:layout_height="wrap_content" />     public class Customer {     public String id;     public  String name;     public  String email;     public String home_address;     public String telephone_number;       public Customer(){      }        public Customer(String id, String name, String email, String home_address, String telephone_number) {         this.id = id;         this.name = name;         this.email = email;         this.home_address = home_address;         this.telephone_number = telephone_number;     }     public String getId() {         return id;     }      public void setId(String id) {         this.id = id;     }      public String getName() {         return name;     }      public void setName(String name) {         this.name = name;     }      public String getEmail() {         return email;     }      public void setEmail(String email) {         this.email = email;     }      public String getHome_address() {         return home_address;     }      public void setHome_address(String home_address) {         this.home_address = home_address;     }      public String getTelephone_number() {         return telephone_number;     }      public void setTelephone_number(String telephone_number) {         this.telephone_number = telephone_number;     }

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


This BBC report () suggests that we should use "Dickens' Great Expectations", but I remember there is a rule from Strunk and White () that would suggest "Dickens's Great Expectations".    Is this just a difference due to British English vs American English?  BBC's report:     Armagh, Banbridge and Craigavon Borough Council's grammatical error   appeared on an advert for a performance of Charles Dickens' Great   Expectations in July.   Strunk and White     Form the possessive singular of nouns with 's.      Follow this rule whatever the final consonant. Thus write,    Charles's friend  Burns's poems the witch's malice         This is the usage of the   United States Government Printing Office and of the Oxford University   Press.   Exceptions are the possessives of ancient proper names in -es   and -is, the possessive Jesus', and such forms as for conscience'   sake, for righteousness' sake. ...

Possible Duplicate:             I just bought The Elements of Style, an awesome little book. However, in the first section, the authors promote the use of 's, no matter what the last letter of a word is, to show possessiveness.  Some examples they use:        Charles's friend     Burns's poems      Are these grammatically correct?


Althought I have setup my rDNS correctly and have SPF and DomainKeys setup on my cPanel server I'm still getting all emails sent from our mailserver to spam, unless the domain is whitelisted by the receiver.  Any place I can go for them to whitelist my IP or how could I go about finding a solution?

This is a  about how to handle email sent from your server being misclassified as spam.  For additional information you may find these similar questions helpful:                    Sometimes I want to send newsletters to my customers. The problem is, that some of the emails get caught as spam messages. Mostly by Outlook at the client (even in my own Outlook 2007).  Now I want to know what should be done to create "good" emails. I know about reverse lookup etc., but (for example), what about a unsubscribe link with an unique ID?  Does that increase a spam rating?


E.g. why do we experience gravity all the time, but on an atomic scale, the gravitational forces are so small?

Why is gravity stronger than other forces at the macroscopic level, yet weaker than other forces at the quantum level? Is there an explanation?