I want to deserialize data out of a LM98640 which data rate is configurable from 40 Mbps to 640 Mbps, i will use an FPGA of series 7. But looking at the datasheets i don't know which frequency parameter to look for to choose the right FPGA. Frequency of BUFG? or the PLL? MMCM?

I am trying deserialize data that come out of a LM98640 into 14 bits words:  Attached you can find a figure of the signals out of the LM98640.  (Figure 24 page 31)  I need to deserialize the signals TXOUT1 and TXOUT2:  A differential clock (TXCLK) is also output with transitions aligned with the center of the data eye. Data rates range from 80Mbps up to 640 Mbps.  (TXOUT1 and TXOUT2 changes as fast as a 640 MHz clock)  What kind of FPGA should i use to work at these rates?  Can i use flip flops to capture the data and a 14 bit wide shift register to pack this into words of 14 bits wide?  Or is it more complex at these rates? Am i going to face metastability problems since i assume a will be facing crossing time domains between the clock sampling the DATA out of the LM98640 and the clock of the FPGA.  The data deserialized is going to be provided to a NI DAQ or stored in a RAM.  What kind of xilinx FPGA should i use?  Thank you for your help


Objective  To confirm if the understanding is correct regarding the reason why Lagrangian Dual is used in SVM.  Background  While Machine Learning, gradient descent is used at regression, logistic regression, back propagation, etc. However for SVM, suddenly Lagrangian Dual pops up. Trying to understand why.    It looks to me gradient descent is possible to solve "primary" issue of SVM as in the left side of the image below (please correct if it is wrong). However never saw any articles or books which mention using gradient descent. Instead, always Lagrangian Dual and KKT conditions pop up out of blue and do not explain well why.    Question  I suppose using the dual reduces the dimensions , e.g (x1, x2) to λ in the image, and results in a formula that produces definite solutions.    Is it the only reason to use Lagrangian Dual, or are there any other reasons?     Is there any reason why Gradient Descent cannot be used?

Given the data points $x_1, \ldots, x_n \in \mathbb{R}^d$ and labels $y_1, \ldots, y_n \in \left \{-1, 1 \right\}$, the hard margin SVM primal problem is  $$ \text{minimize}_{w, w_0} \quad \frac{1}{2} w^T w $$ $$ \text{s.t.} \quad  \forall i: y_i (w^T x_i + w_0) \ge 1$$  which is a quadratic program with $d+1$ variables to be optimized for and $i$ constraints. The dual  $$ \text{maximize}_{\alpha} \quad \sum_{i=1}^{n}{\alpha_i} - \frac{1}{2}\sum_{i=1}^{n}{\sum_{j=1}^{n}{y_i y_j \alpha_i \alpha_j x_i^T x_j}}$$ $$ \text{s.t.} \quad \forall i: \alpha_i \ge 0 \land \sum_{i=1}^{n}{y_i \alpha_i} = 0$$ is a quadratic program with $n + 1$ variables to be optimized for and $n$ inequality and $n$ equality constraints.  When implementing a hard margin SVM, why would I solve the dual problem instead of the primal problem? The primal problem looks more 'intuitive' to me, and I don't need to concern myself with the duality gap, the Kuhn-Tucker condition etc.  It would make sense to me to solve the dual problem if $d \gg n$, but I suspect there are better reasons. Is this the case?


Can someone give me an example of an operator $T:X \rightarrow Y$ such that, $\\$ $$||T|| \ne max_{||x|| \leq 1} ||Tx||_{y}$$

What is a bounded operator on a Hilbert space that does not attain its norm? An example in $L^2$ or $l^2$ would be preferred.  All of the simple examples I have looked at (the identity operator, the shift operator) attain their respective norms.


i am getting an error when i try to move to this activity in my app the app crashes giving the following error. is this the problem with this activity or i am not making the subclass properly.  Process: , PID: 14746                                                                                java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.audiotest/com.example.audiotest.medical_record}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.os.Bundle.getString(java.lang.String)' on a null object reference  public class medical_record extends Npatient implements AdapterView.OnItemSelectedListener {  private DatabaseReference mDatabase; Spinner HyperTension; private String selectht; ArrayAdapter adapter;  private Button bHistory;  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     Bundle bundle =getIntent().getExtras();      final String firebasechild=bundle.getString("child");     mDatabase = FirebaseDatabase.getInstance().getReference();      HyperTension = (Spinner) findViewById(R.id.shypertension);     bHistory = (Button) findViewById(R.id.bHistory);      adapter =ArrayAdapter.createFromResource(this,R.array.History, android.R.layout.simple_spinner_item);     adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);     HyperTension.setAdapter(adapter);     HyperTension.setOnItemSelectedListener(medical_record.this);      bHistory.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View v) {               history hypertension = new history(selectht);             mDatabase.child(firebasechild).push().setValue(hypertension);              finish();         }     });    }  @Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {     TextView SpinnerDialogText = (TextView) view;     selectht = SpinnerDialogText.getText().toString();     Toast.makeText(this, "you selected " + SpinnerDialogText.getText(), Toast.LENGTH_SHORT  ).show();  }  @Override public void onNothingSelected(AdapterView<?> parent) {  }   }

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


I, as a student, come across a lot a questions on the network while studying and I print them so that I can refer to the question when I revise my topics for finals or any other paper but the printouts are generally very bad.    The text takes up very little space left aligned which wastes quite a bit of paper as per my very scientific investigation only 15.8% of the paper is taken up by text  Pictures get resized and are not readable at all       Mathjax is sized perfectly for some reason

So I have to print some Stack Overflow pages and bring them around. Just accept it.  Problem: while pages may look perfectly normal on the web, something recently broke the print layout... a huge whitespace block showed up on the right (, ). Tons of whitespace. This is on every site on the network () on a bunch of different screens ().  Futzing with DevTools, the problem seems to be :   #mainbar, .mainbar {     width: calc(100% - 300px - 24px); }   Can someone check if this is the only issue and possibly fix this?


Let $T: V \rightarrow W $ be an injective linear transformation, where $V, W$ are vector spaces of dimension $n$ over the field $\mathbb{K}$. If $\{ e_1, ..., e_n\}$ is a basis for $V$, show that $\{T(e_1), ..., T(e_n)\}$ is a basis for $W$.  What I'm thinking is the solution:  Since $T$ is an injective function, that means no two $v \in V$ will map to the same $w \in W$. Hence, each $ t \in \{T(e_1), ..., T(e_n)\}$ is distinct to each other. As $V$ is linearly independent, then all $t$ are linearly independent to each other as well, which forms the basis of $W$.

Let $T : V → W $ be an injective linear transformation, where $V, W$ are vector spaces of dimension $n$ over the field $K$. If $\{e_1,\ldots , e_n\}$ is a basis for $V$ , show that $\{T(e_1),\ldots , T(e_n)\}$ is a basis for $W$.


The sizes of one icon for a StackExchange site (English Language Learners) is bigger than another (LEGO).  Should this be the same size in the iOS app?

As seen below, the Puzzling icon is very big compared to other sites' icons.   Is this intended or is it just abnormally large? Or am I just crazy?


I installed Ubuntu 16.04.02 server with full disk encryption, but also enabled home directory encryption which is now interfering with some other system functions. How can I disable home directory encryption system-wide without affecting whole disk encryption? I see instructions online for disabling home directory encryption, but they all end with uninstalling ecryptfs-utils & libecryptfs0 modules, and I don't know how that will impact whole disk encryption.

I have a new Ubuntu 10.04 installation with encrypted home directory (using the built-in encryption offered by Ubuntu installer).   What's the easiest way to stop using encryption? (I.e., to decrypt my home directory permanently.)   (It's giving me problems with kernel updates, and I'd just like to cut down on all the hassle I'm having with this installation.)


I am a bit perplexed when i saw a piece of code and trying to understand why calling it anonymous keeps the value of total and not otherwise.  var adder = function (total) { // the following function is returned  // and assigned to adder      var inner_function = function (summand) {         total += summand;         alert(total);     }      return inner_function;  }(0) // <- we call the annonymous function  //    and assign the returned function to adder adder(2); // -> 2 adder(3); // -> 5   What I don't understand is if i don't invoke anonymous function, it doesn't keep the value of total. why? without (0) if i am calling adder(2) shouldn't it behave like the first call where it keeps the value of total and then assign internal_function to variable adder?  It says in the blog that  "And when you call adder, that is the inner_function, it has access to total due to Lexical Scoping, even though the function that had the total. total itself was declared in the scope of a function that has returned a long time ago."   just trying to understand how anonymous works in this case

How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?  I have seen  given on Wikipedia, but unfortunately it did not help.


In the $XY-$ plane consider the family $\mathcal{P}$ of inverted parabolas that pass through the origin such that the tangent vector at the origin has equal norm (say $\lambda>0$) for all of them. One of such representation can be $$\mathcal{P}=\{p(t)=(x(t),y(t)):x(t)=\lambda\cos(\alpha)t,y(t)=\lambda\sin(\alpha)t-at^2,\alpha\in[0,\pi],a>0\}$$ Find the curve that is tangent to all of the parabolas in $\mathcal{P}$.

For a given launch velocity $v$ and launch angle $\theta$, the trajectory of a projectile may be described by the standard formula   $$y=x\tan\theta-\frac {gx^2}{2v^2}\sec^2\theta$$      For different values of $\theta$ what is the envelope of the different trajectories? Is it a parabola itself?   The standard solution to this "envelope of safety" problem is to state the formula as a quadratic in $\tan\theta$ and set the discriminant to zero. The resulting relationship between $x,y$ is the envelope.   This question is posted to see if there are other approaches to the solution.    Edit 1  Thanks for the nice solutions from Jack and Blue, received so far. From the solution of the envelope it can be worked out that the envelope itself corresponds to the right half of the trajectory of a projectile launched at $(-\frac{v^2}{g^2},0)$ at a launch angle $\alpha=\frac{\pi}4$ and a launch velocity $V=v\sqrt2$. This means that both vertical and horizontal components of the launch velociy are equal to $v$. It would be interesting to see if these conclusions can be inferred from the problem itself by inspection and without first solving it. If so, then this would form another solution.    See also this  posted subsequently.


Show that for all prime numbers $p$ greater than $3$, $24$ divides $p^2-1$ evenly.  Since $(p+1)(p-1) = p^2-1$ we have that $\frac{(p+1)(p-1)}{24}=k$, where $k \in \Bbb Z.$ Now since $24 = 2^3 \cdot 3$ and the numerator contains always at least one even factor(?) we have that $24=2^3\cdot3\vert(p+1)(p-1).$ Is my reasoning here correct or am I missing something here?

Let $p>3$ be a prime. Prove that $24 \mid p^2-1$.   I know this is very basic and old hat to many, but I love this question and I am interested in seeing whether there are any proofs beyond the two I already know.


Prove that the following function is $C^\infty$ (and in the point $ξ=0$) :  $$f:\Bbb R\to\Bbb C:\xi\mapsto {e^{i\cdot\xi\cdot λ}-1\over i\cdot\xi}-λ$$  for whichever $$λ>0$$ I am trying to find a proof for this elementary problem that has been asked in a mathematical competition in France in 2004.Maybe can we find a proof?

Prove that the following function is $C^\infty$ in the point $\xi=0$:   $$f:\Bbb R\to\Bbb C:\xi\mapsto {e^{i\cdot\xi\cdot λ}-1\over i\cdot\xi}-λ$$   Any ideas how to prove this?  I am trying to think some ideas but I cannot find any way to prove it.


I have a friend that wants to come and spend some time with me in the U.S. from Russia. She has told me that in order to get her visa approved she has to show that she financial means while here with me. The amount is 1800$ that she is supposed to show the Travel agent and if she can't show that amount she will be denied for out of country travel for the period of 5 years. How much is fact or is all fiction?

I met a girl from Russia and she wants to see Denmark. I told her to meet first in Moscow to know each other better - anyway she asked me for 500 Euro for an international passport (she never had one she says) and a visa for Denmark. All that could be finished within 14 days. I won't send the money anyway but is 14 days realistic for a NEW passport?


I need to change the fontsize of footnote's number (not the fontsize of footnote), see attachment. I try to find the answer but failed. Give me a help! John

The footmisc package is quite useful for changing the layout/style of a footnote text itself. Eg:  \renewcommand\footnotelayout{\scriptsize}   However, how do you change the size of the footnote number/counter (not in the body of your document, but in the footnote itself). I don't see any reference to this in the footmisc package.  Thanks!


Let the $N, M \lhd G$ $s.t. M \cap N = \{ e\}$    $e$ means identitiy of the group and N, M are normal subgroups of the G.   Say $\forall n \in N$ and $\forall m  \in M$, Then I've already knew that $nm=mn$.  My question is   Does the group $NM (\lhd G)$ is commutative group or not ?  Intutitvely, It looks like a true since the $NM=MN$  But, When I tried the proof the following problems happened.  $pf)$ $\forall n_1, n_2 \in N$ and $\forall m_1, m_2  \in M$  Want to show $(n_1 m_1)(n_2m_2)$ = $(n_2 m_2)(n_1m_1)$  $(L.H.S.)$ = $(n_1n_2)(m_1m_2)$  since $nm=mn$  $(R.H.S)$ = $(n_2 n_2)(m_2m_1)$ since $nm=mn$  One thing sure that We can't say $(n_1n_2) =(n_2n_1)$.  Therefore  If the statement is true, What next process I need for the $(n_1n_2)(m_1m_2) =(n_2n_1)(m_2m_1)$ ?  If the statement is false Might be find the counterexaples the Normal subgroups but not commutative. But I couldn't find those are.

We know that if a group is Abelian, then all its subgroups are normal. Also, if a group is nonabelian, it can contain a subgroup which is Abelian. Eg: The Dihedral group of order 2n, $D_{2n}$ is nonabelian for $n\geq 3$ but has $C_n$ sitting inside it. Now, my question is: "If a finite group is nonabelian, can it have a normal subgroup which is nonabelian?" In other words, can a normal subgroup of a nonabelian finite group be nonabelian? Thanks.


When there is an attached image in a question on any SE site, clicking on it opens it in a full screen mode. There is no way to redirect back to the question unless you press browser's back button. Keyboard's escape key does not work, neither there is explicit close button. Is there any different key combination to escape out from that page, or shall I be using back button of the browser?  Attached screenshot:   From the comment: "Because it's a link to another site. It's not being opened in a lightbox or anything. Notice that the address bar says imgur.com" - So is it possible to prevent this redirection and open image as popup or something, or using back button is fine?

It would be nice to support showing images in their original size when they where automatically resized because they are too big to fit in a question or answer ().  I envision it just like in blogs or facebook: You can click on the image and it is shown in its original size in an overlay.


Since I'm running a lot of FEM simulations on my Lenovo W520 laptop, I like to have maximum performance available. Using a nifty tool called ThinkPadFanControl, I'm able to boost my fan speed, so my CPU can run comfortably at >100% for most of the time (up to 2.9GHz on my 2.0GHz Intel i7), limited by 'normal' thermal throttling nicely to stabilize temperatures around 94°C.   However, every now and then, the CPU suddenly throttles back to minimum (8x, so 0.78GHz) for up to ten minutes. HWiNFO64 reports thermal throttling as No for all cores during those minutes; temperatures will fall well below 80°C, and all other temperatures (SMART, GPU, memory) seem to be fine as well. Performance becomes very sluggish, with visible delays in typing, switching between applications, etc.  Is this known behaviour in Intel Core i7 processors? How can I prevent or mitigate this?  In the meantime, I have updated my BIOS; I have disabled SpeedStepping so that the frequency remains below 2.0GHz, to no avail. However, I have also noticed some issues with my charger; perhaps a broken connection is causing the laptop to revert to battery saving mode, despite being connected to a charger.  Edit: It turned out the thermal paste was completely solidified, causing erratic behaviour - I suppose I hit some protection that is a bit more stringent than just the thermal throttling, so I was looking in the wrong direction. All is well now with new cooling paste; flagged the question as a duplicate.

I have a custom build with a Intel Core i7-3820 on MSI X79A-GD45(8D) X79 motherboard.  I'm using Thermaltake CLW0215 Water 2.0 Performer as CPU cooling.  I have this build for about a year now. Back then, when starting my PC, the CPU temperature at idle would be around 27-30C and would never go over 60-65C under heavy load.  However, this week when starting my PC, it showed 55-60C on startup and could peak at 100C under heavy load. It looks like it's totally unable to go under 55C now, even if nothing is running at all. Using Power 95, I noticed the temperature rise very quickly, but also drop sharply when the test stops. Does that mean the cooling still works?  Dusted it off all. All fans spinning... Can't be really sure if the water pump is working, as it never made any sounds to begin with. But I would guess if the pump never worked, I wouldn't have stayed at 30C... I would be at 100+.  Does the CPU thermometer can be stuck at +30C than normal? Is it even possible for a CPU thermometer to be messed up? What should I be doing to see if there's an error or if there's a material issue?


Sometimes I want to learn about a new programming related issue—topics such as DB ORM, search indexer, identity providers, logging, etc.  When I don't know anything about a subject, I ask for benchmarks or comparisons. I got some serious answers like links to tests, pros/cons, and Gartner's reviews. I found these very constructive and helpful. But then the question was blocked or deleted. Sometimes this happens even before I get an answer.  So where would it be more appropriate to ask questions about third party products and/or open source frameworks with which I am completely unfamiliar?

Stuff like polls, recommendations based on subjective constraints, puzzles, webcomics etc. do not belong on the serious main SE sites, where professionals should be considered at work and having just a few spare minutes ("code's compiling") to answer questions, so they should not be distracted by such things. However, I'd also like to have a home for these things still using the SE engine. For the reason I mentioned before, this needs to be a separate place though. Let's call it four.[sitename-here].com.


I want to apply for UK visa for a holiday. I am a freelancer working for 2 companies where I take up projects. Depending on the projects I am then paid.  I do not have the usual monthly salary slips. I am directly paid into my account after my project ends. For 1 company I take up monthly projects and the other is 2-3 times a year.  Will there be a problem in getting the visa because I don't have monthly salary slips?

There are many visa applicants who are working as an unregistered freelancer (photographer, construction contractor, fashion designer, journalist etc ). Some of these freelancers make really handsome monthly income and don't really need to work as a full time employee. Most of them receive variable amount of payments (cash, cheques, demand drafts etc) When it comes to filling a visa application form (USA, UK, Schengen etc), there is always an employment section in all visa form, eg for Schengen visa employment form :    This is a very important factor to make an application really strong.  Questions:   1 Unregistered freelancers can just simply write their profession? what documents to produce along with the application?  2 Bank statements with variable methods of payments could convince the visa officer that these are all legitimate payments?


I don't believe there is a massless charged particle, but would it even be possible for a massless particle to be charged as the energy of the charge itself would be a kind of non-momentum energy and therefore all of it's energy would not be in the form of momentum which would imply sub-light velocity and mass.

Are there any massless (zero invariant mass) particles carrying electric charge?  If not, why not? Do we expect to see any or are they a theoretical impossibility?


I know how to plot a function if i know the equation but in this case i don't know the equation of itself , thus i want to plot it by using some curve or approximation command     thanks for the help

How to draw nearly-arbitrary curved lines simply? For example, how to draw this graph:    Source Introduction to Algorithms (3rd edition) by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, Clifford Stein | Page 45 | Figure 3.1  Now I have two ideas of how to draw such figures:   Divide each curved line to many smaller curved lines which can be drawn by a TikZ command, for example  \draw (0,0) to [in=80, out=-30] (3,2);   This way is quite natural. However, it is difficult to divide, for instance, the lines in the above figure, in this way. Also, when I have already divided, it is very possible that I will get confused with the coordinates. Find a formula for each of the curved line, and then draw the graph of the curved line.  This way is good for normal graphs, but for the complicated curved lines as in the above figure, it seems to be impossible.   So none of the ways stated is good enough. Do you have any idea to draw such figures? Your help is much appreciated!     Notes   I'm sorry if the question is a duplicate. I have searched for a while without success. Your help will be great if you can help me draw the above figure. However, I strongly prefer a general solution for this, because the aim of the question is not just to ask how to draw the figure only. You can see that there is no MWE in my question. As I explained above, all of my idea so far are just bad, so I haven't applied any of them. I strongly prefer using TikZ. However, answers using PGF, PStricks, etc. are all very useful to me.


So far I was able to write this but as you see is far from what I would like to achieve. I'm finding difficult to nest the braces. I would prefer to not use the math mode.   Can someone could please help me?     $  \parbox{2cm}{atti tipici di iniziativa della p.g.}\left \{  \begin{array}{l } \parbox{3cm}{atti di coercizione personale}\\  \parbox{3cm}{atti di acquisizione probatoria} \left \{ \begin{array}{l } \parbox{3cm}{atti di acquisiszione probatoria soggettiva}\\ \parbox{3cm}{atti di acquisiszione probatoria soggettiva}\\  \end{array} \right.  \end{array}\right. $

I created a tree with the help of cases environments. The MWE is this:  \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[spanish]{babel} \usepackage{amsmath} \begin{document}  \tiny \hyphenpenalty10000% \[   \begin{cases}     \parbox{1.5cm}{Doctrina de\\ los elementos}     \begin{cases}       \parbox{1.5cm}{Estética\\ trascendental}\\       \parbox{1.5cm}{Lógica\\ trascendental}       \begin{cases}         \parbox{1.5cm}{Analítica\\ trascendental}         \begin{cases}           \begin{minipage}{6em}             Analítica de los conceptos\\[2pt]             Analítica de los principios           \end{minipage}         \end{cases}\\         \parbox{1.5cm}{Dialéctica\\ trascendental}         \begin{cases}           \parbox{1.5cm}{Conceptos de\\ la razón pura}\\[6pt]           \parbox{1.5cm}{Inferencias\\ dialécticas de\\ la razón pura}           \begin{cases}             \begin{minipage}{6em}\raggedright                 Paralogismos  de la razón pura\\[3pt]                 Antinomia de la razón\\                 Ideal de la razón pura           \end{minipage}           \end{cases}         \end{cases}       \end{cases}     \end{cases}     \vspace*{12pt}\\     \parbox{1.5cm}{Doctrina\\ del método}     \begin{cases}       \begin{minipage}{6em}\raggedright         Disciplina\\[2pt]         Canon\\[2pt]         Arquitectónica\\[2pt]         Historia de la razón pura     \end{minipage}     \end{cases}   \end{cases} \]  \end{document}   The result is this:  However, I'm not very happy with the result. For example, in the second-to-last 'column', the first brace is too close to the second brace. Notice also the \\[2pt] codes, to forcefully adjust spacing.  I wonder if there is a better way of setting this tree. (I have tried out some TikZ, but with no avail.)


I am writing a thesis and I have a figure which appears near the end of a chapter. It happens that there is no sufficient space for it at the last page so it is floated to the next new empty page. And it appears in the middle. I want it to appear at the top of the empty page.  I have spent a lot of time trying different combinations of the figure optional arguments "t", "!", "h" and "p". I also tried to use \phantom{\blindtext} trying to use some invisible text to push the figure up. Both approaches do not work for me. The only way is to write some visible garbage texts at the end of the figure, then it will be pushed up to the top; but of course I don't want garbage texts to appear in my thesis.  I read through some answers on similar questions but I don't want to change the margin and format of the thesis. That will make this figure inconsistent with the other figures in my thesis.  This is the last paragraph and the figure I have:  \begin{figure}[!t]         \centering         \begin{subfigure}[b]{0.48\textwidth}                 \begin{center}                \includegraphics[height=3.5cm]{pic/Pic1}                \caption{Pic1}                \label{fig:pic1}             \end{center}        \end{subfigure}%        \begin{subfigure}[b]{0.48\textwidth}             \begin{center}                \includegraphics[height=3.5cm]{pic/Pic2}                \caption{Pic2}                \label{fig:pic2}                \end{center}        \end{subfigure}        \caption{Pictures}\label{fig:pictures} \end{figure}   blah blah blah blah blah Figure~\ref{fig:pic1) blah blah blah blah Figure~\ref{fig:pic2}.

I have multiple figures placed in my document (all of which are using [htbp], [ht] etc. and are placed correctly). The last figure receives a separate page (which is alright) but it's centered on this page, which looks weird as the figure is quite small.  Is there any way to get this figure on top of this page? As written above, its a separate page and the last one in this chapter.  I can't really provide a minimal example (since I guess that the position depends on my previous figures), but here's the code I use for the figure (I've tried [ht], [ht!], [htbp] etc but none of them work - I've also deleted the .aux files before compiling):  \begin{figure}[t!] \centering \begin{tabularx}{\columnwidth}{cc} \subfloat[Results 1] { \centering    \includegraphics[width=0.47\textwidth,height=0.47\textheight,keepaspectratio]{images/plot1} } & \subfloat[Results 2] { \centering    \includegraphics[width=0.47\textwidth,height=0.47\textheight,keepaspectratio]{images/plot2} } \end{tabularx} \caption{Blabla} \end{figure}   Thanks in advance!


I want to find all real $x$ that satisfy   $$   \textrm{det } X=   \begin{vmatrix}   x &2 &2 &2\\   2 &x &2 &2\\   2 &2 &x &2\\   2 &2 &2 &x   \end{vmatrix}\\ $$  My teacher does this by adding the three bottom rows to the top row  $$ \textrm{det } X=   \begin{vmatrix}   x+6 &x+6 &x+6 &x+6\\   2 &x &2 &2\\   2 &2 &x &2\\   2 &2 &2 &x   \end{vmatrix}\\ $$  and then subtracting a row of $2$'s from the bottom three rows  $$ \textrm{det } X=   (x+6)     \begin{vmatrix}   1 &1 &1 &1\\   0 &x-2 &0 &0\\   0 &0 &x-2 &0\\   0 &0 &0 &x-2   \end{vmatrix}. $$  The answer is   $$ x\in \{-6,2\}. $$  I think I understand the operations (although subtracting an arbitrary row of numbers from a matrix/determinant row is something I've never seen before, but I don't see why that wouldn't be allowed. Just like you can subtract arbitrary coefficients on both sides of an equation, right?), my main issue is why they are performed.    Why can't I just in the same way subtract a row of $2$'s from the three bottom rows in the first determinant? If I do that I get a different answer.  I know I want a column of all zeroes except one column-element, but why do I need to perform the first operation beforehand? Is it somehow necessary that all the top row elements to be the same, $(x+6)$?

I have the following $n\times n$ matrix:  $$A=\begin{bmatrix} a & b & \ldots & b\\ b & a & \ldots & b\\ \vdots & \vdots & \ddots & \vdots\\ b & b & \ldots & a\end{bmatrix}$$  where $0 < b < a$.  I am interested in the expression for the determinant $\det[A]$ in terms of $a$, $b$ and $n$.  This seems like a trivial problem, as the matrix $A$ has such a nice structure, but my linear algebra skills are pretty rusty and I can't figure it out.  Any help would be appreciated.


I dont have a credit card, and so I am unable to complete the Apple billing address, which means I can not download anything from the App Store. It there a solution for this?

I have an Apple ID which I had registered years back (when I had bought my Ipod Shuffle). I wanted to use the same Apple ID to download apps on my newly purchased MBP - but whenever I try to login with that Apple ID, it tells me "This ID hasn't been used with Itunes", and proceeds to let me "Review" it. In the last step, I'm asked to furnish credit card information, which I don't want to, since all I want to do is to be able to download free apps !!  So, do I have to register a second Apple ID just for downloading free apps ??


I have done a good hour or so of research, but I can't find a method that works for me that I actually understand, as I don't understand how buffers work. I've tried the to_string method, I've tried the .append() method, and obviously, a simple concatenation method.  My code:   fileLog[fileLogIndex].append(playerTurn+":"+moveColumn);  //fileLog[fileLogIndex] += playerTurn && ":" && moveColumn && ", ";   So. The purpose of this, or my idea, was to keep track of each move in a connect 4 game I wrote today. This was supposed to append each move, in the format aforementioned. PlayerTurn is stored as an int, 1 being player 1, 2 being player 2, and the moveColumn variable is the column that the user selected to drop their piece. If player 1 dropped a piece into column 4, the idea was to append "1:4, " to the variable and then write that line to a file.  As you can see, I have tried a few methods, like append, and even though you can't see, I have tried to to_string () method, but I either get an error, or "1:1" gives me a smiley face in the dos window, or a null in notepad++ when opening the file.  I don't want to use a method I don't understand, so I apologize if this is a repeat of another thread, I'm just tired of staring at this 1 line of code and getting nowhere with the methods I am trying. If I have to use a buffer to do this, fine, but can someone explain to me, in somewhat newbie terms, what each line is doing?   For the record, I am using Visual Studio 2010, and I'm 90% sure I don't have C++11, which I read somewhere is the reason to_string isn't working as expected for me..

I thought this would be really simple, but it's presenting some difficulties. If I have std::string name = "John"; int age = 21;  How do I combine them to get a single string "John21"?


Is it possible to detect google chrome and firefox prerendering on the server side, or in .htaccess, and defer the prerendering for the purpose of monitoring traffic and website events, or do I need to move my website event tracking into javascript. =/  I am using laravel and angular js.

I know you can , but can you also do the inverse? Can you tell Chrome (or really any browser) not to prefetch and prerender your site?  Is there a  tag or other way I can tell browsers that pre-fetching links from the currently viewed page shouldn't be done?


What's the good point to use "import static"?

Just got a review comment that my static import of the method was not a good idea. The static import was of a method from a DA class, which has mostly static methods. So in middle of the business logic I had a da activity that apparently seemed to belong to the current class:  import static some.package.DA.*; class BusinessObject {   void someMethod() {     ....     save(this);   } }    The reviewer was not keen that I change the code and I didn't but I do kind of agree with him. One reason given for not static-importing was it was confusing where the method was defined, it wasn't in the current class and not in any superclass so it too some time to identify its definition (the web based review system does not have clickable links like IDE :-) I don't really think this matters, static-imports are still quite new and soon we will all get used to locating them.  But the other reason, the one I agree with, is that an unqualified method call seems to belong to current object and should not jump contexts. But if it really did belong, it would make sense to extend that super class.  So, when does it make sense to static import methods? When have you done it? Did/do you like the way the unqualified calls look?  EDIT: The popular opinion seems to be that static-import methods if nobody is going to confuse them as methods of the current class. For example methods from java.lang.Math and java.awt.Color. But if abs and getAlpha are not ambiguous I don't see why readEmployee is. As in lot of programming choices, I think this too is a personal preference thing.   Thanks for your response guys, I am closing the question.


So I need to use a custom bibtex style for my thesis, and I have a bibtex entry like  @book{Grupen,     author={Grupen, Claus},     title={{Big Bang Nucleosynthesis}},     publisher={Astroparticle Physics, Springer},     date={2005}, }   which will compile, but gives a warning  Warning--empty year in Grupen   and, logically, does not display a year in the citation for this entry. If I try to change the entry to  @book{Grupen,     author={Grupen, Claus},     title={{Big Bang Nucleosynthesis}},     publisher={Astroparticle Physics, Springer},     year={2005}, }   substituting date with year, then I get an error:  You can't pop an empty literal stack for entry Grupen while executing---line 2529 of file mitthesis.bst    But mitthesis.bst is only ~1200 lines long, so I am totally baffled about where the problem is. The entry for book looks like this:  FUNCTION {book} { output.bibitem   author empty$     { format.editors "author and editor" output.check       add.blank     }     { format.authors output.nonnull       crossref missing$         { "author and editor" editor either.or.check }         'skip$       if$     }   if$   format.btitle "title" output.check   crossref missing$     { format.bvolume output       format.number.series output       format.publisher.address output     }     {       format.book.crossref output.nonnull       format.date "year" output.check        }   if$   format.edition output   format.note output   fin.entry }   Thanks in advance! ---------- Edit to add minimum test case:  main.bib:  @book{Grupen,     author={Grupen, Claus},     title={{Big Bang Nucleosynthesis}},     publisher={Astroparticle Physics, Springer},     year={2005} }   test.tex  \documentclass[12pt, twoside, singlespace]{article}                   \begin{document} asdf\cite{Grupen}  \bibliographystyle{mitthesis} \bibliography{main}  \cleardoublepage \thispagestyle{empty} \mbox{}  \end{document}     and mitthesis.bst is too big to paste here, but it is

I created my own bibliography file with custom-bib (makebst), but when I run it with a reference to a book I get:  $ bibtex PhD [...normal output] Database file #1: PhD.bib You can't pop an empty literal stack for entry oecd2001brc while executing---line 1504 of file wdsphd.bst   The only thing on that line is a high-level ITERATE call.   The style was created with these options:  %% merlin.mbs  (with options: `head,exlang,annote,seq-no,nm-rvvc,dt-beg,yr-par,xmth,tit-qq,qx,bt-qq,vol-bf,volp-sp,num-xser,pub-date,isbn,issn,doi,english,pp,ord,url,url-nl,nfss,,{}') %% english.mbs  (with options: `exlang,annote,seq-no,nm-rvvc,dt-beg,yr-par,xmth,tit-qq,qx,bt-qq,vol-bf,volp-sp,num-xser,pub-date,isbn,issn,doi,english,pp,ord,url,url-nl,nfss,,{}') %% merlin.mbs  (with options: `tail,exlang,annote,seq-no,nm-rvvc,dt-beg,yr-par,xmth,tit-qq,qx,bt-qq,vol-bf,volp-sp,num-xser,pub-date,isbn,issn,doi,english,pp,ord,url,url-nl,nfss,,{}')   The code for book items looks like:  FUNCTION {book} { output.bibitem   author empty$     { format.editors "author and editor" output.check     }     { format.authors output.nonnull       crossref missing$         { "author and editor" editor either.or.check }         'skip$       if$     }   if$   format.btitle "title" output.check   crossref missing$     { format.bvolume output       new.block       format.number.series output       new.sentence       format.publisher.address output     }     {       new.block       format.book.crossref output.nonnull     }   if$   format.edition output   format.isbn output   format.doi output   new.block   format.note output   fin.entry   write.url }   And this is the entry:  @book{oecd2001brc,  author = {OECD},  doi = {10.1787/9789264193550-en},  isbn = {9789264186903},  publisher = {OECD Publishing},  title = {{Biological Resource Centres: Underpinning the future of life sciences and biotechnology}},  url = {http://www.oecd-ilibrary.org/science-and-technology/biological-resource-centres\_9789264193550-en},  year = {2001} }   Is there a way to get a better stacktrace from bibtex? What I have now doesn 't really tell me what is going on. If it can be fixed simply, help would also be appreciated.


When I try to login with redbull as username and pass123 as password it doesnt show the access granted message instead goes to else statement and show the access denied message      Label usernameLb = new Label("Username:");     GridPane.setConstraints(usernameLb, 0, 0);      TextField usernameTf = new TextField();     usernameTf.setPromptText("Username");     GridPane.setConstraints(usernameTf , 1, 0);      Label passLb = new Label("Password:");     GridPane.setConstraints(passLb, 0, 1);      TextField passTf = new TextField();     passTf.setPromptText("Password");     GridPane.setConstraints(passTf, 1, 1);      Button loginBtn = new Button("Login");     loginBtn.setOnAction(e -> {          String username = usernameTf.getText();         String password = passTf.getText();          if (username == "redbull" && password == "pass123"){              System.out.println(username + "\n" + password);             JOptionPane.showMessageDialog(null,                      "Access Granted", " ", JOptionPane.PLAIN_MESSAGE);          } else {              System.out.println(username + "\n" + password);             JOptionPane.showMessageDialog(null,                      "Access Denied", " ", JOptionPane.PLAIN_MESSAGE);         }     });      GridPane.setConstraints(loginBtn, 1, 2);      gridPane.getChildren().addAll(usernameLb,      usernameTf, passLb, passTf, loginBtn);      Scene scene1 = new Scene(gridPane, 300, 200);     window.setScene(scene1);     window.show();  }

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


I want to get the value from Apex class to my javascript. I have a value from my apex class and the value I am able to display in my VF page but not able to pass this value to my script. How can I get the vale to my script. Please help me.

Is there any way to access controller variable set in a Method in Javascript. In the example above the value is set in constructor. But when I set it in a method it is showing as NULL in Javascript  In controller:  public class abc {     public string varA { get;set; }     public void fn(){         varA='hello';     } }   In VFPage:  function hello(){     var bool = '{!varA}';     alert(bool); }   The alert statement in the VF Page(i.e bool) is displayed as null. Can you please help how to access a variable set from a method instead of constructor?


import java.awt.EventQueue; import java.awt.Window;  import javax.swing.JFrame; import javax.swing.JButton; import java.awt.BorderLayout; import javax.swing.JLabel; import javax.swing.JTextField; import java.awt.event.ActionListener; import java.awt.event.ActionEvent;  public class batsmen {      private JFrame frame;     private JTextField textField;      /**      * Launch the application.      */     public static void main(String[] args) {         EventQueue.invokeLater(new Runnable() {             public void run() {                 try {                     batsmen window = new batsmen();                     window.frame.setVisible(true);                 } catch (Exception e) {                     e.printStackTrace();                 }             }         });     }      /**      * Create the application.      */     public batsmen() {         initialize();     }      /**      * Initialise the contents of the frame.      */     private void initialize() {         frame = new JFrame();         frame.setBounds(100, 100, 450, 300);         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);         frame.getContentPane().setLayout(null);          JLabel lblClue = new JLabel("Clue 1:");         lblClue.setBounds(20, 6, 61, 16);         frame.getContentPane().add(lblClue);          JLabel lblNewLabel = new JLabel("He is the leading international run scorer of all time");         lblNewLabel.setBounds(48, 30, 375, 16);         frame.getContentPane().add(lblNewLabel);          JLabel lblClue_1 = new JLabel("Clue 2");         lblClue_1.setBounds(20, 69, 61, 16);         frame.getContentPane().add(lblClue_1);          JLabel lblHePlayedFor = new JLabel("He played for India");         lblHePlayedFor.setBounds(48, 94, 375, 16);         frame.getContentPane().add(lblHePlayedFor);          JLabel label = new JLabel("");         label.setBounds(20, 229, 403, 16);         frame.getContentPane().add(label);         frame.setVisible(true);          textField = new JTextField();           textField.setBounds(20, 191, 290, 26);         frame.getContentPane().add(textField);         textField.setColumns(10);          JLabel lblTakeAGuess = new JLabel("Take a Guess:");         lblTakeAGuess.setBounds(20, 163, 119, 16);         frame.getContentPane().add(lblTakeAGuess);          JButton btnNewButton = new JButton("Enter");         btnNewButton.addActionListener(new ActionListener() {             public void actionPerformed(ActionEvent e) {                 String answer = textField.getText();                 answer = answer.toLowerCase();                 if(answer == "sachin tendulkar") {                     label.setText("Correct");                 }else if (answer != "sachin tendulkar"){                     label.setText("Incorrect. The answer was Sachin Tendulkar");                 }             }         });         btnNewButton.setBounds(322, 191, 117, 29);         frame.getContentPane().add(btnNewButton);       }  }   The if statement does not seem to work as even if the correct answer is inputted, it displays "Incorrect. The answer was Sachin Tendulkar". I would appreciate any help greatly. I have checked and the String answer contains the correct answer, yet the program outputs "Incorrect!". This is extremely confusing and annoying. Once again, I would appreciate any help that you are able to give me. Thanks


In my application I am accessing a remote URL and getting a JSON response like below. The JSON response has a property called created_at.   In JavaScript I need to get the current date minus(-) the created_at date and calculate how many days ago the comment was created.  How can I do that?  {      "id":12578834,    "title":"Joint R&D Has Its Ups and Downs",    "url":"http://semiengineering.com/joint-rd-has-its-ups-and-downs/",    "num_points":1,    "num_comments":0,    "author":"Lind5",    "created_at":"9/26/2016 2:28" }

How do I get the number of days between two dates in JavaScript? For example, given two dates in input boxes:  <input id="first" value="1/1/2000"/> <input id="second" value="1/1/2001"/>  <script>   alert(datediff("day", first, second)); // what goes here? </script>


I want to theme the language switcher. How would I do this in Drupal 8?  Where would I find the correct twig template?

I am looking to modify the default output of Drupal 8 of links in a certain situation, the language switcher. Ideally I want to be able to do that in a twig template and not have to produce a  that overwwrites that whole link generation system and add a BIG if for the cases I need to overwrite.  I think the output layout should be controllable in the twig template similar to  (this answer outputs the same url for every languages)  I am using bootstrap as a base theme so i'd like to use the bootstrap markup for my links (btn btn-primary, dropdown)  Here is my code I am trying to make links--language-block.html.twig  {%- if links|length == 2 -%}     {# show only alternate language button #}     {%- for key, item in links -%}         {%- if not item.attributes['#options']['set_active_class'] -%} {# <--- this is always true!? #}             {{ item.link['#title'] }} {# #url is always the same what ever the language it is pointing to! #}         {%- endif -%}     {%- endfor -%} {%- elseif links|length > 2  -%}     {# show selected language in button and other languages in drop down #}     <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">{{ selectedLanguage }}</button>
         {% for key, item in links %}             {%- if not item.attributes['#options']['set_active_class'] -%} {# <--- this is always true!? #}
{{ item.link['#title'] }}
             {% endif %}         {% endfor %}
 {%- endif -%}   Anyone has an idea on how to do this?


How can I effectively determine when I should use "on" or "in" in this kind of sentence: "Perhaps you're not preparing a homework assignment or project, but are trying to revise for an exam. If so, you need to know exactly what is on your curriculum." I wonder if I use the "in" instead. then is it ungammarical?

When we talk about software, should we use "on" or "in"? For example:   How can I import pictures in/on photoshop? I installed new software in/on my windows. How can export files in/on adobe premiere pro?


When I try to install wine through commands this comes in the terminal and I cannot forward after this. What to do?

After a recent update, ttf-mscorefonts-installer prompted me to accept its license agreement.     ┌─────────────────┤ Configuring ttf-mscorefonts-installer ├─────────────────┐  │                                                                           │   │ TrueType core fonts for the Web EULA                                          │                                                                               │ END-USER LICENSE AGREEMENT FOR MICROSOFT SOFTWARE                             │                                                                               │ IMPORTANT-READ CAREFULLY: This Microsoft End-User License Agreement           │ ("EULA") is a legal agreement between you (either an individual or a          │ single entity) and Microsoft Corporation for the Microsoft software           │ accompanying this EULA, which includes computer software and may include      │ associated media, printed materials, and "on-line" or electronic              │ documentation ("SOFTWARE PRODUCT" or "SOFTWARE"). By exercising your          │ rights to make and use copies of the SOFTWARE PRODUCT, you agree to be        │ bound by the terms of this EULA. If you do not agree to the terms of          │ this EULA, you may not use the SOFTWARE PRODUCT.                              │                                                                               │                                  <Ok>                                         │                                                                           │   └───────────────────────────────────────────────────────────────────────────┘    Screenshot:   For some reason my terminal will not allow me to accept, or for some reason I am pressing the wrong hotkey...  I've tried every letter on the keyboard and Enter among others...  I'm sure there is a very simple and obvious solution to this.  I've also just tried to remove the package completely however the terminal states that due to the package not being correctly installed, I should reinstall the package before removing it.  Very frustrating!  Essentially, because I cannot successfully install this package, I can't really ever upgrade my system because I always have to end up terminating the terminal with the license agreement (thus the upgrade fails).


I use Ubuntu Studio 15.10, 64 bit, and WineHQ 1.9.1.  I've tried to install a Windows software which needs Adobe Air complement, but I can not to install it, not from the original software CD, not from  the Internet.  What's wrong here?  How can I install it?  Is there some "replacement" for Adobe Air, somewhere?  Greetings & Blessings from Chile!  Juan

I am a heavy user of certain applications that are built on AIR.   It appears that AIR has discontinued support for Linux. Even the older versions in the Adobe AIR Archives seem to support only 32 bit Linux distributions and I am on 64 bit currently.  Is there even a slight possibility that I could run AIR in these conditions? If so, can you please tell me where can I get a detailed step by step installation for this?


I am trying to prove that the determinant of the Gram matrix is equal to the norm of the cross product squared for $v_1, v_2 \in \mathbb{R}^3$: $$\|v_1 \times v_2\|^2 = \det\Bigl(\begin{smallmatrix} \langle v_1, v_1 \rangle & \langle v_1, v_2 \rangle\\  \langle v_2, v_1 \rangle & \langle v_2, v_2 \rangle \end{smallmatrix}\Bigr)$$ But the only idea I have seems very technical and unpleasant, any suggestions? I have already seen  thread but I don't find it helpful.

I know by brutal calculation this identity holds always:  $$(u × v) \cdot (x × y) = \begin{vmatrix}  u \cdot x & v \cdot x \\  u \cdot y & v \cdot y \\  \end{vmatrix}$$  for arbitrary vectors $u$, $v$, $x$, $y$.  I'd like to know where it come from naturally.  Thank you.


I already have a code, but it's not successfully working. No popup happens when I press submit. Thanks for the assistance in advance  <!DOCTYPE html> <html>   <head>     <meta charset="UTF-8">     <title>Email Validation</title>   </head>   <body>   <script>   function ValidateEmail(mail)  {  if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(myForm.emailAddr.value))   {     return (true)   }     alert("You have entered an invalid email address!")     return (false) } </script> <table> <tr> <td> Email </td> <td> <input type = 'text' name = 'email' size = '30'  /> </td> </tr>   </table>     <input type="submit" value="Submit" onclick = "ValidateEmail()">   </body> </html>

Is there a regular expression to validate an email address in JavaScript?


How do you find all (non-trivial) $(x, y)$ such that $$x^2 + y^2 = 2017^2?$$  I really don't want to go through trial and error, like what I managed to do here:     So, we can rewrite the equation as $x^2 = 2017^2 - y^2 \implies x^2 = (2017 + y)(2017 - y).$ From there, I know nothing but guessing values of $y,$ which would be rather painful.   Yes, I know the Babylonian method of finding Pythagorean triples, but I figured since $2017$ is prime it would still simplify to $x^2 + y^2 = 2017^2.$  Thanks in advance for your help.    Ah, I got my Babylonian method wrong. It is for $a, b, c, m, n \in \mathbb{Z}$ such that $a^2 + b^2 = c^2$ and (WLOG) $m > n,$  \begin{align} a &= k\left(m^2 - n^2\right) \\ b &= 2kmn \\ c &= k\left(m^2 + n^2\right) \end{align}

Write the prime $2017$ as the sum of two squares  $2017$ can be written as the sum of two squares because it is a prime of the form $p\equiv 1\ ($mod $4)$  Using an appropriate algorithm find the two numbers that, when squared, add to the total of $2017$


I wrote on Linux PC python3 in eric the following code:  import sqlite3 conn = sqlite3.connect("dbug26.db") c=conn.cursor() c.execute("CREATE TABLE IF NOT EXISTS prices (price1 REAL,price2 REAL,  price3 REAL, price4 REAL, price5 REAL)") c.execute("INSERT INTO prices VALUES (0.01, 0.01, 2.60, 0.01, 2.60)") conn.commit()  c.execute("SELECT * FROM price") prices = c.fetchall() print (prices)  c.close() conn.close()   If I run the code in python3 in Linux then the output is:  >>> [(2.6,), (1.0,), (2.6,), (1.01,)]   but if I run exactly the same code in qpython3 on Android then the output is:  >>> [(2.6000000000000001,), (1.0, ), ((2.6000000000000001,), (1.01, )]   Where do the extra decimal zeros and one in qpython3 come from? What can I do to prevent this ?  If I look at the sqlite db in several db-browsers on Linux,Mac and Android the data always appears correctly.

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


So I'm working on a very basic java assignment, and I believe I understand how the (String [] args) part of the main works. Basically my understanding is that the command line arguments are put into the array of strings called args. However my code won't produce the results I expect. It seems to work fine with no arguments but when I put in either of the other options I'm always greeted with my usage error.   class TicTacToe {   public char[][] gameboard = {  {' ', ' ', ' '},               {' ', ' ', ' '},               {' ', ' ', ' '}  };    public static void main(String [] args)  {     char play1, play2;       if(args.length == 0)  {       play1 = 'h';       play2 = 'h';     }else if(args.length == 1 && args[0] == "-c")  {       play1 = 'c';       play2 = 'c';     }else if(args.length == 2 && args[1] == "1")  {       play1 = 'c';       play2 = 'h';     }else if(args.length == 2 && args[1] == "2")  {       play1 = 'h';       play2 = 'c';     }else{       System.out.println("Usage: java TicTacToe [-c [1|2]]");       return;     }   } }

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


I've been configuring dedicated MySQL server (linux) with 3x 300 GB SSD in SoftRaid. I'm trying to decide which Raid to use to get best performance. I'm expecting this database to be a read-heavy (90% select) and not so write heavy (5% insert+update). Storage capacity is not so important as performance. Is it better to use RAID 1 or RAID 5?   Thanks

This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?


I'm confused whether it's difference between two times (i.e final and initial) or it represents very small time.

I have read the thread regarding , but it does not answer my question.  I am confused about the notation for change in Physics. In Mathematics, $\delta$ and $\Delta$ essentially refer to the same thing, i.e., change. This means that $\Delta x = x_1 - x_2 = \delta x$. The difference between $\delta$ and $d$ is also clear and distinct in differential calculus. We know that $\frac{dy}{dx}$ is always an operator and not a fraction, whereas $\frac{\delta y}{\delta x}$ is an infinitesimal change.   In Physics, however, the distinction is not as clear. Can anyone offer a clearer picture?


Prove that every group of order $35$ is cyclic.    Now, the subgroups of this are ones whose orders divide the order of this group(by lagrange), these are of prime orders $7$ and $5$.  and I guess $\Bbb Z_7\times \Bbb Z_5$ is of order $35$ and since these are both cyclic, so is $\Bbb Z_{35}$.  But that doesn't prove anything about every subgroup of order $35$.  How do I do this.

I've been asked to prove this.   In class we proved this when $n=15$, but our approached seemed unnecessarily complicated to me. We invoked Sylow's theorems, normalizers, etc. I've looked online and found other examples of this approach.    I wonder if it is actually unnecessary, or if there is something wrong with the following proof:   If $|G|=35=5\cdot7$ , then by Cauchy's theorem, there exist $x,y \in G$ such that $o(x)=5$, $o(y)=7$. The order of the product $xy$ is then $\text{lcm}(5,7)=35$. Since we've found an element of $G$ of order 35, we conclude that $G$ is cyclic.   Thanks.


How can I change the TOC to display Figure: X and Table X? Also if you notice in the header there is a somewhat fancy header with the name and a horizontal line, I would like to get that too.  I currently have like this like.   And I want to make it look like this.    Can someone help me?

I need to prefix each entry in list of tables and figures with appropriate text - table or figure for each. Also I need to remove chapter numbers from list, because tables are numbered consequently through the whole report.  I managed to do everyting I need with this simple commands:  \renewcommand{\thetable}{\arabic{table}} \renewcommand{\thefigure}{\arabic{figure}}  \makeatletter \providecommand\phantomsection{}% for hyperref  \newcommand\listoftablesandfigures{%     \chapter*{List of Tables and Figures}%     \phantomsection %\addcontentsline{toc}{chapter}{List of Illustrations}% %\section*{Figures}% %\phantomsection %\addcontentsline{toc}{section}{\protect\numberline{}Figures}% \@starttoc{lof}% \bigskip %\section*{Tables}% %\phantomsection %\addcontentsline{toc}{section}{\protect\numberline{}Tables}% \@starttoc{lot}} \makeatother   Now only one thing remains: to be consistent with text in list of tables and figures.


I have a shapefile with no projection. As a result, the (X,Y) coordinate cannot be understood.   This place is in south eastern Pennsylvania, and its longitude and latitude is about -75.2° and 40.1°. Can anyone guess its "projection coordinate" ? PS: I have asked  and the projection of that one is "Pennsylvania State Plane South (3702)". Unfortunately, It doesn't match this one.

I have a Shapefile but its coordinate system is Unknown, and there is no *.prj file.   How can I identify it now?


Problem: For $k < p-1$ where $p$ is an odd prime and $k$ is a natural number, prove that  $$1^k+2^k+\cdots+(p-1)^k \equiv 0 \mod p.$$   My attempt: It's obvious for odd $k$, as we can pair the terms 1 with $p-q$ and so on. But I can't come up with a proof for even $k$. It seems like pairing idea used for odd for odd will not work as for a given summand its negative residue may not be present not be be present.  For example for primes of the form $4k+3$, $-1$ will not be present  but 1 is present.  So, it looks like we will need some kind of expansions.  I found this problem as an unproved lemma, in the proof of an IMO shortlist problem.  I only know elementary number theory.  Please help me.

I would appreciate if somebody could help me with the following problem:  Q: For any prime number $p(p\geq 3), k=1,2,3,...,p-2$, why is  $$ 1^k+2^k+3^k+...+(p-1)^k  $$ always a multiple of $p$ ?


I have a script that loops through all zip files in a large directory and individually unzips them. I am using the -q option in order to keep the console clean and display other monitoring info.  I would like to keep this same behavior but would like to add the output of the -v option to a single log file of the whole operation. What would be the best way of accomplishing this? Btw, I'm still a bit green when it comes to scripting so any input would be appreciated.  Unzip portion of script:  for FILES in $(ls -1Sr|grep a_media*)  do unzip -q $FILES -d $DESTINATION done

I often see tutorials online that connect various commands with different symbols. For example:  command1 |  command2 command1 &  command2 command1 || command2     command1 && command2   Others seem to be connecting commands to files:  command1  > file1 command1  >> file1   What are these things? What are they called? What do they do? Are there more of them?    .


Visiting the achivements popup in topbar on stackechange.com doesn't clear the green rep-increment icon:        Also I noticed that both achivements items are lighted on stackexchange.com, i.e. +rep and a "cup", but the light of cup is cleared after visiting the popup. May be I will add screenshot (or gif) later for this case, after earning more reputation.

When going to any page of  with a new reputation gain, the achievements dropdown keeps showing a new badge green highlight:    And then trying to dismiss the notification by clicking on it gets rid of the green badge notification, but the +5 remains even after I've clicked away from the dropdown.


2gb RAM 500 gb HDD AMD C- 70, 1 GHz wireless, touch pad functions which version is better

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


i have a window 8.1 update to my laptop.But am afraid that after updating window 8 it will affect the grub menu and i wont able to boot into Ubuntu..is it safe to upgrade to window 8.1 ??

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


Typically one has a percentage (based on a W-4) of their pay withheld to cover one's taxes at the end of the year, it occurs to me that this is effectively like storing that money in an account with the IRS at 0% interest. Hypothetically would it not be better to calculate your withholding amount and just deposit that into a savings account every paycheck and just use that to pay your taxes. It seems to me that as long as a person is disciplined enough to not touch that account, one could generate some residual income that way. Also as an added bonus if you are in a state that treats a tax return as in income you are now not raising your taxable income. I am thinking there must be a flaw to my logic but I cannot figure out what it is. Is my reasoning valid?

As a consultant, I got used to paying quarterly taxes. Now that I'm a regular w2 salaried employee, I'm subject to normal withholding on each pay statement. I would like to keep making exact quarterly payments instead of having a (generally incorrect) amount held back each paycheck.   I haven't been able to find any information on the 1040-es that would make me think I'm ineligible to do so, but I suspect that it may be the case. I'd have to stop paycheck withholdings by updating my w4 to either have a high number of exemptions or mark myself as exempt from taxes, which I assume is where the rub lies.   So, as a regular salaryman, is it possible for me to pay taxes exclusively through quarterly payments in lieu of traditional withholdings?


In general I am aware of what SSL does and how, but I'm not exactly sure as to what's the accepted custom, i.e. whether I actually am supposed to use it for my blog.  There will be no other users than me, no financial data circulating, and no truly critical information will be stored on the blog. However, I will still need to log in to the website from various places and devices.  SSL would enhance security, but could also lead to link rot in the future, is kind of a hassle, is a strain on the processor, and makes caching the website harder.  So, is it necessary to have my blog running over HTTPS? Is it a must-do in the community?

I've been pretty paranoid about learning to "do security right" for this site I'm building (first non-trivial site I've made), and I've noticed something that bothers me: SSL.  I've read plenty of security threads here, on StackOverflow, and elsewhere that goes on at length about regenerating session ids after n uses, and how your passwords need to be salted, hashed, and never stored in plain text. I've read plenty about how to detect when a session has been hijacked, by tracking IP addresses, user agents, and by using tracking cookies.  What I don't understand is what any of this matters when the website logs you in via a normal HTTP POST and sends your password over the wire in plain text?   I understand that all the other methods I listed are needed to reduce your overall exposure, and maybe there are some sites that just don't need that much security anyway, but I guess what I'm asking is:   When is it ok to not bother with SSL?   Sites like Gmail, your bank, and LinkedIn, I can see having a reason to use SSL, but what makes it ok that sites like Facebook and reddit don't bother (hell, PlentyOfFish even stores your password in plain text and even emails it to you weekly as a reminder!?!)?  How concerned should I be with making sure SSL is setup (especially since I'd be starting with a shared host, and I'm being pretty cheap to start)? My site won't hold any particularly personal information, if that helps. If the site becomes a success, I'd seriously look at paying the extra for the added security.


I can't find out, why EEVEE won't render my textures (third image). I created the UV map and assigned the material to the Object. Render Preview (first image) shows the texture, but final rendering with F12 doesn't. When rendering with cycles (second image) it is rendering the texture, but it still looks wrong.

For instance, here I have two cubes that are offset only on the x-axis. When I render them (using Blender's internal renderer), the overlapping faces interfere with each other and the result looks awful. A quick and easy solution would be to offset them by just a smidget, but is there another solution that allows faces to overlap and not exhibit this graphical glitch?


Consider the set $\mathbb Z^+$ of positive integers. Prove that $\mathbb Z^+$ can be expressed as a countably infinite union of disjoint countably infinite sets. I know that countably infinite sets means it has the same cardinality as $\mathbb N$ (the set of natural numbers). However, I am not sure how to go about proving this.

Consider a set $E=\bigcup_{j=1}^{\infty}E_{j}$.  How can I re-express $E$ in such a way that all of the contributions to $E_{n}$ are covered only once.  Presumably, such a re-expression of $E$ will be some kind of countable union of disjoint sets.  The end-goal is to answer the following problem: to show that if $m'$ is any map from the Lebesgue measurable sets of $\mathbb{R}^{d}$ to $[0,\infty]$ which obeys countable additivity and $m'(\emptyset)=0$, then $m'$ also obeys monotonicity and sub-additivity.  Showing that $m'$ obeys monotonicity is easy.  Sub-additivity seems easy at first glance, until you actually have to prove it.  Perhaps there are better ways to do it, but my strategy is to write $E=\bigcup_{j=1}^{\infty}E'_{j}$ where the $E'_{j}$ are all disjoint "components" of $E$.  Then applying additivity I could expand out $m\left(\bigcup_{j=1}^{\infty}E'_{j}\right)$ using additivity (I assume the $E'$ will be  sets formed by multiple set operations of the original $E_{j}$, so applying additivity could be potentially tricky).  Once this expression is obtained, I presume it will be easy to compare it to $\sum_{j=1}^{\infty}m'(E_{j})$ and show that it is smaller, hence proving sub-additivity.  UPDATE  From the answer below...  \begin{align*} m'(E) &=m\left(\bigcup\limits_{j=1}^{\infty}E_{j}\right)\\ &=m\left(\bigcup\limits_{j=1}^{\infty}\left(E_{j}-\bigcup\limits_{k=1}^{j-1}E_{k}\right)\right)&\text{(remove duplicate inersections)}\\ &=\sum\limits_{j=1}^{\infty}m\left(E_{j}-\bigcup\limits_{k=1}^{j-1}E_{k}\right)&\text{(apply assumed additivity)}\\ &\leq\sum\limits_{j=1}^{\infty}m(E_{j}) &\text{(apply aleady proved monotonicity)} \end{align*} so that $m'$ is also sub-additive as required.


I have the following optoisolator . It is a 4-Pin Phototransistor Optoisolator. My idea is basically to control electrical appliances in my home. The power supply in my country is 230V 50Hz.  I specifically want to control tube lights in my room. The control of 5V comes from an AVR microcontroller.  My circuit connections are shown in the picture.  Hoping that my connections are correct, my question: is it safe to run them with optoisolator for a prolonged duration. And also how reliable are they?  I also want some suggestions on additional safety precautions.

I'm new to the world of electronics and I have a quite simple question.  Can I control my light bulb with something like this schema?    Power source is regular AC 230V (~320Vrms) source.   Here is .  I want to control this using Arduino but is the underlying principle OK or not?  EDIT:  Modification with respect to Spehro's comments:   But now I do not know how to connect the TRIAC :)  EDIT:  Would this circuit be OK?   Now the optocoupler is switching the triac.


Just wondering if a class can derive from more than one abstract class? My intuition says no.

Since multiple inheritance is bad (it makes the source more complicated) C# does not provide such a pattern directly. But sometimes it would be helpful to have this ability. For instance I'm able to implement the missing multiple inheritance pattern using interfaces and three classes like that: public interface IFirst { void FirstMethod(); } public interface ISecond { void SecondMethod(); }  public class First:IFirst  {      public void FirstMethod() { Console.WriteLine("First"); }  }  public class Second:ISecond  {      public void SecondMethod() { Console.WriteLine("Second"); }  }  public class FirstAndSecond: IFirst, ISecond {     First first = new First();     Second second = new Second();     public void FirstMethod() { first.FirstMethod(); }     public void SecondMethod() { second.SecondMethod(); } }  Every time I add a method to one of the interfaces I need to change the class FirstAndSecond as well. Is there a way to inject multiple existing classes into one new class like it is possible in C++? Maybe there is a solution using some kind of code generation? Or it may look like this (imaginary c# syntax): public class FirstAndSecond: IFirst from First, ISecond from Second { }  So that there won't be a need to update the class FirstAndSecond when I modify one of the interfaces.  EDIT Maybe it would be better to consider a practical example: You have an existing class (e.g. a text based TCP client based on ITextTcpClient) which you do already use at different locations inside your project.  Now you feel the need to create a component of your class to be easy accessible for windows forms developers. As far as I know you currently have two ways to do this:  Write a new class that is inherited from components and implements the interface of the TextTcpClient class using an instance of the class itself as shown with FirstAndSecond.  Write a new class that inherits from TextTcpClient and somehow implements IComponent (haven't actually tried this yet).   In both cases you need to do work per method and not per class. Since you know that we will need all the methods of TextTcpClient and Component it would be the easiest solution to just combine those two into one class. To avoid conflicts this may be done by code generation where the result could be altered afterwards but typing this by hand is a pure pain in the ass.


Executive Summary: When assertion errors are thrown in the threads, the unit test doesn't die. This makes sense, since one thread shouldn't be allowed to crash another thread. The question is how do I either 1) make the whole test fail when the first of the helper threads crashes or 2) loop through and determine the state of each thread after they have all completed (see code below). One way of doing the latter is by having a per thread status variable, e.g., "boolean[] statuses" and have "statuses[i] == false" mean that the thread failed (this could be extended to capture more information). However, that is not what I want: I want it to fail just like any other unit test when the assertion errors are thrown. Is this even possible? Is it desirable?  I got bored and I decided to spawn a bunch of threads in my unit test and then have them call a service method, just for the heck of it. The code looks approximately like:  Thread[] threads = new Thread[MAX_THREADS]; for( int i = 0; i < threads.length; i++ ) {     threads[i] = new Thread( new Runnable() {         private final int ID = threadIdSequenceNumber++;         public void run() {             try {                 resultRefs[ID] = runTest( Integer.toString( ID ) ); // returns an object             }             catch( Throwable t ) {                  // this code is EVIL - it catches even                 // Errors - don't copy it - more on this below                 final String message = "error testing thread with id => "                             + ID;                 logger.debug( message, t );                 throw new IllegalStateException( message, t );                  // need to wrap throwable in a                  // run time exception so it will compile             }         }     } ); }   After this, we will loop through the array of threads and start each one. After that we will wait for them all to finish. Finally, we will perform some checks on the result references.  for( Thread thread : threads )     thread.start();  logger.debug( "waiting for threads to finish ..." ); boolean done = false; while( !done ) {     done = true;     for( Thread thread : threads )         if( thread.isAlive() )             done = false; }  for( int i = 0; i < resultRefs.length; i++ ) {     assertTrue( "you've got the world messed, dawg!",             myCondition(resultRefs[i]) );   Here's the problem. Did you notice that nasty try-catch-throwable block? I just added that as a temporary hack so I could see what was going on. In runTest( String ) a few assertions are made, e.g., assertNotNull( null ), but since it is in a different thread, it doesn't cause the unit test to fail!!!!  My guess is that we will need to somehow iterate over the threads array, check the status of each, and manually cause an assertion error if the thread terminated in a nasty way. What's the name of the method that gives this information (the stack trace of the dead thread).

I have thus far avoided the nightmare that is testing multi-threaded code since it just seems like too much of a minefield.  I'd like to ask how people have gone about testing code that relies on threads for successful execution, or just how people have gone about testing those kinds of issues that only show up when two threads interact in a given manner?  This seems like a really key problem for programmers today, it would be useful to pool our knowledge on this one imho.


So instead of saying:     All depends on Ron winning a scholarship.   we should say this:     All depends on Ron's winning a scholarship.

The rule says that we can use a possessive adjective or an object pronoun before a gerund. Is there a rule  that says when to use each or are they interchangeable? Some say that it's wrong to use an object pronoun before a gerund.


I'm using Drupal 8.  What I'm trying to do is:   Access the active node From the node get the value of field_test and assign it to a variable Pass the variable to the drupalSettings function and subsequently to a custom module 'mycustommodule' that triggers an alert   In my content type, I created a field_test field, which is the field I reference in my code. The block is placed on a page of this content type.  This is the code I am using.  mycustomblock.libraries.yml  custom:   version: 1.x   js:     js/custom.js: {}   dependencies:     - core/jquery     - core/drupalSettings   MyCustomBlock.php  <?php /**  * @file  *  */  namespace Drupal\mycustomblock\Plugin\Block; use Drupal\Core\Block\BlockBase;  /**  * Creates a 'Foobar' Block  *  * @Block(  * id = "block_mycustomblock",  * admin_label = @Translation("MyCustomBlock"),  * category = @Translation("Blocks")  * )  */ class MyCustomBlock extends BlockBase {   /**    * {@inheritdoc}    */    public function build() {    // get the variable from field_test   if ($node = \Drupal::routeMatch()->getParameter('node')) {       $test = $node->field_test->value;       $variables['#attached']['library'][] = 'mycustomblock/custom';        $build['#attached']['drupalSettings']['mycustomblock']['test'] = $test;     } }   custom.js  (function ($, Drupal, drupalSettings) {   var testMe = Drupal.settings.mycustomblock.test;   alert(testMe); )(jQuery, drupalSettings);   How can I tell if the JavaScript file is being loaded from the block? I checked in the inspector, and do not see it being loaded when the page with the block on it loads.  Furthermore, how can I properly access the field value and pass it to JavaScript?

I'm using Drupal 8.  What I'm trying to do is:   Access the active node From the node get the value of field_test and assign it to a variable Pass the variable to the drupalSettings function and subsequently to a custom module 'mycustommodule' that triggers an alert   In my content type, I created a field_test field, which is the field I reference in my code. The block is placed on a page of this content type.  This is the JavaScript code I am using.  mycustomblock.libraries.yml  custom:   version: 1.x   js:     js/custom.js: {}   dependencies:     - core/jquery     - core/drupalSettings   custom.js  (function ($, Drupal, drupalSettings) {   Drupal.behaviors.mycustomblock = {     attach: function (context, settings) {       var testMe = drupalSettings.mycustomblock.test;       alert(testMe);    } }; })(jQuery, Drupal, drupalSettings);   The error I get from the JavaScript console is this.    The error message is referring to this line.     Why is the instance of Drupal in the closing parenthesis throwing this error?


I just want to know if we can use JavaScript for creating iPhone apps. And if we can how do we do it? Do I have to become an expert in JavaScript to do that?

I don't want to take the time to learn Obj-C. I've spent 7+ years doing web application programming. Shouldn't there be a way to use the WebView and just write the whole app in javascript, pulling the files right from the resources of the project?


i want to pass $var[5] in to the {subscription_reference} in the url.$var[5] contains string value.  Here is my code  $url5 = $api_entry_point ."/subscription/{subscription_reference}/credentials";       $ch5 = curl_init($url5);     curl_setopt($ch5, CURLOPT_USERPWD, "{$user}:{$pass}");     curl_setopt($ch5, CURLOPT_GET, 1);     curl_setopt($ch5, CURLOPT_SSL_VERIFYHOST, 0);     curl_setopt($ch5, CURLOPT_SSL_VERIFYPEER, 0);     curl_setopt($ch5, CURLOPT_RETURNTRANSFER, 1);     $output5 = curl_exec($ch5);     curl_close($ch5);     var_dump($output5);   Here are the various ways i followed and gone wrong.  $url5 = $api_entry_point ."/subscription/'.$var[5].'/credentials";  $url5 = $api_entry_point ."/subscription/![CDATA[".$var[5]."]]/credentials";  $url5 = $api_entry_point ."/subscription/$var[5]/credentials";

How do you pass $_POST values to a page using cURL?


I am a brand new Ubuntu User. Is a Xperia Z1 Compact Smartphone compatible to Ubuntu? I am using my Smartphone as MP3 Player and Camera and i want to sync it.

With the announcement of the Ubuntu Phone OS I'd like to know what phone (and tablet) models are supported at this time.  Note from foss & Oli: We are making this the master question for all future "Will this work on <insert random tablet/phone/device here>?!" questions


An example would be words only used in a specialized field but not in daily life.  Or a word that has both a double meaning in daily use and in specialization.

I saw the following passage in a PSAT study guide. One of the questions is about the use of the term 'hot spot'. Can we say it's being used colloquially and technically at the same time? The question amounts to whether colloquial language is necessarily a part of laymen's terms.  Geologists call these volcanic areas hot spots. Lying deep in the interior of a plate, hot spots or intra-plate volcanoes are sources of magma, the red-hot, molten material within the earth's crust.


As part of a larger analysis, I'm interested in examining the relationship between an interval level variable and a four category nominal variable. In this case, the interval variable is the independent variable and the four category nominal variable is the dependent variable. I'm interested in whether there is a statistically significant relationship between the two variables, as well as the strength of the relationship if one exists.  Does anyone know whether a measure of association exists for this situation? I'm aware of eta, but my understanding is that eta is appropriate when the IV is nominal and the DV is interval. I'm also aware of the point bi-serial correlation, but my understanding is that the nominal variable must be binary.  Any help is greatly appreciated.

I would like to find the correlation between a continuous (dependent variable) and a categorical (nominal: gender, independent variable) variable. Continuous data is not normally distributed. Before, I had computed it using the Spearman's $\rho$. However, I have been told that it is not right.  While searching on the internet, I found that the boxplot can provide an idea about how much they are associated; however, I was looking for a quantified value such as Pearson's product moment coefficient or Spearman's $\rho$. Can you please help me on how to do this? Or, inform on which method would be appropriate?  Would Point Biserial Coefficient be the right option?


I am 60 US citizen, live in Costa Rica, receive a pension, and have a high deductible ($2500) US expat health insurance. I was wondering if I can open and use an HSA to pay my healthcare costs in CR and reduce my taxes?

I am a US expat living abroad. As some of you may know, I still have to pay US taxes on my foreign income, even though I've been abroad for more than 5 years.  That said, I obviously want to minimize my taxable income. I'm looking into an HSA as one option to do this. It seems I only need a US address to open an HSA account, but can I deduct the contributions to this HSA from my taxable income and use this money to pay my medical expenses. I do have a high deductible health plan (HDHP), but based in the country I currently reside.  My question: Does anyone see any problems with doing this? Obviously I'd need an account that allows ATM withdrawals, since the healthcare providers here won't likely accept a check or debit payment.


How to get my all data(Like contacts,messages,files,etc) when my mobile screen was broken.  I am used Galaxy j7.And I loss my mobile display by some reason.  My phone still working,but i see all things on screen but dont touch on scrren  call was incoming.  But when I connect my phone with my pc via samsung component .then   Please help me  How can I get all my data.

I just broke the screen of my (unrooted) Galaxy S.  How do I get back my SMS and contacts?   PS: I tried Kies but it won't detect my phone for some reason. (Kies works fine with another Galaxy I possess but not this one)


An apple is a fruit, but a fruit isn't an apple.  This is not about the Definite and indefinite articles. But this is about the subject of:  We are able to call something like an apple a fruit. We are not able to call a fruit an apple (because not all fruits are apples.)   What do you call this aspect of the English language? I remember learning about this particular Topic in either English class, or in a Grammar class.

Bats and rats are mammals. 1 and 2 are positive integers. Oaks and maples are trees. Carrots and cake are food.   I seek a word to describe this, the process of finding a concept that encompasses several given concepts. Is there such a word?


I am trying to learn spring. So I typed up this project but on running it it gives me this error  Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.springframework.context.support.AbstractApplicationContext.<init>(AbstractApplicationContext.java:145) at org.springframework.context.support.AbstractRefreshableApplicationContext.<init>(AbstractRefreshableApplicationContext.java:84) at org.springframework.context.support.AbstractRefreshableConfigApplicationContext.<init>(AbstractRefreshableConfigApplicationContext.java:59) at org.springframework.context.support.AbstractXmlApplicationContext.<init>(AbstractXmlApplicationContext.java:58) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:136) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83) at maven.spring.trial.App.main(App.java:12) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)  Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 12 more   I have tried many solutions given on SO already, like adding commons-logging, via maven, downloading the jar and adding it to my external Libraries.  This is a screenshot of my tree structure-      My Pom.xml:  <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion>  <groupId>com.mkyong.common</groupId> <artifactId>SpringExamples</artifactId> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging>  <name>SpringExamples</name> <url>http://maven.apache.org</url>  <properties>     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties>  <dependencies>     <dependency>         <groupId>junit</groupId>         <artifactId>junit</artifactId>         <version>3.8.1</version>         <scope>test</scope>     </dependency>      <dependency>         <groupId>org.projectlombok</groupId>         <artifactId>lombok</artifactId>         <version>1.16.10</version>         <scope>provided</scope>     </dependency>      <dependency>         <groupId>commons-logging</groupId>         <artifactId>commons-logging</artifactId>         <version>1.2</version>         <scope>compile</scope>     </dependency>      <dependency>         <groupId>org.springframework</groupId>         <artifactId>spring</artifactId>         <version>2.5.6</version>     </dependency>  </dependencies>     I am running the project from my App.java  Can someone help me with this?? Thanks in advance.

I am getting a NoClassDefFoundError when I run my Java application.  What is typically the cause of this?


I was duplicate a simple mesh with just edges and Blender crashed tried to reopen but recrash, tried to restart computer and still crash and now I have any auto save files showed, also the automatic backup file .blend1 crash. I've tried to open the file with the 2.79 blender version but still crash. I can append all object to a new file but is tedious. Is there any other thing that I can try? I have a backup but it's 3 days older!!! I can append new object on that file but still a little bit tedious remember and find the new objects Blender Version 2.90.0 (2.90.0 2020-08-31) Mac os 0.15.6 Catalina Mac book pro 16"" here is the file

When I open a blender file, my project is visible for a few seconds while I can't make any changes to it, and then it closes. Does anyone know how to fix this? This doesn't happen to all of my blender files by the way. I can also start a new project.


I am a brand new user of the Linux-based OS and I would really like to learn it, except I can't even get in the damn thing!!  I have created a LiveUSB using Rufus as per the instructions on the Ubuntu site.  I am using Ubuntu 16.04.3 LTS.  I have a modern ASUS motherboard with a Z170 chipset, so no issues booting from any USB device.  My USB flash drive is a 16GB Kingston Data Traveller G4 USB 3.0.  I also have an nVidia GeForce 970 GTX graphics card jnside my computer and outputting via DVI, if this has any relevance to my problem.    In Rufus, I selected the MBR option for use with UEFI and a FAT32 filesystem.    When I boot the USB device I get the menu to Try Ubuntu etc, with NO scrambled text like what many people have had.  But when I select Try or Install Ubuntu, I get a black screen with lots of garbled characters and nothing happens.  I've tried lots of different Linux-based USB and CD formats, but I always get this far and that's it.  It really is frustrating as I want to try and move away from Windows and learn something new.  Could this be a graphics card problem do you think?  I have also tried disabling Fast Boot and Secure Boot etc but no difference.

This is the third time I've tried to install Ubuntu Server 14.04.03 64-bit on the same laptop, and each time it caused different problems.  Each time I wrote the same iso image to a USB flash drive by using a different application and OS.   Universal USB Installer (pendrivelinux.com) from Windows WinImage writer from Windows built-in image writer from Linux Mint 17.2    The iso image is the same in all three cases, the USB flash drive is the same, and the laptop is the same. However each time the installation of Ubuntu gave me different installation options. For example, the last time I installed Ubuntu, it didn't show all the packages to choose while installing (Basic Ubuntu server, etc.).


I have installed Ubuntu 12.04 , but now I am not satisfied as it has taken more space 100 GB. Since I have to use Windows more often, I found that I am unable to see the files of Ubuntu when I open the Window. Therefore I want to give smaller file system (repartition). Please guide me so that I can reduce the volume of my Ubuntu file system.

I wanted to create more space for Ubuntu on my hard disk in favor of my Windows partition. I booted the livecd and resized the NTFS partition to 100 GB. Then I wanted to resize my Ubuntu (ext4) partition to fill up the created unallocated space.  A screenshot of my current disk. (With the livecd there's no 'key' icon after sda6)    My first thought was just right click on sda6 → move/resize → done. Unfortunately I cannot resize or move the partition. However I can resize the NTFS partition.  I guess it is because the extended sda4 partition is locked. I couldn't see an unlock possibility though…  So how do I resize the ext4 partition anyway, probably by unlocking the extended partition, but how?


I am creating a bitcoin based ad platform for a bitcoin earning portal. The reason I mention it is, I believe, it'll help to understand my problem and thereby I may get a better solution. I am explaining my process in 3 simple steps...   Calculating order amount in PHP...  $orderAmount = $adUnitPrice * $noOfUnit; Creating a new pending order in DB...  INSERT INTO deposit (orderid, orderamount, status) VALUES ('$orderid', '$orderamount', 'pending'); Updating the order when the bitcoin payment is made...  UPDATE deposit SET status = 'success' WHERE orderid = $orderid AND orderamount*100000000 <= $value_in_satoshi AND status = 'pending';   Now, $adUnitPrice is always 0.001. Everything is working fine as long as $noOfUnit is not equal to 70. Whenever $noOfUnit = 70, the update operation is not executing as it turns out that 'orderamount*100000000 <= $value_in_satoshi' is returning false. $value_in_satoshi is equal to 7000000 in this case.    p.s. Even if it was a floating point error, 0.001 represntation in IEEE 754 floating point math is expected to be lower than actual 0.001. So, how can it turns out to be higher ?

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I know this question has been asked multiple times but the solution doesn't work for me.  I have 2 files: 1_all and 2_ovo. They both contain a list of items. 1_all contains items from 2_ovo plus other items. I need to delete all the items from 1_all which are the same as in 2_ovo. This is what I've got:  for i in 2_ovo    do sed -i "/$i/d" 1_all done   So take the value from 2_ovo and delete this value from 1_all.  I know that variables in sed should be handled with double quotes, yet the command does nothing at all. If I substitute $i with a real value, the value is deleted from the file as expected. Any ideas?

I have two lists, a complete list and a partial list. I want a bash script that will search the complete list for any lines that are in the partial, if there are, they will be removed from the complete list. Can anyone help?


I am studying Automata theory.I am little confuse in How to problem is in P or NP complete problems. I did not know understand whether P = NP ? can someone clear my confusion about these problems.

The question of whether P=NP is perhaps the most famous in all of Computer Science. What does it mean? And why is it so interesting?  Oh, and for extra credit, please post a proof of the statement's truth or falsehood. :)


I've read a gazillion times that in Java, arguments passed to methods cannot be modified by the methods. Nonetheless, I find I can modify objects I create as opposed to Java Objects. Consider the following code:      // My Integer Object     class MyInteger {         Integer val;     }      // Change Java Object     public void test1() {         Integer intval;      // Integer object         intval = 123;         setInteger( intval );       // THIS DOESN'T WORK          TTY.putR( "Integer Object="+intval);     }      // Change My Object     public void test2() {         MyInteger myInt;    // MyInteger object         myInt = new MyInteger();         myInt.val = 456;         setMyInteger( myInt );      // THIS WORKS!          TTY.putR( "MyIntegerObject=" + myInt.val );     }      // Set an Integer object     public void setInteger( Integer val) {         val = 888;     }      // Set a MyInteger object     public void setMyInteger( MyInteger myint) {         myint.val = 999;     }   test1 doesn't work as I have been warned. But test2 works just fine. AFAIK, both are objects and are passed by reference. So how come one works and the other doesn't? (Note: TTY is my print function)

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


Has there been a change so that asking a question receives 3 points?  I'm showing +3 for a question I posted, and can't figure out the reason.

On Stack Exchange, users may gain a certain level of reputation.  What does reputation do? How can a user gain or lose reputation?   See also   in the Help Center  - Maximum amount of votes a user can use in a day and reputation requirements to vote.  - How to get an exact overview of the actions that got you your reputation.  - A full list of all privileges granted at each reputation level on all sites.