I have latest version of Adobe Flash Player installed Ubuntu 14. Facebook will not recognize that I have the Flash player and keeps on stating that I need the latest version. I have attempted to load again. Also uninstalling and reinstalling is not working, may have to go back to Windows.

I know, it's been asked before but I couldn't really get a satisfying answer for some details/backgrounds and I guess it's an important question for many.    Some application seem only to be running with Adobe Flash 15 (or at least I know it does, because I have that version on my Windows Partition).  The official Adobe website says:     NOTE: Adobe Flash Player 11.2 will be the last version to target Linux as a supported platform. Adobe will continue to provide security backports to Flash Player 11.2 for Linux.   Some search on the web like "Ubuntu Adobe Flash 15" or similar does not return any good websites.  I found something that says   (using a "pepper-based version"), and  .   Is it impossible to use this for Firefox too? Would it be a privacy risk?  Are there no alternative projects (I know it's closed source but there are so many so very bright people out there using something similar to wine but just for the plugin....)?  How about the Mac-Version? Shouldn't someone be able to port that one to Linux?


I have installed Ubuntu 14.04 server and I need to connect to my WiFi network. How can I connect to my WiFi network using only the command line.

Since the network manager is troubling me so much I want to replace it (possibly wicd orNM from ppa:volanin).  I do not know how to connect and disconnect to the network through the terminal without using network manager.  I would like a command-line way of managing the network.


I created a bash file to register users in the ProFTPD Server. The bash file is run from a PHP file, sending 5 variables as parameters, which are: name, surname, user, password and a random number with 4 digits (eg. 7215)  Everytime I run it I get these errors and only users and their folders are created. The ProFTPD configuration is not changing.  #!/bin/bash  var1=$(echo $1 | tr [:upper:] [:lower:] | cut -c 1) var2=$(echo $2 | tr [:upper:] [:lower:] | cut -c 1)  rnumber=$(echo $5) dir=$(echo "dir") folder=$(echo $var1$var2$var3$dir$rnumber) user=$(echo $3)  sudo mkdir -p /var/www/ftpdir/Hostitec/usersftp/$folder  sudo chmod 777 /var/www/ftpdir/Hostitec/usersftp/$folder  command=$(cat -n /etc/proftpd/proftpd.conf | grep DefaultRoot | tail -n 1 | cut -f 1)  sudo head -n $command /etc/proftpd/proftpd.conf > /etc/proftpd/copyconf  echo "DefaultRoot   /var/www/ftpdir/Hostitec/usersftp/$folder $user" >> /etc/proftpd/copyconf  lastone=$(expr $command + 1)  sudo tail -n +$lastone /etc/proftpd/proftpd.conf >> /etc/proftpd/copyconf  sudo cat /etc/proftpd/copyconf > /etc/proftpd/proftpd.conf  sudo rm /etc/proftpd/copyconf  sudo useradd $user  sudo chown $user:$user /var/www/ftpdir/Hostitec/usersftp/$folder  echo "$user:$4" | sudo chpasswd -m  sudo service proftpd restart  checkdir=$(ls /var/www/ftpdir/Hostitec/usersftp/$folder | grep $folder)  checkuser=$(cat /etc/passwd | grep $user)  echo $checkdir > check.txt  echo $checkuser > check.txt  if ! [ -s check.txt ] then     rm -r /var/www/ftpdir/Hostitec/usersftp/$folder     sudo userdel $user fi   These are the errors I'm getting:  ./script.sh: line 17: /etc/proftpd/copyconf: Permission denied ./script.sh: line 19: /etc/proftpd/copyconf: Permission denied ./script.sh: line 23: /etc/proftpd/copyconf: Permission denied cat: /etc/proftpd/copyconf: No such file or directory rm: You cannot remove '/etc/proftpd/copyconf': No such file or directory

When using sudo to allow edits to files, I regularly get 'permission denied'.  For example, my mouse is jittery and sluggish, so I want to disable polling:  sudo echo "options drm_kms_helper poll=N">/etc/modprobe.d/local.conf   I'm prompted for a password, and then get:  bash: /etc/modprobe.d/local.conf: Permission denied   So I tried to do a temporary change to disable polling by using:  sudo echo N> /sys/module/drm_kms_helper/parameters/poll   Yet again the system responded with:  bash: /sys/module/drm_kms_helper/parameters/poll: Permission denied   Any ideas?


I'm trying to create a program that will simulate a dog race. and 3 players are able to bet on any of the dogs, but they can only bet up to $15 each. I have all of this set up except for only allowing up to $15 to be bet. the code is extremely long so I'll try to explain what I have so far  So I have radio buttons to select which player want to place their bet, once a player is selected, 4 radio buttons are enabled which allows the player betting to choose which dog they want to bet on. after a dog is chosen I have a textbox named txtAmount which they then enter an amount they'd like to bet. they then press a button named btnBet which confirms their bet and allows another player to bet.  my question is this: is it possible to allow the numbers entered into the textbox to only go up to 15? (I already have it so that only numbers can be enter, but I want to restrict what number it can go up to), or would it be better to just put in a ComboBox??  UPDATE  here is the code I used to restrict the textbox to numbers only:      private void txtAmount_KeyPress(object sender, KeyPressEventArgs e)     {         if (e.KeyChar != '\b')         {             e.Handled = !char.IsNumber(e.KeyChar);         }     }   my question is not a duplicate to the other question mentioned in the comment. here's why: I'm not asking how to restrict to just numbers, I'm asking how to restrict to certain numbers (1-15 inclusive)

I have a windows forms app with a textbox control that I want to only accept integer values. In the past I've done this kind of validation by overloading the KeyPress event and just removing characters which didn't fit the specification. I've looked at the MaskedTextBox control but I'd like a more general solution that could work with perhaps a regular expression, or depend on the values of other controls.  Ideally this would behave such that pressing a non numeric character would either produce no result or immediately provide the user with feedback about the invalid character.


Here's a little bit of a strange question: In class, my math teacher decided to let us take a break from the usual class to solve a mathematical puzzle:  \begin{align} i & = i \\ i^2 &= i^2 \\ \sqrt{-1} &= \sqrt{-1} \\ \sqrt{\frac{-1}{1}} &= \sqrt{\frac{1}{-1}} \\ \frac{\sqrt{-1}}{\sqrt{1}} &= \frac{\sqrt{1}}{\sqrt{-1}} \\ i &= \frac{1}{i} \end{align}  I assume that the transition from line 4 to 5 is wrong, but I don't see how :p.  Does anyone care to explain?

I know there must be something unmathematical in the following but I don't know where it is: \begin{align} \sqrt{-1} &= i \\\\\ \frac1{\sqrt{-1}} &= \frac1i \\\\  \frac{\sqrt1}{\sqrt{-1}} &= \frac1i \\\\  \sqrt{\frac1{-1}} &= \frac1i \\\\  \sqrt{\frac{-1}1} &= \frac1i \\\\  \sqrt{-1} &= \frac1i \\\\  i &= \frac1i \\\\  i^2 &= 1 \\\\  -1 &= 1 \quad !!? \end{align}


I've been using dash to dock for quite some time. One thing that bothers me a bit is that I can't remove the opacity of the dock size limit "indicator" opacity like here:    Is there any way that i can remove it? I've tried to look into the stylesheet.css but still can't figure out how to remove it.

I am using the default Ubuntu dock with bottom placement and org.gnome.shell.extensions.dash-to-dock extend-height set to false. With Ubuntu 18.10 this produces a noticeable visual glitch, note the black empty spaces at the edges of the dock:    I am getting this both on an upgraded system and on a clean install inside a VM. This was working fine in Ubuntu 18.04. Also happens if the theme is set to something else than Yaru (the default theme in Ubuntu 18.10). Reboot does not help. Dock looks OK if extend-height is enabled.  Any ideas on how to fix this?


For example, $e=\dfrac{1}{0!}+\dfrac{1}{1!}+\dfrac{1}{2!}+\dfrac{1}{3!}+\dfrac{1}{4!}+\cdots$ has infinite terms when treated with this form, but it is a countable one, because the cardinality of natural numbers is countably infinite, and my question is if a number can have uncountably infinite terms. Thanks.  My thought is that it is impossible because it must be valid to enumerate the terms, which in uncountably infinites you cannot. Is this true? I need some aclarations.  Edit:  I only need non-zero terms, as sugested in the comments, and the number the terms sum to has to be a finite number.

Claim: If $(x_\alpha)_{\alpha\in A}$ is a collection of real numbers $x_\alpha\in [0,\infty]$ such that $\sum_{\alpha\in A}x_\alpha<\infty$, then $x_\alpha=0$ for all but at most countably many $\alpha\in A$ ($A$ need not be countable).  Proof: Let $\sum_{\alpha\in A}x_\alpha=M<\infty$. Consider $S_n=\{\alpha\in A \mid x_\alpha>1/n\}$.  Then $M\geq\sum_{\alpha\in S_n}x_\alpha>\sum_{\alpha\in S_n}1/n=\frac{N}{n}$, where $N\in\mathbb{N}\cup\{\infty\}$ is the number of elements in $S_n$.  Thus $S_n$ has at most $Mn$ elements.   Hence $\{\alpha\in A \mid x_\alpha>0\}=\bigcup_{n\in\mathbb{N}}S_n$ is countable as the countable union of finite sets. $\square$  First, is my proof correct? Second, are there more concise/elegant proofs?


I am a female graduate student in a competitive phd program.  I recently had a baby.  Although this is a planned pregnancy, and I thought I had thought through the complications having a baby would bring, I am still very overwhelmed by how much different my life is now.  I don't have any time besides taking care of a newborn, and I am very sleep-deprived.  Baby's dad works full-time to support the family.  Even though it brings me a lot of joy, I just can't help but wonder whether I would ever have time for my research again.  I initially planned to go back to school in September, when baby will be about 3 months old.  But I am not sure whether I would be able to do anything next semester.  Or even the semester after next.  I initially planned to graduate next fall, but now I feel that might be a stretch.  The application starts next semester, and I should be going around giving talks and preparing for my applications.  But that feels impossible now.  And there is the financial stress.  I want to put my child in daycare at some point (like around 7,8 months), so I can have some time to do work.  But it's very expensive, and I don't know if we can afford this with our current income.  Sometimes I thought about finding an industry job after graduate school, so things would be easier.  But I don't want to give up research.  What is an effective way to deal with the stresses of being a new mother while on the job market? Specifically, how can I complete my research and apply to jobs in a situation where I am sleep deprived and child care is expensive?    This is a different question than  because I believe a female student's experience is different than a male student's experience.  Especially at infant stage, mother's role cannot be placed by others due to constant feedings.  The author in the other post also has his girlfriend/wife staying at home with the baby, so there will be much less work for him.  In my case, I would be the one taking care of the baby since my husband works full-time.  Another thing is I am already at the stage that I am about to graduate as opposed to the other post is debating whether to start the program, so I am more concerned about the graduation timeline.

I am finishing my first year of Masters and have always thought of going for a PhD in North America. I and my girlfriend are going to have a baby which is totally unexpected. The due day will be somewhere this december which I am still half year away from finishing my Masters degree.   I don't know under this circumstance should I still, or am I able to, apply for PhD positions overseas. This would mean I will have to leave them or bringing them together for my study. I am not super rich to afford a family personally and would need to rely on studentships, but I don't think graduate studentships are sufficient to afford the living expense and future education fees of my coming baby.  Taking on a PhD and a research career are definitely my dream and situation seems very difficult for these to come true. Anyone knowing someone carrying kids along grad school, or any suggestion to me? I just don't have a clue how to take care of everything.


Ubuntu newbie trying to migrate from Windows.  I installed XAMPP, the installer placed the files in /opt/. I am trying to add my own work and after some digging I found that XAMPP serves files from the htdocs folder.   When I try to save a php file from VSCode to that directory it fails due to permissions. How do I get around this? Am I missing something, is this how you use XAMPP? I looked on their websites but couldn't find anything which lead me to believe I must be doing something wrong.  I am applying the same approach I used with WAMP on Windows.  Thanks in advance.  EDIT:  I ended up setting up a symbolic link using the second solution from this . Thanks @pa4080 for pointing it out.

I have an ec2 instance on AWS which already installed a few Wordpress-es in it.  I want to set things up to let more people handle their own projects, with me also being able to go into the server using terminal if I still want to.  I have been following tutorials such as  and a few others.  I figured all of them just teach users how to sftp into their own home folder, also the steps keep saying addUser but some users already existed and removing them might cause some issue.  How can I give existing users the permission to use SFTP for Wordpress projects?  Let's say all my Wordpress projects are already under /var/www/ which has already been set up with www-data:www-data.  Really new with setting things like this.  Thanks in advance for any help.


I'm working with a Minecraft animation, and am trying to get the hair of the character to extrude. I tried lining up cubes with the hair textured on the character and bumping them out, but there are always some overlaps leading to a weird grid look in the hair. How should I go about this extrusion?

I'm working with a Minecraft model, and am using hand places cubes as extrusions for the hair of the character, as I am unsure of how to extrude pixel sized "blocks" from the mesh. The problem I have arises with a tiny bit of overlap with some of the cubes, causing a weird look. Is there a way to fix this overlap without having to go back and hand scale/rearrange the cubes, or an easier way to achieve this extrusion? The cube's aren't perfectly aligned, as I did it all by hand. Is there possibly an easier way to align them?


I added an HDRI image (or also I tried, with Jpeg) but when I apply it, it only appears a single color. I think it could be from the image, but it doesn't appear completely as it should be.

I'd like to use a background image for my world, but I'm not sure how to do it.   Right now I am using the sun as a lightpoint and it looks like sky and a flat plane (not realistic). I was thinking of just using a mountain background image for the world.  I've done that through textures etc. but I don't see ANYTHING in render even though it shows in worlds?  What am I doing wrong?    Also what's a cheap quick fix for cases like mine so it looks like the world isn't JUST blue sky?  Thanks guys!


I am seaching for lines like so  {"url":"/search?cflt=active&amp;find_loc=37801","name":"Active Life"},   but as u can see in 101 example  {"url":"\/search\?cflt=[^<>]+?&amp;find_loc=37801","name":"[^<>]+?"},   match1 is huge and match 8 has 2 lines instead of 1

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


I have a question on Super User that was closed as an exact duplicate. In my opinion this is in error, the other question is similar in that they both revolve around the presence or lack of the same feature however the two questions approach the feature from distinct use cases. At present the answer to the two questions IS the same, however in time, because their purposes differ, a third party solution could arrive to one or the other which does not solve both use cases. Having one question closed prevents it being (potentially) answered.  Admittedly, in the initial versions of the question was not worded so the differences were apparent, so it was valid to close it. Now it has been revised so the differences are clear. Adding a comment or editing and old question doesn't get fresh eyes on it, no front page exposure. So what does one do? Ask a question like this here on meta? Ask the question anew with the better phrasing?  There is another meta question asking about this, , but the theme is quite different, being about appealing a closure in the milieu of flame wars and off-topic debates.

I asked a question regarding a very specific feature of a program and whether or not it works with a larger program.  Within hours someone had marked it with "This question may already have an answer here of a similar question, but not related to my question.  The question I asked IS NOT ADDRESSED in the referred-to question. It's frustrating to spend half an hour putting together an intelligent and specific question, and then have someone mark it as a duplicate (or possible duplicate), which apparently causes people to skip over my question. I haven't received any more responses since the question was flagged.   Two questions:  (1) How do I get this flagging removed and (2) what's the best way to prevent these "helpful" flaggings in the future?


due to the huge amount of data in my plot I wasn't able to compile the whole badboy at once after creating a tikz file and then using latex. Since the save_size won't go higher than 80000.  so while searching the internet I stumbled across another solution. I created a coordinate system and a colorbar as tikz without any plot via matlab. Afterwards I created the plot without any axis or so as a png picture.  The next would be to include the png graphic in my tikz file. So I did that but when I compile the whole tex file in which I \input my tikz file, the tikz picture and the plot picture won't align as I wish. I mean of course I can get my result after scaling and moving my included graphic but it is too time consuming.  \begin{axis}[% width=4.1in, height=3.80333333333333in, view={0}{90}, %scale only axis, xmin=0, xmax=16, xtick={ 4,  8, 12}, xlabel={x/H}, ymin=-5, ymax=5, ytick={-3,  0,  3}, ylabel={y/H}, zmin=-1, zmax=1, title={T}, colormap={mymap}{[1pt] rgb(0pt)=(1,1,1); rgb(64pt)=(1,1,0); rgb(160pt)=(1,0,0); rgb(255pt)=(0.0104167,0,0)}, colorbar, point meta min=717.475533976793, point meta max=2320.87848806079, anchor=south west ]  \node (myfirstpic) at (0,0) [anchor=south west]{\includegraphics[width=4.1in,height=3.80333333333333in]{testplot_zsmngesetzt.png}};    \end{axis}   Especially what i dont get is why, even though my created axis and my included graphic are anchored south west, my graphic wont start at the same point as my axis  Do you have any idea how I can automatically align the two and let them start at the same point?   sincerely Mille

I need to plot some data in a file (10000 records of 2 points each one) but PGFPlots is very very slow rendering it. So I'm trying to use MatLab to plot the data, capture the image without axis and in a tikzpicture render the image with axis.  Here is my test with an 96 x 96 PNG image:    \documentclass{article}  \usepackage{pgfplots}  \begin{document}   \pgfdeclareimage[width=5cm]{fondo}{avatarMSM.png}   \begin{tikzpicture}     \draw node[anchor=south west] (nodoFondo) at (axis cs:0,0) {\pgfuseimage{fondo}};     \begin{axis}[         width=5cm,         scale only axis,         enlargelimits=false,         xmin=0,         xmax=96,         ymin=0,         ymax=96,         axis equal=true         ]        \addplot[thick,blue] (0,0) -- (axis cs:96,96);     \end{axis}   \end{tikzpicture} \end{document}     The result has white margins around the image and I can't fit the axis.


I remember reading a short story back in high school that was similar to Anthem by Ayn Rand about this guy who was very strong and smart. And because everyone in this world had to be equal he was forced to wear weights to slow him down, and he had to wear some device on his head that made it hard for him to see and hear, breaking his focus.  At the end of the story in breaks into a news station and tries like broadcasting a message. And he runs away with one of the ballerinas who has blocks on her feet so it makes it hard for her to dance.

I read this book in Middle School and I can't for the life of me remember the title, but I can remember what it was about for the most part:  Takes place in the future, the government imposes laws that outlaw people from being different in appearance and skill level. For example, if you are fast or strong or tall, they will put weights on you to weigh you down so that you'll be more slower/shorter and more like the average. Another example, if you are pretty the government issues you "ugly glasses" etc.  Basically, it's all about making sure everyone is equal and punishing the extraordinary.  One of the main characters (a man) decides to literally loose himself of his shackles and weights, breaking them to display his power (if I'm remembering correctly).   Any ideas folks?


\begin{table}[h]   \begin{center}     \caption{ Comparison of Maximum Accuracy of Different Methods on BCI comp III dataset IIIa }\label{tab:2}     \begin{tabular}{c c c c c c}      \hline      % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...      $Feature Extraction^a$ & $Classiﬁer^b$ & & Accuracy(\%)  &  &  \\       \hline       &  & K3  & K6  & L1  & $mean^c$ \\      AAR & MDA[9] & 66.6 & 38.5 & 49.5 & 51.5 \\      CAR+CSP & NN[10] & 81.7 & 76.7 & 73.3 & 77.2 \\      Barlow method & SVM[11] & 63.3 & 45.0 & 60.0 & 56.1 \\        WPD & ME[12] & 90.4 & 66.0 & 79.6 & 78.7\\       WPD+CSP & SVM+NN[13] & 83.1 & 84.4 & 85.6 & 84.4 \\      PLV  & SVM+Quicksort[14] & 86.0 & 82.0 & 77.0 & 81.7 \\      Sparse PCA+Sparse CSP & SVM[15] & 85.1 & 81.6 & 80.1 & 82.3 \\      STFT+CSP & SVM[16] & 71.3 & 88.1 & 71.2 & 76.9\\      \hline       4 band CSP (our method)& SVM & 93.3 & 77.5 & 85.8 & 85.5\\       \hline      \end{tabular}   \end{center} \end{table}

I have a table that I want to insert on a page, but at least one (perhaps both) of the following conditions are met:   The table is too wide to fit within the text block or page. That is, I'm exceeding some horizontal restriction. The table is too tall to fit within the text block or page. That is, I'm exceeding some vertical restriction.   What are my options to make this table fit? If it doesn't fit, regardless of my attempts, what other options exist?


I have a stepdaughter and she has a stepdaughter.  What would my stepdaughters' stepdaughter be to me?

Here at the Genealogy and Family History Stack Exchange we see many questions about relationship mapping which is also known as:   relationship calculation kinship terminology etc   If you are just trying to understand how to calculate "cousins and removes" then  provides an excellent guide.  However, if you are seeking an English term for a more complicated relationship between two members of an extended family, rather than asking a question like:          site users are encouraged to first review the answers below.    Note: This Q&A arises from  and is set to  to help make it canonical.


The question may not be clear, let me explain:  I develop websites using Symfony and there is a clever little command that allows me to start an apache server, taking the root of the server as the current directory. I can then view the result on a dedicated port (localhost:8000).  Is there an easy way to do that without Symfony, maybe included in Apache2? I would like to test something that doesn't require that PHP framework.  I know I could simply make a symlink to my actual Apache server (/var/www if I remember correctly, it has been a long time since I used that one). It's not that I'm stuck, I was just wondering if it was doable without too much tears.

I am writing a small website, but I do NOT want to figure out how to install and configure complete LAMP stack to test the website from my ~/home directory. That will be completely disruptive and unnecessary.  All I want is to have a directory, e.g. ~/home/Documents/Website and run a small web server from that folder as the website's "home" folder.  I know  can do something similar, but it only seems to work with Ruby/Jekyll-based sites that it builds and configures.  Isn't there some small web server program that I can easily install and then just run very simply?  For instance, if I just needed to run something like e.g. simple-server serve ~/home/Documents/Website from a command line and then navigate to e.g. localhost:4000 or whatever to test the site, that would be perfect.  If this is already possible in Ubuntu and I just don't know how, please let me know.


Can you use "more quickly" in the following context?     I can move more quickly than she can.

This is a follow up to this question:   "Quicker" is an adverb, as are "more" (in this context) and "quickly".  So is there a difference besides preference between these?


I enter the value textbox. How to stop when a user enters the wrong (entered value is not number) consecutive 3 times or total error is 5. I using C#.

I have a windows forms app with a textbox control that I want to only accept integer values. In the past I've done this kind of validation by overloading the KeyPress event and just removing characters which didn't fit the specification. I've looked at the MaskedTextBox control but I'd like a more general solution that could work with perhaps a regular expression, or depend on the values of other controls.  Ideally this would behave such that pressing a non numeric character would either produce no result or immediately provide the user with feedback about the invalid character.


I need a 2D harmonic function which is always real, never diverges to $\infty$ anywhere, goes to 0 as one goes infinitely far away from the origin, and isn't f=0. $$\begin{matrix}0=\nabla^2f&0=\lim_{r\rightarrow\infty}{f\left(r,\varphi\right)}\\\nexists r,\varphi\ni\left|f\left(r,\varphi\right)\right|\geq\infty&f\left(r,\varphi\right)\in\mathbb{R}\\\end{matrix}$$ Does such a function exist? If so what is it? Polar coordinates are prefered.

There is  with this exact same prompt which got several down-votes for not showing  their work.  So I'll show what work I've got.  I know being a harmonic function implies satisfying the Mean Value Property, thus what I thought I'd do is consider two arbitrary points in $\mathbb{C}$ and prove that:  $$|u(z) - u(w)|=|\frac{1}{2\pi}\int_0^{2\pi}u(z - re^{i\theta})d\theta - \frac{1}{2\pi}\int_0^{2\pi}u(w - te^{i\theta})d\theta| $$ $$= |\frac{1}{2\pi}\int_0^{2\pi}u(z - re^{i\theta}) - u(w - te^{i\theta})d\theta|$$  Now what I wan't to do is take r and t to infinity and prove this integral goes to zero, but I can't figure out how to do that.  I've used the fact that my harmonic function u is defined on all of $\mathbb{C}$ in taking t and r to infinity but I still need to use the fact that it's bounded.  I also read through the proof of Liouville's Theorem, given as an answer in that other post, which seems intuitively correct but rather un-rigorous.  It actually says that the value in the center of a ball is equal to the average over the ball's volume.  I imagine this can be proven from the average over the boundary since the average over the boundary will not change as you continuously shrink the boundary down to its center. This however would require the difference of two surface integrals, or is there a simpler way?   I was also considering using the Maximum Modulus Principle somehow but I haven't found a way yet.  I've probably made this way more complicated than it has to be, hopefully someone can help me, thanks! =].  Edit: Ok after thinking some more about the accepted answer in that other post, I've decided what I need to do is look at the canonical holomorphic function whose real part is my harmonic function u, and prove that holomorphic function is bounded.  From there I can prove that since it's entire and bounded that it's constant, and from there prove that then its real part must be constant.  So could someone talk a bit about the construction of this canonical holomorphic function?


I have an account using my G+ google account. I just installed Stack Exchange app on my android phone and it doesn't give me an option to use my G+ to sign in, what should I do to get to the same account on my phone?  Thanks.

I registered this ID with my Gmail account, and logged in successfully via web browser. However, while I was trying to log in on the Stack Exchange app in my Android Phone, I don't see any option to log in with Google:    I was told that no user was found with my Gmail account. It is amazing that I can log in via web browser, but cannot do so with the same Gmail account via app. How can I do that?  Just to compare, here is a "normal" login screen of another user:    Where did the Google login go and how can I bring it back?  My app version is 1.0.73, phone is Coolpad 8150D with Android version 4.0.3, kernel 3.0.8.


I came across a question which went like this:  If $a_n\to a$ and $b_n\to b$, then prove or disprove the following: $$\lim_{n\to\infty}\frac{a_1b_n+a_2b_{n-1}+\ldots+a_nb_1}{n}=ab$$  Here's how I approached the problem (I tried to prove it cause I thought that it is true): We already have $a_n\rightarrow a$ and $b_n\rightarrow b$. Thus, $$\begin{align}\left|\frac{\sum_{i=1}^na_ib_{n-i+1}}{n}-ab\right|&=\left|\frac{\sum_{i=1}^na_ib_{n-i+1}-nab}{n}\right|\\ &=\left|\frac{\sum_{i=0}^n\left(a_ib_{n-i+1}-ab\right)}{n}\right|\\ &=\frac{1}{n}\left|\sum_{i=1}^n\left(a_ib_{n-i+1}-ab\right)\right|\\ &\leq\frac{1}{n}\sum_{i=1}^n\left|a_ib_{n-i+1}-ab\right|\\ &\leq\frac{1}{n}\sum_{i=1}^n\left|a_i\right|\left|b_{n-i+1}-b\right|+\frac{b}{n}\sum_{i=1}^n\left|a_i-a\right|\end{align}$$ Now as $a_n$ is convergent$\implies\left|a_n\right|\leq M$ for some $M\in\mathbb{R}$. Thus, $$\left|\frac{\sum_{i=1}^na_ib_{n-i+1}}{n}-ab\right|\leq\frac{M}{n}\sum_{i=1}^n\left|b_i-b\right|+\frac{b}{n}\sum_{i=1}^n\left|a_i-a\right|$$. Now I am stuck as to how can I show that this whole expression is $<\epsilon$. Any hints as well as alternative methods are totally welcome. NOTE:  might be a similar question only that it is a special case with $a=0$.

When $\lim_{n\to\infty} x_n = a$, and $\lim_{n\to\infty} y_n = b$, find the limit, $$\lim_{n\to\infty} \frac{x_1 y_n + x_2 y_{n-1} + \cdots + x_n y_1}{n}.$$ Thank you for your help in advance.


Suppose we have two rational functions $f$ and $g$ on the complex plane, such that $f(0)=g(0)=1$. In a neighbourhood of $0$, we can write the following. \begin{align} f(t) = \sum_{n=0}^{\infty} N_n^f t^n \\ g(t) = \sum_{n=0}^{\infty} N_n^g t^n \end{align} Now my question is, what does the following function look like? \begin{align} h(t) := \sum_{n=0}^{\infty} N_n^f N_n^g t^n \end{align} Evidently, we have $h(0)=1$ and \begin{align} m! \left. \frac{d^m h}{dt^m} \right|_{t=0} = \left. \frac{d^m f}{dt^m} \right|_{t=0} \cdot \left. \frac{d^m g}{dt^m} \right|_{t=0} \end{align} However, I would like to have a formula that gives $h$ in terms of $f$ and $g$ explicitly, without having to refer to either the derivatives of $h$, or a series expansion.

If I have two generating functions $A(x) = \sum_na_nx^n$ and $B(x) = \sum_n b_nx^n$   then the Hadamard product is $(A \star B)(x) = \sum_{n} a_nb_nx^n$.  Now when $A$ and $B$ are both rational functions ($P(x)/Q(x)$ with polynomials $P, Q$) I've seen non-constructive proofs that $A \star B$ is also rational.  Given two rational generating functions $A$, $B$, is there an algorithm that efficiently computes $A \star B$? Or at least a constructive proof you could use to write an algorithm?


I'm looking for a little formula that would allow me to convert the degree mesure of an angle into its radian mesure.   In case the degree mesure is greater than 360° the complete 360° turns contained in the angle do not count.   So the idea is as follows: (1) first dividing the degree mesure by 360, and keeping only the decimal part of the quotient.   Then, (2) multiplying the decimal part by 360 and (3) multiplying the result by pi/180 in order to get the redian mesure.   Is there a known function that allows me to keep only the decimal part of a number?   I mean, sure this function exists, but does it have a name? Is it possible to find it on some calculators?

Just like the title says, what is the notation for specifying the fractional part of a number?


due to some business requirements, I need to develop a custom related-list for Contacts on the Account object. I used LWC to do this. But the LWC controller class does not have a unit test right now. I am new and very confused with writing unit tests. Can you give me some instructions? Thank you very much! Here is the code: public without sharing class LwcContactRelatedListController {      @AuraEnabled(Cacheable=true)     public static ContactWrapper[] getRelatedContacts(Id accountId) {         // Select related contacts and store them in a map with ContactId as a key         Map<Id,ContactWrapper> results = new Map<Id,ContactWrapper>();         for ( AccountContactRelation acr : [                 SELECT                         Id,                         ContactId,                         Contact.Name,                         Account.Name,                         Contact.Email,                         Contact.Phone,                         Contact.Active__c,                         IsDirect                 FROM                         AccountContactRelation                 WHERE AccountId = :accountId         ] ) {             ContactWrapper cwr = new ContactWrapper(acr);             results.put(acr.ContactId,cwr);         }          // Select for every ContactId if the current user is an ContactTeamMember         for ( ContactTeamMember__c ctm : [SELECT Id, ContactId__c FROM ContactTeamMember__c WHERE ContactId__c IN :results.keySet() AND UserId__c = :UserInfo.getUserId()] ) {             results.get(ctm.ContactId__c).setMy();         }         return results.values();     }      public class ContactWrapper {         private Id accountContactRelationId;         private Id contactId;         private String contactName;         private String accountName;         private String contactEmail;         private String contactPhone;         private Boolean contactIsActive;         private Boolean isDirect;         private Boolean isMy;          public ContactWrapper(AccountContactRelation acr) {             this.accountContactRelationId = acr.Id;             this.contactId = acr.ContactId;             this.contactEmail = acr.Contact.Email;             this.contactName = acr.Contact.Name;             this.accountName = acr.Account.Name;             this.contactPhone = acr.Contact.Phone;             this.contactIsActive = acr.Contact.Active__c;             this.isDirect = acr.IsDirect;         }          public void setMy() {             this.isMy = true;         }          @AuraEnabled         public Id getAccountContactRelationId() {             return accountContactRelationId;         }         @AuraEnabled         public Id getContactId() {             return contactId;         }         @AuraEnabled         public String getContactName() {             return contactName;         }         @AuraEnabled         public String getAccountName() {             return accountName;         }         @AuraEnabled         public String getContactEmail() {             return contactEmail;         }         @AuraEnabled         public String getContactPhone() {             return contactPhone;         }         @AuraEnabled         public Boolean getContactIsActive() {             return contactIsActive;         }         @AuraEnabled         public Boolean getIsDirect() {             return isDirect;         }         @AuraEnabled         public Boolean getIsMy() {             return isMy;         }     } }

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, including more unit test resources, navigate to the  tag.  This canonical question is intended to address several classes of common questions by providing a quick summary and links to comprehensive resources:   How do I start writing my first unit test?  How do I unit test this code?  I need help writing this unit test.   Salesforce Stack Exchange looks for detailed, specific questions that the community can help you with, and can't write tests on your behalf. We feel that working with the resources below can help you get started, and we encourage you to make an attempt to write your test and return to SFSE with your specific questions when you encounter challenges you can't resolve.


I have lost my windows vista home premium disk, is there anywhere I can download an iso legally? The reason is because my HDD broke, I replaced it but, I can't find my vista disk to install the OS again.  P.S. preferably in swedish, and yes, i still have the product key.

Is there a place where I could download the Windows Vista Home Premium OEM and simply use the Windows Vista key on my PC?  The reason being is that when I use the HP recovery disc, what happens is that HP installs a lot of HP applications which does not help and simply makes the installation a disaster.  I would rather want to perform a clean install of Vista itself without the unnecessary HP gunk.  Appreciate your response. Thank you.  P.S. I saw on most forums that you could use an installation of the version of Vista installed on your PC and when the activation comes, simply enter the key posted on the PC.


On my mac if I go to  I get:  On windows I get:  Is there any way to download the ISO without being required of downloading the update first? The reason is that my windows experience never really get's better after windows updates, and I kind of don't care about them anymore. They fail half the time and apart from security, they add nothing of value as far as I can tell.

I need to repair my Windows 10 installation. Where can I get a clean ISO (with install.wim, no Install.ESD, so that I can run DISM against the WIM) of the specific Windows 10 build required for this?  In my case, I need the Anniversary update (Build 14393), Creators Update (Build 15063) or Fall Creators Update (Build 16299.15).


How to make a footnote text similar to the one made by this author:     I tried using \footnotetext[]{text} but I get the number 0 before the text. Any ideas?   PS. I just want to write the AMS Subject Classification and the Keywords, not the note mentioned above that text.

I would like to have a footnote about the funding source of my work in the first page without marker.   I tried below approaches:   \footnotetext{text goes here} This creates a footnote but with '0' as marker. However, the marker reference does not  appear within the normal text where I placed this command. Used \def\blfootnote{\xdef\@thefnmark{}\@footnotetext} definition provided at . I placed this definition in the main tex file just after package declaration. But, this gives the below error.     ! Use of \@ doesn't match its definition.    \blfootnote ->\xdef \@thefnmark{}\@f                                        ootnotetext


We know that  is defined as ration of dynamic viscosity to the mass density of a fluid.  $\nu = \frac \mu \rho$  But I want to know the significance of that physical quantity of which unit is $\frac {m^2} s$.

How would you define ? What does it physically represent? Around the Internet I've found it defined as just a ratio, and that's it.  I saw in an answer that I can think of it as "diffusivity of momentum". What does this mean?


I've heard people saying "I am going to town", why can't it be "I am going to the town"?  And why is it "I go to the city" and not "I go to city"?

Considering phrases of the form "I left [the] X", what causes some words to need a "the" before them, while it sounds awkward with others?  Needs "the":   I left the office I left the bank I left the house I left the courthouse   Awkward with "the":   I left work I left social media I left New York   Either way works:   I left [the] school I left [the] church


I have seen several answers but they all talk about echo. How can I change the color of an output of a command in bash? For instance, I want to colorize the output of hostname command.  $ hostname  Nameofcomputer <--- Just the output to be colored and then it returns to default color of the shell.

I'm aware of libraries in languages such as Ruby and Javascript to make colorizing your terminal scripts easier by using color names like "red".  But is there something like this for shell scripts in Bash, or Ksh, or whatever?


I have X coordinate defined in Spherical coordinate system (the point is to be situated on the circle so it's easier):  \def\Sx{0} \def\Sy{0} \def\Sz{2} \pgfmathsetmacro\Sρ{"sqrt((\Sx)^(2)+(\Sy)^(2)+(\Sz)^(2))"} \pgfmathsetmacro\Sθ{ifthenelse(\Sx==0&&\Sy==0&&\Sz==0,0,"acos(\Sz/(sqrt((\Sx)^(2)+(\Sy)^(2)+(\Sz)^(2))))")} \pgfmathsetmacro\SΦ{ifthenelse(\Sx==0&&\Sy==0,0,ifthenelse(\Sy<0,"-acos(\Sx/(sqrt((\Sx)^(2)+(\Sy)^(2))))","acos(\Sx/(sqrt((\Sx)^(2)+(\Sy)^(2))))"))} \tdplotsetcoord{S}{\Sρ}{\Sθ}{\SΦ} \coordinate (X) at ($(S)+(xyz spherical cs:radius=2,longitude=-40,latitude=0)$);   However X coordinate defined this way cannot be extracted into x,y,z components:  % calc library     \newdimen\Xx \pgfextractx{\Xx}{\pgfpointanchor{X}{center}} % this doesn't work for me   How can be coordinate defined in Spherical coord. system and then extracted into x,y,z or ρ,θ,Φ? Thanks.

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


I want to mask a raster by a polygon, the R script was as followed. However, some cells with only partially covered weren't included in the masked raster as listed in the picture link (), is there any method to accomplish?   library(raster) library(sp)  r <- raster(xmn=1, xmx=5, ymn=1, ymx=5, nrows=4, ncols=4) r[] <- 1:length(r)  Sr1 = Polygon(cbind(c(2,4,4,1,2),c(2,3,5,4,2))) Sr2 = Polygon(cbind(c(4.1,4,2),c(2,3,2)))  SpP = SpatialPolygons(list(Polygons(list(Sr1), "s1"), Polygons(list(Sr2), "s2")), 1:2)  plot(mask(r, SpP)) plot(SpP,  add=TRUE)

I want to mask out a raster based on the values of a polygon: i.e., set to NA all values of the raster that are not covered by the polygons. However, it seems that raster::mask() masks out cells (i.e. set them to NA) even if they are partially covered?  This is similar to the question: , but unlike crop(), mask() does not have the snap="out" option.   Check: here the right point of the triangle touches a cell, yet that cells is masked out.   library(raster) library(sp)  r <- raster(xmn=1, xmx=5, ymn=1, ymx=5, nrows=4, ncols=4) r[] <- 1:length(r)  Sr1 = Polygon(cbind(c(2,4,4,1,2),c(2,3,5,4,2))) Sr2 = Polygon(cbind(c(4.1,4,2),c(2,3,2)))  SpP = SpatialPolygons(list(Polygons(list(Sr1), "s1"), Polygons(list(Sr2), "s2")), 1:2)  plot(mask(r, SpP)) plot(SpP,  add=TRUE)


Let $(I_{n})_{n \in \mathbb{N}}$ defined by $\forall n \in \mathbb{N}, I_{n}= \displaystyle \int_{0}^{\pi/4}\tan^n(x)dx.$  I proved that $(I_{n})_{n \in \mathbb{N}}$ decreases.   I'd like to prove that $\forall n \geq 2$, $\frac{1}{2(n+1)} \leq I_{n} \leq \frac{1}{2(n-1)}$.  Can anyone help me get started please? Thanks a lot.

I can't seem to figure out the inequality option, I substituted n=2 for the answer bit is there any elegant way of getting it?


I have a cake recipe which I love it and would like to turn it into brownies. Can someone help me? - 3 eggs - 2 cups sugar - 3 cups flour - 2 cups powdered chocolate - 1 cup oil - 1 cup of bowling water - 1 tbsp baking powder  Mix eggs, sugar and oil. Add bowling water and let it still for 5 mins. Add flour and chocolate. Mix for 10 to 15 mins. Add baking powder for baking.  Tks!!!!!

I'm wondering how to convert a cake recipe to make brownies. My intention is to use  for Mexican Chocolate Cake With Mascarpone Frosting. The cake part calls for the following ingredients:  1 cup unsweetened cocoa 2 3/4 cups flour 1 1/4 cups sugar 1 cup packed brown sugar 1 1/2 Tablespoon cinnamon 2 teaspoons baking soda 1/2 teaspoon cayenne pepper 1/2 teaspoon salt 2 cups whole milk 1/2 cup olive oil 1/2 cup vegetable oil 2 eggs 2 Tablespoons balsamic vinegar 1 1/2 Tablespoons vanilla    How can I convert that into a brownie recipe?  I'm thinking more oil/butter and less water would work, but I'm not sure of the ratios. I imagine I'd probably also cook brownies for a shorter amount of time.   What determines a cake's fluffiness and a brownie's dense chocolatey awesomeness? Is there a general formula you can follow for converting cake to brownies? (Since this question is about conversion, I suppose it could also apply to a boxed cake mix in case I'm too lazy to go to the store.)


How can I use my USB to transfer files to/from my 14.04 to/from Samsung Tablet. Thanks

Since Ubuntu 13.04 storage access to external devices via MTP is supposed to work out of the box via a GVFS-MTP module.      While this question is about the Galaxy Nexus, other Android devices as well as Windows Phones and MTP enabled media players are also supported.      For troubleshooting see .     I am having quite a bit of problems getting file-transfers working over MTP with the Galaxy Nexus. I am using Kubuntu 11.10 64-bit, and this is what I have done and the results I get:   Added rule for device in /etc/udev/rules.d/51-android.rules. The rule is the following and works for adb:  SUBSYSTEMS=="usb", ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="6860", MODE="0666", OWNER="leob" #Galaxy Nexus  Restarted udev (and computer just to make sure).   Adb works, and all methods for reading from the device via MTP seems to work (I have tried mounting with mtpfs, gmtp and using the mtp-tools package directly). When I try to write to the device however, nothing I have tried works.  As an example, running mtp-newfolder test_dir 0 0 gives the following output:  libmtp version: 1.1.0 Device 0 (VID=04e8 and PID=6860) is a Samsung GT-P7510/Galaxy Tab 10.1. Folder creation failed. ERROR: Could not close session!   If I run mtp-folders after a failed mtp-newfolder without re-plugging the device, I get the following output:  Attempting to connect device(s) Device 0 (VID=04e8 and PID=6860) is a Samsung GT-P7510/Galaxy Tab 10.1. PTP_ERROR_IO: failed to open session, trying again after resetting USB interface LIBMTP libusb: Attempt to reset device mtp-folders: Successfully connected Friendly name: (NULL) Error 1: Get Storage information failed. Error 2: PTP Layer error 02fe: get_all_metadata_fast(): could not get proplist of all    objects. Error 2: (Look this up in ptp.h for an explanation.) Error 2: PTP Layer error 02fe: get_handles_recursively(): could not get object handles. Error 2: (Look this up in ptp.h for an explanation.) LIBMTP_Get_Storage() : Resource temporarily unavailable OK.   Accompanied by the following in dmesg:  [ 1000.912082] usb 2-4: reset high speed USB device number 7 using ehci_hcd [ 1001.045877] usb 2-4: usbfs: process 3166 (mtp-folders) did not claim interface 0 before use   Does anyone have any idea about what to do?  EDIT:  I also tried the PTP mode. Again, reading works fine, but I cannot write anything to the device.


Is it possible to minimize least absolute deviations (LAD) analytically?  Say given a sample $\{x_i\}_{i=1..n}$ find  $$\arg\min_\lambda{\sum_{i=1}^{n}{|x_i-\lambda|}}$$

Suppose we have a set $S$ of real numbers. Show that   $$\sum_{s\in S}|s-x| $$   is minimal if $x$ is equal to the median.    This is a sample exam question of one of the exams that I need to take and I don't know how to proceed.


I have a "Our Staff" Content Type, that includes a field for uploading an individual's CV as a PDF:  field_cv_file   I have created a View for this Content Type, then added it to page via Blocks  The twig file I'm using to render/style this area is:   views-view-fields--our-staff-view--block-1.html   I'm having trouble with the URL for the File Field  I can render it as a PDF icon link like this:  {{ fields.field_cv_file.content }}   But I want to obtain the 'raw' URL to apply inside a href, something like this:  Download CV   This however is not working.  I've tried a few different ways of rewriting the code in href, but none are working.  how would I do this?

I am writing a template for a views field in Drupal 8. How can I access the raw values of a multi-value field in views? I tried this but it doesn't work.  {% for i in 0.. row.field_color['#items']|length - 1 %} {{ row.field_color[i] }} {% endfor %}


so I am trying to understand how prepared statements are handled exactly? I have this code but I am unsure if it is using prepared statement or how to add prepared statements to it.  Code:  /*      * Creating a word      */     public long createword(DatabaseWords word) {         SQLiteDatabase db = this.getWritableDatabase();          ContentValues values = new ContentValues();         values.put(KEY_DICTIONARYID, word.get_dictionaryId());         values.put(KEY_WORD1, word.get_word1());         values.put(KEY_WORD2, word.get_word2());         values.put(KEY_WORD3, word.get_word3());         values.put(KEY_WORD4, word.get_word4());          // insert row         long word_id = db.insert(TABLE_WORDS, null, values);          return word_id;      }   How do I include prepared statements to A. make it go quicker, B. prevent attacks to the db

How do I use prepared statements in SQlite in Android?


Having a table (Table1) with Columns -> Column1 int, Column2 int, Column3 varchar(128), Column4 char(11) Need to create a stored procedure to get the details from Table1 based on the input parameter. Input parameter holds values with comma-separated. It has to be mapped with Column1 Create Procedure ProcedureName(@InputParams VARCHAR(MAX)) AS BEGIN     SELECT  Column2             ,Column3              ,Column4     FROM Table1     WHERE Column1 IN (@InputParams)     ORDER BY Column2 END  The below statement is throwing conversion error  "Conversion failed when converting the varchar value '123, 456, 789' to data type int."  EXEC ProcedureName @InputParams = '123, 456, 789'  Converting the SELECT statement to the dynamic query will work fine but will we able to fix the conversion issue in the static query. Please help me.

Is there a graceful way to handle passing a list of ids as a parameter to a stored procedure?   For instance, I want departments 1, 2, 5, 7, 20 returned by my stored procedure. In the past, I have passed in a comma delimited list of ids, like the below code, but feel really dirty doing it.   SQL Server 2005 is my only applicable limitation I think.  create procedure getDepartments   @DepartmentIds varchar(max) as   declare @Sql varchar(max)        select @Sql = 'select [Name] from Department where DepartmentId in (' + @DepartmentIds + ')'   exec(@Sql)


abstract class RepositoryBase {     protected $connection;//This is PDO Object!      public function __construct(PDO $connection = null)     {         $this->connection = $connection;         if ($this->connection === null) {             $this->connection = new PDO(                 'mysql:host=localhost:3307;dbname=project',                 'root',                 'usbw'             );             $this->connection->setAttribute(                 PDO::ATTR_ERRMODE,                 PDO::ERRMODE_EXCEPTION             );         }     }   pdo set names utf8 <-- how can i do it

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.


There is an eject key on the upper right corner of my Magic Keyboard. Since I'm neither using the eject key directly nor any of the shortcuts associated to it, I would like to remap it to a symbol that I use more often. That is in my case the backslash.   How can I remap the eject key to backslash, preferably without using third-party software? I'm using High Sierra version 10.13.3 on a Macbook Pro 2017.

I used to use  to remap Right Alt to Right Control (as an Emacs user I use Control MUCH more that Alt) but updating to Sierra broke this.  Downgrading is not an option.  How do I manually remap keys in Sierra?  I specifically would like to remap Right Alt to Right Control.


My question is why is a variable (when using var keyword) accessible outside the if statement block, but not outside the function block?  Consider this code:  let age = 30;  if (true){     let age = 40     console.log('inside', age)  //logs inside, 40//     var name = 'shaun' }  console.log('outside if loop', age, name) //logs outside if loop, 30, shaun //  function test (){     var xyz = 'ashley';     console.log(xyz)  } test ()  console.log('outside function', xyz) //throws an error//   Thank you for your time.  Any insights would be appreciated!

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


In the group $(\mathbb Z, +)$ the subgroup generated by $2$ and $7$ is    $\mathbb Z$  $5\mathbb Z$ $9\mathbb Z$  $14\mathbb Z$   I am confused between option 1 and 4. Please Help me.  Q2.Find the smallest subgroup of $\mathbb Z$ containig $8$ and $13$    8$\mathbb Z$   2.$\mathbb Z$   13$\mathbb Z$   4.104$\mathbb Z$  Is its answer 104$\mathbb Z$ because if group contain 8 and 13 then it must contain their l.c.m. Am i right?

In group $(\mathbb Z,+)$ , the subgroup generated by $2$ and $7$ is   $\mathbb Z$ $5\mathbb Z$ $9\mathbb Z$ $14\mathbb Z$   In general what's the result for any $n$, $m$ instead of $2$ and $7$.   I think it should be $\gcd(n, m)$. Is that correct?


I've downloaded an OBJ. file that is all one object besides the materials. Is there a way I can separate them out so I can delete them?

I've just made a set of armor by using a male body mesh model I downloaded and selecting certain faces from the model and duplicating them to create viable armor pieces.   Since the pieces are just duplicated from the same mesh male model, then it's still part of the same object.   How do I separate the armor piece from the model to make the pieces separate?


I have a Windows Server 2019 VPS for hosting websites. It has all the latest updates. But somehow there is a (partial) hacking attempt. I first noticed it by the SMS I got for high CPU usage of the Microsoft Register Server (regsvr32.exe). With the help of  and  that the cause was a DLL in the ProgramDAta folder. There I found a zip with the name set.zip. Containing the following 5 files. comhij.dll, let.exe, rn.bat, x.mof and xg.dll. Is seems that the .bat file got executed and was running the script. But it failed somehow, maybe Windows Defender or something else was blocking it causing the high CPU. I know this because the last lines in the .bat causes it to delete itself. And I could not find any of the changes the script wanted to make. I copied the zip to my own PC, and Norton 360 immediately identified the let.exe as Hacktool, the comhij.dll as Trojan Horse and xg.dll as Trojan.Get.MTB. The Server has the Windows Firewall active and at the provider level  there is also a Firewall active. I was able to find out that the set.zip was created by one of the AppPools (hosting a  if that matters) with no FTP access. So my question is how to find out how this happened and how I can prevent it in the future? And how an AppPool can write a file to disk outside it's root directory? On request I could post the entire .bat script.

This is a  about Server Security - Responding to Breach Events (Hacking)   See Also:                  Canonical Version I suspect that one or more of my servers is compromised by a hacker, virus, or other mechanism:   What are my first steps? When I arrive on site should I disconnect the server, preserve "evidence", are there other initial considerations? How do I go about getting services back online? How do I prevent the same thing from happening immediately again? Are there best practices or methodologies for learning from this incident? If I wanted to put a Incident Response Plan together, where would I start? Should this be part of my Disaster Recovery or Business Continuity Planning?   Original Version       2011.01.02 - I'm on my way into work at 9.30 p.m. on a Sunday because our server has been compromised somehow and was resulting in a    attack on our provider. The servers access to the Internet   has been shut down which means over 5-600 of our clients sites are now   down. Now this could be an FTP hack, or some weakness in code   somewhere. I'm not sure till I get there.      How can I track this down quickly? We're in for a whole lot of   litigation if I don't get the server back up ASAP. Any help is   appreciated. We are running Open SUSE 11.0.            2011.01.03 - Thanks to everyone for your help. Luckily I WASN'T the only person responsible for this server, just the nearest. We managed   to resolve this problem, although it may not apply to many others in a   different situation. I'll detail what we did.      We unplugged the server from the net. It was performing (attempting to   perform) a Denial Of Service attack on another server in Indonesia,   and the guilty party was also based there.      We firstly tried to identify where on the server this was coming from,   considering we have over 500 sites on the server, we expected to be   moonlighting for some time. However, with SSH access still, we ran a   command to find all files edited or created in the time the attacks   started. Luckily, the offending file was created over the winter   holidays which meant that not many other files were created on the   server at that time.      We were then able to identify the offending file which was inside the   uploaded images folder within a  website.      After a short cigarette break we concluded that, due to the files   location, it must have been uploaded via a file upload facility that   was inadequetly secured. After some googling, we found that there was   a security vulnerability that allowed files to be uploaded, within the   ZenCart admin panel, for a picture for a record company. (The section   that it never really even used), posting this form just uploaded any   file, it did not check the extension of the file, and didn't even   check to see if the user was logged in.      This meant that any files could be uploaded, including a PHP file for   the attack. We secured the vulnerability with ZenCart on the infected   site, and removed the offending files.      The job was done, and I was home for 2 a.m.            The Moral   - Always apply security patches for ZenCart, or any other CMS system for that matter. As when security updates are released, the whole   world is made aware of the vulnerability.   - Always do backups, and backup your backups.   - Employ or arrange for someone that will be there in times like these. To prevent anyone from relying on a panicy post on Server   Fault.


There was this series on Netflix around 10 years ago about a child who had an ill grandfather.  He gets sucked into another world and has to collect runes which are like guardians and has monsters that are summoned from runes. I remember the monsters are more beast-themed and he was accompanied by a female, however the last gem/rune was in the other world.  There was also this book that they put the gems from the guardians into, and in one of the episodes they have to identify the right book and they do it by finding a coffee stain on it.  It’s not Yu-Gi-Oh, Digimon, Shadowhunters, Monster Rancher or Di-Gata Defenders.

What is the name of the anime TV show where a boy can summon beasts with crystals/gems. It was on SABC 2. There was also a boy that could summon a purple turtle . I think the gems were blue, green, and red.


I downloaded Ubuntu 16.04.3 LTS and installed the iso file as a virtual machine in VirtualBox running on Windows 7.  I enabled the universe repository:  sudo add-apt-repository universe   I got this result:  'universe' distribution component enabled for all sources   I updated:  sudo apt-get update   I got this result:  AppStream cache update failed   I then tried to download a package:  sudo apt-get install mtp-tools   I got this result:  E:  Unable to locate package mtp-tools

I have created a USB stick with a persistent Ubuntu 16.04 (release version). I tried a couple of ways, using Startup Disk Creator and MultiSystem, but I get the same end result.  When I boot into the USB and do 'apt-get update', all is well.  When I try 'apt-get dist-upgrade' I get:     ** (appstreamcli:2761): CRITICAL **: Error while moving old database out of the way. AppStream cache update failed.   The only reference to this error message I can find is  but would appear to be fixed, at least fixed by the time the release version of Ubuntu 16.04.  Aside: I want to test Unity8, which includes installing software.  I don't have a spare computer, so I thought a persistent USB would do the trick.  Any takers?


I'm starting my graduation in physics and it may sound like a dumb question, but it's haunting my mind for days. It is known that the scattering of two electrons can be represented by the following Feynman diagram:    But I wonder: How does the opposite happen? I mean, how does a positive particle attracts a negative one via photon mediation?

I’m looking at Feynman diagrams for attractive forces and I'm thoroughly confused. Below are three diagrams from HyperPhysics:     These all illustrate instances where the forces are attractive. However, why are they drawn exactly as if they were repulsive? Take the first diagram between the electron and the positron. The electron moves to the right while the positron moves to the left, a photon is exchanged, and… the electrons starts moving left while the positron moves right? They move away from each other due to their attractive force? I’m sure I’ve gotten some concepts confused, so I’d be grateful to receive some help here.


I am an international student studying in Singapore and need to apply for a Schengen visa. Can I do it in Singapore, or do I have to do it from within my home country?

I'm an Indian student currently in Singapore as a Research Associate with a TEP valid for five months and have just been selected for an internship in Switzerland this summer.  Is it possible for me to obtain a Schengen visa from the Swiss Embassy in Singapore?


I'm currently trying to create a separate thread that will display a Server Message but I get thrown an error, saying I'm using the wrong thread for label 2.  My code looks like this  Thread MOTD = new Thread(() =>     {         System.Net.WebClient wc = new System.Net.WebClient();         // Use webclient to download webpage from target URL         byte[] raw = wc.DownloadData("https://targaryentech.com/Backend/test.txt");         // Convert to string         string webData = System.Text.Encoding.UTF8.GetString(raw);         // String to MessageBox         label2.Text = webData;      }); MOTD.Start();

I have a scenario. (Windows Forms, C#, .NET)   There is a main form which hosts some user control. The user control does some heavy data operation, such that if I directly call the UserControl_Load method the UI become nonresponsive for the duration for load method execution. To overcome this I load data on different thread (trying to change existing code as little as I can)   I used a background worker thread which will be loading the data and when done will notify the application that it has done its work.   Now came a real problem. All the UI (main form and its child usercontrols) was created on the primary main thread. In the LOAD method of the usercontrol I'm fetching data based on the values of some control (like textbox) on userControl.    The pseudocode would look like this:  CODE 1  UserContrl1_LoadDataMethod() {     if (textbox1.text == "MyName") // This gives exception     {         //Load data corresponding to "MyName".         //Populate a globale variable List<string> which will be binded to grid at some later stage.     } }   The Exception it gave was     Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on.   To know more about this I did some googling and a suggestion came up like using the following code  CODE 2  UserContrl1_LoadDataMethod() {     if (InvokeRequired) // Line #1     {         this.Invoke(new MethodInvoker(UserContrl1_LoadDataMethod));         return;     }      if (textbox1.text == "MyName") // Now it wont give an exception     {     //Load data correspondin to "MyName"         //Populate a globale variable List<string> which will be binded to grid at some later stage     } }   BUT BUT BUT... it seems I'm back to square one. The Application again  become nonresponsive. It seems to be due to the execution of line #1 if condition. The loading task is again done by the parent thread and not the third that I spawned.  I don't know whether I perceived this right or wrong. I'm new to threading.  How do I resolve this and also what is the effect of execution of Line#1 if block?  The situation is this: I want to load data into a global variable based on the value of a control. I don't want to change the value of a control from the child thread. I'm not going to do it ever from a child thread.   So only accessing the value so that the corresponding data can be fetched from the database.


I'm pretty much a graphic-design noob. I want to take this equation from this image (I want this handwriting) and convert it into a vector image. How do I go about doing that?

I have a raster image, basically a scanned drawing of the outlines (and some detail) of various objects, and I wish to convert these lines to vectors, using either Illustrator or Inkscape.  My present solution is to have the raster image as a background layer, and in a new layer above it I use the pen to follow the lines as close as possible.  Later I tweak these lines to fit the raster image better. That has worked fine for simple drawings. However for some of my extremely complex drawings, this is very tedious to do.  Is there any tool or filter of some sort that is capable of recognizing the lines in line drawings and creating vector paths from them?


I could not think about how to prove that decimal expansion of a rational number of a rational number is eventually repeating.      Note that this question has to be proved using Pigeonhole principle only. So, don't close it.    While searching on internet I found this solution whose image I am posting.      But I am unable to think about how does author writes this  in third line of proof ->To compute the 10 place digit $a_1$ one computes $r_0$ ×10 = $a_1$ × n +$r_1$ .    Can someone please give explanation of this statement that why this must be true.

I am trying to figure out how to prove that all rational numbers are either terminating decimal or repeating decimal numerals, but I am having a great difficulty in doing so. Any help will be greatly appreciated.


Let $R$ be a commutative ring. If $I\leq R$ is an ideal s.t. $\sqrt I=m$ is maximal, then $I$ is primary.  Proof  Since $m$ maximal, $Nil(R/I)=m/I=:n$ is maximal.  Q1) Why $m/I$ is maximal in $R/I$ when $m$ is maximal in $R$ ? I have problem to prove this fact.  Hence, every prime ideal contain $n$.  Q2) Why is $p$ is prime in $R/I$, then $p\supset n$ ?

I've got to prove that an ideal $Q$ whose radical is a maximal ideal is a primary ideal. That is, I want to prove that if $xy\in Q$, then $x\in Q$ or $y^n\in Q$ for some $n>0$.    I've been trying for a while and I'm not sure where to begin. All I've got is that if $\text{Rad}(Q)$ is maximal and by definition it's the intersection of all prime ideals $P_i$ containing $Q$, then it must be equal to each of these $P_i$. So there is only 1 prime ideal containing $Q$, namely $\text{Rad}(Q)$.  Could anyone point me in the right direction? Thanks for any replies.


I want to directly read a file, put it into a string without storing the file locally. I used to do this with an old project, but I don't have the source code anymore. I used to be able to get the source of my website this way.  However, I don't remember if I did it by "InputStream to String array of lines to String", or if I directly read it into a String.  Was there a function for this, or am I remembering wrong?  (Note: this function would be the PHP equivalent of file_get_contents($path))

If you have a java.io.InputStream object, how should you process that object and produce a String?    Suppose I have an InputStream that contains text data, and I want to convert it to a String, so for example I can write that to a log file.  What is the easiest way to take the InputStream and convert it to a String?  public String convertStreamToString(InputStream is) {     // ??? }


I am an Indian passport holder and will be travelling from New Delhi to Lima via London and Miami. I have a short layover of 3hrs in London in going to Lima and while coming back. My questions are:   If I have a valid C1 visa for USA do I still require transit visa (DATV) for UK? My baggage will be checked through to Lima and I will not be leaving the border control area. I will be coming back in 20 days. Since C1 is multi entry, will no visa for UK be still applicable while coming back?

Is there a website or some other way to find out if I need a transit visa for a short stop in the UK on my way somewhere else? Ideally this should give me the answer for all nationalities, and take into account any other visas I may have.


As shown in the image below, I have a simple object that I want to shade smooth, so my final model won't be too heavy since I'm gonna repeat it thousands of times.  It appears that some faces are correctly shaded smooth, but others are not at all. When I saw this I immediately went to check if auto smooth was on and the angle setting here caused it, but this is not the case.  Everything looks normal in the lookdev and the solid shaded mode, also my topology shouldn't cause any of these problems.  Am I overlooking something very obvious here? I've been working with blender for hundreds of hours, but have no idea what is causing this. Any ideas?

I've been modeling a hermit crab and I don't know why but some areas of the mesh are really dark on some spots, like the legs and the claws.   I hope you can help me fix it.


If i have my second display pluged in everything freezes after a couple of seconds after login.  I'm running version 16.04. The grahpics card is a gtx960m and i have driver version 361.42. It only happens if i have a second display pluged in and after rebooting 3 or more time it sometimes doesnt freeze. I dont know what to do.  thanks in advance.

I installed or upgraded to Ubuntu 16.04, but I'm having some problems with my graphics card.   The display is blank The display flickers Items on the screen do not display correctly Certain programs complain of graphics issues The computer boots to low-graphics mode Your specific issue may not be here, but try the solutions described in the answers anyway.   This question is very broad, but each one of these issues likely has one solution.    If you are experiencing a login loop, check the last part of my answer.    If you experience one of the listed issues and have your own solution (mine didn't work, or there's a faster way), feel free to post another POLITE answer, describing your problem and how you fixed it.    Those attempting to install Ubuntu, please refer to the section titled: If you are unable to enter a TTY or are trying to install Ubuntu.


Have Ubuntu 14.04. loaded Kdenlive from the Software Center. It works from icon on DASH and from Terminal. However, I have no idea how to put icon on desktop. I looked in usr/share/applications-no icon. Also checked /usr/bin/kdenlive. I found the executable, but no icon startup to copy. Would appreciate anything to point me in right direction. Thanks

Is there an easy way to create a desktop shortcut for an application in Unity? The ability to right click or drag and drop icons to the desktop in Unity does not seem to be there.


I don't have internet during the day and I need to post by email. Is it possible?

I want to be able to ask a question by sending an email to some special email address for Stack Overflow. I have found this convenient in other situations like Google Groups, blogging, and Facebook walls, and it seems that technically it shouldn't be too hard to do.  Does this feature exist already? I'm kind of afraid to ask for features as some of them get downvoted simply since users think they are not neccessary (and not because the post is bad).


I'm trying to build my first generic list and have run into some problems. I understand the declaration looks like " List<T> ", and I have using System.Collections.Generic; at the top of my page. However, Visual Studio doesn't recognize the T variable.   What am I missing?

I have a VB background and I'm converting to C# for my new job.  I'm also trying to get better at .NET in general.  I've seen the keyword "T" used a lot in samples people post.  What does the "T" mean in C#?  For example:  public class SomeBase<T> where T : SomeBase<T>, new()   What does T do? Why would I want to use it?


One version of Arzela-Ascoli theorem can be stated as follows:     Consider a sequence of real-valued continuous functions   $\;\{ f_n \}_{n \in \mathbb N}\;$ defined on a closed and bounded   interval $\;[a, b]\;$ of the real line. If this sequence is uniformly   bounded and equicontinuous, then there exists a subsequence $\; \{ {f_n}_k \}_{k \in \mathbb N} \;$ that converges uniformly.   I am trying to extend the theorem for sequences of real-valued functions defined on $\; \mathbb R\;$. One hint I've got , is to use a diagonal argument...but I'm not very familiar with this.  EDIT: I need to derive that a sequence of real-valued functions defined on $\; \mathbb R\;$ which satisfy the conditions of boundedness and equicontinuity on a closed interval of $\; \mathbb R\;$, has a uniformly convergent subsequence on compact intervals.  How do I proceed?  I would appreciate if somebody could enlighten me about this. Any help would be valuable!   Thanks in advance!!!

The statement I am trying to prove:  Let $\{ f_n \}$ be a sequence of equicontinuous, real valued, uniformly bounded   continuous functions on $\mathbb{R}$. Show that $\{ f_n \}$ has a convergent subsequence   which converges uniformly on any bounded subset of $\mathbb{R}$ and pointwise on all   of $\mathbb{R}$ to a continuous function. (Royden pg 210, problem 9).  I believe the first portion follows directly by Arzela Ascoli, once it is noted that if we are given some bounded subset $E$, we can look at $\overline{E}$ a compact set on which the family is equicontinuous and uniformly bounded.  For pointwise convergence on all of $\mathbb{R}$, the question seems to require some sort of diagonalization argument: Take some dense sequence of $\{x_i\}$ (the reals are separable) and write columns of $f_n$ applied to each individual point. There will be a convergent subsequence by Bolzano-Weirstrass and since the outputs are real and bounded by the uniform boundedness of the family. I am a bit fuzzy on this part: Repeating this literally pointwise and moving far enough diagonally, we can correct for different convergence "speeds" pluck out a single convergent subsequence for any given epsilon and have $\sup|f_n(x)-f(x)|<\epsilon$ for any given epsilon. Finally, continuity should follow from an $\epsilon/3$ argument and equicontinuity of the family.  However, in formalizing the above, I am getting caught up in the notation of that sort of argument and am hoping for a more elegant solution. Is there a better way? Am I just generally confused and that's why I'm having trouble writing things down formally?   Thanks!


When I help others, they say "thanks a lot". What should I say to reply to them?

In my school and university I was taught to say "Not at all" or "Don't mention it" in response to "Thank you!". Now I rarely hear these phrases used, but rather something like "You're welcome", "It's OK", "My pleasure", or "No problem".  My real life conversation experience is very poor. I often listen to some English learning podcasts, and watch some films in English. So I listen to dialogs, which are probably not from  the modern real life world.   How do native English speakers tend to respond to "Thank you!" now? What I should care about, when choosing from the available options?


I have an app which requires me to enter my password every time I launch it. Can I somehow make this app access root account so that it runs automatically without having me enter the password? This dialog pops up every time:

I am using an application called Hostbuddy to manage entries in my hosts file. It works great, the only problem is that is asks for my password every time I use it, which adds up to a lot of inconvenience. How can I permanently give Hostbuddy the permission it needs? The two things it asks for the password for are to modify the hosts file and to flush my DNS cache.  PS, I understand the security implications of this, and I trust the app.


In the main.cpp I called the functions of VLA's object. If I put the code of VLA class into VLA.cpp and VLA.h, then I would get the problem upon when compiling, whatever using Clion, Terminal, Xcode... But I put all the code in main.cpp then it would be OK. I wonder just because I use template <typename T>? If I don't use template everything would be OK.

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


I am a student of class 11 and I have a doubt about reflection of waves on a string tied to a massless ring which can slide on a frictionless rod. When the wave reaches its end, the ring overshoots its amplitude because there is a lack of restoring force on it, as is written in the book Concepts of Physics. And in some places, it is written that this is due to superposition of the incident and reflected waves. But I am not able to understand what causes reflection of the wave in physical terms - like, which force creates the reflected wave of the same amplitude?

I need to understand one seemingly simple thing in wave mechanics, so any help is much appreciated!  When a pulse on a string travels to the right toward an open end(like a massless ring that is free to oscillate only in the vertical direction), then when the wave reaches the end it gets reflected and it becomes a positive pulse traveling to the left. So, my first question is, why do we even have reflection in this case(as far as energy and forces go)? What causes it in physical terms(intuitively)? And why for an open end the reflected wave is a positive wave and why for a closed end the reflected wave is a negative wave? An explanation using the tension of the string and energies will be much appreciated.  Also, for the open end case, the massless ring will have an amplitude of two time the amplitude of the incident wave while the wave gets reflected. Why is this the case? (or to state it differently why does the ratio of the amplitude of the transmitted wave divided by the amplitude of the incident wave equal to +2?).  Thank you!    ΝΟΤΕ: I want an explanation using forces or energy and not "image waves"


For example...  I closed a vote for 'too broad'. But then I realized I wanted to close it as a specific duplicate of another question instead. So I retracted my close vote.  That worked. But I can't now vote to close as duplicate and the title says I already voted to close.  Maybe this is intentional but it doesn't feel that way.

Voted to close a question based on "lack of minimal understanding".  Later realized the question was a duplicate.  How to I change vote to mark as duplicate instead?


I know that the SI unit of angular velocity is $s^{-1}$ (because radians or angle measure is dimensionless). I encountered a question that said:     Given angular velocity = $12 \, s^{-1}$ and angular acceleration = $6\,s^{-2}$.    I have never had a question with this kind of unit. Usually units such as rad/s, deg/s, rpm, revolutions/s (angular velocity) are encountered but this question does not have a measure of angle attached.   I think it can be interpreted as any of this rad/s, deg/s or etc. One of colleague said:      If it's $s^{-1}$ it means it is $1\,\text{rad}\cdot s^{-1}$.    Is my colleague right? Is the question incomplete or I am missing something here?

I'm trying to understand the units in:  $$mx''+kx=0$$  And the general solution is $$x(t)=A \cos(\omega_0 t)+B \sin(\omega_0 t).$$  Let $\omega_0 =\sqrt{\frac{k}{m}}$ - the unit for the spring constant $k$ is $kgms^{-2}$ or $Nm^{-1}$, where $m$ is in $kg$, so that the units of $\omega_0$ seem to be "per second" (i.e) $1/s$.  But, later we put $\omega_0$ in to the $cos$ and $sin$ functions which will return dimensionless ratios. So, The constants $A,B$ must be in $m$, since $x$ is in $m$.  What I don't understand is why my book says $\omega_0$ has the unit $rad/s$, I get that the input for cosine is $rad$ or some other angle measure, but where did the radians come from?  My analysis of units only proved $1/s$ as the actual units..!    I have just been informed that radians are dimensionless. So, that answers part of this question, yet I still don't know why we can't say that dimensionless one in degrees or rotations..? How do I know what kind of cosine and sine table to use with this dimensionless number?


In my study, I include PDF graphics as images in order to receive high resolution graphics. These PDF graphics are initially created in Power Point, printed as PDF there, and then included in the document like in the code below.  In the original PDF that is included, "fi"s and "ff"s are shown (as in "Definition"), but after inclusion in LaTeX and compilation, they are lost. As I already include a PDF, I cannot add anything in the LaTeX code to avoid this, I guess. What can I do?  The PDF is located in the same folder as "SimulationProcess.pdf". I attach a partial screenshot of both the original PDF and the look after compilation.      \documentclass[oneside,a4paper,11pt]{book}  \usepackage[bindingoffset=1cm,margin=3cm]{geometry}  ...  \begin{document}  ...   \begin{figure}[here]  \centering   \includegraphics[width=\textwidth]{SimulationProcess}   \label{fig:SimulationProcess}  \end{figure}

In the following example, the 'ff' ligature in the figure labels (in 'differential') disappears when pdflatex is used, but the fault does not occur if latex-dvips-ps2pdf is used instead. Both lualatex and xelatex produce the correct results, using the pdf version of the figure. Is there a problem with the figure, or is this a bug in pdftex?  \documentclass{article} \usepackage{graphicx} \begin{document} \includegraphics[width=0.9\textwidth]{Cluster2} \end{document}


I want to do some macro photography (plants, insects...) additionally to my landscape photography and now I am looking if it is more useful to just buy a macro tube to convert my existing lenses (a 18-140mm, a 70-210 mm and a 150-600mm) for my Nikon D7200 to macro lenses or just buy some extra macro lenses. I am not planning to do a awful lot of macro photography but I want to expand my possibilities.  My concern is that it would be cheaper just to buy a macro tube to adapt the lenses but for that I would loose a lot of sharpness and functionality of the lenses like the autofocus and the Image stabilization.  Are there any other Advantages than this to a special Macro lens compared to just a macro tube with a lens?  Did anyone has some suggestions for good macro tubes which don't cost me a arm and a leg and allow at least autofocus and f-stop capabilities?

As far as I understand all three options help you do macro photography but are their other reasons for having the three different items? I figured reversal rings and extension tubes were just for the low cost but with additional more expensive features being added to the two options it seems there may be certain situations for each type? What are their biggest differences and advantages over each other?   Are there situations where you would have one over the other? Do all three options have the same "wafer thin" depth of field?  Do they all suffer from the same light loss? Do any of them affect your photos more negatively than the others? Can I achieve the same magnification with rings and tubes that I can with proper lenses? Would you ever combine these options together or would there be no need for that?   I ask because I recently bought a cheap extension tube and reversal ring and I'm trying to get a better overall understanding of each. I tend to use the extension tube a lot more, because I can put it on my 70-200 and have a workable distance between subject and lens.  This photo was taken with 49mm of extension tube on the 70-200 I believe which may be greater than 1:1. Would it be sharper with a macro lens?       on 500px


So, first of all, I want to say, that I know that similar questions existing, but no of these helped me out though.  I just want to create a frame, within a headline with 50px and another frame in this "container" with height 100%.  But this is not working.  I already tried to create multiple container as divs etc.  this is the current result.  ... and this is the current code I used.    body {   background-color: black; }  .container {   width: 500px;   height: 500px;   background-color: red;   padding: 10px; }  .top {   width: 100%;   height: 50px;   background-color: green; }  .bottom {   width: 100%;   height: 100%;   background-color: blue; }

     I want to look like this:

I am working on a web application where I want the content to fill the height of the entire screen.  The page has a header, which contains a logo, and account information. This could be an arbitrary height. I want the content div to fill the rest of the page to the bottom.  I have a header div and a content div. At the moment I am using a table for the layout like so:  CSS and HTML    #page {     height: 100%; width: 100% }  #tdcontent {     height: 100%; }  #content {     overflow: auto; /* or overflow: hidden; */ }

...

...

     The entire height of the page is filled, and no scrolling is required.  For anything inside the content div, setting top: 0; will put it right underneath the header. Sometimes the content will be a real table, with its height set to 100%. Putting header inside content will not allow this to work.  Is there a way to achieve the same effect without using the table?  Update:  Elements inside the content div will have heights set to percentages as well. So something at 100% inside the div will fill it to the bottom. As will two elements at 50%.  Update 2:  For instance, if the header takes up 20% of the screen's height, a table specified at 50% inside #content would take up 40% of the screen space. So far, wrapping the entire thing in a table is the only thing that works.


I am a beginner currently working on my first real project. For this project I am required have a cubistic tunnel environment with light on the end. Everything went great until I wanted to make an animation-render [cycles] to with some camera movement to show off the environment as a test. When the rendering started I was shocked to see that each frame took about 4 minutes to render out. As there are 350 frames for this little test I reckoned was doing something wrong so I searched for ways to improve the rendering but to not much result. I am getting really desperate at this point so I would value your input greatly. Computer: Macbook Pro - M1 - 16GB RAM I tried with the GPU and CPU both with optimized tile and adaptive sampling at rather low sample settings.

I have a scene of an office. It has chairs, tables, computers, and so on. I would like to know how I can render this scene faster as I am planning to make animation inside the office and don't want the render to take forever. I know of sampling, resolution and most things in render settings. I have also heard of render passes or rendering using layers.


I would like to know how gamma rays from cosmic rays are blocked by the earth's atmosphere. I know that the sun's gamma radiation don't usually reach the earth so I wouldn't be worrying much about it. I have did some research and I only see that ozone will block uv radiation but not gamma radiation. So I am wondering how is gamma radiation being blocked by the atmosphere? What molecules in the atmosphere specifically absorb gamma radiation? Thank you!

Sun is generating energy by nuclear fusion. And nuclear fusion will emit energy in the form of gamma rays.  Normally earth's ozone filtering the Ultraviolet radiation. And magnetic fields of earth deflecting the cosmic rays(charged particles).  But what kind of natural system protecting us from sun's gamma ray as it is main product of nuclear fusion?     Note: As we know gamma ray can be blocked by denser materials like   several meters of thick lead (Pb).


PriorityQueue<HeapIndex> priorityQueue = new PriorityQueue<>(k, new Comparator<HeapIndex>() {     @Override     public int compare(HeapIndex o1, HeapIndex o2) {         return o1.val.compareTo(o2.val);     } });  Here we are passing initial capacity i.e. k and a comparator function to PrioityQueue class constructor.

What is the use of anonymous classes in Java? Can we say that usage of anonymous class is one of the advantages of Java?


I'm trying to classify (LDA) few samples (n=12) in a high dimensional feature space (p=24) into 3 classes.  First I reduced the dimension of my initial dataset with a PCA, keeping only the first two Eigen vectors. Update: turns out, I was actually using all 11 PCs for the LDA. Then I had a look at the projection of my n x 2 n x 11 dataset in the LDA space (1st vs 2nd Eigen vector) and I obtained the following:   I was quite happy because the LDA found a strong separation between the 3 classes.  So I tried a leave-one-out cross validation to evaluate the LDA. I trained the classifier with 11 samples and tested it with the last one, and looped around.  The problem is the classifier performs at chance level (30% success rate).  I noticed that the LDA space changes drastically between each iteration, depending on the 11 samples used to compute it. Moreover, when I project the tested sample in the corresponding LDA space, it falls quite far away from what should be its group, explaining the poor success rate.   My questions are: is it normal that such a (visually) nice separation between classes leads to such a poor classification? Is it due to the small number of samples? Is there anything I can do to improve the situation?

Assume I have a dataset for a supervised statistical classification task, e.g., via a Bayes' classifier. This dataset consists of 20 features and I want to boil it down to 2 features via dimensionality reduction techniques such as Principal Component Analysis (PCA) and/or Linear Discriminant Analysis (LDA).  Both techniques are projecting the data onto a smaller feature subspace: with PCA, I would find the directions (components) that maximize the variance in the dataset (without considering the class labels), and with LDA I would have the components that maximize the between-class separation.  Now, I am wondering if, how, and why these techniques can be combined and if it makes sense.  For example:   transforming the dataset via PCA and projecting it onto a new 2D subspace transforming (the already PCA-transformed) dataset via LDA for max. in-class separation   or    skipping the PCA step and using the top 2 components from a LDA.   or any other combination that makes sense.


In my attempt to make a new crontab file work on 16.04, I made the following mistake as root:  sudo su root crontab /etc/cron.d/myjob   I realized too late that I must've changed some default crontab behaviour, ie regarding crontab -e. I tried to roll back like this:  # still as root: crontab /etc/crontab   Is that the correct default setting? If not, then what is?  PS: The  does not answer my question. The answer there only states how to remove a crontab, not how to re-generate the default Ubuntu installation settings which is what I need to know.

I've previously set a file to be crontab source file with crontab filename. How can I set it back to use default source? (the one that is modified with crontab -e)  Thank you.


I am using the 625k bedrock data from BGS. I have a range of site across scotland.  I have then clipped the file down to within a 70Km radius of each site, a lot of over lapping areas with disintegrated boundaries ends up with most of scotland covered.  However, i have categorised the style of the bedrock data by name.  When i place the legend in there seems to be an awful amount of classes.  Bar going through each layer and ascertaining if it is displayed or not is there a way to display only the parts of the layer you can see in the legend.  Cannot show images due to client confidentiality.

Is there in QGIS a function or a plugin that works similar to Legend Limiter in ArcGIS? The attribute I want to show in my legend has many possible values, I want my legend to only show those values that are visible on my view in the print composer.


Suppose I want to see an input, say name is set in a form in php, I can do this:  if (isset($_POST['name']) {     echo("type in name"); # or something }   Can I do something like that in nodejs this way:  router.get('/', function (req, res, next) {     if (req.body.name == "") {         res.send('type in name'); // or something     } });   I'm new to both php and nodejs, so can someone clarify this for me, or provide me with a better/correct solution in nodejs?  I don't want to check if some object has some property, but if the form submitted has the property name set, i.e name is non empty.

How do I check if an object has a specific property in JavaScript?  Consider:  x = {'key': 1}; if ( x.hasOwnProperty('key') ) {     //Do this }   Is that the best way to do it?