I have a doubt, I just received the Snaphat hat for a question that was made 2 days ago and I answered two days ago, but until today I have not had more than 3 votes and it has been accepted today.  My question is: should the answer be accepted within 30 minutes of the question being asked? Or is it a bug that has happened to me?

There have been a few cases in which the  was not awarded.   There have also been other cases in which it was awarded incorrectly, on old questions.   What gives?


How do you get all of the inputs of form on a page into an array while matching by input type(text|checkbox|radio)?   JavaScript:  Just plain js like this will give me ALL of the inputs  var inputs = document.getElementsByTagName( 'input' );   Now with jQuery:  I have jQuery loaded and I tried: as per docs ()  $( "<input>" ).is( ":text" );  $( "<input>" ).is( "[type=text]" );    Console Error message:  TypeError: undefined is not a function message: "undefined is not a function" stack: (...) get stack: function () { [native code] } set stack: function () { [native code] } __proto__: Error   Additional information:  The page I am trying to get text inputs on is in an iFrame and this whole interaction is running within a webkit.   My main page has jQuery loaded. The iFrame page does not.   Need to get inputs on iFrame page with jQuery from my main page.

I would like to manipulate the HTML inside an iframe using jQuery.  I thought I'd be able to do this by setting the context of the jQuery function to be the document of the iframe, something like:  $(function(){ //document ready     $('some selector', frames['nameOfMyIframe'].document).doStuff() });   However this doesn't seem to work. A bit of inspection shows me that the variables in frames['nameOfMyIframe'] are undefined unless I wait a while for the iframe to load. However, when the iframe loads the variables are not accessible (I get permission denied-type errors).  Does anyone know of a work-around to this?


Which type of data are answers to this scale?  How is your sleep quality?   Very bad     -    Very good   1, 2, 3, 4, 5, 6, 7  Would answers to this question be ordinal / nominal / interval / or ratio data?   If I want to test the statistical difference in the means for paired samples before and after taking a medicine that is supposed to improve sleep quality, should I use paired samples t-test or Wilcoxon Signed-Ranks Test?    Thanks!

I have some  gained from survey questions.  In my case they are  responses (Strongly Disagree-Disagree-Neutral-Agree-Strongly Agree).  In my data they are coded as 1-5.  I  don't think means would mean much here, so what basic summary statistics are considered usefull?


What would be output if we type something like this in our terminal  /home/user/some character with *  e.g. /home/renga/i*  I pass a variable (home/renga/i*) like this in my script, in run time the value was passed along with a file name instead of /home/renga/i*.

I know using the command ls will list all the directories. But what does the ls * command do ? I used it and it just lists the directories. Does the star in front of ls mean how deep it will list the directories?


I tried pretty much everything I know (which isnt a lot). Like just straight up importing, literally shoving it into the minecraft world files, and just kept changing a copy of the world to like .zip, .dir, and others. The world from MCEE is just a vanilla world and theres no mcee specific blocks since we don't use cheats.

I made a world in Education Edition and would like to continue playing in Bedrock. I exported the world, but when I try and open it in Bedrock it says:   This level was saved from Minecraft: Education Edition. It cannot be loaded.  Is there a way to load it?


When I look at the URL to my profile I see . I want to believe that 344066 is my userid or member number and jack-siro is my username all automatically generated by the system. So why not have me sign in with my username like we do on all other sites like Facebook, Twitter, and so forth.  I would like to be using my username to login to SO. The system can make us have unique usernames to use to login with.

I recently changed my username to Undo. I was amazed when I pressed Submit and saw that it actually went through - surely someone somewhere was using this same username.  Out of curiosity, I then search the SO user list for Undo - and found  with Undo as thier name. They have 50 rep. I have around 1,500.   Is there some kind of pecking order, I.e. a high-rep user can 'steal' a low-rep user's name? Or is this a bug?  Or can two users have the same username without causing the SO servers to go down in a burning ring of fire?


How many ways are there to seat $n$ couples around a circular table such that no couple sits next to each other?  I know that since there are $n$ couples, there are $2n$ people.   I need to use Inclusion-Exclusion. However I am unsure of how to go about this problem.

Here is the question,  :     A group of n married couples comes to a group discussion session where   they all sit around a round table. In how many ways can they sit so   that no person is next to his or her spouse? (Note that two people of   the same sex can sit next to each other.   I appreciate any tips or advice.


I'm experiencing some weird behavior using \include instead of \input. I create a custom table of contents with all frames which I fill by creation of the frametitle on every slide and with creation of every section automatically. In the minimal example I do that fully manual to keep the example simple.  Usually I have one .tex file per frame (maximum 2 or 3), so I can interchange frames between presentations easily. So in my main file you can find just the \sections and \include.  However the line  \addcontentsline{lbf}{section}{First Section\par}   seems to be executed after \include as you can see here:  with \include    In comparison \input works as desired and expected.  with \input    I can't see any logical reason for this behavior. What's wrong?   I'd like too keep using \include, mainly because of the \excludeonly functionality. Are there alternatives to switching to input?  \RequirePackage{filecontents} \RequirePackage{excludeonly}  \documentclass{beamer}  \begin{filecontents}{frames.tex} \begin{frame} \frametitle{Test Frame One} \addcontentsline{lbf}{subsection}{First Frame\par}% test \end{frame}  \begin{frame} \frametitle{Test Frame Two} \addcontentsline{lbf}{subsection}{Second Frame\par}% test \end{frame}  \begin{frame} \frametitle{List of Frames} \listofframes \end{frame} \end{filecontents}  \begin{filecontents}{exframes.tex} \begin{frame} \frametitle{Excluded Test Frame} \addcontentsline{lbf}{subsection}{Excluded Frame\par}% test \end{frame} \end{filecontents}  \makeatletter \newcommand\listofframes{\@starttoc{lbf}} \makeatother  \excludeonly{exframes}  \begin{document}  \section{Test section one} \addcontentsline{lbf}{section}{First Section\par}%  %\input{frames.tex}\input{exframes.tex} \include{frames}\include{exframes}  \end{document}   Further remarks   Using or modifying the original ToC provided by beamer (which would work) is no option as I want to keep its complete functionality as it is. Of course I could put the  \addcontentsline inside the include command, but that wouldn't work for my workflow using interchangeable frames, so it's no option neither In the worst case I'd use \input, so if you think that's the only way it would be nice to have an explanation   Thank you!    The answer of the duplicate question, which did the job, is .

My LaTeX document is acting strangely. Here is a simplified version of it:  \documentclass{article}  \begin{document}  \tableofcontents \newpage  \addcontentsline{toc}{part}{A Part of My Document} \include{includedfile}  \end{document}   And in includedfile.tex:  \section{My Section Title} Quack.   Clearly, in the table of contents, the heading for the part should precede the one for the section, but it doesn't! What's wrong?


I am trying to install Ubunt 16.1 on my PC (MSI GTX 1080 Ti, Motherboard: ASUS Z170-P). I used the Nvidia 381 driver by apt-get. Additionally I tried other versions of Ubuntu (16.04.1, 14.04.5), another version of the Nvidia driver (378.13). In all cases it behaves the same, immediately after login it automatically logs out. Also I tried this the steps from this guide  with no change. How to see what exactly happens internally and how to fix?

This didn't start out as a problem with the login loop.  I was attempting a clean install of Ubuntu 16 and using the new feature that allows it to detect proprietary drivers for me.  I started off with   When I attempted to use the recommended Nvidia Drivers, it caused the laptop to become unstable and freeze.    I attempted the remedy from that post and it resulted in a login loop.  I have attempted   sudo mv ~/.config/dconf/user ~/.config/dconf/user.old   Tried   sudo mv ~/.Xauthority ~/.Xauthority.backup sudo service lightdm restart   I have tried locating and disabling secureboot, but there is no secureboot option in the bios.  This is an HP DV2000 series laptop.  Nothing is helping    Can someone help?  edit:  Guest session does the same loop.  /var/log/Xorg.0.log shows a lot of stuff, but I took a pic of what seems relevant   Thing is the driver I first tried that started this mess was 304 drivers and the 364 drivers were supposed to be the fix according to other posts.  More editing:  I purged the nvidia files and it came back to a blank desktop w/o the interfaces so I right clicked and restored a backup.. The sidebar came back and it was running gallium.  I restarted and its the blank purple screen again.  I am thinking of just reinstalling and not using nvidia drivers.  The software center is telling me I have a presario and i should use 304 drivers.  Its not a presario. =(  At least the software center provides a suggestion for the coprocessor driver which is nice.


I'm a tunisian student, i have a dream to persuit masters educations in a better university in Europe, USA, UK or Canada. I have a Bachelor degree (Licentiate, BAC+3) in computer science and multimedia field and i speak and write three languages fluently(Arabic-Frensh-English). I would like to know if a have enough chance to reach it and what to do? Any recommandations will be helpfull. Thank's

When applying to a PhD program in the US, how does the admissions process work? If an applicant is weak in a particular area, is it possible to offset that by being strong in a different area?  Note that this question originated from this . Please feel free to edit the question to improve it.


I know that convergence in probability does not imply convergence in mean. However, does convergence in mean imply convergence in mean square? I can't think of any counter-examples of this so I don't know if it is true or not.

Is there an example where convergence in mean does not imply convergence in quadratic mean. $E|X_n-X|\rightarrow 0$ but $E|X_n-X|^2 \nrightarrow 0$.  It seems like this should be fairly straightforward, but I cannot really come up with an answer.  I'd imagine the answer would look something like   $$X_n=\begin{cases}a & \text{with probability } \frac{1}{n} \\\  0& \text{with probability } 1-\frac{1}{n} \end{cases}$$


I am confused how I should treat capitalisation in the following cases:  Example 1  Include the following themes in your writing:   respect, e.g. students must respect their teachers.   Q1: Should "students" start with a capital letter (note it is a complete sentence).  Example 2  There are many types of punctuations:   full stop ends a sentence, e.g. the dog belongs to my neighbour.   Q2: Should "the" start with a capital letter (note it is a complete sentence).   Finally,   Q3: Should the list start with a capital letter (e.g. Respect or Full stop) and end with a full stop.

Possible Duplicate:          Let's say I have a bullet point list e.g:   Point 1. Point 2.  Point 3.    Notice I have put a capital letter for the starting letter of every bullet point and a full stop at the end. Is this the correct way to do it?  If not, what is the correct way to do it?  Do I put a capital letter and no full stop, or, the other way around, a full stop and no capital letter? Alternatively, do I not put a capital letter or a full stop? Is it only necessary to put a capital letter on the first bullet point and full stop on the last bullet point?  For reference, I'm from the UK so British-English grammar would apply.


At the start of Season 4 of Arrow, we see a flash-forward teaser scene: Oliver Queen at a grave.  The Flash shows up and apologizes for not being able to help out, and Oliver says he understands, because Flash was busy with his own villain.  Flash nods and runs off at his customary super-speed.  However, by the time the story catches up to this point,       The Flash has been depowered.     This would seem to indicate that this Arrow episode is taking place further ahead of the storyline for The Flash.  In Rupture, the The Flash episode that aired immediately after this Arrow episode, though, two things happen to cast doubt on this interpretation:  At the beginning of Rupture, we see that Cisco has       rigged some STAR Labs satellite technology to project a holographic image of The Flash, to help make people think he's still around and provide what assistance he can to the police this way.  However, I'm disinclined to believe that it was a hologram talking with Oliver, because he was was talking with Oliver, in a fully interactive, normal conversation.   Second, at the end of Rupture,       something goes wrong and Barry appears to die horribly by disintegration.  He has not gotten his powers back at this point.   In light of this, when does the graveyard scene take place, and what's Barry's status?  Do we have any official answer so far?

At the end of Arrow S04E19 we see that      Barry still has his speed, when he runs off after Oliver says "I want to be alone".   So where does this Arrow episode occur in time, in relation to the Flash? Because as of The Flash S02E18's ending we know that      Barry no longer has any speed force, Zoom siphoned it in exchange for Wally West.   So where does this episode of Arrow occur in relation to the CW-verse timeline?


From: Elementary Number Theory: Primes, Congruences, and Secrets by William Stein  ${Lemma}$ $1.1.9.$ For any integers a and b, we have gcd(a, b) = gcd(b, a) = gcd(±a, ±b) = gcd(a, b − a) = gcd(a, b + a).  $Proof.$ We only prove that $gcd(a, b) = gcd(a, b − a)$, since the other cases are proved in a similar way. Suppose $d | a$ and $d | b$, so there exist integers $c_1$ and $c_2$ such that $dc_1 = a$ and $dc_2 = b$. Then $b−a = d(c_2−c_1)$, so $d | b − a$. Thus $gcd(a, b) ≤ gcd(a, b − a)$, since the set over which we are taking the max for $gcd(a, b)$ is a subset of the set for $gcd(a, b − a)$. The same argument with a replaced by $−a$ and $b$ replaced by $b − a$, shows that $gcd(a, b − a) = gcd(−a, b − a) ≤ gcd(−a, b) = gcd(a, b),$ which proves that $gcd(a, b) = gcd(a, b − a)$.  I don't understand how they came to this conclusion:     Thus $gcd(a, b) ≤ gcd(a, b − a)$, since the set over which we are taking   the max for $gcd(a, b)$ is a subset of the set for $gcd(a,b-a)$.

Given: $a = qb + r$. Then it holds that $\gcd(a,b)=\gcd(b,r)$. That doesn't sound logical to me. Why is this so?    Addendum by LePressentiment on 11/29/2013: (in the interest of  and averting a duplicate)  What's the intuition behind this result? I only recognise the proof and examples solely due to algebraic properties and formal definitions; I'd like to apprehend the result naturally.


I have double values like 0.0345333 or 1.0897777 and I want to convert them to 0.034 and 1.089 in Java?  How can I do it?  I want to convert the values, not print them since I need it for calculation.  I find the following way but I am looking for simple way. double score=(tff* idf); DecimalFormat df = new DecimalFormat("#.###"); p.score=Double.parseDouble(df.format(score));

What I would like is a method to convert a double to a string which rounds using the half-up method - i.e. if the decimal to be rounded is 5, it always rounds up to the next number. This is the standard method of rounding most people expect in most situations.  I also would like only significant digits to be displayed - i.e. there should not be any trailing zeroes.  I know one method of doing this is to use the String.format method:  String.format("%.5g%n", 0.912385);   returns:  0.91239   which is great, however it always displays numbers with 5 decimal places even if they are not significant:   String.format("%.5g%n", 0.912300);   returns:  0.91230   Another method is to use the DecimalFormatter:  DecimalFormat df = new DecimalFormat("#.#####"); df.format(0.912385);   returns:  0.91238   However as you can see this uses half-even rounding. That is it will round down if the previous digit is even. What I'd like is this:  0.912385 -> 0.91239 0.912300 -> 0.9123   What is the best way to achieve this in Java?


Somewhat new to Linux. Starting out to get into nitty gritty details. See a lot of ttys in /dev. What are they and what do they do? I do know that tty stands for teletype but nothing beyond that.

I've been reading the  and it mentions about virtual terminals which, if I understood it correctly, it is a Linux-specific feature (not in Unix) to allow multiple login consoles in a non X11 system. You create virtual terminals by pressing ALT-F2. I'm running Linux Mint and in my /dev folder though I see many tty devices and I don't know what they are for. Here is the grepped output:  crw-rw-rw-  1 root tty       5,   0 Jan  2 19:45 tty crw--w----  1 root tty       4,   0 Jan  2 19:10 tty0 crw-rw----  1 root tty       4,   1 Jan  2 19:10 tty1 crw--w----  1 root tty       4,  10 Jan  2 19:10 tty10 crw--w----  1 root tty       4,  11 Jan  2 19:10 tty11 crw--w----  1 root tty       4,  12 Jan  2 19:10 tty12 crw--w----  1 root tty       4,  13 Jan  2 19:10 tty13 crw--w----  1 root tty       4,  14 Jan  2 19:10 tty14 crw--w----  1 root tty       4,  15 Jan  2 19:10 tty15 crw--w----  1 root tty       4,  16 Jan  2 19:10 tty16 crw--w----  1 root tty       4,  17 Jan  2 19:10 tty17 crw--w----  1 root tty       4,  18 Jan  2 19:10 tty18 crw--w----  1 root tty       4,  19 Jan  2 19:10 tty19 crw-rw----  1 root tty       4,   2 Jan  2 19:10 tty2 crw--w----  1 root tty       4,  20 Jan  2 19:10 tty20 crw--w----  1 root tty       4,  21 Jan  2 19:10 tty21 crw--w----  1 root tty       4,  22 Jan  2 19:10 tty22 crw--w----  1 root tty       4,  23 Jan  2 19:10 tty23 crw--w----  1 root tty       4,  24 Jan  2 19:10 tty24 crw--w----  1 root tty       4,  25 Jan  2 19:10 tty25 crw--w----  1 root tty       4,  26 Jan  2 19:10 tty26 crw--w----  1 root tty       4,  27 Jan  2 19:10 tty27 crw--w----  1 root tty       4,  28 Jan  2 19:10 tty28 crw--w----  1 root tty       4,  29 Jan  2 19:10 tty29 crw-rw----  1 root tty       4,   3 Jan  2 19:10 tty3 crw--w----  1 root tty       4,  30 Jan  2 19:10 tty30 crw--w----  1 root tty       4,  31 Jan  2 19:10 tty31 crw--w----  1 root tty       4,  32 Jan  2 19:10 tty32 crw--w----  1 root tty       4,  33 Jan  2 19:10 tty33 crw--w----  1 root tty       4,  34 Jan  2 19:10 tty34 crw--w----  1 root tty       4,  35 Jan  2 19:10 tty35 crw--w----  1 root tty       4,  36 Jan  2 19:10 tty36 crw--w----  1 root tty       4,  37 Jan  2 19:10 tty37 crw--w----  1 root tty       4,  38 Jan  2 19:10 tty38 crw--w----  1 root tty       4,  39 Jan  2 19:10 tty39 crw-rw----  1 root tty       4,   4 Jan  2 19:10 tty4 crw--w----  1 root tty       4,  40 Jan  2 19:10 tty40 crw--w----  1 root tty       4,  41 Jan  2 19:10 tty41 crw--w----  1 root tty       4,  42 Jan  2 19:10 tty42 crw--w----  1 root tty       4,  43 Jan  2 19:10 tty43 crw--w----  1 root tty       4,  44 Jan  2 19:10 tty44 crw--w----  1 root tty       4,  45 Jan  2 19:10 tty45 crw--w----  1 root tty       4,  46 Jan  2 19:10 tty46 crw--w----  1 root tty       4,  47 Jan  2 19:10 tty47 crw--w----  1 root tty       4,  48 Jan  2 19:10 tty48 crw--w----  1 root tty       4,  49 Jan  2 19:10 tty49 crw-rw----  1 root tty       4,   5 Jan  2 19:10 tty5 crw--w----  1 root tty       4,  50 Jan  2 19:10 tty50 crw--w----  1 root tty       4,  51 Jan  2 19:10 tty51 crw--w----  1 root tty       4,  52 Jan  2 19:10 tty52 crw--w----  1 root tty       4,  53 Jan  2 19:10 tty53 crw--w----  1 root tty       4,  54 Jan  2 19:10 tty54 crw--w----  1 root tty       4,  55 Jan  2 19:10 tty55 crw--w----  1 root tty       4,  56 Jan  2 19:10 tty56 crw--w----  1 root tty       4,  57 Jan  2 19:10 tty57 crw--w----  1 root tty       4,  58 Jan  2 19:10 tty58 crw--w----  1 root tty       4,  59 Jan  2 19:10 tty59 crw-rw----  1 root tty       4,   6 Jan  2 19:10 tty6 crw--w----  1 root tty       4,  60 Jan  2 19:10 tty60 crw--w----  1 root tty       4,  61 Jan  2 19:10 tty61 crw--w----  1 root tty       4,  62 Jan  2 19:10 tty62 crw--w----  1 root tty       4,  63 Jan  2 19:10 tty63 crw--w----  1 root tty       4,   7 Jan  2 19:10 tty7 crw--w----  1 root tty       4,   8 Jan  2 19:10 tty8 crw--w----  1 root tty       4,   9 Jan  2 19:10 tty9


I've run a cross a shell script with BUILDDIR=${BUILDDIR:-"/data"} which , upon experimentation, takes the original BUILDDIR if it exists and isnt an empty string, and otherwise sets it to /data. What I don't understand is how the expression works - why the : and - operators and how they work.

I saw this in the end of an awesome shell script but I can't understand the login here because I think it's being short-handed for a longer command.  spark ${@:-`cat`}   This apears at the end of . Any ideas?  + Marks for some one who extends it into a full segment of code, even if its slower (Better for explanation)


How would I prove that $\{r^n\}_{n\in\mathbb{N}^+}$ converges to $0$ if $0 < r < 1$? I've tried using $\epsilon-N$ but the only way I can isolate $n$ is by getting $n > \frac{ln|\epsilon|}{ln|r|} = log_{r}|\epsilon|$. Is there something I'm not getting here? Am I allowed to choose $N > log_{r}|\epsilon|$?

Prove that the $\lim_{n\to \infty} r^n = 0$ for $|r|\lt 1$.   I can't think of a sequence to compare this to that'll work.  L'Hopital's rule doesn't apply.  I know there's some simple way of doing this, but it just isn't coming to me. :(


when I run sudo command ,  so when I mess up my password, I have to start over from scratch, is there a trick to enable password  asterisks so I know how letter I have typed?

When I'm about to install a program in the terminal it wants the password:  [sudo] password for xxx:   But when I start to type my password nothing happens. What should I do?


Can I have Dropbox sync files outside my Dropbox folder?  I'm using windows & I'm try to use Boxifier app but it's limit and don't help me

How can I do this with Dropbox:   I want to ensure that all my files stored under C:\Users\Gerard\Images and C:\Users\Gerard\Documents are stored automatically online. I don't want to copy them manually into the C:\Users\Gerard\Dropbox folder, since I'm very likely to forget things.  I don't want to use twice the space on my hard drive duplicating all files from my images folder to my dropbox.   Should I:   Stop using C:\Users\Gerard\Images to store things, and store everything under C:\Users\Gerard\Dropbox\Images instead? Or... Use a tool to synchronize my C:\Users\Gerard\Images and C:\Users\Gerard\Documents files with C:\Users\Gerard\Dropbox


Is there any way to install Intel HD graphics in Ubuntu  If yes then how? If no then how I reduce blue color from my lcd

I use to work at night and it is eye-hurting to watch at lightbulb-bright screens (I've got two - laptop's built-in panel and an external 18-inch CRT) in a dark environment. So I adjust my screens to be darker.  Can I do this a software way instead of pressing monitors' buttons that many times every time?


We know that temperature is another word for particle movement. The lowest possible temperature, known as "absolute zero", −273,15° Celsius or 0 K, is the point where the particles don't have any kintec energy, thus not moving.    So what is the highest possible temperature? My assumption is that particles cannot move faster than light (or, any particle with mass actually cannot reach c), so is this point the highest possible temperature?  Thanks in advance and I apologize for any language mistakes (I live in Germany)

If temperature makes particles vibrate faster, and movement is limited by the speed of light, then I would assume that temperature must be limited as well. Why is there no limit?


It is well-known that, for a commutative ring $A$ which is not a PID, there may exist a triple of ideals, $0\neq I, J_1, J_2$ such  that $J_1\neq J_2$ but $IJ_1=IJ_2$. I would like to present an explicit example of this fenomenon to my students at a basic undergraduate course in commutative algebra. Do you have any suggestion?  Essentially the unique examples they will understand will be about polinomial rings and matrix rings.

Let $R$ be a commutative integral domain, $I,J,K$ three ideals of $R$ with $I\neq (0)$ being finitely generated. Then does $IJ=IK$ imply $J=K$?   With Nakayama lemma, I can prove it if one of $J$ and $K$ equals to $R$. And I also know it holds when $R$ is a Prüfer domain or $I$ is singly generated.


For any body on earth will the only acceleration it has be gravity or should we take into consideration even centrifugal force due to rotation?  Is there any precise formula to determine the net acceleration?

Let us say a block of mass is placed on the surface of earth. Then while drawing the forces on that body, we say:   Force $F = mg$ acting towards the center of Earth. Normal reaction $N$ offered by the surface of Earth.   If no other forces are acting, we say $F=N$. But what about the centrifugal force $m\omega^2R$ . Why don't we ever bring that into picture? What am I missing?


I've been using this code to change the appearance of references (enclosing the number within round brackets):  \let\oldref\ref \renewcommand{\ref}[1]{(\oldref{#1})}   After that, I wanted to make references "clickable" so I added the package hyperref using the hidelinks option:  \usepackage[hidelinks]{hyperref}   The links work fine but I'm wondering why the brackets are no longer visible. Obviously hyperref is redefining \ref but \let should update my definition too. This is independent of the order in which those instructions appear in the code. Where's the problem?

I'm editing a book that includes about 25 papers written in LaTeX by different authors.  Since many of them use the same \label, to avoid collisions I redefined the \label command (and \ref and \pageref and \cite and \bibitem)  so that if the third paper has  \label{main_theorem} the aux file actually uses the tag "iii:main_theorem", and \ref{main_theorem} actually refers to the same tag.  I did a similar thing for \cite and \bibitem.  %*************** bib/cite hacks \let\TheReal@citex=\@citex \let\TheReal@bibitem=\@bibitem \let\TheReal@lbibitem=\@lbibitem \gdef\@lbibitem[#1]#2{\TheReal@lbibitem[{#1}]{#2\roman{chapter}}} \gdef\@bibitem#1{\TheReal@bibitem{#1\roman{chapter}}} \gdef\@citex[#1]#2{% \toks@={}\count@=0% \@for\@citec:=#2\do{% \advance\count@ 1 \ifnum\count@=1\edef\0{\the\toks@\expandafter\expandafter\noexpand\@citec\roman{chapter}}% \else\edef\0{\the\toks@,\expandafter\expandafter\noexpand\@citec\roman{chapter}} \fi% \toks@=\expandafter{\0}}% \TheReal@citex[#1]{\the\toks@}% } %************** label/ref/pageref hacks  %%%%%%%%%%%%% must be before ams pkgs \let\TheRealLabel=\label \let\TheRealRef=\ref \let\TheRealPageref=\pageref \gdef\label#1{\TheRealLabel{\roman{chapter}:#1}} \gdef\ref#1{\TheRealRef{\roman{chapter}:#1}} \gdef\pageref#1{\TheRealPageref{\roman{chapter}:#1}}   This all worked fine until I used hyperref, which seems to ignore the redefinition of \label, whether I load it before or after the above code.  Any suggestions?  It would be nice if the redefinition would work whether or not hyperref was loaded, so I don't want to just grab the defintion of \label out of the package and tweak it.  I'm also open to alternative methods.  Redefining \label and \ref just seemed the most straightforward (to me) solution.  Note that I also want to be able to refer to the inner labels from outside, as well.  For example, I might want to say "the main theorem of the third paper is  \ChapRef{iii}{main_theorem}  from within the introduction (a different chapter).


Does the extra d6 damage apply to all attacks against the hexed creature (for example, Scorching Ray or Magic Missile) or just one?

The Hex spell increases the damage when you hit with an attack and Eldritch Blast is a spell which causes you to make a spell attack roll.  Does any attack roll trigger the extra damage of Hex, or only attacks generated by the attack action?


I am trying to encrypt part of a mySQL-database with AES_ENCRYPT, and of course retrieve the data later on with AES_DECRYPT. But when the field contain special characters like æ, ø eller å, these come back as �  I have been trying to read up on why this is, but haven't found a solution.  First of I change the field-type to BLOB:  ALTER TABLE 'table' MODIFY field BLOB   Then I do the encryption:  UPDATE 'table' SET field = AES_ENCRYPT(field, '$key')   Everything is stored, but when trying to extract the data again:  SELECT AES_DECRYPT(field,'$key') AS variable FROM table WHERE....   all the special characters are displayed as � when echo in PHP  I think I got the UTF-8 covered, in both HTML and mySQL:  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />   and  mysqli_set_charset($connect,'utf8');   so storing the special characters in the mySQL-database, retrieving and displaying them with PHP works just fine as long as the field is VARCHAR and no encryption has been done. I also read about problems with the special characters in binary fields like BLOB, but I recon I'm not the first one that tries to encrypt and store an Æ or an Ø :)  Any hints would be really appreciated! Thanks!

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I've reproduced this behaviour in different communities, so it's very likely to be a general problem. I'm using Google Chrome in both Android and Windows 10. When the question has a big list of tags, we then become able to scroll to the sides as well. Take for example  In Windows 10 using Chrome's Toggle device toolbar option in Galaxy S5 (the same happens in other devices like Pixel 2, iPhone X, ...)  In Android using Chrome

This appears to be a css bug which (I think) has recently been introduced. It's most visible when viewing questions on Stack Exchange sites using mobile devices (the full site with responsiveness, not the mobile site) but can easily be reproduced by resizing a browser window on a question where the combined width of the tags is large. A couple of example questions show this behaviour:  On Meta Stack Overflow:   On Meta Stack Exchange:     Using the Meta Stack Overflow question to demonstrate (as the total width of the tags is larger):  At 1100px, the tags just about fit into their containing div.     At 800px, the tags appear on top of related questions:     At 450px, the tags are now wider than the view (the last tag is completely off the screen), causing scroll bars to appear:      This doesn't happen to lists of questions - the tags flow onto multiple lines:     Reproduced on: { Firefox 81, Chrome 84, Edge 84 } on Windows 10, and Chrome 85 on Android 11.


I have a field that contains data like this:  1763_250116_0_040 1763_250132_4_030 1763_250132_99999_030   I need to get out:  0 4 99999   How could I accomplish this with TSQL?

Using SQL Server, how do I split a string so I can access item x?  Take a string "Hello John Smith". How can I split the string by space and access the item at index 1 which should return "John"?


I usually enumerate my propositions, definitions etc. with (Hindu-)Arabic numerals (e.g. Definition 1.1.1., Proposition 1.1.2., Theorem 2.1.1. etc.). I would hence like to enumerate my equations with a single Roman numeral with a non-resetting counter, so as not to confound the two.   \documentclass{report}  \renewcommand{\theequation}{\Roman{equation}}  \begin{document}  \chapter{First chapter}  \begin{equation} 1 + 1 = 2. \end{equation}   \chapter{Second chapter}  \begin{equation} 1 + 2 = 3. \end{equation}   \end{document}   As is, both equations are labelled (I).  How can I adjust my code, so as to prevent the equation counter from resetting with every new chapter?  I am aware of the existence of . It does not answer my question, as it pertains to abstracts specficially.

Some document elements (e.g., figures in the book class) are numbered per chapter (figure 1.1, 1.2, 2.1, ...). How can I achieve continuous numbering (figure 1, 2, 3, ...)?  And vice versa: Some document elements (e.g., figures in the article class) are numbered continuously. How can I achieve per-section numbering?  \documentclass{book}% for "vice versa" variant, replace `book` with `article`  \begin{document}  \chapter{foo}% for "vice versa" variant, replace `\chapter` with `\section`  \begin{figure} \centering \rule{1cm}{1cm}% placeholder for graphic \caption{A figure} \end{figure}  \end{document}   Bonus question: Is it possible to adjust the numbering of the sectioning headings themselves? Can I, e.g., switch from per-chapter to continuous numbering of sections in the book class?


I'm wondering if I can change the root directory of an Ubuntu web server from:  /var/www/html   to:  /home/Janderson/magento   How would I do this? I want to access Magento when I go to localhost in my web browser, and not anything else.  This is not a production environment, it's a local development environment.

I installed the ubuntu 12.04 server edition for my server pc . i had installed lamp server. i need to change the var/www location to my secondary hard disk location. i was configured so many time to at gedit /etc/apache2/sites-available/default here is my code  <VirtualHost *:80>     ServerAdmin webmaster@localhost      #DocumentRoot /var/www     DocumentRoot /media/myserver/     <Directory />         Options FollowSymLinks         AllowOverride None     </Directory>     #<Directory /var/www/>         <Directory /media/myserver/>         Options Indexes FollowSymLinks MultiViews         AllowOverride None         Order allow,deny         allow from all     </Directory>      ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/     <Directory "/usr/lib/cgi-bin">         AllowOverride None         Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch         Order allow,deny         Allow from all     </Directory>      ErrorLog ${APACHE_LOG_DIR}/error.log      # Possible values include: debug, info, notice, warn, error, crit,     # alert, emerg.     LogLevel warn      CustomLog ${APACHE_LOG_DIR}/access.log combined      Alias /doc/ "/usr/share/doc/"     <Directory "/usr/share/doc/">         Options Indexes MultiViews FollowSymLinks         AllowOverride None         Order deny,allow         Deny from all         Allow from 127.0.0.0/255.0.0.0 ::1/128     </Directory>  </VirtualHost>   and also used  sudo chown -R var/www /media/myserver/   and  chmod -R 755 /media/myserver/   still i was not able to connect my /media/myserver and my browser show the following message  Forbidden  You don't have permission to access / on this server.   Please tell anyone how to mount myserver at my var/www, thanks advance


i have class named sagum which has a method name paint  public void paint(Graphics g) {      int[] apw1 = null;     int n1 = 0;     for (int j = 1; j <= n1; j++) {         g.drawRect(50, 50, (apw1[j] * 20), 30);         String[] p = null;         g.drawString("p" + p[j - 1], (55 + (apw1[j - 1] * 20)), 70);         g.drawString("" + apw1[j - 1], 50 + (apw1[j - 1] * 20), 100);     }     g.drawString("" + apw1[n1], 50 + (apw1[n1] * 20), 100);  }   im trying to call it   n1=count+1;  paint(g);   and im getting an error  non-static method paint(Graphics) cannot be referenced from a static context   im simply trying to call it after a method is executed to do an a graphical app of my method (scheduling algorithm).   please help

The very common beginner mistake is when you try to use a class property "statically" without making an instance of that class. It leaves you with the mentioned error message:     You can either make the non static method static or make an instance of that class to use its properties.   Why? I am not asking for solutions. I would be grateful to know what is the reason behind it. The very core reason!  private java.util.List<String> someMethod(){     /* Some Code */     return someList;             }  public static void main(String[] strArgs){                // The following statement causes the error. You know why..     java.util.List<String> someList = someMethod();          }


Let $X(t) = \left[\begin{matrix}a(t) & b(t) \\c(t) & d(t)\end{matrix}\right]$ and let $U$ be a nonsingular matrix. How do you solve $$\frac{d}{dt} X(t)=UX(t)$$ I presume there is some general method to solve these kinds of ODEs but I cannot find anything about it, online.   BTW: -----------------  I know that you can get 4 ODE equations for the four unknown functions of $t$. The problem is that each ODE equation includes other functions as so $$\frac{d a}{d t}=u_{11}a+u_{12}c$$

Solve the following system of equations  $ \begin{cases}  x_1^{'}(t)=x_1(t)+3x_2(t) \\  x_2^{'}(t)=3x_1(t)-2x_2(t)-x_3(t) \\  x_3^{'}=-x_2(t)+x_3(t)\end{cases} $.  First, I create the column vectors $X$ and $X^{'}$. Then the matrix $$A= \begin{bmatrix} 1 & 3 & 0  \\ 3 & -2 & -1 \\ 0 & -1 & 1  \\ \end{bmatrix} $$  Now, I find the eigenvalues, $-4,3,1$ and their corresponding eigenvectors $(-3,5,1)^T (-3,-2,1)^T (1,0,3)^T$.   I'm just not sure how to take it from here and solve the system of differential equations. I want a diagonal matrix $D$ so that I can read the solutions easy, but I'm not sure how to do it.  EDIT   Building on @Francisco 's answer, I'd have that:  $$X=c_1  (-3,5,1)^T  e^{-4t}   + c_2 (-3,-2,1)^T e^{3t} + c_3 (1,0,3)^T e^{t} $$.  But I believe this could be written in a simpler form.


It is possible to call anyone without sim card...I mean adding anyones number as emergency call number and call anyone as emergency call?

On the default lock screen, whether using pattern or pin, there is a button at the bottom which says "Emergency Call". But if I try to call my home number or anything it tells me "That is not an emergency call." What does it let through? Is it only 911?   Is there any way to tell it to allow a certain set of numbers from the emergency button, like to set a list of emergency numbers such as: 911, Home and Wife? This would seem like it would be very useful, so if someone finds you smooshed on the road, they know these certain people should be called.


How to reproduce (at least for me):   Open a question (it musn't be closed yet)   Clicking on 'close' shows me the loading animation (the rectangles) for about 3 - 4 seconds. Clicking on 'flag' also shows me the loading animation, but even longer: 4 seconds was the longest time period I could measure!    My system:   IE 10 and Chrome 30 (both show the same problem) If the OS matters, it's Windows 8 Pro 64-bit.   Is the loading time intended behaviour? Did anyone else notice that change?  Note that all other parts of the StackOverflow website show great performance!  Screenshot from Chrome network tab:

I'm consistently receiving significant delays on Stack Overflow when opening the flag dialog on questions. Delays do not occur on any other StackExchange site I have checked. This started a couple days ago (as far as I can tell).  Delays occur not only when loading the initial screen, but also when loading the submenus. This is slightly confusing for a couple seconds (until you're used to it) since it appears as if the flag dialog has simply vanished.   What's going on here? I demand to know, otherwise somebody will be very upset.  Not me. I'm not going to get that upset over something like this.  But someone will.    Specs (though I know of several others who have this issue):  Windows 7 64-bit Chrome Version 30.0.1599.69m     Ping: 31ms Download: 6.88mbps   Upload: 1.07mbps


I was trying to boot Xubuntu, Ubunto, and many other variants, initally on BIOS my USB stick  was never detected to boot from, so after reading online I found out that I need a (bootia32.efi) to be placed in ISO Root - EFI/BOOT, I copied the (bootia32.efi) to that directory and my USB Sitck was detected in BIOS menu, now selecting to boot from the USB  Stick, brings up the menu of installation to chose from, I tried all options in that boot screen such as (boot to Xubunut without installing, Installing Xubntu, etc) and I was only presented with a black screen that dont seem to do anything, and of course I manually edited my BIOS to turn off secure boot, and placing the USB stick on top of the boot order, after digging further am starting to suspect that in EFI/BOOT I would need a (grubia32.efi) since am running windows 10 with x86 processor and a 32bit which does't support x64 grub, can anyone help on how to get a grubia32.efi so I can see if it boots? thanks a lot in advance!

I have a computer (Asus T200TA) with 2G RAM and 32-bit UEFI [Yep, what a wonderful idea to put 32-bit UEFI!]. I have two options:   Install a 64-bit system, boot manually and install grub-efi-ia32. Drawback: 2G is not much, systems with such low RAM are said to run better on 32-bit systems. Install a 32-bit version. (but from my state of knowledge it's not trivial to boot)   Which option would be better?


I have a dictionary where for a single key there is more than one value. From the dictionary i want to check the value to find the key and also find the index of the value.  genDict2= {"A":["GCT","GCC","GCA","GCG"],            "B":["TAA","TGA","TAG"],            "C":["TGT","TGC"],            "D":["GAT","GAC"]}  alphaSet =[] for i in range(len(genCollect)):     for k, v in genDict2.items():         if genCollect[i] in v:             alphaSet.append(k) print(alphaSet)   From this code I can find the key but don't know how to find the index of the value. Suppose if the input is 'GCC TAG GAT' then the output should be 'ABD' and ' 120'.

Given a list ["foo", "bar", "baz"] and an item in the list "bar", how do I get its index (1) in Python?


When I am reading some secure computing papers, the authors always assumed that there exist some adversaries, such as non-uniform adversary and the probabilistic polynomial-time adversary. So my question is that what are the main difference between the non-uniform probabilistic polynomial-time adversary and the probabilistic polynomial-time adversary ?

I'm trying to understand PPT and in particular what the differences are in uniform and non-uniform PPT's. First, this is how I see it:  A probabilistic polynomial-time (PPT) algorithm $A$ is an algorithm that runs in polynomial time but also has access to some oracle which provides true random bits. So if we input $x$ into $A$, instead of getting an output $y = A(x)$ that is a deterministic value, we get a random variable $Y$ which has a certain probability of being a set of different values.  A non-uniform PPT $A$ is PPT whose description size (i.e., $|A|$) is not constant, but polynomially increasing with its input. I've seen definitions like $A = \{A_1, A_2, \dots\}$ where every $A_i$ is a PPT.   Are my observations/conclusions wrong? And if so, please correct me. Some definitions I have seen for a non-uniform PPT is that we insert some "advice string" along with the input to $A$. But what exactly is that advice string?   Best regards


I would like to load a set of programs (browser, terminals, image viewer) in a certain layout (meaning the same tiling). I tried using i3-msg split to start a programm and then apply a tiling to it. Problem is there is a delay between starting the programm and a window comming up, making it very inconsistent. So is there a way to start up a bunch of programms in the same tiling layout with a single command?

Is it possible with I3Wm to populate an entire workspace with determined size, position and commands for each window?  I know I can do i3-msg "exec xterm -e 'ls; bash'" to create a new window, but I can't specify his position and size.  Maybe there is also an alternative by declaring via JSON the layout or something like that?


I'm passing a lot data around; specifically, I'm trying to pass the output of a function into a class and the output contains a tuple with three variables. I can't directly pass the output from my function (the tuple) into the class as in the input parameters.    How can format the tuple so it is accepted by the class without input_tuple[0], input_tuple[1], input_tuple[2]?   Here is a simple example:  #!/usr/bin/python  class InputStuff(object):      def __init__(self, a, b, c):         self.a = a         self.b = b         self.c = c   input_tuple = (1, 2, 3) instance_1 = InputStuff(input_tuple)  # Traceback (most recent call last): #   File "Untitled 3.py", line 7, in <module> #     instance_1 = InputStuff(input_tuple) # TypeError: __init__() takes exactly 4 arguments (2 given)  InputStuff(1, 2, 3) # This works

In the following method definitions, what does the * and ** do for param2?  def foo(param1, *param2): def bar(param1, **param2):


If there is a  on the battlefield and a second  enters, do both cards trigger and opponent loses x life where x is devotion times 2, or does just the one card entering the battlefield trigger?

If I have two cards called  in hand and I play my first, Sin Collector (A). I use its triggered ability.   "When Sin Collector enters the battlefield, target opponent reveals his or her hand. You choose an instant or sorcery card from it and exile that card."  Now, I play Sin Collector (B), I use B's triggered ability.  But now my question. Does Sin Collector (A)'s ability trigger again as well? 'Sin Collector' entered the battlefield again, right?


I read the following article in Java (Why charcter array is better choice than string for storing password)  1) Since Strings are immutable in Java if you store password as plain text it will be available in memory until Garbage collector clears it and since String are used :in String pool for re-usability there is pretty high chance that it will be remain in memory for long duration, which pose a security threat. Since any one who has access to memory dump can find the password in clear text and that's another reason you should always used an encrypted password than plain text. Since Strings are immutable there is no way contents of Strings can be changed because any change will produce new String, while if you char[] you can still set all his element as blank or zero. So Storing password in character array clearly mitigates security risk of stealing password.  2) Java itself recommends using getPassword() method of JPasswordField which returns a char[] and deprecated getText() method which returns password in clear text stating security reason. Its good to follow advice from Java team and adhering to standard rather than going against it.  3) With String there is always a risk of printing plain text in log file or console but if use Array you won't print contents of array instead its memory location get printed. though not a real reason but still make sense.  String strPassword="Unknown"; char[] charPassword= new char[]{'U','n','k','w','o','n'}; System.out.println("String password: " + strPassword); System.out.println("Character password: " + charPassword);   OutPut:  String password: Unknown Character password: [C@110b053  Question: Relating to the above article how it works in .Net, is it the same or something else, Could someone please give me in-depth knowledge of String and char, how they work?

I'm trying to grok the purpose of .NET's SecureString.  From MSDN:  An instance of the System.String class is both immutable and, when no longer needed, cannot be programmatically scheduled for garbage collection; that is, the instance is read-only after it is created and it is not possible to predict when the instance will be deleted from computer memory. Consequently, if a String object contains sensitive information such as a password, credit card number, or personal data, there is a risk the information could be revealed after it is used because your application cannot delete the data from computer memory. A SecureString object is similar to a String object in that it has a text value. However, the value of a SecureString object is automatically encrypted, can be modified until your application marks it as read-only, and can be deleted from computer memory by either your application or the .NET Framework garbage collector. The value of an instance of SecureString is automatically encrypted when the instance is initialized or when the value is modified. Your application can render the instance immutable and prevent further modification by invoking the MakeReadOnly method.  Is the automatic encryption the big payoff? And why can't I just say: SecureString password = new SecureString("password");  instead of SecureString pass = new SecureString(); foreach (char c in "password".ToCharArray())     pass.AppendChar(c);  What aspect of SecureString am I missing?


This screenshot is from Windows app called MyRadar by ACME AtronOmatic LLC. I found their wind direction animation to be very visually appealing and was wondering if anyone knew how to create this animation?      I prefer Java, Python, C++, or MATLAB answers for the code for creating this animation if possible.  Edit: So I know MATLAB and Python already have libraries for creating vector fields. However, I only found the ones that only change the direction and magnitude of the arrow. In this animation, the vector field arrow moves along the vector field.

I want to render an animated vector field map . How can I do this?


I am designing a wireless charger for my cellphone, Where my Primary coil is energised with 1.5V and 0.3A, Where I have used a transistor to turn it on and off at a frequency of 1Mhz. In the secondary coil I got a peak to peak voltage of 32V and Vavg of 0.8V, Which I later rectified using a resistor and capacitor in parallel and I achieved a Vavg of 5.8V and the current in Microamps.  Since the current was insufficient to charge my cellphone,How can i improve the current in secondary Coil. Note: My primary coil had 40 turns Secondary coil had 20 turns.  The distance between primary and secondary coil is less than 1cm        – Schematic created using

I want to understand the way this circuit works. The following are diagrams of the transmitter and receiver of a wireless iPod charging circuit. I have added a link to the instructable that describes this project. From what I have understood, the transmitter takes the DC input voltage,and turns it into an oscillating signal that can be transferred to the receiver circuit through the inductor. The recieving circuit then rectifies, filters and regulates this signal to give DC output?  Is that how this is working?  Also, are the resistors in the receiver circuit put there for the female USB? Why? Also when I bought the diodes for the transmitter circuit, I could only get 1 UF4007 and the other is a 1N4001. Will that affect the functioning of the circuit?  Thank you for your time!   This is the transmitter circuit.   This is the receiver circuit.


Is there a saying or a quote, when something good happen thanks to something bad ? Like you meet someone because you've lost someone else ?

If someone is the bearer of bad news you might say, Don't shoot the messenger. If you have something that seems unfortunate at first but ends out wonderful you might say it's a blessing in disguise.  I'm looking for a word or phrase that is a combination of the two - a bad experience that is actually bad, but ultimately heralds something good.  For example - if a couple is trying to get pregnant, and the wife gets morning sickness. There is nothing fun about vomiting and nausea, but it potentially heralds wonderful news for the soon-to-be-parents.  Is there an expression to describe the morning sickness?


We often say that the conservation of the energy could be violated by a quantity $\Delta E$ but only within a precise interval of time $\Delta t$, dictated by the Heisenberg principle ($\Delta t \lesssim h/\Delta E$). But in the Heisenberg principle it seems that the $\Delta t$ should be greater, not lesser, than this:  $$ \Delta t \cdot \Delta E > h/4\pi.$$ How could I explain all this in plain words to my students?

In non-relativistic QM, the $\Delta E$ in the time-energy uncertainty principle is the limiting standard deviation of the set of energy measurements of $n$ identically prepared systems as $n$ goes to infinity. What does the $\Delta t$ mean, since $t$ is not even an observable?


I would like to disable automatic calculation on a single Google sheet and then have a trigger, either by button or through some implementation of scripts, inserting a column, etc that will allow me to easily recalculate the entire sheet at will, but not automatically.

I have the following formula in a sheet:  =if(E1="HOLD",,query(Cust_Orders!B6:Z5000,"Select Y,G,I,H,K where H>0  "))   With E1 being a drop down with values HOLD and FETCH  The recalculation when I go to FETCH takes about 13 seconds.  But when it is in HOLD, the query doesn't exceute, and everything goes blank. Not what I want.  I'm trying to avoid recalculating this query every time I make a change in the Cust_Orders range, but keep the old values, as two different pivot tables that are viewed by other people are dependent on it.  Google spreadsheet recalc settings all are 'on change and foo'  Is there a way to do this?


In essence, my JSON is printing NULL for fields that contain a special character.  I have read around the subject and followed the duplicate question, as well as other threads, one post in particular highlighted that I need to do the following:  If you're using mysqli, you can call set_charset(): $mysqli->set_charset('utf8mb4');       // object oriented style mysqli_set_charset($link, 'utf8mb4');  // procedural style If you're stuck with plain mysql but happen to be running PHP ≥ 5.2.3, you can call mysql_set_charset. If the driver does not provide its own mechanism for setting the connection character set, you may have to issue a query to tell MySQL how your application expects data on the connection to be encoded: SET NAMES 'utf8mb4'.  I have done this as documented in the openConnection() function as below in my connection script:  <?php  ini_set('display_errors', 1);  ini_set('log_errors',1);  error_reporting(E_ALL);  mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);  class MySQLDao{  var $dbhost = null; var $dbuser = null; var $dbpass = null; var $conn = null; var $dbname = null; var $result = null;  public function __construct(){     $this->dbhost = Conn::$dbhost;     $this->dbuser = Conn::$dbuser;     $this->dbpass = Conn::$dbpass;     $this->dbname = Conn::$dbname; }  public function openConnection() {      $this->conn = new mysqli($this->dbhost, $this->dbuser, $this->dbpass, $this->dbname);     if (mysqli_connect_errno())         echo new Exception("Could not establish connection with database"); mysqli_set_charset($this->conn, "utf8mb4"); }   I have been through my database in phpMyAdmin and converted all my collations to ut8mb4_bin.  I have put in the mysql_set_chars line as suggested, and I have also changed all of my tables to utf8mb4 through this type of command ALTER TABLE teams CHANGE name name VARCHAR(191) CHARACTER SET utf8mb4 COLLATE  utf8mb4_unicode_ci;  These are my database setting from phpMyAdmin:     My web server details are   Apache   Database client version: libmysql - 5.0.77   PHP extension: mysqli Documentation   PHP version: 5.3.3   Yet none of this has fixed my problem.  My character_set_server is displaying as latin1, could this be the issue?  +--------------------------+--------------------+ | Variable_name            | Value              | +--------------------------+--------------------+ | character_set_client     | utf8mb4            | | character_set_connection | utf8mb4            | | character_set_database   | utf8mb4            | | character_set_filesystem | binary             | | character_set_results    | utf8mb4            | | character_set_server     | latin1             | | character_set_system     | utf8               | | collation_connection     | utf8mb4_unicode_ci | | collation_database       | utf8mb4_unicode_ci | | collation_server         | latin1_swedish_ci  | +--------------------------+--------------------+  I am at a loss at what else to try.

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I need to prove it with proof by cases. I graphed it out and it seems that I need to put into 2 cases which is when x$>$1 and x$>$-5. But this where my problem is, how do plug that back into the statement? Would it just be calculating (x-1)+(x+5)?

Say the following expression is to be proven for all real $x$:     $$|x-1| + |x+1| \geq 2$$   Is it sufficient to just look at the cases where $|x-1|$ and $|x+1|$ are minimum? Or is it necessary to show that the expression it true using other algrebraic manipulations?


We are a young family of two, both working and having comparatively equal income. The question is how do we budget our common expenses (relatively equally) and at the same time preserve our freedom to spend some money on personal needs.  I would like to have this system as transparent as possible and to store all transactions for further analysis. So maybe someone can suggest an app that satisfy this requirements?  So basically the question consists of two parts:   Concept of finance management for two people with equal income Means to efficiently sustain this finance management system   Thanks in advance to everyone for having time to read and suggest a solution. I am also very interested and will appreciate if you share your own experience in solving this problem.

My wife and I are recently married, both of us are working hard. At the moment we currently have the same system as prior to our marriage. Which simply put is that both of have our own bank accounts and we split the costs between us.  We will soon be taking out a mortgage for a house. Any recommendations how to arrange our bank accounts in an intelligent system so that we can put our money together?


We have a SQL Server 2008 ENT 64bit SP3 server running Server 2008 R2 Standard SP1 64-bit. This is also a windows/sql clustered environment. There is the cluster alias for the server, and then we have 2 AD DNS aliases as well for the server  Suddenly I can't connect to the sql instance in Management Studio, or with a Powershell Invoke-SQLcmd IF I am doing it from that actual server, when using one of the dns alias names, or "localhost". If I use the Cluster alias name it works and if I use the other dns alias name it works.  Using management studio with the non-working dns alias I get "Login failed. The login is from an untrusted domain and cannot be used with Windows authentication."  If I use localhost, I get "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)"   Shared Memory and TCPIP are enabled in SQL Server Config manager but named pipes is not. But we've NEVER had named pipes enabled, and don't have it enabled on any of our other sql servers and they're set up the same (clustering, dns aliases...etc) and are having no issues.  I've Googled around and had a view people suggest listing what other SQL servers it can see (cmd prompt sqlcmd -L) If it do it from a good server I see all other servers on my network including the "bad" one. If I do that command from the "bad" server, I get no results at all.  Pretty much checked everything from this blog and it's all ok except the sqlcmd -L issue I just mentioned above.    Windows firewall is not enabled.  This was working just fine for a couple of years. I'm not sure when this started happening, but I know that at some point, it was not happening.  And the other kicker...it's only happening locally to this server. If I connect with management studio or run a powershell Invoke-Sqlcmd from another machine, or my local machine connecting to the "bad" server, it works fine no matter what alias I use.  I'm stumped. I think it sounds like an issue with the AD alias (there are 2 ad aliases, 1 works locally the other doesn't)...but not being able to connect with localhost makes me question that.  any help is greatly appreciated.


\documentclass[11pt]{article}  \usepackage[utf8]{inputenc} \usepackage{listings} \usepackage{amsmath} \usepackage{amssymb}  \begin {document}  \begin{tabular}{|c|c|c|} \hline Characteristic & DSPWM & DSVPWM \\ \hline Boosting & - & - \\ \hline DC Utilization & Less & 15% More \\ \hline THD & More & Less \\ \hline pf & Poor & Greater \\ \hline Switching Loss & More & Less \\ \hline \end{tabular}   \end{document}`

when I try to write 90% I do 90 $%$ , but none works and anything after the % doesn't print in the output, any solution ?


How one can prove that if $x,y,z>0$ and $x^2+y^2+z^2=3$ then $x+y+z\geq (xy)^2+(yz)^2+(zx)^2$? I tried AM-GM but without success.

Let $a,b,c$ are non-negative numbers, such that $a+b+c = 3$.  Prove that $\sqrt{a} + \sqrt{b} + \sqrt{c} \ge ab + bc + ca$    Here's my idea:  $\sqrt{a} + \sqrt{b} + \sqrt{c} \ge ab + bc + ca$  $2(\sqrt{a} + \sqrt{b} + \sqrt{c}) \ge 2(ab + bc + ca)$  $2(\sqrt{a} + \sqrt{b} + \sqrt{c}) - 2(ab + bc + ca) \ge 0$  $2(\sqrt{a} + \sqrt{b} + \sqrt{c}) - ((a+b+c)^2 - (a^2 + b^2 + c^2) \ge 0$  $2(\sqrt{a} + \sqrt{b} + \sqrt{c}) + (a^2 + b^2 + c^2) - (a+b+c)^2 \ge 0$  $2(\sqrt{a} + \sqrt{b} + \sqrt{c}) + (a^2 + b^2 + c^2) \ge (a+b+c)^2$  $2(\sqrt{a} + \sqrt{b} + \sqrt{c}) + (a^2 + b^2 + c^2) \ge 3^2 = 9$  And I'm stuck here.  I need to prove that:   $2(\sqrt{a} + \sqrt{b} + \sqrt{c}) + (a^2 + b^2 + c^2) \ge (a+b+c)^2$ or  $2(\sqrt{a} + \sqrt{b} + \sqrt{c}) + (a^2 + b^2 + c^2) \ge 3(a+b+c)$, because $a+b+c = 3$  In the first case using Cauchy-Schwarz Inequality I prove that:  $(a^2 + b^2 + c^2)(1+1+1) \ge (a+b+c)^2$  $3(a^2 + b^2 + c^2) \ge (a+b+c)^2$  Now I need to prove that:   $2(\sqrt{a} + \sqrt{b} + \sqrt{c}) + (a^2 + b^2 + c^2) \ge 3(a^2 + b^2 + c^2)$   $2(\sqrt{a} + \sqrt{b} + \sqrt{c}) \ge 2(a^2 + b^2 + c^2)$   $\sqrt{a} + \sqrt{b} + \sqrt{c} \ge a^2 + b^2 + c^2$   I need I don't know how to continue.  In the second case I tried proving:  $2(\sqrt{a} + \sqrt{b} + \sqrt{c}) \ge 2(a+b+c)$ and  $a^2 + b^2 + c^2 \ge a+b+c$  Using Cauchy-Schwarz Inequality I proved:  $(a^2 + b^2 + c^2)(1+1+1) \ge (a+b+c)^2$  $(a^2 + b^2 + c^2)(a+b+c) \ge (a+b+c)^2$  $a^2 + b^2 + c^2 \ge a+b+c$  But I can't find a way to prove that $2(\sqrt{a} + \sqrt{b} + \sqrt{c}) \ge 2(a+b+c)$  So please help me with this problem.  P.S   My initial idea, which is proving:  $2(\sqrt{a} + \sqrt{b} + \sqrt{c}) + (a^2 + b^2 + c^2) \ge 3^2 = 9$  maybe isn't the right way to prove this inequality.


This is my first time working with JavaFX, I tried to create a KeyListener (KeyTyped) that reacts to the whole scene, since I don't like to always click into textfields/areas etc.  So I got the following code:  package view;  import controller.Function; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.fxml.FXMLLoader; import javafx.fxml.Initializable; import javafx.scene.Node; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.scene.control.TextField; import javafx.scene.input.KeyEvent; import javafx.stage.Stage;  import java.io.File; import java.io.IOException; import java.net.URL; import java.util.ResourceBundle;   public class MainGame implements Initializable {      public TextField txtText;     protected String word = "ABC";      void start(ActionEvent event) throws IOException {         URL url = new File("src/main/java/view/MainGame.fxml").toURI().toURL();         Parent MainGame_parent = FXMLLoader.load(url);         Scene MainGame_scene = new Scene(MainGame_parent);         Stage primaryStage_stage = (Stage) ((Node) event.getSource()).getScene().getWindow();         primaryStage_stage.setScene(MainGame_scene);         primaryStage_stage.show();          MainGame_scene.addEventFilter(KeyEvent.KEY_TYPED, (KeyEvent ev) -> {             //System.out.println(Function.decrypt(word, txtText.getText(), ev.getCharacter().charAt(0)));             //txtText.setText(Function.decrypt(word, txtText.getText(), ev.getCharacter().charAt(0)));             //Function.won(word, txtText.getText());         });     }      @Override     public void initialize(URL url, ResourceBundle rb) {         txtText.setText(Function.encrypt(word));     }  }   Now, this code itself works, it just doesn't do anything if a key is pressed. The three comments would be responsible for that, but whenever I uncomment one or more, they cause a NullPointerException. I have already tried to print the different values. Every value worked except for txtText, which caused a NullPointerException.  I have tried moving it to different places, putting it into an own function, putting it into initialize, not declaring it in the class body but in the function and I also tried putting the rest of the start method in the constructor. Sadly none of those things worked.   I have no idea what to do and how to fix this. Thanks for any help!

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?


Let $I$ ba a two-sided ideal of a ring $R$ and $M$ be an $R-$ left module. Prove that if $M$ is an $R-$ projective left module then $M/IM$ is an $R/I-$ projective left module.  It is easy to see that $M/IM$ has the structure of $R/I-$module. I need some ideas to prove that $M/IM$ is an $R/I-$ projective left module.  Thank you very much.

If P is a projective right module over a ring R  and J is a two sided ideal of R.  Prove that P/PJ  is   a  projective right module over R/J  .  My idea was trying to proof that " $M$ is an $R$-module iff  $M$ is an module over $R/J$ " where J is an ideal of R .


I want to prove following statement:  If $H$ and $K$ are finite supgroups of a group $G$, then $$|HK| = \frac{|H||K|}{|H\cap K|}$$  This is a proposition 13 in Dummit and Foote's Abstract Algebra chapter 3.3.   Intuitively, I can guess the order of $|HK|$ is proportional to $|H|$ and $|K|$ modulo some intersection.   The textbook states,  \begin{align} HK = \bigcup_{h\in H} hK \end{align} then it suffices to show that there are $\frac{|H|}{|H\cap K|}$ distinct cosets in this union.   I can understand the division of $HK$ as a sum of $hK$, but I'm having trouble understanding the next step.   Can you explain this in more detail?   Perhaps another proof of this will be helpful.     I have found same problem in     Now I have some sense.

I am wondering how to prove the formula $|HK| = \dfrac{|H| \; |K|}{|H \cap K|}$ where $H$ and $K$ are finite groups. Let $|H|$ denote the order of $H$ and so on.  I have seen proofs from these websites:  and .  But I do not really understand the idea of the proof. Can someone explain the proof to me, please? Thanks so much.


In eclipse, if you have a .exe file in the package how would you run it? I know if it is outside you would just add in the path, but what would the path be for something inside the project?

I am executing an exe through my java program. The path is hardcoded in Java.  I have packaged my the exe in the jar.  But am stuck as I have the path name hardcoded in the Java file, so I am not able to execute my jar as a stand alone program.  Any hints for packaging such jar i.e having an exe inside and able to run it as a stand alone program?


So new user here, decided to change my server to ubuntu 20.04. So far i like it a lot. I'm running into an issue tho, i have multiple hard drives with tb of data all in ntfs. Don't really want to have to convert them, i figured out how to mount them automatically on startup but i can't get the right to do anything but read on them. Tried all i could find by myself on google, chmod, chown, logged as root to do those too. Mostly tried what's in here ---->  I'm out of ideas. Is that possible somehow? Thanks for the help!!!

I have two NTFS partitions, and I don't want to mount them manually every-time I start Ubuntu.   How can I do this?  Is there a tool or a code to use?   If so, is it safe to automount? specially when they are being used by another OS?


The following sentence appears in a letter I am editing:     If this date and time are not convenient please contact me at ...   Structurally, this seems okay, but it feels very awkward. Shouldn't it read:     If this date and time is not convenient please contact me at ...

Can anyone tell me if I should use inspire or inspires in this phrase?     An extraordinary leader whose vision, values, integrity and boundless curiosity inspires all who follow in his footsteps.


I have the following code which return "YXX". I would like to know why the second print displays an 'X' whereas the key-word virtual is used in the class X. So the line tab[0] = y1 will be set tab[0] as an Y object and displays 'Y' due to the virtual method isn't it ?   #include <iostream>  class X {     public: virtual void f() const { std::cout << "X"; } };  class Y : public X {     void f() const { std::cout << "Y"; } };  void print(const X &x) { x.f(); }  int main() {     X tab[2];     Y y1;     tab[0] = y1;      print(y1);     print(tab[0]);     print(tab[1]);     std::cout << std::endl; }

Someone mentioned it in the IRC as the slicing problem.


It's the first time after ten years of linux os (debian). I've a script in user home:  /home/user/bin/script1.sh   with correct permissions. Using shell, script runs. Inside crontab:  30 13   * * *   user        /home/user/bin/script1.sh   I see the log of cron.log like below:  Dec 27 13:30:01 server1 /USR/SBIN/CRON[22709]: (user) CMD (       /home/user/bin/script1.sh)   but script1.sh doesn't start

This is a  about using cron & crontab.   You have been directed here because the community is fairly sure that the answer to your question can be found below. If your question is not answered below then the answers will help you gather information that will help the community help you. This information should be edited into your original question.  The answer for 'Why is my crontab not working, and how can I troubleshoot it?' can be seen below.  This addresses the cron system with the crontab highlighted.


Reading package lists... Error! W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty_universe_binary-amd64_Packages) W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ trusty/universe i386 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty_universe_binary-i386_Packages) W: Unknown Multi-Arch type '2oreign' for package 'fonts-tlwg-mono' E: Problem parsing dependency Depends E: Error occurred while processing mcp-account-manager-uoa (NewVersion2) E: Problem with MergeList /var/lib/dpkg/status E: The package lists or status file could not be parsed or opened.   I get this when I try and install apps or update using terminal and software updater.  Content of /etc/apt/source.list  # deb cdrom:[Ubuntu 14.04.4 LTS _Trusty Tahr_ - Release amd64 (20160217.1)]/ trusty main restricted  # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. deb http://archive.ubuntu.com/ubuntu trusty main restricted deb-src http://archive.ubuntu.com/ubuntu trusty main restricted  ## Major bug fix updates produced after the final release of the ## distribution. deb http://archive.ubuntu.com/ubuntu trusty-updates main restricted deb-src http://archive.ubuntu.com/ubuntu trusty-updates main restricted  ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team. Also, please note that software in universe WILL NOT receive any ## review or updates from the Ubuntu security team. deb http://archive.ubuntu.com/ubuntu trusty universe deb-src http://archive.ubuntu.com/ubuntu trusty universe deb http://archive.ubuntu.com/ubuntu trusty-updates universe deb-src http://archive.ubuntu.com/ubuntu trusty-updates universe  ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu  ## team, and may not be under a free licence. Please satisfy yourself as to  ## your rights to use the software. Also, please note that software in  ## multiverse WILL NOT receive any review or updates from the Ubuntau ## security team. deb http://archive.ubuntu.com/ubuntu trusty multiverse deb-src http://archive.ubuntu.com/ubuntu trusty multiverse deb http://archive.ubuntu.com/ubuntu trusty-updates multiverse deb-src http://archive.ubuntu.com/ubuntu trusty-updates multiverse  ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse  deb http://archive.ubuntu.com/ubuntu trusty-security main restricted deb-src http://archive.ubuntu.com/ubuntu trusty-security main restricted deb http://archive.ubuntu.com/ubuntu trusty-security universe deb-src http://archive.ubuntu.com/ubuntu trusty-security universe deb http://archive.ubuntu.com/ubuntu trusty-security multiverse deb-src http://archive.ubuntu.com/ubuntu trusty-security multiverse  ## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. ## This software is not part of Ubuntu, but is offered by Canonical and the ## respective vendors as a service to Ubuntu users. # deb http://archive.canonical.com/ubuntu trusty partner # deb-src http://archive.canonical.com/ubuntu trusty partner  ## This software is not part of Ubuntu, but is offered by third-party ## developers who want to ship their latest software. deb http://extras.ubuntu.com/ubuntu trusty main deb-src http://extras.ubuntu.com/ubuntu trusty main deb http://archive.ubuntu.com/ubuntu trusty universe # deb-src http://cz.archive.ubuntu.com/ubuntu trusty main universe # deb-src http://cz.archive.ubuntu.com/ubuntu trusty main universe

The computer gave me this output in a window:  E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_natty_main_binary-i386_Packages E: The package lists or status file could not be parsed or opened.   How can I fix this?


There is perfect security model when connecting to Amazon AWS instance. But I would like to be able to make such key my self for custom user. To be clear it will be user with git repository, but it should not matter.  Could be nice if someone give reference to keys in general.

I am and my friend working on the same project, he has ssh permission for repo, he gave me his ssh key and I want to import it to my  id_rsa.pub, but after I get Permission denied error when want to clone project. Can somebody help me? Thanks!


I want to remove Windows 7 from my Toshiba Satellite and do a fresh install of Ubuntu on it. How can I get that done?

I would like to see a full how-to guide on how to install Ubuntu.


A lot of popular Instagram artists use this type of glitter in their art and I am trying to achieve the same effect. It seems to be some type of overlay I have tried asking where these people got the overlay but no one wants to share their secret.  Examples of Artists Using this Effect:

How can I create that glitter tears effect and the sparkles?


The problem is shown on the picture. I want to use prime symbol for derivative of vector, but as you can see, it doesn't look well (prime symbol and vector arrow are 'glued' together). What would be the easiest way to fix it?

I write a vector with an arrow above the letter using \vec{p} and sometimes the vector needs to be primed using ' (or ^{\prime}, equivalently).  However, neither  \vec{p}'     nor  \vec{p'}     looks satisfactory (first option: prime dash overlaps with vector arrow, second option: arrow looks misplaced).  How would one write a primed vector?


I am looking for an example of an infinite ring having finitely many zero divisors. Is that possible?  If there is such ring please give a hint.

Please help me to prove that if $R$ is an infinite ring, then $R$ has either an infinite number of zero divisors, or it has no zero divisors.


Can someone help me with this assignment:  Let $\Re z <0$. Prove that $z_n=(1+z) \left(1+\frac{z}{2} \right) ... \left( 1+ \frac{z}{n} \right) \to 0$.  I was trying to look for a sequence $a_n$ which goes to $0$ as $n$ goes to $\infty$ such that  $|z_n|^2 \le a_n$ but I've failed...

We have a complex number $z$ such that $\Re (z)<0$ and the sequence $ z_n = \prod_{k=1}^n (1+ \frac{z}{k})$. Prove that $\lim_{n \rightarrow \infty} z_n = 0$.    How to do it? I guess it will be easier to prove that $\lim_{n \rightarrow \infty} |z_n|^2 = 0$, it's a trick that usually helps, but even though I thought about if for a longer while, I don't know how to prove it. May somebody help?


This is an extension of the question on SO  If I see a process being run as "NT AUTHORITY\SYSTEM" account, can I start a program with "NT AUTHORITY\SYSTEM" credentials? Something like run as option.

How can I get a command prompt as the SYSTEM user on Windows 7?  Context: I'm testing a computer startup script, and I need to figure out the behavior of a command when run as SYSTEM rather than my user account.  I've seen ways to do this with at and psexec, but those methods only appear to work on Windows XP or Windows Vista.  I'm using Windows 7 Pro SP1.


I often record meetings that can run 2 hours long. When I play them back, it is very hard to drag that tiny little slider to navigate to the point at which I left off. Often, I will tap the wrong thing and the Voice Memo returns to the beginning point. Both of these scenarios are very frustrating. It would be nice to play recordings back on an app that will Pause and stick even if you close the app. And it would be great to be able to have a more precise slider to navigate within a long recording.

I tried, but my voice memo gets paused. If this isn't possible, is there any way to import voice memos to ipod (kind of workaround)?


I have a genuine copy of windows 7 home basic. I downloaded ISO file of windows 10 from Microsoft website using other computer and copied the file from that computer to CD.If I install this ISO file,can I activate it using windows 7 genuine versions key.if not how can I make my windows 10 genuine ?

I'd like to know if given an existing Windows PC, are there any concrete reasons why a clean install should be performed over an update.  Articles like  refer to "bloatware" and "clutter" on the PC and rightly suggest that this might not be something that you want on the upgraded PC.  refers to "crashes" and upgrades being "problematic". Both are fairly non specific as to what these problems might be though.  If I'm happy that there is no bloatware or clutter on the PC prior to the upgrade, are there any specific known issues that can cause specific problems when upgrading rather than clean installing?  Or is it just a case of being sure?


I currently have a very simple op amp circuit for a non-inverting amplifier, using a UA741 with the gain set as 2.  I have a sensor that outputs 0-2.3V and I'm attempting to amplify it up to 0-4.6V.  The set up for the op amp is below.    The problem is that when I test this circuit under about 2.5V the amplified output voltage just sits at a steady 4V.  Is this a problem with the chip, or is there something I need to do in the circuitry?  I was going to try an LMV324 as well, but I would have to power it with a lower voltage which made testing the circuit more difficult.  Any insight is appreciated.

Simple enough question. Why not use a  in a target circuit or anyone's target circuit? What are the reasons not to use it? What might be the reasons to still choose this part?


It may sound silly but I need to understand below code I saw on  YT channel. Can you explain use of <> brackets in a function.         public async Task<List<T>> LoadData<T, U>(string sql, U paramertes)     {         string connectionString = _config.GetConnectionString(ConnectionStringName);          using (IDbConnection connection = new SqlConnection(connectionString))         {             var data = await connection.QueryAsync<T>(sql, paramertes);             return data.ToList();         }     }  I cannot understand how does T, U generic return types and parameters are defined in <> while defining LoadData<T, U>() . I love watching this YT channel and have learned alot but cant figure this out. sorry for being silly

I thought I'd offer this softball to whomever would like to hit it out of the park. What are generics, what are the advantages of generics, why, where, how should I use them? Please keep it fairly basic. Thanks.


I am not finding solution to add variable inside following RegEx   val.replace(/[^\d.]/gm,'')   Basically I need to change the . to variable. Something like    val.replace("/[^\d"+sepaeator+"]"/gm,'')

I would like to create a String.replaceAll() method in JavaScript and I'm thinking that using a regex would be most terse way to do it.  However, I can't figure out how to pass a variable in to a regex.  I can do this already which will replace all the instances of "B" with "A".  "ABABAB".replace(/B/g, "A");   But I want to do something like this:  String.prototype.replaceAll = function(replaceThis, withThis) {     this.replace(/replaceThis/g, withThis); };   But obviously this will only replace the text "replaceThis"...so how do I pass this variable in to my regex string?


a friend has a corrupt excel file. When you attempt to open it in excel it says "File format is  not valid". None of the tricks  work.  The file is Excel 2003 format. She sometimes edits it on excel 2010, but still saves in 2003 format so it works on the home computer. There are no charts or formulas or anything fancy. Just a multi sheet workbook where she records movies, books, restuarants, etc along with variaous comments and stuff.  The data is still in the file. I can extract all the raw ascii looking strings with a perl script. But this has no table layout so is not as useful, gives us a worst case base.  Also using tools such as  and  show most of the data all lined up properly in rows and columns. But she can't really afford to fork out the $1-200 for these tools so we cannot save the data.  Does anyone know of good open source tools or other methods I could use to extract the data from this corrupt file in a meaningful way. Namely still in a table format.

I'm trying to restore some files for a friend who messed up a USB stick by pulling it out of the computer too soon. By searching invisible partitions I was able to restore the files. All files are intact, except 1 excel file that seems to be corrupted.  I've googled about ways to repair an Excel file, because the default repair options in Excel 2003-2010 do not work for this file. I've came across a numerous  third-party apps, of which the  one seemes to be able to do the job: Recovery Toolbox for Excel.  Of-course, this and all other apps I found require a purchase to actually repair the file. It seems a bit silly to pay 30 dollars for a one time thing, and something that is not for myself. So, I would like to keep that as a last-resort option.  Is there anything I can try to fix this? I've attached a screenshot of how the file looks when I open it on my OSX when converted to a HTML file (to view the code), for  the option that it could be a character set problem.


I am looking for the convergence of $$\sum_{n=1}^\infty \frac{\sqrt[n]{n} - 1}n$$  I have tried ratio test/ root test and tried to compare with other convergent series but I do not get anywhere. Also, limit comparison of $a_n$ didn't seems to work.

I am trying to conclude about the convergence of $$\sum_{n=1}^{\infty}{\sqrt[n]{n}-1 \over n}$$ If I take ${\sqrt[n]{{\sqrt[n]{n}-1 \over n}}}= {\sqrt[n]{\sqrt[n]{n}-1} \over \sqrt[n]{n}}$ this looks like it converges to $0$ but I am suspicious about the numerator. At the same time, other techniques I know like the ratio test, $n(\sqrt[n]{n}-1)$ and comparisons don't yield meaningful results. Any hints?


When I try to iterate through my 2D array of objects, I get a NullPointerException. I know that means the object I am trying to use is null, but I can't see why. I have 3 classes, Main, Map, and Tile. The array is a 2D array of tiles within the class Map. I then create a new Map called map1 in Main, and try to read some values from each tile with a for loop.  Main:  public class Main {     public static void main(String[] args) {         Map map1 = new Map(5, 6);         map1.listTiles();     } }   Map:  public class Map {      int width;     int height;     Tile[][] tiles;      public Map(int Width, int Height) {         width = Width;         height = Height;         tiles = new Tile[width][height];     }      public void listTiles() {         for(Tile[] tileArray : tiles){             for(Tile tile : tileArray) {                 System.out.println(tile.tileType);             }         }     } }   Tile:  public class Tile {     public String tileType = "Grass";     public int xCoord = 0;     public int yCoord = 0; }   As it turns out, replacing System.out.println(tile.tileType); with System.out.println(tile); results in null being written to the console 30 times. I still don't know why though.

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 have .lib and .h but do not have their source, so the wrapper does not offer. I need to use objects from .lib .h C#  struct Node: public Nown{     virtual NMRESULT            Get(Nodeip** ppNodeip)=0;     virtual NMRESULT            Load(LPCSTR Name,char** Value=0,int Count=0)=0; };   example code, how i can use this?

I have a lot of libraries written in C++. I want to call these libraries from C#, however, I have met many problems. I want to know if there is a book or guideline to tell me how to do that.


I'm so stuck and can't find an answer anywhere!  Which printer is the best for printing greeting cards and stationery? I don't want to outsource as I'd like full control over colours, fonts etc. So a home printer that will ensure that my graphics don't fade.  I print onto a thick, matte, slightly textured paper.  Thank you!

I a working on a number of projects that I will design and frame along with a bunch of greeting cards. What is the best printer to buy for printing greeting cards?   I was looking at the Epson Stylus Photo 1400 Inkjet Printer. Is an inkjet or laser printer better? I've read a lot of pros and cons on each. I'm looking for a printer with full bleed and preferably large prints as well.   I need to print a lot and a laser printer is great for printing large quantities, but are also more likely to curl the paper due to more heat than the inkjet. But the inkjet I've read is better for true color.   Not sure which is better or which brand and style to go with.


I have a series of file names of the form "J9.0_Feature_ML_111.json". I need to retrieve the integer number after the J and before the "."  I can get it on Pythex.org using (?<=J)(\d+) but when I try and implement it in Python using   import re filename = 'J9.0_Feature_ML_111.json' num = re.match(r"(?<=J)(\d+)", filename).group()   I get a NoneType object returned. Is anyone able to help me with this please? I'm using Python 3.5.4. conda list doesn't give me a version of re so I assume it's part of the base package?

What is the difference between the search() and match() functions in the ?  I've read the  (), but I never seem to remember it.  I keep having to look it up and re-learn it.  I'm hoping that someone will answer it clearly with examples so that (perhaps) it will stick in my head.  Or at least I'll have a better place to return with my question and it will take less time to re-learn it.


I have HDD and flash drive and i want install ubuntu from flash When im boot from flash,only black screen (iso from getmyos and ubuntu) Flash:FAT32 CPU:amd64 On VirtualBox it work On wibu 20.04 on other HDD work too Now on this HDD Windows Vista and i want install ubuntu or kali Help please

I would like to see a full how-to guide on how to install Ubuntu.


I'm using the book class for a particular document, and I've run into a bit of problem. I don't know exactly how to explain this, so I'll just post an explanatory picture instead of sounding obscure.    As you can see, that chapter-header is bleeding way too much. Is there a way to change the font size for that?  P.S: I know I should probably change the chapter title if it's that long, but I'd like to know how to solve this problem anyway.

I am being prompted with the following error while using \pagestyle{headings} on a book class LaTeX document:  Overfull \hbox (240.44835pt too wide) has occurred while \output is active \OT1/cmr/m/sl/12 CHAPTER 1. THE CITY OF CARTHAGE WAS THE CENTRE OF THE ANCIENT CARTHAGINIAN CIVILIZATION \OT1/cmr/m/n/12 2   The following is the offending code:  \documentclass[12pt,letterpaper,oneside]{book}  \pagestyle{headings}   \begin{document}  \pagenumbering{arabic}  \chapter{The city of Carthage was the centre of the ancient Carthaginian civilization} The city of Carthage was the centre of the ancient Carthaginian civilization. The city developed from a Phoenician colony of the 1st millennium BC into the capital of an ancient empire.[2] The area of Carthage was before inhabited by Berber people who also became the bulk of Carthage's population and constituted a significant part of its army, economy and administration. Native Berbers and settling Phoenicians in Carthage mixed in different ways including religion and language, creating the Punic language and culture.  The name of Carthage, Latin: Carthago or Karthago,  meaning "New City"   The first civilization that developed within the city's sphere of influence is referred to as Punic (a form of the word "Phoenician") or Carthaginian. The city of Carthage is located on the eastern side of Lake Tunis across from the centre of Tunis. According to Greek historians, Carthage was founded by Canaanite-speaking Phoenician colonists from Tyre (in modern Lebanon) under the leadership of Queen Elissa or Dido. It became a large and rich city and thus a major power in the Mediterranean. The resulting rivalry with Syracuse, Numidia, and Rome was accompanied by several wars with respective invasions of each other's homeland.  Hannibal's invasion of Italy in the Second Punic War culminated in the Carthaginian victory at Cannae and led to a serious threat to the continuation of Roman rule over Italy; however, the Romans gained the upper hand by invading Africa and defeating Carthage at the Battle of Zama in 202 BC. Following the Third Punic War, the city was destroyed by the Romans in 146 BC. However, the Romans refounded Carthage, which became the empire's fourth most important city and the second most important city in the Latin West. It later became the capital of the short-lived Vandal kingdom. It remained one of the most important Roman cities until the Muslim conquest, when it was destroyed a second time in 698.  The ancient Greek philosopher Aristotle wrote extensively on Carthaginian politics, and he considered the city to have one of the best governing institutions in the world, along with those of the Greek states of Sparta and Crete.[5][6]  \section{Topography} Carthage was built on a promontory with sea inlets to the north and the south. The city's location made it master of the Mediterranean's maritime trade. All ships crossing the sea had to pass between Sicily and the coast of Tunisia, where Carthage was built, affording it great power and influence.  \end{document}    The \hbox refers to:      How can I solve this issue using \pagestyle{myheadings}? Or how can I solve this issue keeping the book class heading format?


I have a scenario that will likely never happen, but I am curious in how it would work. First, the preliminary, :  The effects of different spells add together while the durations of those spells overlap. The effects of the same spell cast multiple times don't combine, however. Instead, the most potent effect — such as the highest bonus — from those castings applies while their durations overlap, or the most recent effect applies if the castings are equally potent and their durations overlap.  Now the setup: Bob the 3nd-level Generic Wizard and Doug the 3rd-level Earth Wizard face off. Bob knows Doug's favorite tactic and readies a spell. Doug casts  under Bob. The spell say, "You cause a tremor in the ground within range. Each creature other than you in that area must make a Dexterity saving throw." But Bob was ready and casts Earth Tremor as a 2nd-level spell for his reaction making it more potent (more damage) in the same area. So what happens? Doug's casting means Doug is not targeted by the tremor. But as a reaction Bob casts a more powerful version where Bob is not targeted by the spell. So does that overpower Doug's spell? And if so, does that mean Bob no longer has to make a Dexterity save and Doug does? There may be other spells that do this but Earth Tremor was the first I found with wording stating that regardless of the target point, the caster is not affected.

Say a creature walks through a door and triggers two spell glyphs from two  spells that are programmed to cast a  at the creature that walks through the door. Both glyphs are triggered by the same action/trigger.  My intuition and off-the-cuff ruling would have been that the creature rolls for both fireballs and takes damage and effects as if they had been hit by two separate spells.  However, the PHB says in Chapter 10 under "Combining Magical Effects" ():     The effects of the same spell cast multiple times don't combine, however. Instead, the most potent effect - such as the highest bonus - from those castings applies while their durations overlap. (PHB p. 205)    Does this imply that the creature would only effectively get hit by one fireball? Does this section even apply here to spells of instantaneous duration?  In short, does the creature take damage from one or two fireballs when hit by two simultaneously?   A more extreme example of this scenario (and the inspiration for this question) can be found in:


I have a 4K monitor, and use (Gnome) Tweaks in Ubuntu Desktop 20.04 to set interface font scaling to 1.80. Sometime during the spring/summer months of 2020 Gnome Desktop (using X11 v3.36.3) started ignoring saved Tweaks settings. Due to the 4k, this makes the interface stupidly difficult to read when I first log in until I manually go to Tweaks and then decrement/increment the font scaling back to 1.80. Around the same time (spring/summer 2020) Gnome Desktop using X11 became even more unstable than it usually is (at least with my NVIDIA-driven GPU) on login (e.g., garbled text, visual artifacts/distortions, etc.). I therefore frequently resort to F2+ALT, and then run r to reset Gnome. When I do this, again Tweeks settings are ignored and I have to manually reset the font scaling. How can I force Gnome to respect Tweaks settings?

I'm using Ubuntu 20.04 with Linux Kernel 5.7.10-050710-generic and GNOME Shell 3.36.3. I have set font scaling factor to 1.25 but lately when I restart while the scaling factor lasts to the UI, it is not applyed to gnome shell. To make it work again I have to manually reset it to 1.25 again. Any suggestions?


I have got the following task:  Let U, U' be linear subvector spaces of a K -vector space V with U ∩ U' (by 0 is meant the null space containing only the null vector). Prove the following statement: if v_1,....,v_r ∈ U and w_1,...., w_s ∈ U' form two linearly independent systems, then the vectors v_1,....,v_r, w_1,...., w_s ∈ V are also linearly independent.  Could someone help me please with this task, please? I do not understand how to proceed. Thanks for helping me.

This is a question from Finite-Dimensional Linear Algebra by Mark S. Gockenbach page 57 (exercise 2.5.15). I hope to check my proof.  Let $V$ be a vector space over a field $F$, and suppose $S$ and $T$ are subspaces of $V$ satisfying $S \cap T = \{0\}$. Suppose $\{s_1,s_2, ..., s_k\} \subset S$ and $\{t_1,t_2, ..., t_l\} \subset T$ are both linearly independent sets. Prove that $\{s_1,s_2, ..., s_k,t_1,t_2, ..., t_l \}$ is a linearly independent subset of $V$.  My proof) Suppose that $\alpha_1 s_1 +...+ \alpha_k s_k + \alpha_{k+1}t_1 +...+ \alpha_{k+l}t_l = 0$ for some $\{ \alpha_i\}_{i=1}^{k+l} \subset F$ Then $\alpha_{k+1}t_1 + ... + \alpha_{k+l} t_l = -(\alpha_1 s_1 + ... + \alpha_k s_k) \in S$ Since $\{ t_1,...t_l \} \subset T$ and $T$ is a subspace of $V$, $\alpha_{k+1}t_1 + ... + \alpha_{k+l} t_1 \in T $. Since $S \cap T = \{0 \}$, $\alpha_{k+1}t_1 + ... + \alpha_{k+l} t_l = 0$. Since $\{t_1, ... , t_l \}$ is a linearly independent set, $\alpha_{k+1} = ... = \alpha_{k+l} = 0$. By doing similarly, we can show that $\alpha_1 = ... = \alpha_k = 0$. Therefore, $\{s_1,s_2, ..., s_k,t_1,t_2, ..., t_l \}$ is a linearly independent subset of $V$. $\blacksquare$