how to change the style of clicked th in table

I have a javascript which makes a table in HTML sortable. However I want to style the header of the column which is clicked using javascript.   How can I get the thead of the table? I know the column of the header which i need to change.  Here is what my javascript returns to me right now.  javascript  console.log(table.tHead);   output to console:

             Name	             Times Placed	             UMF (KB)	             UAC	             Texture Memory (MB)	             Texture Count	             Mesh Memory (KB)	             Mesh Count	             Path


Why does "cat {foo}" not output foo, but "cat {foo,bar}" does?

I was trying to concatenate text files in sub-folders and tried:  cat ./{mainfolder1,mainfolder2,mainfolder3}/{subfolder1}/book.txt > out$var   However this did not return anything. So, tried adding a non existing 'subfolder2'  cat ./{mainfolder1,mainfolder2,mainfolder3}/{subfolder1,subfolder2}/book.txt > out$var   And this time it did work out, concatenating the files successfully. Why does this happens?


How to prove  $\pi^3<3^\pi$ without using explicit value of $\pi$?  In the following link I proposed similar problem and got extremely amazing explanations which uses pure geometrical ideas :   Here too I am thinking some similar kind of idea (not involving calculus) but not getting any. Can there also be something like that?


How to prevent my volumetric lighting cube to reduce my main light in the scene

When i created a cube that surrounds the whole scene it looked pretty however it decreased my sun lamp's emission effect on my bushes and doing so it decreased glossy level of my plants which its not a thing im comfortable with i tried to increase my sun's emission level but didnt do it


Does Mordenkainen's Private Sanctum prevent me from opening a Portable Hole?

Mordenkainen's Private Sanctum says that  planar travel is blocked within the warded area  and the portable hole's description states that  the cylindrical space within the hole exists on a different plane.  Does this mean that portable holes' contents can't be accessed within a private sanctum?


I updated my latop recently and after the update it started overheating and shutting down.  This is problem which I have had previously on this laptop and the solution was to use fglrx driver. The opensource driver overheats my laptop which has a good change of damaging my hardware.  So knowing this I checked additional drivers and discovered that fglrx was no longer an option.   What has happened to fglrx and how do I get it back?  My graphics card is a Mobility Radeon HD 4530.  As previously stated the opensource driver is not an option because it causes my laptop to overheat and shutdown.  To clarify, I want to know why the driver was removed in the update and get back to the official distro version of fglrx not install the latest from ati.


A "#1#" argument. What is the meaning of the second hash?

In an answer to this question  egreg uses   \def\relaxtag#1#{\relaxrelaxtag} \def\relaxrelaxtag#1{}   The role of the second # is unclear or me. It seems to be neither element of definition with arguments with the structure nor alignment marker.


What's the simplest, most standard, and/or most efficient way to split a List into two sub-Lists in Java? It's OK to mutate the original List, so no copying should be necessary. The method signature could be  /** Split a list into two sublists. The original list will be modified to  * have size i and will contain exactly the same elements at indices 0   * through i-1 as it had originally; the returned list will have size   * len-i (where len is the size of the original list before the call)   * and will have the same elements at indices 0 through len-(i+1) as   * the original list had at indices i through len-1.  */ <T> List<T> split(List<T> list, int i);   [EDIT] List.subList returns a view on the original list, which becomes invalid if the original is modified. So split can't use subList unless it also dispenses with the original reference (or, as in Marc Novakowski's answer, uses subList but immediately copies the result).


I  where user only get articles to edit.  How can I set up the page that it opened when a user logged in?


When we concatenate a number which starts with zero with a string to form a string, why the resulting string do not properly store the value in Java?

I was trying to write a program which extracts all the digits of a number(including for numbers like 0001200) in Java public class stringarray3       {         public static void main(String[] args)          {             String s=0100+"";             String c[] = s.split("");             for(String i:c)             {                 System.out.println(i);             }         }           }  It prints correct result for any number which do not start with zero, but a number starts with 0, it does not. I have checked the value of string in the debugger and it is showing that the string S String s=0100+"";  is storing it as 64, what is the reason behind this?


If $A$ and $B$ are linear transformations on a finite-dimensional inner product space, and if $\textbf{0} \leq A \leq B$, then det $A \leq$ det $B$.

Exercise 12 from SEC. 82 of Finite-Dimensional Vector Spaces - 2nd Edition by Paul R. Halmos.  If $A$ and $B$ are linear transformations on a finite-dimensional inner product space, and if $\textbf{0} \le A \leq B$, then $\det A \leq \det B$.  Notation: $0 \le A$ means that $A$ is positive.  If $\det B = 0$, choose $x \in \ker B$, then $0 \le ((B-A)x,x) = (Bx, x) - (Ax, x) = -(Ax, x) \le 0$. Therefore $\ker B \subseteq \ker A$ and $0 = det A \le det B = 0$. How to prove for the case when $B$ is invertible? Intuitively, I feel that since both $A$ and $B$ are positive their proper values are also positive and $B$'s proper values should be greater the $A$'s and same for determinants.


I want to create a collection of actions for specified class types. I was attempting something as follows.   Map<Class<?>, Function<String, ?>> mapper = new HashMap<>();   I end up populating this as   mapper.add(MyClass.class, s -> someMethod(s));   and the usage then looks like  mapper.get(MyClass.class).apply("someString");    This is all good, But I also want to force the return type of Function to match the key for the mapper. That is have the mapper defined as   Map<Class<T>, Function<String, T>> mapper = new HashMap<>();   The objective is that mapper should only be populated with functions which return an object of the type specified by the key. In effect, I want to make sure that   mapper.get(MyClass.class).apply("someString");   returns an object of the type MyClass. However using the T instead of the wildcard does not appear to work. I get a compiler error. Is this even possible in Java or I am kidding myself and should stick to the wild card approach?


!! This question is not about SHELL, it's about BASH, can't change the faulty tag !! I've got a code that removes the spaces in directories and filenames (and inserts a dot); find $jdir -depth -name "* *" -execdir rename 's/ /./g' "{}" \;  let's say $jdir = "test files are here" This code don't rename the $jdir. and I can't set it to the parent directory, because then it would rename a lot of other directories. How do I get it to rename the $jdir? (testing bug? in forum, disregard this line) I can't change the tags, a bug in the forum?


How do I turn this Bezier thing into a normal mesh that I can edit?

I followed a youtube tutorial to make the handle of this watering can. I had to make a path and a "bezier" circle, I don't really know what that means.    The outliner looks like this    I can't actually select the bezier thing or the curve by clicking on them, I have to select them in the Outliner. I'd like to do away with all of that stuff, it has the right shape now, I just want the mesh that you can see in the viewport, so I can reduce the polycount and export it. How do I do this? I tried pressing alt+C a couple of times with those things selected, as I found on the internet, but that didn't work.  Edit: Here's the file:


I need to thicken ("fatten") some parts of my mesh. I tried to scale X but it deforms and make a mess. How do I solve this?


Access denied even though I'm an Administrator?

My user account on Windows 7 is part of the Administrators group which has a full control permissions on C:\inetpub\wwwroot:    However, when I try to create a folder in it, I get the "access denied" error. This is fixed by adding my specific user account to the list but that shouldn't be necessary should it?


I am searching for a client-side template engine for plain HTML pages. I am not talking about single DIV's in the page, I'm talking about the full page.  Say I have a simple webapp, with a menu, and 100 menu entries. So, there are in fact 100 different pages (100 different webapps!), and I want different urls for them:  http://mysite/myapp/page1.html ... http://mysite/myapp/page100.html   Now, the 100 pages share a common layout (a menu bar, a header, a footer, and the whole HTML head), and I don't want to cut-and-paste them 100 times, it's absolutely wrong. I want to keep template tiles in different files, and to merge them with some client-side JS framework.  I have looked to AngularJS and to Handlebar.js, but I cannot see a simple way to do this. You always have to write tons of code.  Old technologies (FRAME's and IFRAME's) are deprecated, IMHO.  So, my question is, what are the possible solutions?  I think this is a common task, however I cannot find a clear answer.  Please notice this is a very simple task if performed server-side (with PHP, JSP, or whatever).


Wireless Card not working on Dell D620 w/ 15.10

I bought a used lap top (Dell D620) for my daughter for Christmas and it works great accept after I loaded Ubuntu the wifi card is not there. It was there when windows was loaded but I wiped it. I have seen a few posts on the topic but the threads are a little confusing. Can anyone tell me how to get this lap top to see the wifi? I'm a little familiar with the terminal emulator on Ubuntu  Thanks


How can I check if my DNS server is working?

This case scenario is for a router with embedded linux, but I think   the answer could be the same for any Linux system.   This is my DNS check:  ~ $ cat /etc/resolv.conf nameserver 80.58.61.250 nameserver 80.58.61.254 ~ $ ping 80.58.61.250 PING 80.58.61.250 (80.58.61.250): 56 data bytes 64 bytes from 80.58.61.250: seq=0 ttl=250 time=50.0 ms 64 bytes from 80.58.61.250: seq=1 ttl=250 time=40.0 ms ^C --- 80.58.61.250 ping statistics --- 2 packets transmitted, 2 packets received, 0% packet loss round-trip min/avg/max = 40.0/45.0/50.0 ms ~ $ ping www.google.es PING www.google.es (2a00:1450:4007:808::101f): 56 data bytes ping: sendto: Network is unreachable ~ $ ping 8.8.8.8 PING 8.8.8.8 (8.8.8.8): 56 data bytes 64 bytes from 8.8.8.8: seq=0 ttl=57 time=50.0 ms 64 bytes from 8.8.8.8: seq=1 ttl=57 time=40.0 ms 64 bytes from 8.8.8.8: seq=2 ttl=57 time=40.0 ms ^C --- 8.8.8.8 ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max = 40.0/43.3/50.0 ms   As can be seen, there is a response from internet (8.8.8.8) but not from domain names (www.google.es, same for www.google.com). The DNS server (80.58.61.250) answers to pings. So I was wondering if the problem could be in that DNS server.    Is there some way, like telneting or similar, to check if a given DNS IP works as it must (this is: answering with a IP address when requested for a domain name)?    For example, when testing a SSH server, a possible trick is:  C:\Users\Luis>telnet Midnighter- 22 SSH-2.0-OpenSSH_6.7p1 Debian-5   Third party tools accepted. Command line and Open source preferred.


Don't duplicate images on stack.imgur.com

User posted a link to  in . So I edited it to actually show the image. I didn't remember image syntax used here, so I used GUI button. that was much faster than reading syntax help and I expected it to gave me the same result as manual wrapping URL into image tags. I was surprised to see  as created URL. I replaced new one with old URL and it worked good, too, so reupload wasn't really needed.  It seems each time someone will want to correct broken markup using GUI tools, new copy of image will be created. It's both a waste of time and HDD space. Could you add filter to GUI tools, so that if image is already on stack.imgur.com your tool would not try to upload it again, but would just use the copy available there?  Tested on  and , in this very post.


What choices of $a$ and $b$ of the affine cipher lead to proper encryption functions

Suppose I consider the affine cipher defined by $E(x) = ax + b \bmod n$  on the standard alphabet of 26 letters. Which choices of $a$ and $b$ lead to proper encryption functions?  Using the information provided from this :  They say that $a=5$ and $b=8$ works, but $a=4$ and $b=5$ does not work.  My understanding is that in cases where it does not work then different letters prior to applying this cipher results in the same ciphertext having applied the cipher.  However, I consider this explanation to be quite woolly. How would I know which choices would work prior to applying the cipher?


After installing google chrome beta version, when i used (sudo apt-get update) this command, gives me below prompt.  Reading package lists... Done W: Duplicate sources.list entry http://dl.google.com/linux/chrome/deb/ stable/main amd64 Packages (/var/lib/apt/lists/dl.google.com_linux_chrome_deb_dists_stable_main_binary-amd64_Packages) W: Duplicate sources.list entry http://dl.google.com/linux/chrome/deb/ stable/main i386 Packages (/var/lib/apt/lists/dl.google.com_linux_chrome_deb_dists_stable_main_binary-i386_Packages) W: You may want to run apt-get update to correct these problems


What all is included in Red Dead Redemption GOTY edition?

I know that it includes the regular Red Dead Redemption game & the Undead Nightmare DLC, but are all of the other DLC's included also? Is everything included on the disc or do they just include a DLC code so you can download the additional parts?


How do I calculate the difference between dates?

I have 2 dates 1.7.2016 and 5.12.2016, and I need to calculate number of days from month with 31 day (31+31+31+4=98).   How can I get the number of days?


How to "bump" a question that's the same as the one you wanted to ask

I wanted to ask a question about Hibernate and polymorphism, and before asking it I searched on Google, and lo and behold, there was already . It's three weeks old and has never really been answered. What's the most appropriate way to "bump" it up to being higher up in the "active" list? I don't have an answer to it myself, and I'm not the OP so I don't want to edit the original post. And SO etiquette says I shouldn't ask a duplicate question. What should I do?


I always have to log in again if I'm going from any SE website to SO. How can I merge my SO and SE accounts so that I don't have to log in twice?


I was watching this documentary about time:    It shows that gravity does effect time, and the higher the force the slower time will pass and slower you will age.  On earth we are also pulled by gravity and the closer we get to the center of the earth the stronger the force of gravity. Therefore if you were to swim really deep in ocean would that have the same effect on time as it would do for spaceship orbiting black hole?  I know that there is lava down there but in general would swimming around the center of earth have an effect in time?


How to set active Pose Library selection from Python (for running ops)

(I also asked this on Blender Artists)  I’m trying to run:  bpy.ops.poselib.apply_pose(pose_index=index)   For some reason I can’t seem to be able to find way to set active pose action to be able to run this.   I’ve found how to get access to current action (I think):  context.object.animation_data.action = bpy.data.actions.get(sel)   But it isn’t the same thing. Doing this does work for selecting action, it sets current action in Dope sheet BUT it doesn’t set it in Properties window’s Pose panel… rendering it useless.  I would need to be able to set the actual Properties window Pose Library panel selection.   If I run ops code with incorrect Pose Window selection, it just fails …but if I change target pose library manually, it works.  One would think that if ops exists, there has to be a way to also select which one of Pose Libraries to target.  Any help appreciated!


I need some proof on this statement that not every boolean function is equal to a function constructed by only using ∨ and ∧. I need a boolean function that does not constructed using ∧ and ∨ which I am assuming that it is p⊕q but I need help on this.


What is a single word meaning "authoritative source of knowledge"?

I'm looking for a word that means authoritative source of knowledge.  The word would preferably be a noun and could refer to a group of people or a collection of knowledge.  Additionally it'd be strongly preferred if the word would not be a derivative of encyclopedia.


Show that the cross-product term $\hat y'r$ from $ y'y$ is 0

Show that the cross-product term \hat $y'r$ from $y'y$ is 0.  I see that $y'y = ( \hat y + r)'( \hat y + r) = \hat y' \hat y +  \hat y'r + r' \hat y + r'r$  But not sure what identity can be used here to break up  $\hat y'r$ such that it can be equal to 0.  r = residuals y = response value $\hat y$ = predicted value  The notes package written by a professor has this under an ANOVA section so the link you gave me, I'm not seeing the connection, but then again I also don't get the course notes and question so maybe I'm wrong here :|


Why doesn't `\addtocounter` work inside an \edef?

When running the following code the counter testcount will update outside but not inside the \edef. Why?  \documentclass{scrartcl}   \global\newcounter{testcount} \message{TESTCOUNT NEW: \thetestcount} % outputs 0  \setcounter{testcount}{1} \message{TESTCOUNT SET: \thetestcount} % outputs 1  \addtocounter{testcount}{3} \message{TESTCOUNT ADD: \thetestcount} % outputs 4  \edef\trytoadd{%     \addtocounter{testcount}{3}     \message{TESTCOUNT EDEF: \thetestcount}     % still outputs 4 - why? } \trytoadd   \begin{document}  \end{document}


Will the AMDGPU PRO driver for AMD R9 270X work in Ubuntu 16.04 with my AMD HD 7870?

I have an HD 7870 and I read it is the exact same card with the R9 270X, just with another name. I want to upgrade from 14.04, but the AMDGPU PRO does not support the 7870. However, it supports the R9 290X. Will it work?


How can I run Ubuntu installer from a USB ? I am not able to run this normally. My system runs in this strange mode (screenshot)

There is screenshot of what I can see right after boot-up.    Another photo.  ()  Some info: Ubuntu 16.04 Asus E200HA I have used built-in Ubuntu tool, My chipset is Cherry Trail.    I have arrived normaly right after reboot. My tool was normal ubuntu pre installed tool. My chip is intel atom, cherry trial graphics.


What is the distance between the centers?

Two unit circles overlap in such a way that exactly half the area of each circle is within the overlap. How far apart are the centers of the two circles?


Distribution of ratio of two independent normal variables

My objective is to find out the distribution of $A/B$ given $A \sim N(a,b); B \sim N(c,d)$.   I set $Z_1$ equal to $\frac{(A-a)}{\sqrt{b}}$ and $Z_2$ equals $\frac{(B-c)}{\sqrt{d}}$ such that $Z_1$ and $Z_2$ are both $N(0,1)$.   Then I let $U=\frac{Z_1}{Z_2}$ and try to find out $g(U)$ (standard Cauchy distribution).   Could someone please let me know whether I am on the right track or not?


$A$ local Noetherian ring with principal maximal ideal implies PIR?

Suppose that $A$ is a local Noetherian ring with principal maximal ideal. Can we prove that every ideal of $A$ is principal?   I tried to exploit the Noetherian property on the set of non-principal ideals obtaining that (if the statement is false) there must exist  a prime non-principal ideal but I can't conclude nothing.


I define a sequence as following:  A[0] = 0 A[1] = A[2] = 1 A[n] = A[n-1] / cos (pi/n)   My question is - does this sequence have a finite limit? If yes, what that is?  Where does this come from: I try to understand if there is a limit to how circumcircles can grow if I keep building on a regular n-gon step by step, each step increasing the count of sides of the n-gon by 1. So it goes like this:   For 0 we just assign radius as 0 For 1 and 2 there are no n-gons, we assign 1 (this is conventional) For 3 we are looking on an excircle of a triangle. This is our A[3] For 4 we are building a square around the circumcircles of a triangle (thus that circle will be an inscribed circle for that square). Then we build circumcircles for that square. This is our A[4] ...   My reasoning for the sequence goes like this:   I wrote a simple recursive function that calculates the circle radius. And it looks like it converges:  (outputting last 10 members) 9999998-th rad is: 8.7000323319286 9999999-th rad is: 8.700032331929   but I was unable to progress in proving that the sequence even converges, let alone to find the limit.  "Intuitively" I feel as there must be a finite limit because n-gon gets closer and closer to a circle eventually becoming its own circumcircles. But then again we all have this awkward situation with the harmonic sum which "feels like should converge"


$K[X,Y]/(XY-1)$ not isomorphic to $K[T]$

Why is $K[X,Y]/(XY-1)$ not isomorphic to $K[T]?$  As a hint I should think about units. But I don't get a helpful idea.


When I attempt to do any updates, I receive the following error message:  E:Encountered a section with no Package: header,  E:Problem with MergeList /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_precise-security_restricted_binary-i386_Packages,  E:The package lists or status file could not be parsed or opened.


How to find a tabletop RPG group open to newbies in France?

I would like to try out tabletop RPG games but don't know how to find a group.     Is there an usual way to find other players? Especially ones who would accept a complete newcomer to join ?  I tried basic internet search, Meetup and Facebook, with no result.    I live in France and can play in either French or English. Answers containing tips specific to the country and links to websites or social media groups in either language are welcome.


Pearson VS Deviance Residuals in logistic regression

I know that standardized Pearson Residuals are obtained in a traditional probabilistic way: $$ r_i = \frac{y_i-\hat{\pi}_i}{\sqrt{\hat{\pi}_i(1-\hat{\pi}_i)}}$$ and Deviance Residuals are obtained through a more statistical way (the contribution of each point to the likelihood): $$ d_i = s_i \sqrt{-2[y_i \log \hat{\pi_i} + (1 - y_i)\log(1-\hat{\pi}_i)]} $$ where $s_i$ = 1 if $y_i$ = 1 and $s_i$ = -1 if $y_i$ = 0. Can you explain to me, intuitively, how to interpret the formula for deviance residuals? Moreover, if I want to choose one, which one is more suitable and why? BTW, some references claim that we derive the deviance residuals based on the term $$-\frac{1}{2}{r_i}^2$$ where $r_i$ is mentioned above.


What type of buildings offer what level of jobs?

There are three tiers of workers (as is everything else); tier 1, 2 and 3. What I am having a hard time with is figuring out what I can build to target workers from each of the tiers. I gather what I am sure everyone else has, low tech industrial (regardless of density really) provides mostly tier 1 jobs.  But what are my other building options for tier 1 jobs? If I want to target tier 2 or 3 what types of buildings should I consider?


Transfer files between two remote SSH servers

Is there an easy way to transfer files between two SSH/SFTP servers? The perfect solution would be FileZilla, but it only lets you create a connection between local and remote, but not between remote and remote.  Theoretically I could open two Nautilus windows and connect to some ssh://server1/path/to/folder and ssh://server2/path/to/folder and then just pull the files from one to the other side. My experience is that this is very unstable. Transmitting files in size sum of i.e. 10MB is no problem, but transferring i.e. 10GB often resulted in Nautilus hanging itself up and remaining there in need of ps -e | grep nautilus -> kill -9 <pid>. I also tested the same thing with Nemo and Caja. While Nemo tends to be more stable than the two others, it still is not perfect and also breaks from time to time. FileZilla is extremely stable, never really got it to break, but it is not very flexible due to the mentioned fact that it can only connect to a single SSH server.  Of course I could also mount a folder with sshfs, but this is kind of an inconvenient solution. Too much pre-work to do to get a simple transfer running.  Is there any app that can handle transfers between two SSH servers without breaking? Perfect would be something like FileZilla, that picks up the job again if the connection got interrupted.


The length of an interval covered by an infinite family of open intervals

Prove that if $I$ is an interval of $\mathbb R$, covered by an infinite family $\{I_n, n\in \mathbb N\}$ of open intervals, then (where $\ell(I)$ denotes the length of $I$):  $$\ell(I) \le \sum_{n=1}^{\infty} \ell(I_n)$$  It is very intuitive but hard to prove (in a formal manner). The exercise gives the hint: prove that $\ell(I) = \sup\{\ell(K), \text{$K$ is a compact subset of $I$}\}$. I proved this, but I can't see how this hint makes the problem any easier to prove.   I thought about doing the following: If $I$ is unbounded, then we are done, so let's assume that it's bounded. Due to the connectedness of $I$, we can WLOG suppose that the $I_n$'s are such that $I_n \cap I_{n+1} \neq \varnothing$ for each $n$ (this would be the ideal situation, I guess). By the axiom of countable choice, we can find a sequence $(a_n)$ where $[a_n, a_{n+1}] \subset I_n$ for each $n$. Then:   $$\sum_{n=1}^{\infty} \ell(I_n) = \sum_{n=1}^{\infty} \sup  \{ \ell([a_n,a_{n+1}]) = a_{n+1} - a_n\}$$  Does this make any sense? How to proceed? Thank you.


Comma use: Two variables, A and B, were examined in separate models

Grammarly recommends removing the second comma but for me it seems that this is needed. What would be the correct comma use in such a sentence?  Two variables, fracture type and management method, were examined in separate models since certain fractures are treated with specific operation methods.


Can someone explain the command: file -- *

I ran the command file -- * and got this output: -file04: data -file05: data -file06: data -file07: ASCII text  So it basically prints filename and content type. But what do the parameters mean?


Is it ever appropriate to use a space before and after an ampersand?

A colleague and I have a difference of opinion. I believe our department should be abbreviated as "L&D." She believes it should be "L & D," which just looks silly to me. I never see spaces used before and after an ampersand when the term is an abbreviation (two distinct words, yes, but an abbreviation, no), but I haven't been able to find a rule pertaining to this particular issue. Is there one?


Is there any preposition before "next week"? Is it "I would send you the proposal next Monday", or "...on next Monday"?


Why Increment Statement in python 3 not working?

I wrote a simple script which increments a integer, but it is not working and i got an error.  my script :  x = 1 def inc():     x +=1     print(x)  if __name__ == "__main__""" :     inc()   when i run this script i got this :   palash@ash:~/PycharmProjects/src$ python tt.py Traceback (most recent call last):   File "tt.py", line 7, in <module>     inc()   File "tt.py", line 3, in inc     x +=1 UnboundLocalError: local variable 'x' referenced before assignment palash@ash:~/PycharmProjects/src$   my python version : Python 3.6.1 :: Anaconda custom (32-bit)  and I'm running on Ubuntu 17.04 32bit  I can't understand what is happening. Help me please  Edit: And can anybody define what is UnboundLocalError?  And Why  "__main__"""is working ?


I have problems with biber (Version 2.4 and 2.5). The error messages are, however, not very instructive. I would urgently like to know whether there is an option to have biber giving more info, e.g. about the offending entry in the library. As I run biber at the command line I could easily pass this option to biber and ??repair the library. BTW I have seen . I does not answer my question.


How do you disable escape to exit fullscreen?


Why my machine learning's prediction appears to be random guesses?

I'm doing a classification exercise to predict churn using random forest.  My current metrics are:  Yes - Precision: 0.68   Recall: 0.61  No - Precision: 0.86   Recall: 0.9  However, whenever I try to predict new data (where "No" should correspond to 70% of the dataset), It appears to random guesses at the data (Churn = Yes = 1).  For the predicted data, it's some sample I took from the original dataset that the model does not see. Here is the distribution of the true target values and the predicted:  True  No:    977  Yes:   106  Predicted  No:  651  Yes:  432  Threshold = 0.5 Precision: 0.12  Recall: 0.75 True Positives: 80 False Positives: 571 True Negatives: 406 False Negatives: 26  I thought it would be an overfitting problem so I fitted a gradient boosting with default parameters and I got the same behavior as above.  I ran this model in two ways:  1 - It was unbalanced, so I bootstrapped the "Yes" class.  2 - No was 70% and Yes 30%.  Both had the same behavior.  Does someone have an idea for what's possibly happening?  variables = set([X, Y, Z])  X = df[variables]  y = df['churn']  X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.35,random_state=45)  sc = StandardScaler() X_train = sc.fit_transform(X_train) X_test = sc.transform(X_test)  clf = RandomForestClassifier(random_state=2, n_estimators = 200, min_samples_split = 5,  min_samples_leaf = 1,                              max_features = 'sqrt', max_depth = 60, bootstrap = True, oob_score = True) clf.fit(X_train, y_train)   clf.score(X_test, y_test).round(4)  y_pred = clf.predict(X_test)  y_pred = clf.predict(X_test) cm = confusion_matrix(y_test, y_pred) pd.crosstab(y_test, y_pred, rownames=['True'], colnames=['Predicted'], margins=True)  Predicted   0   1   All True             0   1045    122 1167 1   166 262 428 All 1211    384 1595  y_pred_new = clf.predict(new_data[variables].drop('id', axis = 1))


Repeating points by field using ArcGIS for Desktop?

I have a point layer in ArcGIS that has a field named "Population" that stores an integer value for every point in the layer.  I want to create N points in the exact place of the feature that has N as value in the population "field". I mean, if a point has in the population field 16, I need to create 15 more points in that exact lat long (1+15 so that there are 16 in total) of that point.


Could not read dvd despite having restricted extras

I still can't seem to play movie DVDs on my Ubuntu 11.10 even after installing restricted extras and after trying   This[a] is the error message that I get with movie player. VLC doesn't play the DVD either.  What gives  [a]Could not read DVD. This may be because the DVD is encrypted and a DVD decryption library is not installed.


Why mini batch size is better than one single "batch" with all training data?

I often read that in case of Deep Learning models the usual practice is to apply mini batches (generally a small one, 32/64) over several training epochs. I cannot really fathom the reason behind this.  Unless I'm mistaken, the batch size is the number of training instances let seen by the model during a training iteration; and epoch is a full turn when each of the training instances have been seen by the model. If so, I cannot see the advantage of iterate over an almost insignificant subset of the training instances several times in contrast with applying a "max batch" by expose all the available training instances in each turn to the model (assuming, of course, enough the memory). What is the advantage of this approach?


make default upload folder year/month/day wordpress without plugin

is there any way to change in code and make it when you click(enable) “Organize my uploads into month- and year-based folders. ” it to be default year/month/day ……… without any plugin.. Can anyone find for this solution please..?  thank you in advance


I'd like to install the latest Python, which is 3.6 at the time of this post. However, the repository is saying that Python 3.4.2 is the newest version.  I've tried:   $ sudo apt-get update $ sudo apt-get install python3  python3 is already the newest version.  $ python -V  Python 3.4.2   To upgrade to Python 3.6 on my Windows workstation, I simply downloaded an exe, clicked "next" a few times, and it's done. What's the proper and officially accepted procedure to install Python 3.6 on Debian Jessie?


Java: Array expanding is not changing the original array?

I have a problem where I'm supposed to expand an array, each time creating an array with identical results. Before you tell me to just use ArrayList or something else already in the Java API, I was specifically instructed to use my own code. I tried simply creating an array that is one slot larger than my current array, though that does not seem to work very well. Here is what I have that the current moment:  public static void expand(Object[] objArray) {     Object[] objArray2 = new Object[a.length + 1];     for (int i = 0; i < a.length; i++)         objArray[i] = objArray[i];     objArray = objArray2; }


Is there something like pointer in Python

I want to understand the below code snippet from Python :  name, *line=input().split() scores=list(map(float, line))   I understand input(), split(), map functions. I would like someone to explain me how the assignment name, *line work here and then how variable line is used in subsequent expression.


Simplest way to jointly write a manuscript?

As with many papers in the sciences, there are multiple authors who aren't physically close to each other. I was curious about the most efficient and simplest way to technically share the writing. On the more complicated side would be LaTeX and subsequently using subversion to merge all of the changes. Then there is google docs. Finally, there is the traditional write out edits on word and email the document with comments back and forth.  What works?


How i can save php array to csv in correct encoding

how i can fix problem with encoding. I would like to export to csv. But when will open this file in excel. The letters are wrongly encoded and the special characters appear strangely. $list = array(     ['Name', 'age', 'Gender'],     ['ĄBobĄŚ', 20, 'Male'],     ['JohnĄ!@#', 25, 'Male'],     ['Jessica', 30, 'Female'] );  $fp = fopen('persons.csv', 'w');  foreach ($list as $fields) {     fputcsv($fp, $fields); }    fclose($fp);


How can I tell if two pictures were taken with the same camera without metadata?

Is it possible to identify images (without exif data) and link them to the exact same camera? If so, I'd like some software recommendations to get the job done.  I have two photos that I'd like to compare whether they were taken with the same camera or not. They both seem to lack EXIF data but I am sure I've heard of other hidden fingerprints to be found within the images.  For instance, sensor noise should be rather consistent if the photos were taken with the same camera, pretty much like firing a handgun and the bullet gets unique marks. I've also heard that the camera manufacturers sometimes add a hidden watermark which can be read with some special software.


How to know the file history that has been transferred from pc to usb device or vice versa?

When I want to know that if any usb device that has been plugged in a pc recently, I write this command in Windows Powershell.  Get-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Enum\USBSTOR\*\* | Select FriendlyName   This command shows the list of USB devices that have been recently connected to the computer. But my question is if I want to know that which files have been transferred from my pc to these usb devices or vice versa, what will be the command for Windows Powershell? And if it is not possible using Windows Powershell, what will be the exact solution?


Where can I view the list of all the flags I have raised?

I know I'm missing something now as I have seen this page before, but can somebody please provide the direct link to view the list of all the flags I have raised? Thanks.


I'm trying to generate valid sitemap with php. The logic is simple. I forwarded all ^(.+)index_sitemal.xml request to my index_sitemap.php file in .htaccess. PHP script is below:  <?php  header( "content-type: application/xml; charset=UTF-8" );     echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";     echo '<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'."\n";     $len = 10;   // to take     $min = 50;  // minimum     $max = 100;  // maximum     $range = [];     foreach (range(0, $len - 1) as $i) {         while(in_array($num = mt_rand($min, $max), $range));         $range[] = $num;         echo '<sitemap><loc>http://'.$_SERVER['SERVER_NAME'].'/sitemap/'.$num.'.xml</loc></sitemap>'."\n";     }     echo '</sitemapindex>'; ?>   In browser it displays good.  Link for image - (sorry low reputation)   But while trying to validate the xml I'm getting type error.  Link for image - (sorry low reputation)   Is there any way to display a dynamic sitemap using php?


How can i perform code review with coder_review command in a specified folder? I see that i can give it contrib or core directives, but i would like to only check a folder in my modules folder like  /modules/dev  /modules/contrib/  /modules/custom/  How should i instruct coder-review command to check those modules (custom) only?  Tried drush coder-review <folder-path> that doesnt seem to work, is there any other option, or should i patch the module to accept my 'custom' directive?


I read a lot about mysql security, and php script security and was just wondering if this would suit to prevent from intrusions. I made script config.php, and register.php witch are stored in folder that is above root folder ( example ../project/script/ and ../project/www/)  register.php looks like this:  <?php  require_once 'db_config.php'; $user=$_GET['username']; $pass=$_GET['password']; $db=$_GET['company'];  try {     $dbh = new PDO("mysql:host=$host", $username, $password);//connecting to        database     //check if database exists     $stmt = $dbh->query("SELECT COUNT(*) FROM INFORMATION_SCHEMA.SCHEMATA   WHERE SCHEMA_NAME = '$db'");     if($stmt->fetchColumn() == 1){     //some code     }else{         $dbh->exec("CREATE DATABASE `$db`;                     CREATE USER '$user'@'localhost' IDENTIFIED BY '$pass';                     GRANT SELECT, INSERT, UPDATE, DELETE, CREATE ON `$db`.* TO '$user'@'localhost';                     FLUSH PRIVILEGES;") or die(print_r($dbh->errorInfo(), true));         echo 'DB created';     }     }  catch (PDOException $e) {     die("DB ERROR: ". $e->getMessage()); } ?>   and test.php looks like this:  <?php include ('../scripts/db_connect.php'); include ('../scripts/register.php'); ?>   My question would be is this good coding practice, will it be secure from someone messing up my database, and what in general do you have to point out to have better looking code in general?? Also any materials on how code should look so other can read it and PHP SQL safety would be appreciated.


Lengths of a staircase and the hypotenuse of a right-angled triangle with the adjacent of 1 unit and the perpendicular of 1 unit for each

Let we have a horizontal line segment of 1-unit length and at the left edge point of the line segment we have a perpendicular line segment of 1-unit length, i.e., both the line segments are perpendicular to each other. If we make a “staircase” of equal steps from the top of the perpendicular line segment to the right edge point of the horizontal line segment, we find the length of staircase is always 2 units, no matter how small steps we make (see also the photo attached). But as soon as the staircase becomes a straight line, its length becomes $\sqrt{2}$ (the hypotenuse of the right-angled triangle with adjacent and perpendicular of 1 unit each). I'm confused between the staircase of a large number of steps (steps being too small as if the staircase were a straight line) having length of 2 units and the a straight line there with length of $\sqrt{2}$.


grub-pc won't let me upgrade and can't remove it

(base) ali@aliskunk:~$ sudo apt upgrade Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 2 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] y debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable Setting up grub-pc (2.04-1ubuntu26.2) ... debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another p rocess: Resource temporarily unavailable dpkg: error processing package grub-pc (--configure):  installed grub-pc package post-installation script subprocess returned error ex it status 1 dpkg: dependency problems prevent configuration of grub-gfxpayload-lists:  grub-gfxpayload-lists depends on grub-pc (>= 1.99~20101210-1ubuntu2); however:   Package grub-pc is not configured yet.  dpkg: error processing package grub-gfxpayload-lists (--configure):  dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup erro r from a previous failure.                           Errors were encountered while processing:  grub-pc  grub-gfxpayload-lists E: Sub-process /usr/bin/dpkg returned an error code (1)


Compound microscope vs astronomical telescope

In compound microscope, we take such an objective lens which has small focal length. While in astronomical telescope, we take such an objective lens which has large focal length.   Why don't we use same objective lens in both? The function of both the devices is to enlarge an object at infinity.


Bezout's Identity and inverse modulo proof (GCD)

So might be a dumb question and actually quite simple, but I managed to confuse myself, and I don't really want to be learning the wrong thing.  So $a≡b\;(\bmod n)$ can be defined by $a-b=ln,$ $l\in\mathbb{Z}$ (modular equivalence), and if it exists, the modular inverse $p^{-1}p≡1\;(\bmod q)$.   Bezout's identity states that for some $a,b$ there always exists $m,n$ such that $am + bn = \gcd(a, b)$  How should I show the inverse mod as a modular equivalence? I just kind of know how to do them but not how to work them if that makes sense and I'm confusing myself.  How would I then use that with Bezout's Identity to find the gcd?


Calculating sequential numbers into sorted table not dependent on OBJECTID?

I am having a problem with adding sequential numbers to the new column based on other sorted value. I would like to use 'Sort by' column to be able to generate numbers in the 'Required number'column.   I have a script listed below (Field calculator) that allows me to generate numbers in 'Script used' column. Unfortunately, the numbers start from 0 instead of 11.  mxd = arcpy.mapping.MapDocument("CURRENT") lr=arcpy.mapping.ListLayers(mxd)[0]  tbl=arcpy.da.TableToNumPyArray(lr,("objectid","MapOrderNum"))#MapOrderNum is a field that you want to use to sorb by bs=sorted(tbl,key=lambda x: x[1]) aDict={} for i,row in enumerate(bs):  aDict[row[0]]=i def sortSeq(objectid):  return aDict[objectid]  sortSeq ( !OBJECTID!)


How to "show desktop" from command line?

I want to be able to lower all windows and show the desktop from the command line, not Ctrl+Alt+D.


Why was the necklace given to Sansa in season 4?

If Olenna was counting on killing Joffrey with the poison in the necklace in  season 4, why was it given to Sansa? How could she possibly know that Sansa would wear it to the wedding?


What makes us not to go for a spelling reform for the English Language?

English alphabet is inadequate for its sounds. This makes us to make spelling mistakes and miscommunication. Why the world is not favoring spelling reform that will help us to use the English language with ease and the second language learners to learn it easily and quickly.


So I just installed Ubuntu 14.04 and it won't shut down after updating, I have to manually shut it down by holding the power key, it happens when I either try to restart it or shut it down. Anyone got any idea on how to fix it?


C++ float / double : write to / read from file "exact" values

I have two programs written in C++, say, calc1 and calc2, which produce results x1 and x2, respectively. They could be float or double.  I mean to write x1 and x2 to file, and read them with another program also in C++, my_oper, which operates with x1 and x2. I need to keep the full precision that C++ uses for their variables, exactly as if all were done in a single program. I also mean not to use text files (I do not care about the files being human-readable), so as to reduce the disk space and read/write time.  What should I use for writing and reading?    Question  does not fully address the present OP.  Major issue #1: Solutions posted aim at human-readable forms of output, so they do not care about saving disk space. That is an essential part of the question here.  Major issue #2: It does not seem to deal with  (~ 2^-53 - 2^+53, plus exponents). See snippet below. And even if it did, issue 1 above already states a different purpose.  Note that if the result from the exact arithmetic is x1=0.1 (e.g.), but the value stored is something slightly different x1* (say, in the 7th significant digit for a float), I want to write and then read x1*, I don't care about x1.  The following snippet  int iexpbase = 0; fstream file; file.precision(dbl::max_digits10); file.precision(17); file.open("math_precision_io.dat", fstream::out); for (iexpbase = -100 ; iexpbase <= 100 ; iexpbase+=10) {     double d2 = pow(10, iexpbase);     file << fixed << d2 << endl; } file.close();   produces this output  0.00000000000000000 0.00000000000000000 0.00000000000000000 0.00000000000000000 0.00000000000000000 0.00000000000000000 0.00000000000000000 0.00000000000000000 0.00000000000000000 0.00000000010000000 1.00000000000000000 10000000000.00000000000000000 100000000000000000000.00000000000000000 1000000000000000019884624838656.00000000000000000 10000000000000000303786028427003666890752.00000000000000000 100000000000000007629769841091887003294964970946560.00000000000000000 999999999999999949387135297074018866963645011013410073083904.00000000000000000 10000000000000002257809904681181209619930771246774403173921223738392576.00000000000000000 100000000000000013190646323278015613777155861640004848960018902522128665705185280.00000000000000000 1000000000000000192640537007097094236487266187713695528897613397388406395002972996141842432.00000000000000000 10000000000000002101697803323328251387822715387464188032188166609887360023982790799717755191065313280.00000000000000000


package com.example.teopeishen.test2;  import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Button; import android.widget.EditText;  public class First extends AppCompatActivity {      public Button but;     public void change(){         but = (Button) findViewById(R.id.buttonGenerate);         View.OnClickListener click = new View.OnClickListener(){           @Override             public void onClick (View v){               Intent calc = new Intent (First.this,Second.class);               startActivity(calc);                Bundle bundle = new Bundle();               bundle.putString("testName",testName.getText().toString());               bundle.putDouble("writeMark3",writeMark3);               bundle.putDouble("speakMark3",speakMark3);               bundle.putDouble("listenMark3",listenMark3);               bundle.putDouble("finalMark3",finalMark3);                Intent intent = new Intent(First.this,Second.class);               intent.putExtras(bundle);               startActivity(intent);           }         };         but.setOnClickListener(click);     }       private EditText testName;     private EditText writeMark;     private EditText speakMark;     private EditText listenMark;      private Double writeMark2;     private Double speakMark2;     private Double listenMark2;      private Double writeMark3;     private Double speakMark3;     private Double listenMark3;     private Double finalMark3;       @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_first);         testName = (EditText) findViewById(R.id.editTextName);         writeMark = (EditText) findViewById(R.id.editTextWrite);         speakMark = (EditText) findViewById(R.id.editTextSpeak);         listenMark = (EditText) findViewById(R.id.editTextListen);            try {             writeMark2 = Double.valueOf(writeMark.getText().toString());             speakMark2 = Double.valueOf(speakMark.getText().toString());             listenMark2 = Double.valueOf(listenMark.getText().toString());              writeMark3 = writeMark2 / 100 * 50;             speakMark3 = speakMark2 / 100 * 30;             listenMark3 = listenMark2 / 100 * 20;             finalMark3 = writeMark3 + speakMark3 + listenMark3;             } catch (Exception e) {             finalMark3 = 0.0;          }         change();      } }   I try to addextra bundle and but get and error of      java.lang.NullPointerException: Attempt to invoke virtual method   'double java.lang.Double.doubleValue()' on a null object reference                                                                                at com.example.teopeishen.test2.First$1.onClick(First.java:23). What   it means? Anyone know about it. It say the problem is within line 23   which is bundle.putDouble("writeMark3",writeMark3);


How to install Nvidia 387 dirvers on Kubuntu 18.04

I'm using Kubuntu 18.04 and have the Nvidia 396 driver installed. It "feels" quite glitchy, and I'd like to try to the Nvidia 387 driver. I tried removing 396 using:  sudo apt remove --purge nvidia-* sudo apt update sudo apt autoremove   I then tried to install the Nvidia 387 drivers using:  sudo apt install nvidia-387   However, it just installed the Nvidia 390 drivers!?  Any idea how I can install the Nvidia 387 drivers?


How to approve/reject other user edited answer/question?

When I edit some one question/answer then other user see this edit & they have right to approve/reject my edited review.  I also want approve/reject other user edited review. How can do this? Is there mechanism/process to  earn the privilege approve/reject other user question/Answer?


What is it about the property of all circles that makes their circumferences divided by their diameters equal to the same number pi?

I have looked all over the internet and have not seen someone really in detail describe what about circles give them the properties of pi. It is obvious to see why a square's area is the side length squared (a square with a side length of two has 2 rows of two square units giving it an area of 4) but not with circles. Why is pi the "magic number" of circumference/diameter? Why does it narrow down to that specific number for all circles? I know there are other articles on this page about this but none of them seemed to answer the question. They just said that if you rotated a wheel all the way around it travels pi times its radius. It didn't explain why this was so.


Hypothetically, if we could get some type of particle to be at absolute 0 would it be technically still have relative motion due to an observer outside of earth. E.g earth is moving therefor particle is moving ? moving $\neq$ absolute 0


How can I disable Alt-Scroll zoom in XFCE4 (Xubuntu)

In XFCE4 desktop environments, alt+scroll wheel zooms my entire desktop. I'm finding this very annoying because sometimes I flick the scroll wheel to go to the top of a document then press the alt key for a some unrelated keyboard shortcut and find myself zoomed in so far I can't see anything at all. Is there any way to disable this feature?


Why do I have to add a blank __init__.py file to import from subdirectories

I can import from subdirectories with a blank __init__.py file. That works fine. I think that init file in python works like an index file. But I really don't understand why the __init__.py file is blank to import. How do __init__.py file and importing really work?  What have to be __init__.py files content?


Creating a unique alphanumeric 10-character string

I'm looking to create a simple short-lived reservation system, and I'd like to generate confirmation numbers that are   unique random-looking alphanumeric short-ish, at least much shorter than 32 character-long strings returned by sha1   I'm only looking to have ~500 reservations, so I don't imagine high likelyhood of collissions.  One idea I had is generate an sha1 hash based on a date-time stamp and username, then truncating it to its first 10 characters.  Would something like that be reliably unique enough for the purposes of processing ~500 reservations?


I'm stuck in this problem. I can not integrate $\int \sec\theta\tan^2\theta \,d\theta$. Can anyone help me.


How to build all my installed package from sources?

I've read about how source-based linux distros like Gentoo can have considerable performance increases when compared to pre-built distros like Ubuntu because they install from source with optimizations for your particular system. Is is possible to build Ubuntu from source to get the same kind of benefit?


Showing that if $AB=BA$ then $A$ and $B$ are simultaneously diagonalizable

Suppose $A \in M_n$ has distinct eigenvalues $a_1,\dots,a_n$ and that $A$ commutes with a given matrix $B \in M_n$  so that $AB=BA$. a. Prove A and B are simultaneously diagonalizable  I was able to show that $B$ is diagonalizable but I cannot figure out how to show that $A$ and $B$ are simultaneously diagonalizable.


How to set-up mac-like accents input on Linux?

When I hold a letter button on Mac, a pop-up appears asking if I'd like to enter an accented version of this letter (like é or ë for e). Can this be configured to work the same way on GNU/Linux?


Exclusively excluding tag in search doesn't work

Use case Excluding tags in search results using -[tagname].  Observed behaviour This goes as expected:   Action: Search for anything and exclude a tag (for example -[microsoft-excel] word on SU) Result: posts are shown that don't have the [microsoft-excel] tag and that contain word.   But this doesn't:   Action: Search exclusively all posts that don't have a specific tag (for example -[microsoft-excel] on SU). Action: Click "Newest" in the search results. Result: post that contain the tag [microsoft-excel] are shown and the search string is enclosed by double quotes (see pic below).     Expected behaviour Searching exclusively excluding a tag shows all posts that don't have that tag, even if the tabs in the search results are switched.


How can there be hill trolls present in the chapter "The Black Gate Opens?"

In The Return of the King, the chapter "The Black Gate Opens" where Gandalf, the King of Gondor, and their allies make a final war against Sauron before the Morannon we are told:     ...the sun now climbing towards the south was veiled in the reeks of Mordor, and through a threatening haze it gleamed remote, a sullen red, as if it were the ending of the day...   But then, moments later (when the sun must be even higher in the sky, farther west, thus farther out of the "reeks of Mordor" and thus stronger), we learn:     ...there came striding a great company of hill-trolls out of Gorgoroth.   However, from The Hobbit we see three hill-trolls turned to stone at the first touch of dawn light. Because the sun above the battle before the gates of Mordor was as strong as "the ending of the day," it must also be at least as strong as the last moment of sunlight which we know is enough to literally petrify hill-trolls.  How to explain?


I'm currently doing a design course and have been tasked with recreating a typographic piece including the fonts.  What is the best method for identifying fonts? I have tried the online 'questionnaire' style identifiers as well as image upload ones, but they are inaccurate at best.  I have specifically tried WhatTheFont and Identifont with this sample:


Usage of there is vs there are when talking about a list of mixed singular and plural nouns

Is there a rule regarding the use of there is vs there are at the start of a list containing both singular and plural nouns? For example; There is an apple, an orange, a carrot and some bananas in the bag. Sounds incorrect to me even though the 1st noun is singular, however there are does not sound much better... There are an apple, an orange, a carrot and some bananas in the bag. There are some bananas, an apple, an orange and a carrot in the bag, sounds OK as the 1st noun is plural. Is there a better way of writing this? The text is being automatically generated by a computer programme.


Dowgrade Upgrade WUBI Ubuntu Precise 12.1 replacing only PPA

Life is matter of Risk but should be well calculated. I have been using Xubutu 12.04 under wubi for a While on Ideapad S12 but It was quite uneasy to work with this buggy solution. I did get a try with Mint equivalent of wubi running on Mint 14 KDE  DVD on Lenovo X61. It still lacks a lot because the ppa are empty since Quantal 12.1 is no more supported.   As Precise will die in April 2017, I am wondering what to do next:    I keep it as it is forget any update and install every program with deb or script I try to replace the quantal PPA with the precise one. Not really a downgrade but software Center should work afterwards. Since from what I have read an upgrade from 12.04 to 14.04 with wubi is a headache possibly it will be the same with MINT 14 going to 17. However what about changing only the PPA.   How should I proceed?


I got a pair old Shimano SH-R133 shoes for my road road, they are size 46. I'm thinking about a pair of SH-XC30. Can I use the same size?


Statistical Learning With Sparsity: Direct Inspection of the LASSO function

In the book Statistical Learning with Sparsity: The Lasso and Generalizations, in section 2.4.1, they mention that the absolute value of $\beta$ has no derivative at $\beta=0$, therefore they proceed by direct inspection to determine the value of $\beta$ in a piece-wise manner, which is shown in 2.10.  Does anyone know what they mean by direct inspection? Did they draw the function out and inspect it? I can't see how they arrived at 2.10 from inspecting 2.9.


How can I reference figure*'s subfigure?

I'm writing a paper to submit a conference.  However, I am having some problems fixing non-resolved references in latex.  \begin{figure*}[ht!]  \begin{subfigure}[b]{0.3\linewidth}      \includegraphics[width=1\linewidth]{fig/toy}      \vspace*{-1cm} % for cosmetic change      \label{fig:toynetwork_example}      \caption{A toy network}  \end{subfigure}%  \begin{subfigure}[b]{0.3\linewidth}      \includegraphics[width=1\linewidth]{fig/exampleProcedure13}      \vspace*{-1cm} % for cosmetic change      \label{fig:firstIterationFin}      \caption{After first iteration}  \end{subfigure}  \begin{subfigure}[b]{0.3\linewidth}      \includegraphics[width=1\linewidth]{fig/proposed_adjacency_matrix}      \vspace*{-0.4cm} % for cosmetic change      \label{fig:proposed_adjacency_matrix}      \caption{Adjacency matrix}  \end{subfigure}%  \begin{subfigure}[b]{0.3\linewidth}      \includegraphics[width=1\linewidth]{fig/proposed_influence_matrix}      \vspace*{-0.4cm} % for cosmetic change      \label{fig:proposed_influence_matrix}      \caption{Influence matrix}  \end{subfigure}%      \hspace*{0.2cm}  \vspace*{0.3cm} % for cosmetic change  \begin{subfigure}[b]{0.3\linewidth}      \includegraphics[width=1\linewidth]{fig/proposed_update_order}      \vspace*{-0.4cm} % for cosmetic change      \label{fig:proposed_update_order}      \caption{Update order}  \end{subfigure}%  \caption{Example network}  \label{fig:example_network_procedure}  \end{figure*}   The PDF file shows ?? rather than the reference.  Can you help me?


name this fallacy: A was P in the past -> A must be P now

I've been seeing arguments of this form for awhile:   (agreed true premise) Some predicate P was applicable to behavior/event/thing A in the past. Variations: P(A) may have been true at some particular past time t, or over all past time T. (fallacious consequence) Therefore P(A) is true now. Variations: P(A) must be true now and all futures.   But I haven't known what to call them (e.g., when "calling out" their utterers). The problem seems to me to be due to ignoring (empirical) context and quantity (but has nothing to do with logical quantification). Some examples:   Mass immigration was "good for America" in its (past) history. Therefore mass immigration must be "good for America" now. (P=good for America, A=mass immigration) (even more logically problematic) Humans have been burning fossil fuels for centuries, and "there was no crisis then." Therefore, to claim that fossil fuel combustion is "a crisis now, one must believe that we've been in crisis for centuries." (P=not crisis-producing, A=fossil fuel combustion)   Does this fallacy (or cognitive bias, but this failure "feels logical" to me--ICBW) have a widely-accepted name? Given the extensive and systematic attention to logic and rhetoric over millenia, I suspect this has been previously taxonomized.


Writing Test Classes for Apex RestService

I was writing test classes for my apex Rest Service that I had built for an Ipad app.  I noted some very interesting things while experimenting. Before doing anything, I just did a google search and found an interesting blog post by Jeff.    @RestResource(urlMapping='/v.9/member/*/results/*')  global with sharing class MemberRestSvc {  @HttpGet  global static ReturnClass doGet() {  String[] uriKeys = RestContext.request.requestURI.split('/'); // get the member name from the uri String memberName = uriKeys.get(uriKeys.size()-3);  // do awesome programming stuff here & catch any exceptions try {    List<Contact> contacts = [Select Id From Contact where member_name__c = :memberName];   return new ReturnClass('true', 'Query executed successfully.', contacts);  } catch (Exception e) {   return new ReturnClass('false', e.getMessage(), null); }   }   global class ReturnClass {  global String success; global String message; global List<Contact> records;    global ReturnClass(String success, String message, List<Contact> records) {   this.success = success;   this.message = message;   this.records = records;  }  }  }   And here is the test class  @isTest private class Test_MemberRestSvc {  static { // setup test data   }  static testMethod void testDoGet() {  RestRequest req = new RestRequest();  RestResponse res = new RestResponse();  req.requestURI = 'https://cs9.salesforce.com/services/apexrest/v.9/member/me/results/today';   req.httpMethod = 'GET'; RestContext.request = req; RestContext.response = res;  MemberRestSvc.ReturnClass results = MemberRestSvc.doGet();  System.assertEquals('true', results.success); System.assertEquals(10, results.records.size()); System.assertEquals('Query executed successfully.', results.message);  }  }   I just commented a few lines and ran and it. I still achieved enough test coverage so my question is why do I need to simply instantiate the Rest request and response objects since I am directly calling the class?    @isTest   private class Test_MemberRestSvc {    static {     // setup test data     }  static testMethod void testDoGet() {  /*RestRequest req = new RestRequest();  RestResponse res = new RestResponse();  req.requestURI =    'https://cs9.salesforce.com/services/apexrest/v.9/member/me/results/today';   req.httpMethod = 'GET'; RestContext.request = req; RestContext.response = res; */Commented the code meant for REST apex intialization and merely calling the method!!  MemberRestSvc.ReturnClass results = MemberRestSvc.doGet();  System.assertEquals('true', results.success); System.assertEquals(10, results.records.size()); System.assertEquals('Query executed successfully.', results.message);  }  }   Can someone explain this behavior? Also what are the best practices for writing Test classes for apex Rest services?


It is often said that black holes lose energy throughout the process called Hawking radiation. My question is, since the process of creating particles is random, why do the black holes captures more particles with negative energy than particles with positive energy?


Consider the red path from A that zigzags to B, which takes $n$ even steps of length $w$. The path length of the route $P_n$ will be equal to:  $ P_n = P_x + P_y = \frac{n}{2}\times w + \frac{n}{2}\times w = n \times w $  But $\frac{n}{2}\times w = 1$ beacuse it is the length of one of the sides of the triangle so:  $P_n = 2$  Which will be true no matter how many steps you take. However in the limit $n \to \infty, w \to 0$ the parth length $P_\infty$ suddenly becomes:  $P_\infty = \sqrt{1^2 + 1^2} =  \sqrt{2}$  Due to Pythagoras. Why is this the case? It seems the path length suddenly decreases by 0.59!


We are watching the whole Marvel Cinematic Universe in preparation for the new Avengers movie coming up in May. While watching Captain America: The First Avenger, I realized that it's never explained how the Tesseract came to be on Earth for Red Skull to find it in World War II. Did it come from Asgard when Jotunheim and Asgard fought on Earth?


How to highlight paragraph (linebreak preserving) as well as itemize, tabular etc.?

I want to highlight changes which are introduced by myself in the pdf document. So far the soul package is very neat but it does throw errors when I want to highlight not only paragraphs but also some itemize environments, and I don't want to highlight the items separately. Also the \cite{...} command is not supported by \hl. I recently posted a slightly different question:   BTW: What I liked most over other approaches like pdfcomments etc. is that the \hl command from soul has a very exact and clear output, no icons, no clicking etc. involved. Together with todonotes it's very good and almost all I need.


Java Serialization with non serializable parts

I have:  class MyClass extends MyClass2 implements Serializable {   //... }   In MyClass2 is a property that is not serializable. How can I serialize (and de-serialize) this object?  Correction: MyClass2 is, of course, not an interface but a class.


I have a 32 length hex string in Java and need to make an IV to encrypt. I know dart has a function IV.fromBase16, and I need something like that in Java.   I tried reverse engineering through flutter, but nothing made sense. I'm new to this part of development.   I already tried codec jar but it was worthless. I googled for questions to transform 32 to 16, but all that I have found was how to transform a string in hex values.   Also, I need to use AES and CBC, but I'm not aware if this is possible in Java due to the string length.


What is the cause of the sudden drop in error rate that one often sees when training a CNN?

I've noticed in different papers that after a certain number of epochs there sometimes is a sudden drop in error rate when training a CNN. This example is taken from the "Densely Connected Convolutional Networks" paper, but there are many others. I wonder what is the cause of this? Especially why it appears at the same epoch although the two architectures compared here a completely different.    A similar question was asked , but the only answer given there so far stated that it's because a saddle point in the error surface is reached and then overcome. As the two architectures are very different, they also will have a very different error surfaces (even with different dimensions), so I find highly unlikely that they both reach and overcome a saddle point at exactly the same epoch.


Eigenvalue + Eigenvector of this special matrix?

How do I find the eigenvalues & eigenvectors of the following matrix?  \begin{bmatrix}a&b&b\\b&a&b\\b&b&a\end{bmatrix}  I feel like there is an easy trick to it. I have tried using trace and determinant but no luck so far.


(Java) How to use Object inside if Statment

How can I use object inside if statement I tried 2 ways one like this:   import java.util.Scanner;  public class Species{  String kind;  public void talk() { System.out.println(kind + " is talking");} public void walk() { System.out.println(kind + " is walking");} public void swim() { System.out.println(kind + " is swimming");} public void check() {       if (kind == "woman") {talk(); walk();}     else if (kind == "fish") {swim();}     else System.out.println("Sorry not one of our option."); }  public static void main(String [] args) {      Scanner read = new Scanner (System.in);      Species sp1 = new Species();      sp1.kind = null ;      System.out.print("Enter a kind: ");     sp1.kind = read.nextLine();      sp1.check();  }}    And another one:  import java.util.Scanner;  public class Species{  String kind;  public void talk() { System.out.println(kind + " is talking");} public void walk() { System.out.println(kind + " is walking");} public void swim() { System.out.println(kind + " is swimming");}   public static void main(String [] args) {      Scanner read = new Scanner (System.in);      Species sp1 = new Species();      sp1.kind = null ;      System.out.print("Enter a kind: ");     sp1.kind = read.nextLine();      if (sp1.kind == "woman") {sp1.talk(); sp1.walk();}     else if (sp1.kind == "fish") {sp1.swim();}     else System.out.println("Sorry not one of our option.");           }}   Each time it shows the message Sorry not one of our option I know it's a simple program but it wouldn't work


How to shift bibliography over to the right?

I'm having a small alignment problem with Biblatex. I have my citations in a separate file and am referencing them as normal. However, I want them horizontally shifted to the right to align with the rest of my text, namely, the numbers should be aligned with the green vertical line (apologies for the bad image):  Here is my code: \documentclass[11pt]{moderncv}  \moderncvstyle{classic} \moderncvcolor{red}  %%%% adjust the page margins \usepackage[scale=0.78, top=0.5in, bottom=0.5in, footskip=0.2cm]{geometry} \usepackage{eurosym} \usepackage[T1]{fontenc} \usepackage[sc,osf]{mathpazo} \usepackage[maxnames=99, sorting=none]{biblatex} \usepackage[utf8]{inputenc}  \renewcommand*{\namefont}{\fontsize{20}{20}\mdseries\upshape} \addbibresource{publications.bib}  % personal data \name{Name}{Name} \phone[mobile]{111-111-1111}  \begin{document}  \makecvtitle{\vspace{-1.0cm}}  \section{Education} \cventry{2021 -- 2022}{Master of Science in Computer Science}{XXX}{XXX}{}{GPA: 4.0/4.0} \cventry{2018 -- 2021}{Bachelor of Science in Computer Science}{XXX}{XXX}{GPA: 3.99/4.0}{Summa Cum Laude\endgraf Accepted to Accelerated Bachelor's to Master's Program\endgraf Accepted to Disciplinary Honors Program} \cventry{2017 -- 2018}{Transfer Degree}{XXX}{XXX}{GPA: 4.0/4.0}{}  \section{Experience}  \nocite{*} \printbibliography[title={Research}]  \section{Interests}   \end{document}   I feel like this is a very silly and simple problem to fix, but I just can't figure it out. Any help would be greatly appreciated!


Difference between a lambda function and a closure (in PHP)?

Chapter 2 of "Magento PHP Developer's Guide" states:     Zend Framework 2 uses 100% object-oriented code and utilizes most of   the new features of PHP 5.3, namely namespaces, late static binding,   lambda functions and closures.   While the post  has some answers (such as, that a lambda is just an anonymous function, and that a closure is a function which can access variables not in its parameter list), seems to be specific to the Python programming language (with some mention of the Scheme programming language). For instance, according to the post, in Python, it seems, there can be closures which are not lambdas, and lambdas which are not closures.  However, I am interested in the PHP programming language, not Python. One of the answers below seems to point out that in PHP all closures are lambdas, which conflicts with what the post relating to Python states.  It seems to me, that these concepts vary in the particulars from language to language, and I am interested in PHP, hence this post.  All of this is confusing. While I would assume that lambda functions in general are just unnamed functions, the following Wikipedia article says more about closures:    although has no examples in PHP.


Compute $\int_0^\infty \frac{\ln x}{1+x^2} dx$

I tried to compute the integral by using the substitution $x=e^y$ but I couldn't find an answer (I checked it converges by checking limits at both ends by using the comparison test).


How do I set the default program that I use?  I have tried to open System Info → Default Program → change my program, but it won't work,  Any idea? Or should I use Terminal?   I want to replace the default movie player with VLC media player, because the current movie player is useless to me.


Number of permutations of unspecified length

We can see subsets as combinations of unspecified length of a set's elements, and there are, of course,   $$\sum_{k=0}^n {n \choose k}=2^n$$   subsets of a set with $n$ elements.  I was wondering whether there is a neat expression (analogous to $2^n$) for  the number of permutations of unspecified length of the elements of a set.    For example, if we have five distinct items, the number of permutations for each possible length is given below; the total number of permutations (i.e., of unspecified length) would simply be the sum of these numbers.        Length of permutation | Number of permutations       ----------------------------------------------           0                 |    1           1                 |    5           2                 |    5⋅4           3                 |    5⋅4⋅3           4                 |    5⋅4⋅3⋅2           5                 |    5⋅4⋅3⋅2⋅1   Of course we can express the total number of permutations of unspecified length of $n$ items as $\displaystyle\sum_{k=0}^n {}_n\text P_k$ but is there is a neater expression that this sum evaluates to, or at least a conventional notation for this number?


Is there a way to find out whether an updated program/package lands in the official Ubuntu release repositories?

If there is a new release/major update of a program (e.g. Rhythmbox 2.97, Skype 4.0 or Gimp 2.8), is there an easy way to tell whether and when they will make it to the current official Ubuntu release repositories (especially to the LTS release, e.g. Ubuntu 12.04)? Or whether it will never be added to the official repositories, so I don't need to wait and just install it through an added PPA/repository?    I would like to use the program updates, but preferably when they are well tested and adjusted to the Ubuntu release I use (easily updated by the update manager). But some programs seem to never be added/updated and as I want to stick to the LTS release, I would need to add another repository. I know that there are restrictions to what will be updated (, ). But for example Firefox and Thunderbird are now regularly updated and Gimp 2.8 might be available in the backports. There is list of , but I don't find Firefox, Thunderbird (or Gimp) on it, although they are updated.  I just want to know how to find out whether there is an easy way to know (e.g. one webpage) which programs will be added/updated in the official Ubuntu repositories. Or do we have to ask a question on Askubuntu for every single program?


Interpretation of correlations in multilevel anallysis

In the following multilevel analysis in R (taken from , page 57):  > Model.1<-lme(WBEING~HRS+G.HRS,random=~1|GRP,data=bh1996, control=list(opt="optim")) > summary(Model.1) Linear mixed-effects model fit by REML Data: bh1996      AIC      BIC  logLik 19222.28 19256.81 -9606.14  Random effects: Formula: ~1 | GRP            (Intercept) Residual StdDev:             0.1163900 0.8832353 Fixed effects: WBEING ~ HRS + G.HRS             Value     Std.Error  DF    t-value  p-value (Intercept) 4.740829  0.21368746 7282 22.185808 <.0001 HRS        -0.046461  0.00488798 7282 -9.505056 <.0001 G.HRS      -0.126926  0.01940357   97 -6.541368 <.0001  Correlation:        (Intr) HRS HRS    0.000 G.HRS -0.965 -0.252  ...   How can the latter table (Correlation) be interpreted? What do these correlations mean?


How to apply aux directory to MiKTeX: putting *.aux files in separate folder

This is a rookie follow up question to the question here:   The answer says: "In MiKTeX you can additionally set --aux-directory=dir which will put only the auxiliary files in this directory."  How do I apply this --aux-directory=dir to MiKTeX? Do I put it in the preamble of my document? I can't get the interpreter to parse it.  Thanks! David  [Follow up from T.D.'s excellent answer]  T.D. - I use TeXShop, which is the normal Mac build I believe. I have put that code everywhere I can think of in the options, the most promising looking spots were in the screen below. Sadly, no love - it obstinately continues to put the aux files next to each of my .tex files (in all folders, which is what I'm trying to avoid).  Any TeXShop users have any ideas? Thanks!


Can't find CRS for Idaho DOT data in Qgis 2.18

I downloaded a mile marker geojson from the Idaho DOT and the CRS is listed as 102605, which doesn't seem to exist outside of the DOT office.   This is the extent of the layer metadata:  XMin: 2254295.3529000003 YMin: 1199867.0130000003 XMax: 2743212.4619000005 YMax: 1980420.2782000005 Spatial Reference: 102605  (102605)   link to mapserver info:


CSS - Push footer to bottom of page, not screen

I have  setup on my page, this works fine if the head + content + foot fits the screen height. But when the content grows, it will grow under the foot, instead of pushing the foot to the bottom of the page.   How can I fix this?
     Head

     Content

     Foot


Ubuntu 13.10: Broadcom 43142 not finding bluetooth devices

I have a Lenovo B590 laptop. The laptop is , so I wasn't expecting any problems. First I tried to get the Broadcom 43142 wifi/bluetooth module working on Ubuntu 12.10 64bit but failed. Therefore I made a fresh Ubuntu 13.10 64bit installation yesterday. Here the wifi module was recognized out of the box. The only thing I had to do was to enable the restricted driver. The bluetooth module is recognized too, but it doesn't work.  The problem is: I have two further bluetooth devices placed closely to the laptop, non-paired and each being able to discover the other respectively. None of them is able to disover the laptop, nor does hcitool scan find any devices. It does not give any errors though.  lspci|grep -i broadcom:  02:00.0 Network controller: Broadcom Corporation BCM43142 802.11b/g/n (rev 01)1   dmesg|grep -i blue:  [    8.023496] thinkpad_acpi: rfkill switch tpacpi_bluetooth_sw: radio is unblocked [    8.384905] Bluetooth: Core ver 2.16 [    8.384936] Bluetooth: HCI device and connection manager initialized [    8.384943] Bluetooth: HCI socket layer initialized [    8.384944] Bluetooth: L2CAP socket layer initialized [    8.384959] Bluetooth: SCO socket layer initialized [    8.721266] Bluetooth: can't load firmware, may not work correctly [   11.274285] Bluetooth: RFCOMM TTY layer initialized [   11.274298] Bluetooth: RFCOMM socket layer initialized [   11.274299] Bluetooth: RFCOMM ver 1.11 [   11.283683] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [   11.283686] Bluetooth: BNEP filters: protocol multicast [   11.283696] Bluetooth: BNEP socket layer initialized [   13.417478] Bluetooth: hci0 command 0x1003 tx timeout   hciconfig:  hci0:   Type: BR/EDR  Bus: USB         BD Address: 1C:3E:84:E8:81:98  ACL MTU: 1021:8  SCO MTU: 64:1         UP RUNNING PSCAN ISCAN          RX bytes:1265 acl:0 sco:0 events:84 errors:0         TX bytes:3794 acl:0 sco:0 commands:81 errors:0   bluez-simple-agent hci# 1C:3E:84:E8:81:98:  Creating device failed: org.bluez.Error.ConnectionAttemptFailed: Page Timeout   rfkill list:  0: phy0: Wireless LAN         Soft blocked: no         Hard blocked: no 1: brcmwl-0: Wireless LAN         Soft blocked: no         Hard blocked: no 2: tpacpi_bluetooth_sw: Bluetooth         Soft blocked: no         Hard blocked: no 3: hci0: Bluetooth         Soft blocked: no         Hard blocked: no   uname -a:  Linux B590 3.11.0-14-generic #21-Ubuntu SMP Tue Nov 12 17:04:55 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux   And finally here's the output of the scan attempt, which does not give any results:  hcitool scan:  Scanning...   What have I missed? How am I supposed to get the bluetooth device working?


How to Disabled a website if user has disabled JavaScript (JS)

A quick question.. searched across the web but could not find the solution of my question   First how I should detect that user has JavaScript enable/disabled in browser. If disabled show a message, hide page or do something to prevent showing the content.   Regards  Sharif


Use the Mean Value Theorem to prove a limit

I want to prove that  $$\lim_{x\to \infty}\frac{x^n}{e^x}=0,$$   where $n\in \mathbb{N}$. I already tried to pick some interval as $[0,x]$ or $[x,x+a]$ and let $x$ tend to infinity, but without success...


Initializing ungiven constructor arguments, how?

I am trying to add an additional argument into a constructor:  e.g. adding the argument 'y'  public Object(int x, int y) {   int x1;   int y1;   x1=x;   y1=y; }   the original constructor was  public Object(int x) {   int x1;   int y1;   x1=x;   y1=(default number); }     I know in Java, you could do something like this(x, 1) to set y to 1 if y is not given, but I think I read that constructors calling constructors doesn't work in C++?  Is there a way to initialize y when it's not given, i.e. making sure that (1) and (2) both work?  Object o1 = new Object (5);   // (1) Object o2 = new Object (5,3); // (2)


Suppose that $f:(0,\infty)\rightarrow \mathbb{R}$ is a function satisfying $f'(x)=1/x$ for all $x\in (0,\infty)$, show $f(xy)=f(x)+f(y)$.

I would like to ask you for some help with the following problem.  Suppose that $f:(0,\infty)\rightarrow \mathbb{R}$ is a function satisfying $f'(x)=1/x$ for all $x\in (0,\infty)$, and $f(1)=0$. Show, without using the fact that $f$ must be the natural logarithm, that for all $x,y \in (0,\infty)$, $f(xy)=f(x)+f(y)$. Hint: fix $y$ and let $g(x)=f(xy)$. Find $g'(x)$.  The furthest I managed to go is to find the $g'(x)=f'(x)$, but I have no idea how to proceed. Have you got any suggestions?


Set Dependency Property without calling ChangeEvent

I'm working on a bigger project and have to work with dependency properties... Now i need to change the value of my dp but do not want to get the event fired.  is it possible to break this event - chain?  Or can i change the dp without firing the event?  Cause it's not possible to say -> e.Handled= true  Thanks.


Unity had a meltdown a while back (?). Anyway, since then, Unity is mistaken about the origin of its coordinate system, so that when I open a new window, I get this:    Is there a way to reset Unity's coordinate system to avoid this behavior?


My lecturer has defined Brownian Motion, and one of the conditions is:   1) $W_0 =0$ almost surely  Here $(W(t))_{t\geq 0}$ is a stochastic process. What does this "almost surely" phrase mean?


Proving the inequality $\arctan\frac{\pi}{2}\ge1$

Do you see any nice way to prove that $$\arctan\frac{\pi}{2}\ge1 ?$$  Thanks!  Sis.


Do you expect a client to pay for a design they don't like?

Situation: a long time client (at this point I've done consistent work for them for about two years) just messaged me saying they do not want me to bill them for the last design I did because it was not what they wanted. However when explaining the project they said I could have creative freedom.  Is this a normal thing for clients to not pay for a project and then expect you to do it over? I get edits and things like that but expecting you to not bill them for what you already did and just starting over? Do you expect a client to not pay for a design they don't like?


Find $\displaystyle \int \sqrt{\tan(x)}dx$.   According to an integral calculator, the answer to this question is $$(-2 \tan^{-1}(1-\sqrt(2) \sqrt(\tan(x)))+2 \tan^{-1}(\sqrt(2) \sqrt(\tan(x))+1)+\log(\tan(x)-\sqrt(2) \sqrt(\tan(x))+1)-\log(\tan(x)+\sqrt(2) \sqrt(\tan(x))+1))/(2 \sqrt(2))+C.$$   Is the question as complicated as the answer looks?


Problem of mentioning the department affiliated with PhD degrees

A newbie here :)  I am currently a PhD student in a computer science program. My research interest is about quantum information science. Back then, I also got accepted into a Physics PhD program, but I decided to join my current department because the project is much more interesting.  Here is my problem: when people ask me, "Hey, so what are you doing in grad school?" , I feel quite uncomfortable to mention that I am doing a degree in "Computer Science". Don't get me wrong. I love computer science. But I prefer to be regarded as a Physics person rather than a CS person (actually, I am doing a lot of theoretical quantum physics for my thesis). My feeling is that, the name of the department/degree ALONE doesn't do me justice in telling other about my research interests and experiences.  Funny enough, my boyfriend is also suffering from the same problem. He is in the same CS department with me, but focusing on computational biology. His plan is to attend medical school after his PhD, so he usually shows a tremendous amount of angst when being asked the same question. People often joke about his decision, like "So why an IT guy like you suddenly wants to go to med school?". The poor guy has spent quite a lot of time to do wet labs, and is drafting a thesis with 50% bio and 50% CS components, so I can tell that he really hates when people calling him an "IT guy". While I understand that doing a bio-related doctoral research is a very logical transition for him to med schools, the name of the department alone is causing the confusion that he has abruptly changed his interests into medicine, rather than planned for it ahead.  My question is, what is the best way in our cases to "market" our research focus and experiences to other people? Should it be:   Ms.Catwoman, PhD in Computer Science  Ms.Catwoman, PhD in Quantum Information, or Ms.Catwoman, PhD in Computer Science with special focus on Quantum Information?   Thanks for the answers!


What I am trying to do is add an array to an arraylist.  I've looked at other examples that tell me to do what I am doing, but I get nonsense output when I run the program.  I would also like to access certain elements of an array within the arraylist, and I have no idea how to do that.  static int elements = 10;  //Or whatever number you'd like  public static void main(String[] args)     {         int[] person = new int[4];         ArrayList personID = new ArrayList();          experiment(personID, person);     }  private static void experiment(ArrayList personID, int[] person)     {         for(int i = 0; i < elements; i++)             {                 person[0] = i;                 person[1] = i;                 person[2] = i;                 person[3] = i;                  personID.add(person);             }         System.out.print(personID);     }   Output:  [[I@e1cba87, [I@e1cba87, [I@e1cba87, [I@e1cba87, [I@e1cba87, [I@e1cba87, [I@e1cba87, [I@e1cba87, [I@e1cba87, [I@e1cba87]   Not that much of an explanation is needed, but I declare the array and arraylist, pass them to a function which keeps giving the array's elements different values and then, supposedly, adding the array itself to the arraylist for each iteration.  The output, though, it nothing like what I am looking for.  I could do another loop to print each array element for each spot along the array list, but I don't know how to do that.  I figured  System.out.print(personID.get(i[0]);   Or  System.out.print(personID.get(i)[0];   But it doesn't work and I'm lost...  Thank you for dealing with me!


Will I be able to enter South Korea as a tourist with a one-way ticket and no ticket home yet?

I've been to South Korea a few times already and always enjoy it but I've always had an onward ticket before.  Now I need to fly home from a trip that's lasted over a year, but I still want to take my time and keep my options open.  There's a good choice of cheap flights from Istanbul to Seoul and from Seoul I can't decide yet whether to fly straight home or take a ferry to China, hitchhike to Guangzhou, and get a cheap flight home from there.  I can't really just buy the China-Australia flight now because I'm not sure yet whether I'll be able to get the Chinese visa easily enough or how long my remaining money will last.  I know Korea, like most countries, has rules saying you need an onward ticket, but in my experience many countries never try to verify that you have this ticket unless you fit some profile. So in this instance I would find first-hand knowlegde much more informative that pointers to a government website.  In practice does South Korea admit tourists with one-way tickets?


How to tell the C compiler not to overlap my strings

I'm working on an app that has strings in an array like:  static char * strings[] = {   "ABC DEF",   "EF",   "GHI" };   Note, that the type doesn't have const modifier!  In my app I loop over the array and revert the strings. The expected result is:  {   "FED CBA",   "FE",   "IHG" }   However the result I get is:  {   "FED CAB",   "AB",   "IHG" }   The reason for this is because in the original array the strings are compiled to overlap: strings[1] overlaps the end of strings[0]!!!  // When I printed out the pointers it turned out that in the RAM // it stored my strings "overlapping": //  00 01 02 03 04 05 06 07 08 09 0a 0b // "A  B  C  __ D  E  F  \0 G  H  I  \0"  static char * strings[] = {   0x00, 0x05, 0x08 };   Is there any way (besides not having the const modifier which doesn't work) to tell the compiler not to overlap my strings? Is this a bug in the compiler or in my code? What workaround can I do?


Is there a way to simplify $(x_1+x_2+\dots+x_m)^p$?  Thank you!


If I use a magic item, say an Immovable Rod for example, as an improvised weapon, will it deal damage that bypasses resistance to bludgeoning damage from nonmagical sources?


Replacing a font in many illustrator files

I have several hundred Illustrator files that are formatted similarly, and for legal reasons I need to replace a font in all of them. Even with the 'Find font' tool, that's a hell of a lot of fonts to replace by hand.  Is there some way of automating it? For example, using Bridge? Illustrator (CS5) doesn't offer many options in Bridge, compared to the automation options offered by Photoshop. I also don't see any option for running actions on multiple Illustrator files.  Also, creating a repeatable action for replacing the font doesn't seem to work: instead of repeating my action, it brings up the dialog box an waits for me to tell it to replace them.  As a programmer I'm prepared to edit the files directly if it can be done without breaking them.    Update: The 'Batch...' menu item from Illustrator's actions panel menu allows the same action to be performed on a folder of files. It doesn't fix the Find Fonts action waiting for input though. Toggling the dialog off makes the action do nothing at all.


Switching between 2 power supplies upon dropping below cutoff voltage efficiently

I am making a circuit which is powered by a lipo battery of 11.1V(3.7V*3). I need to check for the lipo's under-voltage so that the circuit automatically switches to a second lipo when the first one drops below the cutoff voltage. I am open to using arduino and relays but no diodes(as they lead to large power loss).


Suppose, I somehow happen to dig a hole diametrically through the Earth (neglecting all constraints like molten core etc ) ... and I throw an object from one side of the hole, will it reach the other end?


Why inode numbers of /dev and /run are same as that of /?

Please see below output: In below output, the inode numbers of /dev and /run are same and equal to 2. The inode numbers of ./ and ../(could be a special case as ../ should point to ./) are also 2 and 2. How can dev and run and / have the same inode as there contents are entirely different. $ll -i total 84       2 drwxr-xr-x  20 root root  4096 Aug 18 01:21 ./       2 drwxr-xr-x  20 root root  4096 Aug 18 01:21 ../      12 lrwxrwxrwx   1 root root     7 Aug 18 01:19 bin -> usr/bin/ 1048577 drwxr-xr-x   4 root root  4096 Sep  1 15:53 boot/ 5636097 drwxr-xr-x   2 root root  4096 Aug 18 01:21 cdrom/       2 drwxr-xr-x  23 root root  4920 Sep  3 11:20 dev/  262145 drwxr-xr-x 144 root root 12288 Sep  3 09:34 etc/  524289 drwxr-xr-x   3 root root  4096 Aug 18 01:22 home/      13 lrwxrwxrwx   1 root root     7 Aug 18 01:19 lib -> usr/lib/      14 lrwxrwxrwx   1 root root     9 Aug 18 01:19 lib32 -> usr/lib32/      15 lrwxrwxrwx   1 root root     9 Aug 18 01:19 lib64 -> usr/lib64/      16 lrwxrwxrwx   1 root root    10 Aug 18 01:19 libx32 -> usr/libx32/      11 drwx------   2 root root 16384 Aug 18 01:18 lost+found/ 3932161 drwxr-xr-x   5 root root  4096 Aug 18 17:23 media/ 1572865 drwxr-xr-x   7 root root  4096 Sep  2 14:19 mnt/ 9175041 drwxr-xr-x   4 root root  4096 Aug 28 23:46 opt/       1 dr-xr-xr-x 359 root root     0 Sep  3 10:18 proc/ 5505025 drwx------  11 root root  4096 Sep  1 17:49 root/       2 drwxr-xr-x  43 root root  1320 Sep  3 11:24 run/      17 lrwxrwxrwx   1 root root     8 Aug 18 01:19 sbin -> usr/sbin/ 2097153 drwxr-xr-x  11 root root  4096 Aug 26 20:34 snap/  655361 drwxr-xr-x   2 root root  4096 Jul 31 21:57 srv/       1 dr-xr-xr-x  13 root root     0 Sep  3 10:18 sys/ 4325377 drwxrwxrwt  22 root root  4096 Sep  3 11:25 tmp/ 1310721 drwxr-xr-x  14 root root  4096 Jul 31 21:58 usr/ 8388609 drwxr-xr-x  14 root root  4096 Jul 31 22:05 var/  Same with /sys and /proc. There contents are different but they share the same inode. Note: I have only one ext4 partition for entire system. And swap is off, though i don't think this matters. Edit - The already asked Q pointed by Stephen answers to good extent.  But I am interested in knowing few more details regarding how this works. At the time of Linux installation, i have mentioned only one filesystem (/dev/sda1 -> ext4 -> / ). So for dev, run, proc,  sys -  Linux is creating these addition FS which is now inferable. I am aware that /proc is a Virtual FS and is in memory and not on any HDD/SSD. Could some one explain what is the case with /dev, /run and /sys. Do they exist on HDD (if so what is there location if it can be meaningfully traced).


How to make a lightning trail like The Flash?

I want to make a lightning trail from The Flash where it automatically curves and moves with the character without setting up a bezier-curve For Example:


Integration of $\int_{0}^{\infty}\frac{dw}{1+\left ( \frac{w}{B} \right )^4}$ with the help of signal properties.

Find the integral   $$\int_{0}^{\infty}\frac{dw}{1+\left ( \frac{w}{B} \right )^4}$$   where $B$ is a constant.   This integration i tried by normal method that gives the result $\frac{\pi B}{2\sqrt2}$ but it goes so lengthy      is there any signal properties that i use to solve it in simple steps?


uk student visa ban for 10 years due to lack of fund

I have been banned from the UK until February 2021 when I applied for a student visa in 2011 and was refused entry. This was due to a lack of fund in my account.   The money was deposited by my agent on my behalf and he withdrew it after a week without my knowledge. When they enquired my account they found I was not true with my bank details, and I have been banned from the UK automatically for 10 years.  Now I am planning to apply for a Irish visa. Will the ban affect my application?


I encountered a problem while working with PHP rest api. I can't show unicode output in any way.      table 'coronaapi' data :  id    title  1      কুমিল্লা সদর  2      কুমিল্লা সদর দক্ষিণ   <?php  // Headers header('Access-Control-Allow-Origin: *'); header('Content-type: text/html; charset=UTF-8'); header('Content-Type: application/json');   include_once '../../config/Database.php'; include_once '../../models/Post.php';  // Instantiate DB & connect $database = new Database(); $db = $database->connect();  // Instantiate blog post object $post = new Post($db);  // Blog post query $result = $post->read(); // Get row count $num = $result->rowCount();  // Check if any posts if($num > 0) { // Post array $posts_arr = array(); // $posts_arr['data'] = array();  while($row = $result->fetch(PDO::FETCH_ASSOC)) {   extract($row);    $post_item = array(     'id' => $id,     'title' => $title,     'body' => $body,     'author' => $author,     'category_id' => $category_id,     //'category_name' => $category_name   );    // Push to "data"   array_push($posts_arr, $post_item);   // array_push($posts_arr['data'], $post_item); }  // Turn to JSON & output echo json_encode($posts_arr);  } else { // No Posts echo json_encode(   array('message' => 'No Posts Found') ); }       OutPut displaying like this:  [{"id":"1","title":"???????? ???","body":"???","author":"00","category_id":"sodor"},{"id":"2","title":"???????? ??? ??????","body":"03","author":"00","category_id":"sadardokkhin"}]       But I want to display  [{"id":"1","title":"কুমিল্লা সদর","body":"???","author":"00","category_id":"sodor"},{"id":"2","title":"কুমিল্লা সদর দক্ষিণ","body":"03","author":"00","category_id":"sadardokkhin"}]


Sometimes we mistakenly think something is true and so we tell it to others; Unbeknownst to us, the thing is not true. How to call such untruthfulness?     Example:      A: You told me she will not be in this party. You lied to me.       B: No, I didn't know that myself. She told me she is out of town.   In the above scenario, what B had said to A was a "honest lie".   has been used for such untruthfulness. But I need other words/terms/phrases for that. And I need a verb, something meaning "honest lying".  There is also this word "confabulate" [same source] which is more of technical usages and means mistakenly and with no intention taking something false as true. But this is obviously not what I want.


Without using prime factorization, find a prime factor of $\frac{(3^{41} -1)}{2}$

Not sure how to go about this. Law of quadratic reciprocity and Euler's Criterion is recently learned material but I'm not sure how this applies.