How to design table with primary key, index, unique in SQL

Hello I need a suggestion.  I have two examples.     In both cases I have one table for cars and one for orders. A car is defined over brand and model.  An order has an order number and a car. I know, the order table is not well defined. But my problem is the car table. Which Example for the car table is better? The first one looks better. But whenever I use the table cars for join with e.g. orders, I have to use both columns. In the second example I have only one column (ID_Car), which I have to care about.  Which Case would you prefer? Could one way cause later problems?  If I use the example 2. Are the Primary Key’s and the unique statement right. Or is it better to define the Columns ID_Car as primary key and Unique(Brand, Model)?  Thank you guys


I am trying to make a simple table of clients which will be in russian language. But problem is, it gives me some unknown letters in mysql.  For example my problem is like this:   I put data in russian to my form form inserts data into datatable in russian database shows unknown letters table in webapp shows in russian properly and can be edited in russian aswell.   only results from within mysql give unknown letters  Here are my settings for enabling utf8   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">   Also have set my mysql database as:  +--------------------------+----------------------------+ | Variable_name            | Value                      | +--------------------------+----------------------------+ | character_set_client     | utf8                       | | character_set_connection | utf8                       | | character_set_database   | utf8                       | | character_set_filesystem | binary                     | | character_set_results    | utf8                       | | character_set_server     | latin1                     | | character_set_system     | utf8                       | | character_sets_dir       | /usr/share/mysql/charsets/ | +--------------------------+----------------------------+     +----------------------+-------------------+ | Variable_name        | Value             | +----------------------+-------------------+ | collation_connection | utf8_general_ci   | | collation_database   | utf8_general_ci   | | collation_server     | latin1_swedish_ci | +----------------------+-------------------+   I looked for many information about this issue and thought it was php file encoding problem. So I've also added   header("Content-Type:text/html;charset=utf-8");   I also tried by adding  mysqli_set_charset('utf8');   but now it doesnt load whole table..  Please help me with your tips  Thank you in advance


Let be $f$ a continuous function. Determine the limit $\lim\limits_{h \to 0} \frac{1}{h} \int_{a-h}^{a+h} f(x)\,dx$

$\lim\limits_{h \to 0} \frac{1}{h} \int_{a-h}^{a+h} f(x)\,dx$  I think that this kind of limit should I probably calculate with some kind of epsilon-delta definition.   And using the limits:  $\lim\limits_{h \to 0^+} \frac{1}{h}=\infty $  $\lim\limits_{h \to 0^-} \frac{1}{h}=-\infty $  I appreciate any helps.


I am trying to do a diagram over a map from Colombia, I use a  and then with tikz draw over it, but I was wondering if there is a way to do a shape or a silhouette of this map with tikz, maybe there is a  package that already have the shape of some countries? Or an easy way to construct this map? Thanks.


I am new to MySQL database.  So I want to know the exact SQL query to fetch Nth row. Please help me solve this issue. Thanks in advance.


I was recently issued with a U.K. Standard visitor's visa. It's valid for 6 months and multi-entry. When I applied, my intended travel dates were in December. However with new family developments I am unable to travel in December. My purpose for traveling to the U.K. hasn't changed, nor has the duration, the only thing that has changed is the date. Would I have problems entering the U.K on a changed date that is still within my visa validity?


Using second keyboard for for special characters

I currently having an unused keyboard (a HP's KBRF1921 to be exact). I always need to type some Greek characters such as αβɣ and latin character as abc.   It'd be great if I could use one for latin and map another one for Greek. Having go to charmap or insert symbol everytime i want to type them is somewhat annoying all the times. There's already one asked here:  but the question is not currently answered yet and it's narrow for linux only and usb. My current keyboard uses PS/2 in order to save off some USB ports. And there's another one here:  but their solution is for games.   I'm using both Linux and Windows so what applies for either platform is welcome.


Publish and/or subscribe to Platform Events between separate Orgs?

Does anyone have experience using Platform Events between separate orgs? I'm having trouble finding documentation or mention that something like this is possible. Basically I'd like to define a set of events that partnered companies can subscribe to so they can track our fulfillment process. Typically someone might set up web services or Connections as an integration solution, but I don't like how Connections couples our schema together. Web Services would require developer expertise than I'd like to compel them to pay for. A set of domain specific events is much more re-usable and less likely to change, than an object definition. In our use case of multiple integrated partners it would allow a given org to make changes without requiring a Connection change for every other org Connected to that object.  If it's not possible using more conventional Salesforce tooling, I know I could use a separate middleman pub/sub solution with Platform events, but I'd like to minimize moving parts.   Any info someone might have on the subject would be greatly appreciated!


Linear dependence of $\left\{x^{n}\,\colon\, n\in\mathbb{N}\right\}$

Consider the set $S=\left\{x^{n}\,\colon\, n\in\mathbb{N}\right\}$. (Note that $x\in\mathbb{R}$) Is this set linearly dependent?   Well thinking about it we want to find some non-trivial values $\lambda_{n}$ such that $$\lambda_{1}x+\lambda_{2}x^{2} + \ldots + \lambda_{n}x^{n} + \ldots = 0.$$ In other words we want to find if $$\sum_{k=1}^{\infty}\lambda_{n}x^{n} = 0$$ for any $\lambda_{n}\not=0$. However i'm not really sure how to proceed.


How can I check in an Eclipse project unused libraries dependencies?

I'm trying to convert to maven, a project in Eclipse which has a lot of external jars added manually to build path.  I would like to "clean" the project and check what externals jars added are really called, either by a source or by an internal jar dependency, and avoid adding dependencies to my pom.xml which will be useless.  Is there a tool for doing this ?   Thank you if anyone has a clue.


Variance of hierarchy of two random variables

I came across an example in Casella and Berger's Statistical Inference (Example 10.2.1) where we have a random variable, $X$, that $(1-\delta)\times100$% of the time is equal to a $N(\mu, \sigma^{2})$ random variable, and the remaining $\delta \times 100$% of the time, $X$ is equal to a random variable with unknown distribution but whose mean is $\theta$ and variance is $\tau^{2}$.  The book claims:     $Var(X) = (1-\delta)\sigma^{2} + \delta \tau^{2} + \delta(1-\delta)(\theta - \mu)^{2}$     I'm having trouble deriving this same formula. My logic going into this is $Var(X) = E[X^{2}] - (E[X])^{2}$, where $E[X] = (1-\delta)\mu + \delta \theta$.  $E[X^{2}]$, I think, is just a weighted sum of the second moments of the two component random variables, i.e. $(1-\delta)(\sigma^{2} + \mu^{2}) + \delta(\tau^{2} + \theta^{2})$.  But when I compute $E[X^{2}] - (E[X])^{2}$, I don't get the simple expression in the book. Is my approach incorrect?  Moreover, how is this different than a traditional linear combination of two random variables? I don't think the variance expression in the book is derived from the traditional expression for the variance of a linear combination of two random variables, i.e. $Var(X) = (1-\delta)^{2}\sigma^{2} + \delta^{2}\tau^{2} + 2Cov(\text{component}_{1}, \text{component}_{2})$.


Proving a graph has no Hamiltonian cycle

Show that $ G = (V, E)$ has no Hamiltonian cycle, where the vertices are $ V = \{ a, b, c, d, e, f, g \} $ and the edges are $E = \{ ab, ac, ad, bc, cd, de, dg, df, ef, fg \}$.  From my working out, the vertices $ a, b, c, d, e, f$ are odd degrees of 3 and 1. Moreover $g $ being a even vertices of 2.   There were three points that were made in my textbook to show that a graph does not contain a Hamilton circuit:   A graph with a vertex of degree one cannot have a Hamilton circuit. Moreover, if a vertex in the graph has degree two, then both edges that are incident with this vertex must be part of any Hamilton circuit. A Hamilton circuit cannot contain a smaller circuit within it.   According to the definition graph G does not have a Hamiltonian cycle because of the first definition.   However, I am confused about 2 & 3 definitions and I am not sure if this graph involves them or not.


What makes the canonical link function special in GLMs?

Why is the canonical link function used so frequently with GLMs? What makes it "natural"?  Is there any reason to think that, $Q(\theta _i)$ (where $Q$ is the canonical link function, and $\theta _i$ is the parameter of interest) is better described by a linear combination of predictor variables than some other function of $\theta_i$.  That is, is there any reason to believe that:  $$Q(\theta _i) = \sum_j \beta _j x_{ij}$$  is superior to:  $$f(\theta _i) = \sum_j \beta _j x_{ij}$$ where $Q \neq f$  If not, is there anything else that makes $Q$ better than $f$? The text book I am using just mentions what a canonical link function is, and makes use of it (pretty much exclusively), but does not explain what distinguishes it from any arbitrary link function.


Let $$f(x,y)=\left \{  \begin{array}{ll}   \frac{x^2+y^2}{sin(\sqrt{x^2+y^2})}  & \mbox{if } 0<||(x,y)||< \pi \\   0 & \mbox{if } x=(0,0)  \end{array} \right.$$  Determine if $f$ is differentiable at (0,0)  Im trying to use that if the partial derivatives exists and are continuous at (0,0) then f is differentiable at (0,0) but i can't conclude. I don't even know if I'm in the right way


Undefined reference when trying to define template  operator<

I am trying to implement my own BigInteger class with overloaded operators. So I have bool operator<(const BigInteger& left, const BigInteger& right) {   // some code }  which works OK, and now I try to overload operator< also as following: template <typename T> bool operator<(const BigInteger& left, const T& right) {   BigInteger big_right(right);   return (left < big_right); }  But in main.cpp following code numeric::types::BigInteger a{17}; std::cout << std::boolalpha; std::cout << (a < 16) << std::endl;  cannot compile, error undefined reference to 'bool numeric::types::operator< <int>(numeric::types::BigInteger const&, int const&)' P.S. BigInteger is in namespace numeric::types {} BigInteger of course has int constructor: BigInteger::BigInteger(int int_number) {   // some code }  Is it possible to somehow make this work? P.P.S. This is not anyhow connected with , because BigInteger is just class BigInteger, not a template <typename T> class BigInteger So in code numeric::types::BigInteger a{10}; std::cout << (a < 2) << std::endl; std::cout << (a < 2LL) << std::endl;  both of cout's should work correctly


What are the system requirements for each flavour of Ubuntu Desktop?

I'm thinking about installing Ubuntu Desktop, but I don't know what flavor is the best for my system. What are the minimum and recommended hardware requirements? What kind of CPU? How much memory? Should I have Hardware Acceleration? What flavor should I use?  This is an attempt of a canonical answer. My answers have the "official  requirements", the recommended are a mix of official sources and opinion based (along with the answer it's told the source). You can comment or edit if you feel that the information is obsolete or incomplete. It is a good rule of thumb that any system capable of running Windows Vista, 7, 8, x86 (Intel) OS X will almost always be a lot faster with any Ubuntu flavor even if they are lower-spec than described below.


How to estimate total population size given a small numbered selection from that population?

So let's say you find a small amount of numbered collectibles (e.g. 3 collectibles numbered 5, 14 and 103). Is there a way to estimate the total number of collectibles in existence?


Salesforce Metadata Api/ Tooling Api to build changesets

I was wondering if it was possible to use any of the API's provided by SF to build an external (C#, Java) application to manage building changesets.   Building changesets is very tedious when trying to include 100's of items and I was hoping to streamline the process for our team by building an application I can load an excel file to with the required components and have it build the outbound changeset.


Finding the distribution of $X|X+Y=n$ using MGFs

I asked  the other day and got a sufficient answer: that given $X$~$\mathsf{Poisson}(rate=\lambda_1)$ and $Y$~$\mathsf{Poisson}(rate=\lambda_2)$, $X|(X+Y=n)$~$\mathsf{Binomial}\left(n,\cfrac{\lambda_1}{\lambda_1+\lambda_2}\right)$. However, the way it was done was not using moment generating functions, and indeed I got a moment generating function for $X|(X+Y=n)$: $e^{tn}\cdot e^{\lambda_2(e^{-t}-1)}$. Knowing that a binomial's MGF looks like $(pe^t+1-p)^n$, I tried to prove the same result using the moment generating function I got, and I got close but got stuck. Here's what I did:  $\left(\cfrac{\lambda_1}{\lambda_1+\lambda_2}e^t+1-\cfrac{\lambda_1}{\lambda_1+\lambda_2}\right)^n \stackrel{?}=e^{tn}\cdot e^{\lambda_2(e^{-t}-1)}\iff n=\mathsf{log}_{\cfrac{\lambda_1}{\lambda_1+\lambda_2}\cdot(e^t-1)+1}(e^{\lambda_2(e^{-t}-1)+tn}) \\ = \cfrac{\mathsf{ln}(e^{\lambda_2(e^{-t}-1)+tn})}{\mathsf{ln}\left(\cfrac{\lambda_1}{\lambda_1+\lambda_2}(e^t-1)+1\right)} = \cfrac{\lambda_2(e^{-t}-1)+tn}{\mathsf{ln}\left(\cfrac{\lambda_1(e^t-1)}{\lambda_1+\lambda_2}+\cfrac{\lambda_1+\lambda_2}{\lambda_1+\lambda_2}\right)} = \cfrac{\lambda_2(e^{-t}-1)+tn}{\mathsf{ln}\left(\cfrac{\lambda_1e^t + \lambda_2}{\lambda_1+\lambda_2}\right)} = \cfrac{\lambda_2(e^{-t}-1)+tn}{\mathsf{ln}(\lambda_1e^t+\lambda_2) - \mathsf{ln}(\lambda_1+\lambda_2)} = \cfrac{\lambda_2(e^{-t}-1)+tn}{\mathsf{ln}(e^t)+\mathsf{ln}(\lambda_1+\lambda_2e^{-t}) - \mathsf{ln}(\lambda_1+\lambda_2)} = \cfrac{\lambda_2(e^{-t}-1)+tn}{t+\mathsf{ln}(\lambda_1+\lambda_2e^{-t}) - \mathsf{ln}(\lambda_1+\lambda_2)}$  Multiplying both sides by the denominator,  $tn+n\cdot\mathsf{ln}(\lambda_1+\lambda_2e^{-t})-n\cdot\mathsf{ln}(\lambda_1+\lambda_2) = \lambda_2(e^{-t}-1)+tn \iff n\cdot\mathsf{ln}(\lambda_1+\lambda_2e^{-t})-n\cdot\mathsf{ln}(\lambda_1+\lambda_2) = \lambda_2(e^{-t}-1)$  This is where I'm stuck. I can't seem to get rid of the $\lambda_1$. Thanks for the help.


with/without "-ed" for the compound adjectives formed by "adj.+noun"?

Among tons of "adj.+noun" compound adjectives, some of them end with "-ed", e.g. open-minded, double-sided, big-headed, some without, e.g. present-day, rear-view, deep-sea. I've also seen the usage of both cross-eye and cross-eyed.  Is there any rule for forming these kind of adjectives? If not, does that mean when we want to create a new one, we can go either way?  Thanks.


Calculate $\lim_{t\to\infty}\frac 1t\log\int_0^1 \cosh(tf(x))\mathrm d x$

Given that $f\in C([0,1])$, evaluate  $$\lim_{t\to\infty}\frac 1t\log\int_0^1 \cosh(tf(x))\mathrm d x.$$  I have thought about it for an entire day, but unfortunately I wasn't able to solve it. Now I'm asking you, more than a solution, which is in either case welcomed, an explanation on how to approach such a kind of problems. Thank you very much.


Question shows it was bumped by a user, but no activity is seen?

was apparently bumped by . It shows this on the front page of SO: 1min ago Justin Morgan  However, looking at the question, I don't see anything Justin Morgan actually did. Is this a bug?


Windows 7 updates. For five days in a row

Since the last five days, a PC with Windows 7 shows the updates screen when booting and when switching off, usually for about 5-10 minutes.  I can understand this when an update occurs, but why does it keeps doing this for at least five continuous days?  What's wrong, this is not my own PC, I'm used to to my beloved XP, so I can't give a proper reply to who is asking me "to do something" :-)  Thanks for your help.


Showing that if a subset of a complete metric space is closed, it is also complete

Let $(X, d(x,y))$ be a complete metric space. Prove that if $A\subseteq X$ is a closed set, then $A$ is also complete.  My attempt: I tried to prove that every Cauchy sequence $(b_n)$ of points of $A$ converges to a point $b\in A$. However could not figure out the exit way. Maybe I am on the wrong track. Could you please help me?  edit: More from my attempt:  Suppose $A$ is a closed set and let $(x_n)$ be a sequence of points $A$ such that $\lim_n x_n\to b$.  Suppose now that $A$ has the property that $b\in A$, whenever $x_n$ converges to $b$. We know that every element of $x_n$ which is convergent in $X$ also converges to a point in $A$. Since $x_n$ is a Cauchy sequence in $A$, it must converge to a point $y\in A$. But the limit of a convergent sequence is unique.   Take $x\in A$ and select an appropriate $n$, which enables $x_n$ to converge to a point $x$ in $X$. Since the limit is unique, it must follow that $x=y$. Thus $x\in A$ and $A$ is closed.   If $A$ is a closed subset of $X$, then any Cauchy sequence of a point in $A$ is convergent in $X$ and hence converges to a point in $A$. Thus $A$ is complete.


Problem with Bash script: 'declare: not found'

I had a script which was running fine but when I ran it today, it says declare: not found. I am using bash shell and path at the starting of the script is correct.  Two flagged lines in my script are as follows:  declare -a RESPONSE RESPONSE=($RESULT)   It also says ( is unexpected but I guess that is coming up because of the first error. Worth mentioning point is when I type in declare directly works fine.  declare | grep USER shows  USER=ashfame USERNAME=ashfame            values="$SVN_BASH_USERNAME";   So, whats wrong here?


What happens if Stack Exchange doesn't let anyone down-vote a newbie who has a reputation less than five?

I was thinking that Stack Exchange itself already has a smart system that filters the quality of a new question. Even the architecture of Stack Exchange is dependent on growing user networks. Then why doesn't Stack Exchange just stop the existing users from down-voting newbies who have less than five reputation? This current system seems like cyber bullying. The community can correct the newbie in many ways by leaving comments, and editing the question in a proper way of redirecting him/her to the right place. I feel then only a newbie will stay with Stack Exchange, especially in Stack Overflow. It's only my opinion. What's the community's opinion?


Why $\mathscr{B}(\mathbb{R}) \times\mathscr{B}(\mathbb{R})$ is not a $\sigma$-algebra?

I don't see why the cartesian product of two sigma-algebras is not always a sigma algebra ($\mathscr{B}(\mathbb{R}$ is the Borel sigma-algebra).


Trilogy in which people have reverted to the barbarian ways, with scientists that overlook them

There has been a nuclear war. There are now two sets of people: the barbarians and the scientists. The barbarians are distinguised by the type of weapons they are masters of, the rope/sword/short sticks etc. In the barbarian culture, they fight in a circle to sort out disagreements and arguments.    In one of the later books they are assaulting a mountain containing the scientists.  This is all I can remember.


How can I open certain links in Google Chrome, which is not my default browser?

My default browser is Safari. I would like to open all Google Meet links (e.g. https://meet.google.com/xxx-xxxx-xxx) to open in Google Chrome. I open these links from a calendar event in Apple's Calendar app.  How can I make these kinds of links open in Chrome instead of Safari?


I would like to know if "in rain" is correct in English. For example, in the film Blade Runner there is the famous "Tears in rain" monologue (and by the way there is a vangelis' song with the same name). But it seems it's usually "in the rain". PS: For information, it is for an "artistic purpose", so it is not a problem if it is not common as long as it's OK.


How do I turn off audio echo from microphone to local speakers?

From 2 microphone inputs I have only one in use. When I talk into my USB microphone the audio echoes back to my local speakers (my "hello" is getting looped back instantly).   How do I turn this off?  Additional information on how to do this from command line (for a remote machine) would be appreciated.


Induced right exact sequence when we apply hom

I am trying to prove the following proposition rigorously given at Michael Atiyah commutative algebra book. There is one step which I am currently stuck in.  Suppose that $N,N^{\prime}, \ and \ N^{\prime \prime}$ are A-modules.   The following exact sequence $$0 \xrightarrow \ N^{\prime} \xrightarrow{u} N \xrightarrow{v} N^{\prime \prime}$$ is exact iff for all A-modules M we have that the following sequence is exact  $$0 \xrightarrow \ Hom(M,N^{\prime}) \xrightarrow{\bar{u}} Hom(M,N) \xrightarrow{\bar{v}} Hom(M,N^{\prime \prime}).$$  I proved the reverse direction, however in the forward direction I have one step I am currently stuck in. Here is what I have so far.  So we want to show that $ker(\bar{v}) = im(\bar{u})$. I showed the inclusion $im(\bar{u}) \subset ker(\bar{v})$. Suppose that $\psi \in ker(\bar{v})$. Then, we have $\bar{v}(\psi) = v \circ \psi = 0$.  Then $im(\psi) \subset ker(v) = im(u) \cong N^{\prime}$. Then, we can reinterpret $\psi : M \rightarrow N$ as a morphism $\phi : M \rightarrow N^{\prime}$. Denote this new map by $\phi$. Now I am having troubles showing that $\bar{u}(\phi) = \psi$.  Please maybe provide a hint as I would like to discover this by myself.   In my question I am not asking for a proof. I am asking to check certain aspect of my argument and improving on that. Thus, this post isn't a duplicate.


how to implement the switch case in python..?

Check this below code:  var = input("enter a number between 1 and 12") def switch_demo(var):     switcher = {                 1: "Jan"                  2: "Feb"                  3: "March"                 4: "April"                  5: "May"                  6: "June"                  7: "July"                  8: "August"                  9: "Sept"                  10: "Oct"                  11: "Nov"                  12: "Dec"     }     print switcher.get(var,"Invalid Month")   I am getting Syntax Error at line 5 How can I solve the error?


Let $a,b,c>0$ such that $a+b+c=3$, find max/min of $\frac1{a^2+1}+\frac1{b^2+1}+\frac1{c^2+1}$

Let $a,b,c>0$ be real numbers such that $a+b+c=3$, find the maximum and minimum of:   $$\frac1{a^2+1}+\frac1{b^2+1}+\frac1{c^2+1}$$   I've tried using AM-GM-HM, but I can't find the maximum or the minimum.  Using intuition, substituting $a=b=c=1$ should give us one of the optimums, but I cannot prove that it is the optimum.


Isomorphism from $\mathrm{Aut}(\mathbb{Z}/2\mathbb{Z}\times \mathbb{Z}/2\mathbb{Z})$ to $S_3$

I know that $\mathrm{Aut}(\mathbb{Z}/2\mathbb{Z} \times \mathbb{Z}/2\mathbb{Z} ) \cong S_3$, where $S_3$ is the symmetric group. I do not know how to prove that they are isomorphic, however.  What I tried was finding a specific $\phi:\mathrm{Aut}(\mathbb{Z}/2\mathbb{Z} \times \mathbb{Z}/2\mathbb{Z})\rightarrow S_3$, but the part that confuses me is that the automorphism group is a group of isomorphisms itself, so I don't know how to send an isomorphism to $S_3$.


What are the system requirements for a server running an ASP.NET MVC 5 application

For my project, we want to deploy a demo server and publish my ASP.NET MVC 5 app to it. I'm familiar with developing applications in this environment, but I have no experience in deploying it to an actual server. Our sys admin does not have extensive experience with ASP.NET applications or IIS, but is reasonably well-versed in Windows Server.  Now, I can't really find what system requirements there are for the server - only for some older versions of ASP.NET MVC (e.g. version 2 or 3).  I am not asking in terms of capacity - I need to know the actual software version requirements:   What Windows Server version is the minimum? Which IIS version Any other software we'll need?


Show new activity message when page is visited using back button

I get to see a message "1 question with new activity" when a question is posted newly. I click on that question and view it. Then I click on my browser back button. I don't see this newly posted question, but instead I get to see the previous visited page because this comes from browser cache and not from Server.  Now, I no more get to see "1 question with new activity" message if a question is posted newly. I have to either refresh the page using F5 OR click on Tags and again revisit to see the new questions under that tab.


OpenSSL crashes when freeing a closed socket with pending data

I'm working on a project which needs to connect to a server over a secure socket connection and send some commands, in case one of the commands fail I get an error response on that socket and then the socket closes.  I have tried a single-threaded approach with a non-blocking ssl socket. I connect to the server and then send a few commands, do a non-blocking read for an error status, send some more commands, read again and so on. The server is an Apple Push Notification Service in case it helps.  Everything seems fine until I get an error response followed by the server closing the socket. I can read the error response and see that the socket has been closed but when I free the BIO object the application crashes (unhandled SIGPIPE). In my opinion it crashes because I may be sending data even after the socket has been closed. This is the backtrace after the SIGPIPE signal was issued:  queue = 'com.apple.main-thread', stop reason = signal SIGPIPE frame #0: 0x94cad46a libsystem_kernel.dylib`__write + 10 frame #1: 0x0007b835 APNTest`conn_write + 69 frame #2: 0x0007957d APNTest`BIO_write + 141 frame #3: 0x00100127 APNTest`ssl3_write_pending + 215 frame #4: 0x001001f9 APNTest`do_ssl3_write + 57 frame #5: 0x00101cab APNTest`ssl3_dispatch_alert + 59 frame #6: 0x000fdb80 APNTest`ssl3_shutdown + 112 frame #7: 0x00126e43 APNTest`ssl_ctrl + 83 frame #8: 0x00005653 APNTest`APNConnection::shutdown(this=0x00300fd0) + 83 at APNConnection.cpp:136 frame #9: 0x000055e5 APNTest`APNConnection::~APNConnection(this=0x00300fd0) + 21 at APNConnection.cpp:41 frame #10: 0x00005687 APNTest`APNConnection::~APNConnection(this=0x00300fd0) + 23 at APNConnection.cpp:40 frame #11: 0x000024d6 APNTest`APNService::run(this=0xbffff7a8) + 1190 at APNService.cpp:73 frame #12: 0x00006a6a APNTest`main + 1946 at main.cpp:36 frame #13: 0x94ce46d9 libdyld.dylib`start + 1   Here is the code I use to create my OpenSSL secure socket  BIO *bio; SSL_CTX *ctx; SSL *ssl;  ctx = SSL_CTX_new(SSLv23_client_method()); if (!SSL_CTX_load_verify_locations(ctx, strdup(trustStoreFile.c_str()), NULL)) {...} if (SSL_CTX_use_certificate_file(ctx, strdup(clientCertFile.c_str()), SSL_FILETYPE_PEM) <= 0) {...} if (SSL_CTX_use_PrivateKey_file(ctx, strdup(clientPKFile.c_str()), SSL_FILETYPE_PEM) <= 0) {...}  bio = BIO_new_ssl_connect(ctx); BIO_get_ssl(bio, & ssl); SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY); BIO_set_nbio(bio, 1); BIO_set_conn_hostname(bio, serverURL.c_str()); int connErr = 0; do {     connErr = BIO_do_connect(bio); } while (BIO_should_retry(bio));   Reading and writing data is performed using BIO_write(bio, data, size) and BIO_read(bio, data, datasize)  Cleanup code and the one that crashes is   SSL_CTX_free(ctx); BIO_reset(bio); BIO_free_all(bio);   BIO_reset is the one that crashes right now, but if I remove it BIO_free_all will crash. What I can do to avoid the crash is send one command at a time and after each command is sent I should wait 1 second or so to see if the server sent an error for that command or not, send one more, wait again and so on. Or another thing that helped me hide the crash is installing a dummy signal handler for SIGPIPE but these are just workarounds.  I'm guessing that it may be crashing because of the data queued for sending after the socket was closed. What makes me believe this is that I see that ssl3_shutdown calls some ssl3_write_pending and also because the cleanup code will not crash if I am extra careful to not do any more BIO_write(s) after I get a non-zero SSL_shutdown().   Am I doing something wrong with the cleanup code or is there a way to instruct OpenSSL to discard any data when freeing the BIO and SSL objects?   Thank you for your help!


Half-integer eigenvalues of orbital angular momentum

Why do we exclude half-integer values of the orbital angular momentum? It's clear for me that an angular momentum operator can only have integer values or half-integer values. However, it's not clear why the orbital angular momentum only has integer eigenvalues.  Of course, when we do the experiments we confirm that a scalar wavefunction and integer spherical harmonics are enough to describe everything. Some books, however, try to explain the exclusion of half integer values theoretically. Griffiths evokes the "single valuedness" argument, but he writes that the argument is not so good in a footnote. Shankar says that the $L_z$ operator only is Hermitian when the magnetic quantum number is an integer, but his argument isn't so compelling to me. Gasiorowicz argues that the ladder operators don't work properly with half-integer values. There are some low impact papers (most of them are old) that discuss these subjects, although they are a little bit confusing.  So, basically, my question is: Does anyone have a decisive argument on why do we exclude the half-integer values from the orbital operator spectrum?


When Gus invited Walt to his house for dinner, there was a short glimpse of his - probably - living room where we can see a toy car and a toy table. Was Gus’ family ever mentioned in the show? I think there was an implication of Gus being homosexual and the revenge he took on the cartel had also a personal aspect (murder of his partner). I can see a contradiction in this. Maybe he wanted to give Walter an impression that he is also a family man? If so, it would show how sociopathic Gus was.


I'm confused in whether to write know or knows in the following statement:- "The ones who are included know better."?  Also explain the difference between the two, thanks.


This is a workshop task i've been given for my combinatorics module, the only hint i've been given towards it is: 'Suppose we have n blue balls and n red balls. What do both quantities above describe?'  I started thinking about the problem by noting that the right hand side is the number of subsets of $2n$ of size $n$. And also $\binom{n}{i}$ is the number of subsets of n of size $i$. so let $i=0$ and we have $1$ way to make a subset of size zero, then $\binom{n}{1} = n$ and so on.  Thinking about it with the 'hint' i can describe the LHS as being the number of different ways we can take $i$ balls out of the bag and when all combinations are added together, it becomes the total number of ways we can take any number of balls ($i \leq n$) from the bag.  The RHS  is the number of subsets of $2n$ of size $n$, or the number of ways we can take $n$ balls out of a bag of size $n$, using the hint, if we have a bag of $n$ blue and $n$ red balls it's the total number of ways we can pull out $n$ number of balls where so many are red and blue, e.g $1$ red and $(n-1)$ blue.  I can see all this but I have no clue how either side even relates let alone is equal.


I have data (Hour/Date) collect from the host pc and i can't put them in Text (Scene Builder)

Hello StackOverFlow comunity,  I have collect hour and date for a Java/JavaFX application project, i can take abd show them in the output with:  DateTimeFormatter dtf = DateTimeFormatter.ofPattern("dd/MM/yyyy\n  HH:mm"); LocalDateTime now = LocalDateTime.now(); System.out.println(dtf.format(now));   but when i want to use     "name_of_my_text".setText(dtf.format(now)); to put it in my scene this doesn't work and show in the output too much JavaFX error.  Thanks for SOF comunity


The closure of an irreducible subset of an irreducible space is irreducible.

Start with an irreducible space $X$. Take a subset $Y$ that is irreducible. Show that the closure of $Y$ is still irreducible.   I imagine we are supposed to start with saying, assume we have a decomposition for $\bar Y = S\cup T$ and then somehow derive a contradiction to $X$ or $Y$'s irreducibility, but I am struggling.


Simple Algorithm From Javascript to Python code not producing same result


how to set image to Java swing background and buttons

Hello I'm trying to change one thing in my code and thats including an image in my background instead of simply a color. I put in the url inside of my code but it gives an error stating that I cant convert a color to string. what am I doing wrong here?  package blackjack; import javax.swing.*; import java.awt.*; import java.awt.event.*;  /**  *   * @author tacomeat  */ public class BlackjackGUI extends JFrame {  public static void main( String [] args ) {     JFrame frame = new BlackjackGUI();     frame.getContentPane().setBackground( FOREST_GREEN );             frame.setSize( 580, 480 );     frame.show(); }  private BlackjackDealer dealer; private GUIPlayer       human; private final JPanel players = new JPanel( new GridLayout( 0, 1 ) ); private static PlayerView Dealerview;  private static final Color FOREST_GREEN = new Color( 35, 142, 35 );  public BlackjackGUI() {       setUp();     WindowAdapter wa = new WindowAdapter() {         @Override         public void windowClosing( WindowEvent e ) {             System.exit( 0 );         }     };     addWindowListener( wa ); }  // needs to be protected if subclassed private PlayerView getPlayerView( Player p ) {     PlayerView v = new PlayerView( p );     v.setBackground( FOREST_GREEN );     return v; }     // needs to be protected if subclassed private void setUp() {     BlackjackDealer dealer = getDealer();     PlayerView v1 = getPlayerView( dealer );     this.Dealerview = v1;      GUIPlayer human = getHuman();     PlayerView v2 = getPlayerView( human );      PlayerView [] views = { v1, v2 };     addPlayers( views );      dealer.addPlayer( human );      addOptionView( human, dealer ); }  public PlayerView getDealerView(){     return this.Dealerview; }   // needs to be protected if subclassed private void addPlayers( PlayerView [] p ) {             players.setBackground( FOREST_GREEN );     for (PlayerView p1 : p) {         players.add(p1);     }       getContentPane().add( players, BorderLayout.CENTER );         }  private void addOptionView( GUIPlayer human, BlackjackDealer dealer ) {     OptionView ov = new OptionView( human, dealer );     ov.setBackground( FOREST_GREEN );     getContentPane().add( ov, BorderLayout.SOUTH ); }  private BlackjackDealer getDealer() {     if( dealer == null ) {         Hand dealer_hand = new Hand();         Deckpile cards = getCards();         dealer = new BlackjackDealer( "Dealer", dealer_hand, cards );     }     return dealer; }  private GUIPlayer getHuman() {     if( human == null ) {         Hand human_hand = new Hand();         Bank bank = new Bank( 1000 );         human = new GUIPlayer( "Human", human_hand, bank );     }     return human; }  private Deckpile getCards() {     Deckpile cards = new Deckpile();     for( int i = 0; i < 4; i ++ ) {         cards.shuffle();         Deck deck = new VDeck();         deck.addToStack( cards );         cards.shuffle();     }     return cards; }  }


How to train students to write high-quality research papers?

As someone supervising postgrad students, I wonder what is the best way to train these students to write high-quality research papers?    The best way seems to be through coauthorship but ...  On the one hand I can be hands-off and rather give them feedback as best as I can but let them do most of the work themselves, sort of like a "sink or swim" strategy.  On the other hand I can be hands-on and rewrite the paper (or large parts of it) and hope that they learn from the example I give.  On the one hand I want them to learn to write papers without me some day and I want them to learn as quickly as possible to take load off me.  On the other hand I want us to publish in the best place possible with as little stress as possible.  On the one hand I want them to see the peer review comments from what they themselves have written.  On the other hand I do not want them to be discouraged by the peer review system early on and do not want to submit papers I know we could have written better.  On the one hand I want them to get confidence by being published and presenting work at good venues.  On the other hand I wonder if they need to get there themselves to get that confidence boost.    At the moment I'm very hands on. There's a few factors for this: I don't like submitting papers that are not up to a certain standard, I'm a native English speaker in a non-English speaking country with non-native speaking students, publications are a high priority for me, etc.  But recently a friend/colleague warned me that I should not be so hands-on with the writing of the papers of my students. He pointed to recently graduated researchers in my area that published good work as students but who struggled after leaving their PhD supervisor saying their supervisor did them no favours in the long term ... that by being so hands on, while the students have success getting published and so forth with me, I'm not really doing the most important thing a good supervisor should do: making myself obsolete.    My question is how to train students to write good research papers and in what ways can I balance being hands-on and hands-off?  I'm also interested in methods not directly involving coauthorship.


How should I detect unnecessary #include files in a large C++ project?

I am working on a large C++ project in Visual Studio 2008, and there are a lot of files with unnecessary #include directives. Sometimes the #includes are just artifacts and everything will compile fine with them removed, and in other cases classes could be forward declared and the #include could be moved to the .cpp file.  Are there any good tools for detecting both of these cases?


When I click on area, GeoNetwork show the next problem: "No matching records found".    In geoserver, the information if it is shown.   What is the problem?


Why does the golden ratio work? Or does it?

is just one example of an article promoting use of the golden ratio in design. Over the past few years I've seen quite a few similar articles, but none of them really seem to go into depth beyond just explaining what the golden ratio is. I've been able to find very  that test it and it seems as if the results are inconclusive.   Here are some more web design articles advocating the golden ratio:             Unfortunately, even though the articles above are from some of the more popular design blogs online, not one of them even cites a study. Only  seems to be even questioning its use, but he only questions it for the medium of the web.  At the risk of going against the grain of the design community, is there any objective evidence that the golden ratio actually improves design? Are there any split test studies comparing the effectiveness of a website design based on the golden ratio versus one that isn't? And if, in fact, the golden ratio in design is proved to be more effective, why is that the case? Are there greater principles that we can pull from it that can be applied in different ways? Are there are other golden ratios?


Prove this inequality $\sum \cos{A}\ge\frac{1}{4}(3+\sum\cos{(A-B)})$

Prove that in any triangle $ABC$ the following inequality holds $$\cos{A}+\cos{B}+\cos{C}\ge\dfrac{1}{4}(3+\cos{(A-B)}+\cos{(B-C)}+\cos{(C-A)})$$  And I have gotten $$8(\cos{A}+\cos{B}+\cos{C})\ge 6+2(\cos{(A-B)}+\cos{(B-C)}+\cos{(C-A)})$$  $$2(\cos{(A-B)}+\cos{(B-C)}+\cos{(C-A)})+3=(\sum_{cyc}\cos{A})^2+(\sum_{cyc}\sin{A})^2$$ $$\Longleftrightarrow 8\sum_{cyc}\cos{A}\ge 3+(\sum_{cyc}\cos{A})^2+(\sum_{cyc}\sin{A})^2$$ then Any hints, ideas? Thanks in advance.


I've just read  (now deleted). What is the policy on putting affiliate tags into Amazon links on Stack Overflow? What about other affiliate links?


How can I get a link to a specific email thread in Gmail if I have the preview pane enabled?

I often like to create links to specific email threads and put them in my calendar so that I have the relevant information at my fingertips.  Ever since I enabled the preview pane, this has been impossible.  Does anyone know how I can get it?  Maybe some button I have to press or perhaps even a userscript that I can use with TamperMonkey?


MacBook Air (2015) Trackpad and keyboard not working

My MacBook Air's internal keyboard and Trackpad have stopped working. To be honest, she had a bit of a fall about 2 weeks ago, about 3 feet onto carpet, it has worked fine ever since yesterday. I reset PRAM and SMC, no luck.   Works totally fine with external mouse and keyboard. How do I get it working again?


Given the key, the plain text and the cipher text can I calculate the IV used in CBC mode?

If I have the plain text, the ciphertext and the key for an AES-128 CBC operation, can I determine the IV, even if I don't know the padding (assuming the padding follows one of the more common formats)?  I believe it should be possible since my understanding is that the IV is only used as an initial XOR of the plain text in encryption, and should, therefore, be able to be available like this:  AESDecrypt(key, ciphertext) => (PlainText XOR IV); IV = ((Plaintext XOR IV) XOR (Plaintext))   Is this correct?


Show that $\frac{P(z)}{Q(z)} = \sum_{k=1}^{n}\frac{P(\alpha_k)}{Q'(\alpha_k)(z-\alpha_k)}$

Here, $Q$ is a polynomial with distinct roots $\alpha_1, \ldots, \alpha_n$ and $P$ is a polynomial of degree $<n$. Once again, the task is to show  $$\frac{P(z)}{Q(z)} = \sum_{k=1}^{n}\frac{P(\alpha_k)}{Q'(\alpha_k)(z-\alpha_k)}$$  For reference, this is page 32 exercise 2 in Complex Analysis by Ahlfors. I'm having a ton of trouble making connections between what is presented in the text and this problem. The section is on rational functions and is incredibly concise. There was never a mention of derivatives and their relationships to rational functions, so I'm guessing here that it just means that $Q'(a_k)$ is a polynomial of degree $n-1$.  I don't even know where to start here, but I do have a couple question which might motivate the proof. What does $P(\alpha_k)$ mean? I don't see what a root of $Q$ has to do with a completely different polynomial. What is the relationship between the roots of $Q$ and the roots of $Q'$? And finally, where does the derivative of $Q$ come in?


Is $\mathbb{Q}(\sqrt{2})$ a Euclidean domain?

How do I prove that $\mathbb{Q}(\sqrt{2})$ is or isn't a Euclidean domain?  So if $F$ is a field, then $F[X]$ is a Euclidean domain. I don't see why this means that $\mathbb{Q}(\sqrt{2})$ is a Euclidean domain, because we have $\sqrt{2}$ instead of $X$.


What was Ram planning to do with Saroo in Lion?

In the movie Lion, what was the duo of Noor and Ram planning to do with Saroo? Or is it left ambiguous? (in this case what are the most likely candidates?)


Compute the mean of $(1 + X)^{-1}$ where $X$ is Poisson$(\lambda)$

Question  Let $X$ be Poisson with parameter $\lambda$.  Compute the mean of $(1 + X)^{-1}$. (Introduction to Probability Theory, Hoel, pp. 104)  Answer Key  The answer key shows that the mean is $\lambda^{-1}(1 - e^{-\lambda})$  My Solution  $$E(1 + X)^{-1} = \sum\limits_{j = 1}^\infty (1 + j)^{-1} \dfrac{\lambda^{(1 + j)^{-1}}e^{-\lambda}}{(1 + j)^{-1}!}$$ $$= e^{-\lambda} \sum\limits_{j = 1}^\infty \dfrac{\lambda^{(1 + j)^{-1}}}{((1 + j)^{-1} - 1)!}$$ $$= \lambda^{-1} e^{-\lambda} \sum\limits_{j = 1}^\infty \dfrac{\lambda^{(1 + j)^{-1} - 1}}{((1 + j)^{-1} - 1)!}$$ $$= \lambda^{-1} e^{-\lambda}(e^{\lambda} - 1)$$ $$= \lambda^{-1}(1 - e^{-\lambda})$$  EDIT: I found why I got the answer incorrect.  Thanks for those who answer the question! :)


im getting  uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. error when adding array to linkedlist  Here is my work  LinkedList main_list = new LinkedList(); int arr = new int[2] arr[0] = 0; arr[1] = 1;  main_list.add(arr);


So I have this code.  \draw(A)-- (X)-- (D) pic["$\epsilon$"] {angle= A--X--D};   And it works perfectly. But I don't know how to display numbers. For example   \draw(A)-- (C)-- (D) pic["$34$"] {angle= A--C--D};   and I get this    How to fix that? I mean how can I display the number (with degree symbol) like I did epsilon?


How do you differentiate the integral from $ \int_{e^{-x}}^{e^x} \sqrt{1+t^2}\,dt$

How do you differentiate the integral from $e^{-x}$ to $e^x$ of $\sqrt(1+t^2)$ with respect to t?  $$   \int_{e^{-x}}^{e^x} \sqrt{1+t^2}\,dt $$  I know the answer is $$ e^x\sqrt{1+e^{2x}} + e^{-x}\sqrt{1+e^{-2x}} $$ but I'm not entirely sure how to get there. I know it involves using FTC part two to get F(b)-F(a), and I can see you plug in b and a right into the equation, but why doesn't it look like it's an antiderivative?  EDIT: forgot to change the dummy variables


JAVA Keep decimal places only when it got value

i need the decimal places output to be like this: 1000.00 -> 1000 1000.10 -> 1000.10 remove trailing zero if decimal places is both zero, but keep two decimal places if there is at least one value.  I tried DecimalFormat(".##"), but its not what im looking for: 1000 1000.1 (need to keep two decimal places 1000.10)


How to position a flexbox in the center of the page?

<template>

1

2

3

 </template>   So.. How do i put this flexbox in the middle of the screen using TailwindCSS? Everything i try fails so far! I cant figure out how to position Flexboxes on the page in-general.


How do I convert my usb installation from legacy boot to uefi?

I installed elementary os onto a usb using legacy settings, and I can boot it using legacy bios options. However, I would like to switch the boot to UEFI so that I dont have to change my PC's firmware setting everytime I want to boot windows from my hard drive, or switch it again when I want to boot elementary off the USB. Is this possible, and how would I go about doing it?


Direct formula for area of a triangle formed by three lines, given their equations in the cartesian plane.

I read this formula in some book but it didn't provide a proof so I thought someone on this website could figure it out. What it says is: If we consider 3 non-concurrent, non parallel lines represented by the equations : $$a_1x+b_1y+c_1=0$$ $$a_2x+b_2y+c_2=0$$ $$a_3x+b_3y+c_3=0$$ Then the area of the triangle that these lines will enclose is given by the magnitude of : $$\frac{det\begin{bmatrix}a_1 & b_1 & c_1\\a_2 & b_2 & c_2\\a_3 & b_3 & c_3\end{bmatrix}^2}{2C_1C_2C_3}$$ Where $C_1,C_2,C_3$ are the co-factors of $c_1,c_2,c_3$ respectively in the above matrix.  What I'm wondering is, where did this come from? And why isn't it famous? Earlier we had to calculate areas by finding the vertices and all but this does it in a minute or so and thus deserves more familiarity.


The set of integers $n$ expressible as $n=x^2+xy+y^2$

Let $S$ be the set of integers $n$, such there exist integers $x,y$ with $$n=x^2+xy+y^2$$   Is the implication $$a,b\in S\implies ab\in S$$ true? If yes, how can I prove it?  I worked out $$n\in S\iff 4n\in S$$ and $$n\in S\iff 3n\in S$$ I tried two approaches. The first is to express $$(a^2+ab+b^2)(c^2+cd+d^2)$$ in the form $$f^2+fg+g^2$$ with polynomials $f,g$ with integer coefficients. I however could not find suitable $f$ and $g$. The second approach is based on $$x^2+xy+y^2=\frac{(2x+y)^2+3y^2}{4}$$ If we have $n=x^2+xy+y^2$ , we have $u^2+3v^2=4n$ for some integers $u,v$ with equal parity. The main problem of this approach is to consider the equal parity. Any ideas ?


Anonymous users request to enter email to download files

I have a question that i thought originally i would able to answer myself.  I have a site that show some pdf help files. The files is open to anyone so they can download freely.  The question is how i can still leave it open but when a user click on a file they will requested to enter an email ( like a pop up) after that the could continue as normal.  I don't want in this stage to force the user to create a account. I don't want the user to verified the email. I don't want to create a private file system.  I think a first approach will be a javascript. But i want the drupal check and validate the user input {With ajax approach}. The reason is that in a later state i would implement some web service with another Db and it will be nice to have ready the site part.  The validation for now is just to be a valid email format. {abc@abc.abc}  I have already seen


Can I query a different AD domain with the default Win7 install?

Background  I work in an Enterprise where our Active Directory is locked down pretty tight and only Info Security has access to administer changes. I'm using a standard Win7 Enterprise x64 Service Pack 1 PC with UAC locked down fairly tight and I do not have any special LDAP querying tools on my desktop. I am a local admin on my PC but, if possible, I'd like to avoid changes to my desktop environment as our Security team gets prickly about that sort of thing.   Problem  I frequently use NET GROUP /DOMAIN [groupname] and NET USER /DOMAIN [username] through the command prompt to query group access on our primary domain. I've recently come across a situation where I need to check group membership on a different test domain but (unless I'm mistaken) it appears that these command only work on the active domain. I do have an account and a password on this other domain but I have no idea how to query it.   Question  Is there an easy way for me as an end user without special admin tools and with the basic Windows setup to query a different domain than the one I am currently on? I looked up the TechNet articles on  and  but I didn't see how I could switch the target domain.


Is the convex hull of a compact set compact?

Let $V$ be a normed vector space and $K$ a compact subset of $V$. Is the convex hull of $K$ given by $$\langle K \rangle = \left\{\sum_{i=1}^n t_i x_i\mid x_i\in K, t_i≥0\text{ s.t. }\sum_i t_i=1\right\}$$ again compact?


For the given code what's the time complexity in Big-O notation ?  for(int i = 1; i <= n; i++)     for(int j = 1; j <= n; j = j + i)              some_constant_statement   If I'm not wrong  First loop take  n times Second loop n.long(n) time For Second loop :  n + n/2 + n/3 + n/4 +...................n/n times n(1 + 1/2 + 1/3 + ..............1/n) times means n(long(n)) time So, time complexity of entire piece of code is n.n.long(n)   Please correct me guys if I'm wrong .


Print a file, skipping the first X lines, in Bash

I have a very long file which I want to print, skipping the first 1,000,000 lines, for example. I looked into the cat man page, but I did not see any option to do this. I am looking for a command to do this or a simple Bash program.


Do I use a comma between "whimsical" and "clay" in the sentence below?

Billy did a wonderful job creating his whimsical[,] clay fish dish.


I am pretty noob on linux and this is probably a very simple error but I can't fix it.  I am trying to install AMD drivers for my card on Ubuntu server 14.04 (for a ethereum miner).  I followed this tutorial from AMD   What I did was the following:  I installed Ubuntu server and connected via ssh from my windows machine.  I checked my Ubuntu version, also checked that it was 64 bit.  I checked my graphics card version:   lspci -nn | grep VGA -> Advanced Micro Devices, Inc. [AMD/ATI] Tonga PRO [Radeon R9 285/380] [1002:6939] (rev f1)   I go to the amd website to download the drivers. they should be under Radeon™ R9 200, R7 200, HD 7000, HD 6000, and HD 5000 Series, I go to the Ubuntu 14.04 64 bit link .  I download the first one (don't know why there are so many) using wget  The problem comes when I try to unpackit (if it's the right word) using the following command:  sudo dpkg -i fglrx_15.302-0ubuntu1_amd64_ub_14.01.deb   I am given an error:  dpkg-deb: error: `fglrx_15.302-0ubuntu1_amd64_ub_14.01.deb' is not a debian format archive dpkg: error processing archive fglrx_15.302-0ubuntu1_amd64_ub_14.01.deb (--install): subprocess dpkg-deb --control returned error exit status 2 Errors were encountered while processing: fglrx_15.302-0ubuntu1_amd64_ub_14.01.deb   I am not able to fix this, please help me. Thank you very much.


I have read and used the concept of  previously and this is simply an attempt on my side to better my understanding of it by asking myself various questions. I understand that the fermi distribution is defined as  $$f(E)=\frac{1}{1+e^{\frac{E-E_F}{kT}}},$$ hence the Fermi Energy is defined as $f(E_F)=0.5$.  However, this definition does not define the fermi level to be a constant value and I understand that it's a material property. For example in crystals, due to covalent or ionic bonds that constitute the monocrystalline material, the atomic wavefunctions which make up the atoms within the crystals, face degeneracy, and this leads to the formation of bands (very closely spaced states) within the crystal. Here the Fermi level is defined as the brim or the edge to which the electrons fill up these states at zero kelvin.   Obviously, since they are continuous bands (or a continuum of energy states with very little energy gaps between consecutive states), defining the Fermi level up to the last state within the band or the next unfilled state at zero kelvin would yield very little error, but what about semiconductors where the entire valence band is filled up until zero kelvin and then starts a considerable gap where the Fermi level resides, or individual atoms (for example an Si atom, where the difference between the 3p state and 4s states are considerable)?   How do we pin out a defined value of $E_F$ in those circumstances? Or even molecules like $C_{60}$ where we have discrete states. The difference between the HOMO and the LUMO levels is much more conspicuous in this case. How do we etch out a Fermi level value in these cases?


Let $f: \mathbb{R}^2 \to \mathbb{R}$ be defined by $f(x)=\begin{cases} \frac{x_1^2x_2}{x_1^2+x_2^2}, \quad x\neq 0 \\ 0 , \quad \quad \, \, \, \,  x=0\end {cases}$.  I suppose that the derivative doesn't exist, but how can I prove that $f$ is not differentiable at $0$? I tried using $\lim\limits_{h\to 0}\frac{f(a+h)-f(a)-Lh}{|h|_2}$ but how can I show that there is no linear function $L$?


What is the product of all nonzero, finite cardinals?

To be specific, why does the following equality hold? $$ \prod_{0\lt n\lt\omega}n=2^{\aleph_0} $$


What purpose does the following circuit have?

The circuit was pulled from a SBC schematic. VBUS_5V is the input power from the micro USB port. Ultimately I am attempting to figure out if there is current limiting between VBUS_5V and VDD_5V.


Can I use someone else's credit card for flight booking?

Can I book a domestic flight in US using my father's credit card? The flight is operated by Mesa airlines.


Attempt to invoke virtual method 'android.content.res.Resources android.app.Activity.getResources()' on a null object reference

I am getting Error while doing this  this is my code  String[] options = {getActivity().getResources().getString(R.string.capture_video),getActivity().getResources().getString(R.string.Cancel)};   This is in Fragment class


I want to create a flow map in QGIS.  I have a list of cities and I have to show how many people travel from one city to another. For example, 5 people traveled from Vantaa to Helsinki, 10 people traveled from Tampere to Helsinki, 50 people traveled from Joensuu to Helsinki etc,. The flow strength (number of people) should be shown with different thickness lines, where 5 is the thinnest and 50 is the fattest.


Google Chrome mouse accuracy bug - 16.04 LTS

I installed Google Chrome from the official repository  stable main  While using it I noticed a strange bug - when I focused on Desktop ( CTRL - SUPER - D ) and then gave back focus to the chrome window the mouse cursor would be around 5px above where it appeared to be on screen and did not match where I was clicking. This affects links as well as chrome interface (menus etc).    When I toggle Chrome window maximization state the mouse cursor works correctly. This issue does not occur on Linux Mint.  Is there a solution ?  GNU/Linux x86_64 4.4.0-22-generic #40-Ubuntu SMP


Invariance of cross ratio under Möbius transformation and another problem related to cross ratio.

Problem statement:  Given $z_1,z_2,z_3,z_4$ different points of $\overline {\mathbb C}$, we define the cross ratio $(z_1,z_2,z_3,z_4)$ as $(z_1,z_2,z_3,z_4)=\dfrac{z_1-z_2}{z_1-z_4}\dfrac{z_3-z_4}{z_3-z_2}$.  Note that $(z_1,z_2,z_3,z_4)$ is the image of $z_1$ under the Möbius transformation $T$ such that $T(z_2)=0$, $T(z_3)=1$, $T(z_4)=\infty$.  a) Prove that if $T \in \mathcal H$ then $(T(z_1),T(z_2),T(z_3),T(z_4))=(z_1,z_2,z_3,z_4)$.  b) Show that $z_1,z_2,z_3,z_4$ lie in a line or circle if and only if $(z_1,z_2,z_3,z_4) \in \mathbb R$  My attempt at a solution:  For a), using the "hint" they give, if $T \in \mathcal H$, I did the following:  If I call $H=(z,,z_2,z_3,z_4)$, I can consider $H \circ T^{-1} (z)$. Note that $H \circ T^{-1}(T(z_2))=0$, $H \circ T^{-1} (T(z_3))=1$ and $H \circ T^{-1} (T(z_4))=\infty$. This means that $(z_1,z_2,z_3,z_4)=H \circ T^{-1}(T(z_1))=(T(z_1),T(z_2),T(z_3),T(z_4))$.   I don't know if my answer is correct, I would like to check it, and if anyone has a better or different answer, he/she is very welcome to post it.  For b) I am lost, for the forward implication, I've tried to show that $(z_1,z_2,z_3,z_4)=\overline {(z_1,z_2,z_3,z_4)}$ or that $arg((z_1,z_2,z_3,z_4))$ is a multiple of $\pi$ but I couldn't conclude anything. I would appreciate some help with this point.


I've created a view to display items with a certain content type. I'd like to display the terms in an associated taxonomy along with them. Many of these nodes have more than one term selected.  The output currently displays nodes one time for each taxonomy term assigned. How can I adjust this so that it displays each node once with every term associated with it?  Thank you!


It's written in many resources that if we consider only finite sets, that choice axiom can be skipped and be proven from other ZF axioms.  I remember I've read the following explanation. If $A$ is a finite set, there is exists some natural $n, |A|=n$, therefore exists some bijection $f:\{1,\cdots,n\}\to A$. And we can choose an element from $A$ by choosing $f(1)$  But there is a problem with this explanation.  Actually there are $n!$ of such bijections. So how can we choose one $f$ of them without this axiom of choice?!  UPD: actually I can simplify my question heavily.  Let's consider one-point set $A, |A|=1$. How can I get an element from this set without using axiom of choice? We know that $A=\{x\}$ for some $x$. But we don't know how to obtain it. What allows us to just say Let's pick $x$ from $A$?


Integral of sinc function multiplied by Gaussian

I am wondering whether the following integral $$\int_{-\infty}^{\infty}  \frac{\exp( - a x^2 ) \sin( bx )}{x} \,\mathrm{d}x$$ exists in closed form. I would like to use it for numerical calculation and find an efficient way to evaluate it. If analytical form does not exist, I really appreciate any alternative means for evaluating the integral. One method would be numerical quadrature including Gaussian quadrature, but it may be inefficient when the parameters $a$ and $b$ are very different in scale.  EDIT : In view of  discussion, we have decided to add OP's self-answer to the end of the question, for it does not qualify as an answer yet contains vital details. The copying is unabridged. Thanks very much for your comments, and the following result was obtained including the case for $x_0 \ne 0$: $$ \int_{-\infty}^{\infty} dx \exp[-a(x-x_0)^2] \frac{ \sin(bx) }{ x } = \pi \exp(-a x_0^2) \mathrm{Re}\left(\mathrm{erf}\left[\frac{b+2iax_0}{2\sqrt{a}}\right] - \mathrm{erf}\left[\frac{2iax_0}{2\sqrt{a}}\right]\right) $$ where $a\gt0, b, x_0$ are assumed to be all real. (note: coefficients etc may be still wrong...) This integral appears in a type of electronic structure calculation based on a grid representation (sinc-function basis). I believe the above result should be definitely useful. Thanks much!! --jaian


What makes a bread either close or open crumbed/textured?

What causes the texture of bread to be open, ie with lots of large holes, or close, ie a regular, uniform tender crumb with no large holes? How can I achieve either?


What is the expected value of $\min\{|X|,|Y|\}/\max\{|X|,|Y|\}$ assuming $X$ and $Y$ are independent?

So I need to compute $$E\left[\frac{\min\{|X|,|Y|\}}{\max\{|X|,|Y|\}}\right]$$ given $X,Y \sim$ Normal$(0,1)$ and independent.   What I am having trouble seeing is    whether $\min\{|X|,|Y|\}$ and $\max\{|X|,|Y|\}$ are independent. If so I can factor the expectation into $$E\left[\min\{|X|,|Y|\}\right]\cdot E\left[\frac{1}{\max\{|X|,|Y|\}}\right]$$ how I should find the expected value of $1/\max\{|X|,|Y|\}$.


Can I visit the USA twice in a year with an ESTA

I visited my best friend in California this winter. It was the first time I ever visited the USA and I stayed for 70 days. I've been back in my country for a month and a half and I've decided to return to the US a two-week visit, leaving in a few days.   I've booked the tickets but now I'm worried about returning the US so soon. I'm 19 and I have to start college in August. I don't plan on living in the US, just  I just want to have fun with my friends before I'm stuck for 4 years having to study.  I'm scared I'll be denied entry, andd my vacation will be ruined.  I plan on only taking a backpack with me with outfits for a week. I've read it can cause problems to travel with few belongings; I just don't think I need more.  And I plan on having $800 cash with me; will that be enough?


Get columns from resultset of stored procedure

Is their any way to get the specific columns from the result set of stored procedure  eg SELECT COL1,COL2 FROM EXEC SP_NAME


How can I remove the wine folder and all the applications in that folder?  I've tried via synaptic but it keeps showing up in the application menu.


Difference between Kernel classifier and linear classifier

I would just like to know what are the differences between kernel classifier and linear classifier?  In what kind of problems the first is used and in what kind the second?  What could be the advantages of the one over the other?


I recently migrated from Windows7 to Kubuntu 10.0.4. In many ways, I'm loving the change. (I never knew it could be such a seemless process to write/test scripts!)  One of the few things that is causing me any hangup is that none of the passwords that were saved in my browser are available (obviously, since it's a completely separate installation). Is it possible to export my passwords from the Windows instance of Chrome and then import them into the Linux version?


Cuba intercity bus tickets - book in advance vs on spot

Should I book Viazul bus tickets on Viazul.com in advance?   There are not so many departure times - can tickets be sold out if I will come to a bus station and will try to buy a ticket few hours before departure?   Is it possible to reserve a ticket in a station for a route which is between different cities than station?   There is similar question about  but it is more about specific routes and Viazul alternatives - taxi colectivos.


Guest session stopped working on Ubuntu versions later than 16.04

After a recent package update, the guest session feature is no longer available on Ubuntu 16.10 and 17.04. What happened?


Citing articles in a Language I don't understand

I'm writing the thesis for my master degree, some of the very very old articles I have to cite are in a foreign language I don't understand (usually German and French). Most of them have been translated in my native language and/or English, but in some cases I didn't find a translation.  Even if I'm asking it for the thesis I think it does apply in more serious cases of research too.  An example would be for example if I write that the Friedman Lemaitre Robertson Walker metric in general relativity was first derived by Lemaitre in 1922. If I cite his original article in French at this point, would I be doing something wrong since I don't understand French and I can't understand what's written there? This is just an example, I'm pretty sure an English version of Lemaitre article exists, I just didn't check.  I mean I assume that when someone cites an article he' read and understood it.  My opinion is that I shouldn't cite the original article at all but cite someone else who cites it, knowing what was written in the original article.  Am I overthinking it and I should just simply cite these articles or is there a better procedure?  I don't know if it can be relevant but these articles appears mainly in the very beginning of the work, which is just an introduction to the topic of the work


Coming from Windows I have gotten extremely used to the Windows Snap feature, which resizes a window when it's dragged to the screen edges.  However, it's not built into OS X. Are there any 3rd party utilities that add this functionality?


How to reopen the panel that shows when creating objects?

When creating objects a panel shows on the left bottom side, like this.  And sometimes I click other objects or hit Tab going to edit mode then realize I need to tweak some properties on that panel. But it's already gone. Is there any way to bring it back? Thanks in advance.


Is it possible to show a warning when laptop battery gets down to 20% remaining battery life?

I have a Dell laptop running Windows 7. When running on battery power, an alert pops up when the battery goes below 7% remaining battery life. Within 5 minutes of hitting 7% it goes into sleep mode. I understand my battery is having a problem and it does not last for even 1 minute after reaching 7% remaining battery life.  I want Windows to show an alert when it reaches 20% remaining battery life so that I will have enough time to plugin my laptop to AC power.  Can any body please tell me if it is possible to have Windows show a warning when battery reaches 20% battery life remaining?


Proof that a sequence of continuous functions $(f_n)$ cannot converge pointwise to $1_\mathbb{Q}$ on $[0,1]$

As a homework question, we got asked the following:     Construct a function $f:[0,1] \rightarrow \mathbb{R}$ which is not the pointwise limit of any sequence of continuous functions   Thinking about it, a function which is nowhere continuous should be sufficient; thus I decided to try to use the indicator function on the rationals, $1_\mathbb{Q}$. Basically, I was just wondering if my proof was alright or not:  Suppose $(f_n)$ is a sequence of continuous functions converging pointwise to $1_\mathbb{Q}$; thus for any $\epsilon > 0$ we have that for all $x$ we can find a $N$ such that if $n \geq N$ then $| f_n(x) - 1_\mathbb{Q} (x) | < \epsilon$. In particular, we have for some $x_1 \in \mathbb{Q}, x_2 \notin \mathbb{Q}$ a $N_1$ and $ N_2$ respectively such that   if $ n \geq N_1$ then $ | f_n(x_1) - 1 | < \epsilon$ if $ n \geq N_2$ then $ | f_n(x_2) | < \epsilon$   Now, as $f_k$ is continuous, for any $\epsilon > 0$ we have that for all $x$ there exists a $\delta > 0$ such that if $ | x- y | < \delta$ then $|f_k(x) - f_k(y) | < \epsilon $. However, if we pick an arbitrary $x \in \mathbb{Q}$, for $n \geq \max\{N_1, N_2\}$, for any $\delta > 0$ we can pick a $ y \notin \mathbb{Q}$ such that $| x- y| < \delta$ yet $ | f_n(x) - f_n(y) - 1|  < 2\epsilon$ (by the triangle inequality and using the pointwise convergence properties); so if we choose $\epsilon = 1/10$, say, then we have by continuity that $|f_n(x) - f_n(y)| < 1/10$, yet $| f_n(x) - f_n(y) - 1|  < 1/5$, which (I believe) is absurd, so we have a contradiction.  I'm a bit iffy about whether this is alright or not (I feel I may be subtly abusing the definitions here), so any feedback would be much appreciated.


how det(A)=0 implies that the solution isn't unique?

Solution of matrix equation Ax=b, where $$ A=\left(\begin{matrix} a_1&a_2&\dots&a_n \end{matrix}\right), \ a_i \in \mathbb{R}^n,$$ is not unique, if vectors $$ a_1, \ a_2, \dots, \ a_n $$ are linearly dependent. Then by properties of determinant, $$ \det A=0. $$ However, does it always follow, that if det A = 0, column vectors of A are linearly dependent? Can someone present a proof?


Putting together regex to highlight words inside a textbox

Hey all I am trying to have a simple way of adding multiple item names to a regex list:  var whatToLookFor = "DOZ,DOB".split(","); var highlightThis = "";  $.each(whatToLookFor,function(i){    highlightThis += whatToLookFor[i] + "\/|"; });  highlightThis = "\/" + highlightThis.replace(/.$/,"\/gi");  console.log(highlightThis);  /DOZ\/|DOB\//gi <-highlightThis should look like this  $('.string-example').highlightWithinTextarea({     highlight: highlightThis });   However, I am not getting the same values shown on the page using highlightThis as I do when using the /DOZ/|DOB//gi. I output the value of highlightThis and it looks just like it should but still does not work for some reason.  $('.string-example').highlightWithinTextarea({     highlight: /DOZ\/|DOB\//gi });   What could I be missing in order for it to treat it like a regex value? It's probably something simple that I am just overlooking. :o)  The code I am using is   final working code  var whatToLookFor = "DOZ,DOB".split(","); var highlightThis = "";  $.each(whatToLookFor,function(i){     highlightThis += whatToLookFor[i] + "/|"; });  highlightThis = highlightThis.replace(/.$/,"");  $('.string-example').highlightWithinTextarea({     highlight: new RegExp(highlightThis, 'gi') });


Command to remove blank lines in dump file


Show that $f_{n}(x)=\left(1+\frac{2x}{n}\right)^n$ is increasing when n goes to infinity

Show that $f_{n}(x)$ is monotonically increasing on $(0, \infty)$ where, $$f_{n}(x)=\left(1+\frac{2x}{n}\right)^n$$ I considered the difference of consecutive terms, that is $$\left(1+\frac{2x}{n+1}\right)^\left(n+1\right)-\left(1+\frac{2x}{n}\right)^n$$ For any x in $(0,\infty)$ My goal is to show this portion is positive. What about induction method?I'm kind of stuck in here.


How to tell whether two graphs are isomorphic?

Suppose that we are given two graphs on a relatively small number of vertices. Here's an example:    Are these two graphs isomorphic? (That is: is there a bijection $f$ from $\{A,B,\dots,I\}$, the vertex set of the first graph, to $\{1,2,\dots,9\}$, the vertex set of the second graph, such that $vw$ is an edge of the first graph if and only if $f(v)f(w)$ is an edge of the second graph?)   If not, how can we tell? If so, how can we tell—and how can we find an isomorphism?     This question comes up a lot, usually asking about specific examples of two graphs which may or may not be isomorphic. Sometimes, the fiendish teacher of graph theory will even give three or more graphs and ask "Which of these are isomorphic?"  I'm asking this question so that we can provide  to questions of this type which would be worth linking to when specific instances of this question come up. So all improvements and/or suggestions are welcome!


java.lang.NullPointerException on making my app

the app crashes and dont even open and give the error java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.Window$Callback android.view.Window.getCallback()' on a null object reference  package com.example.andriod.hostelapp;  import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.widget.EditText; import android.widget.Toast;  public class MainActivity extends AppCompatActivity {      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);         }       EditText userId = (EditText) findViewById(R.id.user_name);     EditText userPassword = (EditText) findViewById(R.id.password);      public void login()     {         if (userId.getText().toString().equals("ritwik7101") &&              userPassword.getText().toString().equals("ritwik123"))          {         }         else{             Toast.makeText(this, "INCORRECT USERNAME OR PASSWORD!",                     Toast.LENGTH_LONG).show();        }     } }


What's the difference between a bijection and an isomorphism?

I don't understand what the difference is between a bijection and an isomorphism.  They seem to both just be a invertible mapping.  Is the set of all bijections a subset of isomorphisms?  Or vice versa?  What is the difference and can you show me an example of one that is not the other?  Thanks.


I want to burn Ubuntu Minimal CD ISO to an old, 1 GB USB thumbdrive. Regular ISO doesn't fit. I already tried Startup Disk Creator and Unetbootin but both failed. I tried installing GRUB and pointing it to boot like this:  insmod part_msdos linux /linux initrd /initrd.gz   but it doesn't work. I also tried dd but I ended up with not bootable drive.  Rufus worked on Windows with the same thumbdrive but I no longer use Windows.  What else can I do?


I'm trying to create a class Places that creates and menaged the autocomplete fragment. If I create the PlaceSelectionListener in the MainActivity it works, but if I create it in the class the app crash. Where am I doing wrong?  Here the code:  activity_main.xml  <fragment         android:id="@+id/autocomplete_fragment"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:name="com.google.android.gms.location.places.ui.PlaceAutocompleteFragment"     />   MainActivity.java (create the Places object)  Places places = new Places(this);   Places.java  public class Places extends AppCompatActivity{      public Places( Context context ) {      // Retrieve the PlaceAutocompleteFragment.     PlaceAutocompleteFragment autocompleteFragment = (PlaceAutocompleteFragment)             getFragmentManager().findFragmentById(R.id.autocomplete_fragment);      // Register a listener to receive callbacks when a place has been selected or an error has     // occurred.     autocompleteFragment.setOnPlaceSelectedListener(new PlaceSelectionListener() {         @Override         public void onPlaceSelected( Place place ) {             Log.e("-----", place.toString());         }          @Override         public void onError( Status status ) {             Log.e("-----", status.toString());         }     }); }}   Error:  06-06 10:05:58.360 20562-20562/com.example.aleclock.streetcamera E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.aleclock.streetcamera, PID: 20562 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.aleclock.streetcamera/com.example.aleclock.streetcamera.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.location.places.ui.PlaceAutocompleteFragment.setOnPlaceSelectedListener(com.google.android.gms.location.places.ui.PlaceSelectionListener)' on a null object reference     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)     at android.app.ActivityThread.-wrap12(ActivityThread.java)     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)     at android.os.Handler.dispatchMessage(Handler.java:102)     at android.os.Looper.loop(Looper.java:154)     at android.app.ActivityThread.main(ActivityThread.java:6077)     at java.lang.reflect.Method.invoke(Native Method)     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)  Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.location.places.ui.PlaceAutocompleteFragment.setOnPlaceSelectedListener(com.google.android.gms.location.places.ui.PlaceSelectionListener)' on a null object reference     at com.example.aleclock.streetcamera.classes.Places.<init>(Places.java:35)     at com.example.aleclock.streetcamera.MainActivity.onCreate(MainActivity.java:53)     at android.app.Activity.performCreate(Activity.java:6662)     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599)     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)      at android.app.ActivityThread.-wrap12(ActivityThread.java)      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)      at android.os.Handler.dispatchMessage(Handler.java:102)      at android.os.Looper.loop(Looper.java:154)      at android.app.ActivityThread.main(ActivityThread.java:6077)      at java.lang.reflect.Method.invoke(Native Method)      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)


Why didn't the Emperor realize that torturing Luke to death in front of Vader might be a bad idea?

I know he's supposed to be an evil super-genius, but the Emperor seems to lack common sense here.  He sensed that Vader's feelings about Luke weren't clear pretty early on, and while he was using Force lightning on Luke, Vader was doing the exaggerated "Look at Luke, now look at the Emperor.  Look at Luke, now look at the Emperor" thing for a good 15 seconds or so.  Granted, the Emperor had little peripheral vision with his hood on, but Vader can't turn his head without also turning his torso to some extent, and someone with the Force should be able to tell when someone in the room is moving.    EDIT:  I just found out that the 2011 Blu-Ray edition has  while the Emperor is using his Force Lightning on Luke.  This makes the Emperor's obliviousness even harder to explain.  Why does it seem like it never occurred to him that Vader might react badly to seeing his son being brutally tortured to death in front of him?  Why have Vader stick around to see that?


I'm looking at the following code snippet:  my @ret = <someMethod> return (undef) if( $DB_ERROR ); return (undef) unless ($#ret >= 0);   Does $# just give you a count of elements in a array?


How to Truncate the Decimal Places without Rounding Up?

Assume i have the following decimal value:  4.584406  I need a simple quick way to truncate the decimal without rounding up, so the output would be 4.5  I'm using T-SQL (SQL Server 2005/2008).  Any help will be appreciated.


I've read a lot of threads about gksu being removed from many Linux flavours, including Ubuntu 18.04.  Many state that gksu is an abomination and no user should ever need to use anything like it.  I have 2 examples where, as far as I know, I must have something that allows me to run as root (not just for editing files).    First, I have a need to start mysql only after an encrypted folder is opened on (GUI) command.  This means having a script run by the encryption system that starts the mysql service.  That has to be done as root, so I use gksu in that startup script which asks me for a password.  How else can I start a service from a GUI system?  I also run Ubuntu system backups as root, otherwise many system files can't be backed up.  So the desktop file uses gksu to start the backup.  pkexec looks complicated, needing policy files.  Is that the only alternative, and if so, why is it any safer?  Other answers to similar questions don't seem to address individual issues that people have now that gksu is no more (or harder to find...).  I think such questions from non-expert users would benefit from more detailed answers.  I now have some, and so would like to answer my own question.


How can you decompose Grover's diffusion operator into gates?

I know how Grover's diffusion operator works ($U_s = 2|s\rangle\langle s|-I$) with the inversion around the mean. However, I want to implement it in simpler gates, to use the algorithm. How can I do this ?


I have a project where I receive a cost of a product and the amount paid. I need to derive the smallest amount of coins that will make the change. I use double variables for the price and the paid amount, as well as the change: double change = double paidAmount-double cost; My problem is that for 1 - 0.66 I receive 0.33999998 instead of 0.34 What type of variables should I use to get exactly two digit after the floating point result? Please not that I must not use BigNumber


Will undeleting my question cause it to appear in "newest questions"?

I posted a question on  a few days back on a weekend and it has received no responses/views.  Can I delete that question and undelete it again to make it appear in the "Newest Questions" feed?  Will undeleting a question make it appear in the newest questions feed?


To find the minimum of $\int_0^1 (f''(x))^2dx$

I was trying to solve a question of an entrance exam. I am completely stuck in the problem. I am not able to find idea how to proceed. Please help me.     Let $A$ be the set of twice continuously differentiable functions on the interval $[0, 1]$ and let $B = \{f \in A : f(0) = f(1) = 0, f'(0) = 2\}$. Find the value of $$\text{min}_{f\in B} \displaystyle \int_0^1 (f''(x))^2dx.$$    I am really sorry for not showing some effort from my side but I can not find ant way to proceed.  Please help me. Thnx in advance.


How to prove that a square matrix's determinant is zero given its row and column properties?

How can I prove the following?   If $A$ is an $n \times n$ matrix such that $$ \sum\limits_{j=1}^n a_{ij} = 0 $$ for $1 \leq i \leq n$ then $\det A = 0$.


In the new StackExchange popup menu, what is the number to the left of hot questions?

To the left side of questions listed under Hot questions, I see a number.      What is that number? I would think it is the number of users who seen the question, but it's not the same number I see in the Q&A site.


I would like to prevent the text wrap in OSX Terminal, by letting text to continue under the border. I could not find it in Preferences of the terminal.   How can you prevent text wrap in OSX Terminal?


Electrostatic force between 2 shells. How to calculate it?

I`ve been looking for this for some time now: I have two thin shells (S1 and S2) of radii R1 and R2, charged negatively C1 and C2 respectively, separated in space by a distance D. What is the force exerted by S1 on S2? (For my purposes, the charge can remain constantly distributed on the shell. Non-conductor, I'm guessing.)  What do I have to read to learn this? I know Coulomb's equation (F=kQ1Q2/d^2).  (If relevant, I need this to emulate repulsion in a very crude ion simulation, where the attraction is emulated by considering the ions point charges. Considering the electron shells as points would be great, but obviously doesn't work... that's when the sphere approximation should do the trick.) Thank you in advance.


JavaScript Function within a function undefined

Can someone explain to me why the second function within the first function is undefined?  var a = 1  function abc () {      alert(a);          function xyz () {              alert(a);          }  }


When is the automorphism group of the Cayley graph of $G$ just $G$?

Let $G$ be a finite group and $S$ a generating set of $G$. We can draw the Cayley graph $C(G,S)$ by putting each element of $G$ as a vertex, and drawing an edge between two elements $g$, $h\in G$ iff $g^{-1} h \in S$.   Choose $x\in G$. Note that the map $g \mapsto xg$ is a graph automorphism of $C(G,S)$. This allows us to embed $G \le \text{Aut}(C(G,S))$.   My question is: when is it in fact the case that $G = \text{Aut}(C(G,S))$? Is there a nice criterion to determine this?


How to access adjacent rows with cursor?

In the attached screenshot, the attributes contain two field of interest "a" and "b".  I want to write a script to access the adjacent rows in order to make some calculations.  To access a single row, I would use the following UpdateCursor:  fc = r'C:\path\to\fc'  with arcpy.da.UpdateCursor(fc, ["a", "b"]) as cursor:      for row in cursor:           # Do something   For example, with OBJECTID 4, I am interested in calculating the sum of the row values in field "a" adjacent to OBJECTID 4 row (i.e. 1 + 3) and adding that value to the OBJECTID 4 row in the "b" field.  How can I access adjacent rows with the cursor to make these sort of calculations?


A maximal ideal is always a prime ideal?

A maximal ideal  is always a prime ideal, and the quotient ring  is always a field. In general, not all prime ideals are maximal.      In $2\mathbb{Z}$, $4 \mathbb{Z} $ is a maximal ideal. Nevertheless it is not prime because $2 \cdot 2 \in 4\mathbb{Z}$ but $2 \notin 4\mathbb{Z}$. What is that is misunderstand?


Unable to merge free unallocated space with ubuntu partition

This is the disk image. I have to merge unallocated partition of 200 GB with Ubuntu partition right next to it as I have to increase my Ubuntu size:    On right-click on dev/sda7 partition, free space preceding is greyed out:    How do I do that?  If I do the merge, will I lose my data on Ubuntu or windows?


Notation for two variables with same dimensions

What symbol represents "has the dimensions of", as in "x has the dimensions of d"? Does such a symbol exist?


In most dictionaries "labeled" or "labelled" isn't recognized as an adjective but there are a few who do deem it to be an adjective.  Is this correct? Or is "labeled" merely the past tense of "label"?  Any input is as always greatly appreciated!


Is Ubuntu OS 18.04.4 LTS is free (open source) version for use?

I can see on Ubuntu website that its an open-source software, free to use. Though i would like to know if all Ubuntu OS versions are free to use ? Example 18.04.4 LTS ? What does LTS actually mean in it ? Thankyou


when I copy code from this tutorial , everythink works correctly. But when I change the model from example to my, which I made in Blender, it writes error java.lang.NullPointerException. It is because of:  control.addListener(this);   And it is because "control" is null. And it is because previous instruction:   control = player.getControl(AnimControl.class);    gives null to variable "control".  So what is the solution? When I try example code from tutorial, it works correctly, but when I replace the model name(path), it doesn't works. (Path of model is correct, because when I only display my model, it load the model correctly).


How does Stack Overflow generate revenue?


Filling an array with random numbers in a for-loop

I am trying to write a program in Java that asks the user how many random numbers to generate (0-999) Then the program is supposed to fill an array up with the random numbers and present them to the user.  This is what I got so far:  import java.util.*;  public class random2 { public static void main ( String[] args ) {     Random random;     int i;     int[] numbers;     int numberOfNumbers=0;     int upperRange=999;     int lowerRange=0;     int randomNumber=0;      Scanner in = new Scanner(System.in);      System.out.println("How many random numbers between 0-999?");     numberOfNumbers=in.nextInt();     numbers = new int [numberOfNumbers];       random = new Random();      for (i = 0; i < numberOfNumbers; i++){      randomNumber = random.nextInt(upperRange-lowerRange) + lowerRange;     numbers[i] = randomNumber;      if (i==numberOfNumbers)       System.out.println(randomNumber);       }           }  }   But the program won't present the list of the random numbers. It just exits. What did I do wrong?


Implementing an LRU cache with built in data structures

I want to implement a simple LRU cache in Java using only Java's built in data structures.   The idea is to use a Map and a doubly linked list (DLL).  So for Map I'm using HashMap. The problem I'm facing now is that I want that an item in the HashMap will point to the corresponding item in the DLL, but I don't have an access to the internal nodes of the LinkedList.  What could be a reasonable solution without creating my own new data structure?


I have a WordPress installation that is not redirecting URLs not starting with www.  Example: http://example.com/dir/ doesn't send to http://www.example.com/dir/ instead goes to http://example.com/.  How do I change the .htaccess below to always redirect to the page either using www or not?  # BEGIN WordPress RewriteEngine On  RewriteBase / RewriteRule ^index\.php$ - [L]  # uploaded files RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]  # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]  RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] RewriteRule . index.php [L]  # END WordPress


How to extract a word that occurs between two keywords on a line?

Suppose I have a code mentioned below. module dut#(parameter type tp =int, tp x = 12 ) (int r , reg [7:0] rg); endmodule  module mid (int r, reg [7:0] rg); endmodule  module bin (int z, logix s); endmodule  module med; endmodule   I want to extract the words dut, mid, bin and med, characterized by being the words after the keyword module and before the symbol #, ( or ;, whichever comes first. I want to accomplish this using only a csh script. Which regex can be used for that purpose?


There are more people that have done ... or who have done?

I know that that is used for things and who for people, but in some cases, I can't really explain why, but I'm hesitating between:     There are 4 more people that have watched the film #2 than people that have watched the film #3.   or     There are 4 more people who have watched the film #2 than people who have watched the film #3.   or   another way to say it?


Is the notorious $n^2 + n + 41$ prime generator the last of its type?

The polynomial $n^2+n+41$ famously takes prime values for all $0\le n\lt 40$. I have read that this is closely related to the fact that 163 is a Heegner number, although I don't understand the argument, except that the discriminant of $n^2+n+41$ is $-163$. The next smaller Heegner number is 67, and indeed $n^2+n+17$ shows the same behavior, taking prime values for $0\le n\lt 16$.    But 163 is the largest Heegner number, which suggests that this is the last such coincidence, and that there might not be any $k>41$ such that $n^2+n+k$ takes on an unbroken sequence of prime values.  Is this indeed the case?  If not, why not?  Secondarily, is there a $k>41$, perhaps extremely large, such that $n^2+n+k$ takes on prime values for $0<n<j$ for some $j>39$?


When should one use the comma versus the semicolon, and vice versa?

I cannot understand the difference between the comma and semicolon. Can you please clarify?


After upgrading from 17.04 to 18.04 I found bootup to be a little slow. After running systemd-analyze blame I get the following output       38.090s snapd.seeded.service      36.432s snapd.service       6.485s NetworkManager-wait-online.service       2.462s keyboard-setup.service       1.784s vmware.service       1.614s apt-daily.service       1.572s ufw.service       1.536s apt-daily-upgrade.service       1.203s dev-sda1.device        482ms upower.service        461ms systemd-journal-flush.service        443ms networkd-dispatcher.service        423ms NetworkManager.service        399ms systemd-logind.service        349ms vmware-USBArbitrator.service        318ms swapfile.swap        308ms dnsmasq.service        305ms udisks2.service        290ms systemd-rfkill.service        280ms systemd-udev-trigger.service        249ms ModemManager.service        237ms systemd-resolved.service        232ms systemd-timesyncd.service   What can I do to reduce the bootup time, specifically these snapped services?


Phase plots of solutions for repeated eigenvalues

I have a question with respect to phase plots of repeated eigenvalue cases. For instance suppose that one is given a matrix with the following:   $$\overrightarrow{y'} = \begin{pmatrix} 3 & -4 \\ 1 & -1  \end{pmatrix} \overrightarrow{y}$$  whereby the solution yields:   $$\overrightarrow{y} = c_1e^t\binom{2}1 + c_2(te^t\binom{2}1 + e^t\binom{1}0)$$  I understand that it is asymptotically unstable but what I am unclear is the direction and whether one should plot it according to the following two figures      How does one distinguish which way the curves come out of the origin from just from analyzing the system ? I am aware that the plot should actually be the 2nd picture but I am not sure why so some help with respect to this technique would be appreciated.


I am trying to learn c programming and I came across this problem which I dont seem to understand. Here is the syntax double x;    int flag = 0;   for(x = 0; x <= 2.0; x+=0.1) {       printf("%f\n",x);       printf("%d\n", x==0.300000);       if(x==0.3) {          printf("yes\n");          flag = 1;       }   }   if(flag == 0) {       printf("no\n");   }   how come the output is no. I though when the loop reaches 0.3, the flag would be set to one and yes would be printed. How come that is not the case?


I am using the Time Manager plugin in QGIS and the data points from the CSV shapefile with animation to display the data points for a month at a time, is there a way that I can have the data points remain on the map and not disappear - So it's like the data points are building into a sort of heat map   Instead of showing the (month) data points and then disappearing and the showing the next (month) of data points and so on


I understand that when we are doing PCA, we are choosing an axis where the data has the maximum amount of variance. Then, we are restricted to choosing only axes which are orthogonal to the first axis we chose.  That means that if we want to maximize some kind of average or sum of the variances of all axes that we chose, we may not get to an optimal solution with PCA, right?  From what I understand, PCA chooses the axis with most amount of variance at each step. So does that make it greedy?


construction of a sequence of smooth function

Consider $r>0$ , $1<p< \infty $. Consider $K $ a compact set in $R^n$ with $K \subset B(x_0 , r)$.  Define  $$ B = \{ u \in C^{\infty}_{0}(B(x_0 , r)) ; u=1 \ on \ K ,  0 \leq u \leq 1\}$$  $$ A= \{ u \in C^{\infty}_{0}(B(x_0 , r)) ; u=1  \ \textit{in a open neighborhood of K } \}$$  A natural question is :  given $u \in  B$ , exists a sequence $v_n \subset A$ with $v_n \rightarrow u$ in $H^{1,p}( B(x_0 , r))$ ?  I tried to prove this fact , but nothing...  I draw a picture and I belive the result is true. Someone can give me a help ?If i prove the affirmation , then I understand a theorem in the book that i am studying.  thanks in advance =)


Is it better to keep a laptop or smartphone battery always at 100% or to let it discharging before recharging?

Is it better to keep a laptop or smartphone battery always at 100% or to let it discharging before recharging ?


How can I send keyboard input messages to either the currently selected window or the previously selected window?   I have a program which I use to type some characters which are not present on my keyboard and I would like it if I could just send the input directly rather than me having to copy and paste all the time.  EDIT:  The application of this is typing the German Umlauts. I'm an American and I work in Germany. I'm working on an American keyboard and from time to time I have to type in the umlauts / the euro symbol / the sharp S. Currently I have a simple WinForms application with a textfield and some buttons with the extra characters on it. I type into the textfield and I can press the buttons to append text to the textfield. I then copy the text and paste it where ever. What would be nice though if I could just just hit one of the buttons and it would send the text where ever I'm typing / was typing. The current program works fairly well but I could make it better.


Understanding the Definition of $\int_\gamma f\ \overline{dz}$

Definitionally, we have that  $$ \int_\gamma f\ \overline{dz} = \overline{\int_\gamma \overline{f}\ dz} $$  Now let $\int_\gamma f\ dz = w = x +yi$.  Question 1: Is it not the case that $\int_\gamma \overline{f}\ dz = \bar{w} = x - iy$?  Question 2:  Assuming that $\int_\gamma \overline{f}\ dz = \bar{w} = x - iy$, then is it not the case that  $$ \overline{\int_\gamma \overline{f}\ dz} = \overline{x - iy} = x+iy = \int_\gamma f\ dz? $$  Basically, I'm failing to see how $\overline{\int_\gamma \overline{f}\ dz}$ isn't just $\int_\gamma f\ dz$.


Is gravitational constant a rational number?

The question is the title. But I'm quite doubtful if this question is meaningful or not. Since this constant is obtained by experiment, we can  never know its exact value, unlike $π$ or $e$. Is it correct?


How to keep program running after SSH disconnection?

Possible Duplicates:             Hi!  I want to run program from my notebook by SSH-connection to remote server. The problem is I am going home with my notebook :)  How to keep program running?


Hi all I am new to ubuntu using ver 10.10 anyone tell me how to install the photoshop using terminal.  I tried googling all result yields to install wine   So I open the ubuntu software center and type wine but its display untrusted service package(While Installation).


How can I find the product key of Office 2011 after restoring from backup?

I had to restore my iMac from a Time Machine backup.  Everything seemed fine until I tried to start Office 2011 and it is asking me to re-enter my product key. I am trying to locate my key (I believe I downloaded this version originally and it should be in my email but I can't find it)  I tried a program that is supposed to "find the keys for products installed on your computer" (Mac Product Key Finder) and it found my very old Office 2008 key, but not 2011.  I am surprised that if I had a totally working install before recovering from back-up that this wasn't restored as well - do I have any options to find it hiding somewhere on my drive?  Note: The recovery was after a hard drive was replaced by the Apple store - if that makes a difference, so this is a new internal drive.