It's been few mounths i've been working on Vue.js, everything is great. But Now i'm dealing with a bigger problem, i've been tryng to solve since too much time :p    There is the problem :   I have a JSON file wich is located at  : /usr/local/bin/JSONTEST/ScrapMonitorFerry_2019-12-02_14-05.json  I also have a project in Vue.js in a different folder :  /usr/local/bin/MyApplication  I would like to access to the JSON file from my application and use some of the data. Even if this JSON is located in an external folder !  Do you guys have any method in mind  to do that ? Is it even possible ? ** **I've found some lead on the web but none of them got me to the wanted outcome :   -using JSONP  -using Vuex  -using Webpack  -using React or Angular   I've been looking for answer for a while, I found at how to get JSON file directly when it's located in the Application folder using Ajax :  $.ajax({ url: 'ScrapMonitorFerry_2019-12-02_14-05.json', dataType: 'json', type: 'get', async: false, //cache: false, success: function(data) {   console.log("**************LA : *************");   console.log(data);   console.log("fin 1er fction");    $(data.info).each(function(index,value) {   console.log("on affiche value :  ");   console.log(value.website_name);         });      } });   I also find out how to acces to a JSON file located in a different local folder :  using fetch method :   "use strict"; var myInit= {   method: 'GET',   headers: {     'Content-Type': 'application/json'   },   mode:'cors',   cache: 'default' };  let myRequest = new Request("./data/ScrapMonitorFerry_2019-12-02_14-05.json",myInit);  fetch(myRequest)   .then(function(resp) {     return resp.json();      })     .then(function(data) {     console.log(data);     });    Thanks for all the answers and lead you guys might right,  léo

Is there local file manipulation that's been done with JavaScript? I'm looking for a solution that can be accomplished with no install footprint like requiring .  Specifically, I'd like to read the contents from a file and write those contents to another file. At this point I'm not worried about gaining permissions and am just assuming I already have full permissions to these files.


private static <T> T GetPage()   {     T page = new T();     PageFactory.initElements(BrowserFactory.getWebDriver(), page);     return page; }   T page = new T() ---- says Error: cannot instantiate the type T  I am completely new to this. Can you help me why I am getting this error? Below is my C# code for the same thing and it works fine. Am not able to replicate this in Java.  private static T GetPage<T>() where T : new() {    var page = new T();    PageFactory.InitElements(Browser.Driver, page);    return page; }

What is the concept of erasure in generics in Java?


I ask myself that question every time I watch a Tesla documentary.  So, let's get some answers down so the smart ones can think about it and we can clean-up our environment.  There is free electricity all around us for crying out loud ;)  If the question is too broad, then here is my simplified idea based on my limited electrical/electronics naval training which can be critiqued:  Erect a, possibly very tall, tower completely grounded to earth.  Connect one terminal of a possibly very large capacitor to the tower.  A current detection circuit is connected to the tower-to-earth circuit which, upon a lightening strike, switches the current from flowing to ground to flowing to the capacitor and charging it.  After the current ceases, the current detector switches back to ground the tower.  Then, draw current from the capacitor as needed.

The microwave tower next door has a lightning arrester attachment. The charge probably goes harmlessly to ground. If it were possible to siphon part of the charge as it went to ground, how would one choose the capacitor (capacitance rating, punch through voltage, etc)?


I have a jquery code in my articles, and this works fine on my first pages, but I use ajax pagination, and in the ajax loaded articles I get blank  <script></script> ...  I find that, the solution for this, I need use the .on() function (also would work the .live() with jQuery 1.4.3- or the .delegate() with jQuery 1.7-), but I very beginner in javascript, and I dont know, how can use correctly the .on() in my code. I try multifarious combinations, but my script absolute not firing or also not firing after the ajax calls...  Here is my full jquery code (I use jQuery 2.1.0 in this code, but I can use also 3.3.1 with .noConflict(true)):   var $hidedcontent = $("#hided-content");   $("#activator-field, #hided-content").mouseleave(function(){       $hidedcontent.hide( "slow", function() {       });  });   var timer;  $( "#activator-field" ).mouseenter(function() {       var that = this;   timer = setTimeout(function(){       $hidedcontent.show( "slow", function() {       });  }, 500);   }).mouseleave(function() {       clearTimeout(timer);  });   How can I put to this code the .on() function?  The linked question dont solution for my problem.  I in vain I use it .on(), not working after ajax calls... Here this simple test code, also not working!:   jQuery(document).ready(function() {          jQuery('#activator-field').on('click', function() {            alert('test');          });  });   If these codes are in ajax loaded content, I get blank <script></script> ... Maybe better solution for me, if I include my ajax pagination that, calls scripts? How can I do this?

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


I'm currently teaching myself C# after years of working only in C++. Needless to say there has been a lot I've needed to relearn. My question here is as follows:  What's the best approach in a Windows Console application to print (write to the console window) complex information, involving multiple variables, strings of text, and newline characters?  Put more plainly, how would I translate something resembling the following C++ code into C#:  int x = 1; int y = 2; double a = 5.4;  cout << "I have " << x << " item(s), and need you to give" << endl      << "me " << y << " item(s). This will cost you " << a << endl      << "units." << endl;   In C++ this would print the following to the console:     I have 1 item(s), and need you to give      give me 2 item(s). This will cost you 5.4      units.   This example is totally arbitrary but I often have short yet complex messages like this one in my programs. Will I totally have to relearn how I format output, or is there analogous functionality in C# that I just haven't found yet (I've dug through a lot of Console.IO documentation).

In a dictionary like this:  Dictionary<string, string> openWith = new Dictionary<string, string>();  openWith.Add("txt", "notepad.exe"); openWith.Add("bmp", "paint.exe"); openWith.Add("dib", "paint.exe"); openWith.Add("rtf", "wordpad.exe");  Console.WriteLine("For key = \"rtf\", value = {0}.", openWith["rtf"]);   The output is:     For Key = "rtf" value = wordpad.exe   What does the {0} mean?


I have a PSTricks picture shown here, where I have tried to move a part of it into a different ´TeX´-file for clarity (not, this is not a MWE)  \documentclass[pstricks,border=12pt]{standalone}% set border=0pt at the final stage \usepackage{pst-node} \psset {     dimen=middle,     offset=.2,     arrows=|*-|*,     unit=2cm,% set it to 100cm if you want 1 scale = 100cm = 1m }  \begin{document} \begin{pspicture}[showgrid=false](5,1.25)% set showgrid=false at the final stage  \include{ext} \end{pspicture} \end{document}   with ext.tex  \psframe(1,1) \psframe(1,.25)(4,.75) \pscircle(4.5,.5){.5}   Why am I not allowed to do this?

There are two different commands to incorporate another file into the source of some document, \input and \include. When should I use one or the other? What are the differences between them? Are there more things like them to be aware of?


Let $G$ be a group and $g_0\in G$ be a fixed element of that group. I'm wondering if $g_0 \mapsto g_0^{-1}$ can always be extended to a group automorphism $G \to G$. My feeling tells me yes. For abelian groups the map $g \mapsto g^{-1}$ is already an automorphism, so there it's trivial. But what about non-abelian groups?

What is an example of a group $G$ with an element $g$ such that no automorphism of $G$ takes $g$ to its inverse?


Hi I setup an ssl certificate using godaddy and read the following article: . I am trying to protect an aws ubuntu gitlab instance that uses nginx as a server.  My /etc/ssl/private/ has the following files:  .csr generated on server .key generated on server .crt generated by godaddy .crt BUNDLE generated by godaddy   I have given them the following permissions respectively:  root:root 644 root:ssl-cert 640 root:root 644 root:root 644   Is this correct?  It has been mentioned that this question is the same as  and my only reason that it is distinct is because it is for nginx NOT apache.

I have my cert.pem and cert.key files in /etc/apache2/ssl folders.  What would be the most secure permissions and ownership of:   /etc/apache2/ssl directory /etc/apache2/ssl/cert.pem file /etc/apache2/ssl/cert.key file    (Ensuring https:// access works of course :).  Thanks,  JP


I have to prove a larger fact about Fredholm Operators.  One of the facts along the way which I don't need to prove is the question posed in the title.  But I would like to know none-the-less  I want to show that the set $\{ e_n(x) \}_{n \in \mathbb{Z}}$, where $e_n (x) = e^{inx}$,  forms an orthonormal basis for $L_2 (S_1)$.  Here $S_1$ is the unit circle, and $L_2 (S_1)$ is the Hilbert Space of complex-valued square-absolutely-integrable functions on $S_1$ with inner product $$ (f,g) = \frac{1}{2\pi} \int_{-\pi}^{\pi} f(x) \overline{g(x)} dx $$ It is useful to note that the fourier series  $$\sum_{n=-\infty}^{\infty} \hat{f}(n) e^{inx} \mbox{ converges to }f \quad (**)$$  for $f \in L_2 (S_1)$, where the fourier coefficient at frequency $n$ is given by $\hat{f}=(f,e_n) $  To show orthonormality, I think we need to prove that:   The $e_n$ have norm $1$ The $e_n$ are orthogonal The $e_n$ span $L_2 (S_1)$   The first 2 conditions I think will be easy once I try it out.  But the 3rd condition bothers me. I think it follows directly from $(**)$, but my question is why is $(**)$ true? I thought only periodic functions have fourier series? Please help with an answer or even jus a reference

$\textbf{Theorem:}$ The orthonormal family $\{e_n(x):\, n\in\mathbb{N}\}$, where $e_n(x)=e^{2\pi inx}$, is a basis for $\mathcal{L}^2([0,1])$.  In this case, $\{e_n(x):\, n\in\mathbb{N}\}$ being a basis would mean that any $f\in\mathcal{L}^2([0,1])$ can be written in the form  $$f=\sum^\infty_{k=0} \hat{f}(k)e_k(x)$$  where $$\hat{f}(k)=\langle f,e_k\rangle =\int_{[0,1]} f(x)\overline{e_k(x)} \ \text{d}x$$  I am attempting to get a solution in which we can say  $$\left\vert\left\vert f-\sum^k_{k=0}\hat{f}(k)e_k(x)\right\vert\right\vert\rightarrow 0 \ \ \text{as} \ \ n\rightarrow \infty$$  via Parsevals and Plancheral Identities, but I have been unable to do so.  Any hints please?


I recently looked at  and found some very useful information as to how to backup android without rooting your device. However, I can't seem to find out much information on how to restore your device without rooting once you've backed it up. The answers that do tell how to restore all assume that your device can successfully boot into Android, and not all of the answers refer to backing up Android OS itself, instead focusing on apps. I want to find a way to restore my OS because I'm going to be rooting my phone, and installing a lot of custom roms, and I want to make sure I can restore my phone before risking breaking it. Also, stop trying to mark this question as a duplicate, as I am trying to delete my duplicate question.

I want to find a way to restore my phone in case the process of rooting my phone or dual booting a custom rom breaks it. However, most of the ones I've looked at require the phone to be rooted before installing. I know I can create a nandroid backup through system settings, but I don't know how to recover that without rooting my device, or if there are better options. I'm not terribly concerned for any personal data on my phone (I can backup my pictures pretty easily), but I mostly just want to be able reinstall Android OS or reset to factory default in case my device breaks. Thanks! Edit: I am going to ask a new question (one different enough to justify not simply modifying this one) with the new info I learned from the possible duplicate.


When visiting  (at this time) the list of badges awarded recently is display with no spacing between them, which I think is incorrect since it doesn't follow the overall site style:

When the "Hide Hot Network Questions" preference is enabled (i.e. HNQ sidebar is hidden), we see "Recent Tags" and "Recent Badges" in the homepage instead of the HNQ. However, the "Recent Badges" list is displayed with no margins. ex.)   I think that the appropriate margins were set in the past. cf.)


I often modify the publish date, but I keep every revision.  Where can I find when the post was published for the first time?

I suppose getting the first revision of a particular post and get the date, right ?  How to do that?


I want to make a command that will kill anybody that does not have a trip wire called Midget passing in their inventory.

I know that you can use exclamation marks in Minecraft commands to check for an entity that does not have a specific tag. For example, you can use /kill @e[type=!Player] to kill all entities except for the player. I have, however, encountered two problems with using exclamation marks that I can't find a solution for.  For my first problem, I've set up a series of command blocks to summon shootable fireballs above the player’s head when a certain item is being held;  /scoreboard players add @a Fireball 1 {SelectedItem:{tag:{display:{Name:"Summon Fireball"}}}} /execute @a[score_Fireball_min=1,score_Fireball=1] ~ ~ ~ /summon Fireball ~ ~2.5 ~ {direction:[0.0,0.0,0.0]} /scoreboard players set @a Fireball 0   I used a comparator and a redstone torch so that the last command would activate when the first command would deactivate, that is, when the player is not holding the item.  The problem is, that when I move far away from the setup, the redstone stops working, leaving me unable to summon any new fireballs. Instead, I'm trying to use a command block to check when anything except for item is being held;  /scoreboard players set @a Fireball 0 {SelectedItem:{tag:{display:{Name:!"Summon Fireball"}}}}   I’ve either put it at the wrong place, or you simply can’t use exclamation marks in NBT tags. Could someone tell me where I should put the exclamation mark, or in the latter case, how I can check for anything except for a specific item?  Further, I’ve tried using exclamation marks to set the score of all entities, including the ones with a blank score, but except for the ones with a score of 2 or higher, to 0;  /scoreboard players set @e[score_arrows_min!=2] Arrows 0 /scoreboard players set @a Arrows 1 {SelectedItem:{tag:{display:{Name:"Rain of Arrows"}}}} /scoreboard players set @e[type=Arrow] Arrows 2 {inGround:1b}   The code does change the scores of entities without scores to 0, but it doesn’t exclude the arrows with a score of 2. Could anyone tell me what I’m doing wrong here?


Thinking of buying a computer that comes with windows 8, but want to install Linux on it (Mint or Debian).  I was wondering a few things:   Do most computers with windows 8 come with UEFI now - eg, Samsung laptops? I heard that Microsoft may lock the UEFI so that other operating systems can't install. Is this the case?   I'm looking to do a clean install - so only have one operating system on the hard drive.

I've heard a lot about how Microsoft is implementing UEFI Secure Boot in Windows 8. Apparently it prevents "unauthorized" bootloaders from running on the computer, to prevent malware. There's a campaign by the Free Software Foundation against secure boot, and a lot of people have been saying online that it's a "power grab" by Microsoft to "eliminate free operating systems".  If I get a computer that has Windows 8 and Secure Boot preinstalled, will I still be able to install Linux (or some other OS) later? Or does a computer with Secure Boot only ever work with Windows?


Two monts ago, I submitted a manuscript (Scholarone Manuscripts). I got major revisions and implemented ALL of them. Then I re-submitted my manuscript. After two days the status changed to under review. Then after five days the status changed to awaiting editor decision and then after two more days I saw my status change to under review again (today is the 3rd day with this status).  Any idea what is happening?

What steps does a manuscript typically go through from submission to publication (or rejection) in a typical journal? How are these steps referred to, in particular by editorial systems, and how long do they each typically take?  Note that this question is about the typical situation and hence not about:   Journals with an atypical workflow, e.g. those that allow for an instantaneous reviewer–author interaction. Exceptional steps or rare occurrences such as withdrawal or .   This is a canonical question on this topic as per . Due to its nature, it is rather broad and not exemplary for a regular question on this site. Please feel free to improve this question.


E: The repository 'http://ppa.launchpad.net/damien-moore/codeblocks-stable/ubuntu bionic Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu bionic Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://ppa.launchpad.net/mc3man/xerus-media/ubuntu bionic Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.

When updating, I get the following error message:   W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file.   Here, I find another statement on this error:   This recommends removing certain PPAs; and, I'm not sure if I should do that since it might mean not getting the updates that I need.    Is this what I should do?


I was curious if I could cheat my way around having to focus stack an object by using different lenses.  Playing with the  I noticed something interesting:  No matter what focal length I select the depth of field for the same angle of view (at the subject) is constant.  For example, fixing sensor format at APS-C, aparture at f/22, and a supposing I need a distance from subject of 2m for a 300mm lens I get a depth of field of 3cm.  I get the same DoF with a 600mm lens at 4m, 150mm at 1m, and 75mm at 0.5m.  Is this a quirk of practical lenses (or of that calculator), or is there a theoretical constraint here, and if the latter can someone show the math and theory?  Update: To clarify some potential confusion in the first paragraph, the question may be restated as follows: Given a fixed sensor, object, aperture, and magnification, is it possible to vary Depth of Field by varying lens focal length?

There are several questions here about , about , and about . And of course there's the basic . And plenty of  questions. There's related questions like . But there's no be-all-end-all question asking:  What exactly determines depth of field in a photograph?   Is it just a property of the lens? Can lenses be designed to give more depth of field for the same aperture and focal length? Does it change with camera sensor size? Does it change with print size? How do those last two relate?


When I overwrite the partition table with dd command I can't mount my new partition mmcblk0p1 because is not updated  I need to force reload partition table of SD-Card mmcblk0, I unplug and plug SD-Card for update /dev/mmcblkp1 or run gparted Ctrl+R for reload media.  I search a bash command for it.

When I insert media (e.g. an SD card) the system (Ubuntu 12.04) reads the partition table and creates all the /dev/*[1234] links to each partition. If I repartition the media I have to physically remove and reinsert it to update these links. Is there a command to force this to happen without me having to remove and reinsert the disk?


I have been trying to solve this problem for over a month now, so of course I have tried all the 3 common solutions which are all over the internet. I think I am getting close and my problem resembles this particular problem:   This is my .xsession-errors file:  /usr/sbin/lightdm-session: line 24: mktemp: command not found /usr/sbin/lightdm-session: line 29: : No such file or directory /usr/sbin/lightdm-session: line 33: cat: command not found /usr/sbin/lightdm-session: line 34: truncate: command not found /usr/sbin/lightdm-session: line 29: : No such file or directory /usr/sbin/lightdm-session: line 33: cat: command not found /usr/sbin/lightdm-session: line 34: truncate: command not found /usr/sbin/lightdm-session: line 106: ls: command not found   Following is the output of grep -H PATH ~/.profile ~/.bash_profile ~/.bash_login and echo $PATH and type gnome-session:    notice: no such file or directory for bash_profile and bash_login.  I think the problem has got something to do with my path variable? I am just not sure.  Also, I just started seeing this new error after a recent reboot:   /usr/sbin/lightdm-session: line 117: exec: gnome-session: not found

On login the password is accepted but I'm returned to the login screen. Tried multiple times even after reboot... same behavior.  I left my laptop (Lenovo Ideapad z510) in suspend mode (lid down) last night, but it did not resume this morning, as it usually does. It had shutdown or crashed, and on booting with Ubuntu the login failure mentioned above started.  cat ~/.xsession-errors /usr/sbin/lightdm-session: 1: /usr/sbin/lightdm-session: ls: not found /usr/sbin/lightdm-session: 104: exec: gnome-session: not found   Okay. I've tried a bunch of suggestions from    Changed id to /usr/sbin/id in /etc/profile removed .Xauthority removed /tmp removed,  purged and re-installed lightdm checked .profile for syntax errors (source .profile worked fine, so I guess no syntax errors)   Nothing worked. My guest login is working fine, so another user should also work. I'm now going to create another user and continue working, but a solution to this problem is still warranted... it's likely going to repeat in future.  Installing and reconfiguring gdm also did not work.  sudo apt-get install gdm


My English teacher said that it's not correct to say 'my company' for indicating the company I work for, because 'my company' means the company I own. But I don't think this kind of confusion happens often. It's too long to say 'the company I work for'.   So can't I use 'my company'? If so, what about 'my apartment' or 'my band' or 'my country'?

Is there a way to indicate that somebody is your girlfriend without using the possessive term my? I think saying She/He is my partner/other half is OK for married people, but it doesn't feel right for girlfriends and boyfriends.


I've committed and pushed a project to my GitHub account.  This project contained the following partial file structure:  server  | --- conf | ----- some files  | --- java | --- lib   The java and lib folders are empty. When downloading my project from GitHub, the resulting zip did not contain the java and lib folders.   Does Git delete empty folders? I am using Atlassian's SourceTree as my Git client.

How can I add an empty directory (that contains no files) to a Git repository?


I have tried using Stolz–Cesàro's formula and subtract the next term in the series but that gave me $$\lim_{n\to \infty} {\frac{2n}{2n+1}}$$ which is obviously 1 and not right. I do realise that the limit should be 0 but I don't know how to prove it.  Edit due to comment:  $n!!$ is the double factorial, as explained in this   post.

So guys, how can I evaluate and prove that $$\lim_{n \to\infty} \frac{(2n-1)!!}{(2n)!!}=0.$$ Any ideas are welcomed.  $n!!$ is the double factorial, as explained in this   post.


I have a function on $\mathbb{R}^2$ defined as $d((x_1, x_2), (y_1, y_2)) = |x_2 - y_2|$ if $x_1 = y_1$ and $d((x_1, x_2), (y_1, y_2)) = |x_1 - y_1| + |x_2| + |y_2|$ otherwise. I want to prove that it is a metric.  I can do it only by considering many cases which is quite lengthy. Can it be proven neatly?

Can anyone please tell me whether the following function $d:\mathbb{R}^2 \times \mathbb{R}^2 \to  \mathbb{R}$ is really a metric or not on $\mathbb{R}^2$.  $$ d((x_1,x_2),(y_1,y_2))= \begin{cases} |x_1-y_1|, &\text{ if } x_2=y_2\\ |x_1|+|y_1|+|x_2-y_2|, &\text{ if } x_2 \neq y_2. \end{cases} $$  If it really is indeed a metric, please give the proof of triangle inequality.(I'm OK with the other two conditions).


I have an older samsung laptop running dual core amd with 4 gigs ram,  And I was previously running windows , due to severe lagging I installed ubuntu and now I am unable to boot up   It keeps showing   ACPI PCC probe failed Starting version 219 Ata2:soft reset failed (1st FIS failed)  Alert /dev/disk/by-uuid/612a3bcc-0033-47bf-bcca-b6ad3a4224c8 does not exist..dropping to shell   And then it's says the the devices taking too long

I am using Ubuntu 14.04.  I ran in terminal sudo apt-get update. Then I rebooted the system. And now I see:   ALERT! /dev/disk/by-uuid/xxxxxxxxx does not exist. Dropping to a shell initramfs:_   I can't boot up LIVE Ubuntu from USB flash drive. Yes, I double checked BIOS setup and the USB flash drive is OK and runs on another machine. Right now I am going to buy a  DVD and burn a Live DVD from another laptop.  sudo blkid gives me:   /dev/loop0: TYPE="squashfs"   /dev/sda1: UUID="xxxx" TYPE="ext4"    /dev/sr0: LABEL="Ubuntu 14.04.1 LTS i386" TYPE="iso960"      /etc/fstab has the same UUID="xxxx" and there is a line with:   errors=remount-ro 0      I tried using boot-repair but I still can't log in to Ubuntu.  I don't want to reinstall Ubuntu, because I have a lot of data there.  Do you have any advice how this can be solved?


4 down vote favorite  I have noticed after deleting an original page in WordPress with lets say a permalink of your_domain.com/contact/ and then trying to recreate the same page with the same name/slug, my WP is generating a "-2" at the end of the link, like: your_domain.com/contact-2/.  I don't understand why, since the original page was deleted. Why is WordPress treating new pages as if the original still exists? There is nothing in 'trash'.  I repeat there is nothing in 'trash'.

I have noticed after deleting an original page in WordPress with lets say a permalink of your_domain.com/contact/ and then trying to recreate the same page with the same name/slug, my WP is generating a "-2" at the end of the link, like: your_domain.com/contact-2/.  I don't understand why, since the original page was deleted. Why is WordPress treating new pages as if the original still exists? How to I clean WP caches, if such a thing even exists?Thank you ahead of time for clearing this up for me.


My keyboard lacks any "multimedia" keys but I really want to have keyboard shortcuts for the global Volume Up, Volume Down, and Mute actions. What's the easiest way to program custom keyboard shortcuts to trigger these missing keys virtually?  I'm not asking about how to work with a particular application. I want to affect the master volume control, regardless of which application has focus.

Some keyboards have volume controls on them that can be pressed anytime to control the master volume.  My keyboard does not have that.  Is there a way that I can create a key macro that will work like the volume controls on those keyboards?  It should always allow me to control the volume, even if I'm playing a game.


Similar to this   How would you complete the following sequence, until point 10?   Firstly Secondly  Thirdly ...   Any help would be appreciated.

This question is different from the one that's already asked . I'm asking about the levels here.   About research: Trust me...the Internet gave me up to nineteenthly and to be frank, I then stopped searching for it. Let experts here put a bee in bonnet!


I have a Palestinian Authority passport and a work permit and residence in Turkey. I also have USA and Schengen multiple visas. I have used the Schengen visa several times and it's valid until April 2019. The USA visa is valid until June 2019.  Do I need a visa to enter Georgia?

I am a Nigerian, holding a valid schengen visa issued by the French embassy, and a multiple entry visa for the United States. Will I be allowed to enter Tbilisi in Georgia?


I created a utility function to try to run 7z, then parse and construct a couple arrays of filenames and crcs from the output of 7z (which I want to use later in the function).  However, I'm getting weird behavior where, at the end of my function (currently - the function is still incomplete), when I try to use the bash syntax for expanding an array to all of its members, I just get the empty string.  Example of array expand syntax:  debuglog "z_filelist_name[@] = \"${z_filelist_name[@]}\""   That line results in output:  z_filelist_name[@] = ""  rmdupes() {    debuglog "rmdupes: removing duplicates for archive $1"      #get list of files in archive from 7z     #local z_filelist_raw     declare -a z_filelist_name     declare -A z_filelist_crc      #z_filelist_raw=$(7z l -slt "$1")     i=0      #parse output of 7z to build array of filenames and checksums     7z l -slt "$1" | while read line     do         #possibly dangerous assumption in code below: For every Path, there will be a crc, thus, don't increment i until we find crc         debuglog "Processing line:"         debuglog "$line"          if [ "${line:0:6}" = "Path =" ]         then             z_filelist_name[$i]=$(echo $line | cut -d ' ' -f 3 )          debuglog "z_filelist_name[$i] = \"${z_filelist_name[$i]}\""                    fi         if [ "${line:0:5}" = "CRC =" ]         then              #use bash associative array to associate filenames to crc values             z_filelist_crc[$z_filelist_name[$((i++))]]=$(echo $line | cut -d ' ' -f 3 )         fi     done      debuglog ""     debuglog "z_filelist_name[@] = \"${z_filelist_name[@]}\""       for zf in ${z_filelist_name[@]}    do         debuglog "Found Path (crc): $zf ( ${z_filelist_crc[$zf]} )"     done     }   Can anyone explain why the array values aren't being expanded properly. The debuglog statements earlier in the fuction that output individual elements by using the $i index variable, expand to the proper values.

Why do I get different values for $x from the snippets below?  #!/bin/bash  x=1 echo fred > junk ; while read var ; do x=55 ; done < junk echo x=$x  #    x=55 .. I'd expect this result  x=1 cat junk | while read var ; do x=55 ; done echo x=$x  #    x=1 .. but why?  x=1 echo fred | while read var ; do x=55 ; done echo x=$x  #    x=1  .. but why?


I was wondering how can we show that cross-entropy is equivalent to maximising log likelihood of a training assuming the data can be modeled by this distribution:

There is a statement that maximizing the likelihood is equivalent to minimizing the cross-entropy.  Are there any proof for this statement?


I have had this question for quite a time. I have recently studied about photoelectric effect. I was taught that light consisted of particles called photons that carried inherent energy with it, that is decided by Planck's formula E=hf. I am also aware of electromagnetic theory of light, where light is considered as wave of oscillating electric and magnetic fields, where each field regenerates each other due to Ampere's law and Faraday's law.  However, if I try to apply wave nature of light on the photoelectric scenario, the electrons would experience electromagnetic forces, which are oscillatory in nature. I would get the electrons to simply osscilate rather than eject out of the metal. The only way an electron to eject out by this approach is  by some form of "resonance" with the light that causes large amplitudes of vibration.  But however, we see that electrons are continuosly ejected out. Electromagnetic property of light seems to be absent here.  So my question is, In a given scenario, how do we decide if light exibits its particle nature or wave nature  Thanks to those who can satisfy my query.

How does one know whether, in treating a certain problem, one should consider particles as waves or as point-like objects? Are there certain guidelines regarding this?


I have a problem while inserting a Matrix. I did it a couple of times and i had no error before. Here is the code:  $$ \left[ \begin{array}{cc} [RGA]_{11} & [RGA]_{12} \\  [RGA]_{21} & [RGA]_{22} \end{array}  \right]  \text{  becomes  } \left[ \begin{array}{cc} [RGA]_{11} & 1-[RGA]_{11} \\  1-[RGA]_{11} & [RGA]_{11} \end{array}  \right] $$   This doesn't compile, getting errors on line 5, while if I write:  $\left[ \begin{array}{cc} [RGA]_{11} & [RGA]_{12} \\  a [RGA]_{21} & [RGA]_{22} \end{array}  \right]  \text{  becomes  } \left[ \begin{array}{cc} [RGA]_{11} & 1-[RGA]_{11} \\  1-[RGA]_{11} & [RGA]_{11} \end{array}  \right] $   As a stupid example, it compiles!  Any idea of what is wrong?

\begin{table}[ht] \makebox[\textwidth][c]{     \begin{tabular}{ccccc}         \hline         \hline         [] & [] & [] & [] & []\\         [] & [] & [] & [] & []\\         \hline         \hline     \end{tabular} } \caption{test} \end{table}   I cannot run the above code, latex returned an error about missing number, but I can't see anything I am missing.  And the weirdest thing is that  \begin{table}[ht] \makebox[\textwidth][c]{     \begin{tabular}{ccccc}         \hline         \hline         [] & [] & [] & [] & []\\         \hline         \hline     \end{tabular} } \caption{test} \end{table}   This code works.  Anyone have any idea?


I just got an  by an anonymous user in the "Suggested edits" review queue:  The edit shows no change in the Markdown or in the rendered output of the post. This can also be seen in the  (Revision 6). The suggested edit did have a very long comment, so it was not an automatic edit. I approved the edit because it really does not make a difference in this case whether it gets approved or rejected (no change in the post, no user whose edit history and reputation can be updated). How did this anonymous user get around the  for suggested edits?

How was an anonymous user able to suggest ? (Warning: it has an offensive edit summary, which has been edited out in the screenshot below.) It doesn't seem to change anything, not even when viewing the Markdown source:    IIRC, if you suggest an edit and then immediately edit it again, but if the new edit doesn't meet the 6 character minimum it won't be accepted by the system. I just tried (while logged out) to retag this question and undo that in the grace period, but I get a message , as it should.


Let $f$ be continuous, nonzero on $[a,b]$. For $p\in \mathbb R$, define $$\Phi_p(f)=\left(\frac{1}{b-a}\int_a^b|f(x)|^pdx\right)^{1/p}$$.  Show that  $$\lim_{p\to 0} \Phi_p(f)=\exp(\frac{1}{b-a}\int_a^b \ln |f(x)|dx)$$  I have no idea on it. Once I take L' Hospital formula, I got nonsense....

The $L^p$ norm in $\mathbb{R}^n$ is \begin{align} \|x\|_p = \left(\sum_{j=1}^{n} |x_j|^p\right)^{1/p}. \end{align} Playing around with WolframAlpha, I noticed that, if we define the "scaled" $L^p$ norm in $\mathbb{R}^n$ to be  \begin{align} \| x \|_p = \left(\frac{1}{n}\sum_{j=1}^{n} |x_j|^p\right)^{1/p} \end{align} then \begin{align} \lim_{p \to 0} \|x\|_p &= \left( \prod_{j=1}^{n} |x_j| \right)^{1/n}, \end{align} which is the geometric mean of the coordinates' absolute values. This is interesting maybe because the $L^p$ norm doesn't have a nice limit at zero.  My questions:   How do I prove this? Is this definition of "scaled $L^p$ norm" interesting, or known by another name, or used anywhere? Is there any interesting reason to define the $L^0$ norm as the geometric mean, as above? Further reading?   Thanks!


With Public Key $(G, q, g, h)$ where $G$ is a group, $q$ prime, $g$ a generator of $G$, Am I right in thinking that:  $$\mathrm{Enc}(m;r) := (g^r, h^r \cdot g^m)$$

What does the following notation mean in a homomorphic encryption scheme?   ENC(x;r)   What does x and r refer to?


I plan a bicycle trip over Europe. Most likely I will follow one of the EuroVelo routes, but I might change my plans during the trip. So I would need to take too many paper maps.   Can you recommend any of the following:   some reliable online map (Google Maps are not good enough), or Android app with GPS and reliable bicycle maps GPS device, that would serve well for cycling   Also that would need to cover most of Europe, or at least the European Union part of it.

I don't need a recommendation or a list but my knowledge of GPS and "navi"s and the differences between them is an utter mystery to me.  But often I'm lost in backstreets in random countries where access to something like a live Google Maps would be awesome. I absolutely cannot afford a smartphone with worldwide roaming though.  Can GPS's do what I want or am I barking up the wrong tree? If they can is it only high end ones than can?


Would restore the peace affect creatures with hexproof?  I have  (all creatures you control have hexproof, your opponent cannot have hexproof). I attack and then my opponent plays , would this affect my creatures since they have hexproof?

Note: this is intended to be a canonical question about whether or not a spell or ability targets so there are multiple sub-questions.   Can Hexproof or Shroud save my creature from ? What about a  that was cast for it's Overload cost? Does shroud prevent me from using the Monstrosity ability of a creature, or from giving it more counters with Proliferate? Can I cast an Aura Enchantment on one of my creatures with Shroud, or an opponent's creature with Hexproof? Or can I use the Equip ability to attach an equipment to one of my creatures with Shroud? Will 's ability trigger when my opponent plays ? And will I have to sacrifice my  if my opponent casts ? Will Shroud or Hexproof prevent an opponent from choosing me with 's ability? Will Hexproof keep one of my creatures from being affected by ? If an Aura or Equipment is attached to a creature with Hexproof, does the Hexproof protect the attached permanent?


I have Window 7 installed on my laptop and I can install Linux (Ubuntu). I just wanted to install it with the following conditions:   At the time of booting I get option for both OS, but if I delete Linux OS it should not affect the booting process of Windows. May be it automatically gain Windows bootloader or if its Grub, its OK. I am not aware of what is "sda" at the time of installation. Can I create "sdb" without destroying Windows partitions and install Linux in this "sdb"? I got free space in my system.

I currently have Windows 7 on my computer and I want to install Ubuntu alongside Windows safely.  Could someone please provide clear instructions?


Is there any infinite topological space $A$ which is connected such that $A$ and $A\times A$ are homeomorphic?

Question is :  Suppose $X$ is a topological space of infinite cardinality which is homeomorphic to $X\times X$. Then which of the following is true:   $X$ is not connected. $X$ is not compact $X$ is not homeomorphic to a subset of $\mathbb{R}$ None of the above.   I guess first two options are false.  We do have possibility that product of two connected spaces is connected.  So, $X\times X$ is connected if $X$ is connected. So I guess there is no problem.  We do have possibility that product of two compact spaces is compact.  So, $X\times X$ is compact if $X$ is compact. So I guess there is no problem.  I understand that this is not the proof to exclude first two options but I guess the chance is more for them to be false.  So, only thing I have problem with is third option.  I could do nothing for that third option..  I would be thankful if some one can help me out to clear this.  Thank you :)


Right above this  here it's mentioned that the matrix of regression coefficients, $(\sum_{XX})^{-1}\sum_{XY}$, corresponds to the coefficients of an OLS solution. But I can't really see it for myself.

I'd like to know what technique or techniques are used by regression packages, (in particular the lm function of R) to minimize the sum of squares.   Does it use gradient descent?  Thanking in anticipation.


I have two Linux servers, one which has several RAR files and another empty one. I would like to extract the archives and move the content to Server 2.  The problem is: I do not have enough storage to extract the files at Server 1. Also I cannot use SSHFS, as no FUSE modules can be loaded on Server 1.  I have seen that unrar has the p option which sends the output to STDOUT. Is it somehow possible to use this to solve the problem?


I was asked to find the four colour stripes of a 1M ohm (tolerance of 5%)  My question now is don't we have 2 options? I came up with:   Black(0) Brown(1) Blue(x1M) Gold (5%)  Brown(1) Black(0) Green(x100K) Gold(5%)   Is there one right and one wrong or are both of these correct?

I'm taking an electronic circuit analysis class, and I was asked to give the color of the 3rd band of a 1MΩ resistor. My answer was blue, thinking it could be black-brown-blue (01 * 1MΩ), but the automated quiz said the correct answer was green (brown-black-green).  So I did some research, thinking there were just multiple correct answers, and I read in a few places that the first band on a resistor is never black (0). Why is this? Does a black first band have some other meaning? It would really help me remember it if I knew the history or reasoning behind it.  This question has been answered. For further reading on zero-ohm resistors mentioned in the answers and comments here, I found these questions and answers helpful:


i'm creating a system than get html form values and send it to API. I created a simple html form with javascript to get values to send, but i get form using form ID, is there any way to get form without id ? i'll creating this to work in website than have only one . index.html <!DOCTYPE html>       <meta charset="UTF-8">     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <title>Document</title>            <form id="myForm">         Send me your name:         <input id="myName" name="name" value="John">
         Send me your email:         <input id="myEmail" name="email" value="Exemplo@exemplo.com">
         <input type="submit" value="Send Me!">       </form>    teste1.js window.addEventListener( "load", function () {     function sendData() {       const XHR = new XMLHttpRequest();       const FD = new FormData( form );        const data = {          name: FD.get('name'),         email: FD.get('email')        }        // Define what happens on successful data submission       XHR.addEventListener( "load", function(event) {         alert("Success.");       } );        // Define what happens in case of error       XHR.addEventListener( "error", function( event ) {         //alert( 'Oops! Something went wrong.' );       } );        // Set up our request       XHR.open( "POST", "API_URL" );       XHR.setRequestHeader('Content-type', 'application/json')       // The data sent is what the user provided in the form       XHR.send(JSON.stringify(data));   }     // Access the form element...   const form = document.getElementById( "myForm" );    // ...and take over its submit event.   form.addEventListener( "submit", function ( event ) {     event.preventDefault();      sendData();   } ); } );  look i get form with const form = document.getElementById( "myForm" );  and const FD = new FormData( form );  how get form without id, if it was like <form> ...

For instance in the snippet below - how do I access the h1 element knowing the ID of parent element (header-inner div)?

        Some text I want to change

   Thanks!


I know this may depend on the continuity, but generally, Bruce Wayne has been shown to be a few years older than Clark Kent. This has been portrayed anywhere between 4 to 15, depending on the story, but most usually, Bruce is older. We should also take into account the "sliding time line" which essentially keeps most DC characters at their "canon ages" and simply puts them in different time periods or decades. Is there a (DC) officially noted age difference between the two?

Assuming we count Superman's age as the age of Clark Kent in Earth Years, how does his age compare to Bruce Wayne in-universe?  Any answers are preferred to be from the same continuity if possible; but absent that cross-continuity answers are OK if less desirable.


I need a method which must check if the session has a specific attribute or not. The problem is that when I want to check if the session has the attribute I get a null pointer exception. I think that I get this error because the session object is not initialized properly. I need this method because I want to render the page base on this attribute (if the user  is logged in he must to show the button logout and  vice versa). What I am doing wrong in my code?  import javax.annotation.PostConstruct; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession;  public class SessionTest extends HttpServlet{     HttpSession session;       @PostConstruct     public void init(HttpServletRequest request) {         session = request.getSession(true);         session.setAttribute("user", "username");     }      public boolean getParamer(String user) {         return session.getAttribute(user) == null;     }      public static void main(String[] args) {         System.out.println(new SessionTest().getParamer("user"));     }   }

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


I've looked at some other questions related to using sed to replace strings, but I'm having trouble figuring out how to apply it to my particular need.  In a case like the snippet below, I want to change the string only on lines that do not begin with a "#":      #####################################     # Blah blah blah string blah blah     #####################################      PKG_NAME="string"     PKG_DESC="string-foo"   I would like the output to read like this:      #####################################     # Blah blah blah string blah blah     #####################################      PKG_NAME="newString"     PKG_DESC="newString-foo"   From what I have gathered, I think I can use find and sed to change all of the strings in all of the files  find . -type f -exec sed -i 's/string/newString/g' {} +   But I am just having trouble figuring out how to add an exception for lines beginning with "#". I'm open to other ways of doing this other than sed, so if there is an easier way please feel free to share.  After reading , I see how to change a string in cases where a line starts with a certain pattern, but what I need is to change lines where the pattern is not found.

$ echo -e 'CH12\nCH23au' | sed '/^CH/s=^=<b>=' <b>CH12 <b>CH23au   I know I can match lines starting with CH by ^CH but how can I match multiple patterns?   Example:  Input:  CH12 CH23au   Output:  CH12 <b>CH23au   How to only put <b> where there is ^CH and au in the line?


I entered Schengen area via airplane in Geneva March 2016 and passport got stamped. But when I left by bus from Hungary my passport was not even scanned or stamped. Will I have problem re-entering Schengen again; it has been two years and I only have entry stamp?  I heard that after 180 it has no problems.  I have Serbian Passport.

I'm a Georgian national holding a multiple entry Schengen visa.  Last summer I was traveling to Hungary, spent a few days there, then flew to the UK. The Hungarian border official did NOT stamp my passport on exiting the Schengen area. I had to enter it again a few days later and the German border guards were confused by what had happened. Finally they let me enter.  Now I have one more entry stamp into Schengen than exit stamp and run into problems EVERY time at a Schengen border.  Is there a way to fix this?


Sad to say, it is human nature to be uncomfortable with other races or even dislike them, particularly if they are very different from us. The contrast between humans and aliens are even greater. Therefore, the likelihood of racism against aliens is even higher.   It is hard to believe advancement of technology can change human nature. It is quite unimaginable that humans can shed their basic selfish and greedy nature and expect most of them to become kind saints.  What are some incidents of alien racism, if any, in Star Trek?

Many Federation citizens, particularly those in Starfleet, seem to be openly hostile to the Ferengi and appear to have strong prejudices against them.  For example, when two Ferengi narrowly escape a doomed shuttle, Riker tells Worf to give them quarters "not too close to mine." He hadn't even met them, or spoken to them, but was still keen to keep them away from where he lived.  Others seem to automatically assume Ferengi will be trouble, too. Is this not prejudice in the literal sense? Is it not bias against their entire race?


No external fields penetrate the conductor as they are canceled at the outer surface by the induced charge.  My question is why is field inside conductor zero when there is no other field inside the conductor to cancel the field due to the induced charges?

In electromagnetism books, such as Griffiths or the like, when they talk about the properties of conductors in case of electrostatics they say that the electric field inside a conductor is zero.  I have 2 questions:    We know that conductors (metallic) have free electrons which randomly moves in all directions, so how come we can talk about electrostatics which by definition means stationary charges? When the textbooks try to show why the electric field inside a conductor is zero they say let us put our conductor in an electric field. What happens then is that there will be an induced surface charge density which consequently induces an electric field within the conductor such that the total electric field within the conductor will be zero. That is perfectly understood, but my problem is the following: the original claim was that the electric field within a conductor is 0, not the electric field after putting the conductor in an external electric field it became zero. I do not understand the logic!


I was wondering is there any way I can set my launcher to intellihide? For example just like "docky", which hides whenever there is a window obstructing the dock?  Thanks, Nazir

Starting from Ubuntu 12.04 (Precise Pangolin), Unity stopped supporting the Intellihide reveal mode for the Unity launcher. However, Ubuntu Tweak can still change the settings so that it does Intellihide, and it works well (at least in Unity 2D) unless you open Appearance Preferences. This is what I have been using to set the mode to Intellihide.  I want to know, what are the commands (like using gsettings, etc.) that I can use to set Intellihide this way because then I won't need to install Ubuntu Tweak just to change the launcher settings.


When receiving calls, I sometime use the default headphone but the sound is too high for me.  I set the volume to the lower, but it's still too high.  How can I define the volume lower than the limited default from android, and if yes, how ?  Info : I don't have a volume parameter on my headphone Info 2 : It's a HTC One S (not One, One S !)  Thanks for your help.

I find that the minimum in-call volume on my HTC Desire is still far to loud on some calls.  Since I got the phone, I have flashed several different custom ROMs, radio updates, etc, and have had the issue throughout.  Do you know of any way (setting, hack, app, whatever) to reduce the minimum volume?  My device is rooted and I am currently running one of the CyanogenMod 7 (Gingerbread) nightly builds.


Does anyone know the name of the book series about a girl who finds out she can turn into a dragon and has to learn how to? She falls in love with a human guy who is fine with her being a dragon and she ends up having to fly to an island where other dragon people are to find them and save their race...

I read it as a paperback around 2009ish. There are at least two books in the series. In the first book, we learn that the protagonist lives up in the mountains. Her people are distrusted by the people in the plains, and I think have either dark or olive skin. She leaves home to learn magic, something I think is rare in the world she lives in. When she arrives, there's a crazy power-hungry man at her destination and she has to hide who she is because otherwise he'd have her killed to prevent her from surpassing him. At some point, she winds up in a set of chambers set into the mountain where she finds a pool of water and carvings about dragons. Somehow, this leads into her learning to become a dragon, I think perhaps after meeting one. I want to say that the sequel got into her having dreams that turn out to be partly prophetic and partly communication.  One of the reasons the book sticks out in my memory is that, despite the mentions of the protagonists dusky skin, the cover depicts a fair-skinned blonde girl, I think holding a glowing globe of light.


A wicked aura around it, I felt as if it was grinning at me   or     A wicked aura around it, I felt as if it were grinning at me   ?

For hypothetical situations, I've read that mostly, it is safer to use "were" for ifs.     If the world were peaceful, there would be no wars.   But, I've also read that for some unhypothetical/past situations, it is correct to use "was".      If he was here, he would have gotten perfect.   That's indicating the past, not the future. "If he were here" conveys a slightly different meaning I believe.  Though it is understandable, it is still quite a blurry line, especially when "as if" comes into place, which is my original question:  For "as if" circumstances, like the one below, is "was" or "were" more appropriate?     He gazed upon the massacre before him with tranquil eyes, as if he was/were a spectator unrelated to it all.   The above does seem to be somewhat hypothetical, so "were" would seem to be the correct answer. However, it also seems like a comparison, as it is comparing a spectator to him.  So, question: For "as if" cases, should you always use "were", and if not, in what situations should "was" be used?


I am creating group of check boxes dynamically and one extra check box also for selecting all group at once that one too is generated dynamically  this is html output  <input type="checkbox" id="all">all
 <input type="checkbox" name="question">a
 <input type="checkbox" name="question">b
 <input type="checkbox" name="question">c
 <input type="checkbox" name="question">d   this is jquery  $("document").ready(function() {     $("#all").on('change', function() {         if ($(this).is(":checked")) {             $("input[type=checkbox][name=question]").prop('checked', true);         } else {             $("input[type=checkbox][name=question]").prop('checked', false);         }     });       });   this is implementation.   It works fine when checkboxes are not generated dynamically  But when they are generated dynamically code has bug  I am able to check whole group but I am not able to check single checkbox  This is dynamically generated code  $('#demo3').on('change', function() {     if ($('input[type=checkbox]:checked')) {         var value = $('input[type=checkbox]:checked').val();         alert(value);         $("#demo3").hide();          $.getJSON("json/question.json", function(jd) {              var size = jd.length;               var table = "

<input id=\"" + "selectall" + "\" type=\"" + "checkbox" + "\"/>" +                     "	Question	Option A	" + "Option B	Option C	" +                             "Option D	Answer
";               for (var n = 0; n < size; n++) {                   table += "
" + "<input name=\"" + "question" + "\" type=\"" + "checkbox" + "\" value=\"" + jd[n].questionid + "\"/>" +                  "	" + jd[n].question + "	" + "" + jd[n].a + "	" + jd[n].b + "	" + "" + jd[n].c + "	" +                         "" + jd[n].d + "	" + "" + jd[n].ans + "
";               }             table += "
";             $('#demo4').html(table);          });      } });  $('#demo4').on('change', function() {     if ($("input[type=checkbox][id=selectall]").is(":checked")) {         $("input[type=checkbox][name=question]").prop('checked', true);     } else {         $("input[type=checkbox][name=question]").prop('checked',false);     }  });

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


I have a response from an AJAX request and depending upon the situation that calls it, I want to either replace the data on the screen, or append new data to the screen.   Two possibilities are as followed:  $('#data').append(response); $('#data').html(response);   I tried to do something like:  var action = "append" $('#data').(action)(response)   That didn't work, how can I do this?

I have the name of a function in JavaScript as a string. How do I convert that into a function pointer so I can call it later?  Depending on the circumstances, I may need to pass various arguments into the method too.  Some of the functions may take the form of namespace.namespace.function(args[...]).


I keep getting a file called "wp-sil.php" uploaded to my one specific folder. When i copy the file to my desktop so I can examine it, it removes itself.  When I open the url sting live on my website, I see the entire folder content and options to delete/edit/modify.  At the bottom there is a signature:   Of course I deleted the file from each folder that I found it in but I am worried it will come back again.  I have changed every password I could think of, changed all ftp access and only have a few people accessing the ftp (to a specific folder), added godaddy's malware protection to scan everything and it came back with nothing. I blocked a bunch of different country's IP addresses.  I back up the files weekly so I am not worried losing anything but it will cause an slight inconvenience if the current live files are effected.  Is there a way to block a filename from being uploaded or block unauthorized uploads in general? Or at least check who is behind this?

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


I am installing a video editing program on 20.04 Focal Fossa but it seems that the package xorriso is missing to end  the installation sucessfully, does anyone know what to write on the terminal in order to install this package or where to download it?

How do I get to the Universe Repository in supported versions of Ubuntu?


I created a directory using the following command  mkdir TEST.  Now I am trying to remove it using  rm TEST and rm TEST/   but it is showing the following error:  cannot remove ‘TEST’: Is a directory and cannot remove ‘TEST/’: Is a directory  Can anyone tell me how to remove this directory using terminal?

How do I delete the following directory?  I typed:  rmdir lampp   This error comes up:  rmdir: failed to remove `lampp': Directory not empty   Is there a command to delete all the files in the directory and delete the directory folder?


It appears to be common practice to not use the first address in a subnet, that is the IP 192.168.0.0/24, or a more exotic example would be 172.20.20.64/29.  The ipcalc tool I frequently use follows the same practice:  $ ipcalc -n -b 172.20.20.64/29 Address:   172.20.20.64          Netmask:   255.255.255.248 = 29  Wildcard:  0.0.0.7               => Network:   172.20.20.64/29       HostMin:   172.20.20.65          HostMax:   172.20.20.70          Broadcast: 172.20.20.71          Hosts/Net: 6                     Class B, Private Internet   But why is that HostMin is not simply 64 in this case? The 64 address is a valid address, right? And whatever the answer, does the same apply to IPv6?  Perhaps slightly related: it also appears possible to use a TCP port 0 and an UDP port 0. Are these valid or used anywhere?

This is a  about IPv4 Subnets.      Related:               How does Subnetting Work, and How do you do it by hand or in your head?  Can someone explain both conceptually and with several examples? Server Fault gets lots of subnetting homework questions, so we could use an answer to point them to on Server Fault itself.   If I have a network, how do I figure out how to split it up? If I am given a netmask, how do I know what the network Range is for it? Sometimes there is a slash followed by a number, what is that number? Sometimes there is a subnet mask, but also a wildcard mask, they seem like the same thing but they are different? Someone mentioned something about knowing binary for this?


Am developing a certain management system, however i have a problem. Every time i launch the system it keeps showing it's self in the toolbar meaning it runs many times instead of running once.... Is there any way I can create a launcher that checks if an instance of program is already running, if it's running to prevent it from opening another instance.. The image below show what i want to avoid....

Sometime I see many application such as msn, windows media player etc that are single instance applications (when user executes while application is running a new application instance will not created).  In C#, I use Mutex class for this but I don't know how to do this in Java.


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


It's well known that in the Harry Potter's world, at least two very powerfull wizards, namely Dumbledore and Harry Potter himself, do wear spectacles.  Since there are spells that can modify some how their physical look, or transform their body. Why can't they just temporally or permanently improve their eyesight.

Is there some in-Universe (or somewhat canonical) explanation for why Harry wears glasses - either 100% of the time, or at least, when playing Quiddich?  Surely, given assorted spells, there should be one to repair either the issues with his near-sightedness, or, more likely, to act as lenses (being how magic is used to replace ANY technology, it ought to be able to replace lense-making).   P.S. I seem to recall a spell to make someone see better from afar, but not sure of the details.


Currently I have laptop with 16GB of RAM and 512GB SSD. I always use "full encrypted disk" option in installation creator which automatically create 16GB swap partition. Now I want to buy laptop with 32GB of RAM and I guess creator will try to make 32GB swap partition. Do I really need such big partition for occasional hibernation? I mean, does it really dump whole 32GB into swap or only real used memory which often will be much much less? Can I reduce swap partition size after installation? I have also vm.swappiness=1 instead of default 60  I'm reading that ubuntu 18.04 has option for swap file instead of partition so maybe I should wait for KDE Neon LTS based on 18.04 (current release which I'm using, is still on 16.04)

I'm going to install 64 bit 14.04 on a new machine with something like 1 to maybe 128GB RAM and even more RAM later. How much space should I allocate to the swap partition?   And especially: WHY those recommendations for these numbers?    (None of the existing answers  and  explain any of the why and are a bit dated if we look at 1GB or RAM and up)


The geometric series $\sum_{k=0}^{\infty}2^{-k}$ converges to 2. Use Theorem 6.3.6 to show that the series $$\sum_{k=0}^{\infty}(k+1)2^{-k}$$ converges to 4.  Theorem 6.3.6 states: Let $\sum_{k=0}^{\infty}a_k$ and $\sum_{j=0}^{\infty}b_j$ be two absolutely convergent series. Then $$(\sum_{k=0}^{\infty}a_k)(\sum_{j=0}^{\infty}b_j)=\sum_{n=0}^{\infty}\sum_{k=0}^{n}a_kb_{n-k}$$ where the series on the right also converges absolutely. From reading other questions, it looks like this is called the Cauchy product.  It seems like a good first step to assume $2^{-k}$ will be playing the role of $a_k$ here. Then I am looking for something to play the role of $b_j$ such that $\sum_{j=0}^{\infty}b_j$ converges to 2 and such that $k+1$ emerges from the $b_{n-k}$ terms.  I'm thrown off by the inner sum. It seems like something along the lines of $$b_j=\frac{(b+1)!}{b!}$$ could lead to the $k+1$ emerging, but this would make $\sum b_j$ a divergent series.  Is my choice of $a_k$ reasonable? Is there a different way I should be thinking about $b_j$?  This is not a duplicate of  because this problem requires use of a theorem that is not used in the linked question.

How can I evaluate $$\sum_{n=1}^\infty\frac{2n}{3^{n+1}}$$? I know the answer thanks to , but I'm more concerned with how I can derive that answer. It cites tests to prove that it is convergent, but my class has never learned these before. So I feel that there must be a simpler method.  In general, how can I evaluate $$\sum_{n=0}^\infty (n+1)x^n?$$


I am trying to install Ubuntu with windows8 -dual boot, But I want to install Ubuntu on separate partition, like my windows 8 installed on C drive and i want to install Ubuntu on D drive. Tell me the installation steps.

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


I have an expression x = $a^b$ [mod N]. Knowing the values of x, a and N, will it be possible for me to find b?

If values $a$, $b$, and $c$ are known, is there an efficient way to find $x$ in the equation: $a^{x} \bmod b = c$?  E.g. finding $x$ in $128^{x}\bmod 209 = 39$.


"For a reference to be valid, the three letter group must be one of ‘ACT’, ‘ABQ’, ‘ ‘BDE’. Anything else is invalid."  My code is below but it doesn't seem to be working as intended. Could somebody please point me in the right direction. Thanks.  if (isset($webdata['bookingreference'] )) {     if (!preg_match("[ABQ,ACT,BDE]{1}[-]{1}[1-2]{1}[0-9]{3}", $webdata['bookingreference'])) {         $formerror['bookingreference'] = '<span class="warn" >Not valid on server: The ref must start with ABQ, ACT or BDE, followed by a hyphen, then either the numbers 1 or 2 followed by two more numbers 0-9';         $valid = FALSE;

I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


I'm a beginner to C++ (coming from Java).  I'm trying to wrap my head around normal variables, pointers, and references. Normal variables I get. Pointers too. References confuse me a bit.  I think I understand the idea behind references: firstly, they are 'automatically dereferenced' pointers. Instead of having to do *pointer = something, pointer->doStuff() (which is syntactic sugar for (*pointer).doStuff()) and similar stuff, we can simply do reference = something, reference.doStuff(), etc.  Secondly, they are 'safer pointers', in that they can't be re-seated and you can't do arithmetic on them.  But there's one last thing I want to be sure about:  I'm pretty sure that where ever a reference variable appears in an expression or statement, it 'automatically' gets translated into the name of the variable it's referencing. So wherever I see the name of a reference, I can regard it as the name of the variable being referenced, and that would be correct.  Which means: you never operate on references, you always operate on the objects they reference. You can't store references, you always store the objects they reference. Etc.  Is this assumption accurate?

I know references are syntactic sugar, so code is easier to read and write. But what is the difference between a pointer variable and a reference variable?


I am currently reading this  blog, where it talks about Backprop through time. I am struggling to derive it and don't understand how to go about such derivations in general.  Stuff like this ends up being a pain point in most literature related to ML/DL/AI. Is there any resource that explains derivatives of different objects of higher dimensions in detail with proper examples.

I've noticed lately that a lot of people are developing tensor equivalents of many methods (tensor factorization, tensor kernels, tensors for topic modeling, etc) I'm wondering, why is the world suddenly fascinated with tensors? Are there recent papers/ standard results that are particularly surprising, that brought about this? Is it computationally a lot cheaper than previously suspected?  I'm not being glib, I sincerely am interested, and if there are any pointers to papers about this, I'd love to read them.


I entered Europe with a USA passport on May 3rd for a 90-day stay. I am wondering what exact date I have to leave Europe. How do I determine my exact cut off date?

Some destinations have a "90/180 rule" which says you can come and go but you must not spend over 90 days out of any 180 days in the area.  concerns this rule.  At least Schengen and Turkey have this rule, probably depending on where the traveller is from and what kind of visa they apply for.  Maybe I'm a dummy but I've always had a lot of trouble trying to add up how many days I've spent in such places when I've entered and left several times over recent months.  Is there an easy way to do this I'm missing or is it difficult for everybody? I'm guessing something based on counting backwards from the end date might be the trick?  Maybe you know of an app or website that can do this for you.


I've heard that flash could "freeze" a scene. Let's say that we shoot a scene where people moving a lot, is flash able to even "freeze" it at slow shutter speed, i.e. 1/30th ? Assuming that people are in the flash range, i.e. flash could reach them easily. Is flash very effective at eliminating the motion blur ?  On a side note, is flash also good at reducing camera shake ?  Thank you.

Why does a flash freeze a picture even if I use a shutter speed like 1/10 sec?  I don't understand it, because the light will hit the sensor the whole time, not just when the flash is fired.


I have a script which is every minute detecting new files in a folder and parsing them.  Lately I have had issues with big files. The parser hangs out if the file is very big.  So I am splitting them if the size is too big. I am using this command for that:  split -n l/5 -d filename filename   I calculate the chunk number dividing the size by an acceptable size for the parser.  Now it comes the tricky part. The first two lines of the file I am splitting are very important and I need to add those two lines at the top of the resulting files.  It would be great if I can do it in the same command line somehow parsing the resulting split files... Size is variable and I can have 20 new files or just 2 so I cannot foresee the which is the original file of the resulting files.

I need to split a .txt file into smaller ones containing 100 lines each, including the header. I don't know if this is relevant, but the original file is delimited like this:  COLUMN1 | COLUMN2 | COLUMN3 1 | 2 | 3 4 | 5 | 6 7 | 8 | 9   I need every file generated from this split to have the header line. Also, they need to be generated in/moved to another directory and follow a name pattern, like file_01.txt, file_02.txt, etc


I need to show that $$\int_0^1 x^{-x} \mathrm  dx = \sum\limits_{n = 1}^\infty n^{-n}$$   I tried using that $x^{-x} = e^{-x\ln(x)}$, but I don't know what to do about when $x = 0$ since the equality does not hold. I also tried using the power series expansion of $e^x$, but I don't really know where to go from there. Any help would be appreciated.

In the solution of the so-called , one of the key steps is to compute $$\int_0^1 x^n (\log x)^n~\mathrm dx$$ using the change of variables $x = \exp\left(-\frac{u}{n+1}\right)$ to obtain the Gamma function.  This substitution to me, looks like it was pulled out of thin air. Can someone help me motivate it? How would I have thought of this substitution?


Movie Player lists names of last few movies played.   How to delete that list ?   Going forward, I'll use VLC.  But I'd like to clear that viewed movie history list.

How do I delete totem's history displayed in it's main menu in Natty? For example if I don't want anyone to know I'm watching... ehem Simpsons a lot?  I've tried  but this doesnt work for Totem.


I have 2 different windows, my main window created in my first file and a QDialog window where the code is located in a second file... What I want to do is to be able from file2 to close the main window created in file1, close also the QDialog from file2 and create a new window in file3. The application must NOT quit.  Creating a new window with the code in file3 would be easy, I am not worried about that... The problem is that in file2, I'm unable to tell the main window to close.  Here is the code from the 2 files to be more clear...  main.py:  from PyQt5.QtWidgets import * from PyQt5.QtCore import * from PyQt5.QtGui import QRegion, QPalette, QPixmap, QBrush import creation_partie # import sys   class Menu(QMainWindow):     def __init__(self):         super(Menu, self).__init__()       # *SOME OTHER CODE NOT NEEDED FOR THIS QUESTION*          self.init_ui()         self.setWindowTitle("Bienvenue dans Skip-Bo!")       # *SOME OTHER CODE NOT NEEDED FOR THIS QUESTION*       def center(self):         # *SOME OTHER CODE NOT NEEDED FOR THIS QUESTION*      def quitter(self):         self.close()      def creer_nouvelle_partie(self):         self.fenetre_creer_une_partie = creation_partie.NouvellePartie()         self.fenetre_creer_une_partie.setModal(True)         self.fenetre_creer_une_partie.show()      def next_step(self):         pass      def init_ui(self):         # --------------- Paramètres de la fenêtre --------------------         self.resize(1280, 720)         self.center()         self.background_picture2.load('background_menu2.png')         self.palette.setBrush(self.backgroundRole(), QBrush(self.background_picture2))         self.setPalette(self.palette)         # self.background_picture.setStyleSheet("background-image: url(background_menu.png);")         # self.setCentralWidget(self.background_picture)         # self.background_picture.setScene(self.scene)         # # --------------- Fin des paramètres -------------------------          # *SOME OTHER CODE NOT NEEDED FOR THIS QUESTION*   if __name__ == '__main__':     app = QApplication([])     menu = Menu()     menu.show()     app.exec_()   creation_partie.py:  from PyQt5.QtWidgets import * # from PyQt5.QtCore import * # from PyQt5.QtGui import QRegion, QPalette, QPixmap, QBrush import main  class NouvellePartie(QDialog):     def __init__(self):         super(NouvellePartie, self).__init__()         # *SOME OTHER CODE NOT NEEDED FOR THIS QUESTION*         self.init_ui()      def init_ui(self):         # --------------- Paramètres de la fenêtre --------------------         self.resize(640, 325)         self.center()         # *SOME OTHER CODE NOT NEEDED FOR THIS QUESTION*      def texte_change(self):         # *SOME OTHER CODE NOT NEEDED FOR THIS QUESTION*      def center(self):         # *SOME OTHER CODE NOT NEEDED FOR THIS QUESTION*      def annuler(self):         self.close()      def confirmer(self):         print("Yup")         # send informations to the server backend of the game         self.close()         main.menu.close()     if __name__ == '__main__':     app = QApplication([])     nouvelle_partie = NouvellePartie()     nouvelle_partie.show()     app.exec_()   So... what I want to do, is that in the fonction confirmer in creation_partie.py be able to close menu from main.py. menu is a QMainWindow and fenetre_creer_une_partie is my QDialog.  Right now, the code compile and run fine until I click on the button that should close menu. PyCharm is not raising compiling error formain.menu.close()`, but when the code is about to be executed (at the moment I click my button), I get the following error:  module 'main' has no attribute 'menu'   How can I fix that?  P.S.: Sorry for the french variable and class names, I a french Canadian :) .  Thanks!  EDIT: Since the question has been closed, I will put my solution here: Basically, I created a function in ˙main.py˙ out of the class which close the main window. After that, the only thing I needed was to call that function in ˙creer_partie.py˙ by using ˙main.my-closing-function˙.

Given the following code, what does the if __name__ == "__main__": do?  # Threading example import time, thread  def myfunction(string, sleeptime, lock, *args):     while True:         lock.acquire()         time.sleep(sleeptime)         lock.release()         time.sleep(sleeptime)  if __name__ == "__main__":     lock = thread.allocate_lock()     thread.start_new_thread(myfunction, ("Thread #: 1", 2, lock))     thread.start_new_thread(myfunction, ("Thread #: 2", 2, lock))


Consider two light sources A and B. Exclude things like scattering. Without any kind of barrier A can send light to B and vice versa. I'm looking for some kind of material or setup where A can send to B but not B to A. I'm not much into physics and optics. I'm aware of one way mirrors but I don't know how much it blocks. Are there (practical) alternatives and how much of the reverse channel will they block?

I am not talking about mirrors, just a plain window made of glass like material. Would it be possible to allow light pass only in one direction but not the other?


const realNumberArray = [4, 5.6, -9.8, 3.14, 42, 6, 8.34];  const squareList = (arr) => {   "use strict";   const squaredIntegers = arr.filter( (num) => num > 0 && num % parseInt(num) === 0 ).map( (num) => Math.pow(num, 2) );   return squaredIntegers; };  const squaredIntegers = squareList(realNumberArray);  console.log(squaredIntegers);

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


[ P ( n ) = ∑ gcd(k,n) for k=1 to n   is equivalent to    P(n)=∑d * φ(n/d) for all d such that d is divisor of n and phi is euler totient function.   ]

I want to find this  $$ \sum_{k=1}^n \gcd(k,n)$$  but I don't know how to solve. Does anybody can help me to finding this problem.  Thanks.


Just looking for a quick, non-mathematical answer.  So the speed of light (c) is the fastest that anything can travel. Is c defined as the speed of light or is c a universal constant that nothing (including light) can travel faster than? Is the speed at which photons travel the limit, or is the limit something else that also limits the speed at which photons travel?  So if in some alternate universe, light travelled at 50% of the speed it did in our universe (for some hand-wavium reason, all other things being equal), would we also be limited to this new speed of light or would the maximum speed be the same as in our universe?   the questions: Is it light that we cannot go faster than or some universal constraint which also constrains light?

I will try to be as explanatory as possible with my question. Please also note that I have done my share of googling and I am looking for simple language preferable with some example so that I can get some insight in this subject.  My question is what is so special about $c$? Why only $c$. Its like chicken and egg puzzle for me. Does Einstein reached to $c$ observing light or does he got to light using some number which turned out equal to $c$.   Why is $c$ not relative. If something has zero rest mass like a photon why they only travel at $c$ in vacuum and not with $c+1$ or $c-1$?


I've been trying for ages now to get Juju to bootstrap with my private OpenStack installation. Starting with 1.11 I've been stuck with this error during bootstrap:  error: cannot start bootstrap instance: no "precise" images in RegionOne with arches [amd64 i386]   In 1.11 I was able to use 'juju image-metadata' to create the index.json and imagemetadata.json files for upload to Swift (though I still never got past the error), but this command no longer exists in 1.13, and I can't find any mention of a replacement.  Is there a way to bootstrap a private OpenStack cloud with Juju 1.13? And if so, is there any documentation to guide me through from scratch? I'm eager to learn how to develop Juju services, but I can't even get it bootstrapped!  ** Edit: The primary issue is that the 'juju image-metadata' is missing, so I'm not able to follow the instructions in the linked question. Is there a replacement to 'juju image-metadata'?  * I have tried both commands, both report as missing. Thanks for your help so far!

I am having an issue with installing Juju and bootstrapping. I have the Swift storage setup, and the new bucket gets created. The tools have been synced, and all that looks fine.   However when I attempt to bootstrap I get the error: "Cannot start bootstrap instance: no "precise images in RegionOne with arches."   In another bucket [Glance] I do have the Percise AMD64 image within it. I've even added the line for the "public bucket url." However, juju is still having this same issue.  Error:   juju -v bootstrap 2013-07-31 22:08:05 INFO juju provider.go:115 environs/openstack: opening environment "openstack" 2013-07-31 22:08:06 INFO juju provider.go:417 environs/openstack: bootstrapping environment "openstack" 2013-07-31 22:08:16 INFO juju tools.go:26 environs: reading tools with major version 1 2013-07-31 22:08:16 INFO juju tools.go:53 environs: filtering tools by series: precise 2013-07-31 22:08:16 INFO juju tools.go:76 environs: picked newest version: 1.10.0 2013-07-31 22:08:28 ERROR juju supercommand.go:235 command failed: cannot start bootstrap instance: no "precise" images in RegionOne with arches [amd64 i386] error: cannot start bootstrap instance: no "precise" images in RegionOne with arches [amd64 i386]   The version that I am using is: 1.11.4-raring-amd64  My entire environments file is: [I removed all of the bits about MAAS, Amazon, and local]  default: openstack  environments:   openstack:     type: openstack     admin-secret: f[...]2     control-bucket: juj[..]2a     auth-url: http://127.0.0.1:5000/v2.0/     # default-series: precise     auth-mode: userpass     username: admin     password: [XXXX]     tenant-name: admin     region: RegionOne     public-bucket-url: https://swift.canonistack.canonical.com/v1/AUTH_526ad877f3e3464589dc1145dfeaac60


I deleted ubuntu partition from windows 7 hard disk partitions. But i fear when i restart my machine it will go into grub rescue. Any solution to avoid this.? Mix mbr /grub

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


I am in the process of writing (down) our companies coding standards for Delphi programming, so what would anyone suggest to have as a basis, anything that you would recommend to use / not use ?

What Delphi coding standards document(s) do you follow?  Our company is looking at putting some better coding standards in place, to improve our code’s readability, reviewability, and maintainability.  We’ve come across CodeGear’s “Object Pascal Style Guide”, but it hasn’t been touched in quite a while and I imagine a number of people have made some local improvements or additions.  I’ve come across some published variations and other documents, which I will list, below.  NB: I do not want to start a style war.  I just want to know what standards you follow, and why.  Thanks.   UPDATE:  Well, the "JCL Delphi Language Style Guide" seems to be the clear winner!  Thanks!


Let $D$ be an integral domain , let $S$ be a multiplicatively closed subset of $D$ not containing zero , then w.l.o.g. by natural embeddings , we can think of $D$ as a subring of $S^{-1} D$ which is further a subring of the fraction field of $D$ . Now if for every $q \in S^{-1} D , \exists $ monic $P_q(X) \in D[X] $ such that $P_q(q)=0$ , then is it true that every element of $S$ is a unit of $D$ ?

Let $R$ be a commutative ring and let $S\subseteq R$ be a multiplicative closed subset containing 1.     I need to show that if $S^{-1}R$ is integral over $R$, then $S^{-1}R=R$.   I don't see how to get started.


proof the integer: From Fermat's little theorem, if $\gcd(a,p) = 1$, then we have: $a^p \equiv a \pmod p$. Since $p$ is only divisible by itself and 1, so we have: $1^p+2^p+3^p+...+(p-1)^p \equiv 1+2 + ...+ p-1 \pmod p$  $\equiv p(p-1)/2$. Since p is odd prime, $p -1 = 2k$. So we have:  $p(p-1) = kp\equiv 0 \pmod p$. Therefore $L_p$ is an integer.  The question is how can I generalize the integer $L_p$ for all odd integers $p$. That is, in the expression for $L_p$ replace the exponent $p$ with another non-constant quantity depend on $p$ in a way that $L_p$ remains an integer for all odd integer $p$, and justify the choice of exponent.

How can I prove that $2017 \mid 1^{2017}+2^{2017}+\dots+2017^{2017}$? I tried proving it with the use of modulo, however it was to no avail. Afterwards, I  tried researching, for possible theorems, that may help, but that bore no fruit, either. Can you guys please help me proving it, as I am stuck? Thanking you in advance.


I have a simple class containing a static attribute. There are two static methods in this class: one to get the static attribute and the other to initialize it. Yet when call the static method the compiler reports an error.  The class:  class Sudoku {     Cell Grid[9][9];     int CurrentLine;     int CurrentColumn;      void deleteValInColumn(int val, int col);     void deleteValInRow(int val, int row);     void deleteValInBox(int val, int x, int y);     static int unsetted; //! public:     static void IniUnsetted() { //!         unsetted = 0;     }     static int GetUns() { //!         return unsetted;     }     Sudoku(ini InitGrid[9][9]);     void Calculate_Prob_Values();     Cell getCell(int x, int y);     QVector<int> getPossibleValues(int x, int y);     bool SolveIt(); };   This is the error I get:  In member function 'bool Sudoku::SolveIt()': no return statement in function returning non-void [-Wreturn-type] In function `ZN6Sudoku6GetUnsEv': undefined reference to `Sudoku::unsetted` error: ld returned 1 exit status

What is the best way to initialize a private, static data member in C++?  I tried this in my header file, but it gives me weird linker errors:  class foo {     private:         static int i; };  int foo::i = 0;   I'm guessing this is because I can't initialize a private member from outside the class.  So what's the best way to do this?


That doesn't make any sense to me. I do not have a tmp folder anywhere outside the root. I cannot find the /tmp folder supposedly outside the folder where my Drupal instance is located. Well, let me correct that. I found one, but placing the recommended .htaccess file in it didn't solve the error message. It didn't seem to be the correct tmp directory. Maybe I don't fully understand where outside the root dir is at? Isn't it the directory above where the installation is at? Is it in the html folder, the sites folder, or above the html folder?  Will the instructions in  work if I create a tmp folder in the html folder? Where exactly do I create the tmp directory?

I just upgraded to 7.25 from 7.19, and now in my Status Report I have a red X on my "Public Files" and "Temporary Files".     See  for information about the   recommended .htaccess file which should be added to the   sites/default/files directory to help protect against arbitrary code   execution.   I go to the address above, but I don't have any user friendly explanation of what to do to fix this. Thanks in advance.  Update: (1/8/14)  The answer below fixes the Public files problem 100%.  It does not fix the Temp files. To fix temp files, I go to admin/config/media/file-system and change the path from /tmp to ../tmp  I will update this if this is fixed in a newer version of drupal, or if there is another fix available. I'm not sure if the ../tmp is the correct solution, but it works.


What's the best way to delete all files and dirs inside a folder without deleting the folder itself using python? Using:  if os.path.exists("path/to/folder"):     shutil.rmtree("path/to/folder/*")   Won't to the trick since the rmtree() doesn't understand UNIX style (/*). rmtree itself is fine, but it deleted the folder too, which I don't need.

How can I delete the contents of a local folder in Python?  The current project is for Windows, but I would like to see *nix also.


$(a)$ Suppose $p$ and $q$ are points on the unit circle such that the line through $p$ and $q$ intersects the real axis. Show that if $z$ is the point where this line intersects the real axis, then $z = \dfrac{p+q}{pq+1}$.      $(b)$ Let $P_1 P_2 \dotsb P_{18}$ be a regular $18$-gon. Show that $P_1 P_{10}$, $P_2 P_{13}$, and $P_3 P_{15}$ are concurrent.   I already proved part $(a)$, and used it to prove part $(b)$ by making the diameter of the $18$-gon one unit and defining $P_1 P_{10}$ as the real axis and then plugging both $P_2 P_{13}$ and $P_3 P_{15}$ into $p$ and $q$ to get $$ z_{1} = \dfrac{\mathrm{e}^{\mathrm{i}\frac{\pi}{9}} + \mathrm{e}^{12\mathrm{i}\frac{\pi}{9}}}{\mathrm{e}^{\mathrm{i}\frac{\pi}{9}} \cdot \mathrm{e}^{12\mathrm{i}\frac{\pi}{9}} + 1} $$ and $$ z_{2} = \dfrac{\mathrm{e}^{2\mathrm{i}\frac{\pi}{9}} + \mathrm{e}^{14\mathrm{i}\frac{\pi}{9}}}{\mathrm{e}^{2\mathrm{i}\frac{\pi}{9}} \cdot \mathrm{e}^{14\mathrm{i}\frac{\pi}{9}} + 1} \;. $$ Then, I set $z_{1}$ and $z_2$ equal and simplified to get $$ 0 = \mathrm{e}^{8\mathrm{i}\frac{\pi}{9}} - \mathrm{e}^{6\mathrm{i}\frac{\pi}{9}} - \mathrm{e}^{5\mathrm{i}\frac{\pi}{9}} + \mathrm{e}^{3\mathrm{i}\frac{\pi}{9}} + \mathrm{e}^{2\mathrm{i}\frac{\pi}{9}} - 1 \;. $$ However, I can't seem to get past this part to get something like $0=0$ that proves part $(b)$. Any tips?

Let $X_1 X_2 \dotsb X_{18}$ be a regular 18-gon. Show that $X_1 X_{10}$, $X_2 X_{13}$, and $X_3 X_{15}$ are concurrent.   What would be the best way to prove this? I am actually struggling understanding 'concurrent' as I am not sure how they are concurrent in a regular 18-gon


For example: "I'm trying to protect myself from the brainwashing aliens."   My idea is that against seems like a stronger word to me. Making the item or topic at hand seem more... how should I say... of a negative thing? Not clear. But I also know it's more common for people to say, for example "I'm trying to protect myself from you/the aliens."  Any advice would be greatly appreciated.

The Longman dictionary suggests two options regarding the word 'protect': protect somebody/something from something and  protect somebody/something against something/  Examples: The cover protects the machine from dust. Physical exercise can protect you against heart disease.  According to the examples, I believe that the verb 'protect' takes  against' when you are talking about something which is not tangible, whereas the preposition 'from' is used with words that can be seen or touch. Am I correct? If not, how to know which preposition is necessary?


I've slowly been getting better at blender but one thing that annoys me a lot is that when i press F12 to render my scene, well, it's all pixelated.  Examles:   So this here is something i was testing out, and this is when i press Shift+Z    So that's fine and all but then i go to F12 and i get this:   Now, i have read other peoples posts, and they call say "duplicate" and they all have answers, now honestly it annoys me that none of them have a good answer that actually would aid this. I've read all the things i could find, and some of the "Similar questions" and some people have the same problem as me, but i doubt there is nothing i can do?  TL;DR Want to make my renders not pixelated so i can make the low-poly scenes i've been making better. So i can actually zoom in without seeing pixels.

When I hit F12 to render an image and zoom in it is quickly pixelated. How can I render a higher res display? I have looked through the settings and couldn't find a solution.


Downloaded 16.04.2 desktop from web. Created disc with Roxio. Searched questions but could not find installation instructions (for desktops) Currently running Vista on a Compac Presario SR2180NX How do I install Ubuntu using the file download OR the disc? ty

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


could we use Redhat High availability Add-On on CentOS 5.8 server? in other words should we purchase a license for Redhat high availability clustering for CentOS 5.8 or its included in CentOS without any charge?  We are going to have a clustering in a project and Redhat clustering add-on is required. i want to know that could we use CentOS with clustering instead of purchasing redhat OS and its Add-On licenses?  Thanks in Advance

This is a  about Licensing.    Questions on licensing are off-topic on Server Fault.  If your question has been closed as a duplicate of this question, then this is because we want to help you understand why licence questions are off topic rather than just telling you "it just is". In all likelihood, this question will not address your question directly, it was not meant to.    I have a question regarding software licensing. Can the Server Fault community please help with the following:   How many licenses do I need? Is this licensing configuration valid? What CALs do I need to be properly licensed? Can I run this product in a virtual environment? Can I downgrade this product to an earlier version? Am I entitled to feature X with license Y?