I'm trying to make a command that executes at a firework_rocket entity with specific nbt (In this case explosion colours), and runs a certain command whenever such a firework is present, however, nothing happens.  Here is the /execute command in question  execute at @e[type=firework_rocket,nbt={FireworksItem:{id:firework_rocket,Count:1,tag:{Fireworks:{Explosions:[{Colors:[I;11743532,3887386]}]}}}}] run say doot   If this worked, it should react by saying doot constantly every time any single firework rocket with a matching explosion was flying. It doesn't.  The nbt should be identical to the one summoned with this command (I checked)  /summon firework_rocket ~ ~1 ~ {FireworksItem:{id:firework_rocket,Count:1,tag:{Fireworks:{Explosions:[{Colors:[I;11743532,3887386]}]}}}}   And it should also react whenever a player used the rocket given as an item with this command  /give @p firework_rocket{Fireworks:{Explosions:[{Colors:[I;11743532,3887386]}]}} 1   Not a single of these commands works, and I checked that the nbt is identical for each of them, yet nothing happens.

I am trying to build a custom Adventure Island. At this moment I am trying to limit the allowed items on this island. I'm trying to do this by filtering on a certain enchantment which is not item-specific.  For example.   When you want to filter an wooden sword with a custom name, you use this command:  /testfor @p[r=5] {Inventory:[{tag:{display:{Name:"Custom Sword"}}}]} <   When you want to filter a wooden sword with a custom name and specific enchantement, you can use:  /testfor @p[r=5] {Inventory:[{tag:{display:{Name:"Custom Sword"},ench:[{id:16,lvl:1}]}}]} <   But how can I filter on items with a specific enchantment on ANY item? I tried:  /testfor @p[r=5] {Inventory:[{tag:{ench:[{id:16,lvl:1}]}}]} <   But this ain't work. Does anyone know how to solve this issue?


Elon Musk said one of the methods they are taking into consideration to create an atmosphere on Mars is to nuke its poles. How nuking the poles would create the atmosphere?

has recently suggested . In the past, comet related ideas were mooted, but Musk seems, to me anyway, to be a  man in a hurry and perhaps his idea has some merit, as waiting around for suitable comets may take a while and involve large energy expenditure.      The businessman has often stated that he thinks humans should colonize Mars, and now it seems he’ll stop at nothing to get his way.   “It is a fixer-upper of a planet,” Musk told Colbert. “But eventually you could transform Mars into an Earth-like planet.”   There’s a fast way and a slow way to do that. The slow way involves setting up lots of pumps and generators to warm up the red planet so that its frozen carbon dioxide melts and wraps the planet in a thicker atmosphere. The thicker blanket of CO2 helps the planet warm up further, thus melting more carbon dioxide, and the positive feedback loop continues. (This is essentially what we’re doing on Earth, and it’s called global warming.)   There's a simpler and cheaper way to warm up Mars. “The fast way is, drop thermonuclear weapons over the poles,” said Musk.   I can't immediately find an estimate of the volume of the carbon dioxide on (or under) the Martian surface but this source  gives an estimate of water ice volume:     Water on Mars exists today almost exclusively as ice, with a small amount present in the atmosphere as vapor. The only place where water ice is visible at the surface is at the north polar ice cap. Abundant water ice is also present beneath the permanent carbon dioxide ice cap at the Martian south pole and in the shallow subsurface at more temperate latitudes. More than five million cubic kilometers of ice have been identified at or near the surface of modern Mars, enough to cover the whole planet to a depth of 35 meters. Even more ice is likely to be locked away in the deep subsurface.   Physically, and I do want to stick to the physics, particularly the atmospheric physics, rather than engineering,  is this idea feasible?   Has Musk done his homework as regards:   The amount of nuclear material needed? (And the undoubted outcry over its transport from Earth using potentially highly explosive rockets in the first place)? Is the gravity of Mars strong enough to retain the water vapour involved?  I am guessing it is. Will  atmospheric pressure help retain the water vapour produced or is his idea enough to produce a relatively dense atmosphere? Finally, Musk is a businessman selling a possible project, and that implies, understandably I suppose, that  dramatic publicity is involved. Would a set of mirrors in orbit do the job just as efficiently, although over a longer timescale?


I'm buying a new laptop and refuse to use Win 10.  Being disabled, I’m having a hard time getting/searching for an answer to what I hope is a fairly straight forward question:  Can I install Ubuntu or any Linux distribution on the new Intel Kaby Lake processors?  I’m not sure what specific info you’ll need, so I’m including all the major specs: Sager P650HS-G / HM175 chipset / 7820HK processor / 64 GB RAM - Kingston Hyper X CL14 2400MHz / nVidia 1070 w/ G-Sync / Samsung 960 Pro NVMe M.2 for the OS / Duel Samsung 850 EVO SSD in RAID / Bigfoot Wireless-N1535 M.2  Hopefully all this will work with Ubuntu.  If any components listed need something special installed to work, please help direct me to what else I’ll need to do.  Thank you everyone for your help with this question!

I am using a 7th generation i5 processor(7200,2.50 ghz).The processor also have intel hd graphics 620 and nvidia geforce 940mx 2gb graphics card. I read previously that only windows 10 can be installed to this specific processor.  Is it true no version of ubuntu can be used with this processor?  If it's possible to install ubuntu using this processor, what additional steps other than the normal installation process should I undertake to get Ubuntu working?


var jsonString = '{"htmluserresponse":"This is my firs \n test"}'; var jsonObj = JSON.parse(jsonString); console.log("Test Response------" + jsonObj.htmluserresponse);     JSON.stringify() actually created the string i pass into the jsonString, but JSON.parse fails if the string has \n character.   how to get the valid string ?

I've generated some JSON and I'm trying to pull it into an object in JavaScript. I keep getting errors. Here's what I have:  var data = '{"count" : 1, "stack" : "sometext\n\n"}'; var dataObj = eval('('+data+')');   This gives me an error:   unterminated string literal   With JSON.parse(data), I see similar error messages: "Unexpected token ↵" in Chrome, and "unterminated string literal" in Firefox and IE.  When I take out the \n after sometext the error goes away in both cases. I can't seem to figure out why the \n makes eval and JSON.parse fail.


I read this sentence  in a movie     What would have happened if you were a few minutes later?   I think that the sentence "What would have happened if you were a few minutes later?" is wrong grammatically.  Is it grammatical?

From a film subtitle:     "What would've happenned if you were a few minutes later, Hani?"   I think that 'What would have happened if you had been a few minutes later,Hani?'is right?  I think this is third conditional sentence. Could you tell me the grammar I don't know? Or is this wrong sentence?


I would like to know how I can install third-party packages that are not included in the standard MacTeX distribution.   I am interested in using jecon.bst in particular.  The current situation is:   The .bst file works fine when I put the file in the same folder as the main .tex file. I am using TeXShop. The manual of jecon.bst file suggests that I put the file in the folder where jplain.bst is located, and I did that. In addition to this, I copy pasted jecon folder into bibtex/bst folder as well. However the engine upbibtex cannot locate jecon.bst.   did not solve my problem. I could locate the texmf hidden folder without any problem, as I indicated above.   Is there anything else I have to do for upbibtex to recognize jecon.bst?

I've searched online, but I have not found any clear instructions how to permanently add .sty files to my TeXShop installation. I'm using a Mac with OSX (TeXShop is a mac only program).  What is the best way of doing this? The one comprehensive set of instructions I found .   I've got as far as extracting the files (running LaTeX on the .ins and . dtx files) but after that I don't know what to do. I also don't understand how to update the index of my distribution, and whether there are particular OSX specifics (the instructions are for Windows).


If I say "The boy and girl are..."  I think it's as correct as "The boy and the girl", as some natives told me that.  Do you confirm?  But what is the rule in English for non repeating the article?    And also, more generally, are there other rules for omitting the singular article? When could it be implied? (I don't mean the zero article, like in generalities, categories and plural, when we expect the zero article.)

According to one article reference book, it says we can omit articles (a, an, the) in front of the second, third,… nouns. Is it really acceptable from native English speakers' point of view? Is it really grammatically correct and allowed in writing? The book says it is so clear that each item (noun) is a different item, so we do not need to repeat the article.  Example 1:     I bought a lemon, melon, and pineapple.   Example 2:     I asked her to pass me the pen, eraser, and pencil sharpener.   I understand we can definitely place "a" in front of each noun, but could placing the articles (a, the) be redundant?


i have installed virtualbox with repo  deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian aeon contrib  sudo apt-get install virtualbox vagrant -y   but use   VBoxManage --version   this error below      WARNING: The vboxdrv kernel module is not loaded. Either there is no module      available for the current kernel (5.3.0-45-generic) or it failed to      load. Please recompile the kernel module and install it by           sudo /sbin/vboxconfig  You will not be able to start VMs until this problem is fixed. 6.0.18r136238   i have tried step 1  sudo /sbin/vboxconfig   output below     vboxdrv.sh: Stopping VirtualBox services.   vboxdrv.sh: Starting VirtualBox services.   vboxdrv.sh: Building VirtualBox kernel modules.   This system is currently not set up to build kernel modules.   Please install the gcc make perl packages from your distribution.   This system is currently not set up to build kernel modules.   Please install the gcc make perl packages from your distribution.   There were problems setting up VirtualBox.  To re-start the set-up process, run     /sbin/vboxconfig   as root.  If your system is using EFI Secure Boot you may need to sign the   kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load   them. Please see your Linux system's documentation for more information.   step 2 :  sudo /usr/lib/virtualbox/vboxdrv.sh setup vboxdrv.sh: Stopping VirtualBox services. vboxdrv.sh: Starting VirtualBox services. vboxdrv.sh: Building VirtualBox kernel modules. This system is currently not set up to build kernel modules. Please install the gcc make perl packages from your distribution.   after i have install library with command  sudo apt-get install build-essential gcc make perl dkms  but still not working . kernel vboxdrv still not loaded. somebody helpme .

I am using . When I try to start it, I get this issue (it was working the past year, no idea why it suddenly fails - I haven't updated anything):     The provider 'virtualbox' that was requested to back the machine   'homestead' is reporting that it isn't usable on this system. The   reason is shown below:      VirtualBox is complaining that the kernel module is not loaded. Please   run VBoxManage --version or open the VirtualBox GUI to see the error   message which should contain instructions on how to fix this error.   Running VBoxManage --version  returns this:     WARNING: The vboxdrv kernel module is not loaded. Either there is no   module            available for the current kernel (5.3.0-26-generic) or it failed to            load. Please recompile the kernel module and install it by         sudo /sbin/vboxconfig       You will not be able to start VMs until this problem is fixed.       6.0.10r132072   Running sudo /sbin/vboxconfig  returns this:     vboxdrv.sh: Stopping VirtualBox services. vboxdrv.sh: Starting   VirtualBox services. vboxdrv.sh: Building VirtualBox kernel modules.   vboxdrv.sh: failed: Look at /var/log/vbox-setup.log to find out what   went wrong.      There were problems setting up VirtualBox.  To re-start the set-up   process, run   /sbin/vboxconfig as root.  If your system is using EFI   Secure Boot you may need to sign the kernel modules (vboxdrv,   vboxnetflt, vboxnetadp, vboxpci) before you can load them. Please see   your Linux system's documentation for more information.   The log file is very large. I pasted it .   Any recommendations what I need to do to fix this?


I am trying to make a script that switches files at different times of days so that my settings are pulled at different times like a day mode and a night mode.  If I have a file 1, 2, and 3 which 3 is a group of settings for my server. I want to switch out 1 to become 3 from 8am to 6pm. then I want 2 to become 3 from 6pm to 8am automatically. How can I do this though shell script? I just want to basically do a cp -v 1 3 then cp -v 2 3 on a schedule how would I accomplish this? thanks in advance! I don't want to do it through cron i want to do it through shell script only, if possible!!

How to execute a script periodically like crontab does but without using crontab?  Please note this that the executed script should not fire with another script and schedule it with 'sleep' command, what I expect to have same functionality as crontab but it should not be present in crontab list and should not be stop when terminal or session ended,   crontab exactly but without croning it.


I had applied for B1/B2 on my previous nationality but it got rejected Thrice.  I had planned on visiting my mother as she lives there. my last refusal was 3 years back. Now i have gained an European nationality and I am thinking of applying for ESTA so I can visit my mother. I have doubts if it will be accepted because I'll have to disclose about my previous refusals.  What should I do? because if I don't disclose my previous refusals I fear I might be rejected permanently.

I applied for a B1 visa to attend a conference in the USA in 2013. I had another nationality (Non- VWP) at the time and my B1 application rejected under section 306 of border security. I now can apply for ESTA under my new nationality. Can my ESTA application get approved? If not and I need to apply for visa is it every time I need to travel to stated or is it just the first time?


Can any one tell me how i can achieve multiplicity photography.  Please refer the link below.  Let say a child is playing in garden and we are merging 10 to 12 images into a single image?

I'd like to create one of those "stacked" action shot images where multiple exposures are combined to show the subject moving across a static background.   (by ):   Ideally, I'd like tips both for the photography part of this and for post-processing.  For example, I'd imagine I want to shoot manual w/ the same exposure for all shots (as with a panorama), but I'm not sure if there are any other helpful tips for taking the shots.  At one point, for example, I thought I'd have to tripod-mount the camera and keep the same framing for all shots, but I've now seen several examples where the composition moved from shot-to-shot.  I'm also interested in recommendations for post-processing -- software, technique, etc.  I can envision a manual process where I stack layers and align them by hand in Photoshop Express, but I'd be surprised if there wasn't a better way — maybe using a pano tool like Hugin.


I think I am missing something when trying to understand the meaning of ROC curve. More specifically, I don't understand why a square with AUC of 1 (100% of the area) is considered ideal. This implies that a classifier results range from achieving TPR/FPR of 1/0 to 1/1 for various thresholds. Yet, isn't the ideal situation 1/0 for any threshold value? That implies no curve is constructed and AUC is undefined.  I am probably understanding something fundamentally wrong.

Searched high and low and have not been able to find out what AUC, as in related to prediction, stands for or means.


If you are not known about this phemomenon, sending this message to someone with iOS will cause the phone to reboot once.   However, this time the phone doesn't stop rebooting. After the reboot is finished, it starts with a new reboot. Basically I'm stuck.   Is there anything I can do to make this loop stop?  Thanks a lot in advance

Recently a new "glitch" has surfaced over the Internet over the last few weeks where if an iPhone user is sent:    effective.        Power            لُلُصّبُلُلصّبُررً ॣ ॣh ॣ ॣ  冗   via iMessage it crashes the phone OS temporarily and force restarts the receiving phone.  Why does this work?


It’s 3rd time, I'm starting my  laptop and it’s showing this error.     Realtek PCIe GBE Family Controller Series v2.41 (06/08/11)      PXE-E61: Media test failure, check cable.      PXE-M0F: Exiting PXE ROM.      No Boot Device Found. Press any key to reboot the machine.   Please check the image below for precise error and details.  First time I tried to press keys, also checked setup but didn’t help. Everytime It got restarted and shows the same error again. Then I powered off and on again and it starts working. Then next day same issue but worked fine when I re-started via power button and today’s the same.  Any help what to do?

My computer no longer boots Windows or the installed operating system. Instead, I may get this error:  PXE-E61: Media test failure, check cable -or- Check cable connection!  PXE-M0F: Exiting PXE ROM.   and/or one of the following messages or similar:  Operating System not found  No boot device available- No bootable devices--strike F1 to retry boot, F2 for setup utility  No bootable device -- insert boot disk and press any key  No Boot Device Found. Press any key to reboot the machine  Default Boot Device Missing or Boot Failed  Reboot and Select proper Boot device or Insert Boot Media in selected Boot device   What does this mean and what can I do?     This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this problem. Feel free to edit the answer to add additional details.


I came across an issue when coding methods in a controller that have separate Get and Post executions.  Normally when we scaffold a controller against a model, the Get and Post methods have different parameter definitions because the Post method is normally capturing data from the form to save to the model/database.  But I was just coding an original set of Get/Post methods where the parameter list was actually the same.  I can later post my example code to show this, but that might be distracting from my question; i.e., we can acknowledge there's always another way to code any given method.  In this case, I'd rather get an answer to this question.  If the Get and Post methods have the same parameter definition, then that's a syntax error.  So I needed a way around this problem.  The following was my logic.  Since I can't change the name of the method (that's an assumption on my part that may not be valid), the only way around this is to change the parameter definition of one or the other of the Get/Post variations.  So I added an additional parameter to the Get method and the compiler was happy.  I don't actually supply that parameter when invoking the method, and of course I don't use the parameter in the method, but it does give the method a different parameter definition and it solved my dilemma.  But I wanted to ask if everyone else handles this coding issue different ways so I might learn a better way to do it.  It may be that my assumption about method naming is incorrect as well.  Added after original post: (@CodeCaster, lesson learned). I removed the internal code as it's not related:  Function ChannelTopicSelector(ByVal ChannelType As ChannelType, ByVal Topic As String) As ActionResult   Return View() End Function  <HttpPost()> <ValidateAntiForgeryToken()> Function ChannelTopicSelector(ByVal ChannelType As ChannelType, ByVal Topic As String) As ActionResult   Return View() End Function   The first method above returns the 'multiple definitions with identical signatures' error.  I followed CodeCaster's link which I believe is also Brad's point and I understand how the ActionName Attribute is applied.  I hadn't noticed this before as my coding never got into yet.  Regards the duplicate question, I did look for other posts, I just didn't know how to frame the question correctly for it to come up in the search.  Should this post be deleted then?  Anyway, my question is answered - thx

I'm curious to see if you can overload controller methods in ASP.NET MVC.  Whenever I try, I get the error below.  The two methods accept different arguments.  Is this something that cannot be done?     The current request for action 'MyMethod' on controller type 'MyController' is ambiguous between the following action methods:


I have set up temporary user accounts on my sql database where the user names, passwords and date added of my websites users are stored.  I was initially going to have these records delete programmatically but now im wondering if sql server 2008 has a built in function that allows records to be auto-deleted after lets say one day.   This would resolve the issue of a user being able to stay logged into the system after their temporary account is closed  thanks

I want to delete records from a db table based on a time-stamp for each record. I would like to have it automatically delete records compared to a date/time interval without user intervention or admin intervention.   What would be the best way to go about this, I could create a process that runs in the background that does checks but that is extra work I want to avoid? Is there any libraries/web services I could use as templates?


I could not find a solution for the following problem. That's why I address my problem now here.  I want to design a table without fancy libraries, just with some basic features like \hline and spacing commands. But this strategy does not lead me on the right way.  I attached a picture of the compiled latex code. You can see small white gaps in the vertical lines. How do I get rid of those? It is supposed to be a continuous line.  \begin{table}[ht] \centering \caption[bla]{bla } \begin{tabular}{| p{1.8cm} | p{3cm} | p{4.7cm} | p{3.5cm} |}     \hline \\[-1.0em]     bla     & bla & bla & bla \\     \hline \hline \\[-1.0em]     bla & bla  & bla & bla \\     \hline \\[-1.0em]     bla & bla & bla  & bla \\     \hline \\[-1.0em]     bla & bla & bla &bla\\     \hline \\[-1.0em]     bla & bla &bla Jahre &  bla \\     \hline \\[-1.0em]     bla &bla   & bla &bla \\     \hline \end{tabular}% \label{tab:bF}% \end{table}%     Thanks a lot for your support!

I have seen similar questions on the matter (, ) of adding vertical space and not breaking vertical lines, the solutions suggested are to add space after the \\ using \\[0.1cm] for example or changing the \arraystretch which I do not want to do. Using \\[0.1cm] allows me to add space just before a \hline but not after as well.  How can I add vertical space after a \hline without breaking vertical lines in a table?  Please find my MWE below:  \documentclass{scrreprt} \usepackage{setspace} \usepackage[left=2.5cm,right=2.5cm,top=3cm,bottom=3cm]{geometry} \usepackage{array,tabularx} \doublespacing  \begin{document} \begin{table}[htb]   \centering   \onehalfspacing   \caption{Table of info.}      \begin{tabular}{c | c c}  & C/S Analyser & O/N/H Analyser \\  & EMIA 320 V2 & EMGA 830 \\[0.1cm]    \hline    \noalign{\vskip 0.1cm} Sensitivity (ppm) & 0.1 & 0.001 \\ Furnace type & Induction & Impulse \\ Carrier gas & Pure O2 & Pure He \\[0.1cm]    \hline     \end{tabular}    \doublespacing   \label{tab:chem} \end{table} \end{document}


So I downloaded a music file but I was surprised when I saw it had no extension and it was 0kB. I decided to delete it but then I got that terrible error message saying that the file is no longer in the folder I see it is in!!!   I don't think my hardware is so weak that it can't refresh my Explorer Window...   So what I first had in mind was to use admin rights cmd to delete the file as shown in this video:  (yes, I had that problem before, on Windows 7 and that solved it for me).   But on Windows 8.1 I can't see short filenames for ANY file, not just the corrupt one. (Is that a bug or is it supposed to be so? My corrupt file has a dot in its name -- a disallowed character, I believe?)  What can I do to delete this file?   I tried creating and then deleting it, a new version of the same file was created again what is wrong with that?

I have a file whose size is 0 bytes. When I try to remove it an error message appears, saying "Could not find file".  Here is the list of things I've tried to delete the file:   Rebooted Reset folder options Cleaned the registry with CCleaner Using the del command Replacing it with a different file   The dir command gives this information about the file:  25.06.2011 21:06 0 STALKER   File properties:    How can I remove it?


I am being asked to find a matrix $B$ where $B^5 = A$  $$A = \begin{bmatrix} 1 & 3 \\ 3 & 1 \end{bmatrix}$$  In the first part of the question I was asked to find the eigenvalues & eigenvectors for the matrix which I found successfully. If someone could help me finish this then that would be great.

$$A=\begin{pmatrix} 1 & -1 \\ -2 & 1 \end{pmatrix}$$      Find a matrix $B$ such that $B^3$ = A   My attempt:  I found $\lambda_1= 1+{\sqrt 2}$ and  $\lambda_2= 1-{\sqrt 2}$  I also found their corresponding eigenvectors $\vec v_1 =\begin{pmatrix} \frac{-\sqrt 2}{2} \\ 1 \end{pmatrix}$ and $\vec v_2 = \begin{pmatrix} \frac{\sqrt 2}{2} \\ 1 \end{pmatrix}$  I know the Power function of a matrix formula $A=PDP^{-1}$  Because it's the cubed root I'm looking for I don't know how to get the cubed root of the eigenvaules and keep the maths neat. Is there another way to solve this problem or an I going the wrong way about doing it ?


I am trying to access my ubuntu 14.04 LTS account but am unable to. I login and i get the same login screen again. I have tried all the solutions present in the links :  1. 2.. I went to .Xsession-errors and saw an error which was not addressed in any of the links :  /etc/X11/Xsession.d/50_check_unity_support: line 7: 2731 Segmentation fault   (core dumped) /usr/lib/nux/unity_support_test   Looking for help. I do not use dual boot. I have tried every page solution available and none have matched my error or have been able to resolve it. I have tried to log into the guest session but it leads back to the login page.

My Ubuntu is stuck in a login loop when trying to enter my desktop. When I login, the screen gets black and soon after that the login screen comes back.   I've read that the problem might be caused by an error depending on the graphics, here's my graphics card: ATI Radeon 7670M


I am creating an anthology of poems and songs, and have a main file where I am using \input to insert separates TeX files which contain the poems.  I was wondering if there was a simpler way of inserting all of the files in alphabetical order based on filename instead of a separate \input for each file?  Could anybody help?    Thank you to for pointing me in the direction of the other questions - they didn't come up when I googled my queries. I am trying to adapt the code in  but I am getting 2 errors from it. My code is as follows at the moment  \documentclass{minimal}  \makeatletter% \def \app@exe {\immediate\write18}  \def \inputAllFiles [#1]{%   \app@exe{cmd /c dir /b *.tex > \jobname.tmp}   \InputIfFileExists{\jobname.tmp}{}{}   \AtEndOfDocument{\app@exe{rm -f #1/\jobname.tmp}}} \makeatother%  \begin{document}  \inputAllFiles{.}  \end{document}   The errors messages I am getting are both on the line with the \inputAllFiles command and say: Use of \inputAllFiles doesn't match its definition and Too many }'s.  I have tried fiddling around with the code, but noting I seem to do helps. Could anybody help to see where I am going wrong?

Assume I have many TeX files. For the sake of simplicity, also asssume they are in a single folder or directory.  I want to input all files from within my main LaTeX document. Actually I can create a list of those files using C# in advance.  To enrich my view about LaTeX or TeX, could you tell me whether or not this job can be done only by using pure TeX or LaTeX?


How can i summon an entity and shoot it where the player is facing.  Like shooting an arrow in front of me.

Since we can use ^ ^ ^ for relative coordinates with 1.13 like  /execute as Asaf31214 run summon lightning_bolt ^ ^ ^10   (Summons a lightning at 10 blocks from me to the direction I look. By the way, first part is how many blocks to left, second is up and third is how far from you, if you see this function for first time. It is just like cylindrical coordinates at science.)  I tried to write a command that throws a TNT out of me to the direction i want. It was supposed to be:  /summon tnt ^ ^1 ^10 //1 block up and 10 block forward// {Fuse:50,Motion[^0,^1,^10]}    if I don't use ^ it will throw the TNT to constant x direction. But it gives an error if I use it with new ^ coordinate system.  Can you explain me how to do this? I guess this coordinate system isn't fully useful yet since it is brand new, and this can be impossible for now.


I'm trying to automount a USB device upon plugin but it refuses to mount. I set a rule to execute the following script :   #!/bin/bash mkdir /media/mnt echo AFTER MKDIR > /home/output sleep 5 echo AFTER SLEEP >> /home/output mount /dev/sdb1 /media/mnt echo $? >> /home/output echo AFTER MOUNT >> /home/output   The script gets executed nicely, lsblk shows that /dev/sdb1 is present, output contain all the echoes, yet sdb1 won't be mounted in /media/mnt. The mount command exit code is 0  When I execute the mount command in that script manually after the USB device is plugged in it mounts it without problem.

I tried to create some udev rules to mount and unmount my USB flash drives; the rules for the moment are very simple:  ACTION=="add",KERNEL=="sd[b-z]",RUN+="/root/scripts/plug_flash_drive.sh %k" ACTION=="remove",KERNEL=="sd[b-z]",RUN+="/root/scripts/unplug_flash_drive.sh %k"   plug_flash_drive.sh is also very simple:  device_name=$1 mount_options="umask=000,utf8" if [ ! -e "/media/$device_name" ]; then     mkdir "/media/$device_name" fi sleep 1 /usr/bin/mount "/dev/$device_name" "/media/$device_name" -o "$mount_options"   unplug_flash_drive.sh:  device_name=$1  umount "/dev/$device_name" rmdir "/media/$device_name"   I have done some tests so I can ascertain that:   When plugged in, my flash drive is detected; a file is created in /dev plug_flash_drive.sh is called by udev the mkdir part of the script works however, it seems that the "mount" part of the script is not executed, so my drive is not mounted when I call my scripts on the command line, they perfectly work   Does anybody know why mount is not executed when called by udev?  EDIT 28/08/14: I added "grep -q /proc/mounts && echo success || echo failure" at the end of my script to check in my debug log if the device is actually mounted before the script ends. It appears that the device is mounted at that point even when the script is called by udev. So the real problem is now "my block device is seemingly unmounted after the mount script end when called through udev" :s


I'm currently compiling a large article with footnote citations. Using the biblatex package and compiling in MacTeX, my document allegedly compiles without errors, but the footnotes do not compile correctly on the pdf, the output simply pasting the bib ids:     However, copying and pasting the same exact code and bib file into Overleaf, some of the footnotes now compile:    I'm wondering why half of these now compile in Overleaf, and why none of them compile correctly using MacTeX, even when I am told the transcript is written without errors? Thank you very much in advance for any insights in how to proceed to correctly compile these Author-Year footnote citations.

I've browsed the forums and found a number of posts that have addressed this issue, but none of the solutions seem to work for me. I have the following script that I just copied from the bibtex home page to get familiar with it. Instead of the citation number I get a question mark. I compile using Latex+Bibtex+Latex+Latex+PDFLatex+ViewPDF just as has been previously suggested and the problem persists.   \documentclass[11pt]{article} \usepackage{cite}  \begin{document}  \title{My Article} \author{Nobody Jr.} \date{Today} \maketitle  Blablabla said Nobody ~\cite{Nobody06}.  \bibliography{mybib} \bibliographystyle{plain} \end{document}   My bibliography (Bib.bbl)  @misc{ Nobody06, author = "Nobody Jr", title = "My Article", year = "2006" }    Looking at previous posts one thing that is concerning is that my .bbl looks empty as shown below. Further, I don't have a .blg  \begin{thebibliography}{}  \end{thebibliography}


Using jQuery, I get HTML data with the $.get() function.  In callback function, when I put a breakpoint, the data variable is not empty and I see my link with the proper class (deleteLink), so I can select it.  $.get(path, function(data) {     $(data).find("a.deleteLink").click(function(event) {         event.preventDefault();         DeleteRow(event);     });     $("#tbody_id").append(data); });   Example of data received:
     Some data	     X
   I've tried to append() data after and before assigning the event listener to the link.  Having no JS error when I receive data, having the good element returned with $(data).find("a.deleteLink") function, having also the correct
 element returned by $("#tbody_id"), and no error when I click on link, why DeleteRow() is never called?

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.


Much has been said of the $dx$ notation used for integration on this site, but some writers of mathematics papers (especially physicists), write integrals as  $$ \int dxf(x) $$  For instance, one way of writing the law of total probability I have seen is  $$ f_Y(y) = \int_{-\infty}^{\infty}dxf_{X|Y}(x|y)f_Y(y) $$  What ideas are the authors trying to emphasize through this notation?

From reading answers here, I've noticed that some people write integrals as $\int dx \; f(x)$, while other people write them as $\int f(x)\;dx$.  I realize that there is no mathematical difference between the two notation forms, but was wondering why some people choose the first method over the second.  Is there some place in higher maths that it becomes beneficial to write the differential first?  (I, personally, have always used the second method, just because I was taught that way...)


I have a asp.net Textbox control which is tagged to accept amount values. It should not accept any value more than 3 decimal places.  123.1 - True  123.12 - True  123.123- True  123.1234 or 12.1234 - False  <asp:TextBox ID="Amount" runat="server" Width="500px" Visible="false" onkeypress="return isNumber(this,event)"/>   Javascript code below.   <script type="text/javascript">          function isNumber(txt, evt) {             var charCode = (evt.which) ? evt.which : evt.keyCode;              if (charCode == 46) {                 //Check if the text already contains the . character                 if (txt.value.indexOf('.') === -1) {                     return true;                 }                 else {                     return false;                 }             }             else {                 if (charCode > 31              && (charCode < 48 || charCode > 57))                      return false;             }              return true;          }  </script>    The JS will validate numerics and .(dot) to be only once. I've tried various combinations of regex which fails. Needs a regex to be handled in JS functions appropriately. Among the various regex I've applied, here are few "\d+(.\d{1,3})?$", "/^\d+(.\d{1,3})?$/"...

I have some client-side validation against a text box, which only allows numbers up to two decimal places with no other input.  This script was a basis for entering numeric values only, however it needs to be adapted so it can take a decimal point followed by only up to two decimal places.  I've tried things such as /[^\d].\d{0,2}, but then the replacement call wouldn't work, and I've got no idea how to do it.  Code  <script type="text/JavaScript">   function valid(f) {     if (!/^\d*$/.test(f.value)) {       f.value = f.value.replace(/[^\d]/g,"");       alert("Invalid number");     }   } </script>     Note  I need to match an empty string. If an empty string is provided and the form is submitted, the value defaults back to zero.


Or maybe better phrased as “I have been learning English since 2 years”. I took the example sentence from . From Dan’s answer I learnt that “learnt” is not short for “been learning”. It is interesting that it is used as an example of a correct sentence on the linked page.  The sentence should be “I have been learning English for 2 years”. As a native English speaker without an in depth understanding of how grammar rules work beyond “it doesn’t sound right”, I was wondering if there is an easy to understand explanation for what (and how) grammar rules should be applied when differentiating between “for” and “since” to describe how long something has been happening. I think StoneyB's answer to  largely answers this but I would like to know a little more about what the present perfect is and how it relates to this sentence construction.  As I seem to frequently encounter this confusion with ESL speakers, I was wondering is this a peculiarity of the English language that makes it difficult to translate? Is the grammar differences caused by the lack of a conceptual difference between “for” and “since” in other languages rather than just choosing the wrong dictionary word? If so, what is the best way to explain this?

Sometimes I hear people say something like the example below. Is it correct to use the word since in this manner?     Mosquitoes are surviving on earth since millions of years.


I ran a regression analysis to predict performance on an exam, calculated residuals and took an average and sum of the residuals and the result was ~ -0.011 (for average) and -2.34 for the sum of residuals.  This was when the calculation was done on Excel.  Using SPSS, when I requested for residuals to be saved while running the regression and then did a descriptive statistics for those residuals, the average was 3.4 E-14 and the sum was 0.0000.  I'm not sure why two programs would result in vastly different values.  Also, a tad confused as to what could be causing the negative value for sum of residuals despite the plots not revealing any glaring homoscedasticity or outliers.  With regards to the sum/average of residuals being equal to zero, does the value have to exactly zero or does it have to be something with a really negative exponent to qualify as zero?  What would be considered close to zero or almost zero in terms of a threshold?  If there are references that could be provided for this threshold or range, that would be much appreciated too.   Thanks!

I'm taking a course on regression models and one of the properties provided for linear regression is that the residuals always sum to zero when an intercept is included.   Can someone provide a good explanation for why this is the case?


We know the Variance inflation factor and condition number both help to measure multicollinearity. Which one should we use when?

When working with many input variables, we are often concerned about .  There are a number of measures of multicollinearity that are used to detect, think about, and / or communicate multicollinearity.  Some common recommendations are:  The multiple $R^2_j$ for a particular variable  The tolerance, $1-R^2_j$, for a particular variable  The variance inflation factor, $\text{VIF}=\frac{1}{\text{tolerance}}$, for a particular variable  The condition number of the design matrix as a whole: $$\sqrt{\frac{\text{max(eigenvalue(X'X))}}{\text{min(eigenvalue(X'X))}}}$$   (There are some other options discussed in the Wikipedia article, and  in the context of R.) The fact that the first three are a perfect function of each other suggests that the only possible net advantage between them would be psychological.  On the other hand, the first three allow you to examine variables individually, which might be an advantage, but I have heard that the condition number method is considered best.  Is this true?  Best for what? Is the condition number a perfect function of the $R^2_j$'s? (I would think it would be.) Do people find that one of them is easiest to explain?  (I've never tried to explain these numbers outside of class, I just give a loose, qualitative description of multicollinearity.)


I have a table which contains rows like below  Month - Agent   - ResolveCount   1     - John    - 14     1     - John    - 12            2     - Smith   - 64               2     - Smith   - 23            My Model:  public int Month { get; set; } public Agent Agent { get; set; } public int ResolveCount { get; set; }   My Linq Query     List<ResolveMonthlyAgentReport> _result =         (from t in ConversationCollection.AsQueryable<Conversation>().AsEnumerable()         where t.CompanyId == _companyId && t.CreateDate.Year == _year && t.ResolvedDate != null && t.ResolvedAgentId != null             group t by new { t.CreateDate.Month, t.ResolvedAgentId }             into grp             orderby grp.Key.Month             select new ResolveMonthlyAgentReport             {             Agent = _agentList.Where(p => p.AgentId.ToString() == grp.Key.ResolvedAgentId).FirstOrDefault(),             Month = grp.Key.Month,             ResolveCount = grp.Count(t => t.ResolvedAgentId == grp.Key.ResolvedAgentId)              })         .Where(p => p.Agent != null)         .ToList();   Result:  Month - Agent   - ResolveCount   1     - John    - 14     1     - John    - 12            2     - Smith   - 64               2     - Smith   - 23       . .  This is the result I Want:  Agent    - 1.month - 2.month - x.month John     - 14      - 12 Smith    - 64      - 23   How should my linq query be?


Suppose I am talking about the composition $g \circ f$ (or more generally $f_n \circ \cdots \circ f_1$). Is there a generic term for the functions $f$ and $g$ (the functions $f_i$)?  "Compositand"?

What do you call the functions that make a composite function.  Example : $e^{\sin x} $ is made up of $\sin x$ in the argument of $e^x$  So what are $\sin x$ and $e^x$ called here in this context? Basic functions or something?   (Please don't tell me the former is trig and latter is exponential function, I know that, but that's not what I'm asking here, please try to understand)  Hope I made myself clear.


is written by using R and Latex. I am kind of curious to see the Latex and R codes behind the generation of this excellent report.  Can anyone suggest me some links directing to excellent book or report template? Thanks in advance.

If you were asked to show examples of beautifully typeset documents in TeX & friends, what would you suggest? Preferably documents available online (I'm aware I could go to a bookstore and find many such documents called 'books'). Extra bonus for documents whose LaTeX source is available.  This is not an idle question. Seeing great examples of any craft is both educational and inspiring, let alone explaining why we prefer TeX to Word or other text editors.  For instance, I like how Philipp Lehman's  looks. I don't know enough LaTeX to realize how much customization was done, but the ToC looks polished.  Your nominations, please ...


Security principles say that if someone else has physical access to a machine, then there is no security/privacy. I'm wondering about some examples of this in the case where I want to have a hosted Virtual Private Server (VPS) with full disk encryption. This is the kind of encryption that you are offered the option of setting up when installing Ubuntu, where every partition of yours (root, home, swap, etc) is in one big LUKS-encrypted volume.  Let's assume you don't set up automated entry of the LUKS password on this VPS (instead entering it manually through SSH upon each reboot, using a creative solution like ), so that someone else trying to reboot your system would have to know the password.  What are the security or privacy risks with such a solution? Could the VPS hosting companies employees or some middle man somehow get access to your data? Sure they can take a snapshot of your entire server at any time, but in order to boot it up they'd need the password, so how could they access what's inside the image?  Could they somehow snoop the SSH keys or encryption password?  Because they have root on the physical machine that hosts the VPS instances, how possible is it for them to get root on my VPS?  Can they log key strokes sent to the VPS over SSH? If SSH secures only the communication until it gets decrypted at the server, then could they see what you are actually sending to the server?  I'm assuming the damage would be possible when your server is running, not when it is turned off, is that correct? So when the server is running (after you've already entered the LUKS password), what could they do? If they take a snapshot of your system then, what can they do with it?  Just trying to understand what security/privacy I'm getting vs what I'm not by doing full disk encryption on a server that somebody else has physical access to (i.e. VPS).

I am curious if it is possible to have a VPS that has data on it that is not readable by the hosting provider, but is still usable on the VPS.  Obviously there are some things that you could do to prevent them from reading anything...   You could change all the passwords, including root. But then, they could still use some alternate boot to reset the password, or they could just mount the disk another way. So, you could encrypt the disk or at least some of the contents on the disk. But then it seems that if you decrypted the content, they could still "peer in" to see what you were doing at the console, because after all, the virtualization platform should allow this. And even if you could stop that, it seems they could just read the RAM of the VPS directly.   Of course, the VPS can store data on it and as long as the key is not on the VPS and the data is never decrypted there, then the host cannot get the data.  But it seems to me that if any point the data on the VPS is decrypted...for use on the VPS...then the hosting provider can get the data.  So, my two questions are:   Is this correct? Is it true that there is no way to 100% secure data on a VPS from a host from seeing it, while keeping it accessable by the VPS? If it is possible to make it 100% secure, then how? If it is not possible, then what is the closest you can get to hiding data from the web host?


I am an Australian citizen currently staying with friends in America on the VWP and I would like to stay a little longer. This will take me over the 90 days allowed and I'm wondering if I leave the country and go to Canada/cross a border, come back and stay with them for another 5-6 weeks.

I am currently holidaying in USA and have entered the states on a ESTA visa waiver, I booked my return ticket two weeks after the 90 day ESTA expires (my fault) naively thinking it wasn't a big deal, I went on a short visit (3 days music festival) to Quebec from Maine, upon re-entering the states the border protection official made it quite clear that I would have to return to Australia when the 90 days are up.  Now I am only on holidays and have no medical emergency, but I am having a great time sailing here, is there anything I can do to extend my stay (14 days) to the date of my pre purchased plane departure ?


I am using a matrix for node-positioning with a fixed node witdh. However, as some nodes contaning more than one line of text some nodes are shifted in y-axis and I don't know why or how to fix this. There seems to be enough space inside the node in y-axis. I also connected some nodes which result in an ugly picture.  MWE which shows this behaviour:  \documentclass[tikz]{standalone} \usetikzlibrary{matrix,fit} \begin{document} \begin{tikzpicture} \matrix (m) [% matrix of nodes,% nodes in empty cells,% nodes={rectangle, draw ,align=center,minimum height=1.5cm, text width=3.5cm,font=\scriptsize, inner sep= 0cm, outer sep= 0cm, fill=white},% column sep=.5cm,% row sep=.5cm,% anchor=center ]% { &{Two\\line\\breaks}&{One line}&& \\ {One\\linebreak}&&&& \\ &&&{Two\\line\\break}& \\ &&One&& \\ }; \foreach \row/\rownext in {1/2,2/3,3/4,4/4} {     \foreach \col/\colnext in {1/2,2/3,3/4,4/5,5/5}     {         \draw(m-\row-\col) to (m-\row-\colnext);         \draw(m-\row-\col) to (m-\rownext-\col);     } } \end{tikzpicture} \end{document}   Picture or result:

I wanted to draw an almost empty matrix of nodes with TikZ similar to the left most one below. All nodes would have same size (through minimum width and minimum height) and no separation between columns and rows. But when I include a text which needs two lines I obtain the central matrix and, if the text just needs one line the right most one. I don't know what's wrong. Do you? I'm using CVS version of TikZ.  \documentclass[tikz,border=2mm]{standalone} \usetikzlibrary{matrix}  \tikzset{ proces/.style={draw, minimum height=15mm, minimum width=2cm, outer sep=0pt, text width=1.5cm, align=center} }  \begin{document} \begin{tikzpicture}  \matrix (A) [matrix of nodes,nodes=proces,nodes in empty cells] {  & \\  & \\ };  \begin{scope}[xshift=4.5cm] \matrix (A) [matrix of nodes,nodes=proces,nodes in empty cells] {  & OOO OOO \\  & \\ }; \end{scope}  \begin{scope}[xshift=9cm] \matrix (B) [matrix of nodes,nodes=proces,nodes in empty cells] {  & A \\  & \\ }; \end{scope}  \end{tikzpicture} \end{document}


I'm fairly new to using R for spatial work so bear with me. I have found questions similar to this but nothing that answers this question specifically enough for me to implement it.  I have point data in a spatialPointDataFrame and polygon data in a SpatialPolygons class. I am trying to do a spatial join where the polygons are given the sum of one of the attributes of all the points that fall within the polygon's boundary. This seemed simple enough, but I can't find documentation on how to do it.  I have tried using sp:over for this and it doesn't seem to work.  I have  and it works with one polygon set but not the other. Basically the difference is one polygon set is counties and one is ZCTA's. Other than that they should be the same. But, the code works fine for counties but gives   Error in [[<-.data.frame(*tmp*`, name, value = c(122221L, 1465574L,  :    replacement has 263 rows, data has 408    anytime I try to use ZCTA's or a census tracts polygon set. I thought that it may be broken geometry problem so I ran all polygons sets through Repair geometry in arcmap to hopefully eliminate that potential problem.  srdfcounties = SpatialPolygonsDataFrame( centTrue,                     data = data.frame(row.names=paste("0", (1:length(centTrue))),                                                            PIDS=1:length(centTrue)))  srdfZCTA =  SpatialPolygonsDataFrame(centFalse,                    data = data.frame(row.names=paste("0", (1:length(centFalse))),                                                            PIDS=1:length(centFalse)))  tail(srdfZCTA@data) head(srdfcounties@data) tail(busiPTS@data) plot(srdfcounties)  points(busiPTS, pch=20)  ptsZCTA.poly <- point.in.poly(busiPTS, srdfZCTA) ptsCounty.poly <- point.in.poly(busiPTS, srdfcounties)  srdfcounties$sales_vol <- tapply(ptsCounty.poly@data$SALES_VOL,                                        ptsCounty.poly@data$PIDS, FUN=sum) spplot(srdfcounties, zcol='sales_vol')  srdfZCTA$sales_vol <- tapply(pts.poly@data$SALES_VOL, pts.poly@data$PIDS, FUN=sum) spplot(srdfZCTA, zcol='sales_vol')   EDIT2:  I figured it out. Just to provide closure and insight for anyone else who may have this same problem I will post the working code soon.

I am trying to perform a spatial join between point data and polygon data.  I have data that indicate the spatial coordinates of an event in my csv file A and have another file, shapefile B, that contains the boundaries of an area as polygons.  head(A)   month   longitude latitude lsoa_code                   crime_type 1 2014-09 -1.550626 53.59740 E01007359        Anti-social behaviour 2 2014-09 -1.550626 53.59740 E01007359                 Public order 3 2014-09 -1.865236 53.93678 E01010646        Anti-social behaviour  head(B@data)   code      name                                  altname 0 E05004934 Longfield, New Barn and Southfleet    <NA> 1 E05000448                   Lewisham Central    <NA> 2 E05003149                            Hawcoat    <NA>   I want to join the crime data A to my shapefile B to map the crime events that happen in my area A. Unfortunately I cannot perform an attribute join based code as the code in A refers to different units than the code in B.  I've read a number of tutorials and posts but could not find an answer. I tried:  joined = over(A, B)   and overlay, but did not accomplish what I wanted.  Is there a way to do this join directly or would an intermediate transformation from A to another format be needed?  Conceptually I want to select those points of A that fall into the code areas of B (similar to "join based on spatial location in ArcGIS").  Did someone have this issue and solved it?


I am trying to create a clubs symbol for some cards I am designing, but I do not know how to combine closed shapes with open paths. I know how to use pathfinder to combine closed shapes but that does not work for this.

I have several circles that are set at type none color and 0.01 black stroke. They're all currently in paths (except two I made into compound paths). I want to know how to remove the stroke from the areas where the shapes overlap. Here is an image:     I want it to look like what's on the right.  What I've done so far: I can get somewhere if I select the two hollow circles which are currently 4 separate paths and make them into a compound path on exclude, but it still looks like the image on the left. I tried removing the anchors, but that does something completely different since those two circles are then broken up into a total of 7 pieces at the intersection points.


I am Creating a forget Password page when user click on forget password and enters his/her Email address a link is sent to his/her Email my code works fine but the email goes in Spam/junk folder.  can any one help me why this is happening??   Here is my code  <?php $remail = mysqli_real_escape_string($con,$_REQUEST['name']); if (!filter_var($remail, FILTER_VALIDATE_EMAIL)) // Validate email address { $message =  "Invalid email address please type a valid email!!"; } else { $query = "SELECT id FROM users where email='".$remail."'"; $r = mysqli_query($con,$query); $Results = mysqli_fetch_array($r); if(count($Results)>=1) { $encrypt = $Results['id']; $encrypt=md5(sha1(md5($encrypt))); $message = "Your password reset link send to your e-mail address."; $to=$remail; $subject="Forget Password"; $from = 'miniface'; $body='Hi,

Your Email is '.$_REQUEST['name'].'

Click here to reset your password http://link.com'.$encrypt.'&action=reset

--
miniface.com
Solve your problems.'; $headers = "From: " . strip_tags($from) . "\r\n"; $headers .= "Reply-To: ". strip_tags($from) . "\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; mail($to,$subject,$body,$headers); else { $message = "Account not found please signup!"; } }  echo $message; ?>

This is a tricky one and I've always relied on techniques, such as permission-based emails (i.e. only sending to people you have permission to send to) and not using blatantly spamish terminology.  Of late, some of the emails I send out programmatically have started being shuffled into people's spam folder automatically and I'm wondering what I can do about it.  This is despite the fact that these particular emails are not ones that humans would mark as spam, specifically, they are emails that contain license keys that people have paid good money for, so I don't think they're going to consider them spam  I figure this is a big topic in which I am essentially an ignorant simpleton.


For example: haste doubles your speed, boots of speed double your speed, and the Dash action doubles your speed.     Intuitively, it should be 2*2*2 = 8 times movement speed.  However, the Dash action says "after modifiers" which implies something more like (1 [base] + 1 [haste] +1 [boots of speed]) * 2 [Dash] = 6 times movement speed. Unless it means modifiers to your base movement speed, which would be (1 [base] + 1 [haste] + 1 [boots of speed] + 1 [Dash]) = 4 times movement speed.  I know somewhere in the rules it says that for multiple applications of the same spell, only the strongest one applies, and that different spells with the same effect add together.     One of the sources here is an action, and another is a magic item.  (Do magic items get treated like spells?)    The above is an example.  The base question is    Do I add or multiply identical effects that multiply values?    I don't care what that value is (ex. speed, damage, money), or what it is from (spell, item, class feature, action, race ability); I'm looking for general rules for how to resolve stacking similar effects that don't give flat bonuses.

Are there explicit rules for combining numerical bonuses in 5th edition, or is it just left implicitly to "common sense"?  There are special cases (e.g. damage resistance and vulnerability, choice of base AC formulae, identical spell/item effects) which are well-defined, but I can't find a general rule. Additive and multiplicative bonuses Example: Longstrider and Haste for a creature with 30' base walking speed.  Longstrider: You touch a creature. The target’s speed increases by 10 feet until the spell ends. Haste: Choose a willing creature that you can see within range. Until the spell ends, the target’s speed is doubled [...]  Possible interpretations:  Always multiply first: (30' × 2) + 10' = 70' Always add first: (30' + 10') × 2 = 80' Do it in the order the spells were cast Player chooses GM chooses  Multiplicative bonuses with one another Example: Haste and Boots of Speed for a creature with 30' base walking speed.  Boots of Speed: While you wear these boots, you can use a bonus action and click the boots' heels together. If you do, the boots double your walking speed [...]  Possible interpretations:  Doubling the second time just idempotently repeats the fact that it's been doubled: max(30' × 2, 30' × 2) = 60' Doubling the second time means your speed is quadrupled: 30' × 2 × 2 = 120' Doubling the second time adds another 100% of your base movement, resulting in an overall tripling: 30' × (100% + 100% + 100%) = 90'.  This was the rule in 3rd edition.


I shared a link to a question with a couple of co-workers.  A while later I got a badge for being an "announcer".  This caused me to look up the badge and I found there is also a badge for being a "booster" if it gets to 300 unique IP address views in 4 days.    Is there a quick way to see how many visits one of my links generate anytime I pass it around?

When I share a question, say to my facebook or twitter, it gets tracked by the site. (I know it must, otherwise you wouldn't be able to provide badges for successful shares!)  Would it be possible to get some feedback on those shares other than badges? If I know what shares were effective and what ones were largely ignored, it will give me better feedback to share most effectively. If I've put three questions on my Facebook about [topic-X] and they all only get 3 or 4 hits, while the three questions about [topic-Y] all got like 20 or 30 hits, I know that I should be more inclined to share [topic-Y]. But unless I get a badge for it, I don't know anything about it. Furthermore, those badges are only available once, so the long-term feedback provided isn't much.  I've only just started sharing posts, but I'm quite interested in getting this feedback so that I know how effective it is. I'm thinking it could be a tab in the userpage or something like that.


I've learned that $$1/0$$ is postive and negative infinity, but if I ask wolfram mathematica to calculate $$1/0$$ it gives me: 'complex infinity' but how can we proof that that is true?

My brother was teaching me the basics of mathematics and we had some confusion about the positive and negative behavior of Zero. After reading a few post on this we came to know that it depends on the context of its use.  Why do we take 1/0 as positive infinity rather than negative infinity (we come close to zero from negative axis)?


The words "quadcopter" and "novocaine" have unusual etymologies. "Quadcopter" comes from a combination of quad for "four" and copter from "helicopter," and "novocaine" comes from novo for "new" and caine from "cocaine."  What's odd here is that both "copter" and "caine" break apart the original words at a spot that isn't the natural split in their own etymologies. "Helicopter" comes from helico and pter, and "cocaine" comes from coca and ine. The splits of "copter" and "caine" make a ton of sense given that they're at syllable boundaries and the new words don't seem at all unusual.  Is there a term for new words like quadcopter and novocaine whose origin involves cleaving an existing word at a spot that doesn't match their etymologically?

Is there a term for words like Snowmageddon, Nipplegate and even cheeseburger?  I know they're portmanteaus (or portmanteaux), but they seem to belong to a special class of portmanteau.  In the title examples, Armageddon, Watergate and hamburger seem to be the "mother" terms respectively (more so than snow, nipple, and cheese), and the derived terms Snowmageddon, Nipplegate and cheeseburger seem to be child terms in the sense that each clearly alludes to its mother term and could conceivably have sibling terms like Floodmageddon, Lewinskygate, and chiliburger.  Actually, the more I thought about examples of this phenomenon, the more I came up with examples that fit the description but weren't strictly portmanteaus. One might be "Rat Pack", which gets referenced by "Brat Pack" and "Frat Pack". Idk, maybe I'm getting too inclusive.  Is anyone familiar with a term for this or has seen a list of them? I love lists.


In Windows, all installed applications go into the Program Files/Program Files(x86) of the hard-drive in which the application is installed on.  What is the equivalent in Linux or Ubuntu specifically?  When I install a program using APT, flatpacks, snaps or using manual methods such as .deb among others - where should I be installing these? Or do these methods automatically follow a convention?  Additional small question: Does the same convention apply to servers?

Which folder in Ubuntu is equivalent to C:\Program Files like on windows? Where are all programs installed?  when i type   apt-get install leafpad   or  sudo apt-get install sublime-text-installer   Where do they go??? Which folder?


I have This code For Example and I want to print the result once time number = [1, 2, 3, 4, 5] for i in number:     print(f'The Number Is => {i}')   EX: The Number Is => 0 Then 0 become 1 and 2 etc..

I am new to python and am writing some scripts to automate downloading files from FTP servers, etc. I want to show the progress of the download, but I want it to stay in the same position, such as:  output:     Downloading File FooFile.txt [47%]   I'm trying to avoid something like this:       Downloading File FooFile.txt [47%]      Downloading File FooFile.txt [48%]      Downloading File FooFile.txt [49%]   How should I go about doing this?    Duplicate:


I want to call a non static method in Main, but thats against coding rules, so now i cant do the things i want. How can i fix this?  public static void main(String[] args)     {         Scanner input = new Scanner(System.in);         System.out.print("Enter infix expression: ");         String userInput = input.next();         System.out.println("Summary");         System.out.println("-------");         System.out.println("Infix: " + userInput);         System.out.println("Postfix: " + infixToPostfix(userInput));         System.out.println("Result: " + evalPostfix(infixToPostfix(userInput)));     }   I'm getting the error:  non static method infixToPostfix(java.lang.string) cannot be refranced from a static context   and   non static method evalPostfix(java.lang.string) cannot be refranced from a static context   I need to use them here to get the correct answers printed.

To be specific, I was trying this code:  package hello;  public class Hello {      Clock clock = new Clock();      public static void main(String args[]) {         clock.sayTime();     } }   But it gave the error      Cannot access non-static field in static method main   So I changed the declaration of clock to this:  static Clock clock = new Clock();   And it worked. What does it mean to put that keyword before the declaration? What exactly will it do and/or restrict in terms of what can be done to that object?


There is this theorem that states: If $\alpha$ is an ordinal, then there is a limit ordinal $\mu$ with $\alpha < \mu$. The definition of limit ordinal is just "an ordinal which is a limit", but a better reformulation of this definition is: Let $\lambda$ be a non-zero ordinal. $\lambda$ is a limit ordinal if and only if for all ordinal $\alpha$, if $\alpha<\lambda$ then $\alpha^+<\lambda$. ($\alpha^+$ is the successor ordinal of $\alpha$) I don't understand how that theorem makes sense, the book I'm reading gives the proof as an exercise (which I can't do) so I can't even see why it's true. If for example I have the ordinal $1=\{\emptyset\}$ what is a limit ordinal for this? Is it $\omega$ for example (or $2\omega$, $3\omega$ etc)? Is this what it means?

I'd like to show that the class of all limit ordinals, LIM, is cofinal in the class of all ordinals ON.  I thought that I could do this by contradiction and assume that it wasn't cofinal in ON. Then there is an $\alpha \in$ ON such that for all $\beta \in $ LIM: $\beta < \alpha$, i.e. $\beta \in \alpha$ and hence LIM $\subset \alpha$.  This means that LIM is a set so we can consider $\bigcup$ LIM. Then we have $\beta < \bigcup$ LIM for all $\beta \in$ LIM by definition of $\bigcup$ LIM. So LIM $\subseteq \bigcup$ LIM.   $\bigcup$ LIM is either a limit or a successor ordinal.  If it is a limit ordinal then $\bigcup$ LIM $\in$ LIM and by transitivity of ON, $\bigcup$ LIM $\subseteq$ LIM, so $LIM = \bigcup$ LIM in this case which would mean that $\bigcup$ LIM $\in$ LIM $= \bigcup$ LIM which would be a contradiction because sets cannot contain themselves. Hence $\bigcup$ LIM cannot be a limit ordinal.  If $\bigcup$ LIM is a successor ordinal then $\bigcup$ LIM = $\beta \cup \{ \beta \}$ for some $\beta \in $ ON.  Now I'm not sure how to proceed from here. I'm also not sure about whether I'm on the right track with this proof because I think there should be a shorter way  to prove this.  Thanks for your help.


What exactly does duty free mean at the various airports? Does it mean that the items are cheaper because they have no tax/duty applied on it OR does it mean the item would "not count" for the free allowance amount at our home country?  Just to add, I checked the prices of various items at Doha airport duty free shops (for iPhones, perfumes, etc) but did not find much price difference from what is available in India? So wanted to understand.

I guess this one will be hard to answer because prices vary from airport to airport, but...every time I travel friends tell me not to forget to "bring something from the free shop".  On a general basis it would be advisable to wait for the free shop to buy things you are willing to buy?   Is the price difference really worth the risk of not finding what you are looking for at the airport? or is it just a marketing stunt to get more sales?


I'm understanding synchronization and struck with few doubts after going through different blogs. As per my understanding, Intrinsic lock is acquired by a thread when accessing a synchronized method and other threads need to wait until the first one completes execution giving up the lock for the second thread to execute. But what if both the threads try to access the synchronized blocks from the different object? will that be still called synchronization or not? class A{        public static synchronized void m1() throws InterruptedException{             System.out.println(Thread.currentThread().getName());             Thread.sleep(1000);             System.out.println("Completed Execution by "+Thread.currentThread().getName());           }                public static void main(String j[]){                                          new Thread(()->{                  try{                    new A().m1();  // New object calling m1()                  }catch(InterruptedException ie){}              }).start();                         new Thread(()->{                  try{                    new A().m1();     // New object calling m1()                  }catch(InterruptedException ie){}              }).start();                      } }  [![Synchronization when separte objects are invoked][1]][1] Above output When the synchronization is changed to static like  public static synchronized void m1() throws InterruptedException{  //static method         System.out.println(Thread.currentThread().getName());         Thread.sleep(1000);         System.out.println("Completed Execution by "+Thread.currentThread().getName());       }  [![Static Synchronization output][2]][2] Above output When the static is removed only with synchronized left making it appear as not synchronized from the console output. [1]:  [2]:  So my query is when the method is declared static synchronized and when the different threads calling that method gets the lock from which object ? As when synchronized method is called from different new instances of object need not be called synchronized and the lock is attained on which object in this case?

The Java documentation says:      It is not possible for two invocations of synchronized methods on the   same object to interleave.   What does this mean for a static method?  Since a static method has no associated object, will the synchronized keyword lock on the class, instead of the object?


A few minutes ago, an answer appeared to one of my questions, blatantly not an answer, but somehow it wasn't detected and filtered by SE itself. Also, the user has been posting this on other questions too. Is this a bug in the spam filters or not meant to be detected?  Screenshot, since it would probably be deleted soon

Spam gets fairly heavily punished - 100 reputation penalty, if I recall correctly, and the content itself gets hidden in the revision history.  Now if we just have some rubbish:     dfajiojaifojadiofjadhigaowkokaomdiovnuiyhioqejgioqejgio   I'm not talking about someone posting a question or comment as an answer (i.e. possibly just not knowing the rules or being frustrated with not having the required privileges), or someone making some really horrible attempt at answering the question, I'm talking about an answer that clearly shows absolutely no observation of any content on the page.  This, in my opinion, causes a similar amount of harm to the site - I'm inclined to say the fact that someone posts spam isn't as important as the fact that they're posting something that needs to be deleted, since we're likely going to delete it pretty quickly, and they're (likely) behaving maliciously, or am I wrong?  Why don't we treat this equally harshly, or why do we treat spam as harshly as we do?    Side notes:  I'm sure I've seen a few times where users get punished for posting spam when their link is likely actually relevant to the question and useful (should I flag these? They are still link-only answers, so they shouldn't really come back, and often I'm just not sure enough). While false positives are bad, it seems worse that we're treating worse behaviour better.  I'm assuming that's not what "abusive" in this reason is referring to: (I'm also not sure, off the top of my head, how this one gets treated)     It is offensive, abusive, or hate speech


I'm currently new to Ubuntu programming, and learning the basic's of it. I've been following this tutorial as some of you might know in previous questions asked about it I've made before.  Now, I've created a Web browser using 'quickly'. It's a simple program witch helps create programs on Ubuntu.  In the video It showed how to 'refresh' the page witch is basically this code:   def on_refreshbutton_clicked(self, widget):     self.webview.reload()   Now, my question is to make the page go back from a previous page is it this code:  def on_refreshbutton_clicked(self, widget):     self.webview.back()   I used 'refreshbutton' as a example, but if you would like to view the full source of the  the code just ask for it and I'll provide you with a link witch you can view the source.

I have downloaded a set of icons to use for my web browser that I'm creating and would like to use. I know how to add the icons, but I only know the code for the refresh button. My question is what is the code for the back and forward arrows? It would also be so helpful if I would know the code for the home button and how to make the web browser manage downloads.  I'm using WebkitGtk as the web browser view.  The images are found


I am using regex to replace all url in string to url.  For that I am using   if(!String.linkify) {     String.prototype.linkify = function() {          // http://, https://, ftp://         var urlPattern = /\b(?:https?|ftp):\/\/[a-z0-9-+&@#\/%?=~_|!:,.;]*[a-z0-9-+&@#\/%=~_|]/gim;          // www. sans http:// or https://         var pseudoUrlPattern = /(^|[^\/])(www\.[\S]+(\b|$))/gim;          // Email addresses         var emailAddressPattern = /[\w.]+@[a-zA-Z_-]+?(?:\.[a-zA-Z]{2,6})+/gim;          return this             .replace(urlPattern, '$&')             .replace(pseudoUrlPattern, '$1$2')             .replace(emailAddressPattern, '$&');     }; }   and   mystr.linkify();   it's from here ,   it works good unless I have img tag in my string , it replaces    to <img src="imgurl"  Which change should I do to my regex to not replace urls which are part of some tag attribute ?  Any help would be great.

I am using the function below to match URLs inside a given text and replace them for HTML links. The regular expression is working great, but currently I am only replacing the first match.  How I can replace all the URL? I guess I should be using the exec command, but I did not really figure how to do it.  function replaceURLWithHTMLLinks(text) {     var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/i;     return text.replace(exp,"$1");  }


I already looked in Event Viewer. It was nowhere to be found. Maybe I'm not looking hard enough, lol.

I recently ran the chkdsk in Windows 7 on my local C: drive. After chkdsk completed, the results flashed on the screen for a few seconds and then the computer booted up. I wasn't able to read the results in time. Are the results saved to a text file somewhere?


exit doesn't terminate the script when error is called..  output  Error: Could not resolve localhost after exit   script  #!/bin/sh  resolve_ip (){     if [ -z "$1" ]; then         host="localhost"         ip=$(dig +short myip.opendns.com @resolver1.opendns.com)     else         host="$1"         ip=$(dig +short $1)     fi      if [ -z "$ip" ]; then         error "Could not resolve $host"     fi      echo "$ip" }  error (){     (>&2 echo "Error: $1")     exit 1 }  master_host='google.com'  if [ "$(resolve_ip)" = "$(resolve_ip $master_host)" ]; then     error "some error" fi  echo "after exit" exit

I have a script, that does not exit when I want it to.  An example script with the same error is:  #!/bin/bash  function bla() {     return 1 }  bla || ( echo '1' ; exit 1 )  echo '2'   I would assume to see the output:  :~$ ./test.sh 1 :~$   But I actually see:  :~$ ./test.sh 1 2 :~$   Does the () command chaining somehow create a scope? What is exit exiting out of, if not the script?


SELECT * FROM or_mail GROUP BY campaign_id HAVING date_time = MAX(date_time);  SELECT campaign_id, date_time FROM or_mail GROUP BY campaign_id HAVING date_time = MAX(date_time);   The 1st query returns 13 records. The 2nd returns 35.  Why are records missing from the first query!? Why should what I'm selecting matter at all?

Table:   UserId, Value, Date.   I want to get the UserId, Value for the max(Date) for each UserId. That is, the Value for each UserId that has the latest date. Is there a way to do this simply in SQL? (Preferably Oracle)  Update: Apologies for any ambiguity: I need to get ALL the UserIds. But for each UserId, only that row where that user has the latest date.


I would like to design with LaTeX a calendar that would look like this:  I would like to have some advise about how to draw the frames and how to put some text (or tabular formatted text) in it? I am not a TikZ user but I am ready to learn a little bit of it (if it is the best solution). As about how to compute the dates, etc. it is not a problem at all since I plan to maybe use Python to generate the LaTeX code.  PS: Since I might use Python to generate the code, I don't think I would need any already existing library that manages calendar. So, this question is more about how to draw a canvas as in the picture above.  My first attempt I did \documentclass[landscape]{article} \usepackage[table,xcdraw]{xcolor} \usepackage{amsfonts} \usepackage{tabularx} \usepackage{wasysym}  %%%%%%%%%% % Layout % %%%%%%%%%% \def\myHMargin{1cm} \def\myVMargin{1cm} \usepackage[hmargin={\myHMargin,\myHMargin},             vmargin={\myVMargin,\myVMargin}]{geometry}    \def \x {\small \begin{tabular}{@{} >{\centering\let\newline\\ \arraybackslash\hspace{1pt}}m{3.5cm} <{\hspace*{1mm}} } \cellcolor[HTML]{C0C0C0}{}\\[-3mm] {\cellcolor[HTML]{C0C0C0}{\color[HTML]{000000} \footnotesize $\, \mathbf{{100}}$ \hfill {\footnotesize25 juin}}} \\[1.5mm] \hfill $\times \hspace{-1pt}\approx\hspace{-1pt}\checked$ \\                                                           \dotfill $\square$\,$\square$\,$\square$ \\ \dotfill $\square$\,$\square$\,$\square$ \\ \dotfill $\square$\,$\square$\,$\square$ \\ \dotfill $\square$\,$\square$\,$\square$ \\[1mm] \end{tabular}}  \begin{document}  \setlength{\tabcolsep}{0pt} \begin{tabular}{|c|c|c|c|c|c|c|} \hline lundi & mardi & mercredi & jeudi & vendredi & samedi & dimanche \\ \hline \\[3mm] \hline \x & \x & \x& \x & \x & \x& \x\\ \hline \x & \x & \x& \x & \x & \x& \x\\ \hline \x & \x & \x& \x & \x & \x& \x\\ \hline \end{tabular}   \end{document}  I'm pretty satisfied with the result but there is a still a problem with rule (see picture below). Feel free to make my coder better.

I am trying to build a custom calendar using some features of TikZ. My starting point was a piece of code available in a comment of texample.net.   I would like to know if it is possible to mark some days with symbols different than circles. If you compile the code below, you will see that circles can be easily inserted in the calendar. Now I would like to know if someone could show me how to insert diamonds or triangles or squares and if possible filled with some color.  Thank you in advance for your help.  \documentclass[12pt]{article} \usepackage{lscape,tikz} \usepackage[brazil]{babel} \usepackage[latin1]{inputenc} \usepackage[margin=1in, paperwidth=15.8in, paperheight=8.5in]{geometry} \usepackage{geometry} \usepackage{amsmath,color,graphicx} \usepackage{amsfonts} \usepackage{amssymb} \definecolor{Red}{cmyk}{0,1,1,0} \def\red{\color{Red}} \definecolor{Blue}{cmyk}{1,1,0,0} \def\blue{\color{Blue}}  %%in preamble: % \Huge \usetikzlibrary{arrows,shapes} \usetikzlibrary{positioning,calendar,er} \usetikzlibrary{decorations.markings} \usetikzlibrary{shapes.geometric}  \newcommand{\calrow}[1]{\node[anchor=base east](seg){S}; \node[base right=of seg](ter){T}; \node[base right=of ter](qua){Q}; \node[base right=of qua](qui){Q}; \node[base right=of qui](sex){\ \!S}; \node[base right=of sex](sab){\ \!S}; \node[base right=of sab](dom){D}; \node[black,above=of qui]{\textbf{#1}};} \newcommand{\calperiod}[1]{\calendar[dates=\the\year-#1-01 to \the\year-#1-last] if(Sunday) [red] \holidays;} \newcommand{\holidays}{% holidays in Italy if (equals=01-15) {\draw (-0.348,0.135) circle (9.0pt);}% if (equals=01-06) [black!50]% if (equals=04-04) [black!50]% if (equals=04-05) [black!50]% if (equals=04-25) [black!50]% if (equals=05-01) [black!50]% if (equals=05-01) [black!50]% if (equals=06-02) {\draw (-0.25,0.135) circle (9.0pt);}% if (equals=08-15) [black!50]% if (equals=11-01) [black!50]% if (equals=12-08) [black!50]% if (equals=12-25) [black!50]% if (equals=12-26) [black!50]% } \colorlet{darkgreen}{green!50!black}   \begin{document}  \begin{tikzpicture} [every calendar/.style={week list}] %\node[star,draw,minimum size=.4cm,star point ratio=1.0,thick] at (calendar-\the\year-08-29){}; \sffamily \matrix[% row 1/.style={black,node distance=.3ex},% row 3/.style={black,node distance=.3ex}, column sep=1ex,% draw=black,thick,rounded corners=30pt,% postaction={decorate,decoration={markings,mark=at position 0.51 with {\node[fill=white,text=black,font={\bfseries\Large}] (year) {\the\year};}}} % year on frame: decorations.markings library ]{% % first row: week day and month \calrow{Janeiro} & \calrow{Fevereiro} & \calrow{Março} & \calrow{Abril} & \calrow{Maio} & \calrow{Junho} \\ % second row: calendar \calperiod{01} & \calperiod{02} & \calperiod{03} & \calperiod{04} & \calperiod{05} & \calperiod{06} \\[0.4cm] % third row: week day and month \calrow{Julho} & \calrow{Agosto} & \calrow{Setembro} & \calrow{Outubro} & \calrow{Novembro} & \calrow{Dezembro} \\ % forth row: calendar \calperiod{07} & \calperiod{08} & \calperiod{09} & \calperiod{10} & \calperiod{11} & \calperiod{12} \\ }; \end{tikzpicture} \end{document}    Edition.  To clean up the code, I remove the repetitions  pointed out by Ulrike Fischer as well some useless comments.


How would you solve the following limit?  $$\lim\limits_{n\to \infty}\left(\left(1-\frac{1}{2^2}\right)\left(1-\frac{1}{3^2}\right)\cdots\left(1-\frac{1}{n^2}\right)\right)$$  I think that the limit is $0$, because $\frac{1}{n^2}$, and also as $n$ increases the value of $1-\frac{1}{n^2}$ decreases, so the limit is zero.  But how can I show this mathematically, or is the only way I can show this? Thanks in advance for your reply.

Evaluate the infinite product $$\lim_{ n\rightarrow\infty }\prod_{k=2}^{n}\left ( 1-\frac{1}{k^2} \right ).$$  I can't see anything in this limit , so help me please.


I am reading the book Introduction to Electrodynamics by David J Griffiths. Given a magnetic field $\bar{B}$ and volume current density $ \bar{J}$ by Ampere's law we have $$ \nabla \times \bar B = \mu_0 \bar J $$ It seems Maxwell modified it using continuity equation and Gauss law in the following way $$ \nabla . \bar J = -\frac{\partial \rho}{\partial t} = -\frac{\partial}{\partial t} (\epsilon_0 \nabla. \bar E) = -\nabla . \left ( \epsilon_0 \frac{\partial \bar E}{\partial t}\right) $$ and by which we have $$ \nabla . \left( \mu_0\bar J + \mu_0\epsilon_0 \frac{\partial \bar E}{\partial t}  \right) = 0 = \nabla . ( \nabla \times \bar B) $$ Till here everything is perfectly fine and then the author concludes that $$ \nabla \times \bar B = \mu_0\bar J + \mu_0\epsilon_0 \frac{\partial \bar E}{\partial t} $$ But atleast I know that $ \nabla . F = \nabla . G$ doesn't imply that $F = G$ but what is the reason here to conclude like this? Is it because of any further mathematical analysis or just the above equation fits into experimental data? Is it reasonable to avoid mathematical rigor in such case (if it is the case)? Edit:  question was suggested but it does not really answer the question. Moreover the answer is not accepted. (If possible) I  want some intuitive explanation also if the concepts (such as relativity) are really sophisticated to understand this.

It is well-known that Maxwell added the displacement current term to Ampère's Law to make electrodynamics whole. As it is taught in the modern context (I am currently reading Griffiths's text, Introduction to Electrodynamics), we can motivate the addition of the displacement current term by noting that its addition to Maxwell's equations means that Maxwell's equations imply the continuity equation. However, as Griffiths remarks, this nicety (the fact that the continuity equation falls out of Maxwell's equations) is not incontrovertible evidence that the addition of the specific form of the displacement current term is necessarily correct. Indeed, he says that there "might, after all, be other ways to doctor up Ampère's Law". My question is, therefore, twofold: (1) Is it true, as Griffiths says, that there are conceivably other ways to "fix" Ampere's Law? That is, can we let $$\nabla \times \mathbf{B}=\mu_{0}\mathbf{J}+\mathbf{v}$$ for some arbitrary vector function $\mathbf{v}$ and still develop a consistent theory? I'm not sure how to define "a consistent theory" here but, perhaps, we can roughly say that a consistent theory would mean no contradictions with the other three Maxwell equations (mathematically-speaking). At least to me, I would suspect that the answer is "yes" since the problem (at least as it is understood in the more modern language of vector calculus, as compared to what Maxwell was doing) with Ampere's Law without Maxwell's correction is that the divergence of the right-hand side does not in general vanish, as it must. Thus we would be requiring that (using continuity and Gauss's Law) $$\nabla \cdot \mathbf{v}=-\nabla \cdot(\mu_{0}\mathbf{J})=\mu_{0}\frac{\partial\rho}{\partial t}=\mu_{0}\nabla \cdot(\epsilon_{0}\frac{\partial\mathbf{E}}{\partial t})$$ but, of course, the divergence of a vector function does not fully specify that vector function. However, assuming we choose $\mathbf{v}$ to satisfy the above, and putting aside experimental verification for the moment, would choosing something else for $\mathbf{v}$ break the structure of Maxwell's theory somewhere else? (2) Moving now to consider experimental verification, Griffiths says that Hertz's discovery of EM waves confirmed Maxwell's choice for the displacement current term. I understand that Maxwell's equations imply wave solutions that were observed experimentally, but perhaps someone can (at a high-level, even) explain why any other choice of the displacement current term would have yielded inconsistencies with experiment (assuming that my attempt at answering (1) above was correct for, if there are mathematical inconsistencies, then we are done).


I'm trying to determine the limit of the sum  $\lim_{n\to\infty} \sum\limits_{k=1}^n k^2/2^k$  Doing the convergence test shows the sum converges $\lim_{n\to\infty} \frac{(k+1)^2/2^{k+1}}{k^2/2^k} = 1/2$ so there must be a solution, but the normal tricks used to solve geometric series or telescoping series don't seem to work.

I'd like to find out why  \begin{align} \sum_{n=0}^{\infty} \frac{n^2}{2^n} = 6 \end{align}  I tried to rewrite it into a geometric series  \begin{align} \sum_{n=0}^{\infty} \frac{n^2}{2^n} = \sum_{n=0}^{\infty} \Big(\frac{1}{2}\Big)^nn^2 \end{align}  But I don't know what to do with the $n^2$.


I have a Fibonacci recursion function:  int efib (int num) {          if (num == 0){             return 0;     }else if (num == 1){          return 1;     }else if (num == -1){          return -1;     }else if (num > 0){           return efib(num - 1) +  efib (num - 2);     }else{             return efib (num + 1) + efib(num + 2);     } }   I'm trying to find the exact element num where the int value overflows, is it possible to obtain the current recursion value to compare it to the maximum value an int data type can hold?  I know that the max value an int can hold that is included in the Fibonacci sequence is 1836311903.

I was writing a program in C++ to find all solutions of ab = c, where a, b and c together use all the digits 0-9 exactly once. The program looped over values of a and b, and it ran a digit-counting routine each time on a, b and ab to check if the digits condition was satisfied.  However, spurious solutions can be generated when ab overflows the integer limit. I ended up checking for this using code like:  unsigned long b, c, c_test; ... c_test=c*b;         // Possible overflow if (c_test/b != c) {/* There has been an overflow*/} else c=c_test;      // No overflow   Is there a better way of testing for overflow? I know that some chips have an internal flag that is set when overflow occurs, but I've never seen it accessed through C or C++.    Beware that signed int overflow is undefined behaviour in C and C++, and thus you have to detect it without actually causing it. For signed int overflow before addition, see .


I understand that $y_{i}$s are normally distributed because we assume that the residual is normally distributed which seems a decent assumption.   Question: Does that mean $Y$ is also normally distributed? In other words, if I plot a histogram of $Y$ values will they have a unimodal Gaussian shape?   Confusion: We generally apply linear regression on problems that involve predicting a continuous variable. Given the wide applicability of linear regression, I am finding it little difficult to believe that $Y$ tend to be normally distributed for all of them.   I believe that in case of Logistic Regression, I can say that $Y$ will be Bernoulli distributed, and $y_{i}$s will have the same distribution. In other words, I can say that $Y$ has a Bernoulli distribution with $P(y_{i}=1) = \theta$

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?


This is a really simple question, but even after reading about wildcards/regex, I can't seem to grasp entirely what the differences between these commands are:  grep . test.txt   this one will look for lines containing any character in test.txt  grep \. test.txt   this one also apparently does the exact same thing, even though I assumed it shouldn't, since it would be escaped and return only those lines containing an actual '.'  grep ? test.txt   since ? is a special character, I guess it would be interpreted as a wildcard, but since grep doesn't deal with wildcards, it's not going to output anything; however  grep \? test.txt   does find the lines which contain an '?' in them, but also those that contain an '\?' in them. Why is this?

I could see that certain patterns in the GNU Grep can be enclosed within brackets and certain others need not be. For example, matching the beginning of a word works only if it is enclosed within quotes.  user@host:~/Desktop$ grep -E '\<H' test Hello World user@host:~/Desktop$ grep -E \<H test   [test contains the string Hello World]  But matching end and beginning of file works without dollar:  user@host:~/Desktop$ egrep d$ test Hello World   Why is it so? And what is the rule?


The following error occurred while running the command sudo apt upgrade:  dpkg: error processing archive /var/cache/apt/archives/wireless-regdb_2018.05.09-0ubuntu1~16.04.1_all.deb (--unpack):  trying to overwrite '/lib/crda/pubkeys/sforshee.key.pub.pem', which is also in package crda 3.18-0ubuntu1 Errors were encountered while processing:  /var/cache/apt/archives/wireless-regdb_2018.05.09-0ubuntu1~16.04.1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1)

For example:  $ sudo apt-get install curl 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: bsh : Depends: libjline-java but it is not going to be installed groovy : Depends: libjline-java but it is not going to be installed rhino : Depends: libjline-java but it is not going to be installed E: Unmet dependencies.   Try 'apt-get -f install' with no packages (or specify a solution).   I get the same or similar errors when I attempt to install clojure1.3, leiningen, and several other packages.   When I try the suggestion made in the error message, this is what happens:  $ sudo apt-get -f install  Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required:   diffstat linux-headers-3.2.0-26-generic linux-headers-3.2.0-26 dh-apparmor dkms html2text libmail-sendmail-perl libsys-hostname-long-perl Use 'apt-get autoremove' to remove them. The following extra packages will be installed:   libjline-java Suggested packages:   libjline-java-doc The following NEW packages will be installed:   libjline-java 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 23 not fully installed or removed. Need to get 0 B/72.0 kB of archives. After this operation, 129 kB of additional disk space will be used. Do you want to continue [Y/n]? Y (Reading database ... 226243 files and directories currently installed.) Unpacking libjline-java (from .../libjline-java_1.0-1_all.deb) ... dpkg: error processing /var/cache/apt/archives/libjline-java_1.0-1_all.deb (--unpack):  trying to overwrite '/usr/share/java/jline.jar', which is also in package scala 2.9.2-400 Errors were encountered while processing:  /var/cache/apt/archives/libjline-java_1.0-1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1)  $ sudo apt-get upgrade 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:  bsh : Depends: libjline-java but it is not installed  groovy : Depends: libjline-java but it is not installed  rhino : Depends: libjline-java but it is not installed E: Unmet dependencies. Try using -f.


They are immutable value types on the stack. What keeps me from having them a const?  References:

Compiler error  indicates that only the basic POD types (as well as strings, enums, and null references) can be declared as const. Does anyone have a theory on the rationale for this limitation? For instance, it would be nice to be able to declare const values of other types, such as IntPtr.  I believe that the concept of const is actually syntactic sugar in C#, and that it just replaces any uses of the name with the literal value. For instance, given the following declaration, any reference to Foo would be replaced with "foo" at compile time.  const string Foo = "foo";   This would rule out any mutable types, so maybe they chose this limitation rather than having to determine at compile time whether a given type is mutable?


I am trying to get both of my monitors to play audio out of their speakers. They are connected over HDMI.    I can make them play audio one at a time. But how do I get them both to play audio at the same time?

I think this is a pretty simple concept.  I have one sound card and one pair of bluetooth headphones.  I want to play my audio through both my sound card and my bluetooth headphones.  I believe Windows has checkboxes allows you to "check" outputs to enable/disable them, but Ubuntu seemingly has the equivalent of radio selectors (you can only select one at a time).  Bonus Question: On a similar note, I have 5 analog output channels on my sound card (in addition to my digital & HDMI audio) -- I would like to be able to determine what comes out of each of those ports (e.g. "front speakers" on all 5 or "front", "center", "back", etc).  Thanks in advance!


I'm using Code-Blocks IDE in my Ubuntu 12.10.But when I'm trying to debug any project, I got the following warning:  warning: GDB: Failed to set controlling terminal: Operation not permitted   What should I do now ?

while debugging in codelite this error appears in the terminal :    could anyone help me solving this problem?


I have just downloaded install_flash_player_linux.11_x86_tar.gz from the Adobe website. How do I install this package or any other package not found in the Ubuntu Software Center. I have used sudo apt-get install ubuntu-restricted-extras. Rebooted and flash is not working.

Even though I have the latest Adobe Flash player 11.2 for Linux in Firefox -   - a particular online flash game still requests that I update to the latest flash player.  I've tried this online game on my laptop (Windows 8 with Flash Player 11.8) and it has no problems.  Is there a way to trick Ubuntu or this game into thinking Flash Player 11.8 is "installed"?


I think A* is a good place to start, but since cars cannot move in all directions (they move like cars do, trying to move forward and steer), I was wondering if someone could point me at other approaches they've used.  Also, I was wondering about the "Racing Line". Should one just precompute the optimal paths, and then use the A* to select the path that isn't blocked by other cars ?  EDIT: My question is different from  because that question is about approaches.  I am interested in learning about specific tried and trusted algorithms like A*.

I'm curious how I could control cars in a racing game.  Should my AI agent control its car with commands like "throttle on 0.35, steereing wheel on 0.5 right, brake on 0.0"? Or should I rather pre-compute a curve the car sticks to, and visuals like front wheels turning are just to make everything looks consistent? Or is there any other way?