PyQGIS make screenshot of mapCanvas after setExtent is called

I have the following function:  def createScreenshots(layer):   counter = 0   for feature in layer.getFeatures():     counter += 1     point = feature.geometry().asPoint()     qgis.utils.iface.mapCanvas().setCenter(point)     qgis.utils.iface.mapCanvas().refreshAllLayers()     qgis.utils.iface.mapCanvas().saveAsImage("D:\\\\m\\testing\\" + str(counter) + ".png")   Screenshots are not in real coordinates, .pgw header is not in right coordinates, therefore resulting png images are shifted.  Question: How to wait for rendering of canvas after setCenter is called?


I am new to Javascript. Need help in understanding and dealing with private members of class in Javascript. After going through few concepts related to private members in JS, I have typed a small basic program as per my understanding. All I need to know, is this a valid one especially when accessing the private members. Would be a great help if anyone helps and provide suggestions  class Person {        constructor(name,age_value){           this.name = name; // public instance variable        let age = age_value; // private instance variable        // public instance method, thus acting as a getter       this.displayAge = function(){           console.log('age using getter = ', age);        }    }     displayInfo(){       console.log('name = ', this.name);        // console.log('age outside constructor = ', age);       this.displayAge();    }     }  const person = new Person('john', 30); person.displayInfo();


Is creating a vector image from a photograph breaking any copyright law?  I've created a new vector image from a low quality photo, which I downloaded from a Pinterest page. I would like to use the vector image in a logo. It contains stylised lines and is not a perfect match, but it's my interpretation of it.  Am I breaking any copyright laws?  This is the Vector (Top), and photo (below)   I've tried to find out who owns the original photo, but this has been difficult to obtain.


correct password; but it will not open my account

I started up my ubuntu and it lead to a login prompt. I input the correct password for the account. It went to a black screen for a flash, but it made the default "bongo" error sound and aborted back to the same prompt. No error was displayed.  I know this is the right password, because inputting any other password will make the prompt say "Invalid Login". Only the correct password causes the error.  Also, on that note, my account is set to automatic login.  What can be done to fix this?


How do I recover or "undelete" files that I accidentally deleted?

I've accidentally deleted some really important files on my machine, and I'm looking to find out how to recover them.  Using the Trash bins "restore" isn't an option, as the files aren't there (mostly likely I wasn't paying attention and permanently deleted them from there).  Is there any way that I can un-delete these files?


Automatic indentation in tabularx after line break

Similary to this  after breaking (automatically, or manually with \newline) lines in a tabularx environment I would like to obtain an automatic indentation of the second, new line. So something like \begin{tabularx}{\textwidth}{X} Some very long text here such that it spreads over the whole textwidth and even beyond. LaTeX will automatically break the line at some point but lets say we do it manually here \newline then THIS part should be indented by, idk, 5pt. (should also happen when tabularx breaks the line automatically) \end{tabularx}  Thank you very much!


Do 2 instances of the Booming Blade spell stack on the same creature, in terms of the damage it takes if it moves willingly?

I'm creating a NPC for a campaign that is a sorcerer using a longsword and the  spell (SCAG, p. 142). With the  option Quickened Spell, this NPC can cast booming blade twice per turn.  Do 2 instances of booming blade stack? I mean the part that reads:     If the target willingly moves before then, it immediately takes 1d8 thunder   damage, and the spell ends.   If the NPC casts booming blade twice on the same target on their turn (once as a bonus action using Quickened Spell, and once normally as an action) and hits with both attacks, will the target take damage from both castings if it moves willingly?


I want to look into the source code behind the command cd, but cd doesn't seem to have its own package so which package is it in?


Is it idiomatic to say "take off - of"? For example:  Don't take your headband off of your head.


Empty revision possibly after approving suggested edit by post owner

Looks like  is a bug with a  that leads to empty revision #3:        The text says that "39 characters were deleted " is exactly the same count as actually deleted by revision #2.  Original post tagged  was made by @Qwertiy on ruSO.Meta:


Convergence test of the series $\sum\sin100n$

I need to prove that $$\sum_{n=1}^{\infty} {\sin{100n}} \; \text{diverges}$$ I think the best way to do it is to show that $\lim_{n\to \infty}{\sin{100n}}\not=0$. But how do I prove it?


Can I tell Windows 10 - 'If I close the lid on my laptop, go to sleep IF I don't have an external monitor attached'?

I am aware of the following SuperUser questions:       Neither of these have useful answers, and are also both quite old.  In the current version of Windows 10, is there a way to tell Windows to sleep only if the lid is closed and there are no external monitors attached?  In work, I like to close the lid and attach a couple of monitors, at home I just use the laptop as-is.  Sometimes I close the lid before I leave for home, forgetting it's actually still running, and take my laptop out of the bag when I get home to discover it is radioactive hot!  The laptop is a Dell XPS 9550, if that helps.  Thanks


My paper is not shown in my Google Scholar profile

It has been a month since my paper was accepted and published. The paper is not yet assigned to any issue in the journal, but it is published and available via springer.com. The paper is in the Google Scholar list of papers for the corresponding author, but it is not yet shown in my list of papers. When I search for it, no result is returned  What is the problem?


Proving whether ideals are prime in $\mathbb{Z}[\sqrt{-5}]$

I am working with the ideals $\mathfrak{p}=\left<2,1+\sqrt{-5}\right>, \mathfrak{q}=\left<3,1+\sqrt{-5}\right>, \mathfrak{t}=\left<3,1-\sqrt{-5}\right>$ and I am trying to prove that they are prime in $\mathbb{Z}[\sqrt{-5}]$.  I understand a good method to do this involves taking norms of each element that generates the ideals. This gives, for instance, the norms of the generators of $\mathfrak{p}=4,6$. These are both divisible by $2$. I have also calculated $\mathfrak{p}^2=\left<2\right>$. I get the feeling that since both norms are divisible by the generator of the ideal squared this proves it is prime, but I am not quite sure why.   In a similar vein, the norms of the generators of $\mathfrak{q,t}=9,6$ which are both divisible by $3$. I know $\mathfrak{qt}=\left<3\right>$, but I am not sure if this is relevant, since it is not either ideal squared. I think the norm of the ideal itself being prime implies the ideal is prime, but I am not sure how to find the norm of the ideal from the norm of its generating elements.  This question is similar to: , but I don't quite understand the reasoning behind the chosen answer. I am not sure how the answerer deduces that the example there is prime either. Following their reasoning as far as I can, the  fact that $2$ divides both norms means that $\left<2\right> \subset \mathfrak{p} \subset \mathbb{Z}[\sqrt{-5}]$ but I'm not sure how, and then I don't know how this proves it is prime.


I want to connect two laptops with a crossover Ethernet cable, in order to synchronize them with ntp. One laptop runs Windows 7, the other one Ubuntu.   On Ubuntu, in order to assign a static IP address to an interface, I just do:  sudo ifconfig eth0 10.0.0.100 netmask 255.255.255.0   Is there a similar way for Windows, from the cmd?


Could we see maximum of reputations of upvoters?

There are many new question, even limited to a field. A new method, to see which one is interesting, could be to display the reputation of the person who upvoted and has the largest reputation among upvoters. (Or, to protect privacy, some rounding of this number.) Then new questions could be filtered using this upon demand, or everyone could see the ones already upvoted by someone whose reputation is at least 10% of his own reputation.


How do I know which NVIDIA driver I need?

I need to use NVIDIA drivers, and I used the nvidia-smi command to check which NVIDIA I have, but this was the output: Command 'nvidia-smi' not found, but can be installed with:  sudo apt install nvidia-utils-390  # version 390.138-0ubuntu0.19.10.1, or sudo apt install nvidia-utils-440  # version 440.100-0ubuntu0.19.10.1 sudo apt install nvidia-340        # version 340.107-0ubuntu7 sudo apt install nvidia-utils-430  # version 430.50-0ubuntu2 sudo apt install nvidia-utils-435  # version 435.21-0ubuntu2  Any clue which one to install? I am running on Ubuntu Live on a , but let me know if you need any more information about my system


Lightning Lure / Falling Damage Question

So I'm playing a Variant Tiefling from the SCAG, and I took the Winged trait. I also took the Lightning Lure cantrip, so that I could combine LL's 1d8 lightning damage with the 1d6 bludgeoning damage falling. Now with the background out of the way, my question is this:  When would the creature fall? Would it fall immediately after my turn, or would it hang in the air until its turn?


Grands a Gift or Magic Item Ability Bonus skill points retrospectively

I just met Noctucular and she grants me an ability bonus +6 as a gift. According to  all bonuses with a duration of more than 1 day will give a more skill points and all the other stuff. But what is going to happen when I piss off Nocticular and she withdraws the gift? (Same goes for artifacts or magic items, what is going to happen when my Headband of Vast Intelligence is destroyed or stolen). Should I therefore notice what skill points I put where for what reason so I can substract it later, if needed?


force HTTP to HTTPS Centos 6.7 and Apache not working correctly

I tried adding to the .htaccess file  RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://mywebsite.com/$1 [R=301,:]   I also tried (in the httpd.conf file)  <VirtualHost *:80>  RewriteEngine on  ReWriteCond %{SERVER_PORT} !^443$  RewriteRule ^/(.*) https://www.mywebsite.com/$1 [NC,R=301,L] </VirtualHost>   When I try to access the site via www.mywebsite.com it tries to load from https:// 192.xxx.xxx.xxx address  I am able to access it via https://mywebsite.com  Any ideas what I am doing wrong or not setting?  Thanks


Does zero curl imply a conservative field?

A field that is conservative must have a curl of zero everywhere. However, I was wondering whether the opposite holds for functions continuous everywhere: if the curl is zero, is the field conservative? Can someone please give me an intuitive explanation and insight into this, and if it is true, why? Also, please try to not be too rigorous (only in grade 9).


In mathematics, there are branches such as algebra, analysis, topology, etc. In machine learning there is supervised, unsupervised, and reinforcement learning. Within each of these branches, there are finer branches that further divide the methods.   I am having trouble drawing a parallel with statistics. What would be the main branches of statistics (and sub-branches)? A perfect partition is likely not possible, but anything is better than a big blank map.   Visual examples:


Sum of Legendre symbols: $\sum _{n=1}^p \left(\frac{an+b}{p}\right)=0$

If $(a,p)=1$ and $p$ is an odd prime, prove the Legendre symbol sum  $$\sum _{n=1}^ p \left(\frac{an+b}{p}\right)=0.$$ Where $b$ is any integer.  I know the fact that $\sum_{a=1}^p \left( \frac{a}{p} \right)=0$. But I don't know how to treat with $b$.


Typo in complex Schwarz Lemma analysis problem

Texas A&M U has on their August 2012 qualifying exam this problem:   let $f$ be analytic on $\mathbb{D}$ with $|f(z)|\leq 1$. Then we have   $$\frac{|f(0)|-|z|}{1-|f(0)||z|}\leq |f(z)| \leq \frac{|f(0)|+|z|}{1+|f(0)||z|}$$  However, I am only getting this result:  $$\frac{|f(0)|-|z|}{1+|f(0)||z|}\leq |f(z)| \leq \frac{|f(0)|+|z|}{1-|f(0)||z|}$$  How are these related? Is there a typo in Texas' problem? I find that unlikely.


Why Linux free memory is not just the 'free' of '-/+ buffers/cache'

I learned and always think that linux free memory is the "free" of "-/+ buffers/cache" You can get this knowledge from lots of website.    [root@dev001 ~]# free              total       used       free     shared    buffers     cached Mem:      32877844   31422864    1454980          0    1358500     774612 -/+ buffers/cache:   29289752    3588092 Swap:      1048568      67984     980584 [root@dev001 ~]# mkdir /mnt/ramdisk [root@dev001 ~]# mount -t tmpfs -o size=10g tmpfs /mnt/ramdisk [root@dev001 ~]# cd /mnt/ramdisk/ [root@dev001 ramdisk]# dd if=/dev/zero of=1g bs=1024 count=$((1024*1024*10)) 10485760+0 records in 10485760+0 records out 10737418240 bytes (11 GB) copied, 20.0645 s, 535 MB/s [root@dev001 ramdisk]# ls -lh total 10G -rw-r--r-- 1 root root 10G Jul 26 21:09 1g [root@dev001 ramdisk]# free               total       used       free     shared    buffers     cached Mem:      32877844   32630940     246904          0     792364   10901876 -/+ buffers/cache:   20936700   11941144 Swap:      1048568      67984     980584 [root@dev001 ~]# umount /mnt/ramdisk [root@dev001 ~]# free               total       used       free     shared    buffers     cached Mem:      32877844   22128348   10749496          0     792416     416160 -/+ buffers/cache:   20919772   11958072 Swap:      1048568      67984     980584 [root@dev001 ~]# free              total       used       free     shared    buffers     cached Mem:      32877844   22127372   10750472          0     792432     416160 -/+ buffers/cache:   20918780   11959064 Swap:      1048568      67984     980584   While, these days, I found my server is out of memory, but when we do these things , the memory comes back. Any one can answer why is it?   The free memory is 3,588,092(let's say 3.4G)  and total memory is 32G, am I right? During this step, we haven't found any process that eat lots of memory via the command 'top', So we thought 3.4G free is not correct, we 100% sure free memory is at least 20G We mount our memory as a ramdisk to local, and wrote data into it, as you can see, it is 10G, and it is successful After unmount, the free memory rise to 11,959,064   how could it be?   Seems the free memory is not just the "free" of "-/+ buffers/cache"  Thanks


Following this image I found online:    Do the beacon lighters really live on top of the mountains?  It seems really cold on top of some of these mountains and there are no villages or whatsoever.


I'm trying to install the mathabx package and am having some troubles. I am using MixTek 2.9 and running TexWorks. I have tried typing \usepackage{mathabx} into the console as usual before I \maketitle and start the paper etc. However, it keeps saying:  Unfortunately, the package mathabx could not be installed.Please check the log file: C:/Users/mouse_000/AppData/Local/MiKTeX/2.9/miktex/log/miktex-pdftex.log ======================================================================   ! LaTeX Error: File `mathabx.sty' not found.  Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: sty)   When I type \usepackage{mathabx} it prompts me to install the package and then gives me a list of sites (with countries listed in a separate column) that I can install it however trying a few of them it doesn't seem to work. it. Any help is appreciated on this.


UK refusal, no ecnomic or financial ties

I applied for  UK business visitor visa for 1 week only, I supplied all the documents including the invitation letter from the company I'm going to visit. ECO said I'm not satisfied about my ecnomic and social ties in my home country.  My supervisor wrote in his letter that I'm doing my PhD and I have 3 kids who will be here during my travel with my wife and she is also doing her Ph.D, however, I did not attach any proof for my kids nor my wife in the first time, I did so only for myself as I did not know.  Anyway I'm going to re apply and this time will provide all documents along with my kids school registration.   For ecnomic ties I'm going to provide my ownership of two appartments in my home country.   I also attached our collaborative work with the company I'm going to visit (scientific publications).   For sure we did flights and hotel reservations in the first time.   We prepared new letters from our side and the accommodating company side as well to give more details of the visit.   Do I have to do anything else?   Thanks


How to add two separate GA accounts in one Drupal site

I have one Drupal site and I am using  for add ing GA account? Now client want to add two separate accounts.  UA-87XXX-XX UA-87YYY-YY  How can I add these two accounts?


Overriding Method Parameter Object Behavior

public void method (AmazingObject obj) {      HashMap<Integer, AmazingObject> hashmap = new HashMap<>();      for (int i = 0; i < 5; i++) {         obj = new AmazingObject();         hashmap.put(i, obj);     }      for (int i = 0; i < 5; i++) {         System.out.println(hashmap.get(i).toString());     }   }   I wrote this code out and see that the array contains completely different objects for every element. If I understand this properly:  1) The method accepts a reference copy of an AmazingObject instance.  2) I assign a new address to that reference type by using the new keyword.  3) Another reference copy containing my new address is thrown into the Hashmap.  Therefore, none of the previous values are overwritten. Is the reason for this behavior that Java is pass by reference copy and not pass by reference? I would have expected every element in the array to point to the exact same object at the end (i.e. the last assigned object).


On Linux Mint, I remember I was able to initiate a drag and drop operation from one application, press Alt-Tab to switch to another application, and finalize the drop. This allows me to easily transfer items from one app to another even if the apps are fullscreen.  In Ubuntu 18.04, I find that Alt-Tab does not work when I initiate the drag operation (i.e., with the click held).  Is there any workaround for this? Any setting I can tweak?  Note that there are some older versions of this question on this forum, but I'm not sure they apply anymore since in 18.04 Ubuntu switched back to the GNOME desktop.


Our company has a client who is in a spot of trouble and has asked us for advice. Their support/host company has gone bust and they want to use this opportunity to upgrade their servers. They have an older domain that they need to migrate from (Dobbde.com running server 2003) into (Dobbde123.com running 2012). They have two domain controllers in Dobbde.com (2003) and we will have two domain controllers in the new domain which run 2012. What would be the best way to do this? Windows Migration tool? They also want to migrate their file server from 2003 to 2012. They have a number of mapped user drives from Group Policy under docs.Dobbde.com: d:\ Durham, e:\ France, f:\ NZ, and  Z:\Germany  D:\Durham has a number of user shares on it which need to be migrated one at a time: D:\Sales D:\Boats D:\AdminD:\Haulgate  What would be the best way to do this part of the migration? Is there a way to do this using windows migration tools?? Should we use Robocopy or a similar tool for this part of the work?  Apologies if this is muddled, like I say the host company has gone bust and we are in a tight spot. Am I missing something?I realise this is pretty brief but any advice you can provide would be greatly appreciated.  o Regards,  Damian Ferns


I am running a mixed model in R. However I am having some difficulty understanding the type of model I should be running for the data that I have. Let's call the dependant variable the number of early button presses in a computerised experiment. An experiment is made up of multiple trials. In each trial a participant has to press a button to react to a target appearing on a screen. However they may press the button too early and this is what is being measured as the outcome variable. So for example, participant A may have in total 3 early button presses in an experiment across trials whereas participant B may have 15. In a straightforward linear regression model using the lm command in R, I would think this outcome is a continuous numerical variable. As well... its a number that participants score on in the experiment. However I am not trying to run a linear regression, I am trying to run a mixed model with random effects. My understanding of a mixed model in R is that the data format that the model takes from should be structured to show every participant by every trial. When the data is structured like this at trial level suddenly I have a lot of 1s and 0s in my outcome column. As of course at a trial level participants may accidently press the button too early scoring a 1, or not and score a 0. Does this sound like something that needs to be considered as categorical. If so would it then be looked at through the glmer function with family set to binomial? Thanks


Why is this '=' syntax incorrect in this js snippet?

var hungry = true; var foodHere = true;  var eat = function() {   if (hungry && foodHere === true) {       return(true);   } else {       return(false);   }`  };   The first line is the correct syntax. For a long time I was just saying hungry && foodHere = true... and I couldn't figure out (and still don't understand) why that is wrong. I understand the difference between = (assignment) and === (equal to). I assigned the variables to be true initially, so aren't I asking in the if statement if that's what they're set to? Why am I setting the variables = to in the var definition, but then when checking them I'm using the === value?


Ubuntu 13.04 under Parallels Desktop - Black Desktop after X Windows Update

I have been running Ubuntu 13.04 successfully on a MacBook Pro in a virtual machine in Parallels Desktop 9.  Today (2013-10-17) after applying today's Ubuntu update, which included updates to X Windows, my Ubuntu 13.04 virtual machine launches, the launcher comes up, but the screen background is solid black, rather than the shaded orange colour of the default desktop background (and my desktop icons are "hidden behind this blackness", as well). I can launch applications from the launcher, and there is a very brief white flash on the screen, and then it returns to black. It's as if there is a "black blanket" covering the entire screen, so there is no way to interact with any application windows using the keyboard or mouse. The icons of the launcher are responsive to the mouse, so I can right-click and quit any application I have launched. But the rest of the screen is non-responsive to keyboard or mouse.  This same behaviour happens with two different versions of Parallels Tools, so I am quite sure this is not a Parallels problem per se, although I could believe that it could be a paroblem with the interface between Parallels and this new updated X Windows code.  Could anyone tell me what has happened, and how I might be able to fix this problem, so I can continue to use my Ubuntu 13.04 virtual machine?  (I do have the option of reverting to a previous version of my virtual machine from before this update, but if possible I would prefer to keep my version of Ubuntu 13.04 up to date with the latest updates.)  Thanks, Bob


Virus detected with ClamTK (Possible infection?)

I did a routine scan of my system, with ClamTK. The the anti-virus reported 3 detections. The names of the three detections are:  1.[PUA.Phishing.Bank]  2.[PUA.Phishing.Bank]  3.[PUA.Script.Packed-1]  The first two are detected in the Firefox caches:  /.cache/mozilla/firefox/  The last is detected in the Chromium caches:  /.cache/chromium/Default  I know that PUA stands for potentially unwanted software. Are these false positives? Is it a Windows virus or a Linux virus? If it is a Linux virus, how will it affect my system?


Non-linear function such that $f(ax)=af(x)$ for every $a \in \mathbb R, x \in \mathbb R^n$

Let $f :  \mathbb R^n \to  \mathbb R^n$ be a function such that   $f(ax)=af(x)$ for every $a \in \mathbb R, x \in \mathbb R^n$.   Does it follow that $f$ is linear?   I don't think so, if $n>1$. If $n=1$, we have $f(a)=af(1)=\lambda a$ with $\lambda =f(1)$. Otherwise I'm not sure what to do.  Thank you!


Why are Elves so much lighter than other races

While the fellowship is trying to make for the pass of the Redhorn Gate, during Book 2 Chapter 3, why is it that Legolas seems so much lighter than his companions of other race?  Are elves actually physically lighter than others or is it just one of the many graces given to the Eldar by Eru?     With that he sprang forth nimbly, and then Frodo noticed as if for the first   time, though he had long known it, that the Elf had no boots, but wore only   light shoes, as he always did, and his feet made little imprint in the snow.   As a side note, my brothers and I used to always joke that the reason Legolas was so light on his feet was because elves are hollow-boned, but I seriously doubt that that's the actual reason.


I'm new to D&D and I have never played as a casting character doses anyone know how the spell attack bonus works.


How do I run a LINQ operator asynchronously?

Without using Rx, how do I invoke a standard LINQ operator asynchronously?  If the operators on IQueryable<T> don't support asynchrony, then that would steal from us the real benefits of making their callers async as most of the cost would be inside of these operators.


Wireless connectivity on HP Stream 13-c010nr with Ubuntu 18.04

I'm running Ubuntu 18.04.2 LTS from a flash drive on a HP Stream model 13-c010nr.  I have wireless connectivity when running Windows 10 on this machine, but do not get a wireless icon in 18.04.2.  How can I correct this?  I ran lspci -knn | grep Net -A3 rfkill list as suggested.    I got back   02:00.0 Network controller [0280]: Broadcom Limited BCM43142 802.11 b/g/n [14e4:4365] (rev 01)   Subsystem: Hewlett -Packard Company BCM43142 [103c:2230]   03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd.  RTS5229 PCI Express card reader [10ec:5229] (rev 01) Subsystem: Hewlett -Packard Company RTS5229 PCI Express Card Reader [103c:802a] 0: hci0: Bluetooth Soft blocked: no Hard blocked:no


I am writing a program that reads through a .CSV file that is located in a shared folder on a network. I am currently logged onto my computer with a user that can access this folder, so I can run the program without any issues. However, the program will be used by someone who doesn't have access to the folder, and so my colleague created a user with the credentials, for example, username:user1 and password:pass1 that the program should use to access the shared folder.  I would like to ask if someone knows how to implement this, that is, use the user my colleague created to access the shared folder, look for a specific file, and read through it line by line.  I emphasize that I only need to read the files, and not write in them.  Below is a part of the code that I use when reading from the file. Mind you that this is not all of the code; it only shows the parts where I am accessing the file or reading from it.  /* Directory location of the file */ var directory = new DirectoryInfo(@"\\Network\\Folder");  /* Get the latest available file */ file = (from f in directory.GetFiles()                  orderby f.LastWriteTime descending                  select f).First();    var reader = new StreamReader(File.OpenRead(file.FullName),                               Encoding.GetEncoding("iso-8859-1")); string line;  /* Read through it line by line */ while (!reader.EndOfStream) {     line = reader.ReadLine(); }


Is volatile useful at all in a singlethreaded application in C#?

Is there any case in which volatile is useful in the context of single-threaded programming? I know it's used to make sure the value of the variable is always actually checked in memory so is there any case in which that value may change (in a ST app) in a way that the app/compiler won't notice?


How to convert string type value to array type in JavaScript?

I'm using JavaScript and I want to convert string type value like this: '[{"key": "a", "value": "aa"}, {"key": "b", "value": "bb"}]' to array type, without '' quotes, like this: [{"key": "a", "value": "aa"}, {"key": "b", "value": "bb"}]. I receive this type as an argument to a function where I have to treat the value as Array. But currently I can't push or pop items because the value is of string type.


I am using Ajax to post a user subscription data to backend. Based on the information provided by the user server can respond with either 302 (success) or 200 (failure). My Ajax request is below:   $.ajax({                 url : form.action,                 type: "POST",                 data: $('#real-payment-form').serialize(),                 complete: function(xhr,textStatus){                     console.log("complete")                     console.log(xhr.status)                     if (xhr.status = '302'){                      $('#payment-confirmation').modal()}                     }                     else {                         alert('wrong details')}                 })         }   But whatever the server responds with xhr.status is always 200. Can anyone point out what I am doing wrong. How can I pick up the 302 requests using ajax.


I wish to use a symbol provided by the package MnSymbol but if I have a \usepackage{MnSymbol} in my document then many other symbols change, including even the equals sign (=), which appears much shorter now.  How can I use a package to just get a few particular symbols without having my entire document in the font that the package imposes?


How to find the smallest enclosing circle over a set of circles?

I have a set of circles on a plane, each defined by their X, Y and R parameters. I need to find the smallest enclosing circle over all of them. Essentially, this is a variation of , except my circles can have different radii. What would be a fast (linear time) algorithm of doing that?  I'm posting it here instead of StackOverflow/programmers.se because I think this is a predominantly math problem, rather than programming. Please correct me if I'm wrong.  My math is OK-ish, but I'm struggling to come up with a good solution. The best I've come up with is to replace each circle with 8 points, and then calculate the SEC for those with the help of . It will not be exact, but should be an acceptable approximation for my purposes. However I wonder if there is a better and more precise algorithm?


I have a CSV file, in.csv, which has an integer array column:  1,2,4,"{100,200,300}",,1 1,2,4,"{100,200,300,400,500}",,2 1,2,4,"{100,200,300,600.900,1200,1500}",1,3   I want to have an output file, out.csv, like:  1,2,4,,1 1,2,4,,2 1,2,4,1,3   I tried:  cut -d , -f4 -- complement in.csv > out.csv   But it did not work out.  (I also have the fifth column which has value for third row but not for others).


Can you bound the third moment from the second moment?

Suppose $X$ is a random real variable with zero mean and finite second moment $\langle X^2\rangle$. Under what conditions can we give a bound (upper/lower) for the third moment $\langle X^3\rangle$?


Mean for grouped data when midpoints are unknown

I have a dataset with disease frequency in age groups.  <1   <3   <5   <7   >=7  14   19   15    3    10    And now, when actual data lost, I've been asked to assess the mean age. The problem that I don't know the midpoint for last interval ">=7".  How should I do it? Can I model the distribution of age and get the mean using formula?  I've splitted groups to be width of 1 age, from 0 to 7, and it seems that age have exponential distribution (like it should be in theory). But how to assess distr. parameters? I've assessed the median from groupped data using the formula : $$Me = L_m + (\frac{n/2 -F_{m-1}}{f_m}) \cdot c = 2.737$$  After that I've calculated $\lambda$ using it like this: $\lambda = ln(2)/Me = 0.253$. Assessing $\lambda$ visually I've got pretty same value $0.23$. Here is the plot.    For me this distributions look almost equal except point 0, but which should I choose and why? Is it ok to use median to assess $\lambda$?  If so, is the next argument true? I can get the estimate for upper bound of the last interval using 0.975 quantile. Use it to get the midpoint. And now calculate the mean using midpoints. How much it should be different? Doesn't midpoints introduce bias because data distributed exponentially? Using distributions I've got: $4.348$ (for 1st), $3.949$ (2nd) And using midpoints: $3.902$, $3.784$  Thanks for any help or correction.


After I upgraded to Ubuntu Gnome 16.10, typing in Nautilus no longer searches through the folder structure recursively, but rather just skips to a file in the folder (the old "type-ahead" mechanism).  Why is this? Is the Ubuntu version of Nautilus patched to do this? How can I enable the standard Nautilus search behavior?  NOTE: This question is the opposite of  -- I'm trying to enable global search, disable local search.


Does potential energy in gravitationall field increase mass?

I was just  that any type of energy contributes to mass of the object. This must indeed include potential energy in gravitational field. But here, things cease to make sense, have a look:   I have object at some distance $r$ from radial source of gravitational field. The potentional energy is calculated like this: $E_p = m*a*r$ where $a$ is gravitational acceleration and $m$ is mass of your object. But that means, that the object is a bit heavier - because of the potentional energy of itself - $m = m_0 + \frac{E_p}{c^2}$ ($m_0$ here is the mass without the potentional energy) That would mean that the gravitational force is a bit stronger at higher distances.   Now, I do understand that the rules of physics are not recursive and the mass and force will be finite. But what is the correct approach to this situation? What is the correct equation for potentional energy?


Currently, editing a question's tags causes the question to be bumped to the top of the active tab. As I understand it, a question being bumped to the top of active is saying "Hey, community, something interesting/substantial happened to this question and you might want to check it out!". In my opinion, tag edits are not substantial enough to make it worth bumping the question, as they are mostly janitorial edits.  Consider the following common reasons for editing a question's tags:   The question was tagged incorrectly, by using an irrelevant tag or a combination of tags that don't make sense together A tag that the question used has been retired or otherwise changed so that it no longer applies A new tag has been created that would apply to the question, perhaps better than one or more of the current tags   All of these are janitorial edits - not substantial enough to warrant increased attention from the community, but rather something that needs to be done to keep the site clean. In the real world, it would be like getting an email at work every time the maintenance staff replaces a light bulb.


I am a beginner in electronics and have this circuit for a dual LED flasher. This was from a project book and I was able to make this quite easily with the provided printed PCB. I now want to make this on a stripboard but don't know how to arrange the components and put breaks.     I would really appreciate your help.  The related question just has software to draw your circuit on a stripboard. It doesn't automatically convert it from the original circuit. I am having trouble with the conversion part.   Thanks  I've tried this so far. Does it make sense?


Why calling this fuction inside or outside printf in C gives different outputs

I run the following code in c. Why do the two main bodies lead to different outputs  #include <stdio.h> #include <stdlib.h> int enqueue(int* ptr,int h,int t,int n,  int v) {     ptr[h]=v;     return 0; }  int main() {     int* Q=(int*)malloc(n*sizeof(int));     int h=0, t=0;     int a= enqueue(Q,h,t,n,5);      printf("%d %d ",a,Q[h]);     return 0; }   OUTPUT: 0 5  Now if I change main function to this:  int main() {     int* Q=(int*)malloc(n*sizeof(int));     int h=0, t=0;     printf("%d %d ",enqueue(Q,h,t,n,5),Q[h]);     return 0; }   OUTPUT: 0 0


How do I repeat the last command without using the arrow keys?

I know I can use Up to iterate through previous commands. Running the last command simply involves Up + Enter. However, I was thinking of buying the  as I spend a lot of time in vim.  This keyboard has no arrow keys, and the only way I know how to get this kind of behaviour is by pressing Ctrl + R and beginning to repeat my previous command.  Is there an easy way to emulate Up + Enter in an UNIX terminal without the arrow keys?


Difference between `MYVAR=1 /bin/whatever` and `env MYVAR=1 /bin/whatever`?

They both seem to do pretty much the same thing, but what are the advantages of using one over the other?


I am writing a scheduling program using an algorithm. At the last stage of the algorithm I need to look into the timetable (the timetable which was created) to see if the student is already assigned to a class at that time.  Therefore, we have:  Current Class Start Time: (2017, 02, 09, 10, 00, 00) Current Class Finish Time: (2017, 02, 09, 11, 00, 00)   At this moment we will search into the timetable to see what other classes student A is assigned to:  For example, let's say on the same date they are already assigned to:  Class 'Z' Start Time: (2017, 02, 09, 09, 00, 00) Class 'Z' Finish Time: (2017, 02, 09, 12, 00, 00)   Now I want to find the time range of Class 'Z' and compare it with the time range of Current Class.  DateTime startClassZ = new DateTime(2017, 02, 09, 09, 00, 00); DateTime endClassZ = new DateTime(2017, 02, 09, 12, 00, 00);  DateTime StartCurrent = new DateTime(2017, 02, 09, 10, 00, 00); DateTime StartCurrent = new DateTime(2017, 02, 09, 11, 00, 00);  if (They do not clash) {    Assign } if (Clash) {    Select Another Student }   Could anyone please help me with my 'IF statements' and also how to solve this problem.  The way that I am thinking of it, there are three possibilities:   If 'current class' (Start and end time) lands in between 'Class Z' (Clash 1) If the 'start time' of 'current class' lands in between 'Class Z' (Clash 2) If the 'end time' of 'current class' lands in between 'Class Z' (Clash 3)   Thank You


Socket not detected as closed on Android?

I have written a simple network engine for client-server communication. It works perfectly on Windows, server knows when the client disconnected etc. (readLine() throws exception). I tried to port the engine to Android and sending and receiving data works, but for some reason server does not detect when the socket is closed (readLine() is still blocked and does not throw any exception). I even tried disconnecting the Android device from internet and it still did not detect closed socket. I thought of a workaround by implementing timeout, when the client does not send something for a long time, server will think that he is disconnected, but that's probably not a good permanent solution.  Code is surrounded by try-catch exception:  String userInput; BufferedReader stdIn = new BufferedReader(new InputStreamReader(socket.getInputStream()));  while ((userInput = stdIn.readLine()) != null) {     //do something }


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


What should be the correct auxiliary verb, did or do?

Which one is correct, “if you ever did it again?”  or “if you ever do it again?” The act has already been done once by a character A, much to character B’s dislike. Now, if B warns A not to repeat the act anytime in the future, what would be the correct way? Here B tries to warn A for the future. Like a child being scolded by a mother not to spill the sauce on the carpet ever again. Also, I would like to know how and in what context the two differs. When should one select the one of the two, are there any rules for that? I hope that clears up a bit!


Is there any issue/concern for a slight wavelength shift of the laser light in the LIGO experiments?

A friend and I were having a discussion about the LIGO experiments and were wondering if there is any issue with the laser light undergoing a wavelength shift as a result of the gravitational wave? Akin to the red/blue shift we see in the galactic sense but on a much smaller level.  Wouldn't this make it "impossible" to measure the length contraction since the "ruler" itself contracts within the space also?  Feel free to go into detail, but we are just looking for a simple explanation.


Milky way photography without startrails

I am from sri lanka. I want to photograph milky way.  Canon 750D EFS 18-135 lens  I know that i should increase aperture & increase iso.  What should be the shutter speed for this camera to capture milky way without startrails ?


I was trying to demonstrate the Proposition 2.9 of Atiyah and MacDonald's Introduction to Commutative Algebra. But I couldn't do the following:     Let $M$, $M'$, and $M''$ be $A$-modules, $v$ and $u$ be homomorphisms, and   $$0 \longrightarrow\operatorname{Hom}(M'',N) \stackrel{\bar{v}}\longrightarrow\operatorname{Hom}(M,N) \stackrel{\bar{u}}\longrightarrow\operatorname{Hom}(M',N)$$   be a sequence exact for all $A$-module $N$. Then the sequence   $$M' \stackrel{u}\longrightarrow M \stackrel{v}\longrightarrow M'' \longrightarrow 0$$   is exact. Here, $\bar{v}(f)=f\circ v$ and $\bar{u}(g)=g\circ u$.   I suppose there is a particular A-module N that holds this, but I couldn't find it.  Somebody can help me? Thanks.


Now this question might sound a bit weird to some people, but the situation is this:  Say I have the number $0.999..$ where there is an infinite number of 9's (much like $0.3333..$ with $\frac{1}{3}$). For convenience, let's put a line above the 9's to indicate there is an infinite number of 9's: $0.\overline{99}$ (probably not official notation, but what the heck..).  Now if I see a statement like this $1=0.\overline{99}$, I would think this is not true, at first, through more or less the same logic that $1\neq2$.  But the following confuses me: $\frac{1}{9}=0.\overline{11}$, so If I do this: $$ \frac{1}{9}\cdot9=\frac{9}{9}=1 $$ And also: $$ 0.\overline{11}\cdot9=0.\overline{99} $$  That means that $1=0.\overline{99}$, but that doesn't make sense to me, because $1$ and $0.\overline{99}$ look like totally different numbers to me... Am I missing something here or is my above logic just false?  Any clarification would be great :)


Mac Mail - Account already exists error when adding gmail

I added a new gmail account to Mac Mail via the File> Add Account, but the mailbox does not show up in mail.  If I try to add it again, it says the account already exists. It does exist in System Preferences > Internet Accounts, but does not exist in Mail.   I am updated to 10.10.3 and Mail.app is Version 8.2 (2098)  Anyone have a fix?


how to import module from other directory in python?

This is my directory tree  Game/    a/       1.py       ...    b/       2.py   In 2.py I want import function display from 1.py. First I keep both file in same folder there is no problem.But how to import from other location?


Stop Chrome forcing https on .dev domain

After updating to version 63 I have lost many hours figuring out what happened.  I really don't care if it is a valid TLD and I don't want to use .test.  So what are the ways around it? They did not include any settings for this.


Suppose two random permutations of the numbers 1 to n placed side by side.  a) Calculate the expectation number of fixed points for $n = 5$.  b) Find the value of expectation in the amount of fixed points for n tending to infinity


Why does, when opening certain websites, text appears to load after all the graphics?

It's not really noticeable if you have a high-speed low-latency connection, but after many tries, I snapped a screenshot that displays the problem


Drush crashes after "command dispatch complete"

I have a custom drush script. This script loads, changes and saves ~10000 drupal commerce products.  After that I get the message  Command dispatch complete [1140.43 sec, 663.25 МБ]                                                                                [notice]  Timer                Cum (sec)  Count  Avg (msec)   page                 1140.368   1      1140367.61   drupal_http_request  67.66      1032   65.562  Peak memory usage was 784.48 МБ [1140.43 sec, 663.24 МБ]   And AFTER that script hangs and consumes more and more memory. Finally, after long time, script reaches 1.5 G memory limit and dies.  PHP Fatal error:  Allowed memory size of 1610612736 bytes exhausted (tried to allocate 80 bytes) in /var/www/vhosts/mysite.ru/htdocs/sites/all/modules/contrib/entity/includes/entity.wrapper.inc on line 302  Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 80 bytes) in /var/www/vhosts/mysite.ru/htdocs/sites/all/modules/contrib/entity/includes/entity.wrapper.inc on line 302   All products which were processed by the script are sucessfully changed.  The question: why drush script hangs when dispatch is complete and what it makes for such a long time when all products are processed? Is it sort of a post-processing?  Denis


Why Virtual Box won't give me option to create 64 bits guests?

My host is x64 bits Windows 8.1.  I downloaded the latest Virtual Box (4.3) and I'm trying to create a VM with a 64 bits Ubuntu OS (ubuntu-12.04.3-desktop-amd64).  When I go to New VM wizard, it doesn't give me option to select "Ubuntu (x64)" as I have seen in other people's screenshots, only just "Ubuntu". As a result, the ISO can't boot. I tried in another PC and Virtual Box gives the x64 variants to most listed OS...  Control Panel shows x64 OS, x64 processor. My host laptop is a Sony Vaio VPCZ22UGX/N, Intel® Core™ i7-2640M processor. CPUz shows Vx-t is available on my processor, of course.  Here is what I tried so far:   I enabled IO APIC as required in the docs. I have virtualization enabled in the BIOS. It works fine in VMware. Check that Hyper-V is not running or even installed on my Windows. Same for VMware. I also tried running the command:  VBoxManage modifyvm [vmname] --longmode on    for that VM, but no change.. I think the issue is really that I can't select x64 variant of the Ubuntu OS for that VM. Other people seem to indicate that's a requirement, but I don't get that option for some reason.  I spent a lot of time and can't find what's wrong... Anyone knows what could be missing here?  Thank you very much!!  Eduardo


I want to find the following limit: $$ \lim_{\substack{t\to1\\t<1}}{(1-t)\sum_{n=0}^\infty{\frac{t^n}{1+t^n}}}.$$ I suspect it has to do with integrals and Riemann sums, but I don't see the exact way to proceed.   Thanks for help!


Pagination not working in category listing

I can't get pagination inside categories listings to work.  I'm using a custom query, with the get_query_var('paged'):  $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args=array( 'post__not_in'=>$essentielle_excluded_posts, 'category_name' => 'concours-fun', 'paged'=>$paged,  'posts_per_page'=>5, ); query_posts($args);   Also tried the Category Pagination Fix plugin.  My permalink structure: /%category%/%postname%-%post_id%.html  Example of the error:   Any idea as to what else i should check?


Execute function only once in a infinite loop on blender game engine?

I'm new to blender and python..I want to clear the input serial buffer of the blender game engine before reads data from it.  I have used GameLogic.SerialPort.flushInput() to clear the buffer. I have connected "always" sensor with the "True" level triggering.Therefor code can run infinitely.  I only need to clear the input buffer once in the loop but it always clear the serial buffer..  Any ideas how to clear serial buffer once in the infinite loop...  Blender code  import GameLogic import serial   port = 'COM12'   try:      GameLogic.SerialPort  except:      GameLogic.SerialPort = serial.Serial(port,115200)    GameLogic.SerialPort.flushInput() . . . rest of the programm


Why should you use theme(), rather than calling the theme functions directly?   theme('box', $title, drupal_get_form('comment_form', $edit, $title));   Why doesn't the code call the theme function directly, as in the following code?  theme_box($title, drupal_get_form('comment_form', $edit, $title));


How to enforce that one row in a parent table MUST be associated with at least a row in a child table

I have a one to many relationship enforced via FK, classic example order and order_item, whereby a fk on the order_item to the order table enforces that one item belongs to one order, and one order CAN have 1 or more item. I'd need to change the "CAN" to "MUST", basically any order must at least have one item associated with it.  What would be the best way to enforce this. Many thanks


How feasible is a remote postdoc in Mathematics?

I will be graduating this year with a PhD in mathematics.  My research background is in analysis in a top 20 program in the US.  However, my family situation is such that I can't uproot my family any more than I already have, and I am thus geographically limited in our "in-person" options.  There are several universities and liberal arts schools in my native region, but these days it is increasingly rare to get a tenure track position straight out of the PhD, even for non R1-institutions. So here is my question.  How open are math departments/potential mentors  to the idea of a remote research postdoc, assuming I can make trips to the host institution, say, two or three times a year? I'm looking both at postdocs in the US and abroad. On one hand, COVID has made online work more a possibility. And if I stick to research postdocs, I don't have to be in-person for additional tasks (I might also teach online courses in other cases, but I don't want to bank on the continuation of this pandemic, which would just be, well, awful).  Additionally, as a mother I already do most of my research from home, and I have figured out to a large extent how to balance my personal life with my professional life under the flexible time schedules allowed by academia.  My CV and research activity, as far as I know, is decently strong (two published papers, one in a good journal, two submitted papers, one to a top journal, and several more research projects along the way, several talks, including some invited ones), and both I and my advisor had correspondences with some of the researchers in potential institutions, some of who also know I have a child, so they might be more understanding (or not). On the other hand, I fear a remote option request might be read at best as a lack of commitment to my research, and at worst an insult to the department.  I know personally this isn't the case for me in terms of my productivity (it's been my default for a few years now), but there might be prior assumptions in play.  I also know that generally, math research is increasingly social and collaborative.  There are some advantages to being able to stop by an office next door and ask a math-related/ research question. I also recognize that universities are going to want additional teaching experience if I am applying to tenure track positions afterwards. My limitation to research postdocs also makes it that the total number of postdocs I'm looking at is less than most PhD's numbers of applications. Should this not work out, I am also applying to non-academic positions as a back-up plan (gotta put food in the table), but I really do enjoy research in pure math and do not want stop doing it.


What does it mean for an album to be remastered?

There are times when older albums get re-released as a remastered version.  What is the difference between the original version and the remastered version?


What is the pressure at the centre of the Earth?

If the (net) gravity (at the centre of the Earth) is $0$, then what is the pressure? Some say it's astronomically big, but how can that be? Is it because of the (high) temperature? I can't think of anything else. And how about a neutron star and a black hole then? What is the temperature at the centre of those?


Was V'ger responsible for the creation of the Borg?

I remember reading somewhere a theory that  (the being that the Voyager probe had become in Star Trek: The Motion Picture) was somehow responsible for the creation of the Borg.  Is this canonical?  Where does the theory come from?  And how exactly did it go down?


I am building model in R. Can you help me how to interpret this results. For example what is Pr(>|t|) and others...Thanks!   Call: lm(formula = Cn ~ B10_75mean + b5_75mean + ui75mean + tvi75mean)  **Residuals:**     Min      1Q  Median      3Q     Max  -6.3655 -3.7021 -0.3621  2.9530 12.5155  **Coefficients:**              Estimate Std. Error t value Pr(>|t|) (Intercept)  24.08902  228.38548   0.105    0.917 B10_75mean   -0.04073    0.75413  -0.054    0.957 b5_75mean   -39.98091   42.28717  -0.945    0.355 ui75mean     20.71277   20.59630   1.006    0.326 tvi75mean    32.69517   42.33715   0.772    0.448  Residual standard error: 4.826 on 22 degrees of freedom Multiple R-squared:  0.2408,    Adjusted R-squared:  0.1027  F-statistic: 1.744 on 4 and 22 DF,  p-value: 0.1763


Select dropdown value by index using JQuery

I have a jquery dropdown which looks as follows after inspecting it in DOM explorer.  <select name="cityID" id="ddlCity" style="width: 128px; display:none;" data-val="true" data-val-number="ID must be a number">     <option value = "0">Select city</option>     <option value = "1234">New York</option>     <input id="txt_ddlCity" style="width: 100px;" autocomplete="off"></input> </select>   I want to set the value of this dropdown to 'New York' by using index.  I tried     $("select#ddlCity").prop('selectedIndex', 1);   However, the value is not getting selected in dropdown. I also tried to set using value as $("#ddlCity").val(1234); but it also doesn't work.  Can anyone figure out what I am doing wrong here. any help would be greatly appreciated.  Update: This is not the duplicate of mentioned question. None of the answer is working for my case. Also please note it contains  inside  tag. Not sure if it is making any issue


Following is my code to test some grammar. I want return a object in try-block and do something in finally-block. But I get NullPointException when I run my code.The cause is using ReentrantLock, but I don't know why.  import java.util.concurrent.locks.ReentrantLock;   public class Main {    ReentrantLock lock;    public static void main(String[] args) {     try {       new Main().run();     } catch (Exception e) {       e.printStackTrace();     }   }    public void run() {       System.out.println(returnTest().get());   }    A returnTest(){ //  lock.lock();     try {       return new A();     } finally { //  lock.unlock();     }   }  }  class A {   public boolean get() {     return true;   } }   If I uncomment lock.lock() and lock.unlock(), I will get NullPointException. Why?


Better term to put on a label of a bottle of milk to describe that it's 'made' in a particular geographic location

While waiting for the kettle to boil this morning, I was idling and reading the label on the bottle of milk and was struck by the declaration: "Permeate free, made in WA". Here's a shot of the label for proper context:     It's clear that they want to state that the milk is produced in this state, but it sounds odd to me to say that milk is made — I've always associated that with products that require at least a nominal amount of manufacturing/processing (e.g. butter, cream, yoghurt).   For the raw produce though, I can't really recall anything using made but more specific terms like grown, harvested, farmed, raised, etc.  So in this context, does anyone has a suggestion what might be a more descriptive, or more appropriate word? The best I can come up with is milked but that sounds awfully clumsy.   Alternatively, if people have milk bottles from their side of the world that say something similar, then it could just be me that thinks it's a bit clunky.


Centos 7 - sshd sftp group permissions messed up after update

Centos recently updated to 7.3 and there's been problems with sshd sftp group permissions. I have one user that is chrooted to it's home directory, and that user is in group sftponly. Then i have the /var/www directory, which has 775 permissions and owner is apache and owner group is sftponly. I have a bind link pointing from /home/user/files/web --> /var/www, so the user can access /var/www even though being chrooted to it's home directory. I can view files in /var/www with that user, but impossible to edit or add anything. This worked fine before the big Centos 7.3 update, and now it's stopped working. Any ideas?


Good way to offer both LWCs and a REST API in the same code?

We are building a product that will make use of multiple Lightning Web Components (LWCs), and some of those will make use of @AuraEnabled Apex methods. We also plan to provide an API that non-LWC UI can access. (In the past, we have provided such APIs by using @RestResource Apex classes receiving and sending JSON.)  Our present idea is to go ahead and build the @AuraEnabled Apex code methods/classes first, and then later wrap them in a single @RestResource Apex class that dispatches the requests according to the URL pattern to the relevant @AuraEnabled methods/classes. (I assume in this case the @AuraEnabled(cacheable=true) annotation will be ignored.)  Has anyone done this? Pros/cons?


Why did Edmure Tully do what he did in season 6 episode 8?

Spoilers for Game of Thrones S06E08     Edmure Tully accepted to kill his uncle (he knew this would happen) and to give Riverrun back to the Freys/Lannisters.    I understood that he was afraid Jaime would kill his son & wife, but why did he care about them this much? I'm not a heartless fellow, but given this context:     He said he never met this child and never saw his wife again after the wedding night;   He was a prisoner of the Freys since the Red Wedding, so he was probably very mad with them;   The existence of said son could easily be a lie;   His marriage was arranged, it was purely political, he did not love his wife. In fact, as I remember, he just met her right before the wedding (on the same day, or just a few days prior);   Why would he choose the      lives of his son and wife over his uncle's and his family sovereignty?


Android App and Site shows different points

SE mobile app shows wrong tag points whereas mobile and desktop site shows correct points.  SE app for android      Javascript tag have 79 points (wrong)  SE site      Javascript tag have 92 points (correct and Full site also produce the same)  Update :  I tried clearing cache, but no use.  I installed this app 3 or 4 days but I am holding 92 points in Javascript for more than a week.


So I accidentally spilled milk on my resistor and I have no idea how to clean it. I wrapped the resistors with a towel but they still smell really bad :/.  Is it okay to put them in water and dry them with a towel?


How do multi-element attacks interact with death saves?

There are a lot of spells and even weapons the have multiple damage types in the same attack. For example, Meteor Swarm has 20d6 bludgeoning and 20d6 fire damage.  Let's say an unfortunate PC gets hit with meteor swarm and has 90 max hp, he first takes the bludgeoning damage of 91 and then the fire damage of 85. does this all register as 1 hit and become unconscious or would he become unconscious from the bludgeoning damage and then take the failed death saves from the fire damage?  In short: do multi element attacks count as 1 hit or does each element count as a different hit?


Which is correct: "the below information" or "the information below"?

I frequently see statements that refer to something later in the text that use a phrase such as "the below information". Is it more correct instead to say "the information below" (or "the following information")?


Is there a way to install programs to one folder for general use by multiple installed distros?

I have been installing different distros on my pc based on their niche that I find valuable. I'd want to know how to install programs to a drive not containing the root for that version so I could use the programs on different versions. Is that possible? **For example, I have windows and I have my programs installed on a different hard-drive so If I'd be able to use most those programs on win7 or 10 if I had those on a different partitions.


OpenStreetMap/GeoServer fill polygon color on user interaction

I'm trying to build a system to show census tract on map. I used  example to import the census tract TIGER shapefile into DB, flatten the data on the column I need and managed to show a map with census tract using GeoServer, OpenLayers and OSM.   Now I need to add interaction where a user can select a census tract and be able to change the fill color. The example I followed creates a ol.Layer.Image layer which, I think, won't work here. I tried using a vector layer with a GeoJSON source from GeoServer but the browser is crashing trying to load 74K rows through JSON. I'm looking at vector tile example  but it doesn't cover dynamic style change from user interaction.  Is it possible to use OpenLayers/GeoServer with what I'm trying to do?  I'm new to these technologies and this is my first experiment with GIS.


I have equations as follows $$f(f(x))=x^2+x$$ Then solve for $f(x)$. Can anyone give some hints about this question?


If gravity is in reality spacetime geometry why when I drop an object on the surface of the Earth does it fall to the ground? Does spacetime push it?


I'm trying to install cuda toolkit:  sudo sh cuda_10.0.130_410.48_linux.run --silent --toolkit --toolkitpath=/usr/local/cuda-10.0 Not enough space on parition mounted at /. Need 3391705088 bytes.  Disk space check has failed. Installation cannot continue.   But seems I have less free space that needed.  How can I check if have sufficient disk space?  df -h show me:   Filesystem                            Size  Used Avail Use% Mounted on udev                                   16G     0   16G   0% /dev tmpfs                                 3.2G  331M  2.9G  11% /run /dev/sde3                              39G   32G  4.9G  87% / tmpfs                                  16G   80K   16G   1% /dev/shm tmpfs                                 5.0M  8.0K  5.0M   1% /run/lock tmpfs                                  16G     0   16G   0% /sys/fs/cgroup /dev/sde4                             167G   99G   61G  63% /home /dev/mapper/isw_cifjedgigg_Volume1p1  1.8T  1.5T  268G  85% /data /dev/sdb1                             470G  195G  251G  44% /data/ssd cgmfs                                 100K     0  100K   0% /run/cgmanager/fs tmpfs                                 3.2G     0  3.2G   0% /run/user/1009 tmpfs                                 3.2G     0  3.2G   0% /run/user/1002   Is /dev/sde3 low on space? How to check what consume most of the space?  Update:  I'm more looking toward CUDA related answer, because I was able to install several version of CUDA several times and then even deleting older versions of CUDA from /usr/local don't help, so I suspect some 'caches' after CUDA installation is still in the system.


Visitor Schengen Visa Denied 2 times. Can I apply for 15 days tourist visa and stay for 60 days?

I had applied with Swiss embassy in New Delhi India through VFS for Visitor visa as I have to meet my brother and his family who lives in Geneva, Switzerland. I had applied for myself, wife and 3 year old son.  Travel dates 30/11/2017 to 01/02/2018.  My visa rejected first time saying 1.insufficient means of subsistence 2.no justification provided and 3. intention to leave member state can not be ascertained. (duration of stay was 79 days -15/11/17 to 01/02/18)  I applied second time (64 days duration-changed flights dates) and given bank statement with more than enough funds in bank statement for cause 1.  For cause 2, I gave return flight ticket to and fro India 30nov17 to 01Feb2018, train ticket to and fro Paris from Geneva 06to09Dec17 and return flight from geneva to munich germany 12/01/2018 to 13/01/2018.  I submitted hotel bookings for 4 days in Paris (09-12Dec17), 1 day in Interlaken (18Dec-19Dec2017), 2 days in Bern (22Dec-24Dec2017) and 1 day in Munich (12Jan2018-13Jan2018) as proof of intra-schengen travel. I gave them complete itinerary of my entire stay in Switzerland as I wanted to stay with my brother most of the time. (all bookings confirmed with confirmation emails from respective hotels).  Still they denied visa. What to do now?   Can I apply for 15 days tourist visa (at different consulate/embassy) and stay with my brother for 64 days?  Please suggest.  Warm Regards Sumith G.


Is it possible to have light without heat?

I am trying to think of a light source that doesn't generate heat; but I am not sure if such a phenomenon exists.  I am not referring to passive light (such as reflected light, ie, moonlight) but an active light source that does not have heat as a by-product.  Is it possible to generate light without heat, or put it a bit differently, without burning something?


I'm new to bash and I'm working on script that traverses the tar.gz file archive and in each file changes a string specified to an another string. Args of script: name of archive, searched string, target word. My problem is that when archive name contains a space (e.g. I run script with following args: > change_strings.sh "/tmp/tmp.m7xYn5EQ2y/work/data txt" a A) I have following error:  on line if [ ! -f $filename ] ; then  [: data: binary operator expected, dirname: extra operand `txt'.  Here is my code:    #!/bin/bash    filename="${1##*/}"   VAR="$1"   DIR=$(dirname ${VAR})   cd "$DIR"   if [ ! -f $filename ] ; then echo "no such archive" >&2 exit 1 fi   if ! tar tf $filename &> /dev/null; then echo "this is not .tar.gz archive" >&2 exit 1 fi   dir=`mktemp -dt 'test.XXXXXX'` tar -xf $filename -C $dir  #extract archive to dir cd $dir #go to argument directory  FILES=$dir"/*"  for f in $FILES do sed -i "s/$2/$3/g" "$f" done  tar -czf $filename * #create tar gz archive with files in current directory mv -f $filename $cdir"/"$filename #move archive rm -r $dir #remove tmp directory


Transpose/Unzip Function (inverse of zip)?

I have a list of 2-item tuples and I'd like to convert them to 2 lists where the first contains the first item in each tuple and the second list holds the second item.  For example:  original = [('a', 1), ('b', 2), ('c', 3), ('d', 4)] # and I want to become... result = (['a', 'b', 'c', 'd'], [1, 2, 3, 4])   Is there a builtin function that does that?


'If they "would have" recognised this, they would have saved themselves trouble? Correct?

I heard an American speaking on the BBC World at One news this lunchtime,  about the Greek debt. He was arguing that the character of a lot of Greece's debt is quite different to that of other debtor nations and that if comparable accounting methods were used they would be able to claim a debt level of less than 20% of GDP. (This is quite a radical opinion and not one accepted by the IMF, incidentally.)  He then made a statement the syntax of which made me sit up from eating my lunch. He said If they would have recognised this it would have saved them a lot of trouble. Personally I would have said If they had recognised this, it would have.... But then I thought that maybe because he was using an if clause, then it justified would.  Do others have views on this?


Character doesn't move anymore after gameover and clicked play

When my character died it displays gameover and goes back to main menu, then if I clicked play I can see my character however I can't make it move anymore. Any suggestions?  For game over:  #pragma strict import UnityEngine.UI; private var StopGame: boolean=false; private var showGUI: boolean=false; var GUIstop: GameObject; var StopMenu;  private var canvas : Canvas;  function Awake() {     canvas = GetComponent.<Canvas>();     canvas.enabled = false; }  function Update () {     // If the player has run out of health...     if(HealthControl.LOVES==0)         Pause();     //  } }  public function Pause() {     canvas.enabled = !canvas.enabled;     Time.timeScale = Time.timeScale == 0 ? 1 : 0;     StopGame=true; }  public function Quit() {     #if UNITY_EDITOR      EditorApplication.isPlaying = false;     #else      Application.Quit();     #endif }   For character movement:     function Update () {         transform.rotation.z=0;         if(Input.GetKey(KeyCode.UpArrow)){            transform.position.y+=moveSpeed*Time.deltaTime;        }        else if(Input.GetKey(KeyCode.RightArrow)){            transform.position.x+=moveSpeed*Time.deltaTime;        }


Improve rendering of PDFs compiling with pdflatex

I have a pdf image (density plot)     If I open it with some pdf viewer (I have tested Max OSX preview, Acrobat reader) the figure looks fine, without white lines. However, after compiling the TeX with pdf-latex, then white lines appear if I open de file with Skim or Preview programs and the white lines are there, but they do not appear when I open it with Acrobat reader.   Does anyone know how to remove the white lines in the pdf output for any pdf viewer?  Thank you very much for the help


Gave up waiting for root device, ubuntu--vg-root doesnt exist

today I installed Ubuntu 64-bit on a netbook. When the netbook boots this, error report appeared. I think there is a problem with the partitions.  Gave up waiting for root device. Common problems:   — Boot args (cat /proc/cmdline)     — Check rootdelay= (did the system wait long enough?)     — Check root= (did the system wait for the right device?)   — Missing modules (cat /proc/modules; ls /dev) ALERT! /dev/mapper/ubuntu--vg-root does not exist. Dropping to a shell!   BusyBox v.1.21.1 (Ubuntu 1:1.21.1-1ubuntu1) built-in shell (ash)    Enter 'help' for list of built-in commands.    (initramfs)   Output of lsblk as requested:  $ lsblk NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT sda      8:0    0 232.9G  0 disk  ├─sda1   8:1    0   231G  0 part  ├─sda2   8:2    0     1K  0 part  └─sda5   8:5    0     2G  0 part [SWAP] sr0     11:0    1   1.2G  0 rom  /cdrom loop0    7:0    0   1.1G  1 loop /rofs


I have organized several times some international conferences on my field (computational chemistry), where accepted proceedings are afterwards evaluated again for it submission to a special issue of a journal. Now I am thinking that I could create a journal for all those submission, even if at the beginning we have no impact factor (ISI) or if people are not so interested, but I would like this idea very much.  So I wonder of you can point which steps should I follow for creating a journal. I think I could attract many submissions, and I have servers where I could host it, but do not know the other technical and/or legal details.


Why did Dumbledore send Harry to the Dursley's house instead of to his grandparents?

This big question leads to the next question. What happened to Harry's grandparents? Lily's parents and James's parents are both absent from the story and we never knew what happened to them. Most people just assume that they all died because why else would Dumbledore send Harry to live with those evil Dursleys? But this question just left me thinking...


How to install Wi-Fi driver for Realtek RTL8821CE on Ubuntu 18.04?

I'm trying to install drivers for my Wifi on my HP All-in-one desktop. I've been told to show the output of the command "sudo lshw -C network" so here it is:  *-network description: Ethernet interface product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller vendor: Realtek Semiconductor Co., Ltd physical id: 0 bus info: pci@0000:01:00.0 logical name: enp1s0 version: 15 serial: 48:ba:4e:5c:06:5f size: 100Mbit/s capacity: 1Gbit/s width: 64 bits clock: 33MHz capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168h-2_0.0.2 02/26/15 ip=192.168.1.21 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s resources: ire:31 import:e000(size=256) memory: fea04000-fea04fff memory:fea00000-fea03fff  *-network UNCLAIMED description: Network controller product: Realtek Semiconductor Co., Ltd. vendor: Realtek Semiconductor Co., Ltd. physical id: 0 bus info: pci@0000:02:00.0 version: 00 width: 64 bits clock: 33MHz capabilities: pm msi pciexpress cap_list configuration: latency=0 resources: import:d000(size=256) memory:fe900000-fe90ffff   Output from "lspci -nnk | grep -A2 0280":  02:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter [10ec:c821] Subsystem: Hewlett-Packard Company RTL8821CE 802.11ac PCIe Wireless Network Adapter [103c:831a] 03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader [10ec:5229] (rev 01)


Can bosons that are composed of several fermions occupy the same state?

It is generally assumed that there is no limit on how many bosons are allowed to occupy the same quantum mechanical state. However, almost every boson encountered in every-day physics is not a fundamental particle (with the photon being the most prominent exception). They are instead composed of a number of fermions, which can not occupy the same state.  Is it possible for more than one of these composite bosons to be in the same state even though their constituents are not allowed to be in the same state? If the answer is "yes", how does this not contradict the more fundamental viewpoint considering fermions?


Create an Object where the Class is stored in a Variable

Edited This my IAnimal Interface interface IAnimal {     string getName();     int getAge();     bool getGender();     void eat(); }  This is my IWalk Interface interface IWalk {     void walk(); }  This is my IBird Interface interface IBird : IAnimal, IWalk {  }  This is my IFlightless_bird Intreface interface IFlightless_bird : IBird {  }  This is my Iswim Interface interface ISwim {     void swim(); }  This is my King_penguin Class public sealed class King_penguin : IFlightless_bird, ISwim  {     private string name;     private int age;     private bool gender;      public King_penguin(string name, int age, bool gender)     {         this.name = name;         this.age = age;         this.gender = gender;     }      public string getName()     {         return this.name;     }      public int getAge()     {         return this.age;     }      public bool getGender()     {         return this.gender;     }      public void eat()     {         Debug.WriteLine("I ate!");     }      public void walk()     {         Debug.WriteLine("I walked!");     }      public void swim()     {         Debug.WriteLine("I swam!");      } }  I have a dropdown which is filled with strings which have exactly the same name as all my animal classes.  This is the Code of the StartForm Form public partial class StartForm : Form {     public StartForm()     {         InitializeComponent();     }      private void btnCreateAnimal_Click(object sender, EventArgs e)     {         string selected = comboBoxAnimal.SelectedItem.ToString();         Debug.WriteLine(selected);         var createAnimal = new CreateAnimalForm(selected);         createAnimal.Show(this);     } }  When I have selected the animal, I want to define the parameters that are required by the constructor.  This is the code of the CreateAnimalForm Form public partial class CreateAnimalForm : Form {     string animal;     public CreateAnimalForm(string animal)     {         this.animal = animal;         InitializeComponent();     }      private void btnCreateAnimal_Click(object sender, EventArgs e)     {         bool gender;         string name = textBoxName.ToString();         int age = int.Parse(textBoxAge.Text);         if (radioButtonMale.Checked)         {             gender = true;         }         else         {             gender = false;         }                  IAnimal AnyAnimal = new this.animal(name, age, gender);      } }  When I have defined the parameters, I want to be able to press the button and create an object using the defined parameters and the selected animal


Is returning to country of origin from any schengen country possible?

I have multiple entry schengen visa from French Embassy in Nigeria. I am presently in Spain; I came into Spain from France. Can I return to Nigeria (country of origin) from any schengen country, specifically from The Netherlands?


Where does the use of the term echelon in maths stem from?

We often employ the term row echelon form to describe matrices with a certain pattern, see . My question is, when was the term echelon first used to describe a matrix? In particular, was the term used first in maths or in the military? Some etimology can be found , but it doesn't answer my question.


One of my colleagues has been to the USA recently, and I want to ask him how the country is. Which of the below is grammatically correct?        How is USA?      or        How is the USA?      Is "the" actually required in the above context?


Is there a word for describing people who know many things but superficially?

Is there an appropriate word for the antonym of "full-stack", as in programming? Someone who knows a lot of things just as a full-stack programmer, but without mastering them.


How Linux system knows what files/subdirectories are under one directory

I'm reading the book "Linux Kernel Development", and there are some important points:  inode doesn't include filename. filenames are stored in directory entry(dentry). but dentry is not stored on disk, it's dynamic generated.   Unlike the previous two objects, the dentry object does not correspond to any sort of on-disk data structure.TheVFS creates it on-the-fly from a string representation of a path name. Because the dentry object is not physically stored on the disk, no flag in struct dentry specifies whether the object is modified (that is, whether it is dirty and needs to be written back to disk).  So the question is: where exactly the file names store? and how "list directory" works?


on my question, user Javi_gg1 send me an answer that's right for me. This answer have  this code  \draw[ultra thick, red] plot (\x, {sin(deg(exp(ln(\fmin)+\x/\xmax*(ln(\fmax)-ln(\fmin)))*\x))} );   I could not understand how he works. is there anyone (maybe javi_gg1) who can explain it to me? Because I would change some aspect.


I want to clarify a confusion I am having in shell variable vs environment variable. I did the following test, where I have a shell variable abc and export it to an environment variable.  $  $ abc="shell var" $ env | grep abc $ echo $abc shell var $ export abc="env var" $ env | grep abc abc=env var $ echo $abc env var $ unset abc $ env | grep abc $ echo $abc $    After the export is done, I try to echo $abc.  Questions:   Does export move the variable abc from shell to the environment OR does it create a copy in the environment and assign it a new value ? When the second echo is done after the export, does echo check if abc is in environment and then print it, OR has abc been completely removed from the shell and is only present in the environment which is why echo prints its value ?


How do I go back to original 12.04 kernel?

I wanted to make a custom ISO, so I spent the whole day setting up a partition with all the applications and little tweaks that I thought would be comfortable for 12.04 32-bit.   I'm using Remastersys to do so, and when I went to do so, it said everything went fine, but when I checked under /etc/remastersys, I couldn't find it.   Maybe I'm looking in the wrong place? Anyways, I saw in an article that Remastersys doesn't support the Linux kernel from after the original 12.04 release.   How do I return my kernel to the original version it was in the default 12.04 without having to reinstall the partition and all the applications all over again?


How do I install and use Times New Roman Font with LibreOffice Writer?

I need the font for my ebook.  I have looked around for questions similar to this. Unfortunately, when I try to use the commands in the terminal I am greeted with this:     Reading package lists... Error!      E: Unable to parse package file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_xenial-updates_main_i18n_Translation-en%5fUS (1)      E: Unable to parse package file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_xenial-updates_main_i18n_Translation-en (1)      E: Unable to parse package file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_xenial-updates_restricted_binary-all_Packages (1)      E: Unable to parse package file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_xenial-   updates_restricted_i18n_Translation-en%5fUS (1)      E: Unable to parse package file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_xenial-updates_restricted_i18n_Translation-en (1)      E: Unable to parse package file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_xenial-updates_universe_binary-all_Packages (1)      E: Unable to parse package file /var/lib/apt/lists/us.archive.ubuntu.   com_ubuntu_dists_xenial-updates_universe_i18n_Translation-en%5fUS (1)      E: Unable to parse package file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_xenial-updates_multiverse_i18n_Translation-en%5fUS (1)      E: Unable to parse package file /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_xenial-updates_multiverse_i18n_Translation-en (1)      E: Unable to parse package file /var/lib/apt/lists/archive.canonical.com_ubuntu_dists_xenial_partner_binary-amd64_Packages (1)      E: Unable to parse package file /var/lib/apt/lists/archive.canonical.com_ubuntu_dists_xenial_partner_binary-i386_Packages (1)      E: Unable to parse package file /var/lib/apt/lists/archive.canonical.com_ubuntu_dists_xenial_partner_binary-all_Packages (1)      E: Encountered a section with no Package: header      E: Problem with MergeList /var/lib/apt/lists/archive.canonical.com_ubuntu_dists_xenial_partner_i18n_Translation-en%5fUS      E: The package lists or status file could not be parsed or opened.   Does any one have the latest way to get and install them, preferably with ease?  EDIT: This is not the same as the other due to the other options not working and actually disabling LibreOffice Writer on my computer, which I am now trying to fix. Here is a link to that question:


Are $p$-adic groups also Lie groups? What is a $p$-adic group specifically?

I am a bit confused by the definition of a $p$-adic group. I initially thought that a $p$-adic group was simply a group with $\mathbb{Q}_p$ as the underlying manifold, however this seems to be too vague, as I have seen definitions that mention Galois groups, local Archimedian fields, etc... I have also noticed that these groups seem closely related to typical Lie groups, like $GL_n ({\mathbb{R}})$. My question is, are $p$-adic groups also Lie groups? Also, does anyone know of a reputable textbook with a concise and self-contained definition of a $p$-adic group? Thanks


Geometric average less or equal to arithmetic one

Let $\ $ ${y_1\cdot...\cdot y_n} \in \mathbb{R}$ $\ $ be positive $\quad$   Prove:  $\sqrt[n]{y_1\cdot...\cdot y_n}$ $\le$ $\frac{y_1+...+y_n}{n}$  I have tried to find this by searching keywords like gemometric and arithmetic average, but hadn't found.  Actually, I have no idea how to start proving this one.


At /dev/block directory, what's meaning of file name like 8:0 or 11:0?

There's a bunch of symbolic links in /dev/block directory. And I figured out that they're pointing block device files in /dev. I wonder meaning of their names(8:0, 8:1, 11:0, 11:1, ...)


Do I really need a US$1500 rig for crisp sharp photos?

I'm getting into photography and got myself a used Canon 1200D with a Tamron 18-200mm lens. And currently under no circumstance I am able to make a perfectly focused sharp and detailed photo. Or at least such in the middle of the photo.  As I'm researching now, it seems to me that to make decent photos I need at least a US$1000 camera. That's not very inspiring xD  This is not duplicate of . This question is only about equipment, camera and lenes.


'Who' or 'which' in reference to companies

What is appropriate to use here, who or which?       There are around 50 companies who/which deliver scanning services to private and business consumers.


bash script using awk to rename file using timestamp

I started working on a script to rename files based on timestamp.  I thought I had it worked out on the command line but not working as a script.  Script hangs in the awk line.  This is the little script so far.  #!/bin/bash #renamePhotos.sh #  a script to rename photos in current directory based on date #  to be expanded  #  OUTPUT in $(ls -tr *.JPG);  LIST="$(ls --full-time -tr *.JPG)" echo "Starting..."  for i in "$LIST"; do     echo  $(awk '{ print $6 }' | awk 'BEGIN { FS = "-" }; { print $1 }')     echo done


I have an Ubuntu 13.10 installation, and some I must have removed some Packages or Repositories, so there are some packages which just do not want to install. Namely that is:  SKYPE sudo apt-get install skype-bin  The following packages have unmet dependencies:  skype-bin:i386 : Depends: libqtgui4:i386 (>= 4:4.8.0) but it is not going to be installed               Depends: libqtwebkit4:i386 (>= 2.2~2011week36) but it is not going to be installed               Depends: libx11-6:i386 but it is not going to be installed               Depends: libxext6:i386 but it is not going to be installed               Depends: libxss1:i386 but it is not going to be installed               Depends: libxv1:i386 but it is not going to be installed               Depends: libgl1-mesa-glx:i386 but it is not going to be installed               Recommends: sni-qt:i386 but it is not going to be installed               Recommends: libasound2-plugins:i386 but it is not going to be installed E: Unable to correct problems, you have held broken packages.   Than nspluginwrapper  The following packages have unmet dependencies:  nspluginwrapper : Depends: nspluginviewer (= 1.4.4-0ubuntu5) E: Unable to correct problems, you have held broken packages.   And a whole lot of other packages appear if I try to install the shown dependencies. I guess I have delete a whole repository, but how can I figure out which ones are be default in the list?  Thanks in Ahead!  EDIT   is a copy of /etc/apt/sources.list


Ban user for continuously asking questions which show no effort

I come to understand that there is some policy regarding users who repeatedly show little effort on their part when asking questions.  My questions   Is it correct? If so, what are the parameters by which a user is measured as showing little effort continuously? Recently I came across a user that keeps asking very low quality questions: most of them are down voted and close. Yet, this only happens when the users asks questions for a specific tag. For other tags, it seems like he/she makes a nice contribution to SO. It's just this specific topic/tag that the user refuses to learn and improve his/her questions. What can be done? It's annoying to keep getting these low-effort low-quality questions...   EDIT: I understand that the exact parameters of the banning mechanism are not published for good reasons. I'm not after the secret ingredients, and I believe the system works fine in general.    My question is regarding a particular user that on some topics (tags) exhibits "ban-worthy" behavior (at least to my understanding) while for others he/she is a respectable member of SO community.    Can a user be partly banned? Can this user be discouraged from participating in certain tags? Or better still, is there an effective way of helping this user improve his/her behavior and learn more before he asks for all tags?   Update: After a short period of peaceful quietness, this phenomenon repeats itself. Any new ideas?


Accelerometer outputs vs the real accelerations

TL, DR : the long sentence in bold.  I have been reasearching about accelerometers for a while, and I saw many times the following sentence:  Accelerometers don't sense gravity, they sense every other accelerations other than gravitational acceleration.  Is this statement fully correct?  During a free-fall there exists an acceleration due to the gravitational force acting on it(excluding other forces, i.e in vacuum) on the body right?(Correct me if I am wrong)  A body sitting on a flat surface and not moving should have a 0 acceleration (the forces on it are gravitational force and normal force equal in magnitude but with reverse directions, thus cancelling each other), right?(Correct me if I am wrong)  I think both my 2 statements above are correct, However;  I have a 3-axes accelerometer and when it is standing on a flat surface (table for ex.), xy plane is level with the horizon and positive z axis points towards the sky, accelerometer outputs a + 1g in z axis. And when the sensor is in free-fall(xy plane is still horizontal,i.e level) it outputs 0 g in z axis again.  So these two observations conflicts with two realities. Then should I conclude that, accelerometers indeed don't sense gravity (explains why free-fall results in a 0 g output) and for the case it is standing on a table it senses the acceleration due to the normal force?  P.s : When applying a force towards +/- x or +/- y, the outputs are consistent with how they have to be physically.  I asked other questions somehow similar to this on different communities (electronics, aviation, robotics etc.) but also wanted to get some answers from the perspective of physics.


How can I count how many times a node appears in a view?

I would like to keep a count of how many times a node is displayed in a view. For example, in my home page I have a view that displays a list of 20 products. I can count how many times users click on it. I can also count full node views.  But what I would like to do is to count how many times this product is displayed in this view. I use a random system to show users different products each time the home page is reloaded.  I have searched a lot, with different statistics modules, for example radioactivity, node view count, and entity view count but I'm just not able to find something that do what I want.   The answer should work with caching of the view enabled as well.


For positive integer $n>0 \in \mathbb{N}$, prove that $\sigma (1) + \sigma (2) + \cdots + \sigma (n) \leq n^2$.  I tried listing out the first few terms, but it doesn't really help that much. I also tried to simplify each term by splitting it up into prime factors( Note: This is not for all terms) but that didn't yield anything useful.


theorem of existence of an orthogonal complement

are there any theorems that give us any conditions to know if a linear subspace $E$  plus its orthogonal complement span the whole vector space?   For exemple, I know that in $\mathbb{R}[X]$, the complement orthogonal of the hyperspace $Span(1+X, 1+X^2, ...)$ is $\{0\}$ and thus the sum does not span the whole space  Thanks !


How to remove the Skype panel icon in Ubuntu 13.04?

This question has been answered a couple of times on this site for other versions of Ubuntu, but the proposed solutions no longer work in Ubuntu 13.04. Specifically, I tried the solution described . However, after following the instructions on that link (i.e. creating a Skype AppArmor profile), skype fails to load with the following error message:   /usr/bin/skype: 8: exec: /usr/lib/skype/skype: Permission denied.   Strangely, the same permission denied error happens if I try sudo skype. So is there another way to remove the skype panel indicator in Ubuntu 13.04, preferably without removing sni-qt?


Some Polygons disappear, when import to Unity trough FBX

Today i was working on a lightsaber for my unity project, but after i was nearly finished I saw, that there were some polygons not visible in Unity. I searched for that problem and found, that the reason could be that those polygons were N-Polygons, but after cutting the two polygons into tris, it still wouldn't show up. While writing this i also found out, that my materials are not being exported correctly, that all worked half a hour ago.  octagon -> cut into tris (the flat thing is a bone)    octagon missing (on top too, not only on sides)    materials in blender project    materials in blender trough FBX ex- and import    how it should look like in the end in unity    how it should look expanded    EDIT: all disappearing polygons would be inside the object, if it had no pose, maybe that's why they are not visible in Unity, but there has to be a fix for that somehow.  EDIT2: importing through .blend to Unity does not take the materials or those missing polygons


Map scale vs. map extent vs. map canvas size in Print Map Composer

I am using QGIS 2.0 and when I try to create my map in the print composer, I cannot make the scale and the extent the way that I need it.    I need my map to be at the scale of 1:10 000. However, the map area is quite large and I need a specific x min and y max in the extent (the x max and y min do not matter).  I also need a full A4 size sheet of paper.    When I enter the scale in, the map extent is not where I need it.  If I change the extent, it either changes the scale of the map or changes the size of the map canvas in the print composer.  When I change either one of those back, the scale changes and so on and so forth.    Is there some way to lock the scale and then just move the map image inside the map canvas?


I have this function to read key press from a 4x3 key-board:  uint8_t GetKeyPressed() {   uint8_t r,c;    KEYPAD_PORT|= 0X0F;    for(c=0;c<3;c++)   {      KEYPAD_DDR&=~(0X7F);       KEYPAD_DDR|=(0X40>>c);      for(r=0;r<4;r++)      {         if(!(KEYPAD_PIN & (0X08>>r)))         {            return (r*3+c);         }      }   }  return 0XFF;//Indicate No key pressed }   Some macro, I missed:      #define KEYPAD A       #define KEYPAD_PORT PORT(KEYPAD)     #define KEYPAD_DDR   DDR(KEYPAD)     #define KEYPAD_PIN   PIN(KEYPAD)   But I don't understand this code, pretty well, because of those bit shifting operations.  Can anyone help me with this code?  Compiler : avr-gcc  Micro-controller : ATmega328


$\sum_{n=0}^\infty n/2^{n}$ converges to show it?

The infinite series $$\sum_{n=0}^\infty n/2^{n}$$ converges to $2$.  But how to show that the infinite series converges to $2$?  Please help. Thank you.


Play video in ubuntu terminal without GUI

So. I have this old laptop and I installed Ubuntu Server on it so I would have just the terminal to play with. Now I'm trying to play video without seeing/installing any GUI. I installed mplayer but mplayer needs a "display" (GUI?) to play video (no, ASCII-art isn't what I'm looking for)  Any suggestions? Is it possible to get mplayer working without any GUI?  PS I don't mind installing GUI but I want to be able to create a program where you enter a password and then see a video in fullscreen, without seeing any GUI (so looks like a hacker screen).


I have the following lines of code and compilation errors. It should be my wrong understanding of the template function, or c++ generics, or something else. Thanks in advance for pointing it out.   #include <iostream> #include <vector>  using namespace std;  template <typename T> T* find(vector<T> &vec, T value) {   vector<T>::iterator first = vec.begin();   vector<T>::iterator last = vec.end();   for(; first != last; first ++)       if(*first == value)           return first;   return 0; }   The compile errors in console  debug.cpp: In function ‘T* find(std::vector<T, std::allocator<_CharT> >&, T)’: debug.cpp:9: error: expected `;' before ‘first’ debug.cpp:10: error: expected `;' before ‘last’ debug.cpp:11: error: ‘first’ was not declared in this scope debug.cpp:11: error: ‘last’ was not declared in this scope


I'm trying to prove the convergence of $$ \sum_{n=1}^{\infty}\frac{1}{n^\alpha}$$ with $\alpha > 1$.   For $\alpha \geq 2$ I can use the comparison test ($\sum_{n=1}^{\infty} \frac{1}{n^2}$ converges) so I'm missing $2>\alpha>1$ and I'm pretty much out of ideas.  If you could offer some advice I would very much appreciate it. Thanks in advance


How to explain the long lifetime of Rydberg atoms with Fermi golden rule?

How to explain the long lifetime of  with Fermi's golden rule? Wikipedia says it is partly due to tiny wavefunction overlap with inner orbitals, but what about the outer ones?


Probability density function sand question

The diameter of sand grains in a special sand roof, measured in mm, can be considered as a random variable X with probability density $$f(x)=\begin{cases} k(x-x^2) & \text{if 0≤x≤1 }  \\ \newline 0 &\text{otherwhise} \end{cases}$$ A) Determine the constant k so that this becomes a valid probability density $1=k\int _0^1x-x^2dx$ $=\int _0^1xdx-\int _0^1x^2dx$ $\int _0^1xdx = \frac{1}{2} $ $\int _0^1x^2dx = \frac{1}{3}$ $=\frac{1}{2}-\frac{1}{3}= \frac{1}{6}$ $k = 0.16666$ B)Find the expectation $E (4X + 3)$ and the variance $V (4X + 3)$ Does anyone know how to go about these two questions? on a) I am pretty sure that I got the correct answer. on b I'm pretty much clueless... any tips/solutions? thanks in advance


Can anyone please explain why output of the following is such?

String str1 = "abc:5";      String str2 = "abc:" + str1.length();      String str3 = "abc:" + 5;        System.out.println(str1==str2);      System.out.println(str1==str3);   Output of the program is : false true  But I don't understand why?


When adding two float values, I will get something like:  0.3+0.6 = 0.89999999999    I know what's going on. In C# we can use decimal instead, but in Javascript, how to fix it?


Google Chrome does not delete my browsing history

I have EXACTLY the same problem as Derfder had. I tried all proposals and advices mentioned below but nothing works. After deleting ALL browsing history, the urls are still in the autosuggestion.