How to deselect the checkbox when max row selection is set to 1 in LWC?

Hi I'm new to LWC and I have worked on the data table where it's iterated one so its shows like multiple tables in real-time now in each table the user will pick only one option from the selection so I have used max-row-selection =1 but here the problem is how to deselect the rows in Programmatically in LWC? <template for:each={oppList} for:item="table">
                  <lightning-card key={table.category} icon-name="custom:custom11">
{table.category}
             </lightning-card>         <lightning-datatable           data-id={table.category}           key-field="Id"           selected-rows={preSelectedRows}           onsave={handleSave}           onrowselection={handleRowSelection}           suppress-bottom-bar="true"           max-row-selection="1"           draft-values={draftValues}           data={table.data}           columns={column}                    >         </lightning-datatable>
             </template>  and my js  handleRowSelection = event => {         var selectedRows=event.detail.selectedRows;         if(selectedRows.length>1)         {             var el = this.template.querySelector('lightning-datatable');             selectedRows=el.selectedRows=el.selectedRows.slice(1);             event.preventDefault();             return;         }          }  attached my sample screenshot. [![enter image description here][1]][1] Thanks in Advance.


Evaluate the definite integral: $\int_0^\infty e^{-hx^2}\;\mathrm{d}x$

where $h>0$. Could someone explain to me how to solve it? I searched the internet and I found the result is $\frac{\sqrt{\pi}}{2\sqrt{h}}$ but I couldn't undersand Gauss error function - that is involved in solving.


Changing Shell to /bin/bash without root access via file

lets assume I am user(with no rights) and I need to change my shell as a default to /bin/bash by editing a file. So where I can find a file for a specific user where I can edit my default shell and set it permanently without involving an administrator.   And also, is there any command to change my own shell on top of that I can edit in the file directly.   I have tried to find something, but is only telling commands and files only if you have root access.  Thank you.


Compiler error when trying to call template method from private instance

(This question is only a duplicate of the other question if you already know the answer!)  (Please note my follow-up question: )  I get a compiler error at the indicated line when I try to compile templated C++ code with this structure:  template <int N> struct A {     template <int i>     void f() {}; };  template <int N> struct B {     A<N> a;      B(A<N>& a) : a(a) {}      void test() {         a.f<1>();  // does not compile     } };  int main() {     A<2> a;     a.f<1>();   // works fine     B<2> b(a);     b.test(); }   g++ says:  test2.cpp: In member function ‘void B<N>::test()’: test2.cpp:14: error: expected primary-expression before ‘)’ token test2.cpp: In member function ‘void B<N>::test() [with int N = 2]’: test2.cpp:22:   instantiated from here test2.cpp:14: error: invalid operands of types ‘<unresolved overloaded function type>’ and ‘int’ to binary ‘operator<’   clang++ says:  test2.cpp:14:16: error: expected expression         a.f<1>();  // does not compile            ^ 1 error generated.   The same expression works in the context of main(), but not within the test() method of the templated class B, which has an instance of A as a private variable. I am pretty clueless why this doesn't work.


Do not give the impression that all votes are unanimously in favor of the winning close-reason. I closed for "belongs on superuser," yet SO claims I closed for a completely different reason.  Source:


What is a less controversial name for the clothing item known as a "wife-beater" in the United States?

In the United States, a white sleeveless shirt is often referred to as a "wife-beater".  Typically I try to avoid using "wife-beater" due to its negative connotation. I've tried using a few different terms in the past, but each felt a bit too broad or generalized.   Tank Top: Can refer to , , or . Comes in a variety different , , and . Singlets: This term is most commonly used in Australia. In the U.S., I've typically heard it used when referring to one-piece spandex . Sleeveless Shirt: Describes     . Undershirt: Available as  or  shirts for both  and . Typically the most common alternative I've heard.   Is there a more appropriate term I can use in place of wifebeater here in the United States?    Note: This question is asking what alternative terminology can be used when referring to a "wife-beater". This question is not asking why the term is used or where it originated from. For that, see:     For those interested in how region affects the local terminology, I've included a Google Trends comparison for "" below.


As you all know, when we study analytical mechanics and similar courses, the phase space representation is always employed. It's of course a nice representation to see how particles and things are behaving, but I'm wondering, what is the necessity behind a phase space representation? In other words, why do we truly use it and do we actually need it? I hope my question doesn't sound stupid and you get what I mean.


Evaluation of the limit $\lim_{n\to\infty}\sum_{k=1}^n\frac k{k^2+n^2}$

$$\lim_{n\to\infty}\sum_{k=1}^n\frac k{k^2+n^2}$$   I need to evaluate this limit, but I don't know how to start. Should i take $1/n^2$ out?  Help required. Thank you.


Can a carrera valor mountain bike be converted to disk brakes?

My Carrera valour mountain bike currently has v-brakes but the are not very good and to be honest they look a bit tacky compared to disc brakes, is it possible to convert it to disk brakes, because I'm not sure whether my bike has a suitable frame...


Giving row more "breathing room" in LaTeX tabular environment

I'm creating a tabular environment in LaTeX, which has math mode entries within cells. One thing that bothers me a little is that the row size seems mostly calibrated to the main text, and so when I use subscripts and fractions, they end up bumping up against my \hline entries. An example is given below (zoomed in). As you can see, the j subscripts bump up against the below hline and the fraction bumps on both sides.  Is there any way to secularly increase the relative distance between rows/between hline and rows for my entire environment?  Thanks.  Example:  Code:  \begin{table} \centering \begin{tabular}{|l|c|c|c|}  \hline Model & Paper & $u_{ijt}$ & $p_{it}$ \\ \hline \multirow{2}*{Inattention} & \cite{HHSM} & $v_{it}(x_{jt})$ & $\text{Pr}\{\beta(x_{j^*t} - x_{j^*(t-1)}) \geq \eta\}$ \\ \hline  & \cite{AA} & $v_{it}(x_{jt})$ &  $\dfrac{\exp(\beta x_{id})}{1+\exp(\beta x_{id})}$\\ \hline  \end{tabular} \end{table}   Output:


I was solving limits and it said $\lim_{x→0}[x^2/\tan(x)\sin(x)]=0$

I tried using $[x][y]=[xy]$ but clearly, that is wrong  I know that $\lim_{x→0}[\sin(x)x]=0,\lim_{x→0}[\sin(x)x]=0$ and $\lim_{x→0}[\tan(x)x]=1$.


Herstein's Topics in Algebra Section $2.3$ Problems $12$ and $13$

So, these are the questions:     $12$. Let $G$ be a nonempty set closed under associative product,   which in addition satisfies:   a) There exists an $e \in G$ such that $a.e=a$ for all $a \in G.$   b) Give $a\in G$, there exists an element $y(a)\in G$ such that $a.y(a) = e$. Prove that $G$ is a group.   I thought that this question is stupid since that's exactly the definition of a group. However, I was stumped after reading problem $13$. Question $13$ goes like this:     $13.$ Prove, by an example, that the conclusion of problem $12$ is false   if we assume instead: a') There exists an $e \in G$ such that   $a.e=a$ for all $a \in G.$ b') Give $a\in G$, there exists an   element $y(a)\in G$ such that $y(a).a = e$   .  After realising that I'll need to prove that $a.y(a)=y(a).a=e$ in question $12$, I thought:  In $12$ b), $a.y(a) = e \Rightarrow (y(a).a).(y(a).a) = (y(a).e).a = y(a).a$. So using $12$ a) $(a.e=a)$, we have $y(a).a = e$.  This part is certainly false since the same method proves that $13$ is also a group, and also it could be that $e$ may not be unique in $G$ so I cannot assert that $y(a).a=a$ (Am I correct about this?).  So, my question is what do I need to show here to prove that $G$ is a group. Not to ask too much, but I couldn't find any example for question $13$ either. I think that I'll need to find a closed set where $a.e=a$ does not necessarily imply $e.a=a$. But I'm hopeless.


How to update the PATH user environment variable from command-line

I have a system PATH variable with the system level config. I use the user PATH variable to complement the PATH with user-specific config.  I would like to update the user PATH variable from command-line for example with setx.  But I don't know how to reference the existing user path in setx.  In the following command (setx without /M)  setx PATH c:\my-user-specifc-bin-path;%PATH%   the first PATH means user PATH but the second %PATH% will be substituted by the "full" (user + system) PATH.  So it means that the entire system path would be duplicated in the user PATH... what is definitively not what I want.  I would like to:   Affect only the user PATH environment variable Append/Prepend one or more path element to the existing value Do it from the command-line.


I can't run C files with .h files included in eclipse IDE and Code:Blocks

When i include .h files the compiler says no such file or directory i have installed MinGW in the default path C:\MinGW\ and i have added the MinGW path to environment variables path as C:\MinGW\bin   this is my code   #include <stdio.h> #include <main.h>  int main() { #if (DEBUG_MODE)     printf("Debug Mode!\n"); #else     printf("No Debug Mode!\n"); #endif     return 0; }   and this is my main.h file  #ifndef MAIN_H_INCLUDED #define MAIN_H_INCLUDED  #define DEBUG_MODE 1  #endif // MAIN_H_INCLUDED   and this is the error  11:02:58 **** Incremental Build of configuration Debug for project test **** Info: Internal Builder is used for build gcc -O0 -g3 -Wall -c -fmessage-length=0 -o main.o "..\\main.c"  ..\main.c:10:18: fatal error: main.h: No such file or directory #include <main.h>               ^ compilation terminated.  11:02:58 Build Failed. 1 errors, 0 warnings. (took 212ms)


Java having two Objects of Same Class with different Values

I have a problem where I want to have two Objects of the same Class. However, all of their variables are in synch somehow and I don't know how to fix this... For example: this is the Class of the objects public class Cat  {     public static int age;     public static String breed;     public static String Name;     public static String fur;          private Cat (String name)     {         age = 5;         breed = "Birman";         fur = "soft";         Name = name;     } }  and this is where I want to create Objects of this Class: public class test  {     static Cat Whisky;     static Cat Ghismo;          public static void main(String[] args)      {         Whisky.age = 10;         Ghismo.breed = "Maine Coon";                  System.out.println(Whisky.age + " " + Whisky.breed);         System.out.println(Ghismo.age + " " + Ghismo.breed);              } }  For some reason the output is this: 10 Maincoon 10 Maincoon  Why does it always give me the same values in the output and how can I fix this?


When trying to join Excel datafile to shapefile in ARC GIS 10.2.2 I keep getting the following message:  "Failed to connect to database.  An underlying database error occurred.  Class not registerd."  Any ideas how to resolve?


How to select a node with namespace from XmlDocument?

IDE: VS 2010, winforms,  I have a xml string    string  xmlstr = "<string xmlns="http://example.com/proj1">True|Success</string>";       I am trying to select the <string> node to get its InnerText for subsequent parsing:  True|Success     using below code:    XmlDocument xdoc = new XmlDocument(); xdoc.LoadXml(xmlstr);           string message = xdoc.SelectSingleNode("string").InnerText;  //Here getting null Execption error.     can you tell me how to select this message from xml?


What is the best camera to get that will give you a very nice photo on canvas print of 11 x 15 or larger?

I have tried several times to order a canvas print and it always comes back that the picture submitted will not work with the 11 x 15 canvas print and even an 8 X 10 wont work? I have a cannon E ( wont let me print name Santa's E )camera. What is the best type of camera I can buy that I can then make my pictures into Canvas photo's for my house? Just need the name of a good camera and know that it will turn into a wonderful Canvas photo.


How to get options of choosing between windows 8 and ubuntu at start up?

I installed Ubuntu 13.10 alongside windows 8.1 in a separate partition. But on start up , windows 8.1 automatically boots without giving me options to choose between windows and Ubuntu. Plz help! I want to choose OS on start up!


My glass material isn't transparent in Eevee

When using Eevee, an object with a glass material (in this case: Principled BSDF, trasmission set to 1.0) doesn't seem like it can be looked through: it's completely opaque.  See for instance the material for the blue cube in this scene:    How can I get my glass material to be transparent?


Infinite subset of compact space has an accumulation point

Let $(K,\tau)$ be a compact space and $B$ be an infinite subset of $E$. Why can we conclude that $B$ has a $\tau$-accumulation point$^1$? We may assume the contrary so that for every $x\in B$, there is a neighborhood $\Omega_x\in\tau$ of $x$ with $B\cap\Omega_x\setminus\{x\}\ne\emptyset$. If $F\subseteq B$ is finite, then $$\left|B\cap\bigcup_{x\in F}\Omega_x\right|\le|F|\in\mathbb N,\tag1$$ but since $B$ is infinite, this simplies $$B\not\subseteq\bigcup_{x\in F}\Omega_x\tag2.$$ In particular, $$K\not\subseteq\bigcup_{x\in F}\Omega_x\tag3.$$  However, I'm not able to conclude that this is a contradiction to the compactness of $(K,\tau)$. It is clearly a contradiction to the assertion that $(B,\left.\tau\right|_B)$, where $\left.\tau\right|_B:=\{\Omega\cap B:\Omega\in\tau\}$, is compact. But unless we assume that $B$ is $\tau$-closed, $(B,\left.\tau\right|_B)$ doesn't need to be compact. What am I missing?   $^1$ $x\in E$ is called $\tau$-accumulation point of $B$ if for every $\tau$-neighborhood $N$ of $x$ it holds $B\cap N\setminus\{x\}\ne\emptyset$.


Why is the series with the general term $\sqrt{n^2 + 1} - n$ divergent?

Test the series whose general term is: $$\sqrt{n^2 + 1} - n$$   This is from Higher Algebra by Henry Sinclair. I'm struggling to understand how this series is divergent. If you do the following expansion: $$\sqrt{n^2 + 1} - n$$ $$= n\biggl(1 + \frac{1}{n^2}\biggr)^\frac{1}{2} - n$$ $$= n + \frac{1}{2n} - \frac{1}{8n^3} + ... - n$$ $$= \frac{1}{2n} - \frac{1}{8n^3} + ... $$  The remaining series appears to converge to zero as $n$ approaches infinity.  Their explanation is similar to mine, but at the end they say that the above series approaches $\frac{1}{2n}$. From there they directly say that the series is divergent. Earlier in the chapter, it's proved that the expansion of $(1 + x)^n$ is convergent for $x < 1$. In this case, $\frac{1}{n^2} < 1$ as $n$ approaches infinity, so I would assume that the series converges.  The solution to the problem is given  (number 17)  Any help is appreciated. Thanks.


I have connection issue and its changing ip

I use DB 'Mysql 14.14 Distrib 5.7.24' and the OS is 'Ubuntu 18.04'  The DB server have local IP : 10.0.211.198  And For The application IP : 10.0.214.198  when I try connect form application server to db I get error in the connection but After I read it I found the mysql client change IP to Application IP as below screen    But when I try connect using telnet its successfully connected.  I try to remove db and reinstall it also try different client to connect and its same result.  Thank you


Finite dimensional field extension, finitely many intermediate fields

Good morning, My question is the following: Does every finite dimensional field extension have finitely many intermediate fields? I thought about it quite a while and know that the following is true: For a separable field extension there are only finitely many intermediate fields. Is there any example for a finite dimensional non-separable field extension with infinitely many intermediate fields?  Thanks a lot.


how to solve encoding issues with php and mysql database

Hello I am having encoding issues on a web app I have created. this web app I have created translates from English to some other local language. these records are in my database (mysql)  what I have done to solve the issue of encoding? header("Content-Type: text/html; charset=ISO-8859-1");  the above did fix a lot of encoding issues but I still had some encoding issues with some other data. Tried this too : header('Content-Type: text/html; charset=UTF-8'); but didn't solve any encoding issue see link to view encoding issue : https://www.4figure.ng/a/resultlang.php?lang=Igbo&&word=Good%20morning any suggestions on how to completely solve issues of encoding on my web app


convert lower case to Upper case in XSLT 2.0

<xsl:for-each select="./Indexes/Index">       <xsl:value-of select="Caption" />:       <xsl:value-of select="Description" /> </xsl:for-each>   convert lower case to Upper case in XSLT


How to go about consolidating three stack exchange accounts?


Suppose $f(x+y)=f(x)+f(y)$ for some $f: R \rightarrow R$ such that $f$ is continuous at $0$.Show that $f(x)=\alpha x$ for some $\alpha \in R$. Hint: show that $f(nx) = nf(x)$, then show $f$ is continuous on $R$. Then show that $f(x)/x = f(1)$ for all rational $x$.   How can I show $f(nx)=nf(x)$?? I am stuck with the first hint, so I can't show any attempt.  Thank you in advance!


Are there practiced religions in the wizarding world?

The question of  made me wonder as to whether wizards, any of them, do practice religion. Whether there be magic-person only religions or shared muggle faiths, I do not recall any wizards (born in the wizard world anyway) saying that they did practice a religion.  Many of them do celebrate Christmas, but as was commented on the above linked question, there are many non-christian muggles that also observe Christmas. So I am not sure that can be an accurate identifier. Answering this question may link into identifying .


Zero energy universe does not make sense

Can someone explain the zero energy universe in a way that makes sense?    The explanation that all positive and negative energies cancel out to zero does not make sense to me, because if that were the case then there should not be anything in existence.


Can all positive integers of the form $4n+1$ be expressed as the sum of two squares?

I know all primes, $p\equiv 1{\pmod 4}$ are the sum of two squares    I vaguely recall that all composite integers, $x\equiv 1{\pmod 4}$ can also be expressed as the sum of two squares (and in more than one way), but I can’t remember, or find, a proof.  It’s certainly true all the examples I’ve tried, but please will somebody point me to a simple proof?  Update 10th August 2017 I can agree, at a push, that the candidate duplicate does provide an answer to this question, but I fail to see that it’s reasonable to expect me to recognise $$n = p_1.p_2.p_3 \cdots p_k.m^2$$ and $$x\equiv 1{\pmod 4}$$ as having the same meaning, especially as it was not flagged when I entered the question.  However, my question has been fully answered, so it matters little.  I apologise, both for posting and for forgetting such an elementary fact.


How to put 'and' between name of authors

I am currently working on a paper and using overleaf online editor to write it. Problem is, that I am not able to put and between name of two authors and it is limited to those cases where the paper that I'm citing has only two authors and works for other cases. Here is a sample  bibtex:  @article{nikora2004water,   title={Water-worked gravel surfaces: High-order structure functions at the particle scale},   author={Nikora, Vladimir, and Walsh, Jeremy},   journal={Water Resources Research},   volume={40},   number={12},   year={2004},   publisher={Wiley Online Library} }   I have tried following variations:  author={Nikora, Vladimir, and Walsh, Jeremy}, author={Nikora, Vladimir and, Walsh, Jeremy}, author={Nikora, Vladimir and Walsh, Jeremy}, author={Nikora, Vladimir and Walsh, Jeremy},   and none of them work. Here is the sample output of what happens:     My desired output is to see V. Nikora and J. Walsh and I am not able to get there. I have to mentioned that I've tried using \usepackage{natbib} which did not fix anything as well.


I have a 12v adapter which has a rating of 1.5A. 1.5A is a large current. I've  used the adapter to power a microcontroller board. The microcontroller board has an lm317 linear voltage regulator to step down the output to 5v but since the microcontroller uses only a few milliamps of current.. How does it handle the 1.5A of current from the adapter? Wouldn't the controller blowup?


How to get new answers to old/popular questions read/voted on?

If a question has more than one page of answers then a new answer is not likely to get much attention.  I think the stackoverflow engine should give some more weight to newer answers to old questions but I'm not sure how.  Maybe a tweaked UI to get access to newer answers.  NB. In the related questions this  popped up, I hadnt realised either that these tools existed.


$f$ is continuous on $[0,1]$, $f(0)=f(1)$,$n\in \mathbb N$ constant $\Rightarrow$ There exists $x\in[0,1-\frac{1}{n}]$ : $f(x+\frac{1}{n})=f(x).$

I've been trying to prove this statement:     Let $f$ be a continuous function on $[0,1]$ such that $f(0)=f(1):=c$, and let $n$ be a natural constant. Prove that there exists $x\in[0,1-\frac{1}{n}], x\in \mathbb R$ such that $f(x+\frac{1}{n})=f(x).$   I tried to use the Intermediate Value Theorem by defining $g(x)=f(x+\frac{1}{n})-f(x)$. I could see that $g(0)=f(\frac{1}{n})-c$ and $g(1-\frac{1}{n})=c-f(1-\frac{1}{n})$ yet I could not figure out how to prove that $\mathrm s\mathrm i\mathrm g\mathrm n (g(0)\cdot g(1-\frac{1}{n}))=-1.$  Edit: Please notice that this statement is not (necessarily) true for every n. The statement is about some constant n.  Thank you and have a good day!.


There is following sample code combination 5C2.  I want to create all combinations 5C1 , 5C3 , 5C4 and 5C5.  list = [ 0,1,2,3,4 ] 5C1 means (0),(1),(2),(3),(4),(5) 5C2 means (0,1),(0,2),(0,3),..(1,2),(1,3),(1,4)..,(2,3),(2,4) 5C3 means (0,1,2),(0,1,3),(0,1,4),(0,1,5)..(1,2,3),(1,2,4) 5C4 means (0,1,2,3),(0,1,2,4),(0,1,2,5)..(1,2,3,4),(1,2,3,5) 5C5 means (0,1,2,3,4)   Please let me know your advice and comments.  import arcpy import itertools  arcpy.env.workspace = r"C:\path\to\workspace"  base_shapefile = "some_shapefile.shp"  oid_field = arcpy.Describe(base_shapefile).OIDFieldName feature_count = int(arcpy.GetCount_management(base_shapefile).getOutput(0))  for (i, j) in itertools.combinations(range(feature_count), 2):     arcpy.Select_analysis(base_shapefile , "combination_%i_%i.shp" % (i, j), '"%s" in (%i, %i)' % (oid_field, i, j))


Forcing ArcMap to recognize text field in CSV file

Related to  I have a CSV file which contains a mixture of numeric and text fields: ID,Txt,Int,Dbl 12345,abc,45,56.78 12346,9,65,23.12 12347,10,66,23.13  According to this  if the top 8 rows contain a text value, the field will be classified as text, yet I am finding that the second field is classified as Long. This means that the value "abc" is omitted:  How can I force ArcMap to recognise this as a text field, while maintaining the data in CSV format? A workaround will be to create a geodatabase table, define the field as text, and Load the data, but I'm hoping to keep the table in CSV (it's the output of another process).


Geometric explanation of $\sqrt 2 + \sqrt 3 \approx \pi$

Just curious, is there a geometry picture explanation to show that $\sqrt 2 + \sqrt 3 $  is close to $ \pi $?


Setting the background of a Toggle Button to an XML but in the Activity Java

In my Activity A, I have 8 toggle buttons that the background of them is set within the layout xml to an xml file to change the pictures on change state. After choosing 4 of them, the image strings are saved to a SQLite database. In my Activity B, I am trying to set the background of another set of toggle buttons from the choices made from Activity A.  Each of the 8 original toggle buttons has 4 images associated with them.  So i have 32 change state xmls but when I try to set the background during if statement, they do not show.  The original image strings are saved to a sqlite database in (A) and then retrieved in (B).  I know the database retrieval works, its just setting the toggle button background based on the value from the database.  JAVA  if(imgData1 == "img1.png")     {         tbTest1.setBackgroundResource(R.drawable.test1);         tbTest2.setBackgroundResource(R.drawable.test2);         tbTest3.setBackgroundResource(R.drawable.test3);         tbTest4.setBackgroundResource(R.drawable.test4);     }     else if(imgData1 == "img2.png")     {         tbTest1.setBackgroundResource(R.drawable.test5);         tbTest2.setBackgroundResource(R.drawable.test6);         tbTest3.setBackgroundResource(R.drawable.test7);         tbTest4.setBackgroundResource(R.drawable.test8);     }     else if(imgData1 == "img3.png")     {         tbTest1.setBackgroundResource(R.drawable.test9);         tbTest2.setBackgroundResource(R.drawable.test10);         tbTest3.setBackgroundResource(R.drawable.test11);         tbTest4.setBackgroundResource(R.drawable.test12);     }     else if(imgData1 == "img4.png")     {         tbTest1.setBackgroundResource(R.drawable.test13);         tbTest2.setBackgroundResource(R.drawable.test14);         tbTest3.setBackgroundResource(R.drawable.test15);         tbTest4.setBackgroundResource(R.drawable.test16);     }


"Polynomials" with non-integer exponents

Are there some books or articles regarding "polynomials" with non-integer (real) exponents, i.e., $$f(x)=a_1x^{e_1}+a_2x^{e_2}+\dots+a_nx^{e_n},$$ where $e_1,e_2,\dots$ are any real numbers (and $x$ being also real)?  I am mostly interested in theorems regarding the location of the roots, number of the roots, bounds, etc., of such "polynomials". Thanks.


How do I tell if a used bike (craigslist) is worth it?

So there are always a lot of sales going on on craigslist / ebay / etc. How do I tell if what they are selling is worth it?  I don't really know the difference between a $500 bike and $1500 bike. I know weight is one of concerns but 20 or 25 lbs or even 30 lbs it's pretty hard to tell the difference. There are multitudes of brand names and even more variations within the brand name.   There are also the group sets (even discounting too much of customization)  My stats: 5'10, 270 lbs Purpose: Commuting ~12 miles daily (each way) - (assuming for long rides 50+ a hybrid is better)    I am planning to go to a local shop to try out some bicycles but, i also don't mind used, but somehow doubt someone from Craigslist will let me do a 'test drive'. Hopefully this is enough information about what my purpose and question is    to sum it up: - What should I look for that will make the difference between a $500 bike and $1500 (both for same purpose) when it comes to Frame/Components


I have the following nginx location block:  location ^~ /publish {   allow 127.0.0.1;    #Allow home   allow 99.100.101.102;    deny all; }   Then this location block to process PHP after:  location ~\.php {   try_files $uri =404;   fastcgi_index index.php;   fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;   fastcgi_intercept_errors on;   fastcgi_pass 127.0.0.1:9000;   include /etc/nginx/fastcgi_params; }   The problem is that files inside of /publish like execute.php aren't being processed by the fastcgi PHP processor, they simply output the pure PHP code when called from CURL. How do I enforce the security rules defined in the /publish block but also still execute the PHP block if the file ends in .php?


How to tell if the CPU supports hyper threading

I know it should be a simple matter of grep -wl ht /proc/cpuinfo but that's not always accurate.  I have an i5-7440HQ CPU which doesn't support hyper-threading (, , and my BIOS agree on this).    Yet /proc/cpuinfo and dmidecode both show that hyperthreading is supported (but disabled).  Kernel 4.10.8  When running a report of all machines that are HT capable, but have it disabled, this machine shows as a false positive... I'd like to fix that.  Is there a more accurate test that will show that this CPU really doesn't have HT?  Edit:  The related question  asks how to tell if it's enabled, which is not what I'm asking.  Some of the answers to that question mistakenly attempt to answer this question instead, but none of them provide a correct answer (as noted above).


So I have about $50 in pennies, dimes and nickels.  What would you do with it?  I'm asking because I don't think spending hours rolling up the change and taking it to the bank is the best/most creative thing.  More info:  I took the change to the bank (not rolled up).  The banker asked me if I knew the exact amount... when all I had was a huge bag of change weighing like 30-40 pounds :-p  I said I didn't know the exact amount.  So the banker put all the change into a different bag, gave me a little receipt and said look for a deposit to your account in about a week.  Next time I'll just find a coinstar machine. I don't like waiting a week to have my change counted.  Also I'm sure the banker could fish out the quarters and no one would be the wiser :-)


I was wondering how to create a symbolic link in Ubuntu (12.04 LTS). I've done this before but this time it is a little different.  This command worked before.  user@desktop:/media/backup/folder$ ln -sv file.ods /home/user/file.ods   The last time I I created a file from my backup drive [harddisk].  Now I would like to create a symbolic link to a file present on a fileserver.   This is a virtual machine and probably a network connection to it is required. The fileserver (networkshare) is mounted at /media/fileserver.   I did try to use the same command as mentioned above, however, it create an empty file when opened it askes to be deleted because it is empty and useless.   When I do the command from above, it does not work. So, can someone help me out here?


ubuntu 13.10 with windows 7, 32 or 64 bits for 6gb of ram in AMD processor 32 bits

My processor is an AMD 32-bit, but supports up to 8GB of RAM.  I'm going to install ubuntu 13.10 alongside windows 7 with 6 gigs and I want to know if windows 32bit supports 6 gigs if ubuntu 13.10 32bit supports 6 gigs,  if not possible and need to install 64-bit to use more gigs, I can install the versions of windows and ubuntu 64 bit on my 32-bit processor?  please help.  thanks in advance


Special relativity and imaginary coefficient of the time coordinate

I read somewhere that part of Minkowski's inspiration for his formulation of Minkowski space was Poincare's observation that time could be understood as a fourth spatial dimension with an imaginary coefficient.  Clearly, taking the Euclidean norm of the vector $$(i \Delta t, \Delta x, \Delta y, \Delta z)$$ gives the correct spacetime interval (assuming appropriate units), but I don't really know where it goes from there (possibly something to do with Moebius transforms?)  I think this is mentioned in Taylor and Wheeler's book, but I may have read it elsewhere. After the historical note, the author (whoever it was) said it was "preferable" to use Minkowski geometry straight off, rather than mucking about with time as an imaginary space coordinate.  Could anyone elaborate on Poincare's formulation? Why is Minkowski's methodology better?


LWC wire methods execution sequence : Passing one wire method result as parameter to second wire method

I am having two client-side controller methods, How to pass the response of the first wire method as a parameter to the second wire method. The second wire method is dependent on the first methods returned data.  @wire(method2, { oinputmap: "$inputMap", intname: "$interName" })   wiredresponse({ error, data }) {     //({ oinputmap: this.inputMap,intname: this.interName })     if (data) {       var responseObj = JSON.parse(data);       console.log("result activate card" + responseObj);       if (responseObj.Result.Code === 0) {         this.description = "Card Activated." + responseObj.Result.Description;         //TODO: Update XPAC in card       } else {         this.description = responseObj.Result.Description;       }       console.log("result" + responseObj.Result.Description);     } else if (error) {       console.log("buildandcallinterface:Exception in fetching card number");     }   }


I am using the appendices and the varioref package to refer at them.  The code for the appendices is the following:  \documentclass{book}     \begin{document}     \begin{appendices}     \appendixpage     \noappendicestocpagenum     \addappheadtotoc      \chapter[MATLAB codes]{List of MATLAB codes} \label{app:MATLAB}      \begin{lstlisting} [language=Matlab, caption=Reconstruction function., label=code:reconstruction]      some text      \end{lstlsiting}     \end{appendices}     \end{document}   when i quote them in the text i do it this way:   In appendix \vref{app:MATLAB} we have the code \vref{code:reconstruction}   the results are strange, like:"In the appendix chapter A we have the code ?? A.1 on page 121".  Is it normal?  I am using (in this order) these packages:  \usepackage{varioref} \usepackage{hyperref} \usepackage{cleveref}   Thank you in advance.


Google chrome keeps crashing: possible conflict with comodo firewall?

I've used chrome for years, and comodo firewall and HIPS protection for some months, but suddenly google chrome started crashing as soon as it was loaded. I tried to reset my user profile and reinstall the program, but nothing changed, and loading it in Comodo sandbox didn't lead to any results. I noticed that in temporary mode, chrome crashed only after some seconds. Today I installed Comodo Dragon (which should be a modified version of google chrome), and it worked perfectly. So I tried to run google chrome in comodo sandbox, and it actually started, but I saw the message "aw, snap" for every page I tried to load. I clicked on "More info" and saw that comodo firewall is known to enter in conflict with chrome. So I temporarly disabled it, but chrome kept crashing. Now chrome doesn't start anymore even in comodo sandbox. What can I do?


Why does the concept of a derivative of a polynomial remain useful when generalized to arbitrary fields?

The derivative of a polynomial is useful in algebra because of its algebraic properties. However, the definition itself originally comes from analysis. It seems like too big a coincidence that an analytic definition continues to be so useful even in contexts where the concepts of limits and (analytic) derivatives no longer make sense. Is there an explanation for this?  An example of how such an explanation could be provided is:   An "algebraic" definition of the derivative of a polynomial over a field $F$, for example as the unique polynomial satisfying some property, rather than just by providing the formula with no explanation. An explanation as to why this also happens to give the rate of change when $F=\mathbb R$. For example, maybe a proof that the rate of change equals the algebraic derivative, but which doesn't involve explicitly calculating the limit, it just shows that the rate of change must satisfy some property which characterizes the algebraic derivative.


When my 2012 mbp went down with a bad ram stick, I installed Windows 8.1 on a bootcamp partition on my wife's 2010 mbp.  I got my laptop working, not longer needed to borrow hers and attempted to remove the bootcamp partition. It is gone but when ever she reboots, she has to remember to hold the option key or she automatically boots to a black screen.  I assume something didn't get properly uninstalled and its attempting to load Windows bios but it doesn't exist. Is there a way to fix this?  There is no time machine or back up pre bootcamp installation to restore to.


Is it possible to tell a Valyrian steel sword from a very well crafted steel sword, by sight alone

I'm sure in Westeros there are some incredibly well crafted steel swords, but could someone instantly spot a Valyrian steel sword over one of these?  Does Valyrian steel have any visual indications that it is Valyrian steel and not just a very well crafted steel sword?  I'm wondering, in canon, has anyone seen a sword and instantly recognised it as Valyrian steel.  For the purpose of this question, no one is allowed pick up or use the sword, so they cant feel it's weight, balance, sharpness, etc...


I am trying to show that $|\Bbb {R} \times \Bbb {R}| \leq |\Bbb {R}|$.  I don't know how to define $f:\Bbb {R} \times\Bbb {R} \rightarrow \Bbb {R}$ in a way that would make $f$ injective.  My professor gave us the hint that $(0,1) \sim \Bbb {R}$ would imply that $|(0,1) \times (0,1)| \leq |(0,1)|$, but I don't understand how that is helpful here.


This was a question on my exam today that I couldn't figure out.  Show $((P \supset Q) \supset P) \supset P$ with no premises using Fitch.  The first attempt is I assumed $(P \supset Q) \supset P$. Then I assume $\neg  P$ and attempted to derive a contradiction.   However, I couldn't get anywhere productive. Any hints or direction?


Combining Southern Magician and Arcane Disciple feats - Casting Attribute

I have trouble understanding the details of the full scope of the Southern Magician feat in conjuction with the Arcane Disciple feat:  Southern Magician [General] (...) Benefit: Once per day per two spellcaster levels, you can cast a divine spell as an arcane spell, or vice versa. This enables you to bypass arcane spell failure due to armor, or gain additional benefit from spell that functions differently for a divine caster instead of an arcane caster, such as true seeing or magic weapon. (...) The actual source of the spell’s power doesn’t change, nor does its means of preparation. You are merely weaving the strands of magic together in an unconventional way that makes the spell behave somewhat differently. [[Emphasis mine]]  and  Arcane Disciple [General] (...)Benefit:  Add the chosen domain's spells to your class list of arcane spells. If you have arcane spellcasting ability from more than one class, you must pick which arcane spellcasting ability this feat applies to. Once chosen, this decision cannot be changed for that feat. You may learn these spells as normal for your class; however, you use Wisdom (rather than the normal ability for your spellcasting) when determining the save DC for the spell. In addition, you must have a Wisdom score equal to 10 + the spell's level in order to prepare or cast a spell gained from this feat. Each day, you may prepare (or cast, if you cast spells without preparation) a maximum of one of these domains spells of each level. (...) [[Emphasis mine]]  My questions would be:  Does the emphasised "cast as arcane" have an impact on casting attribute from the Arcane Disciple feat. Eg: would a divine magic missile be controlled by the divine or arcane casting attribute? And an arcane sanctuary?  Obviously I'm looking at the angle, that if the casting attribute is based on the spell being divine or arcane, would mean that - with Southern Magician & Arcane Disciple combined - you would in the end of the day just gain add additional arcane spells to your spell book thus being freed from your divine casting attribute. Granted, just for a number of times / day.


Some users are mind bogglingly skilled at integration. How did they get there?

Looking through old problems, it is not difficult to see that some users are beyond incredible at computing integrals. It only took a couple seconds to dig up an example like .  Especially in a world where most scientists compute their integrals numerically, I find it astounding that people exist that can solve these problems analytically. Sometimes it is a truly bizarre contour, some examples use auxiliary functions and differentiation under the integral sign in a way that feels more like integration by wizardry.  Some of these users seem to have mastered an incredibly large number of special functions to a level of fluency that is almost unimaginable to me. Manipulations involving the error function almost looks like the work of an infant compared to some of these seemingly casual manipulations involving the Airy function, Barnes G function, the Legendre chi function and many more. Every time I read a post by them, it turns into an exercise in reading about yet another special function I have never heard of.   My question is what sort of material do you have to study, or what kind of area do you have to work in to get so good? To me, it doesn't seem as obvious as saying something like, "oh, they know this material because they are a topologist".


Prove that this sum of products of binomial coefficient can be simplified like this

$a , b, c$ are positive integers such that ${a}\geq{b+c}$.  Prove that $$\sum_{i=0}^{b}{\binom{a}{i+c}\binom{b}{i}}=\binom{a+b}{b+c}$$


can the FT function can be a complex function ? and if yes what does it mean because in all cases i came across till now the FT function only had a real part


Error installing virtualbox-6.1 dpkg error

I am using .deb package downloaded from Oracle website, and I even had it installed properly earlier. But now there's not really any change to the system however it throws below error. Also I can see the icon of it in the menu but it does not open. Using Ubuntu 20.04.1 What could be the problem? $ sudo dpkg -i Software/virtualbox-6.1_6.1.14-140239~Ubuntu~eoan_amd64.deb Selecting previously unselected package virtualbox-6.1.  (Reading database ... 240840 files and directories currently installed.) Preparing to unpack virtualbox-6.1_6.1.14-140239~Ubuntu~eoan_amd64.deb ...  Unpacking virtualbox-6.1 (6.1.14-140239~Ubuntu~eoan) ...   dpkg: dependency problems prevent configuration of virtualbox-6.1:  virtualbox-6.1 depends on libqt5opengl5 (= 5.0.2); however:   Package libqt5opengl5 is not installed.   virtualbox-6.1 depends on libqt5printsupport5 (=5.0.2); however:    Package libqt5printsupport5 is not installed.   virtualbox-6.1 depends on libsdl1.2debian (= 1.2.11); however:   Package libsdl1.2debian is not installed.   virtualbox-6.1 depends on python (<< 2.8); however:   Package python is not installed.  virtualbox-6.1 depends on python (= 2.7); however:    Package python is not installed.   virtualbox-6.1 depends on python:any (= 2.6.6-7~); however: dpkg: error processing package virtualbox-6.1 (--install):  dependency problems - leaving unconfigured  Processing triggers for systemd (245.4-4ubuntu3.2) ... Processing triggers for gnome-menus (3.36.0-1ubuntu1) ... Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...  Processing triggers for mime-support (3.64ubuntu1)...  Processing triggers for hicolor-icon-theme (0.17-2) ...  Processing triggers for shared-mime-info (1.15-1) ...   Errors were encountered while processing:  virtualbox-6.1


Definition: Theorem, Lemma, Proposition, Conjecture and Principle etc.

Definition: Theorem, Lemma, Proposition, Corollary, Postulate, Statement, Fact, Observation, Expression, Fact, Property, Conjecture and Principle   Most of the time a mathematical statement is classified with one the words listed above.  However, I can't seem to find definitions of them all online, so I will request your aid in describe/define them.  Also, when is a mathematical statement a theorem versus a lemma ? I've read that a theorem is important while a lemma is not so important and used to prove a theorem. However a theorem is sometimes used to prove some other theorem. This implies that some theorems are also lemmas ?  Is it subjective with respect to the author, which statements become a theorem, lemma, etc. ?


How to unregister and register an awaitable Event handler?

In my code I need to unregister and register an event handler, This works perfect:  _favoritsImageView.Click -= _favoritsImageView_Click(this, new CustomeClickEventArgs(item)); _favoritsImageView.Click += _favoritsImageView_Click(this, new CustomeClickEventArgs(item)); void _favoritsImageView_Click(object sender, CustomeClickEventArgs e) {        // handles the event }   But for an awaitable event handler i have to use this syntax:  _favoritsImageView.Click -= async (s, e) =>  { await _favoritsImageView_ClickAsync(s, new CustomeClickEventArgs(item)); };  _favoritsImageView.Click += async (s, e) =>  { await _favoritsImageView_ClickAsync(s, new CustomeClickEventArgs(item)); };  async Task _favoritsImageView_ClickAsync(object sender, CustomeClickEventArgs e) {        // does async task }   This does not work. Because anonymous methods do not have the same reference. So the first line does not un-register the already registered handler. And eventually the second line adds an extra event handlers to the click.  Which syntax do I need to use to add and remove an async event handler?  Thanks for any suggestion.


How to choose between an odd number of options with a fair coin

It is possible to choose between three equally desirable outcomes by tossing a fair coin as follows:  Choose option 1 if the first head appears on an even toss  Choose option 2 if the first tail appears on an even toss  Choose option 3 if the first head and the first tail both appear on an odd toss  Note that option 1 and option 2 are mutually exclusive, because we must have a head or a tail on the first toss.  This works because the binary expansion $$\frac 13 =0.010101010101 \dots$$ has a $1$ in all the even places. Or equivalently because $$\frac 13=\frac 14+\frac1{16}+ \dots +\frac 1{4^n}+\dots$$  This is quite a simple procedure (though perhaps not as well known as it might be). I was pondering in the bath what might be the most convenient set of options if there were five or seven possibilities.  For example I can pick off two fifths using the binary expansion of $\frac 15$ with heads and tails, and use my procedure for thirds to do the remaining three fifths - so it is possible. But can one do fifths or sevenths without resort to this kind of recursive procedure?


Why does python allow list[a:b] but not list[a] if a and b are out of index range?

I am but a humble coding grasshopper and have a simple question.  Let:  x = ['this','is','a','list']   How come:  x[100:101]   outputs an empty list like expected, yet:  x[100]   is an error? Ditto for strings, please and thank you.


Hide and show a custom button on a standard detailed page

We have 2 custom buttons on a standard lead detailed page. I would like to show one button and hide another button on page load using javascript by querying the lead and finding a value in one text box field. The logic is if the textbox value is null, we want to show one custom button which has its own javascript code, else we will hide the custom buttton and show another one with its own javascript code. Is this possible and if so how do we do this? Buyan


What's the way to create a listview with images on the left side and text right after it? (Note: the images were previously downloaded from the Net) Thanks in advance!


I will like to know some of the android emulators that work really well with Ubuntu 11.10 and above. I want to try 'whatsapp' on Ubuntu through an android emulator. Thanks in advance


Given that $X,Y$ are independent $N(0,1)$ , show that $\frac{XY}{\sqrt{X^2+Y^2}},\frac{X^2-Y^2}{2\sqrt{X^2+Y^2}}$ are independent $N(0,\frac{1}{4})$

It is given that $X,Y \overset{\text{i.i.d.}}{\sim} N(0,1)$  Show that $\frac{XY}{\sqrt{X^2+Y^2}},\frac{X^2-Y^2}{2\sqrt{X^2+Y^2}} \overset{\text{i.i.d.}}{\sim} N(0,\frac{1}{4})$  I was thinking of making polar transformations $X=r \cos \theta, Y=r \sin \theta$  Then I am getting stuck at ranges of $\theta$


Did humans still produce electricity for the machines when Smith overwrote himself on to them?

In the Matrix 3 Smith apparently overwrote his program onto every human and program in the Matrix.  If the humans continued to supply energy to the machines in this state, why wouldn't the machines have done something like this since the beginning (but keeping it under their control)?   I understand that the machines needed a Matrix to foster biological and neurological activity, but it seems like the same thing can and was achieved with the administratively assigned personality of Agent Smith overwriting the more problematic independent minds of humans in the Matrix.  Wouldn't that have been far less problematic for them, if they could get the electricity without having to deal with all of the potential escapees, the "balancing of the equation", the building and rebuilding of the Matrix, etc, etc?


Derivative of the sine function when the argument is measured in degrees

I'm trying to show that the derivative of $\sin\theta$ is equal to $\pi/180 \cos\theta$ if $\theta$ is measured in degrees. The main idea is that we need to convert $\theta$ to radians to be able to apply the identity $d/dx \sin x = \cos x $. So we need to express $ \sin \theta$  as  $$ \sin_{deg} \theta = \sin(\pi \theta /180), $$ where $\sin_{deg}$ is the $\sin$ function that takes degrees as input. Then applying the chain rule yields  $$ d/d\theta [ \sin(\pi\theta/180)] = \cos(\pi \theta/180) \pi/180 = \frac{\pi}{180}\cos_{deg}\theta. $$ Is this derivation formally correct?


The word series seems to generally refer to a group which I would think makes it a singular reference, however the ies ending is also a common way to modify a singular noun into a plural noun (eg., puppies, fancies, harpies).  So is series plural or singular, and if plural, what is the singular version?


C# How do I produce sound from a wave (using an array)?

First off, I am pretty much a noob (have basically only done text-based Console Apps and basic graphics stuff), so bear with me.  I am trying to make a sound from a sine wave I defined using a short array. I have defined the array as follows:  int frequency = 1000, sampleRate = 48000; short[] sound = new short[sampleRate];  for (int i = 0; i < sound.Length; i++) {    sound[i] = Convert.ToInt16(2 * Math.PI * i * frequency / sampleRate); }   What I now want to do is somehow convert this to a 1 second long sound clip. How would I go about doing this? I have been told I should use a file stream, but I don't know how to, and the information I could find wasn't very beginner friendly. Are there any special libraries I should/have to use (I know about NAudio but, as I said, I am a noob and don't know what to do with it)?  Thanks in advance.


How do I build a single in-tree kernel module?

The linux-source-... has a module which is disabled in the config /boot/config-3.4-trunk-686-pae so that it is not part of linux-image-... (This is on Debian, but the solution should be the same for Ubuntu, or?), e.g.  # CONFIG_CAN_PEAK_USB is not set   How would one compile just that kernel module, so that it can be used with the distributed kernel?  The respective linux-source-... package is already installed, uncompressed and linked to /usr/src/linux. /boot/config-3.4-trunk-686-pae is copied to /usr/src/linux/.config and modified with  CONFIG_CAN_PEAK_USB=m   With  make make modules   it is possible to compile the kernel and all modules. But how would one compile only that specific single module?  (Note: also the kernel needs to be compiled before, otherwise you get the following error: no symbol version for module_layout)


Evaluating the infinite product $ \prod\limits_{n=1}^{\infty} \cos(\frac{y}{2^n}) $

How does one evaluate   $ \displaystyle\prod\limits_{n=1}^{\infty} \cos(\frac{y}{2^n}) $?  Seems fairly straightforward, as I just plugged in some initial values $n = 1, 2, 3,\dotsc$  $n = 1$  $ \sin(y)= 2\sin(\frac{y}{2})\cos(\frac{y}{2})$  $ \cos(\frac{y}{2}) = \sin(y)/2\sin(\frac{y}{2}) $  $n = 2$  $\sin(\frac{y}{2})= 2\sin(\frac{y}{4})\cos(\frac{y}{4}) $  $\cos(\frac{y}{4}) = \sin(\frac{y}{2})/2\sin(\frac{y}{4}) $  Hence,  $ \prod\limits_{n=1}^{\infty} \cos(\frac{y}{2^n}) = \sin(y)/2\sin(\frac{y}{2}) \times \sin(\frac{y}{2})/2\sin(\frac{y}{4}) ... \times \sin(\frac{y}{2^{n-1}})/2\sin(\frac{y}{2^n})  $   Then some denominators/numerators cancel, reducing the expression into  $ \prod\limits_{n=1}^{\infty} \cos(\frac{y}{2^n}) = \sin(y)/2^n\sin(\frac{y}{2^n})$  Is this expression no longer reducible?   Because apparently, somehow, the denominator seems to reduce to $y$  How does that work?


pst-optexp Drawbeam Error - GPL Ghostscript 9.50: Unrecoverable error, exit code 1

I have a problem with my pst-optexp package LaTeX script: I can't draw two or more different beams, each one alone works fine, so the error lies in the \drawbeam command. Here an example: \documentclass[10pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{graphicx}  % general \usepackage{nicefrac}  % for drawing the setup \usepackage{pst-optexp}  \begin{document}      \section{Main Section 1}     \subsection{Test2}      \begin{pspicture}[showgrid](0,0)(15.2,8.2)         %Illumination         \pnode(1.5,1){A}         \pnode(7,1){B}         \pnode(10,2){C}         \pnode(4,2){D}         \pnode(4,5){E}         \pnode(10,5){F}         \pnode(8.5,1){B1}          \optbox[position=start, innerlabel](A)(B) {Laser1}         \optbox[position=end, innerlabel](A)(B) {Fiber in}         \optbox[position=start, innerlabel](C)(D) {Fiber out}         \optbox[position=end, innerlabel](E)(F) {testbox}         \mirror(D)(E)(F)         \mirror(C)(D)(E)         \drawbeam[linecolor=red, ArrowInside=->, ArrowInsidePos=0.4, arrowscale=1.3](C){6}{5}(F)         \drawbeam[linecolor=green, ArrowInside=->, ArrowInsidePos=0.4, arrowscale=1.3](A)(B)     \end{pspicture} \end{document}  If both drawbeams are enabled (like in the example), then the only the first one is drawn, and the second one not. This is the notification:  Process started: xelatex.exe -synctex=1 -interaction=nonstopmode "document".tex GPL Ghostscript 9.50: Unrecoverable error, exit code 1 Process finished normally  I am using TexStudio and XeLaTeX, if any more information is needded, just let me know. Thanks


scikit's RBM pseudo likelihood calculation

According to scikit-learn's documentation given , the pseudo likelihood is calculated by;  Computing the free energy on X, then on a randomly corrupted version of X, and returns the log of the logistic function of the difference.  I'm trying to understand why is pseudo likelihood implemented like this. What was the motivation?


I want to mean center my interaction terms in a regression model (i.e., make the mean zero for each variable). I understand that I am supposed to mean center my variables first and then multiply them together to create my interaction term. But is it a problem that when I multiply two negative scores, I will have a positive score? I haven't been able to find a good answer to this. Thank you!


Wireshark installation complains about unmet dependencies

I am getting the below dependency errors while installing wireshark on my machine  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  wireshark : Depends: wireshark-qt but it is not going to be installed or                       wireshark-gtk but it is not going to be installed E: Unable to correct problems, you have held broken packages.   Why it is not installing these wireshark dependencies and how can I fix it?   Below is my system configuration  Linux shadows 4.8.0-46-generic #49~16.04.1-Ubuntu SMP Fri Mar 31 14:51:03 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux   Edit 1   $ sudo apt-cache policy wireshark wireshark-qt wireshark-gtk wireshark:   Installed: (none)   Candidate: 2.4.3-1~zesty1   Version table:      2.4.3-1~zesty1 500         500 http://ppa.launchpad.net/wireshark-dev/stable/ubuntu zesty/main amd64 Packages      2.2.6+g32dac6a-2ubuntu0.16.04 500         500 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages         500 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages      2.0.2+ga16e22e-1 500         500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages wireshark-qt:   Installed: (none)   Candidate: 2.4.3-1~zesty1   Version table:      2.4.3-1~zesty1 500         500 http://ppa.launchpad.net/wireshark-dev/stable/ubuntu zesty/main amd64 Packages      2.2.6+g32dac6a-2ubuntu0.16.04 500         500 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages         500 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages      2.0.2+ga16e22e-1 500         500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages wireshark-gtk:   Installed: (none)   Candidate: 2.4.3-1~zesty1   Version table:      2.4.3-1~zesty1 500         500 http://ppa.launchpad.net/wireshark-dev/stable/ubuntu zesty/main amd64 Packages      2.2.6+g32dac6a-2ubuntu0.16.04 500         500 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages         500 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages      2.0.2+ga16e22e-1 500         500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages   Edit2  $ cat /etc/os-release NAME="Ubuntu" VERSION="17.04 (Zesty Zapus)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 17.04" VERSION_ID="17.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=zesty UBUNTU_CODENAME=zesty


Bib entry making maths letters lower case

This question is about the reference format making letters inside maths $  $ into lower case. As they are in standard format I want them to be uppercase.  MWE:  \RequirePackage{fix-cm}   \documentclass[natbib,fleqn,smallextended]{svjour3}  \begin{filecontents}{sw_ref.bib} @article{daon,   title={ $\delta^{18}O$ and $\delta^{13}C$: },   author={D},   journal={Ers},   volume={54},   number={3},   pages={545},   year={2005},   publisher={El} } @article{cow,   title={$\delta^{13}C$  measurements},   author={Coichael},   journal={A},   volume={48},   number={7},   pages={5781},   year={2256},   publisher={ACtions} } \end{filecontents}  %  % \smartqed  % flush right qed marks, e.g. at end of proof % \usepackage[version=3]{mhchem} % for upright CO2 \usepackage{graphicx} \usepackage{floatrow} % %setting spacing \usepackage{setspace} \doublespacing %\singlespacing %\onehalfspacing %For other sizes use the \setstretch command like this: %\setstretch{1.8}  \raggedbottom  %line Numbers \usepackage{lineno} \linenumbers*[1] %to set numbering format \usepackage{enumerate} %Maths \usepackage{amsmath} %for deg \usepackage{gensymb} %for permil \usepackage{wasysym} % for rotating floats \usepackage{lscape} %for subfigures and tables \usepackage[font=small,labelfont=bf]{caption} \usepackage[font=footnotesize]{subfig} %made commands \newcommand{\mytilde}{\raise.17ex\hbox{$\scriptstyle\mathtt{\sim}$}} %around tilde %% Insert the name of "your journal" with  % \begin{document}  \title{Det} %\subtitle{}  \titlerunning{Sou}        % if too long for running head  \author{Tor}  \authorrunning{et al} % if too long for running head  \institute{Tror \at  d \\ }  % \date{Received: date / Accepted: date} % The correct dates will be entered by the editor  \maketitle  \begin{abstract}  \keywords{}  \end{abstract}  $\delta^{18}O$ and $\delta^{13}C$ \citep{cow} \citep{daon}  \bibliographystyle{spbasic} \bibliography{sw_ref}  \end{document}    The output (the stuff at the two ends of the red arrows should look the same):


When submitting a question / answer edit (below reputation requirement for instant), you get a response box like this:    However, when you edit a tag, you get:    Notice the lack of the hyperlink, bringing you to the review.  Both tag edits and post edits hit the Suggested Edits queue, so then why is tag-edit reviewing not able to be seen? Is this a bug, or intentional?  From what I understand, the issue isn't a one off, but, it'll try and reproduce it again.  This isn't a one-off thing: first I edited  on Code Review, then,  just now and was presented with the same response.  The site this was tested on was .


tough integral involving $\sin(x^2)$ and $\sinh^2 (x)$

I ran across this integral I get no where with. Can someone suggest a method of attack?.  $$\int_0^{\infty}\frac{\sin(\pi x^2)}{\sinh^2 (\pi x)}\mathrm dx=\frac{2-\sqrt{2}}{4}$$  I tried series, imaginary parts, and so forth, but have made no progress.    Thanks very much.


When an electron revolves around the nucleus in P or d-orbitals why does not it collide with the nucleus. I mean to say that the shape of the orbital narrows near the nucleus , so shouldn't it collide with the nucleus?


i am trying to follow  tutorial to draw basic lime. but there is small gap in center of the lime which you can see . it is very frustrating, what is the worng with me although i follow tutorial carefully?  thanks,


I'm doing a project in predicting default risk for SBA loans using R. My data has 187,986 positives and only 17796 negatives (9.46%). Clearly this is an imbalanced dataset. That's why when I run accuracy rate checking for my model using probability cutoff value=0.5, the accuracy result is way too low as below,  > mytestset$LoanStatus_PIF<-ifelse(mytestset$LoanStatus_PIF=="PIF",1,0) > pred<-predict(final,newdata=mytestset,type="response") > y_pred_num<-ifelse(pred>0.5,1,0) > mean(y_pred_num==mytestset$LoanStatus_PIF)  Result: [1] 0.009682553   When I change the cutoff value to 0.998 and up, the result is way much impressive     y_pred_num<-ifelse(pred>0.9998,1,0)   mean(y_pred_num==mytestset$LoanStatus_PIF)   Result:      [1] 0.9997752  Question: 1. Will my model be rejected because I manually choose the cut-off value? 2. Does 0.999 make sense for a cutoff value? As common cut-off value is usually 0.5.  Thanks !


If you recreated intermediate species between every species on the evolutionary tree, would every species be able to reproduce with each other through a series of intermediates? Would this blur the concept of "species"?


Why are there no organisms with metal body parts, like weapons, bones, and armour? (Or are there?)

Reading this question, , I wondered why no organisms seem to make use of the tensile and other strengths of metal, as we do in metal tools and constructions. I am obviously not talking about the microscopic uses of metal, as in human blood etc.  Why are there no plants with metal thorns? No trees with "reinforced" wood? No metal-plated sloths? No beetles with metal-tipped drills? Or are there?  I can think of some potential factors why there are none (or few), but I do not know whether they are true:   Is metal too scarce near the surface? Are there certain chemical properties that make metal hard to extract and accumulate in larger quantities? Is metal too heavy to carry around, even in a thin layer or mesh or tip? Can metal of high (tensile etc.) strength only be forged under temperatures too high to sustain inside (or touching) organic tissue, and is crystallised metal too weak? Are functionally comparable organic materials like horn, bone, wood, etc. in fact better at their tasks than metal, and do we humans only use metal because we are not good enough at using e.g. horn to make armour or chitin to make drills?   As a predator, I would like to eat a lot of vertebrates and save up the metal from their blood to reinforce my fangs...    A bonus question: are there any organisms that use the high electric conductivity of metal? Animals depend upon electric signals for their nervous system, but I do not think nerves contain much metal. The same applies to the few animals that use electricity as a weapon.


I read this about 30/40 years ago. I don't remember if it was a short story or book.  What I remember of it :   Some aliens arrive at earth; they don't find any living humans, just empty cities. They go to one museum and revive an Egyptian mummy. When it's alive, it keeps asking where his servants are. They don't get any information from the mummy so they kill him again. Later on they revive another human, who turns out to be more intelligent than the aliens.   I don't remember much of what happened from this point on, except:   In the end the human starts to revive other humans.   Some one can tell me what story, name of book.


This is the contents of my crontab file:  0 0,6,12,18 * * * cd /var/www/app/current && backup perform --trigger db_backup --config_file config/backup.rb --data-path db --log-path log --tmp-path tmp >> /var/www/app/current/log/cron.log 2>&1  0 3 * * * cd /var/www/app/current && RAILS_ENV=production bundle exec rake runs:populate --silent >> /var/www/app/current/log/cron.log 2>&1  59 23 * * * cd /var/www/app/current && RAILS_ENV=production bundle exec rake runs:log --silent >> /var/www/app/current/log/cron.log 2>&1   If I run any of these manually as the owner of the crontab they work fine, but the cron.log file simply contains:  /bin/sh: bundle: not found /bin/sh: backup: not found /bin/sh: bundle: not found   I tried wrapping each one in the following (as default by the  which I'm using to manage my cron file) bash -l -c '...' but then I get the same as above except for bash bash: bundle: command not found


Why isn't Google Chrome available in the Software Centre?

Google Chrome is available for Ubuntu on the Google website but why is it not present in Ubuntu Software Centre?


Are there shortcuts for page down and page up in firefox

I dont have a page down or page up buttons on my keyboard, and i noticed ctr+down=end ctr+up=home (at least in firefox)  Are there shortcuts for page down and page up?  (keyboard does not have a fn key like a macbook)   Solution(firefox only): space=pageDown & shit+space=pageUp


Package inputenc Error: Unicode character (U+0301)

I found a problem:  How can I solve this error?


How to make a UITableViewCell longer in height?

My app has a UITableViewController. I want to show an image in the first section and add some other cells in another section. Like this:  ------- |     |   <--- image |     | -------  blah blah blah   <--- some other cells -------------- blah blah blah -------------- blah blah blah   And I thought it is as easy as this:  override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {     if indexPath.section == irrelevant {         let cell = UITableViewCell()         let image = UIImageView(image: someImage, highlightedImage: nil)         cell.contentView.addSubview(image)         return cell     }     // Code for the other cells, irrelevant }   But it came out like this:    As you can see, the image is out of the cell! What I want to do is to stretch the cell so that the image is actually "inside" the cell. I tried this:  cell.sizeToFit()   and this:  cell.frame = CGRectMake(cell.frame.origin.x, cell.frame.origin.y, cell.frame.width, image.frame.height + 15)   but both didn't work (The result stays the same)!  Is there a way to stretch it? If there isn't, how can I display an image in a UITableViewController?  Note: Don't tell me to set the imageView property of the cell. It's too small!


Using Loop with Raster Calculator in ArcPy?

I am trying to loop through multiple rasters and extract cells that are above 0.1 The code I am trying to use is:  import arcpy  arcpy.CheckOutExtension('Spatial') arcpy.env.workspace=r'F:\Sheyenne\Atmospherically Corrected Landsat\Indices\Main\NDWI\main_master' #pathway to all rasters in workspace directory rasters = arcpy.ListRasters('*.tif*') for raster in rasters:      #give new file a name      outraster = raster.replace('.tif','_water.tif')      arcpy.gp.RasterCalculator_sa("""raster >= 0.1""",outraster) print('Done Processing')   For some reason I can't copy and paste the error (python actually shuts down when I run this code) but here is a screen shot of part of it.    EDIT: My parameters have changed and I now need everything >=-0.4 and but !=0.00.  I am trying to use:  import arcpy  from arcpy.sa import * arcpy.CheckOutExtension('Spatial') arcpy.env.workspace=r'D:\Sheyenne\Atmospherically Corrected Landsat\Indices\Main\NDWI\main_master' #pathway to all rasters in workspace directory rasters = arcpy.ListRasters('*.tif*') for raster in rasters:     #Save temp raster to disk with new name     ras = Raster(raster)     outraster = Con(ras >= -0.4 & ras !=0.00, ras)     outraster.save(raster.replace('.tif','_water.tif')) print('Done Processing')   but this returns:  ValueError: The truth value of a raster is ambiguous. Invalid use of raster with Boolean operator or function. Check the use of parentheses where applicable.   EDIT:  I think I just needed to change this line:   outraster = Con((ras >= -0.4) & (ras !=0.00), ras)


I want record screen on my andriod phone. Without root permission. How can i do that. ( Galaxy s3 mini. Jelly bean. )


Should we always capitalize Christians, Muslims, etc.?

A christian and a jew went into a bar....  or  A Christian and a Jew went into a bar...  The former is marked incorrect by microsoft word.


Which is grammatically correct: "if someone was starving" or "if someone were starving"?

Which sentence is more grammatically correct:   If someone was starving on an island If someone were starving on an island


I have created a user account. Then signed out of admin and logged in with the new user account. But the new account does not have a logout link, So how can i show it to the other users ?


Why unit circle is not diffeomorphic to the real line

I read from a text book that unit circle ($\mathbb{S}$) is not diffeomorphic to the real line. This result is intuitive since we cannot construct a smooth function from $\mathbb{S}$ to $\mathbb{R}$ such that it is onto (e.g., $f(\rho)=(\cos(\rho),\sin(\rho))$ defined from $\mathbb{R}$ to $\mathbb{S}$ is not onto). How can I prove this result?   Incidentally, I am not familiar with advanced topics in topology. Thank you, in advance, for your response!


Carve river beds into existing 3d procedural generated terrain

Ok, I've read many threads around about procedural terrain generation with rivers and roads but they suggest approaches from zero to result.  I'd like to know if exists an algorithm to apply to an existing vertex structure which models it by adding rivers beds like cuts through the slope of a mountain for instance.  This approach should:   not work on heightmaps, since my terrain is not generated with heightmaps modify the surface with randomness according to the heights (river sources should be higher and the flow should descend) be as realistic as possible (like not too many circular paths)   I have no needs for speedy algorithms. would be enought to have a separated algorithm to modify the surface so that I am not forced to do all the work during the creation of the terrain.  I tagged this question with c# because this project is written in c# using xna4.0 and in the case that someone knows any algorithms in different languages, c# is preferred (ye, this is optimism)  By the way, I'm looking forward to see if someone knows anything that could fit these needs


How do I reset the scrollback in the terminal via a shell command?

When using Terminal.app, you can clear the screen by using the shell builtin clear or by pressing ^+L (Control-L).   However, all this does is push the current screen content back one screen height and reset the cursor/input at the first line. Meaning you can still scroll back and see it.  What you are also able to do, is reset your entire scrollback by pressing ⌘+K (Command-K).   After you've done this, you cannot scroll back at all.  In certain situations (notably, before running screen or vim), I'd like to reset the scroll back before the command actually executes.  Is there a command (like clear) that is implemented in OS X that allows me to do this? Given the existence of pbcopy and pbpaste, I'm thinking something similar might exist that will allow me to do this.


In TikZ, can I place the (0, 0) point myself?

It seems like the location of the origin depends on the dimensions of the pictures I am drawing. Is it possible to fix the location of the origin yourself, or otherwise to manipulate the location of the whole tikz box in some way?  Minimal Example  For example:  \documentclass{book} \usepackage{tikz} \usepackage{amsmath}  \begin{document} \begin{tikzpicture} \draw (0, 0) -- (-2, 0); \end{tikzpicture}  \end{document}   The origin in this picture seems not too far from the left of the page. However, changing the line above to   \draw (0, 0) -- (-10, 0);   shifts the origin to the right.


I'm using float to display decimal numbers, but sometimes it doesn't display correct result.  For example, for 6.2/1000 the result is 0.0061999997.  I know why is this happening, but I wonder is there a way to display correct result, in this case, 0.0062?  EDIT:  does not answer to my question, so why did you marked my question as already been answered in other place?  Numbers I wrote are only example. In the app user can enter any number and divide / multiply number with any other number, so the result maybe won't have any decimal points, maybe it will have 4 decimals, maybe it will have 7 decimals,...


How to prove: $\exists x P(x) \implies Q(y) \Longleftrightarrow \forall x [P(x) \implies P(y)]$

I am trying to prove the expression: $\exists x P(x) \implies Q(y) \Longleftrightarrow \forall x [P(x) \implies P(y)]$ I was hoping I could get some intimation on what to do next. For your time I am beforehand very appreciative. I'll start proving first  $[\exists x P(x) \implies Q(y)] \implies \forall x [P(x) \implies P(y)]$ $$\exists x P(x) \rightarrow Q(y)$$ [Existential Instantiation] $$P(a) \to Q(y)$$ [Idempotency] $$P(a) \wedge P(a) \to Q(y)$$ [Extraction] $$P(a) \to (P(a) \to Q(y))$$ [Material Implication] $$P(a) \to ( \neg P(a) ∨ Q(y)) $$ [DeMorgan] $$P(a) \to \neg (P(a) \wedge \neg Q(y)) $$ [Simplification] $$P(a) \to \neg (P(a))$$ This is as far as I've gotten. I seem to be really stuck. If anyone could provide me with suggestion on how to proceed from here I will greatly appreciate it. Thank you kindly.


Prove that $\gcd(a^2, b^2) = \gcd(a, b)^2$

The problem's quite clear. Prove that $$\gcd(a^2, b^2) = \gcd(a, b)^2$$  This is easy to understand intuitively and using the Fundamental Theorem of Arithmetic would be easy but I want to prove it by using the Divisibility axioms and the GCD. I have attempted it and am mentioning my results.  Here $d = \gcd(a, b)$.   $$d | ax + by \implies d^2 | a^2x^2 + 2axby + b^2y^2 \implies d^2 | a^2x^2 + b^2y^2 \implies \gcd(a^2, b^2) | d^2$$  I feel that this is not necessary. Please help.  Also, the proof can be generalized to $$\gcd(a^n, b^n) = \gcd(a, b)^n$$  Any help would be appreciated.


Emails are going to spam while checks are good

I used G Suite for sending emails and the problem was that my mails were in in spam because they were sent from the Google servers, some of these IP's are on the popular blacklist now. Google knows about this problem and they said: "We're trying to arrange with blacklist support, so you should wait and maybe in future all will be OK". Of course this variant I don't like.  I have a correct DKIM / DMARC / SPF records in my domains. Spam score (I used  for testing) was always near 8/10. Because the sender IP was in ~4 blacklists.  So I decided to use the Zoho Mail hosting. I set up one of my domains and go to Zoho. But the problem is the same: my emails are going to spam (on Gmail and others mailboxes). All checks are good, spam score on Mail Tester is 10/10, sometimes sender IP was just on 1 blacklist (Mail Tester said that IP isn't on any blacklist).  Also, I opened the original message and ALL checks are 'pass'.  What can be the problem? Any suggestions?


Hi I have an Iomega HD for mac. I was writing a ubuntu server image to another drive but accidentally selected my 500GB Iomega with my files on it. The command I ran was:  sudo dd if=/Users/myuser/Desktop/ubuntu/ubuntuserver.img of=/dev/rdisk1 bs=1m   this shouldve been another disk.  I have downloaded testdisk but have no idea how to recover using it.  what are my best options for retrieving the data?


showing objects with Start-End dates falling in date range

I want to display events within a given month, the event has a start and end date, I cannot find a way to accommodate for events that span more than 2 month. I tried the following, discarding the syntax (it's episerver find client API)  currentEvents = SearchClient.Instance.Search<EventPage>()                .Filter(page => page.FromDate.Exists() & page.ToDate.Exists())                .Filter(page => page.FromDate.InRange(start, end, true, true) | page.ToDate.InRange(start, end, true, true))   let's assume some event has starting date of '20/11/2014' and an ending date of '10/2/2015', by logic it falls in month 1, but using the above logic it will not show. any idea?


libpng warning: Application jmp_buf size changed Segmentation fault when try to run xampp installation file

I trying to install XAMPP on my ubuntu 18.04 but I got this warning from libpng by running this command:   sudo ./xampp-linux-x64-7.3.9-0-installer.run   The thing need to be considered is that I got this warning on all versions of XAMPP. Someone already asks the same question there  but the answer is useless. Its a humble request please help.I am not able to install XAMPP since last two days.


if (typeof === "undefined") {} Not Working Properly

The code below is for context, but this concern is only regarding the HELP portion of the ïf conditional. The expected output is that the code within the if conditional will only run if the object "newButton" does not exist. I've tried typeof newButton === 'undefined', but it did not work. I've made sure that the type of newButton is in fact the string "undefined" before the if conditional, and I've included console.log() statements that show the type of the object newButton at two intervals. var alphabet = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]; var aI = 0;  //The "rank" input is given as a capital letter as a string (EX: "A"). function addNode(rank) {   var newNode = document.createElement("h1");   newNode.innerHTML = 0;   newNode.id = rank + alphabet[aI];   document.getElementById("nodeField").appendChild(newNode);    aI++;    console.log(typeof newButton); //Logs "undefined"    if (/*HELP*/ ) {     var newButton = document.createElement("button");     newButton.setAttribute("onclick", "addNode('" + alphabet[alphabet.indexOf(rank) + 1] + "')");     newButton.innerHTML = "Add Node to " + alphabet[alphabet.indexOf(rank) + 1] + " Rank";     document.getElementById("buttonField").appendChild(newButton);      console.log(typeof newButton); //Logs "object"   } }  Does anyone know how to fix this?


How can we give some boost to some really good answers that arrive late?

It happens sometimes to receive or see a very good answer that arrives very late and that would deserve more upvotes. What can be done to give a boost to them? I would happily spend some of my reputation points to be able to give them such boost. This is not merely a question of reputation, but the idea is to let the answer "bubble up" faster so that it can be seen easily by other people to look into question. I hope I explained my question so that is understandable. Most of you got the point and there are some interesting proposals like the one that proposes to put randomly an answer at top. But I do have not enough experience to say if there is one that could solve the issue or not. I would be curious to know what Jeff thinks about it, if it feels there is something that can be improved or not.


i want to know about what is the different between Ajax and Json.  can u please tell me about them?


Linux run script automatically after boot

I want to start a script, which set the system time automatically after booting. I wrote the command date -s "12/31/12 23:59" in rc.d/rc.local. That didn't work. How to solve that?


How to create a 2D overlay over a 3D game? (LWJGL/OpenGL)

GameDev!  I would like to create a 2D overlay over a 3D world, using LWJGL (Java version of OpenGL), to show information to the player, for example, a chat box, health bar, selected cannonball type, etc.  Currently the code I have is this (Taken from several sources on the internet):  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);         glEnable(GL_BLEND);         GL11.glMatrixMode(GL11.GL_PROJECTION);         GL11.glLoadIdentity();         glOrtho(0.0f, Display.getWidth(), Display.getHeight(), 0.0f, 0.0f, 1.0f);         GL11.glMatrixMode(GL11.GL_MODELVIEW);         GL11.glLoadIdentity();         glDisable(GL_DEPTH_TEST);         glDisable(GL_CULL_FACE);         glDisable(GL_TEXTURE_2D);         glDisable(GL_LIGHTING);         glDisable(GL_DEPTH_TEST);         glDisable(GL_CULL_FACE);         glDisable(GL_BLEND);         glDisable(GL_TEXTURE_2D);         glDisable(GL_LIGHTING);             glBegin(GL_QUADS);             glColor3f(1, 1, 1);             glVertex2f(0, 0);             glVertex2f(1, 1);             glVertex2f(1, 0);             glVertex2f(0, 1);             glEnd();         GL11.glMatrixMode(GL11.GL_MODELVIEW);         GL11.glLoadIdentity();             glPopMatrix();         glEnable(GL_DEPTH_TEST);         glEnable(GL_CULL_FACE);         glEnable(GL_BLEND);         glEnable(GL_TEXTURE_2D);         glEnable(GL_LIGHTING);              glEnable(GL_DEPTH_TEST);                 glEnable(GL_CULL_FACE);                 glEnable(GL_TEXTURE_2D);                 glEnable(GL_LIGHTING);              glDisable(GL_BLEND);                 GL11.glMatrixMode(GL11.GL_PROJECTION);                 GL11.glLoadIdentity(); // Reset The Projection Matrix                 GLU.gluPerspective(45.0f, ((float) Display.getWidth() / (float) Display.getHeight()), 0.1f, 5000.0f); // Calculate The Aspect Ratio Of The Window                  GL11.glMatrixMode(GL11.GL_MODELVIEW);                 glLoadIdentity();   However this does not show a 2D scene at all!  I would appreciate it if anybody could help me.  Thanks!


Behaviour of named and anonymous function

Check the following cases:-  function x() {     console.log('x'); }; x(); //outputs x  var y = function () {     console.log('y'); }; y(); //outputs y  var z = function w() {     console.log('zw') }; z(); //outputs zw; w(); //outputs .. w is not defined.   Can anyone explain me this behaviour..?


Is returning a list a good programming practice?

So i have a function that has to return 3 values, i haven't found a better way to do this other than returning a list. Is this code a good programming practice? And if not how to fix it.  Example function:  def func():     #code     return [a,b,c]   Main code:     #code    list = func()    k = list[0]    l = list[1]    m = list[2]


Increase the gap before and after the dots in inline list

How to increase the gap before and after the dot?    Here's a MWE:  \documentclass[a4paper]{article}  \usepackage[inline]{enumitem}  \begin{document}  \begin{itemize*}   \item[] First point   \item Second point   \item Third point \end{itemize*}  \end{document}


A problem asks that based on sample of size n from a Normal($\theta$,$1$) distribution, we find the Uniformly Minimum Variance Unbiased Estimator (UMVUE) for:  $$p=\Phi(x-\theta)$$  Where $\Phi$ is the CDF of the normal distribution.  My problem is understanding how can I find an estimator for something that is not a parameter of the distribution?  I have tried guessing an estimator and improving it, but again, get stuck with estmating a function instead of a parameter.


Will 64 bit ubuntu work on x86-64 bit architechture?

Will 64 bit ubuntu work on my p4 pc with x86-64 bit architechture? I'm currently using it as live usb


Unable to enable BitLocker due to mis-configured (?) Windows Recovery Environment

tl;dr: I failed to enable BitLocker on my tablet's system drive for the first time and now I see an error each time I restart Windows or try to enable BitLocker again. Windows claims that this is due to not configured Windows Recovery Environment and I don't know, what to do next.  I have a Windows 10 Pro-based tablet with TPM available and wated to enable BitLocker encryption on drive C: (system drive and the only one in fact, of that matters).  I enabled it for the first time and I went through few steps of its wizard. First, Windows checked, if my hardware allows to use BitLocker. This step passed without problems. Next, I saw a screen in which Windows claimed, that it is moving Windows Recovery Environment to some other (hidden) partition. Reasons for such move remains unknown to me.  In third screen or step I saw I question, where to I want to store encryption key and three options:   save it to Microsoft account, store it on USB, print it.   This is a tablet with only microUSB port. I didn't have microUSB-based pendrive or microUSB OTG cable when enabling BitLocker for the first time. And I have my Windows 10 with only single local account. Thus, non of above options was available for me and Next button was disabled.  I've clicked X, seen some error message and shut down my tablet.  When I started it again next day I saw following error during Windows start-up:    Now, I can see it with every Windows 10 restart. This is really weird for me, because -- as I wrote above -- BitLocker configuration was not finished and thus neither BitLocker is enabled nor encryption key is put to TPM.  Each time I try to re-enable BitLocker for C: drive I see following error:    I don't understand, how it is possible that Windows managed to move Windows Recovery Environment from C: drive to a hidden partition, but isn't able to move it back?  Anyway, can anyone shed some light and explain me, what should I do now or how to proceed from this point? How to move back Windows Recovery Environment manually? How to get rid of that startup error message? And the most important -- how to enable BitLocker and encrypt my system drive on my tablet?


Why isn't there a fixed procedure to find the integral of a function?

Since the integration of a function is the opposite of a the derivative of a function, and there are clear steps to follow when we want to find the derivative of a function, I thought there would be clear steps to follow too when we want to find the integral of a function.  What is it about finding the integration of a function that makes it impossible to come up with a guaranteed method to find it?  Edit: I am only considering elementary functions.


The Aleph numbers and infinity in calculus.

I have a fairly fundamental question. What is the difference between infinity as shown by the aleph numbers and the infinity we see in algebra and calculus?  Are they interchangeable/transposable in any way? For example, could you describe the infinity of a limit with an aleph number? Does it have cardinality?  Thank you.


What's the exact gravitational force between spherically symmetric masses?

Consider spherical symmetric$^1$ masses of radii $R_1$ and $R_2$, with spherical symmetric density distributions $\rho_1(r_1)$ and $\rho_2(r_2)$, and with a distance between the centers of the spheres $d$. What is the exact force between them? I know point masses are a good approximation, but I'm looking for an exact formula. This would be useful for a gravity-simulation toy software.  --  $^1$ Assume for simplicity the idealization where  or centrifugal forces do not deform the spherical symmetric, i.e., the various mass parts are held in place by infinitely strong and rigid bonds.


I currently use Valet to develop sites, and many of those sites need SQL databases.  To host SQL databases, I run a mariaDB server from the Terminal.  In order to start the MySQL server so that I can connect to the databases, I run the command:  sudo mysql.server start I want the server to start on login, so normally I would just have this command execute on login, but it requires the sudo command.  What do I change and how do I change it so that I do not need the sudo part of the command and I can just start the server on login?


If $|G|< \infty$ and $N\lhd G$ such that $G/N$ is nilpotent, then there exists a nilpotent subgroup $H\leq G$ such that $G=HN$.

Let $G$ be a finite group and $N$ be a normal subgroup $N\lhd G$ such that the factor group $G/N$ is nilpotent. Then there exists a nilpotent subgroup $H$ of $G$ such that $G=HN$.  proof:  I consider an arbitrary nilpotent subgroup $H \leq G$. Then, there exists a number $t$ such that $H^{(t)}=\{e\}$. Since $G/N$ is nilpotent, there exists a number $k$ such that $(G/N)^{(k)}=\{e\}$ implying that $G^k/N = \{e\}$. Also, since $N\lhd G$ and $H\leq G$, $HN$ is a subgroup of $G$. Then, we can write that $|HN|\leq |G|$. If I can show the inequality $|G|<|HN|$, then the proof will be done.   How can I show this equality $|G|<|HN|$?


How do you get people to answer the question, rather than argue the premise?

I've noticed a sizable number of questions here where the petitioner asks something like   "I'm trying to flange my dichromatic howitzer, but I can't defibrillate the metacarpus.  Any suggestions?"   ... and the first answer (and the one that attracts a lot of upvotes) is one that says    "That's a really bad idea.  It's not designed for that.  Buy a new one."   Sometimes this is sensible advice, and I've read a number of great answers that went on to explain why it was such a bad idea and offering alternatives.  But at least as frequently, the person posting the answer will decide the petitioner doesn't know what they're asking, and that there's no possible use case that justifies the original question, so they say it's a terrible idea.  Often this will kill an otherwise reasonable question, because it's the first answer in and attracts a number of drive-by voters.  It bothers me when the people posting the answers assume those who ask the question haven't considered the alternatives; if there's a better alternative that answers the question, that would be one thing, but that's different than just saying "Don't do that."  How can you keep discussion focused on the question, rather than the assumptions behind it?


I'm looking for time tracking app for linux that works automatically. Which means that you don't have to enter each new activity when you start it (as in hamster). Best would be if it logs the app title and for how long it has been used. If it can track on which workspace you are too, even better. (unfortuantely that function of hamster doesnt work with compiz, otherwise it would have been great)  It shouldn't send the data to a server so RecueTime and TimeDoctor are no good either.  arrbtr seems to be all that, but it's too early version and shows stats just in the terminal now.  So is there anything else that i'm missing?


Why there's not homogeneous volume scatter in 2.72?

There was an option to render volume in blender 2.71. I was used to doing that like in this tutorial:   But now, in Blender 2.72, it is not possible to use homogeneous volume, because, the check button is just not there anymore!    I also tried to open project made in 2.72 in 2.71, and the option was there, but not in 2.72. Im really confused of that. Why is it removed?


Displaying multiple items at same address using Carto?

I'm creating a map with specific information (name, DOB, etc) to be displayed for a street address, which is mapped to an exact lat and long. Problem I'm realizing is that for items such as apartment buildings, this isn't going to work within CartoDB using the Simple Visualization Wizard.   Any suggestions in CartoDB to display multiple fields of the same type in a click/hover window?


Attempt to invoke virtual method on a null object reference

I try to call Fragment method from Activity. Need to set text t1..t6 (which are in fragment.xml) from activity. So there is an error     FATAL EXCEPTION: java.lang.NullPointerException: Attempt to invoke   virtual method 'void PageFragment.setTime(java.lang.String)' on a null   object reference.   PageFragment.java  public class PageFragment extends Fragment {          static final String ARGUMENT_PAGE_NUMBER = "arg_page_number";         TextView t1,t2,t3,t4,t5,t6;         int pageNumber;          static PageFragment newInstance(int page) {             PageFragment pageFragment = new PageFragment();             Bundle arguments = new Bundle();             arguments.putInt(ARGUMENT_PAGE_NUMBER, page);              pageFragment.setArguments(arguments);             return pageFragment;         }          @Override         public void onAttach(Activity activity) {             super.onAttach(activity);            }          @Override         public void onCreate(Bundle savedInstanceState) {             super.onCreate(savedInstanceState);             pageNumber = getArguments().getInt(ARGUMENT_PAGE_NUMBER);         }          @Override         public View onCreateView(LayoutInflater inflater, ViewGroup container,                                  Bundle savedInstanceState) {             View view = inflater.inflate(R.layout.fragment, null);             t1=(TextView)view.findViewById(R.id.t1);             t2=(TextView)view.findViewById(R.id.t2);             t3=(TextView)view.findViewById(R.id.t3);             t4=(TextView)view.findViewById(R.id.t4);             t5=(TextView)view.findViewById(R.id.t5);             t6=(TextView)view.findViewById(R.id.t6);             return view;         }          public void setTime(String a){             t1.setText(a);         }     }   Schedule.java  FragmentManager fm = getSupportFragmentManager(); PageFragment fragment =(PageFragment)fm.findFragmentById(R.id.RelativeLayout1); fragment.setTime((input1.getText().toString()));


How to overwrite the default shortcuts of the terminal in xfce?

I have xfce installed and use xfce terminal. I can't figure out how to overwrite the default shortcuts so that I can use Ctrl+C(V) for copy/paste in the terminal. So far in other desktop environments I've used it was pretty easy and intuitive. In xfce I simply can't find a way to do that.


Assuming that $\gcd(a,b) = 1$, prove that $\gcd(a+b,a^2+b^2) = 1$ or $2$.   I tried this problem and ended up with $$d\mid 2a^2,\quad d\mid 2b^2$$ where $d = \gcd(a+b,a^2+b^2)$, but then I am stuck; by these two conclusions how can I conclude $d=1$ or $2$?  And also is there any other way of proving this result?


Consider an imaginary cube of liquid as shown in the figure.    Why should all the forces on the cube be same? The cube can be stationary even if the forces on parallel, opposite vertical sides are equal and opposite in direction. The cube can be arbitrarily small or large.  Edit $-$  Based on the answer by Steeven, I just want to consider a similar hypothetical experiment of that sort. Imagine a container with rigid, smooth balls. If I apply pressure $P$ on all the sides of this container, will I get this much amount of increased pressure on the upper and lower sides? I think that more the spheres are small and more in number, the more pronounced the above-mentioned effect will be seen.(This is my guess)


Add ability to flag answers as no longer relevant

Someone may have answered a question and the external resources they referenced are no longer available. In this case I do not believe they deserve a down vote but I also don't like coming to a page looking for an answer to just find out it is no longer relevant.   The other use case I could think of is when you have significant technological changes and the suggestions are out of date. Someone coming to look for an answer might not know that the answer is out of date and trust the suggestions. It would be nice to have a flag saying that it was out of date.  This could also maybe feed into search optimizations so that out of date or now broken answers do not get top hits.


A formula to calculate the mode for grouped data's is given in my text book: Mode = $l + \dfrac{(f_1 - f_0)h}{2f_1 - f_0 - f_2} $ Where, $l = $ lower limit of the modal class, $h = $ size of the class interval, $f_1 = $  frequency of the modal class, $f_0 = $ frequency of the class preceding the modal class, $f_2 =$ frequency of the class succeeding the modal class. Can you please explain the derivation of this formula, as it is not given in my T.B. Thanks .


Does Linux kernel create a file for an Internet domain socket?

The Linux kernel creates a file for a Unix domain socket bound to a pathname.  Does the Linux kernel create a file for an Internet domain socket?


How different lenses affect photo quality?

Suppose I have these two lenses: - Tamron SP 24-70mm f/2.8 Di VC USD G2 Lens - Tamron 28-300mm F/3.5-6.3 Di VC PZD  And suppose I have used them both on the same full frame camera, in the same tripod setup to take the exact same photo using these exact settings on both lenses  - focal 50mm - Aperture F5  - shutter 1/400 - ISO 100  should I get the exact same photo quality in both images because all settings are the same? or there will be a difference in photo quality because of the difference in lenses?


Don't really know how to formulate the question...  Suppose I do the following:      >>> l = [[]]*2     >>> l     [[], []]     >>> l[0].append(1)     >>> l     [[1], [1]]   Why does 1 gets appended to both lists?


Proper way to assign CRS in rgdal 1.5-23

Perhaps my question has been already answered but if it did, I haven´t be able to find it. I´ve updated the rgal package to version 1.5-23 (GDAL 3.2.1 & PROJ 7.2.1) and when I run the following line crs(res_data_PA) <- LAEA  I get the following warning message: Warning message: In showSRID(uprojargs, format = "PROJ", multiline = "NO", prefer_proj = prefer_proj) :   Discarded datum Unknown based on GRS80 ellipsoid in Proj4 definition  I´m aware that I  and since it´s not an error nothing should change in my data. I don´t like to suppress any type of message from R so, I would like to know how is it now the proper way to assign the CRS to my raster.