I have a problem with perfboard, every time I made a circuit which works flawlessly in breadboard, doesn't work on perfboard. Is it because of soldering distance or am I doing something wrong?  All circuits are 5-12V and low current (200mA max). First one is 7 segment display, second one pwm motor control, last one Ne555 frequency generator. Display circuit's problem is display randomly flickers segment. PWM's problem is MOSFET randomly opening or closing (and heats up). NE555 problem is output is always on even NE555 removed.   It seems like solder or perfboard causing the voltage jump (somehow) but I checked several times and multimeter shows no connectivity, I tried to clean the paste and clean the space between solders but still no luck. Some of my circuits to show the problem:

I'm a total beginner when it comes to soldering, and recently I've been trying (and failing) to solder together a simple circuit I put together for a Raspberry Pi sensor.    Although it works fine on the breadboard, when I solder it onto one of my , the sensor no longer turns on.    Here is a topdown view of my soldered circuit:    Here is a view of the connections (the red block is just covering up old connections from past attempts):    More pictures of the connections.  What might I be doing wrong?


If a function $f:\mathbb{R}_+ \to \mathbb{R}$ is uniformly continuous and Riemann integrable on $\mathbb{R}_+$ (i.e. $\lim_{x\to\infty} \int_0^x f(s)ds$ exists and is finite), then $f(x)\to 0$ as $x\to\infty$.  Thus, I want to find an example of a continuous function, Riemann integrable on $\mathbb{R}_+$ which does not tend to zero.   Clearly, the limit of $f(x)$ as $x\to\infty$ should not exist.

Is there a continuous function such that $\int_0^{\infty} f(x)dx$ converges, yet $\lim_{x\rightarrow \infty}f(x) \ne 0$?  I know there are such functions, but I just can't think of any example.


Does the cosmological constant represent ?  According to the current Lambda-CDM cosmological model, there must be a fair amount of the dark energy in the universe responsible for the acceleration of the expansion and other things. This idea is represented by the cosmological constant, introduced by Einstein.  If the cosmological constant (dark energy) is responsible for repulsion, can it be considered a gravitational repulsion? And consequently, can gravity be considered both attractive and repulsive? I feel the answer is no, but why specifically is this a wrong way of thinking?

My understanding is that dark energy, or equivalently a positive cosmological constant, is accelerating the expansion of the universe and I have read that this gives empty space-time positive curvature, ie de Sitter geometry. I also understand that parallel geodesics converge when curvature is positive and diverge when it is negative. I would expect accelerating expansion of space to make parallel space-time geodesics diverge and thus make curvature negative. Is there a nice visual explanation why dark energy actually produces positive curvature?


I am currently using Ubuntu 10.04. I know there is a 10.10 release, but can I upgrade directly to 11.04? Could you walk me through the steps please?


I had a dual boot system with Ubuntu and Windows 7 ultimate. Windows 7 got corrupted so I had to reinstall Windows 7.   When I had the system dual booting when Windows wasn't corrupted, it used to ask me what OS to boot.  Before reinstalling Windows 7 I installed Ubuntu and moved my important files from windows to Ubuntu. I made a bootable windows 7 USB.   I inserted the USB into the machine, and I started reinstalling Windows 7. I formatted the partitions (didn't format Ubuntu's) and installed it from USB.  After reinstalling Windows 7, I restarted the computer so I can choose which OS to boot, but the boot options never showed up -- it only boots up from Windows.  How can I boot back into Ubuntu so I can move the files back or at least take them out?

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


$ bash --norc $ export | grep '_=' declare -x _="/bin/bash" $ export | grep '_=' $    What happens to _? Is it dropped out of the environment immediately when?   This is related to my other question, "".

Could you explain the following sentences from Bash manual about $_, especially the parts in bold,  maybe with some examples?      At shell startup, set to the absolute pathname used to   invoke the shell or shell script being executed as passed in the environment   or argument list.      Subsequently, expands to the last argument to the previous   command, after expansion.      Also set to the full pathname used to invoke each   command executed and placed in the environment exported to that command.     When checking mail, this parameter holds the name of the mail file.


Do I need to reload all app software such as kmoney, xsane etc after update?

I am running Ubuntu 14.04 LTS. Today when I logged into my computer I got an update alert saying that I could upgrade to Ubuntu 16.04 LTS. The other options were not now or do not upgrade. If I chose to upgrade will it delete my /home directories and the installed software under /opt and /usr/local ?


When you calculate momentum e.g  An object moving at 10 m/s that has a mass of 5kg. This object will have a momentum of 50 kg*m/s.  What I don't understand is, what does the 50 kg*m/s mean? Does it mean the stopping power it would take to bring an object to rest? If so, in this case it would be 50 Newtons?

I just want to get an idea what  is. I know the mathematical meaning that momentum is $mv$ where $v$ is velocity. But I don't know its significance. Like I know that Acceleration is how velocity is changing with respect to time, I wanted to get feel of what momentum really is?


Which is correct?  I work for Jan-Carol Graphics (JCG). or I work for Jan-Carol Graphics (JCG.)

Are there cases where a period is placed inside parentheses? In which cases the period (or a comma) should be placed inside the parentheses?


How do you stop logging of a specific event on a centos error_log.  I have a file which is blocked via .htaccess but each time it is accessed I get a new line on the log saying:  [Tue Jan 27 09:48:42 2015] [error] [client XX.XX.XXX.XX] client denied by server configuration   I would like to remove this specific message from future reporting as it is growing my log files unnecessarily but keep all other error logging.

I'd like to avoid logging some missing files (that gives a 404) into the Apache2 error log.  I want to do this on an Eclipse update site for my plugin. Problem is that the Eclipse P2 code tries to access its metadata files like content.xml, content.jar, digest.zip and a few others, which are not available on my site. When P2 finds this out, it finally reaches for site.xml, which I provide. All in all, everything works fine ... but I have tons of lines like:  [Mon Jul 06 21:46:46 2009] [error] [client 195.91.79.90] File does not exist: ...htdocs/stable/content.jar   in my error.log file, which doesn't help me very much.  One solution that comes to my mind is to let Apache log through grep (via pipe-logging), but I am looking for a better solution.  I was thinking about tagging these requests with SetEnvIf directive, and skipping error log for tagged requests, but the ErrorLog directive doesn't support that.  Any other ideas?


I just posted to request (as a low-rep user; not a high enough rep to comment) for a feature to ask a user on someone else's question, who posted a good solution, for further elaboration. My post was given a lot of criticism. Essentially, everyone deemed the request as abuse of comments. I understand their concerns, but know that others share the same frustration in addition to myself.   All I would like is a way to ask someone who posted a good answer to elaborate further. Because I can't do this, I don't have a solution when there's a great one that's very close to helping me. If I post to ask the same question, that will be marked as a duplicate.   I was on Stack Overflow and somebody posted a snippet of their code showing a great example that would have helped me quite a bit. But the code didn't show the whole picture, and if I could have had him elaborate on what he answered, I would have fixed my issue a while ago.  Nobody has provided a way to get further help, and I've seen so many posts that ask a similar question but haven't found a solution.  So how can I ask someone who posted a good solution to elaborate further?

Users with less than 50 reputation points cannot write comments on questions and answers that they don't own.  Why does this limit exist? But I want to contribute now. What should I do instead? But I can't write a good answer without more information! Shouldn't I be allowed to post comments if I have reputation on a different site? But I saw a new user posting a comment! How did they do it? Why do I need 50 reputation to comment on my own post?   See also:    in the Help Center


During the update operation I got the following error:  (Reading database ... 713992 files and directories currently installed.) Removing linux-image-extra-4.10.0-35-generic (4.10.0-35.39~16.04.1) ... depmod: FATAL: could not load /boot/System.map-4.10.0-35-generic: No such file or directory run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-35-generic /boot/vmlinuz-4.10.0-35-generic run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-35-generic /boot/vmlinuz-4.10.0-35-generic run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.10.0-35-generic /boot/vmlinuz-4.10.0-35-generic update-initramfs: Generating /boot/initrd.img-4.10.0-35-generic Warning: No support for locale: en_IN depmod: WARNING: could not open /var/tmp/mkinitramfs_XGKldO/lib/modules/4.10.0-35-generic/modules.order: No such file or directory depmod: WARNING: could not open /var/tmp/mkinitramfs_XGKldO/lib/modules/4.10.0-35-generic/modules.builtin: No such file or directory  gzip: stdout: No space left on device E: mkinitramfs failure cpio 141 gzip 1 update-initramfs: failed for /boot/initrd.img-4.10.0-35-generic with 1. run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1 dpkg: error processing package linux-image-extra-4.10.0-35-generic (--remove):  subprocess installed post-removal script returned error exit status 1 Errors were encountered while processing:  linux-image-extra-4.10.0-35-generic E: Sub-process /usr/bin/dpkg returned an error code (1)   I tried to purge the kernel that causes the problem with no success. How can I solve this problem.

My first issue was when I tried to apt-get update or apt-get upgrade. On upgrade I get the following error:  You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies: linux-image-server : Depends: linux-image-3.2.0-27-generic but it is not installed E: Unmet dependencies. Try using -f.   I tried running apt-get install -f and this was the output(after saying yes on prompt)  (Reading database ... 186183 files and directories currently installed.) Unpacking linux-image-3.2.0-27-generic (from .../linux-image-3.2.0-27-generic_3.2.0-27.43_amd64.deb) ... Done. dpkg: error processing /var/cache/apt/archives/linux-image-3.2.0-27-generic_3.2.0-27.43_amd64.deb (--unpack):  failed in write on buffer copy for backend dpkg-deb during `./boot/System.map-3.2.0-27-generic': No space left on device  No apport report written because the error message indicates a disk full error                                                                           dpkg-deb:    error: subprocess paste was killed by signal (Broken pipe) Examining /etc/kernel/postrm.d . run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.2.0-27-generic   /boot/vmlinuz-3.2.0-27-generic run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.2.0-27-generic /boot/vmlinuz-3.2.0-27-generic Errors were encountered while processing: /var/cache/apt/archives/linux-image-3.2.0-27-generic_3.2.0-27.43_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)   I tried running apt-get autoremove and it gives me the same error as apt-get upgrade.  When I run df, I get this for /boot:  /dev/sda1                    233191     230297         0 100% /boot   So, I read elsewhere that I should try to purge old kernels. I checked for what kernels I had with:  $ dpkg -l linux-image-\* | grep ^ii ii  linux-image-2.6.38-13-server  2.6.38-13.52  Linux kernel image for version 2.6.38 on x86_64 ii  linux-image-3.0.0-13-server   3.0.0-13.22   Linux kernel image for version 3.0.0  on x86_64 ii  linux-image-3.0.0-14-server   3.0.0-14.23   Linux kernel image for version 3.0.0  on x86_64 ii  linux-image-3.0.0-15-server   3.0.0-15.26   Linux kernel image for version 3.0.0  on x86_64 ii  linux-image-3.0.0-16-server   3.0.0-16.29   Linux kernel image for version 3.0.0  on x86_64 ii  linux-image-3.0.0-17-server   3.0.0-17.30   Linux kernel image for version 3.0.0  on x86_64 ii  linux-image-3.2.0-24-generic  3.2.0-24.39   Linux kernel image for version 3.2.0  on 64 bit x86 SMP ii  linux-image-3.2.0-25-generic  3.2.0-25.40   Linux kernel image for version 3.2.0  on 64 bit x86 SMP ii  linux-image-3.2.0-26-generic  3.2.0-26.41   Linux kernel image for version 3.2.0  on 64 bit x86 SMP   When I try to remove the oldest with this:  $ sudo apt-get purge linux-image-2.6.38-13-server Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: linux-image-server : Depends: linux-image-3.2.0-27-generic but it is not going to be     installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).   How can I free up or extend boot without messing up my installation?


If a bash script contains a relative path ( to specify a file, a directory, ...), which path is the relative path  relative to,    the pathname to the parent directory of the bash script, or the current directory where we run the bash script?   If I may ask, do similar questions in a Python script, in a Java program, in a C program, in a C++ program, .... have the same answer?  Thanks.  I don't see any similarity with the linked question. I am asking about what a relative path in a program is relative to.

Does the command pwd in a shell script output the directory the shell script is in?


Questions with bounties that were awarded long ago (> 1 week) show up on the featured tab on several sites. All instances I've seen so far are on sites where this is the only item in the featured tab.  For example, on :    Note that there is no blue [+n] before the question. Also, the bounty was already awarded to an answer on the 11th of August. If an bounty was started after that, it wouldn't have expired yet, but it has also not been awarded.   This is also on , ,  and . In all cases, the bounty has been awarded and its the only featured question in the tab.

According to , questions with bounties are removed from the "featured" tab once the bounty ends:  Questions with an active bounty appear with a special icon in all question lists, and are also visible on the home page's Featured tab. During the grace period, there will be no indication in the questions lists (e.g. front page, featured tab) that the question has a bounty  However, the current behavior, at least in some instances, is that bountied questions are remaining on the featured tab beyond the seven-day bounty period. On Biblical Hermeneutics.SE, a recently bountied question's  shows that the bounty ended two days ago (July 26, 08:47 UTC) and that it started on July 18 at 07:00 UTC:    Given this, the question should have been removed from the featured list on July 25, at the start of the grace period.  As of this moment, however, the question still appears on the featured tab:    The problem is not limited to BH.SE.  On Christianity.SE right now  whose bounty was started more than 7 days ago, and which was already awarded, still appears in the featured tab:     Why are bountied questions not being removed from the featured tab exactly 7 days after their bounties start?


A story mission might have several difficulties, e.g., normal level 14, hard level 18, hard level 20, impossible level 24. What actually changes across these difficulties? Enemy health? Player health? Enemy weapon power? Drops and in-map vehicles? Experience and glimmer gain? The only difference I can see from the settings is that there is a greater XP bonus for finishing on a higher difficulty, but I don't know what that entails. What are the differences between story difficulty levels?  This is also to ask how player level affects story mode gameplay. I heard someone say that every level difference added/removed 20% of difficulty, but I couldn't verify this anywhere else.

When selecting a story mission, I can choose between "Easy" and "Hard".  Next to the difficulty, the game displays some kind of level.  However, when you start the mission, you still end up in the common map area with other players.  What exactly changes when you select a higher difficulty?  Is it possible to see other players playing on "Easy" when you select "Hard" before entering the mission zone where respawning is restricted?


I'm an undergraduate student in Electronics and Electrical Engineering but am more interested in research in computer science and have decent research experience. I have done a summer internship at a very reputed place in France and our work during the summer was published and we also won Distinguished artefact award at the conference. I'm now writing my thesis at a prominent computer science research institute in Germany with a senior researcher and now am thinking about pursuing PhD. But I don't exactly have good grades and people have suggested to go for a masters to improve my academics but I feel like its the same issue there as well, isn't it the same case for masters? I need good grades to get accepted for a decent masters program so I don't see how it helps me.  I would really appreciate the community's help and advice on how best to proceed for this.

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


Why is the integral from $a$ to $b$ equal to negative integral from $b$ to $a$. According to my teacher this is a definition, but definitions still have some logic/reasoning behind it, so what is the logic/reasoning in this case?

The integration is generally area under the curve in $\Bbb R^2 \to \Bbb R$  Is integration in the range from $a$ to $b$ the same as $b$ to $a$ or is it negative?  If it is negative, Is it merely notion of convention or is there some intuition for it?


I was under review where I found some posts of low quality and downvoted them. When I saw my reputation sometime later, it was down and in details it was because I downvoted few posts. Can anyone explain the logic behind this?

It is incredibly rare that I downvote on this or any other community site. I would rather just ignore the item. However, occasionally some very bad advice is given that is worthy of a downvote. Why should this adversely affect the reputation of the person who downvotes?


Suppose employee of a startup company has a vesting agreement, saying she can execute options for 1/4 of total package each year.  What if only one year have passed and startup was bought.   Which share an employee can convert into a money then?

I work for a publicly traded company that was acquired by another publicly traded company. I also own shares of "restricted stock units" for my company. All of my shares are scheduled to vest far after the acquisition will be completed.  What typically happens to unvested stock options / restricted stock units during an acquisition?  I'm guessing/hoping that they'll be used to grant me to an equally valued amount of my new employer's stock, with the same vesting date.   :      There are a number of possible   outcomes upon an acquisition.  They   include but are not limited to: 1)   full vesting automatically upon an   acquisition, 2) partial vesting upon   an acquisition with provision for   additional vesting upon termination   following an acquisition, 3) partial   vesting upon an acquisition with no   provision for additional vesting upon   termination following an acquisition ,   and 4) no vesting upon an acquisition   with no provision for any acceleration   post-acquisition.   Regardless of that answer, I am still curious to hear from anyone else that has gone through this scenario and how it worked out for them, especially if it isn't one of the outcomes described in that article linked above.  EDIT: ---------  According the publicly filed  document for the acquisition, I'll be getting a equitable amount of unvested stock with the same schedule. Great!


After I did a clean installation of Ubuntu today, not a single package instalation is working. when I type;  sudo apt-get install ubuntu-restricted-extras   It says;  Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package ubuntu-restricted-extras   Same goes for vlc and every package I try to install.

When I try to install any package through the command line, I get an error.   $ sudo apt-get install <package> Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package <package>   Can anyone help me on this?


So it is my first post and I don't have much to go on.  It is a movie from my childhood (I was born in 88). I assume it was from the 80's or 90's (Color film).   I remember it being a sci-fi with some light humor, where a space station is shared by aliens and humans (almost sure it was on a planet). It has some kind of malfunction (I think it was with the air ventilation system) and I recall there was some kind of breach in parts of the station, so the oxygen was lost in those sections.   I remember one scene where they were in a waiting area. And also red/amber tones in the film.  The movie is a little eccentric and doesn't take itself too seriously.  I recall a female character as one of the main roles in the movie, accompanied by another person. Not sure if one of them was an alien. They were escaping/hiding from somebody.  Space station was big. Seemed to be more like a planet station with big rooms and lots of people/aliens (hundreds or more).

What's the movie with people living on Mars, the atmosphere I think having a problem, since in the end the atmosphere gets restored(?) cleaned(?) or something, by the guy placing his hand on a stone engraving of a hand of an alien/martian which is something with three fingers I think?  I watched this on HBO sometime 2007 I believe.


I put two brand new cars that I just bought in my garage, and because it said that the garage was full, I had to remove these two cars. They were a fully upgraded Sultan RS and a Voodoo Custom, both costing a total of 5.8 million. They have both gone missing and obviously I am quite upset, can anyone please help me track them back?

I was asked to replace a car in order to put another car in my garage. However I thought I would be able to swap the car I wanted in and take out the other car that was already in there so I could bring it to my other garage. Can I get my car back?


This morning my Ubuntu doesn't start. Why?

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


Recently I was writing a bash-script and added a line:  $ echo *   and got an output of file names and directory names.  What is the context of this list (just out of curiosity)?

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


Sometimes onions are too much better and can't use for salad. Then what should I do for reducing onions bitterness?

How can I tone down the intensity of raw onion? Some onions have a more acute taste and smell than others of the same type, and I would like to avoid them in salad dish, or making dips with raw onion. If effectively none, an alternative solution that can also be helpful is to find out what condiments can I add/mix with raw onion to cancel out the intensity of the the acute taste.  [EDIT] There is a uniquely (IMHO) sweet taste to onion that I like. But accompany with that is the acute scene and flavor to it that I wanted to get ride of. I do not want to waste away the taste of onion, but remove the acuteness and remain the sweetness.


I am trying to write a script I will call calc.sh that does basic calculations using the arguments for the script ( $1, $2 and $3). For instance I'd like to get  2 as result for  ./calc.sh 10 / 5  My start goes as this:  if [ $2 -eq "+" ] ; then res=`expr $1 + $3` ; echo "$res" ; fi   But it won't work, I  get something like : Line 2 : [ +: an integer expression was expected  NOw That I used == to make the comparison is working fine for all the operations except the division /. The code now is:  if [ $2 == "+" ] ; then res=`expr $1 + $3` ; elif [ $2 == "-" ] ; then res=`expr $1 - $3` ; elif [ $2 == "x" ] ; then res=`expr $1 \* $3` ; elif [ $2 == "/" ] ; then res=`expr $1 \/ $3` ; else res=`Operación no válida` ; fi ; echo "$res"   But if I try ./calc.sh 10 / 5  , I will get:  "line 4:  10 / 5 : syntax error: invalid arithmetic operator (the error element is "\ 5 ")... Alas as I am typing I'm realising it should be  $1 / $3 ... :)

When should I use -eq vs = vs ==  e.g.    [[ $num -eq 0 ]]  [[ $num = 'zzz' ]]   I've observed a pattern of using -eq (and -ne, etc.) for numbers and = for strings.  Is there a reason for this and when should I use ==


If it is the case that the information content of the universe is conserved, and the past can be constructed from a complete knowledge of the future just as easily as vice versa, then is there any reason to conceptualize the past as causally preceding the future, or do the terms "past" and "future" simply refer to "the direction of time in which entropy decreases" and "the direction in which it increases," respectively? If it's the latter, then does the universe's lower entropy in the past explain why information about the past is macroscopically accessible to us, but information about the future is not?  EDIT: To be more specific, the Second Law of Thermodynamics describes entropy as increasing "over time." By "over time," I assume it means "as we observe the past, followed by the future." My question is this: given conservation of information, is there an equally valid alternative way of describing time in which the Second Law states that entropy decreases over time, but "over time" is considered to mean "as we observe the future, followed by the past"? Is this alternative description, combined with complete knowledge of the final state of the universe, sufficient to reconstruct the entire history of the universe farther and farther into the past in such a way that the future appears to causally determine the past, just as we perceive the past as causally determining the future?

This is an attempt to gather together the various questions about time that have been asked on this site and provide a single set of hopefully authoritative answers. Specifically we attempt to address issues such as:   What do physicists mean by time? How does time flow? Why is there an arrow of time?


Can't find any way to correctly write these two special brackets without having spacing between the symbols that compose them.      Apparently no package is found by Detexify

I would like to construct what Unicode calls "white curly brackets" that are in addition scalable. They look like ⦃ (≈{|) and ⦄ (≈|}) and have Unicode codepoints U+2983 and U+2984.  unicode-math has them as \lBrace and \rBrace, but (1) I don't presently use XeTeX or LuaTeX and (2) their design (shown in  on pages 3-4) is not to my liking: the brace part is too fat for my taste, and I would like the vertical bar to not leave any protrusions. I am trying to have them visually match the parentheses \llparenthesis, \rrparenthesis, \llbracket, and \rrbracket from stmaryrd.  Right now I am using a makeshift definition, which is sufficient for now, but the symbols don't scale (in general or with \left/\right). Here is sample code:  \documentclass{article} \usepackage{amsmath} \usepackage[only,llbracket,rrbracket,llparenthesis,rrparenthesis]{stmaryrd} % for comparison with 4 similar parenthesis symbols \usepackage{accsupp} % for ensuring the right Unicode codepoint upon pasting  \newcommand*{\llbrace}{%   \BeginAccSupp{method=hex,unicode,ActualText=2983}%     \textnormal{\usefont{OMS}{lmr}{m}{n}\char102}%     \mathchoice{\mkern-4.05mu}{\mkern-4.05mu}{\mkern-4.3mu}{\mkern-4.8mu}%     \textnormal{\usefont{OMS}{lmr}{m}{n}\char106}%   \EndAccSupp{}% } \newcommand*{\rrbrace}{%   \BeginAccSupp{method=hex,unicode,ActualText=2984}%     \textnormal{\usefont{OMS}{lmr}{m}{n}\char106}%     \mathchoice{\mkern-4.05mu}{\mkern-4.05mu}{\mkern-4.3mu}{\mkern-4.8mu}%     \textnormal{\usefont{OMS}{lmr}{m}{n}\char103}%   \EndAccSupp{}% }   \begin{document}  \noindent ok: \(\displaystyle\llbrace abc \rrbrace\) \(\textstyle\llbrace abc \rrbrace\) \(\scriptstyle\llbrace abc \rrbrace\) \(\scriptscriptstyle\llbrace abc \rrbrace\)  \noindent ok: \(\displaystyle \llbrace \frac{a}{b} \rrbrace\) \(\textstyle\llbrace \frac{a}{b} \rrbrace\) \(\scriptstyle\llbrace \frac{a}{b} \rrbrace\) \(\scriptscriptstyle\llbrace \frac{a}{b} \rrbrace\)  \noindent incorrectly scaled (\verb|\scriptsize|): {\scriptsize\(\llbrace abc \rrbrace\)} (large magnification required)  \noindent incorrectly scaled (\verb|\tiny|): {\tiny\(\llbrace abc \rrbrace\)}  \noindent \verb|\left| and \verb|\right| not possible before \verb|\llbrace| and \verb|\rrbrace|: \\ \indent \(\llbrace \left\llbracket\left\{\left[(a) \cdot bc^{2^3}\right]^4\right\}^5\right\rrbracket \rrbrace\) % Note: This is also not possible with \llparenthesis and \rrparenthesis from stmaryrd.  \noindent for comparison: \(\llparenthesis x \rrparenthesis, \llbracket x \rrbracket, \llbrace x \rrbrace; (x), [x], \{x\}\)  \end{document}   Lines 1 and 2 look just right with the present setup. Lines 3 and 4 demonstrate that my definitions don't scale. Lines 5a/b gives an example of where I would like to be able to use \left and \right. Line 6 juxtaposes different types of parentheses for visual comparison.  Is there an easy way to scale the glyphs I have constructed myself? Or is designing new glyphs the only way? While the vertical part of my glyphs doesn't leave any protrusions, the "brace part being too fat" part of my problem isn't being addressed by my code. With this in mind: I recognize that it might not be that easy to make the brace part of the glyph thinner (though if you can, more power to you), but I think that any solution that addresses the scaling problem for any manually constructed glyph cluster will be a valuable contribution to the community.    For a slightly different setup (original example code) with  \RequirePackage{fix-cm} \documentclass[12pt]{memoir} \usepackage{fixltx2e}[2006/09/13] \usepackage{amsmath} \usepackage{txfonts} \usepackage[only,llbracket,rrbracket,llparenthesis,rrparenthesis]{stmaryrd} \usepackage{accsupp}   in the preamble, one needs \mkern-5.7mu in the fourth argument to \mathchoice for "correct" scaling. To see what goes wrong in that case, it's best to include a line such as discontinuous small symbols in a footnote\footnote{\(\scriptscriptstyle\llbrace \frac{a}{b} \rrbrace\)}. This might help a potential answerer test things out.


I suggest allowing an answerer (user A) to give part of credit to another user (user B) for their answer. A would specify the amount of credit as percentage (C). B would appear as a co-author of the answer. The reputation bonuses for the upvotes of the answer would be divided between A and B:   A gets 100% - C% B gets C%   This would be used when A used an idea of B to build upon, B made a valuable improvement (edit) of B's answer, and so on. In these cases A would be able to give a proper credit to B.  This feature may also encourage users to improve existing answers by edits or comments and may even reduce the number of redundant answers (people would improve existing answers instead of posting the improvement as a second answer, rendering the existing answer redundant).

Sometimes a comment can add great value to an answer once its content has been incorporated into the answer. Perhaps correcting an error to an otherwise good answer, plugging a logic hole, rendering a more elegant solution, making an important clarification to explanations, etc.  Once the answer has incorporated the comment/suggestion, it would be nice to credit the commenter with a "slice of the pie" - ie share reputation gains between the answerer and the commenter, as recognition of their contribution as "co author" to the final answer.  The simplest way would be to make upvotes on comments yield reputation, but that barrow has been pushed before.  A few possibilities I could think of for sharing rep are:   The commenter can be added to the answer as a "reputation sharer" - reputation gains from the answer are split 50/50 from then on The answerer can make a "donation" of reputation from the answer to the commenter - eg if the answer has 4 votes, they can donate up to 40 reputation (there may have to be a requirement that this donation comes off the rep cap, so answerers don't distribute their excess rep when exceeding their rep cap) Upvotes made by the answerer to comments on the answer do get reputation (maybe 5 - transferred as per previous point)     Why bounty doesn't quite fit:  The bounty process is just too long winded and doesn't have an on-going effect if the answer turns out to be a really good one. The bounty is too delayed. They didn't answer, they just added value - I just want to give the comenter a pat on the back right there and then, and I don't mind giving up some erep to do it.


When I get a new android I would to keep the apps I have purchased. I will keep the same account but I was wondering if I will have to rebuy my games?

On the iPod Touch/iPhone, since it is tied to your iTunes account, I am quite sure you can have your bought apps on multiple devices you own (can't test though, iPod Touch was stolen).  However, now I have the Motorola Droid, and am waiting for a tablet, and am considering getting a Nook and rooting it to run my own apps.  Question is, if you buy an app on the marketplace, how is the security done:   Is it tied to your Gmail account so you can share it between devices you own? Is it tied to the device? (Don't break/replace your phone!) As long as it's installed, you're OK? (If you uninstall, or wipe your device, it's gone).   I assume 3 is highly unlikely, though a possibility, so leaving it here as a potential answer to my question.


Well, today, I had an intense discussion with one of my colleagues about underscores in attributes' names. While some libraries I work with put it in the start of the name, others put it last.  Is the recommended standard to put it first, and if so, why do others like PCL library put it last?  Also, Is there a special shortcut in msvc to suggest only underscored variables?

It's common in C++ to name member variables with some kind of prefix to denote the fact that they're member variables, rather than local variables or parameters. If you've come from an MFC background, you'll probably use m_foo. I've also seen myFoo occasionally.  C# (or possibly just .NET) seems to recommend using just an underscore, as in _foo. Is this allowed by the C++ standard?


I'm running this command:  rar u /var/www/html/Backups44.rar /var/www/html/linkreplacer/MD5Change   I want to add the file "MD5Change" to the rar "Backups44" but whenever i run this it adds all the folders into it aswell, Link /var/www/html/linkreplacer/ then the file is in there.  How can i add just the file without all the folders ?  Thanks

I've got a folder full of folders, and some of those folders may or may not have folders in them. It looks something like this:  ~/stuff/01.d/01/files ~/stuff/02.d/files ~/stuff/03.d/files ~/stuff/04.d/lol/files ~/stuff/05.d/files   I want to make separate .rars for each of the folders in ~/stuff, so I was going to do for f in *.d; do rar a "${f//.d/.rar}" "$f"; done which worked great, and gave me the rars. But I'd rather have no directory structure in the rars at all, just files. Is there an easy way to do this? It seemed like one of the switches looked like it might have done what I wanted, but the man page is a bit confusing. I'll try a few things.  I may end up trying to figure out a bash script to cd into the directory, check if it's the files, if so make the .rar in the parent (../${f//.d/.rar}), else go into the directory again and make the rar two parents up (../../${f//.d/.rar}). In this case, I'd want rar a ../"${f//.d/.rar}" * I think, I haven't tested it.


My situation like the following:   Web server hosted in Google Cloud with domain name lets say: example.com Mail server hosted in Linode (lets say in server name: server.myserver.com) using cPanel with Mail Only and use example.com domain name.   The goal is to separate web and mail server in different server.  In Google DNS :   I set A record for example.com to Google cloud IP I set the MX record to mail.example.com I set A record for mail.example.com to Linode IP I set SPF and DKIM with TXT record that generated from cPanel (linode side) I set PTR to server.myserver.com         PTR status is passed when I check from    SPF status passed from    DKIM status passed from       With all settings above I can get incoming email with no issue, but when try to send an email, all email trapped in SPAM folder.  What's wrong with the settings above? Please help and thanks before :)  UPDATE     After checking email header and get spf and DKIM are pass (OK) but   still trapped in spam, so I end it up by using third party of email   service. In this case I use Amazon Simple Email Service. Thanks all   for your help, really appreciate it.

This is a  about how to handle email sent from your server being misclassified as spam.  For additional information you may find these similar questions helpful:                    Sometimes I want to send newsletters to my customers. The problem is, that some of the emails get caught as spam messages. Mostly by Outlook at the client (even in my own Outlook 2007).  Now I want to know what should be done to create "good" emails. I know about reverse lookup etc., but (for example), what about a unsubscribe link with an unique ID?  Does that increase a spam rating?


(This is not a homework question; I just want to understand how this works)  Let's say I am playing a game, where I need to flip a coin. I need to get $X$ number of heads in a row in order to win. The coin is unbalanced, and has $p$ probability of landing on heads and $1-p$ probability of landing on tails. Consecutive flips are independent of previous ones.   The game ends when I flip $X$ heads in a row; if I flip only heads the game ends in $X$ flips, if I flip $X-1$ heads, then one tail, then $X$ heads, the game ends in $2X$ flips.   What is the expected value of coin flips? What is this distribution called?    I understand that this can probably be defined as some sum of binomial distributions; just curious if there's another way to do it.

I want to find the expected number of coin tosses to get $N$ heads in a row, where $p$ is the probability of getting a head in a single toss.    Let $F(N)$ be the expected number of tosses to get $N$ heads consecutively, so    $$F(N) = 1 + p F(N-1) + (1-p) F(N)$$   which gives   $$F(N) = 1/p + F(N-1)$$  With base condition : $F(1) = 1 + 1/p$   My logic is as follows:     if we get a head, in current toss we need to get N-1 more heads consecutively, but if we get a tail, we have to start over   This is what I thought, but is not correct. Can you please help me?


Here is a snippet of my code that gives me accounts based on the distance to my "current" account:  public String currentPosition {      get {         if (String.isBlank(currentPosition)) {             currentPosition = currentAccount.Geolocation__c;          }         return currentPosition;     }     set;  }   public PageReference findNearby() {       String lat, lon;             List<String> getcurrentId = currentId.split(':', 0);      List<String> latlon = currentPosition.split(',');     lat = latlon[0].trim();     lon = latlon[1].trim();      Decimal dlat = decimal.valueOf(lat);     Decimal dlon = decimal.valueOf(lon);   warehouses =  [                            SELECT Id,ShippingState,  Name,URL_zum_CC__c,Mitarbeiternzahl_final__c,Auftragseingangstyp__c,AD_MS_Rel_Anzahl_bez__c,Vollst_ndiger_Name__c,ShippingStreet,LocateCity__longitude__s, LocateCity__latitude__s, OwnerId,GeoLocPosition__c,Accountinhaber_Text__c,WirtschaftszweigWZ08__c,WZ_Code_ebene_2__c,AE_letzte_12_Monate__c ,anzeigendaten_de_ID_account__c,indexurl__c                            FROM Account                             WHERE Letzte_gew_Opp_OneSales_in_Tagen__c <= :decimal.valueof(myTime) AND DISTANCE(LocateCity__c, GEOLOCATION(:dlat,:dlon), 'km') < :decimal.valueof(myInput) AND Id != :theaccId                     //      ORDER BY DISTANCE(LocateCity__c, GEOLOCATION(:dlat,:dlon), 'km')                                      LIMIT :recordLimit                   ];    }   However what I want in addition is the actual distance as a value. I want to store that value in a variable to display it in my visualforce page. (inside a table)  The result should be something like this:

I looking to find distance between 2 vendors(Accounts).  I do have the lattitude and longitude of the accounts. I think i could use the google maps API to get the distance. Anybody worked with google maps API from VF page? Any pointers here would great.  I also think google maps have limits on the no of requests made per IP or instance, so if there are many organizations using the na1 server and some of those also use the requests. would all those requests from other organizations would count in the limits?  Thanks


Most of the introductory stats textbooks, treat the sampling distribution of the mean as a normal distribution when sampling is done without replacement and n/N > 0.1. They just use of the finite population correction to correct the variance of the sampling distribution which is perfectly clear. However, no justification is provided on why normality is assumed.  The CLT holds for iid vars, which is not the case for sampling without replacement. Could you please provide a formal justification.  Thanks a lot!  Examples taken from Weiers Intro to Business Stats

I understand that when sampling from a finite population and our sample size is more than 5% of the population, we need to make a correction on the sample's mean and standard error using this formula:  $\hspace{10mm} FPC=\sqrt{\frac{N-n}{N-1}}$  Where $N$ is the population size and $n$ is the sample size.  I have 3 questions about this formula:   Why is the threshold set at 5%? How was the formula derived? Are there other online resources that comprehensively explain this formula besides  paper?


I read an article that says the dependent variables in a regression model must be normally distributed. The way i understand it, is that the observations for the regression model must then be normally distributed. Or in other words if i choose sample data from a population then the sample must be normally distributed. But then i read answers to a similar question in another forum and apparently the the observations or dependent variables does not need to be normally distributed, just the error terms after the model is implemented must be normally distributed.   So now i am not sure, does the observations (dependent variables) has to be normally distributed as well as the error terms or is it just the error terms.

I've got a weird question. Assume that you have a small sample where the dependent variable that you're going to analyze with a simple linear model is highly left skewed. Thus you assume that $u$ is not normally distributed, because this would result in normally distributed $y$. But when you compute the QQ-Normal plot there is evidence, that the residuals are normally distributed. Thus anyone can assume that the error term is normally distributed, although $y$ is not. So what does it mean, when the error term seems to be normally distributed, but $y$ does not?


I have the following pattern in java: "^(?!.*(.).*\\1)(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*()-+])(?!.*[\s:;',?/~=<>|\\[\\]]).{9,}$"  One of his goals is not to allow the same character to be repeated. He is doing his job well, except when I type the same letter but one in uppercase and the other in lowercase, it identifies that the characters are different and returns true. I was not able to use case_isensitive, because in my patern, the user is obliged to type at least 1 lowercase letter and one uppercase letter. How can I do it when, for example, "Aa" the pattern returns false and not just when it has "aa"?

I've seen lots of examples of making an entire regular expression case-insensitive.  What I'm wondering about is having just part of the expression be case-insensitive.  For example, let's say I have a string like this:  fooFOOfOoFoOBARBARbarbarbAr   What if I want to match all occurrences of "foo" regardless of case but I only want to match the upper-case "BAR"s?  The ideal solution would be something that works across regex flavors but I'm interested in hearing language-specific ones as well (Thanks )  Edit  The link Espo provided was very helpful.  There's a good example in there about turning modifiers on and off within the expression.  For my contrived example, I can do something like this:  (?i)foo*(?-i)|BAR   which makes the match case-insensitive for just the foo portion of the match.  That seemed to work in most regex implementations except Javascript, Python, and a few others (as Espo mentioned).    The big ones that I was wondering about (Perl, PHP, .NET) all support inline mode changes.


I'm making a simulator and I have an image like a piece of chair and it's in 2d and I need to create a 3d model of that to be able to apply texture to it by three.js. So ,How can I convert a 2d image to a 3d model?

I have a cartoon character (a lion) that is part of my business logo that I want to put into Blender and animate it somehow. Is there any way I can take a flat picture (JPEG) and transform it into a 3D image and then animate it in Blender?


public class Class_of_var  {   public  String[] su_name =new String[100];   }  `public class Main_Class {   public void show_all(int a)  {      Class_of_var arr = new Class_of_var() ;       for (int i = 0; i < a; i++)      {       System.out.println("Surname  " + arr.su_name[i]);       }   }  public static void main(String[] agrs) {      Add_Car Car=new Add_Car();     Main_Class m = new Main_Class() ;     Scanner sc = new Scanner(System.in);       int x = 1;     int a = 0;     do     {         int y=0;         System.out.println("enter 1 to add a car");         System.out.println("enter 3 to show all cars infromation");          y=sc.nextInt();          switch (y)         {              case 1:               *emphasized text*               Car.add_car(a);                 a++;                 break;              case 3:   *when i call the s_name in class_of_var the value will be null  *                     System.out.println("the a number" + a);                     m.show_all(a);                     break;          }      } while (x == 1);  }  }    public class Add_Car {     Class_of_var arr = new Class_of_var() ;     public void add_car(int a)     {        Scanner sc = new Scanner(System.in);      System.out.println("enter the surname of owner");     arr.su_name[a] = sc.nextLine();  }   } `

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


I have this URL-request string coming as input:  url=http%3A%2F%2Fwww.ohmert.com%2Fopencar%2Ffetch-examples%2Fexample-fetch.json   Using C or C++ I need to parse this and get the output as  http://www.ohmert.com//opencar/fetch-examples/example-fetch.json   Please respond as to how I can achieve this.

Does anyone know of any good C++ code that does this?


Is there any website(s) to look up words with similar pronunciation or spelling?  For example: stack, steak, stake, stick.  (It can help me as a non-native English speaker to learn confusing words.)

Can anyone point me to a (more or less) complete list of English paronyms (affect/effect, farther/further, alternately/alternatively, interested/interesting, corrupted/corrupt, adopt/adapt, continuous/contiguous...)?  Wikipedia has a list for everything, but . Google is not exceptionally helpful, either. After trying out half a dozen different search strings, I have learned quite a lot about French, German, and even Russian paronyms, but close to nothing about English ones.  Any pointers?


I installed Ubuntu 16.04. I already had windows 8 installed. Ubuntu 16.04 has been installed in legacy mode and windows 8 has also been installed in legacy mode(not sure about windows 8). After dual booting Ubuntu I cant boot to windows 8. The grub menu does not show windows 8 boot option i.e windows boot manager. I also tried boot repair disk but nothing happened. Secure boot is off.I even disabled legacy support in boot options but then the grub menu does not show up and windows 8 still does not boot. The summary of boot info is given in the following URL:  Please help.

I installed Windows on my computer, followed by an installation of Ubuntu. However, now I'm unable to boot into my Windows install.  What can I do to fix this?


On the book it says " $\lor \neg BC$ can be written as $\implies BC$, which read as 'either not B or C' or 'B implies C' " but I don't really understand why they are logically equivalent. Thanks ahead!

I have these two statements -  $(A \lor \neg B)$ and $\neg A \to \neg B$  and i have to prove that they are logically equivalent, I don't know if I am doing my logic wrong though because I don't see how they are logically equivalent?   I did a truth table and it didn't work out as logically equivalent for me. Are they even logically equivalent or am I going wrong somewhere?  My truth table:


Hi i know parameterized statements and escaping data is good practice for preventing SQL injection. But i was curious to see it in action so i set up a database to see . The problem is i keep getting a error or its not injecting correctly.  $ans = $_POST['answer']; $query = "SELECT username from `members` where password = '$ans'"; $c = $db ->query($query); $c=$c->fetch(PDO::FETCH_ASSOC); echo $c['username'];   I tried the typical 'Or 1=1' injections and its variations and i keep coming up with errors on the fetch or it not working at all.

Just looking at:   (Source: )  What does this SQL do:  Robert'); DROP TABLE STUDENTS; --   I know both ' and -- are for comments, but doesn't the word DROP get commented as well since it is part of the same line?


I'm looking for an efficient way to count the number of ways $D_n$ to divide an $n \times n$ grid into four (possibly empty) regions: top left, top right, bottom left and bottom right, such that no cell of another region is in either of the designated directions from a cell of a given region, e. g. no cell from a different region is either above or to the left of a cell in the top left region.  I can see that a region will either be rectangular (possibly degenerate) or will share a (possibly irregular) stairstep-shaped border with the opposite region, in which case the other two regions will necessarily be rectangular.  I thus thought to count the number of stairstep paths between (possibly identical) points on an $(n+1) \times (n+1)$ lattice, which I know would be $$2\left(\sum _{k=1}^n\sum_{r=1}^n {{k+r} \choose k} + (n + 1){{n+1} \choose 2}\right)+(n+1)^2$$ which, when simplified is$$n^3+3n^2-n-3+2{{2n+2}\choose {n+1}}$$  This needs to be adjusted for overcounting (and undercounting), though: divisions with all rectangular regions where one or more are degenerate have a many-to-many correspondence with paths, but I'm having a bit of trouble with the exact corrections to make.  I'm actually trying to compute this as part of a larger calculation, so I'd like to find ways to improve the time-complexity of the algorithm.  In this particular case, for $n>2$, when I'm trying to calculate $D_n$, I'll already know $D_a$ and $D_b$ for some $(a,b)$ where $a+b=n$ so a recurrence relation would be nice.  This is a project Euler problem (or rather isomorphic to one), so I'm looking more for hints/suggestions etc. than actual answers, but any help is appreciated.  Note: in case it wasn't clear, for the purposes of this question, a stairstep path from point $a$ to point $b$ along the lattice in which the distance to point $b$ is strictly decreasing. Paths go both ways, so the path from $a$ to $b$ is equivalent to the reverse path from $b$ to $a$.  update: joriki pointed out that this is the same problem as .  That question's page has a closed form, but no derivation.  I am still interested in computing it quickly for large n, though it's worth noting that the answers in this particular case are taken modulo a large number (which I suspect is probably prime), if that changes anything.

Got this problem from a friend and would like some pointers if anyone has any.  Fill an $n \times n$ matrix with the symbols $\{a,b,c,d\}$ subject to the following:     Only the symbol $a$ appears to the left or above an $a$    Only the symbol $b$ appears to the right or above a $b$    Only the symbol $c$ appears to the left or below a $c$    Only the symbol $d$ appears to the right or below a $d$     Here are some examples of a valid fillings: $$\left( \begin{matrix} a & a & b  & b \\ a & a & b & b \\ c & c & c & d \\  c & c & c & d  \end{matrix}\right) $$  $$\left( \begin{matrix} a & a & a  & a & a & b  & b \\ a & a & a  & a & a & b  & b \\ a & a & a & d & d & d & d \\  a & a & a & d & d & d & d\\a & a & d & d & d & d & d\\c & c & d & d & d & d & d\\  c & c & d & d & d & d & d  \end{matrix} \right) $$  What I have done: We'll it is clear to me that the $a$'s (for example) make up a sort of Young Diagram just by the property above. But there is more to the problem than that. If your YT for $a$ is just a square, then you might have a reversed (right justified) YT available to place for the $b$'s. Details like this seem to make this a tricky problem for me. I am intrigued by this problem and I just thought I'd share it here in case there is some easy way to do this counting problem that I've never heard of.  Thanks,


My so frequently crashing 12.04 system responded with a kernel freeze during my last package update. Which did result in malfunction Package Manger that describes the error as such: "Error:BrokenCount>0"...  Can the package manager be recovered in some way?

I have the message:   Error Broken count >0 Check if you are using third party repositories. If so disable them, since they are a common source of problems. Furthermore run the following command in a Terminal: apt-get install -f Details: The following packages have unmet dependencies: firefox-globalmenu: Depends: firefox (= 19.0+build1-0ubuntu0.12.04.2) but 19.0+build1-0ubuntu0.12.04.1 is installed   Any suggestions?


I have cp and mv commands withaliases preset in my system.  [root@IMSSA ~]# which cp mv alias cp='cp -i'         /bin/cp alias mv='mv -i'         /bin/mv [root@IMSSA ~]#   If I try to replace a file, it will ask for prompt when try in command line.  But when I use a same within a script, they won't ask for prompt and just replaces the file.  [root@IMSSA ~]# echo "t giv" > /tmp/givin.txt; echo "r giv" > /root/givin.txt [root@IMSSA ~]# cat /tmp/givin.txt /root/givin.txt t giv r giv [root@IMSSA ~]# cat /tmp/givi.sh mv /root/givin.txt /tmp/givin.txt [root@IMSSA ~]#   [root@IMSSA ~]# mv /root/givin.txt /tmp/givin.txt mv: overwrite '/tmp/givin.txt'? ^C               ### Used ^C to cancel the Operation. [root@IMSSA ~]#    [root@IMSSA ~]# sh -x /tmp/givi.sh + mv /root/givin.txt /tmp/givin.txt [root@IMSSA ~]# cat /tmp/givin.txt /root/givin.txt r giv cat: /root/givin.txt: No such file or directory [root@IMSSA ~]#   So the aliases are not used inside the script, but why bash script and command prompt have different env? How does alias work here?  EDIT: This answers the question.

In my ~/.bashrc file reside two definitions:   commandA, which is an alias to a longer path commandB, which is an alias to a Bash script   I want to process the same file with these two commands, so I wrote the following Bash script:    #!/bin/bash  for file in "$@"     do     commandA $file     commandB $file done   Even after logging out of my session and logging back in, Bash prompts me with command not found errors for both commands when I run this script.  What am I doing wrong?


I'm using QGIS 3.10. I am working with an Excel table with records having coordinates. I'm adding a delimited text layer, that is shown as points. However, records with the same coordinates are shown as a single point instead of several ones. Is there a way to separate them?  In the image, the selected point has 3 records for the same locality (LOCALIDADE at the right panel).    I tried to use Point Cluster and Point Displacement, but these two are not what I was expecting... the first one shows how many points are overlapping, while the other one I didn't quite understood. But what would work for me was if instead of one point, it was three points, one overlapping the other, so one could easily see that there is three records at the same locality.

I am trying to produce a map of last years emergency responses in my area in 2018. I am entering a CSV file into QGIS which is working fine. The addresses and Lat and Long have been verified. I have several locations that have had multiple emergencies in the last year and my problem is that the overlapping incidents are not showing up. Any suggestion?


I am new to JS , I am trying to execute the following code and log the out put  var name ="xyz"; var age =10; var location ={office:"US",home:"CA"};  function callFn(name,age, location){     name = "abc";     age =20 ;     location['office']="new office location"; } callFn(name, age, location); console.log(name, age, location['office']);   The output is "xyz", 10 , "new office location";  Why the name , age values are not chaning but key values inside object are changing ? IN other languges like java it will assign new values to name and age also

The primitive types (number, string, etc.) are passed by value, but objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself).  Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this?


i want to create button by loop as   1 2 3  4 5 6  7 8 9   but button have array2D when i write code is   private JButton cells[][];  // Constructor public SliderGameFrame() {     JPanel panel = new JPanel();     this.add(panel);     for (int i = 1; i <= cells.length; i++) {         for (int j = 1; j <= cells.length; j++) {             cells[i][j] = new JButton(" " + i);             panel.add(cells[i][j]);         }     } }   it's doesn't work and error massage is java.lang.NullPointerException

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


I have a VPS which is running windows XP SP3 on it. I want to connect from my home PC to the internet through it.   How can I configure a private proxy for this purpose? (sorry I couldn't find a way for windows by searching)  Update: I like to connect to the internet throw that VPS in my Windows Phone 8 too. I see I just can insert username, password, ip address and port in settings area. If I could set it up to run it on WP8, that will be perfect.

I need to test some software using a proxy server. The software communicates over the network using http and I need to ensure that it works in enviornments that use proxy servers.  How can I setup a proxy server in XP?


How many suns are around Starkiller base in the Force Awakens? Is it just one? If its sucks the power out of one star from the back of the planet how is the front of the planet lit up like the sun is shinning on it when the Rebels attack it? If the weapon is charged shouldn't the plant be in the dark?

In Star Wars: The Force Awakens, once the Starkiller Base has depleted the star it is drawing power from, is it supposed to travel to another star where it can draw more power? Or is it non-mobile and supposed to fire a few, limited shots only? Or can it somehow reuse the star it is drawing power from, even after it has been depleted?  Its name suggests that it will "kill" or completely deplete the star it is drawing power from, but I haven't noticed an indication in the film that the Starkiller Base can travel to other stars.


Right now to open a file and load the information in you have to go to "File->open->OK" to open up a file. I want to make it so that you can drag a file from a folder in explorer.exe ad drop it to the form and the program would automatically load the file I dragged and dropped. Any ideas?

I've seen this done in Borland's  environment, but I'm not sure how to go about it for a C# application I'm working on. Are there best practices or gotchas to look out for?


I had a problem with my blender. In materials tab I dont have "surface" button, to make  something like Glass BSDF material and etc. Please help me, how I can figure out this problem.  Thanks.

Complete beginner here.  I'm trying to follow  tutorial on Anisotropic shaders, but my property panel looks nothing like the property panel in the tutorial.  For example, when creating a material, this is what his property panel looks like:    But this is what mine looks like, if I follow the same path:    I'm sure I'm missing something obvious.  How can I see the property panel shown in the tutorial?


For a suggested solution in another topic I tried to write my first shell script. It did not work as intended.  In order to get a quick access to the folder /opt/lampp/htdocs when using XAMPP I tried to create a desktop shell script:  gksudo nautilus /opt/lampp/htdocs   and saved it to a file named htdocs_open.sh and saved it on my desktop ("Skrivbord" in Swedish) under the folder /home/lars/Skrivbord  I also changed the permissions using:  chmod +x htdocs_open.sh   When I check the permissions it now looks like this:  -rwxrwxr-x  1 lars lars   35 jul 26 16:31 htdocs_open.sh* -rwxrwxr-x  1 lars lars   34 jul 25 23:43 htdocs_open.sh~*   When I doubbleclick the icon on my desktop it just open up the script in gedit.  Why do I get a double set of files with one having "~" in the end? Why is my shell script not running as a shell script?

When I double-click on a script in Nautilus to run it, the script just opens in my text editor with no option to run it. Using Nautilus, how do I run executable text files and/or scripts?


I have got guidance on how to create a new Apple ID that wont use a credit card, but could not find a way to associate my existing Apple ID (with my main email) to App Store without inserting a credit card. I have tried the OS X App Store software, the OS X iTunes software, and logging into the Apple Site.

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


I am new in android. Now I am struggling with a time stamp. I will get data from api in the form "2014/10/31 00:49".. I need the format as "OCT 31" in one variable and "00:49" in an another variable. How can i solve it. Thanks in advance.

Is there a way to format a UTC time into any arbitrary string format I want in java?  Basically I was thinking of having some class take the timestamp and I pass it is string telling it how I want it formated, and it returns the formatted string for me.  Is there a way to do this?


I am having difficulty adding code fragment to my slides in beamer with listings package. My code: \documentclass{beamer} %\usepackage[utf8]{inputenc} \usetheme{Warsaw} \usepackage{listings}  \title{My slies} \author{Me } \date{October 2020}  %slide number \expandafter\def\expandafter\insertshorttitle\expandafter{%   \insertshorttitle\hfill%   \insertframenumber\,/\,\inserttotalframenumber}  \begin{document}  \begin{frame}{Slide 1}   \begin{lstlisting}[basicstyle=\footnotesize] def LosScore(y_pred, y_test):   mse = []   for i in range(len(y_test)):      mse.append(np.mean(np.square((y_test[i]-y_pred[i])))) return mse \end{lstlisting}  \end{frame}  \end{document}  Error: Runaway argument?  ! Paragraph ended before \lst@next was complete. <to be read again>                     \par  l.27 \end{frame}                  I suspect you've forgotten a `}', causing me to apply this control sequence to too much text. How can we recover? My plan is to forget the whole thing and hope for the best.

I want to put some PHP code in my slide with the package listings but I have this error message:  Argument of \frame has an extra }.<inserted text>\par }   My latex code :   \documentclass{beamer}  \usepackage[utf8]{inputenc}  \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage{setspace} \usepackage{color} \usepackage{listings}  \usetheme{CambridgeUS}   \begin{frame} \begin{large}     Contexte : \newline \pause \end{large}  \begin{itemize}     \item Avertir Drupal \end{itemize} \begin{lstlisting}  // Gestion du contexte ete2013 // Utilisation d'un nouveau template if (%variables['ctpage'] == "ete2013") {     variables['template_files']=array('page-ete'); } \end{lstlisting} \end{frame}


My onclick event works. However, when that onclick event is on dynamic HTML, it no longer works. As in: nothing happens.  $(document).ready(function () {     $("#guestlist .viewguestdetails").click(function () {                 $(".guestdetails[data-id='18']").toggle();     }); });   I'm then dynamically adding this HTML to a page:
         (add your data)
             some data

   However, when I then click on "(add your data)" nothing happens. When I have the HTML staticly in my page, this toggling of the 'guestdetails' div does work. It seems that there is no event attached to dynamically inserted HTML?  UPDATE:  The new dynamic HTML I'm inserting i a row in an existing table. The other rows already have events attached to the onclick events, like:  $("span.guestattendance").click(function () {     if ($(this).hasClass('checkbox-on')) {         $(this).removeClass('checkbox-on').addClass('checkbox-off');         $("#guestday").removeClass('checkbox-on').addClass('checkbox-off');     }     else {         $(this).removeClass('checkbox-off').addClass('checkbox-on');                     if ($("#guestceremony").hasClass('checkbox-on') && $("#guestreception").hasClass('checkbox-on') &&         $("#guestdiner").hasClass('checkbox-on') && $("#guestparty").hasClass('checkbox-on')) {             $("#guestday").removeClass('checkbox-off').addClass('checkbox-on');         }     } });   Since a user can insert more than 1 row, I didn't use the id, but rather added a wrapper around the  element I'm inserting:      and then in ready() function:  $('.newrow_wrapper').on('click', 'span', function () {     $(".guestdetails[data-id='" + $(this).attr('data-id') + "']").toggle(); });   The first problem however, is that apparently when I wrap a div around a tr tag, all tr and td tags are removed from the inserted HTML! Also when I click the span to view guestdetails nothing happens.

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I went to a Best Buy store and tried Android tablets but didn't see any Leaderboard for Angry Birds Space edition -- is it because it is not logged in as a game user or does Android have a standardized Leaderboard similar to iOS's GameCenter yet?

Does Google Play offer an achievement tracking system similar to Apple Game Center, Xbox LIVE, and Steam? For keeping track of achievements, game progress, time spent in a game, what your friends are playing, etc.  Are there any other third-party alternative tracking system? with a huge base of supported games? I am thinking of something like  for Desktop systems.


There seems to be some ambiguity to the use of 'wood' in sentences. I have heard both of the following:     I went into the woods   I went into the wood   Which one should I use and when?

When I read some of these Winnie the Pooh stories to my kids at night, the place where the story takes place is the Hundred Acre Wood, not Hundred Acre Woods.  Why is that?


There are some similar questions like  but I am thinking of a comprehensive list of the pros and cons of the two types of filters.  For example.  Linear  Pros:   Can be used as a variable ND density filter when combining two of them.   I am asking this becouse I have not used a circular one, and I am not sure how effective is to reduce reflection on glass for example, so there can be some categories on the technical aspect, like autofocus issues and the photographic results.  So the question is: What are the Pros and cons of circular polarizer filter vs a linear one?

When I bought my polarizer, a friend told me that I should get a circular one, because the linear ones can mess with the autofocus. Is this true? What should each be used for?


Problem :   Suppose $p(x)$ is a polynomial with integer coefficients. Show that if $p(a) =1$ for some integer $a$ then $p(x)$ has at most two integer roots.   Let $p(x)$ be a cubic polynomial such that $p(x) =ax^3+bx^2+cx +d =0 $  Let $p(\alpha) =a\alpha^3 +b \alpha^2 + c\alpha +d =1 $  ( as per the question) .  where $a,b,c$ are integers.   Now how to prove the  given problem please suggest thanks.....

The question that I am trying to answer is :  Suppose is $p(x)$ is a polynomial with integer coefficients. Show that if $p(a) = 1$ for some integer a then $p(x)$ has at most two integer roots.  I have no idea how to get started. Any help would be awesome!


I created a survey to find out if people spent more time in their gardens in 2020 when compared to 2019. I did a paired sample Wilcoxon test to compare the two and found a significant difference but now I'm unsure how best to present the data. I used ggplot in r to create this graph but I don't think it is the best way to show how I compared the data as a whole.  Here is an example of the raw data     2019 2020     Once a week A few times per week   Once a month Once a week   Never Never   A few times per week Everyday   Everyday Once a month     Any advice on what may be a better way to show this data would be very helpful and appreciated, thank you!

What is an appropriate graph to illustrate the relationship between two ordinal variables?  A few options I can think of:   Scatter plot with added random jitter to stop points hiding each other. Apparently a standard graphic - Minitab calls this an "individual values plot". In my opinion it may be misleading as it visually encourages a kind of linear interpolation between ordinal levels, as if the data were from an interval scale. Scatter plot adapted so that size (area) of point represents frequency of that combination of levels, rather than drawing one point for each sampling unit. I have occasionally seen such plots in practice. They can be hard to read, but the points lie on a regularly-spaced lattice which somewhat overcomes the criticism of the jittered scatter plot that it visually "intervalises" the data. Particularly if one of the variables is treated as dependent, a box plot grouped by the levels of the independent variable. Likely to look terrible if the number of levels of the dependent variable is not sufficiently high (very "flat" with missing whiskers or even worse collapsed quartiles which makes visual identification of median impossible), but at least draws attention to median and quartiles which are relevant descriptive statistics for an ordinal variable. Table of values or blank grid of cells with heat map to indicate frequency. Visually different but conceptually similar to the scatter plot with point area showing frequency.   Are there other ideas, or thoughts on which plots are preferable? Are there any fields of research in which certain ordinal-vs-ordinal plots are regarded as standard? (I seem to recall frequency heatmap being widespread in genomics but suspect that is more often for nominal-vs-nominal.) Suggestions for a good standard reference would also be very welcome, I am guessing something from Agresti.  If anyone wants to illustrate with a plot, R code for bogus sample data follows.  "How important is exercise to you?" 1 = not at all important, 2 = somewhat unimportant, 3 = neither important nor unimportant, 4 = somewhat important, 5 = very important.  "How regularly do you take a run of 10 minutes or longer?" 1 = never, 2 = less than once per fortnight, 3 = once every one or two weeks, 4 = two or three times per week, 5 = four or more times per week.  If it  would be natural to treat "often" as a dependent variable and "importance" as an independent variable, if a plot distinguishes between the two.  importance <- rep(1:5, times = c(30, 42, 75, 93, 60)) often <- c(rep(1:5, times = c(15, 07, 04, 03, 01)), #n=30, importance 1            rep(1:5, times = c(10, 14, 12, 03, 03)), #n=42, importance 2            rep(1:5, times = c(12, 23, 20, 13, 07)), #n=75, importance 3            rep(1:5, times = c(16, 14, 20, 30, 13)), #n=93, importance 4            rep(1:5, times = c(12, 06, 11, 17, 14))) #n=60, importance 5 running.df <- data.frame(importance, often) cor.test(often, importance, method = "kendall") #positive concordance plot(running.df) #currently useless   A related question for continuous variables I found helpful, maybe a useful starting point:


My table is like this:  Sitecode    Month  Amount --------    -----  ------ XX          Jan     1000 XX          Jan     3000 XX          Apr     3000 XX          Apr     1000   What I want is, to show the result something like this:  Sitecode    MonthJAN   MonthAPR --------    --------   -------- XX          1000       3000 XX          3000       1000

Trying to find some simple SQL Server PIVOT examples.  Most of the examples that I have found involve counting or summing up numbers.  I just want to pivot some string data.  For example, I have a query returning the following.  Action1 VIEW   Action1 EDIT   Action2 VIEW   Action3 VIEW   Action3 EDIT     I would like to use PIVOT (if even possible) to make the results like so:  Action1 VIEW EDIT   Action2 VIEW NULL   Action3 VIEW EDIT     Is this even possible with the PIVOT functionality?


I've read a number of the other discussions I can find on here about lower order items and interaction terms in regression but either my statistical incompetence is preventing from seeing it or I could not find a clear answer to the specific question I have. Any help would be very much appreciated!  I have a regression model in which I use sex and a personality trait to predict a separate outcome. Both sex and the personality trait do predict the outcome variable. However, there is a clear interaction: the personality trait is only predictive of the outcome in men. In men the association is very clear, whereas it is completely insignificant in women. Hence, there is an interaction, and this is supported by a significant R2 change when you add the interaction term to the model. When you add the interaction term, both sex and the trait alone become insignificant, so the main effects are no longer meaningful.  My aim is not to predict new data but to understand the phenomenon I'm observing and it is clear that you would say 'if you are male, then this trait predicts this outcome, but not if you are female'. However, I am obliged to report a regression equation. Should I still include the coefficients for the main effects in the equation even though they are now non-significant and so, it seems to me, shouldn't be included in a model to predict the outcome? If I should only include the interaction term in the equation, then should I also report the actual regression model as just including the interaction term, without the lower order trait and sex predictors, given that they go straight to insignificance when the interaction is included?  Again, any help would be much appreciated, and apologies if this is answered in the other threads about lower order terms but I just did not understand it!

Is it ever valid to include a two-way interaction in a model without including the main effects?  What if your hypothesis is only about the interaction, do you still need to include the main effects?


So, I'm trying to make some ceramic (copied some nodes from online) objects for a practice project, but I can't get it to show up when Rendering. I tried to simplify, just apply it to a sphere, but I still can't get it to work.  I'm still pretty new so any help would be appreciated.

When I apply a glossy shader to the material of my text, the text becomes just black. Why?    I have lamp and everything, but the problem persists. The text is red before I add the glossy shader.  I'm using Cycles render.   Thanks!


My idea was to prove that $x, y$ aren't elements of this ideal, the way I thought about it is that being part of this ideal forces $x$ to be written in the form of a product between $2$ polynomials in $\mathbb{Q}[x, y]$, but $1$ of those polynomials will have to be $x$ and the other will have to be $1$, the unit, which isn't possible... I don't know how to formulate this correctly. Could someone please help me with this question?

Let $K$ be a field. Then $K[x,y]$ is not a PID because $x$ is irreducible but the quotient $K[x,y]/(x)$ is isomorphic to $K[y]$, which is not a field.  So there must be an ideal in there which is not principal. What is an example of such an ideal?


I'm trying to draw some Feynman diagrams with LaTeX. So I'm using the TikZ-Feynman package. But my code below:  \documentclass[tikz]{standalone} \usepackage{tikz-feynman} \begin{document} \feynmandiagram [large, vertical=e to f] {   a -- [fermion] b -- [photon, momentum=\(k\)] c -- [fermion] d,   b -- [fermion, momentum'=\(p_{1}\)] e -- [fermion, momentum'=\(p_{2}\)] c,   e -- [gluon]  f,   h -- [fermion] f -- [fermion] i; }; \end{document}   produces the following disfigured diagram!    What should I do?

Today I downloaded and installed the new  package to draw Feynman diagrams. I included the packages   \usepackage{tikz}  \usepackage{tikz-feynman} \tikzfeynmanset{compat=1.0.0} \usetikzlibrary{shapes,arrows,positioning,automata,backgrounds,calc,er,patterns}   into my preamble (changed them already many times).  However, already a simple sample code like  \begin{tikzpicture} \begin{feynman} \vertex (a) {\(\mu^{-}\)}; \vertex [right=of a] (b); \vertex [above right=of b] (f1) {\(\nu_{\mu}\)}; \vertex [below right=of b] (c); \vertex [above right=of c] (f2) {\(\overline \nu_{e}\)}; \vertex [below right=of c] (f3) {\(e^{-}\)}; \diagram* { (a) -- [fermion] (b) -- [fermion] (f1), (b) -- [boson, edge label'=\(W^{-}\)] (c), (c) -- [anti fermion] (f2), (c) -- [fermion] (f3), }; \end{feynman} \end{tikzpicture}   directly gives the error:     Package pgfkeys Error: I do not know the key '/graph drawing/node distance'.   Can you please help me? Thanks in advance!


I have a USB wifi adapter and I don't seem to make it work. it working before (2 months ago) but now it's not. running lsusb returns the driver: Bus 001 Device 009: ID 0bda:b812 Realtek Semiconductor Corp. USB3.0 802.11ac 1200M Adapter I'm not sure if the adapter is broken or I need a new driver and I looked on the internet and couldn't find and suitable driver for it. Any help is much appreciated. I have already tried the solution  but didn't work. I think it's for some old drivers

So I've been experimenting with Ubuntu on and off for a while, but I honestly have no idea what the hell I'm doing. So I have a realtek RTL8812bu WiFi dongle that I'm hoping to get working. I did some research, and came across  that a couple people across two threads said worked for them:  At the bottom it said there is a new version . So somewhere it said it was confirmed to work on kernels up to 4.16, so I checked and I'm on 4.15.0. But the problem I'm having, is what am I supposed to do? There is some installation guide at the bottom that is about as clear as mud to me since I don't know much.


Is there something like a function for letting the WP search form search for ONLY some tags you fill in. in example:  function wordpress_search{     //search for tagname1, tagname2, tagname3 }   If that is not possible, will it be possible to do the opposite? So to exclude tags from search?  I have no idea where to begin and google only points me to plugins where you have to (un)check a checkbox in every article

I need to find only posts with a tag forest gump. I've tried: new WP_Query('tag=forest+gump');, new WP_Query('tag=forest gump');. However they both return ALL the posts and not only the posts with forest gump tag. Single tags (without spaces) work fine, though. Alternatives (like plain SQL) will work as well.  The entry tag line is forest gump, forrest gump, questend.


This is a question from an interview. I am confused about this problem. I said yes in that interview because I remember something about Hilbert curve(I mean, is there a line that can fill a square completely?), but I am not sure. Is it right?

, it is said that a space-filling curve cannot be injective because "that will make the curve a homeomorphism from the unit interval onto the unit square", since every continuous bijection from a compact space to a Hausdorff space is a homeomorphism.  That does mean there can be no injective mapping from $[0,1]$ onto $[0,1]\!\times\![0,1]$, but it doesn't really tell us anything about mappings from noncompact intervals onto the unit square. In the case of the ordinary Peano-Hilbert curve, it does not help much: the construction has infinitely (only countably, though) many inherent points of overlap (discussed here:  ), but I can't really see any reason why there could not be a space-filling curve without such points. Of course, the curve's inverse could not be continuous, but when mapping from a noncompact interval it wouldn't need to be! After all, there are other curves mapping noncompact spaces bijectively to compact ones in a continuous way, but with noncontinuous inverse, like the obvious $[0,2\pi[\to S^1$.


I've just installed Yosemite on my iMac and noticed that my PDF files viewed with the Preview.app don't look the same as in Mavericks. If I view the PDF files directly in Safari, all looks like it should. Against this in the Preview.app it looks kinda trashy.  Is there anyone who can confirm this? And if it's so, how can I make Preview.app show the PDFs like Safari does?

I have just updated to Yosemite and something must have changed in the way Preview renders fonts.   I find that Preview display of text in PDF files is rather sloppy, I am pretty sure it used to be much sharper in Mavericks. At the very least now Preview is significantly less sharp than Acrobat Reader, you can check out a screen-shot to convince yourself of what I am talking about.  In the rest of the UI I am quite happy with how fonts are displayed. So I was wondering if there are ways to control the anti-aliasing of Preview. In the preferences of Preview I can find only a global switch for anti-aliasing, but I would like to play around with the strength of the anti-aliasing so to find the optimal setting.   I am looking into defaults of com.apple.Preview but in my current values there seem to be no setting about Font Smoothing or anything evocative of anti-aliasing. Any suggestion about possible values to edit here?  Thanks for your suggestions, Roberto


Situation   I posted a question.  Fairly quickly, there was a comment "not reproducible" and a downvote. On its face, the downvote would appear to be from the commenter, and that there was a single attempt to reproduce the problem (which is fair). Comment of "not reproducible" spurred me to branch down that path to find the crux of the answer. And I think I have found the answer (search limits tied to IP addresses) and that the problem is reproducible. Assuming that I have found the answer and post it, then how does the downvote on the question get lifted?    I do want to emphasize that the comment was helpful because it helped me "switch gears" in thinking about the problem. It was just unsettling to have something downvoted because (on its face) a single attempt to reproduce the problem failed.  If it helps, here's the question I posted:

I've posted a question or an answer, and I have received one or more downvotes. I am not really sure why I was down voted, or I think I know why, but I disagree.  Why did this happen, and what should I do about it?


I'm trying to work with deque and template and I wanted to add others files (func.cpp and func.h) so I can declare all my function in these files and then include func.h in main.cpp but I got an some errors: 1. argument list for variable template "display" is missing in main.cpp 2.'deque': undeclared identifier in func.cpp 3.'d': undeclared identifier in func.cpp  here's the main.cpp:  #include <iostream> #include <algorithm> #include <deque> #include "funcr.h"  using namespace std;  int main() {     deque <int> d1{ 1,5,3,9 };     d1.push_front(2);     display(d1);     return 0; }   and here's the func.cpp:  #include <iostream> #include <deque>  template<typename T> void display(deque<T> d) {     for (auto e : d)         std::cout << e << std::endl; }   and there is the func.h:  #pragma once  template<typename T> void display(deque<T>d);   can someone help me please?

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.)


As the question title states, do people in the HP universe refer to wizards and witches as "magicians"?  From      magician (n.)   late 14c., from Old French magiciien "magician, sorcerer," from magique   Magic + Sorcery = Witches and Wizards  If it's not used, is there an in-universe reason why?

Although it's a valid word for a magic user, the word "magician" feels cheap to me, probably, because this is attached with those who displays trickery. Also, there are better words which I see everywhere in the canon: wizard, witch, warlock.  But I see lots of people using the words magician. Has this word ever been used in the canon (Canon meaning books, movies, interviews, Pottermore, Twitter, and official statements)?


What would be the argument of  $i^i$? What are the possible ways to find it out?

According to WolframAlpha,  but I don't know how I can prove it.


I'm trying to left align the following equation so that it's on the same line as 3 (a).  \begin{enumerate} \item  \begin{align*}  |\gamma(t)| &= [\gamma(t) \cdot \gamma(t)]^{\frac{1}{2}}\\ &=[(cos(t)p + sin(t)v) \cdot (cos(t)p + sin(t)v)]^{\frac{1}{2}}\\ &=[cos^2(t)(p \cdot p) + sin^2(t)(v \cdot v) + 2cos(t)sin(t)(p \cdot v) ]^{\frac{1}{2}}  \end{align*} \end{enumerate}     Edit: After the fix, this is the result I get:       \item     \begin{enumerate}         \item          $\begin{aligned}[t]         |\gamma(t)| &= [\gamma(t) \cdot \gamma(t)]^{\frac{1}{2}}, \forall t \in \mathbb{R}\\         &=[(\cos(t)p + \sin(t)v) \cdot (\cos(t)p + \sin(t)v)]^{\frac{1}{2}}\\         &=[\cos^2(t)(p \cdot p) + \sin^2(t)(v \cdot v) + 2\cos(t)\sin(t)(p \cdot v) ]^{\frac{1}{2}}\\         &=[\cos^2(t)(1) + \sin^2(t)(1) + 2\cos(t)\sin(t)(0) ]^{\frac{1}{2}}\\         &=[\cos^2(t) + \sin^2(t)]^{\frac{1}{2}}\\         &=1         \end{aligned}$          \item         $\begin{aligned}         |\gamma'(t)| &= [\gamma'(t) \cdot \gamma'(t)]^{\frac{1}{2}}, \forall t \in \mathbb{R}\\         &=[(\cos(t)p + \sin(t)v)' \cdot (\cos(t)p + \sin(t)v)']^{\frac{1}{2}}\\         &=[(-\sin(t)p + \cos(t)v) \cdot (-\sin(t)p + \cos(t)v)]^{\frac{1}{2}}\\         &=[\sin^2(t)(p \cdot p) + \cos^2(t)(v \cdot v) - 2\cos(t)\sin(t)(p \cdot v) ]^{\frac{1}{2}}\\         &=[\sin^2(t)(1) + \cos^2(t)(1) - 2\cos(t)\sin(t)(0) ]^{\frac{1}{2}}\\         &=[\sin^2(t) + \cos^2(t)]^{\frac{1}{2}}\\         &=1         \end{aligned}$

Related (but not the same):         Earlier today I asked a question about aligning equations in an enumerate environment and got an answer that seemed to work for the example I gave, but it turns out I wasn't really specific enough for my problem.  I'm using align* environments, often as the only part of a list item. (If you're wondering why I'm not using more words to introduce the align*, these are mostly homework solutions where most of the work is algebra, etc.)  Here's my code and what it makes (above the middle line):  \begin{enumerate}   \item \begin{align*}     x^2 + y^2 &= x^2 + (iy)^2 \\               &= (x + iy) (x - iy)   \end{align*}   \item \begin{align*}     \frac{1}{n^2-4} &= \frac14 \frac{4}{(n-2)(n+2)} \\                     &= \frac14 \left( \frac{1}{n-2}-\frac{1}{n+2} \right)   \end{align*} \end{enumerate}     I'm trying to make the baseline of the first line of the align* environment the same as the number's baseline—I want the first line of the align* to have the same vertical position (centered horizontally in the same way) relative to its number as in the second half of my picture. (Side question: why is there so much space before the align* starts?)


There are 2 steps in the creation of a force field: (1) first the object comes into existence (2) then the field appears. In the case when a photon splits into an electron and an antielectron, these 2 bodies suddenly pop into existence, whose electromagnetic and gravitational fields then come into existence. what is the rate at which they spread?

A thought experiment: Imagine the Sun is suddenly removed. We wouldn't notice a difference for 8 minutes, because that's how long light takes to get from the Sun's surface to Earth.   However, what about the Sun's gravitational effect? If gravity propagates at the speed of light, for 8 minutes the Earth will continue to follow an orbit around nothing. If however, gravity is due to a distortion of spacetime, this distortion will cease to exist as soon as the mass is removed, thus the Earth will leave through the orbit tangent, so we could observe the Sun's disappearance more quickly.  What is the state of the research around such a thought experiment? Can this be inferred from observation?


I have a windows application which has 2 forms. Iam trying to achieve this:  When the second form is displayed, I want the first form to be hidden.  I have tried like:  public Executor() {   InitializeComponent();   Form1.ActiveForm.Hide(); }   But results in "cross-thread operation not valid control accessed from a thread other than the thread it was created on" before getting started the entire application.  How can I achieve what I said? Also in my later code I am trying to close as shown above with the code Form1.ActiveForm.Close();  Any ideas would be really appreciated..

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 have to create a presentation with lots of diagrams. I do this with the beamer class and pgfplots. I'm tired of copying the axis definition in every single diagram and I'm looking for a way to put it in the preamble of the presentation file.  Tried to create a newcommand \axisdefintion but this didn't work.  Is there a way to have the axis definition in the preamble (except for the title)?  This is what such a diagram would look like:  \begin{tikzpicture} \begin{axis}[     title={Some Title here},     every axis label/.append style={font=\sffamily\footnotesize},     width=\textwidth,     axis line style=thin,%Achsenstärke     filter discard warning=false,     axis line style={gray!30},     axis y line = center,     axis x line = center,     y tick label style={font={\sansmath\sffamily\fontsize{4}{4}\selectfont}, anchor=east},     x tick label style={font={\sansmath\sffamily\fontsize{4}{4}\selectfont}, anchor=north},     x label style={at={(axis description cs:1.0,-0.03)},anchor=north, font={\tiny}},     y label style={at={(axis description cs:-0.08,.5)},rotate=90,anchor=south, font={\tiny}},     xlabel=Zeit in ms,     ylabel=Sensorwerte,     every y tick/.style={gray!30},     ytick={-550,-500,...,1350},     xtick={0,1000,...,12840},     no markers,     every axis plot/.append style={thin},     every axis/.append style={font=\sffamily},     axis on top=false,     font={\sffamily},     xmin=0, xmax=12900,     ymin=-550, ymax=1360,     legend style={fill=none, draw=none, at={(1.1,0.05)},anchor=east,font={\fontsize{4}{2}\selectfont}, /tikz/column 2/.style={column sep=5pt},},     legend columns=2,     legend cell align={left},     every node near coord/.append style={font=\sansmath\sffamily\fontsize{4}{2}\selectfont, color={DarkRed}},     ]     %%Plots     %%add some plots here \end{axis} \end{tikzpicture}

I was wondering if anyone could point me in the direction of some good sources to learn about user-defined styles in pgfplots? I've been through the pgfplots manual but it seems to only touch on this subject. So far I've been able to define some styles of my own, and call them without any issues, but I'd like to expand on this functionality, and for that I need some more detail about what styles are and aren't capable of, and what the appropriate syntax is. Some of my questions are:  Q1: Can I define nested styles? For example, my preamble defines MyStyle1 like so:  \pgfplotsset{MyStyle1/.style={code-goes-here}}   I then call this style in my document with something like this:  \begin{tikzpicture}     \begin{axis}[MyStyle1]           \addplot[MyStyleA] pseudo-code;     \end{axis}       \end{tikzpicture}   What I'd like to do is have MyStyleA have one definition if the axis uses MyStyle1, and a different definition if the axis is using MyStyle2. Can this be done? How would I go about this?  Q2: How do I overwrite parts of a style? Let's say MyStyle1 includes the line xmin=5, and I apply MyStyle1 to an axis environment as above. I want the minimum x value to instead be 0, but to otherwise use all other settings from MyStyle1. How do I override this for just this axis environment (i.e. not affect any other things that use MyStyle1)?  Q3: Are there any limitations to what I can put in a style? I'm assuming any settings I can put in [] brackets can also be put in a style. Any exceptions or additions to this rule?