I'm using 3dplot to draw in 3D. Now I want to define my own environment, called pose, that is supposed to be used inside a tikzpicture-environment. It should perform a coordinate system tansformation according x,y,z,roll,pitch and yaw, that are passed to my pose-environment via pgfkeys.  Here is the code:  \documentclass{article}  \usepackage{tikz} \usepackage{tikz-3dplot} \usetikzlibrary{3d}  % fix wrong implementation of xy canvas \makeatletter \tikzoption{canvas is xy plane at z}[]{%   \def\tikz@plane@origin{\pgfpointxyz{0}{0}{#1}}%   \def\tikz@plane@x{\pgfpointxyz{1}{0}{#1}}%   \def\tikz@plane@y{\pgfpointxyz{0}{1}{#1}}%   \tikz@canvas@is@plane } \makeatother  \pgfkeys{% /poseenv/.is family, /poseenv,% % set the defaut values default/.style = {%     x = 0,%     y = 0,%     z = 0,%     roll = 0,%     pitch = 0,%     yaw = 0%     },%     x/.estore in = \poseenvx,%     y/.estore in = \poseenvy,%     z/.estore in = \poseenvz,%     roll/.estore in = \poseenvroll,%     pitch/.estore in = \poseenvpitch,%     yaw/.estore in = \poseenvyaw,%     origin/.code n args={1}{%         #1% ### MODIFY CODE HERE ###     }% }%  \newenvironment{pose}[1][]% {%     % parse arguments     \pgfkeys{/poseenv, default, #1}%     % modify 3dplot's rotated coords according to \poseenv{x,y,z,roll,pitch,yaw}     \coordinate (origin) at (\poseenvx,\poseenvy,\poseenvz);     \tdplotsetrotatedcoordsorigin{(origin)}     % todo: do rotation      % begin the scope     \begin{scope}[tdplot_rotated_coords,transform shape] }% {%     % end the scope     \end{scope} }%  \begin{document}     \tdplotsetmaincoords{80}{45}     \begin{tikzpicture}[tdplot_main_coords]         % draw a coordinate system in black at the origin         \draw[->] (0,0,0) -- (1,0,0);         \draw[->] (0,0,0) -- (0,1,0);         \draw[->] (0,0,0) -- (0,0,1);         \draw[canvas is xy plane at z=0,lightgray] (0,0) grid (3,3);          % define where the red coordinate system should be         \coordinate (A) at (1,1,0);          % draw the red coordinate system at (A)                  \begin{pose}[origin=(A)]             \draw[->,red] (0,0,0) -- (1,0,0);             \draw[->,red] (0,0,0) -- (0,1,0);             \draw[->,red] (0,0,0) -- (0,0,1);             \draw[->,red] (0,0,0) -- (1,1,1);         \end{pose}          % draw the green coordinate system at (1,1,0)         \begin{pose}[x=1,y=1,z=0]             \draw[->,green] (0,0,0) -- (1,0,0);             \draw[->,green] (0,0,0) -- (0,1,0);             \draw[->,green] (0,0,0) -- (0,0,1);             \draw[->,green] (0,0,0) -- (1,1,1);         \end{pose}     \end{tikzpicture} \end{document}   Except for the rotational part the environment is working in principle, but the rotation is not part of the question here. You see, that the green coordinate system is correctly painted at (1,1,0). But the red coordinate system is painted at (0,0,0) instead of (A). This is because the implementation is not yet finished. Obviously, the implementation at the line, marked with ### MODIFY CODE HERE ### is not correct.  What do I have to replace that code with?


I'm looking for a symbol for skeptical consequence so that I can write that something, B, is a skeptical consequence of something else, A.  In a book I read it's written like \(A \vdash B\) or \(A \sststile{}{} B\) but the horizontal line is wavy like \sim, has the same width as the vertical line and does not vary in width. So, what I'm looking for is a binary relation symbol that is similar to the combination of the first two and the last relation in the following image:    That is, something similar to the following mockup but the wavy line should be such that it has a constant width and the same width as the vertical line:    I've tried  without success.


Citation: How to fine tune the full reference?

This question continous my .  Note: My english isn't that good. My native english is german. I don't know the correct definition of german wissenschaftliche Ausarbeitung, which I called here as academic writing and german Langbeleg, which is the full entry in the bibliography at the end of the written work, which I called here as full reference. I also couldn't find a correct translation of this definitions. So I someone has the experience with it, so please edit this question in the correct manner. Sorry for the inconvenience and thank you!   The parentheses () around the year in the full reference of my academic writing are not allowed. In front of the year should be a comma, like this example:   Full reference: SURNAME, NAME, 2000. Title...  MWE:  \documentclass[ngerman]{scrartcl}  \usepackage[T1]{fontenc} \usepackage{             babel,             csquotes            } \usepackage[             backend = biber,             sortlocale = auto,             sorting = nty,             style = authoryear-comp            ]{biblatex}  \begin{filecontents}{\jobname.bib}   @book{         Sur,         author = {Surname, Name},         title  = {Title},         year   = {2000},        } \end{filecontents}  \addbibresource{\jobname.bib}  \begin{document}    Test \autocite[1]{Sur}.   \printbibliography  \end{document}   The result:    How can I implement this things?  Thank you for your help and effort in advance!


PHP array merge issues , multilevel array merge into single level

Here is my output: im using more foreach loop with different condition and values put into same array name $returnVal[]=  EX:  foreach($val1 as $vals) {       $returnVal[]=$vals; }     foreach($val2 as $vals)   {       $returnVal[]=$vals;   }     foreach($val3 as $vals)   {       $returnVal[]=$vals;    }     foreach($val4 as $vals)    {       $returnVal[]=$vals;    } `   Im getting Output:   Array     (         [0] => Array             (                 [0] => 39705--COLUMBUS--LOWNDES--MS                 [1] =>  39702--COLUMBUS--LOWNDES--MS                 [2] =>  39710--COLUMBUS--LOWNDES--MS                 [3] =>  39701--COLUMBUS--LOWNDES--MS             )          [1] => Array             (                 [0] => Array                     (                         [0] => 39705--COLUMBUS--LOWNDES--MS                         [1] =>  39702--COLUMBUS--LOWNDES--MS                         [2] =>  39710--COLUMBUS--LOWNDES--MS                         [3] =>  39701--COLUMBUS--LOWNDES--MS                     )              )          [2] => Array             (                 [0] => Array                     (                         [0] => 39705--COLUMBUS--LOWNDES--MS                         [1] =>  39702--COLUMBUS--LOWNDES--MS                         [2] =>  39710--COLUMBUS--LOWNDES--MS                         [3] =>  39701--COLUMBUS--LOWNDES--MS                     )                  [1] => Array                     (                         [0] => Array                             (                                 [0] => 39705--COLUMBUS--LOWNDES--MS                                 [1] =>  39702--COLUMBUS--LOWNDES--MS                                 [2] =>  39710--COLUMBUS--LOWNDES--MS                                 [3] =>  39701--COLUMBUS--LOWNDES--MS                             )                      )                  [2] => 57038--JEFFERSON--UNION--SD             )          [3] => 57049--NORTH SIOUX CITY--UNION--SD     )   My Question: remove duplicate values and merge into one level


A fantasy story about a man who discovers two groups of alien creatures similar to ants. He becomes a god to them

Circa 60's or 70's.The creatures are antlike colored red and black, I think. The creatures worship him and erect statues of him. He becomes cruel and behaves badly with them. The ants go to war with each other and things get out of hand with the man's help. In the end, I believe he is killed and they pull his statue down and rejoice in their freedom from his cruelty. The story may be called The Red Kings or something like that.


How can I remove Ubuntu from my system and install the Windows bootloader?

I want to completely remove Ubuntu from my system. But if I delete the partition, the Grub files will be deleted and that will leave me "Bootloader-less". How can I workaround this?


I've lost Dogmeat. Where/how can I get him back as a companion?

I have Nick Valentine as a companion now but Dogmeat isn't anywhere to be found! I'm playing on Xbox One so I can't use the console to find him like some people have recommended for PC users. Anyone know how I can find him?


In chapter 3 of Atiyah and Macdonalds Intro to Comm Algebra there is the statement  "We also have a ring homomorphism $f:A\rightarrow S^{-1}A$ defined by $f(x)=x/1$. This is not in general injective." (Note: $A$ denotes an integral domain and $S$ a multiplicatively closed subset of $A$.)  How could this possibly not be injective? If $f(x)=f(y)$ then $x/1=y/1$ so $1x=1y$ hence $x=y$. What am I missing here?


Finding an expression for $\tan (a+ b + y)$ which involves only $\tan a, \tan b,$ and $\tan y$.

How to find this ?   I'm stuck at $1$ and how to $1$ to change the tangent associated with a,b or c.  I meant this ,everybody.  $\frac{tan(a)+tan(b)+tan(y)−tan(a)tan(b)tan(y)}{1−tan(a)tan(b)−tan(a)tan(y)−tan(b)tan(y)}$


What is the need for Autobiographer badge?

What is the reason that Autobiographer badge is kept in Stack Exchange?  This does not show any participation and people can just fill garbage to achieve this badge.   Is there a reason behind it?


Table caption alignment with respect to table

How to align table caption in following example to the left of table (instead of being centered) ? Unfortunately I cannot find any switch which would govern this. Command   \captionsetup{justification=raggedleft}   does nothing.  \documentclass[twoside]{scrreprt}  \usepackage{floatrow}  \begin{document}     \chapter{Prilohy}     \hspace*{-1cm}\begin{minipage}{16cm}     \begin{table}[H]     \ttabbox[\FBwidth]             {\caption{Zoznam slavnych cinskych basnikov podla Kroebera -- tabulkova forma}}{     \begin{tabular}{@{}|l|p{3.5cm}|p{3.5cm}|p{2.5cm}|p{2cm}|}         \hline         Poradie & Meno & Alternativny \newline prepis mena & Koeficient \newline vynimocnosti & Rok \newline narodenia \\ \hline         1 & Shi-King & & & \\ \hline         2 & Ch'ü Yüan & Qu Yuan & 2 & -332 \\ \hline         3 & Sung Yü & Song Yu & & \\ \hline         4 & King Tsz'e & & & \\ \hline         5 & Kiah I & & & -199 \\ \hline         6 & Chuang-ki & & & \\ \hline         7 & Huai-nan-tze & & & -122 \\ \hline         8 & Tung-fang So & Dongfang Shuo & & -160 \\ \hline         9 & Liu Hsiang & & & -80 \\ \hline         10 & Liu Heng & & & -157 \\ \hline         11 & Mei Sheng & & 2 & -140 \\ \hline         12 & Ssu-ma Siang-ju & & & -121,5 \\ \hline         13 & Princezná Si-kiün & & & \\ \hline         14 & Cisár Liu Ch'ê alebo Wu Ti & & & \\ \hline         15 & Hsü Kan & & & \\ \hline         16 & K'ung Jung \newline (alebo Ying) & & & \\ \hline         17 & Wang Ts'an & & & 177 \\ \hline         18 & Yin Yang & & & \\ \hline         19 & Lin Cheng & & & \\ \hline         20 & Ch'en Lin & & & \\ \hline                 21 & Yüan Yü & & & \\ \hline         22 & Ts'ao Ts'ao & & & \\ \hline         23 & Ts'ao Chih & & & \\ \hline         24 & Liu Ling & & & \\ \hline         25 & Hsi (Ki) K'ang & & & \\ \hline         26 & Hsiang Hsiu & & & \\ \hline         27 & Yüan Hsien & & & \\ \hline         28 & Yüan Chi & & & \\ \hline         29 & Wang Jung & & & \\ \hline     \end{tabular}     }     \end{table}     \end{minipage} \end{document}   P.S. Recommended solution  \captionsetup{justification=justified,singlelinecheck=off}   does nothing. Also take in mind that page margins are in my case narrower by 1cm is not standard.


Compare two files: lines present in one, not in the other, by one column comparison

I need to compare 2 files. Column 1 is the same in both files. Column 2 is what I want to compare: I want all lines in file 1 that are not in file 2 when comparing column 2. Column 3 is different in both files, even for lines where column 1 and 2 are identical. I cannot remove column 3, because as an output I want the lines from file 1 including this column.  Here is an example:   File 1  21  12340   3 21  12341   7 21  12342   2 21  12343   89 21  12349   7   File 2  21  12340   55 21  12341   7 21  12343   89 21  12344   7 21  12346   88 21  12347   3 21  12348   37   My output would be:  21  12342   2 21  12349   7


What is the NBA's average team score from season to season; 2014 season vs 2015 season?


If the limit of a function exists as $x$ tends do infinity, must its derivative also exist?

I thought of a scenario where: if $ \lim_{x-> \infty}f(x)$ exists, which I can only imagine is a constant or asymptotic function, then it also seems like the derivative f' must also exist, but I don't know how to prove this either way. I guess if there is just a counterexample that would be easier than proving it. Is there an asymptotic function that somehow has a divergent derivative?


I have $3\times3$ matrices such that S=A+B. I know there is an inequality connecting rank of the matrices A, B and its sum S. Could you write down that here? It will be a great help for me.  Means equation  or inequality connecting rank(S), rank(A) and rank(B).


I continue to hear people use the word, "preventative."  I've always considered "preventive" to be correct. I consider the extra syllable in preventative to be superfluous. For example: With regard to medicine, we call it "preventive medicine," not preventative medicine. Which one is actually preferred in modern English?


Running shell script(containing wget) from Java

I'm trying to execute a shell script from Java.The script is supposed to download the file from the URL using wget.Here goes my code.       public class RunShellScriptFromJava {          public static void main(String a[]) {          try {               ProcessBuilder pb = new ProcessBuilder("/bin/sh","script.sh");               Process p = pb.start();               p.waitFor();               System.out.println("Success");          } catch (Exception e) {          e.printStackTrace();       }      }     }   Content of script.sh       echo "start"      wget http://alex.smola.org/drafts/thebook.pdf      echo "end"   My Question: Is this the right way doing it?If not please point me in the right direction.It doesn't throw any exception but I see that the file is not getting downloaded.Any lead/help is appreciated.  Thanks.  PS:I have given execute permission for the script


Should I completely rebuild my server due to Heartbleed?

I have a CentOS 6.5 VPS server...  $ uname -a  Linux mary 3.14.4-x86_64-linode40 #1 SMP Tue May 13 12:25:05 EDT 2014 \     x86_64 x86_64 x86_64 GNU/Linux   When the news about the Heartbleed vulnerability came out, I shut it down.  It was running Apache, MySQL, and a Ruby on Rails app. It did use OpenSSL.  I'm pretty sure it was running with vulnerable versions of OpenSSL for some time.  I booted it up again today and ran yum -y update.  I now seem to have the patched version of OpenSSL...  $ openssl version -a OpenSSL 1.0.1e-fips 11 Feb 2013 built on: Tue Apr  8 02:39:29 UTC 2014 platform: linux-x86_64 options:  bn(64,64) md2(int) rc4(16x,int) des(idx,cisc,16,int) idea(int) blowfish(idx)  compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DKRB5_MIT -m64 -DL_ENDIAN -DTERMIO -Wall -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wa,--noexecstack -DPURIFY -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM OPENSSLDIR: "/etc/pki/tls" engines:  rdrand dynamic   I think I have two options...   Revoke and reissue my SSL certificate for the domain and keep using the machine. Assume the machine is compromised and delete it, create a whole new VPS, install everything.   Rebuilding the entire system is a 1-2 day job.  Is it necessary or overkill?


Prove by combinatorial method that $ \frac{(2m)! \cdot (2n)!}{(m)! \cdot (n)! \cdot (m+n)!} $ is an integer

Prove that $$ \dfrac{(2m)! \cdot (2n)!}{(m)! \cdot (n)! \cdot (m+n)!} $$ is a positive integer, where $(m,n) \in \mathbb{Z^{+}}$  I have already solved it using Legendre's Formula which states that   $$e_{p}(n)=\sum_{i=1}^{\infty} \bigg\lfloor \dfrac{n}{p^{i}} \bigg\rfloor$$ where $e_{p}(n)$ is the exponent of a prime $p$ in $n!$. For the problem it was sufficient to show that $$ e_{p}(2m) + e_{p}(2n) \ge e_{p}(m) + e_{p}(n) + e_{p}(m+n) $$ which I can show using the properties of floor function.  However, I'm seeking a combinatorial approach to this problem. For example, using basic combinatorics, I can show that the number of ways to divide $A$ objects into $k$ persons such that the $i^{th}$ person receives $a_{i}$ objects is $$ \dfrac{A!}{\displaystyle\prod_{i=1}^{k}{(a_{i})!}} = \dfrac{\left(\displaystyle\sum_{i=1}^k (a_{i})\right)!}{\displaystyle\prod_{i=1}^{k}{(a_{i})!}} $$ here, the set $\{a_{i}\}_{i=1}^k$ is exhaustive, i.e, $ A = \displaystyle\sum_{i=1}^k a_{i} $. Using this, I can show the following numbers to be integer  $ \dfrac{(2m)! \cdot (2n)!}{[(m)!]^{2} \cdot [(n)!]^{2} } $  $  \dfrac{(2m)! \cdot (2n)!}{(m-n)! \cdot [(n)!]^2 \cdot (m+n)!} $ ; if $m \geq n$  $  \dfrac{(2m)! \cdot (2n)!}{(n-m)! \cdot [(m)!]^2 \cdot (m+n)!} $ ; if $n \geq m$   However, I can't seem to find a way to tackle this problem using my approach. Edit: I'm specifically asking for an answer using my combinatorics approach as I've already solved it using the answer given in the other question. Any help will be appreciated. Thanks.


I found this question somewhere and have been unable to solve it. It is a modification of a very common algebra question.          $\text{Let }y=\sqrt{5+\sqrt{5-\sqrt{5+\sqrt{5-...}}}} $,  what is the     nearest value of $y^2 - y$?          $\textbf {(1) } 1 \qquad \textbf {(2) } \sqrt5 \qquad \textbf {(3) } 4 \qquad \textbf {(4) } 2\sqrt5$      I worked the problem and got $$y^2 - y = 5+ \sqrt{5-\sqrt{5+\sqrt{5-...}}} -\sqrt{5+\sqrt{5-\sqrt{5+\sqrt{5-...}}}} \\ = 5+ \sqrt{5-y} - y = 5-y + \sqrt{5-y}$$ What do I do next?


So I set up my business email via g suite which created the domain name via godaddy. I have heard bad reviews on godaddy and was looking at a different host for my website. Do I have to host on godaddy since that is where I bought the domain from?  thank you


UK visa refusal for my wife to accompany me on my business trip

I am travelling to the UK in the 3rd week of November on a business visit and intend to stay for more 10 days, along with my wife, when my business is over. I have my visa, but my wife's visa was refused.  I transferred around 1100 pounds into her accounts close to her visa appointment date, with an intent to enhance her financial strength. She has been working for the last 2 years and we submitted her salary slips, bank statements (last 6 months) and her latest ITR. Because of this fund transfer, we mentioned that she would be bearing 75% of the trip cost and the rest 25% would be borne by me. However, I didn't provide any cover letter or any of my salary slips or bank statements along with her application.  The rejection letter states two reasons primarily:        The most recent credit amount of GBP £1100 doesn't match with the salary credits reflected in the statement. Also, the documents and information that you have provided do not demonstrate the origin of the funds held in this account: therefore, bank statement does not satisfactorily demonstrate your income or whether these funds are under your personal control. Therefore, I am not satisfied that this bank statement is an accurate reflection of your personal and financial circumstances.   Moreover you state that you are married and that your husband intends to travel to the UK and will contribute towards the cost of your trip. However, the documents you have presented do not demonstrate any details about your husband, his whereabouts income or employment. I am therefore not satisfied you have accurately demonstrated your husband is able to meet the cost of your trip as claimed. This undermines your credibility and therefore I am not satisfied your intentions to visit the UK are as stated.         Given the above I am not satisfied that you are a genuine visitor and that you will leave the UK at the end of your visit. I am not satisfied that you are genuinely seeking entry for a purpose that is permitted by the visitor routes. I am not satisfied that you have sufficient funds to cover all reasonable costs in relation to your visit without working or accessing public funds. This includes the cost of the return or onward journey and cost of planned activities. Therefore your application is refused under paragraphs V4.2(a)(c)(e).   I wish to reapply, providing the following documents: cover letter signed by me confirming that I would bear all her expenses, my salary slips, bank statements, company's invitation letter, hotel details (with both of our names). Along with that, the funds I deposited in her account had been withdrawn by me and now I am thinking of mentioning that my intent was to share the money with her as a gift to let her bear the expense, and there was a mutual consent. Now, that money is under my control and I will take full responsibility of bearing the expenses.  Let me know if there is something else which I need to do or follow a different approach. The application was refused today and I wish to reapply early next week.


variable with a variable substring in bash

In bash, I have defined   chg_Li=3 chg_Na=9   Now I want to call $chg_$i where i is in a for loop, looping over Li and Na.  What is the correct syntax to call $chg_$i?


Is there a way to see the variables declared in a session in Python?

The question is as it is in the 'Title', but for the sake of completeness -  Suppose :  >>> a= 23 >>> h ="Liam Neeson" >>> k ={'a','b','c'}   Are three variables. Then I do a whole bunch of other stuff. And I want to see what variables I have initialised so far, is there a way to do it? Something that will return                  [a,h,k].


How to get rid of clothing marks in nude photography?

Clothing marks are very annoying in nude/erotic photography and demand a lot of work to remove them in Photoshop.  How do you get rid of them before starting the session? Do you allow the model to be naked 15 minutes earlier of the session and then dress her again? Do you handle them in post-production?


Can $\sqrt[3]{2}$ be expressed as a linear combination of roots of unity?

I need to solve the following problem:  Can $\sqrt[3]{2}$ be expressed as a linear combination of roots of unity (with coefficients in $\Bbb Q$)?  I am completely lost because I have no idea of how to start this problem. Can someone help me, please?


What is a term which refers to the areas in the back or rear, with the same scope as the word "frontal"?  The satirical/humorous term backal exists, but is not really a word (or appropriate to use in writing).


How do I diff the outputs of two commands?

How can I use the diff command to compare 2 commands' outputs?  Does something like this exist?   diff  ($cat /etc/passwd) ($cut -f2/etc/passwd)


Why any square can be written in this form?

I have noticed that all squares, at least up to $19 ^ 2$ can be written as: $a^2 = 5k + p$, where $a \in \mathbb{Z}+\neq 1$ and $k  \in \mathbb{Z}+$ and $p = \{0,\pm1\}$  Some examples:  $4^2 = 5 \cdot 3 + 1$  $13^2 = 5 \cdot 34 - 1 $  What is the intuitive and formal proof to see this?


How to apply formula to new rows that are generated by script

I have a spreadsheet where new data into rows is added every hour. I tried using arrayformula but couldn't figure out how. Example spreadsheet:  I would like to compute column per hour


Check if multiple files exist in directory

How to find multiple files present in a directory in ksh (on AIX)  I am trying below one:  if [ $# -lt 1 ];then     echo "Please enter the path"     exit fi path=$1 if [ [ ! f $path/cc*.csv ] && [ ! f $path/cc*.rpt ] && [ ! f $path/*.xls ] ];then     echo "All required files are not present\n" fi   I am getting error like check[6]: !: unknown test operator //check is my file name.  what is wrong in my script. Could someone help me on this.


Is there a name for a mesh has 4 vertices that is not flat

Is this good to keep or should i avoid them?


I am trying to see if two "circles" intersect. The data I have is  two points and two radii (in meters). I am using srid 4326.  My main issue (i think) is getting the radius in meters.  SELECT (ST_Buffer('POINT (-104.949517 39.740264)',300) &&            ST_Buffer('POINT (-104.999924 35.000089)',300))   My questions are   Is there a more clever way to do this? Or how do I convert the radius from dd to meters to get correct buffers?


Can I use the Steam Windows app in two laptops with same Steam and Windows account?

I have two laptops- and I want to install Steam in both of them and use the same account in both. Both the laptops have Windows 10, with the same Windows account. Can I do so? Also, what if I have a WIndows laptop and a Macbook? Can I use Steam on both (using the same Steam account)? Will there be any restrictions?


Does anyone know of a good example of how to expose a WCF service programatically without the use of a configuration file? I know the service object model is much richer now with WCF, so I know it's possible. I just have not seen an example of how to do so. Conversely, I would like to see how consuming without a configuration file is done as well.  Before anyone asks, I have a very specific need to do this without configuration files. I would normally not recommend such a practice, but as I said, there is a very specific need in this case.


Make Windows always copy files when dragging and dropping them

Is there a way to change the default drag and drop behavior in Windows 7?   As of now it seems that if the location is on the same drive it'll move onto the other, otherwise if they are in different drives it'll copy.   Is there a way to change the setting so it'll always copy it?


Help - Compiz fails, no unity, Blank desktop after 13.04 upgrade

I was having Ubuntu 12.10 and then decided to upgrade to 13.10 using Software Updater.  After upgrading, desktop is blank .i.e the unity taskbar, unity bar, etc.. is not showing up....  I installed Nvidia-current driver. But this didn't help.  Then I switched to terminal  Ctrl+Alt+F1 and issued DISPLAY=:0 compiz --replace. But this is also not helping.  Its giving me below result compiz (decor) - Warn: No default decoration found, placement will not be correct.  I have desktop of below configurations:   Asus Motherboard. Intel Core i5 processor - Generation I 4GB RAM Nvidia 9600GT Graphic Card


I have a problem with apt.  When I try to update or upgrade Ubuntu, I receive an error telling me that I have dependency problems, and I can't go on. I've tried to solve the problem with apt-get install -f, aptitude install -f, and using Synaptic, but I couldn't solve it.  When I try to run Synaptic, it tells me that I have broken packages, but if I try to delete them, it tells me that it will remove a lot of essential packages like mount and hostname. I think that it would be the end of my Ubuntu if I proceed.


Display alert() click, relative to Id after .clone()

In this code, I can add other element. Id and value are changed after having generated. I would like to display an alert when I click  on "element3" after an event clicks. I have already tried but it does not work. In js/jquery code $('#element3').click doesn't work.       var current_num = 2;          $('#element3').click(function(){         alert("You did it, man!");     })          function addElement(){         $("#element1").clone().appendTo("#elements").prop("id", "element"+current_num).attr("value", "element"+current_num) ;                  current_num++;     }
   <input type="submit" id="element1" value="element1">
 _____

 <button onclick="addElement()" >Add</button>


A null set is always considered to be zero dimensional,but a set containing zero vector only is taken to be non-empty set.If something is present there,then why it does'nt make a contribution in part of dimension.


iCloud Drive is stuck uploading items and no longer syncs

I got the macOS Sierra update when it went into public beta, and I've been trying to use the automatic .  I've enabled the feature, however since September 7 no files have been uploaded. By this point, the bottom of my Finder windows say:     15.78 GB available on iCloud, uploading 156,106 items (543.2 MB of 543.2 MB)   However the files are never actually uploaded. I keep my screenshots folder on my desktop and I take a lot of screenshots, so I can see that September 7 was the last date any file was actually uploaded.  What should I do? Is there a way I can disable and re-enable the feature without risking loss of data? Are there any solutions to this problem? What should I try? So far I've tried rebooting, and tried software update to macOS 10.12.2 public beta.


Mounting a device — role of /dev, /media and /mnt, and the mount command

I have several closely related questions about what happens when I insert a CD. The files on the CD /media/Ubuntu\ 11.04\ i386/, but from what I've seen /dev/cdrom is also involved.   What is the difference between /dev, /media and /mnt? Following is what I have found from internet but I still have little idea:        /dev — this folder contains device   files    /media — this is a mount point for   removable devices   /mnt — this is a temporary mount point     What is the purpose of mount? In other words, if a device has been represented by the OS as a device file under /dev, why can it not be accessed via the device file directly without mounting?   Is mount only used for storage device, not for non-storage device, such as graphical card, network card, camera, ...? Where is a device file under /dev mounted to, under /media or under /mnt? I remember I have seen both, but am curious when to mount to which? I found my CD was automatically mounted to /media/Ubuntu 11.04 i386. I guess the device file of the CD is /dev/cdrom, but I cannot confirm it by looking into /dev/cdrom and /media/Ubuntu 11.04 i386:  $ ls -l /media/Ubuntu\ 11.04\ i386/ total 3522 -r--r--r-- 1 Tim Tim     143 2011-04-27 13:04 autorun.inf ... $ ls -l /dev/cdrw lrwxrwxrwx 1 root root 3 2011-05-28 15:12 /dev/cdrw -> sr0 $ ls -l /dev/cdrom lrwxrwxrwx 1 root root 3 2011-05-28 15:12 /dev/cdrom -> sr0   How can I find out which device file is for my CD?


How do I make an output file for the "time" command?

I'm sorry if this seems like a trivial question as I'm very new to linux. Anyway, I need to record the time for executing a shell script I made. time ./executable_file <input_here> > time_elapsed.txt   But obviously this only gets the output of the script I made. Any way on how to do this? update: So what I did was do the GNU version to get an output file for it. It worked now.


Advanced Alien Benefactors Cheat Us Out Of Our Radioactives, Get Comeuppance

Read this in a hardcover or paperback anthology book in the public or university libraries back pre-1990.  The story is a human recounting how highly advanced aliens visited Earth and offered all sorts of wonderful miracles of technology and medicine, but the price of their miracle machinery was to strip Earth of all of its natural radioactive elements. Earth paid and the aliens left with their bounty, but as time passed after their departure their miracle machines began to break down. On close examination of the inner workings their machines were found to be powered by the same sorts of radioactive elements they had cleaned Earth out of, and humanity realized it had been ripped off.  The twist at the end came with the narrator talking about the aliens apparently not being knowledgeable in the creation of artificial radioactives, and it turns out the story is being told by a crewman on an Earth ship which has used the aliens' technology and artificially-created radioactives to track them back to their world. At the end of the story he exhorts the reader along the lines of, "Now get out there and tell the bastards that the bill is due." or something strongly to that effect.


Airplane ticket booked under my middle name

I use my middle name pretty much everywhere.  At work I used to book travel myself and would always book under my first and last name.  We recently hired an admin who booked travel using my middle and last name.  Jet blue refused to change the ticket (or perhaps wasn't able to?).  The only option was to cancel the flight and re-book it at the last minute price, of course.  The other option is to show up to the flight and risk TSA refusing to let me travel.  Any advice?


What objects can be used as wand substitutes?

We know that wizards need a wand to focus their magic (wizards can cast spells without a wand, but they are unfocused and weaker). But some wizards aren't known to carry wands. Instead they carry something that works like a wand, but isn't.  Mad-Eye Moody uses a staff as his wand. Hagrid uses his pink umbrella, which was made from pieces of his broken wand.  Are there any other examples of wizards using something other than a normal wand to cast their spells? What are these objects? Do they work like normal wands, and what gives them their power? Would it be possible to use a magical weapon as a substitute for a wand? (Like, say, used the Sword of Gryffindor to channel your spells.)


Success of Bernoulli trials with different probabilities

If 20 independent Bernoulli trials are carried out each with a different probability of success and therefore failure. What is the probability that exactly n of the 20 trials was successful?  Is there a better way of calculating these probabilities rather than simply summing together the combinations of success and failure probabilities?


My question is: What is light, and, more specifically, how does it travel?  I've been contemplating  (which has no real credibility to my knowledge), the Cosmic Matrix Displacement Model. I was intrigued by one certain aspect, discussed starting at 5:53 (the video is linked to that time), which talks about strings in String Theory being 4 dimensional Vortispheres, which are explained in the video.   Basically, my interest in this is that it brought me to question my acceptance of the idea of light just being waves capable of traveling through empty space. I had never thought the phenomenon through any further than that. So the specific piece of my question, "How does light travel?" is inspired by the contemplation of the fact that light (and all energy) must need some sort of structure to travel through.  The concept explained in the video is that Vortispheres statically fill the universe and transfer 100% of their motion energy as they rebound off of each other.     The model asserts that the pre-universe matrix was:    (according to the model) When motion did occur in the space-time quantum vacuum, Vortispheres formed from the matrix substance with the sheer sphere boundary layer between the still matrix and the moving Vortispheres.    The Vortispheres continued to form and expand exponentially out through the new universe and were rebounding off of each other, transferring 100% of their motion energy to the next Vortisphere upon impact with zero friction loss.   According to the model, the minute length of time it takes for a Vortisphere to move across the matrix gap and impact the next Vortisphere establishes the average speed of light at 299,793,458 meters per second.  So anyway the video goes on to explain its explanation of the creation of matter and the workings of gravity, with gravity working in precisely the same way as molecular diffusion. Be that correct or incorrect as it may be, it sparked my curiosity on the subject of how light moves through empty space.    A Programmers's Metaphor  As a programmer, I'd sum up my question as being similar to me just accepting that JavaScript works, without caring about all the complex layers infrastructure programmed at lower levels to make it seem simple. Waves of light being like simple JavaScript and Vortispheres in the video being like complex Assembly code at a lower level. Hopefully this helps clarify what I'm asking somewhat. I'm curious about the infrastructure that acts as a medium for the light waves to work.  Of course, asking these questions may just be a silly task, since when you explain the "Assembly" infrastructure to me, I'll want to about what makes the Assembly work, and so on and so forth forever and ever in an endless chain of curiosity that will go on as long as we continue to ask questions... bleh. Physics...


Select differentiating records from two tables

I have two tables with a field called Date. I want to select only the dates of Table1 that are diferent from Table2.   In this case, the result would be 4 and 5.  Table1     Table2     Result Date       Date       Date 1          1          4 2          2          5 3          3 4 5


If I close my Gmail account will somebody be able to register my previous mail address?

If I close (is delete an option ?) my Gmail account, will somebody be able to register using my email address and read my mails?  I want to close my Gmail account but I don't want anybody to impersonate me with my old address.  Same question with Yahoo! Mail. Do they allow addresses to be re-used?


Are manifolds almost diffeomorphic to $\mathbb{R}^n$?

Let $M$ be an $n$-dimensional compact connected orientable smooth manifold. Can we always find a diffeomorphism $$M\setminus S_1\cong\mathbb{R}^n\setminus S_2$$ where $S_1\subset M$ and $S_2\subset\mathbb{R}^n$ are subsets of measure zero?


How can I encode and decode percent-encoded strings on the command line?

How can I encode and decode  (URL encoded) strings on the command line?  I'm looking for a solution that can do this:  $ percent-encode "ændrük" %C3%A6ndr%C3%BCk $ percent-decode "%C3%A6ndr%C3%BCk" ændrük


Bound on the difference of two determinants

Let $A$ and $B$ be two real, $n\times n$ matrices. Using Hadamard's inequality, it is not hard to show that $$ \left|\det A - \det B \right| \leq \|A-B\|_{2} \frac{\|A\|_{2}^n -\|B\|_{2}^n}{\|A\|_2 -\|B\|_2}. $$ Where $\|A\|_2=\sqrt{\sum_{i,j}a_{ij}^2}$.  From this, I can derive a sup bound, for example  $$ \left|\det A - \det B \right| \leq n^{n+1} \|A-B\|_{\infty} \max (\|A\|_{\infty}^{n-1},\|B\|_{\infty}^{n-1}). $$ Where $\|A\|_\infty=\sup_{i,j}|a_{ij}|$.   The constant $n^{n+1}$ is not the best bound possible : any reference (or proof) for a better (or the best) one? I show below that one can obtain $n^2(n-1)^{n-1}$, but that isn't much better. I just tried  $10^5$ random matrices on Maple and obtained a maximal constant (much) smaller  than one : this is not a proof, but it looks like there is room for improvement nevertheless.    Just for completeness (and in case someone sees a factor I missed), to get the first bound, writing $A=[A_1,\ldots,A_n]$ in terms of its column vectors, an expansion shows \begin{eqnarray*} \det A &=& \det (A_1 -B_1,A_2,\ldots,A_n) + \det (B_1,A_2,\ldots,A_n) \\   &=& \sum_{j=1}^n \det (B_1,\ldots, B_{j-1}, A_j -B_j,A_{j+1},\ldots,A_n) \\ && + \det B,  \end{eqnarray*} Thus by Hadamard's inequality, \begin{eqnarray*} \det A -\det B &\leq&  \sum_{j=1}^n \prod_{i=1}^{j-1} \|B_i\|_{2}\prod_{i=j+1}^{n} \|A_i\|_{2} \|A_j-B_j\|_{2} \\ &\leq&  \|A-B\|_{2} \sum_{j=1}^n \|B\|^{j-1}_{2}\|A\|^{n-j}_{2} \\  &=& \|A-B\|_{2} \frac{\|A\|_{2}^n -\|B\|_{2}^n}{\|A\|_2 -\|B\|_2}. \end{eqnarray*}  The second bound is just that $x^n -y^n\leq n \max(|x|^{n-1},|y|^{n-1}) |x-y|$ and $\|A\|_2 \leq n\|A\|_\infty$.    Another approach is calculus, namely, to write that $\det B - \det A = f(1)-f(0)$, with $f(t)=\det(A + t(B-A))$.   By the mean value theorem $f(1)-f(0)\leq \max |f^\prime (t)|$.   We can compute that $$f^\prime(t) =  {\rm trace}\left({\rm Cofm}(A +t(B-A))(B-A)\right)$$  (if I did not mess up, using the formula for the differential of a determinant, where Cofm means the matrix of Cofactors).   Then, it should deliver something better, if there is a nice way to bound it. The simplest thing is to use Cauchy-Schwarz, namely $$ \left|{\rm trace}\left({\rm Cofm}(A +t(B-A))(B-A)\right)\right|\leq \|B-A\|_{2} \|{\rm Cofm}(A +t(B-A))\|_{2} $$ and then, by lack of a better idea,  $$ \|{\rm Cofm}(A +t(B-A))\|_{2}\leq n \max_{ij} |{\rm Cof}_{i,j}(A +t(B-A))|, $$ and brutally, $|{\rm Cof}_{i,j}(A +t(B-A))|\leq ((n-1) \max(\|A\|_\infty,\|B\|_\infty))^{n-1}$ gives a slightly better constant, namely $$ n^2(n-1)^{n-1} <n^{n+1} $$ but that still seems a very rough way to bound a determinant, as it is never sharp, since to attain this bound all coefficients should be equal, and therefore the cofactor would be zero. They are of the same order in $n$, and I suspect this order is wrong.


Loss of space on a 16 Gb flash after format

So, I have a friend who has a flash drive that was playing music on a dvd player. Everything was great then all of a sudden it just stopped. First, I tried to do some data recovery on it but the software i use couldn't find the USB. The usb was sending us the usual error not formatted messages.  I then did a quick format of it and now it only shows 4 megabytes of space. I tried using Disk manager, then DISKPART, but nothing i have tried works.  Disk Managment looks like this:    As you can see it doesn't even show the unallocated space. It doesn't look like it is anything but a 4 mega byte flash drive.  Is it still possible to, at the very least, resurrect the USB?


Gparted shows microSD card as unknown filesystem and cant format it

I have a microSD card that stopped working and am having issues getting it to work. The card is not old and wasnt used a lot. I am able to format it on Windows and Linux but always goes back to the same settings. Whenever I format it on gParted it goes trough with no errors but if I refresh the Devices it goes back to the same settings. This is what gParted shows me: Unable to detect file system! Possible reasons are: - The file system is damaged - The file system is unknown to GParted - There is no file system available (unformatted) - The device entry /dev/mmcblk0p1 is missing


Best way to model a reponse when a covariate only applies to one group

I was using a GLM but am happy with other models. Fake example: Lets say I have a response such as income. I want to include GED as a factor (0 or 1), but I also have 'parental income' that I only want to apply to people that have a GED. I am mainly modelling against 'time being in employment', with other factors to consider. What is the best way to do this? Would it be stratify into two subgroups and then model them? I feel like I would lose the relationship between the two groups. Or if there a way to alter model for this? I am an R user if that helps...


So again i'm used to Crypto Currencies, and since im stupid i learn most things from threads from /biz/ (fortunately i still take decisions based on myself), i've seen plenty on lingo like a bull means a person who bought shares and is intending to sell them at a higher price or someone who has a long option(or a call), a bear is someone who borrowed someones shares sold them immediately and is intending to buy them back again for a lower price receiving the difference meaning a short(or a put). But how does one make money from the market not fluctuating a lot, or ending up in the same value as bought assuming this is what they refer by "crab market". Is it buying at a certain low point and then selling at a high point and repeating it multiple times and if so how can this be done automatically without constantly setting new lines? what if the stock literally doesn't fluctuate: ie there's no offers on the stock and theres no transactions or trading


Profile Bug - Reputation Summary Not Displaying All Lines

I noticed today that the reputation summary on  is displaying only one line:      Normally, it should display four lines, such as in my Stack Overflow profile:      The bug is reproducible in other profiles of users that also participated in the . Here is a screen shot for one of those participants:      I do have a lead on the cause, but I don't have it pinpointed. It seems to be happening to those users who have hit the rep cap (200 points), and also have other activity that, because of the cap, does not count.  For example, I have 5 events under "yesterday" that do not have any associated points:


Is it possible to get the instanceof operator result as a value?

Let's say I have a variable that could represent a number of different models (Objects). I want to respond to each differently, ideally through a switch statement. Is it possible to get the instanceof result as a value?  For example, something like this:  function determineModel(model) {     switch (model instanceof) {  // this does not work         case 'Foo':             // do something             break;         case 'Bar':             // do something else             break;         default:     } }


I've always been curious why some people insist that "I was mistaken" is grammatically correct whereas "I was mistaking" is grammatically wrong.  Doesn't the later follow past progressive verb tense?  Can someone give me an example where each is right or wrong?


I'm trying to upload a file via curl using a Windows batch file. format is curl -T "{filename}" ftp://{uploadlocation}/{filename} I'm looking to append the current time (hhssmm) to the target filename, curl -T "{filename}" ftp://{uploadlocation}/{filename}+time how would I go about doing this?


I want to calculate the sum \begin{align*}    \sum_{k=1}^{n-1} \frac{1}{k(n-k)}. \end{align*} I already tried some things but I think it has a nicer form than \begin{align*}    \sum_{k=1}^{n-1} \frac{1}{k(n-k)} = \sum_{k=1}^{n-1}  \frac{1}{n}\bigg(\frac{1}{k} + \frac{1}{n-k}\bigg) = \frac{2}{n}\bigg(H_n - \frac{1}{n}\bigg). \end{align*}


How do the AV-sync, Frame Dropping and No sync in Timeline work?

How do the AV-sync, Frame Dropping and No Sync options in Timeline work when working with audio and video?


When writing CUDA applications, you can either work at the driver level or at the runtime level as illustrated on this image (The libraries are CUFFT and CUBLAS for advanced math):   (source: )    I assume the tradeoff between the two are increased performance for the low-evel API but at the cost of increased complexity of code. What are the concrete differences and are there any significant things which you cannot do with the high-level API?  I am using CUDA.net for interop with C# and it is built as a copy of the driver API. This encourages writing a lot of rather complex code in C# while the C++ equivalent would be more simple using the runtime API. Is there anything to win by doing it this way? The one benefit I can see is that it is easier to integrate intelligent error handling with the rest of the C# code.


I had brewed one gallon and I let it ferment and then let it sit... I think it has been two months or so after the recommended fermentation of this particular brew. I know it won't continue to ferment or anything but I am wondering if you just let it sit for that long does anything bad happen? Or could I just bottle it like normal and not get sick or anything!? Thank you!


PHP returns symbols instead of scandics in result from MySql - although I'm using setcharset "latin1"

I have this code: $conn = new mysqli($servername, $username, $password, $dbname);  if ($conn->connect_error) {   die("Connection failed: " . $conn->connect_error); }  mysqli_set_charset($conn,'latin1_swedish_ci');  echo mysqli_character_set_name($conn);  $sql = "SELECT * FROM ggg";  $result = $conn->query($sql);  if ($result->num_rows > 0) {    while($row = $result->fetch_assoc()) {      echo "keyword: " . $row["keyword"]. " - Name: " . $row["firstname"]. " " . $row["lastname"] . $row["info"] . "<br>";        } } else {   echo "0 results"; }  The $row["info"]-parts in the echoed result are full of questionmarks inside a rectangle instead of the swedish signs "å, ä, ö". Although the charset is correctly set to "latin1_swedish_ci" which is exactly the same as in the database (which I checked from phpMyAdmin). What to try next, anyone have any ideas?


How to uninstall Popcorn-Time installed with a script?

I've installed Popcorn Time using the following command:  cd wget https://raw.github.com/hotice/webupd8/master/popcorn-build chmod +x popcorn-build ./popcorn-build   that I .   How can I uninstall it?


When an electron is observed it acts like a particle and its wave function collapse. This statement is very famous in quantum mechanics, but what is meant by observing an electron? Which devices are used to do so, and by what technics?


How to install numpy for Python 3.6.5 explicitly

This is not a duplicate question, I want to install numpy for python 3.6.5. it works on 3.4 on the same machine but I need it for 3.6, I tried "pip3 install numpy" and "apt-get install python3-numpy", they both install it but it's for 3.4 not 3.6.   To get things more clear, I use 3.4 on daily basis and 3.6.5 comes with Blender 3D, so I can't uninstall any of them. I'll do anything if I have to build numpy for 3.6.5. please help.... I'm using Ubuntu 14.04 LTS and I can't upgraded at this state.


Nikon D5100 says "lens not attached" in automatic mode (works in manual)

I'm a total beginner with my Nikon D5100 and i'm trying to shoot in auto mode. When I attach the AF-S Nikkor 18-55 mm lens, the camera says "lens not attached" unless I have it in M (manual) mode. I have checked and the lens is switched to A. Any help would be appreciated!


List of functions not integrable in elementary terms

When teaching integration to beginning calculus students I always tell them that some integrals are "impossible" (with a bit of expansion on what that actually means).  However I must admit that the examples I give mostly come from "folklore" or guesswork.  Can anyone point me to a list (not a complete list of course!) of fairly simple elementary functions whose antiderivatives are not elementary?  I'm thinking of things like $\exp(x^2)$ which is the standard example, $\sin(\exp(-x))$ perhaps, things like this, not hugely complicated formulae.


Proving that subgroup of Rotations in $D_{2n}$ is a normal subgroup

I am trying to prove that the group of rotations in $D_{2n}$ is a normal subgroup.  I know this group has a cardinality $n$, and the ratio of the $D_{2n}$ and $R$ is $2.$  I am trying to construct a homomorphism that sends $<R>$, generator group of rotations to an identity element...   Any clues?


Usually, when I edit templates, I can just press Tab and I can edit the text. Suddenly, when I press Tab, this happens:


Systemd reload service from package install

I am building an RPM (SLES12) package that installs a service with some software. The package dumps a new file into /etc/rsyslog.d to handle logging.  I would like to have the rpm basically run a "systemctl restart rsyslog" from the install... I guess from %post  Is there any specific way this should get run (like a macro) or should I just literally put that line in the scriptlet?


Site logos showing with white box in app on iOS 10 Beta

As you can see in the below screenshot, some of the the icons (e.g. Stack Overflow, User Experience, and more) are showing with white box around them.         App Version: 1.5.3.5 Device: iPhone 6s OS Version: Version 10.0 (Build 14A5297c)   Can this please be fixed?


Compute $\int_cd\omega$ and $\int_{\partial c}\omega$

Question: Let $c:I^2\rightarrow\mathbb{R}^3$ be the singular $2$-cube given by $$c(s,t)=\left(\frac{1}{2}s^2,st,\frac{1}{2}t^2\right)$$Let $x=(x,y,z)$ denote the cartesian coordinates on $\mathbb{R}^3$ and let $\omega$ be the $1$-form on $\mathbb{R}^3$ given by $$\omega=xy^2dz$$  i. Compute $c^*\omega$  ii. Compute $c^*d\omega$  iii. Compute $\int_cd\omega$  iv. Without using stokes theorem compute $\int_{\partial c}\omega$  Answer:   i. $(c^*\omega)(s,t)=(\omega\circ c)(s,t)=\omega\left(\frac{1}{2}s^2,st,\frac{1}{2}t^2\right)=(\frac{1}{2}s^2)(st)(d(\frac{1}{2}t^2))=(\frac{1}{2}s^3t)(tdt)=\frac{1}{2}s^3t^2dt$  ii. $d\omega=d(xy^2dz)=y^2dx\wedge dz+2xydy\wedge dz+xy^2d(dz)=y^2dx\wedge dz+2xydy\wedge dz$  $c^*d\omega=(st)^2d(\frac{1}{2}s^2)\wedge d(\frac{1}{2}t^2)+s^3td(st)\wedge d(\frac{1}{2}t^2)$  $=(st)^3ds\wedge dt+d^3t^3ds\wedge dt=2(st)^3ds\wedge dt$  I am stuck on parts iii. and iv.  Is there a formula for these types of problems?  I have not seen an example of one of these computed before  What is the name of this type of problem so that I can look up methods for it?  Any help would be greatly appreciated


I am relatively new to Java and have had the same issue on two projects in a row. In my controller I am comparing two strings using an if statement. If the strings match one set of logic is run and if the strings don't match a second set of logic is run. The first string is being pulled from a form using @ModelAttribute. I have two strings that clearly match but the proper logic isn't being performed and I'm confused.  Here is my form:  <form:form method="POST" action="/registration" modelAttribute="user">                     <p>                         <form:label path="firstName">First Name:</form:label>                         <form:input class="floatRight" path="firstName"/>                     </p>                     <p>                         <form:label path="lastName">Last Name:</form:label>                         <form:input class="floatRight" path="lastName"/>                     </p>                     <p>                         <form:label path="username">Email:</form:label>                         <form:input class="floatRight" path="username"/>                     </p>                     <p>                         <form:label path="password">Password:</form:label>                         <form:password class="floatRight" path="password"/>                     </p>                     <p>                         <form:label path="passwordConfirmation">Password Confirmation:</form:label>                         <form:password class="floatRight" path="passwordConfirmation"/>                     </p>                     <p>                         <form:select path="role">                             <form:option value="host" label="Host"/>                             <form:option value="guest" label="Guest"/>                         </form:select>                     </p>                     <input class="floatRight" type="submit" value="Register"/>                 </form:form>   The value I'm grabbing that is relevant to my question is the form:select with the values of either "host" or "guest".  Here is my controller:  @RequestMapping(value="/registration", method=RequestMethod.POST) public String registration(@Valid @ModelAttribute("user") User user, BindingResult result, Model model, HttpSession session) {     userValidator.validate(user, result);     if(result.hasErrors() ) {         return "/main/loginReg.jsp";     } else {         if(user.getRole() == "host") {             System.out.println("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");             System.out.println("host " + user.getRole());             System.out.println("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");             userService.createHostUser(user);             model.addAttribute("registered", "You have successfully registered your account! Please log in.");             return "/main/loginReg.jsp";         } else {             System.out.println("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");             System.out.println("guest " + user.getRole());             System.out.println("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");             userService.createGuestUser(user);             model.addAttribute("registered", "You have successfully registered your account! Please log in.");             return "/main/loginReg.jsp";         }     } }   When I create a new user via the form, the else statement is activated even when I use the "host" select on the form. I know the data is being transferred properly and that the else statement is activating because the System.out is printing "guest host". And my user is being created properly, albeit with the incorrect role.  Can anyone explian why the user.getRole() is giving me "host" but it doesn't match the string "host"? I sincerely appreciate any insight!


Can I upgrade the memory on late 2013 Retina MacBook Pro?

The below is my macOS version with basic capabilities :     While developing my apps, my Mac often shows great memory usage and swaps. These makes my Mac running and building apps slowly.  I would like to find out the ways to increase my SSD capacities and RAM . Would you please tell me how can I upgrade my RAM and SSD?


I have recently learned (discovered) that the exponent law $b^{mn} = {(b^m)}^n$ is not universally applicable. To demonstrate, if it were we could conclude that $(-1)^{\frac{3}{2}}$ (or by extension -1 to any power) is equal to 1.  $(-1)^{\frac{3}{2}} = (-1)^{2*\frac{3}{4}}$  = $((-1)^2)^{\frac{3}{4}}$  = $1^{\frac{3}{4}}$  = $1$  Under exactly what circumstances (natural/integer/rational/real bases or exponents) are the various exponent laws applicable? For example, can I use the above law ( $b^{mn} = {(b^m)}^n$ ) with a negative base when the exponents are required to be integers?


Transaction log growing out of control on random times

We have a problem with one of our databases. At random times something causes our transaction log to swell up to 20x its original size (it basically fills up the whole HD, so 20x is not accurate since it might grow more if there was space left on disk)   We do full backup once a week and differentials every day. Our database is using SIMPLE recovery mode. I am trying to go through the transaction log of the differential and full backup files using fn_dblog and fn_dump_dblog, yet for whatever reason, in both cases it is showing me [Begin Time] and [End Time] for a very small amount of time. For differential it is showing records for a time span of only around 1/2 a minute. For the full backup, it is showing records within a span of 5-10 minutes.  Here is the query I was running, hoping from here i can find long running transaction logs from the past:  SELECT      [Current LSN], a.[Transaction ID], [Transaction Name], [Operation], [Begin Time], [End Time], SUSER_SNAME([TRANSACTION SID]) as LoginName    FROM fn_dump_dblog (NULL, NULL, N'DISK', 1, 'DB_backup_path',     DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT,     DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT,     DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT,     DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT,     DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT) as a WHERE      Operation in ('LOP_BEGIN_XACT', 'LOP_COMMIT_XACT') order by      [Transaction ID]   Here is the query I was running to see long transaction which are still in activate transaction log:  SELECT      [Current LSN], [Transaction ID], [Transaction Name], [Operation], [Begin Time], [End Time], SUSER_SNAME([TRANSACTION SID]) as LoginName FROM      fn_dblog(NULL, NULL)  WHERE [Operation] in ('LOP_BEGIN_XACT', 'LOP_COMMIT_XACT')   In both cases, why am I getting data only for a small span of time?  Also, on more generic level, is this the best way to investigate why on random times the transaction log grows out of control. We looked at all the reoccurring sql jobs we are running and there is nothing extra ordinary there. When we kick them off, they run for at most 5 minutes. Even running multiple jobs at the same time causes no bottlenecks. Our application does not use any transactions when it talks to DB, so we are completely confused.  Any ideas?


What is the determinant of a column matrix? I figured it would not exist, or equal 0, knowing only the method for solving square matrices, but is there a different method for finding such a determinant?


Base $10$ uses these digits: $\{0,1,2,3,4,5,6,7,8,9\};\;$ base $2$ uses: $\{0,1\};\;$ but what would base $1$ be?    Let's say we define Base $1$ to use: $\{0\}$. Because $10_2$ is equal to $010_2$, would all numbers be equal?  The way I have thought Base 1 might be represented is tally marks, $0_{10}$ would be represented by nothing. So, $5$ in Base 1 would be represented by $00000$? Or we could define Base 1 to use: $\{$|$\}$ and $5$ would be |||||?


When I click "HOME" on my Navbar, it shows this, with a little white space underneath: However, I want it to show the full display at the top, without the white space under, like this: How can I fix this issue? Please modify my code to get the desired result and add the modified code in the answer. Here is my html and CSS code:


Let $A \in Mat_{n \times n}(F)$ a matrix which satisfies $A^n=0$ and $A^{n-1} \ne 0$ for some positive integer $n$. Let $v \in F^n$ be such that $A^{n-1}v \ne 0$.  Prove that $\{v, Av, A^2v,...,A^{n-1}v\}$ is a basis for $F^n$.     So, from definition of $A$, I know that $A^iv \ne 0$ for all $0\le i \le n-1$. I know I need to prove the set is linearly independent and span $F^n$ to prove it's a basis, but I just don't know how.


Build .deb package from source, without installing it

Suppose I have an installer program or source tarball for some program I want to install. (There is no Debian package available.) First I want to create a .deb package out of it, in order to be able to cleanly remove the installed program in the future (see , ). Also, installing using a package prevents it from clobbering files from other packages, which cannot be guaranteed if you run the installer or sudo make install.  Checkinstall  From reading the answers there and elsewhere, I gather the usual solution is to use  to build the package. Unfortunately, it seems checkinstall does not prevent make install from clobbering system files from other packages. For example, according to :     I created a Debian package from the install using sudo checkinstall -D make install.      [...] I removed it using Synaptic Package Manager. As it turns out, [removing] the package checkinstall created from make install tried to remove every single file the installation process touched, including shared gcc libraries like /lib64/libgcc_s.so.   I then tried to tell checkinstall to build the package without installing it, in the hope of bypassing the issue. I created a dummy Makefile:  install:     echo "Bogus" > /bin/qwertyuiop   and ran sudo checkinstall --install=no. The file /bin/qwertyuiop was created, even though the package was not installed.  In my case, I do not trust the installer / make install to not overwrite system files, so this use of checkinstall is ruled out.  How can I build the package, without installing it or letting it touch system files?  Is it possible to run Checkinstall in a ed  environment to achieve this? Preferably the build should be done as a normal user rather than root, which would prevent the process from overwriting system files if it goes wrong.


Profile link invalid error on account deletion form

I filled out the form to request my account be deleted as you can see, but for some reason my profile URL is being indicated as invalid. Is there something I am doing wrong?


Is there any way to create, assign and return variable inline?

Is there any way to create a local variable in a function, calculate it and return that function in same line,  For Example making this function   public static List<string> CalculateScore(this IEnumerable<GatheredMissionScore> list)     {         var calculatedScore = list.Select(gatheredScore => gatheredScore.ToString()).ToList();         return calculatedScore;     }   Like This   public static List<string> CalculateScore(this IEnumerable<GatheredMissionScore> list)         {             return var calculatedScore = list.Select(gatheredScore => gatheredScore.ToString()).ToList();                   }


transparent window when using gnome-shell and communitheme on Ubuntu 18.04

I have installed communitheme in gnome-shell. It gives smoother and faster experience. However, I am facing the following issue with System Monitor window. The window is completely transparent.    is there any way to solve this in this theme?


How can I solve this problem without doing it by hand?

I'm dealing with the following problem in computational programming. I'm trying to find a way to build an algorithm that can quickly resolve the following problem statement without forcing me to do it by hand. Is there any way to group the following relations below by some pattern or identity in order to make finding a possible values of c much more efficiently?  Problem: Given any integer x, where x > 2, is there any integer c, where c >= 1 that satisfies the following relations for some integer k, where k >= 0.   $\frac{x}{11 + 10k} = c \Rightarrow x = 11c + 10ck$ $\frac{x}{3  + 10k} = c \Rightarrow x = 3c  + 10ck$ $\frac{x}{7  + 10k} = c \Rightarrow x = 7c  + 10ck$ $\frac{x}{9  + 10k} = c \Rightarrow x = 9c  + 10ck$  Example $\#1$: $x = 3$ From $\#2$: $3 = 3c + 10ck$, so $k = 0, c = 1$ satisfy this relation. Example $\#2$: $x = 4$ From $\#1$: $c = \frac{4}{11 + 10k}$, so for any $k \ge 0$, the denominator will always be larger than $4$. No integer value of $c \ge 1$ will ever satisfy this equation. From $\#2$: $c = \frac{4}{3  + 10k}$, so for $k = 0$, the denominator does not divide evenly into $4$. For $k \ge 1$, the denominator will always be larger than $4$. No integer value of $c \ge 1$ will ever satisfy this equation. From $\#3$: $c =\frac{4}{7  + 10k}$, so for any $k \ge 0$, the denominator will always be larger than $4$. No integer value of $c \ge 1$ will ever satisfy this equation. From $\#4$: $c = \frac4{9  + 10k}$, so for any $k \ge 0$, the denominator will always be larger than $4$. No integer value of $c \ge 1$ will ever satisfy this equation.


Blender 2.90.0 scripting (copying selected mesh)

I'm completely new to coding in Phython. Especially blender scripting. I was googling all the possible ways to copy a selected mesh. But none of the code seems to work as it was for 2.7 or 2.8 blender version. As well as I like to add the new copy of the mesh to selected place. Wether it's underneath the selected mesh, or above. I'd like to as well scale the copy down.


Can I travel across EU with my student visa?

I am a non-EU citizen and am a PhD student in the Czech Republic. When I had my visa of type D, it says valid for CZ not Schengen States.  That being stated, I can understand that I can only enter EU from the Czech Republic. However, will I be able to travel across Schengen States using my student visa? I know that there is no passport control while visiting an EU country, but if the police of that country requires an ID:   Is my student ID card OK? Or should I show my passport? Can the visa in the passport cause trouble like I visited the country illegally?


“Ten bucks says…" or "Ten bucks say…"? Which is correct?

In the movie Avengers I, when the Cap said,“At this point, I doubt anything would surprise me.” Then the director Fury answered,“Ten bucks says you’re wrong."   I understand that Fury was betting ten bucks that the cap was wrong. My questions are:  1) 'Ten bucks' is a plural, why use 'says' instead of 'say'?  2) It's not the first time I heard this expression and it seems most time people use 'says'; so is it a fixed phrase ? Or some kind of abbreviation for some sentence? If so, could anyone help to show me the complete version? Thanks a lot.


Would you help me with adjectives, alive and live?

Although she forgot to water it for a week, the plant was still alive/live.   Which one is right?  My professor has just told me that you must use ALIVE. But I don't know why yet.


Calculating Area for data in WGS 84 using ArcGIS for Desktop?

I am using ArcGIS 10.1.1 for Desktop on my laptop.   When I try to calculate the area in WGS 1984 the area is disabled.  If I work in one projection, say WGS 1984, and calculate area in another Projection, is it ok to overcome this problem or it will effect the area calculation?   Can I calculate area using other projection and working in one projection?


Constructors of non static member classes take an extra hidden parameter which is a reference to an instance of the immediately enclosing class. There is also a syntactic extension of 'new'.   In the below code,  class K{     static class Ka{         static class Kb{             class Kc{                 class Kd{                  }             }         }     } }  class Test{     K.Ka.Kb.Kc.Kd k = new K.Ka.Kb().new Kc().new Kd(); }   Can you please help me understand the meaning of Kb() in K.Ka.Kb().new Kc().new Kd()? I understand that new Kc() is required as told in first paragraph.


Biber doesn't compile bibliography with year field

The following minimal example doesn't compiles on macOs with pdfTeX 3.14159265-2.6-1.40.21 (TeX Live 2020) and biber 2.14. If I remove the year fields from the bib file, it works. Any ideas, what's wrong here? The same example works on another Mac with previous version of pdflatex and biber (TeX Live 2019) \documentclass{article} \usepackage[backend=biber]{biblatex} \addbibresource{lauraPhd2016.bib} \begin{document} I doubt that there is any useful information here~\cite{wikibook}.  All we know is limited, apart from knowing the answer we all know.  Or do we? Wombat and Koala have discovered some interesting things~\cite{wombat2016}.  Some people are too nosy. What can happen to them is described by Laura Lion~\cite[9]{lion2010}.  \printbibliography \end{document}   @article{wombat2016,     author   = {Walther Wombat and Klaus Koala},     title    = {The true meaning of 42},     journal  = {Journal of modern skepticism},     year     = {2016},     keywords = {trusted}, } @book{lion2010,     author       = {Laura Lion and  Gabrielle Giraffe and Carl Capybara},     title        = {The dangers of asking the wrong question},     publisher    = {publishing house},     year         = {2010},     keywords     = {trusted}, } @online{wikibook,     title        = {Generating Bibliographies with biblatex and biber},     organization = {Wikibooks},     url          = {https://en.wikibooks.org/wiki/LaTeX/Generating_Bibliographies_with_biblatex_and_biber},     keywords     = {untrusted}, }   I ran the following commands: pdflatex document biber document pdflatex document pdflatex document  The log file (document.blg): [0] Config.pm:304> INFO - This is Biber 2.14 [0] Config.pm:307> INFO - Logfile is 'document.blg' [102] biber-darwin:322> INFO - === Di Okt 20, 2020, 10:19:46 [128] Biber.pm:415> INFO - Reading 'document.bcf' [252] Biber.pm:943> INFO - Found 3 citekeys in bib section 0 [269] Biber.pm:4256> INFO - Processing section 0 [270] Utils.pm:75> INFO - Globbing data source 'lauraPhd2016.bib' [270] Utils.pm:91> INFO - Globbed data source 'lauraPhd2016.bib' to lauraPhd2016.bib [283] Biber.pm:4455> INFO - Looking for bibtex format file 'lauraPhd2016.bib' for section 0 [285] bibtex.pm:1653> INFO - LaTeX decoding ... [290] bibtex.pm:1471> INFO - Found BibTeX data source 'lauraPhd2016.bib'


Java - Connect to SQL Server 2017 Exception

I've tried a lot of different solutions but nothing worked for me. I am trying to connect to SQL Server with Java and was following this Tutorial -   I've done everything in the tutorial and my code looks like:  package com.dictionary; import java.sql.*; import java.util.logging.Level; import java.util.logging.Logger;  public class Dictionary {      public static final String dburl = "jdbc:sqlserver://LAPTOP-NAME\\SQLEXPRESS;databaseName=French_English_Dictionary;integratedSequrity=true"     public static Connection connection;     public Dictionary() {}        public static boolean Connect() {         try {             Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");             connection = DriverManager.getConnection(dburl);             return true;         } catch (ClassNotFoundException ex) {             return false;         } catch (SQLException ex) {             return false;         }     }     public static boolean Disconnect() {         try {             connection.close();             return true;         } catch (SQLException ex) {             return false;         }     }     public static int ExecuteNonQuery(PreparedStatement preparedStatement) {         try {             return preparedStatement.executeUpdate();         } catch (SQLException ex) {             return -1;         }     }        public static ResultSet ExecuteQuery(PreparedStatement sql) {         try {             return sql.executeQuery();         } catch (SQLException ex) {             Logger.getLogger(Dictionary.class.getName()).log(Level.SEVERE, null, ex);             return null;         }     }     public static void main(String[] args) throws SQLException {             Dictionary.Connect();         String sql = "SELECT TOP 10 * FROM tb_French_English_Dictionary";         PreparedStatement s = Dictionary.connection.prepareStatement(sql);         ResultSet r = Dictionary.ExecuteQuery(s);         System.out.println("French English");         System.out.println("-------------------------------------------");         while (r.next()) {             System.out.println(r.getString(1) + "\t" + r.getString(2));         }     }  }   And it throws Null Pointer Exception:  Exception in thread "main" java.lang.NullPointerException at com.dictionary.Dictionary.main(Dictionary.java:53)   Can anyone help me , I am still new to JDBC.


How can I code a Python script that accepts a file as an  argument and prints its full path?  E.g.  ~/.bin/python$ ls ./        ../        fileFinder.py        test.md ~/.bin/python$ py fileFinder.py test.md /Users/theonlygusti/.bin/python/test.md ~/.bin/python$ py fileFinder.py /Users/theonlygusti/Documents/Online/theonlygusti.github.io/index.html /Users/theonlygusti/Documents/Online/theonlygusti.github.io/index.html   So, it should find the absolute path of relative files, test.md, and also absolute path of files given via an absolute path /Users/theonlygusti/Downloads/example.txt.  How can I make a  script like above?


What's the gradient of $f(x)=\langle Ax, x\rangle$?

let $A\in \mathbb{R}^{N\times N}$ and $f: \mathbb{R}^N \to \mathbb{R}, f(x)=\langle Ax, x\rangle$. How can I compute $\partial _1 f$?


$$\lim_{n \to \infty} \int_{0}^{1} e^{x^2} \sin(nx) dx$$ I am trying to find above limit without using the concept of Lebesgue integration. I know that $e^{x^2} sin(nx)$ is not a uniformly convergent sequence of functions so i can not take limit inside integration. So give me any idea that is it really possible to evaluate the limit without using the concept of lebesgue integration. Thank you


What is meant by nvarchar?  What is the difference between char, nchar, varchar, and nvarchar in SQL Server?


Why is my soft ban on Pokemon go lasting more than two hours?

I have gotten to the point where my Pokemon go account won't spin poke stops or catch Pokemon at all they always flee, so I looked it up and saw soft ban and lasts 30 mins, I waited for 30 mins then went back on however still could not catch Pokemon or spin pokestops, it has been two hours and I still can't do this. Could someone please tell me why?


Closure of these 2 sets coincides for entire function

This question was asked in an assignment which I am solving and I am struck on this.  Let f be a non-constant entire function. Prove that the closure of $\{z:|f(z)<c\}$ coincides with $\{z:|f(z)|\leq c\}$ for all $c>0$.  Let $1 =\{z:|f(z)|<c\}$ and $2 = \{z:|f(z)| \leq c\}$ for all $c>0$. Let {$z_n$} and {$z_m$} be respective sequences for set 1 and 2 which converge to z and z' respectively . Then $f(z)<c$ and f(z')$\leq$ c. But I have no reason to prove that required assertion . Can someone please tell which result should I use. Thanks!!


i.i.d. random variables uniform distribution

If I have an i.i.d. random variables $X_i$ from a uniform distribution on $[0,1]$.   How would I find scaling sequences $a_n$, $b_n$ such that $a_n(M_n − b_n)$ converges in distribution to a non-trivial limit function $G$ for  $ Y_i = X_i,$ and $M_n = \max(Y_1,...,Y_n) $


Is it possible to deploy a website using git push? I have a hunch it has something to do with using  to perform a git reset --hard on the server side, but how would I go about accomplishing this?


I just prestiged #2 and I received my prestige token. My extention cord was accidently pulled out and my system powered off. When I turned it back on and started up MW3, it told me I have 0 prestige tokens even though I hadn't spent the one I'd just acquired.   My console is a Playstation 3. I had prestiged two minutes prior to the cord being knocked out so it registered online that the token was in my possession. My PSN ID is OnLyPros_xExCeLz.  What can I do to get the token restored?


How to run a java executable without java -jar

As pdftk is not yet available on Ubuntu 18.04 I compiled a pdftk fork following  excellent answer to a related question.  This works great, however I now have to type   java -jar build/jar/pdftk.jar   to run pdftk.  I would like to just type pdftk with its respective options. I created a bash script, but this does ignore the command line options. Any ideas?


Generated .csv file display Â£ instead of £ symbol in csv file

"Item Name","Item Number",Description,"Cost Price","Unit Price",Count,"Reorder Level" " CHEFS TROUSERS BLUE/WHITE",21013,,£5.67,£12.50,1.00,0.00 ... ...   A csv file with the above format incorrectly displays a euro symbol in excel as Â£. Is there a way to fix this?


Where to get "/etc/ld.so.nohwcap" file from?

When I run a command through strace utility I can see access errors such as   access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)  Now I've read somewhere that what's happening on the above line is that a linker is looking for optimized version of the command that I'm running but can't find it.  How do I solve this problem ? What package do I need to install so that I can have that ld.so.nohwcap file on the system ? Even if not for optimization purposes but just to get rid of these errors in strace ?


Expected value of the largest element of a subset

A subset of $\{1, 2, 3, \dots, 20\}$ containing 10 elements is chosen at random. The largest element of this subset is noted. Find the expected value of the largest element.  I tried to solve this problem by finding the probability of each element being the largest one, but I got confused and would like some help. :)


Should an exactly equal edit be dropped?

I just improved an answer which was one second later edited by another user with the same actions, so that the diff is completely empty. I think the later edit should been dropped automatically.  Here is the question I'm talking about:


With regard to memory allocation, how (or where) should I declare the following variables?

I'm not sure whether it's appropriate to ask this here. I'm concerned about the memory allocation and I don't know where to read up on that.  I'm debating with myself whether I should declare local variables per root-finding function, or just use global variables that each function can reuse per call. Please note that I don't plan on using recursion here. Just (do-)while (or for) loops only.  I'd really appreciate it if I can get sufficient explanation too.  // [1] // global(?) variables // functions.cpp  #include <cmath> #include "functions.h"  using namespace std;  double guess1;     // upper double guess2;     // lower double root; double prevGuess; double sigFigs; double minSigFigs;  double newt_rhap(params) {    // do stuff } double bisection(params) {    // do stuff }   ===============  // [2] // local variables // functions.cpp  #include <cmath> #include "functions.h"  using namespace std;   double newt_rhap(x,y,z,f(),f_prime()) {    double guess = x;    double sigFigs = y;    double minSigFigs = z;     // do stuff } double false_position(w,x,y,z,a()) {    double xr;    double upper = w;    double lower = x;    double xprev;    double fxr;    double fxu;    double fxl;    double sigFigs = y;    double minSigFigs = z;     // do stuff }


If $S$ is a ring with the property that $s=s^2$ for each $s \in S$, then is $S$ commutative?   I know $st=(st)^2=stst$. On the other hand, $st=s^2t^2$. Hence, $$stst=sstt$$  If $S$ is a division ring, then by cancellation we can have $st=ts$.  But how to make sure that any non-zero element in $S$ is not a zero-divisor?


Prove that $ \frac{\sin(2m+1) \theta}{\sin \theta} = 1 + 2 \cos2\theta + 2\cos4\theta+\dots+2 \cos2m\theta$

I am struggling with a part of my textbook can anyone help me? It states: $$ \frac{\sin(2m+1) \theta}{\sin \theta} = 1 + 2 \cos2\theta + 2\cos4\theta+\dots+ 2\cos2m\theta$$  Why is this obvious? Do I have to perform a Taylor series?  Any help appreciated


Xubuntu - how to use both front and rear audio output?

I have connected speakers to the back panel of my computer at work and I would like to have them always enabled (I can switch them off on the speaker casing). However when I connect headphones on the front panel system automatically says that the rear output is unplugged.  I found a solution to disable auto detection with Alsamixer and it works almost ok except the fact that after system restart I need to reconfigure the settings again... How can I set this once and forget about it?


View history when auto update stats has run for a given table

Is there a query we can run to view when the stats have updated automatically (either sync or async) for given table?


Nietzche's: We killed God... Who was he referring to?

Did Nietzsche refer to the disease version of God (the fact that by the days of Nietzsche, Germans had found a cure for neurological Taenia Solium) or is he referring to the political definition of God (a king or an emperor).  In the later case, was he referring to the Chinese (opium war) or the French Bourbon (French Revolution).  The only war that is concomitant to Nietzche's statement are the Opim War or the fall of Napoleon III...  I am inclined to believe in the political version as the Germans had a cure for Taenia Solium long before the XIXth century, at least as a people...


Minecraft; How can you use command blocks to detect player levels?

I'm trying to work on redstone works with a new adventure map, how can I make command blocks detect player levels? That's my main question, the rest I know how to work out but here's the purpose anyway, I'm trying to make a command block detect player levels and at a certain amount of levels an action will happen (yet to be decided) but I know how to do that, just use a comparator to link up to the next command block and continue out the line of commands needed.


Show that $(\omega +3)\cdot\omega=\omega\cdot\omega$.  Is this just $(\omega +3)\cdot\omega=(\omega +\omega)\cdot\omega=\omega\cdot\omega$?  Also, could someone suggest a good book for set theory?


Will Gödel's theorem strike a death blow to the future of science?

According to Gödel's incompleteness theorem, no matter how many statements you prove, you will always have a set of statements not proved. Does this imply that some time in the future, scientific development will come to a halt due to our inability to discover/invent anything new?


What do I do with an upgrade stalled at 15%? And How do I safely recover?

I finally upgraded my laptop from 18.04 LTS to 20.04 LTS and it seems to have stalled at Progress: 15%. I was doing other things and periodically checking in on it, but the first few times my laptop when dark it continued with the upgrade. This time it's been stalled for several hours and I think it's time to bail, but I'm not sure how to do that safely. The most recent bit on the screen is this: Reloading AppArmor profiles  Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd Setting up openssl (1.1.1f-1ubuntu2.1) ... Installing new version of config file /etc/ssl/openssl.cnf ... Setting up ca-certificates (20210119~20.04.1) ... Updating certificates in /etc/ssl/certs... 0 added, 0 removed; done. Setting up libbsd0:amd64 (0.10.0-1) ... Setting up libedit2:amd64 (3.1-20191231-1) ... Setting up libcbor0.6:amd64 (0.6.0-0ubuntu1) ... Setting up libfido2-1:amd64 (1.3.1-1ubuntu2) ... Setting up libkrb5support0:amd64 (1.17-6ubuntu4.1) ... Setting up libk5crypto3:amd64 (1.17-6ubuntu4.1) ... Setting up libkeyutils1:amd64 (1.6-6ubuntu1) ... Setting up libkrb5-3:amd64 (1.17-6ubuntu4.1) ... Setting up libgssapi-krb5-2:amd64 (1.17-6ubuntu4.1) ... Setting up openssh-client (1:8.2p1-4ubuntu0.1) ... Installing new version of config file /etc/ssh/ssh_config ... Removing obsolete conffile /etc/ssh/moduli ... Setting up liblzo2-2:amd64 (2.10-2) ... Setting up squashfs-tools (1:4.4-1) ... Setting up libkmod2:amd64 (27-1ubuntu2) ... Setting up udev (245.4-4ubuntu3.4) ... Installing new version of config file /etc/init.d/udev ... Installing new version of config file /etc/udev/udev.conf ... update-initramfs: deferring update (trigger activated) Setting up snapd (2.48+20.04) ... snapd.failure.service is a disabled or a static unit, not starting it. snapd.snap-repair.service is a disabled or a static unit, not starting it.  How do I safely bail out of an upgrade that I launched with do-release-upgrade? I see that there are replies to older, similar questions but I don't want to assume that what worked in 2012 will still work today. A few folks have asked if  is a different question. It is different. I launched the upgrade with do-release-upgrade, I didn't launch it from the gui. It sounds like I may need to kill this, boot into recovery mode, and start over from there, if it doesn't get any farther.


I'm trying to print plain html from javascript and can't figured out how to do so.  Example:  $('#elem').html('This is a normal string'); // --> This is a normal string  $('#elem').html('This contains html') //Current-> This contains html   (contains is bold) //Wanted-> This contains html   I want to do this because I'm working with comments written by users and don't want html tags to apply if they put some in their comments. But for other reasons I need to see the tags.  Thanks for your help!


UV editing + texture - change color of the PNG image (caption)

I am using UV editing to put a letter to a wall. I have png like this:   After UV editing and and some texture added my output is like this:    I am looking for a way to change its color to some other one (and for example use Emission or sth like this).  My current nodes:


We had a question on our math test recently:  Show that $30$ is a divisor of $n^5-n$ for all positive integers.  The question did not say that you had to use modulus, which I assumed they wanted. Anyhow, I showed it using Mathematical Induction. At least I tried because sadly I did not score any points, therefore I wonder: Can it be shown using IP and if so, how would you do it?


Can I post more than one answer to a question?

I'm asking because of this .  I have already provided an answer and I have another way to achieve the solution. I want to add both answers.  Can I do that or are there any consequences for this?


How do I judge a professor's quality while choosing  a PhD?  I have completed my Masters in Pure Mathematics. I want to work in fields which involve Algebra,Functional Analysis,Complex Variables.  I also have my own funding to pursue my research.I have passed a qualification exam which will fund my studies for 4 years.  But I have the following questions:   Most of the questions asked here for example  asks to visit the labs. In Mathematics we don't have any labs. I searched some Professors working in the areas I have mentioned. Some of the Professors had great citations in the period 2005-2010 but now they don't get enough citations hardly 1 or 2. Also should I try to join a reputed University as I believe all professors will have great publications there? Or should I not judge a Professor on where he/she teaches? Also it is not possible to visit every Professor personally    In other words I am confused. I don't understand what to see and what not.  Can you kindly say how I should judge a professor or what factors should be taken into account ?


How can I parse the response of libcurl on IMAP?

I'm using libcurl to fetch e-mail with IMAP. Fetching itself is successful, but the problem is that libcurl can save the result of communication only in std::string or FILE* (as far as I have searched).  This made it difficult for me to parse the result into header, mime, and so on.  So I have searched libraries which makes parsing easier, but those are for other languages not for C/C++.  Since my project only uses C/C++, I have to use only those languages. VMime is written in C/C++ but I couldn't use Vmime because it uses its own implementation on IMAP communication (which makes libcurl useless).   // code to save the IMAP communication result into std::string buffer  curl_easy_setopt(mCurl, CURLOPT_WRITEFUNCTION, callback); curl_easy_setopt(mCurl, CURLOPT_WRITEDATA, &readBuffer);    readBuffer is std::string. I want to parse the result in readBuffer into desirable data structure( ex)stl ) for easier access.  Are there good libraries for it? I have searched for a day but I couldn't find it. Or if I can use Vmime only to parse the result, not affecting other libcurl codes that I have already finished, can you guide me how to do it?  I appreciate it in advance.


PVZ2 Far Future incorrectly displays 24/25 levels beaten

I've beaten all the levels in PVZ2's Far Future world, they are all blue, including the Dr Zomboss level - it shows the hologram of him with the bandaid.  But if I go out to the world selection screen, it says 24/25 levels beaten under the Far Future world. Is this a bug? I've tried to replay the Zomboss level so that it registers but it won't let me.


How to grep multiple strings that starts with certain value

I have a file consisted of two columns with bunch of numbers, and I'd like to search and find lines in which second column starts with 1.008 or 1.009 or 1.01 but I'd like to have printed both, 1st and 2nd column.  I tried:  grep -Ev '^1.008|^1.009|^1.01'   but it doesn't work.


I have a table which has following values:  case code id 100   A10  1 100   A11  2 100   A12  3 101   A11  4 102   A10  5   I need to write a query to get the following output:  case code 100  A10, A11, A12 101  A11 102  A10   Any help would be appreciated. Thanks.


"Pending" vs "Impending". Are they synonyms?

They appear to me to mean almost if not exactly the same thing, but I am not sure. Are there differences in meaning between them?


Should Plugin Folders Include a Blank index.php File?

WordPress itself, in the wp-content folder, includes an empty PHP file which looks like this.  <?php // Silence is golden. ?>   Should plugins include an empty file like this as well to stop folks view viewing the contents of a directory?  What about additional folders in themes -- like an includes directory?


Should a "loading" text or spinner stay a minimum time on screen?

In an app I'm building the user can click a button to load more content, which might take 1 second or up to X seconds (when X seconds passed I show a timeout error message). There is a "Loading" text (at the moment, it might end up being a spinner) that appears once the button is clicked and disappears when the content is loaded.  My idea is to show the loading state as soon as the user clicks. If the content arrives "too fast" the loading will appear for a very short time, so the user will know something was shown but won't be able to realize what it was (and look strange).  On one hand the content should arrive as soon as possible, but on the other hand, it might be strange to show some information without a minimum time (2 seconds maybe?) to assimilate it.  Any ideas of what is the correct way to go?  I am not looking for specific solutions on how to implement a loading state, @Majo0od provided a  in the comments. I am looking for rationale and/or any relevant case or information if there is.


Force a window to stay always on top in Windows 7

Question pretty much stands for itself. To just right click always on top and have window in focus all the time. (on top of other windows no metter if you click somewhere else, on desktop, taskbar, explorer, etc..) Some useful tool, or some other suggestion.


Java: Having trouble moving on with code after accepting user input

// Whenever I prompt the user to enter a Book or Periodical, using "B" or "P", it keeps asking me over and over again to enter a Book or Periodical. The program should ideally move on to the if statement depending on the user input. import java.util.Scanner; public class myCollection{ public static void main(String[] args) {     Scanner scan = new Scanner(System.in);     Item[] items = new Item[5];     String userInput;     String bName, aName, isbnNum, pName;     int issueNum;          for(int i = 0; i < items.length; i++) {                  System.out.print ("Please enter B for Book and P for Periodical: ");         userInput = scan.nextLine();                       if(userInput == "B") {             System.out.println("Please enter name of Book: ");             bName = scan.nextLine();                          System.out.println("Please enter name of Author: ");             aName = scan.nextLine();                          System.out.println("Please enter the ISBN: ");             isbnNum = scan.nextLine();                          items[i] = new Book(bName, aName, isbnNum);         }                   if(userInput =="P") {             System.out.println("Please enter name of the Periodical: ");             pName = scan.nextLine();                          System.out.println("Please enter name the issue number: ");             issueNum = scan.nextInt();     }      } }  }


I'm a bit confused with this definition in an example provided by microsoft using TAPI in Windows Mobile 5.0. What does CALLBACK do in this case? What is the purpose of it?  BOOL CALLBACK DialingProc (HWND, UINT, WPARAM, LPARAM);  The implementation looks the same BOOL and CALLBACK.  BOOL CALLBACK DialingProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {    //Some code here... }   I've been following  which is great but haven't really seen anything in regards to this... Also did a couple searches but no luck- maybe i don't know what i'm searching for here?


Do professors care about their rating on websites such as RateMyProfessor or Koofers?

I am wondering if a professor is already an Associate Professor, do they still care about their reputation in the eyes of the department considering tenureship is already granted?


I am trying to detect the device model and trying to do some operations based on that.   I do the code to detect the device model and manufacturer but for some reason its giving me a negative result.   Here's the code to detect the device model and manufacturer:  private Boolean isHTCone(){                  //For model and manufacturer both             String HTC_MODEL_MANUFACTURER = android.os.Build.MODEL+""+android.os.Build.MANUFACTURER;                 //If true then do something             Boolean isHTC = true;                 //My model name             String HTCModel = "HTC6500LVW";                 //For device model             String MyBuildModel = android.os.Build.MODEL;                 //For manufacturer                 String MyBuildManufacturer = android.os.Build.MANUFACTURER;             //Check for the condition             if(MyBuildModel==HTCModel){                  Log.i("Device Model is: ", android.os.Build.MODEL);                 return true;              }             else{                 Log.i("Device is not HTC One");                     return false;             }           }   Its always giving me a wrong value. Even when my device model is "HTC6500LVW", it's not accepting the if loop and is going to the else.  Can anyone tell me if I am doing something wrong here. I will really appreciate it.  Thanks in advance..:)


Prove that $u-i$ generates a maximal ideal of $A.$

Let $A = \frac {\Bbb C[X,Y]} {\left ( X^2 + Y^2 - 1 \right )},$ $x,y$ denote the images of $X,Y$ in $A$ respectively. If $u = x + iy,$ then prove that   (a) $u$ is a umit in $A,$ and   (b) $u-i$ generates a maximal ideal of $A.$  I assume by image of $X$ and $Y$ it is meant that the image of $X$ and $Y$ under the quotient map $f : \Bbb C[X,Y] \longrightarrow A$ defined by $$P(X,Y) \longmapsto P(X,Y) + \left (X^2+Y^2 - 1 \right ),\ P(X,Y) \in \Bbb C[X,Y].$$ Then $x = X + \left (X^2 + Y^2 - 1 \right )$ and $y = Y + \left (X^2 + Y^2 - 1 \right ).$ If we denote the identity of $A$ i.e. $1 + \left (X^2 + Y^2 - 1 \right )$ by $\overline {1},$ then we get $x^2 + y^2 = \overline {1}\ $ i.e. $\ u \cdot (x-iy) = \overline {1}.$ Since $x-iy \in A$ (Since it is the image of $X - i Y \in \Bbb C[X,Y]$ under the quotient map $f$), so it follows that $u$ is a unit in $A,$ which proves (a). How do I prove $(b)$? Any help will be highly appreciated. Thanks in advance. EDIT $:$ $A$ is isomorphic to $\Bbb C [x,y],$ as rings. Any maximal ideal of $A$ corresponds to the maximal ideal of $\Bbb C[X,Y]$ containing $\left (X^2 + Y^2 - 1 \right ).$ So $x+iy-i$ generates a maximal ideal of $A$ iff $\left (X+i(Y-1), X^2 +Y^2 -1 \right )$ is a maximal ideal of $\Bbb C[X,Y].$


SQL - an error occurred during the pre-login handshake

Until yesterday evening, I was able to connect to my server from my local machine. Now, I get the following error:  A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 0 - The wait operation timed out.) (.Net SqlClient Data Provider)  Note, I can log on to the actual server with no problem.  Yesterday, I installed IIS on my machine and set up a site using my IP address - don't know if this has anything to do.  I did come across this article, followed the steps, but didn't seem to help.    I also went through the following article, changed TC/IP settings, restarted, but nothing.    Started trying suggestions from comments too but stopped when I realized I might be messing things up more.  So, why is this happening / how can I fix?