Batch apex finish method emails firing multiple times

I have configured finish method to send error files on csv upload. It works ok for 200 records but if the sheet exceeds records more than 200 say 2000 I am getting emails for every job that has finished. So after the job is finished I have 5 error files in my mailbox. Is there a any way to handle this.  global void finish(Database.BatchableContext BC)              {         if(!errormap.isempty())         {             asyncapexjob a = [select Status,id ,apexclassid,jobitemsprocessed,totaljobitems,numberoferrors,createdby.email from asyncapexjob where id=:BC.getJobId()];             if(a.Status=='Completed')              {                 string body = 'Dear User \n'                     +'Your bulk upload of Sites'                      +'has finished. \n'                     +'There were '                     +errormap.size()                     +' errors. Please find the error list attached .';                                  string finalstr ='sno,Name,red,error \n';                 string subject ='error file subject';                 string attname = 'errorfile.csv';                                  for(decimal id:errormap.keyset())                 {                     string err = errormap.get(id);                     object1__c s = (object1__c)idtosobjectmap.get(id);                                          string recng = '"'+s.sno__c+'","'+s.Name+'","'+s.red__c+'","'+err+'"\n';                     str = str+recng;                 }                                  messaging.SingleEmailMessage email = new messaging.SingleEmailMessage();                                  messaging.EmailFileAttachment efa = new messaging.EmailFileAttachment();                 efa.setFileName(attname);                 efa.setBody(blob.valueOf(str));                                  email.setSubject(subject);                 email.setToAddresses(new string[] {a.createdby.email});                 email.setPlainTextBody(body);                 email.setFileAttachments(new messaging.EmailFileAttachment[] {efa});                                  messaging.SendEmailResult [] r = messaging.sendEmail(new messaging.SingleEmailMessage[] {email});                              }         }     }  ````


How to connect to the internet from Terminal when using a proxy with authentication

I have to use proxy servers to connect to the internet. I have set all proxies in my system proxy settings. Now I can connect to Internet using my browser and applications.  But I cannot connect to internet from my terminal.  I tried  export http_proxy="http://username:password@proxyserver:port/"    But still terminal applications cannot connect to the internet.


Duplicated content shown in a view using a relationship

I am using a view that has a contextual filter ("Content: Has taxonomy term ID") and a relationship ("Content: Taxonomy terms on node"); for some reason, I keep getting duplicated content. In the view settings I have "Distinct" checked.    Are there any other options I can look into?


How did Red get approval for rehabilitation?

In Shawshank Redemption, Red receives parole after serving 40 years in Shawshank. In the beginning of movie it is shown that Red's plea for rehabilitation got rejected multiple times. When Andy breaks-out of Shawshank, it gives hope to Red but in his interaction with the prison authority Red shows no interest in getting out. So how did Red get approval for rehabilitation?


pendrive recovery that damaged while installing linux

I tried to intall linux mint in my hp v165w pendrive.After I partition the device,I clicked on the "next" to install linux.in progress bar after 80% completion the progress stops and cancelled.after that  the pendrive is not showing in any pcs or laptops. I tried to open it in linux os as well in windows os also. but the problem is same.please tell me how to repair the pendrive again. thank you


Can't boot Ubuntu 17.10: [Firmware Bug]: ACPI region does not cover the entire command/response buffer

I can't boot Ubuntu 17.10  [    7.872529] tmp_crb MFST0101:00: [Firmware Bug]: ACPI region does not cover the entire command/response buffer. [mem 0xfed40000-0xfed4087f flags 0x200] vs fed40080 f80   There are two lines like that.  What should I do?


The following sed command gives a sed unterminated `s' command. It has to do with the variable that I put in ($header): sed -i "1s~^~$header~" $1"/main.cpp"  The following is the contents of $header: // // Pacman.java // etc // // Created by ayman at 12/06/2021 // Copyright (c) 2021 Google. All rights reserved. //  In the sed command, I've used a different delimiter (~), but that still gives the error. Does anyone see what the problem is?


When does the Team GO Rocket hot air balloon appear, and what grunts can I encounter?

A Team Rocket hot air balloon is sometimes hovering over my, triggering a Team Rocket grunt battle. I also had a Sierra encounter. When do these balloons spawn, and what encounters can I expect?


Early propagation of carries in the BLAKE hash function

The  uses round constants derived from $\pi$ to improve diffusion, even if the additions modulo $2^{32}$ are replaced with bitwise XOR when processing a null message and null initial state:     The higher weight in the original model is due to the addition carries induced by the constants $c_0,\dots,c_{15}$. A technique to avoid carries at the first round and get a low-weight output difference is to choose a message such that $m_0 = c_0,\dots,m_{15} = c_{15}$. At the subsequent rounds, however, nonzero words are introduced because of the different permutations.   However, the  describes changes it made to BLAKE that remove these constants:     Constants in G initially aimed to guarantee early propagation of carries, but it turned out that the benefits (if any) are not worth the performance penalty.  This change saves two xors and two loads per G, that is, 16% of the total arithmetic (addition and xor) instructions.   This statement was made as part of an argument that reducing the number of constants in BLAKE2 does not weaken it, while simultaneously decreasing RAM and ROM footprint. Unfortunately, unlike many of the other trade-offs it discusses, no further explanation is given. What are the benefits of guaranteeing early propagation of carries that lead to BLAKE's constants, and why are these benefits in doubt?


I have a complex curve which is a series of vertices and I would like to find the total length of all the vertices. MeasureIT can show me the length of each segment in the curve but does not seem to offer a total length. Is there any tool that can do this?


How to change Ubuntu installation path and all related things on Windows (WSL)?

So I installed Ubuntu on Windows from Store. But I don't want it on my C disk, I don't have many space there. I would like to move to another disk, I also would like to use external HDD


Approximating cos(43) with error less than $8/60000$

I have this problem I know I need to approximate the value with taylor polynomial and its error formula is $$|R_n(x)|\leq \frac{1}{(n+1)!}|x-a|^{n+1}$$ but i couldnt figured it out i should calculate up to which degree. Should I use radians? Can anyone help me about that


What is the optimal path between $2$ fixed points around an invisible obstructing wall?

Every day you walk from point A to point B, which are $3$ miles apart. There is a $50$% chance each walk that there is an invisible wall somewhere strictly between the two points (never at A or B). The wall extends $1$ mile in each direction perpendicular to the line segment (direct path) between A and B, and its position can be at any random location between the two points. That is, it can be any distance between A and B such as $0.1$ miles away from A, $1.5$ miles away, $2.9$ miles away.... You don't know if the wall is present or where it is until you walk into it.  You must walk around the wall if present as there is no other way to circumvent it.  Assume the wall is negligible thickness (like a force field), all ground is perfectly flat, and the y coordinates at both A and B are $0$ (although I don't think the optimal path will change much if they weren't).  What strategy minimizes the average expected walk distance between A and B?  How do we know for certain this strategy yields the shortest average walking distance?  To get the $100$ bounty points, I would like a convincing argument from you as to why you feel your solution is optimal and cannot be beaten.  For those of you using computer simulation, anything reasonably close to optimal is a candidate for the bounty.   Can anyone beat the optimal solutions submitted so far?  There are still a few days to try.  Even a slight beat (if not due to roundoff error or some other error) would help prove previous solutions are non-optimal.  You can just use the table of $31$ points (x-y coordinates) and compute that path length and then if you can find better then I will accept that answer.  I think by Sunday night I may have to award the bounty otherwise it may get auto-awarded.


change array value in php through array place

How to change or update array value in PHP through array number?  Example:  $array1 = array("cat","dog","mouse","dog");   I want to change the value of dog in the 2nd array only


I have had a few problem with exim4 and various phone mail clients (Windows Phone in particular) that seem to result from bad mail clients together with GnuTLS. I'd like to recompile exim4-daemon-heavy to use OpenSSL to see if that helps anything.  Now, I've gotten used to debian's packaging system and am unsure on how to do this. I've downloaded the exim4 source using apt-get source exim4. I then edited the file Debian/rules to uncomment OpenSSL = 1.  Then I tried make, but was told that I need to copy the template src/EDITME to Local/Makefile and edit it to my taste. My taste would be a drop-in replacement for the existing and running exim4-daemon-heavy, just using OpenSSL. And here I am stumped as there are quite a lot of options there and I don't like to break my email setup more than neccessary.  So... what can I do to make this test?


How to prove $\lim_{n\to \infty} \frac{n!}{n^n}$ is zero?

I am struggling in this limit: $$\lim_{n\to \infty} \frac{n!}{n^n}$$ I really worked on this for few days: clearly, it goes to zero but I couln't do it rigorously. I'd really appreciate your help. Thanks from now.


Prevent automatic loading of next video on YouTube (esp playlists)

I absolutely hate it when I watch a video on YouTube and it automatically loads another video page after it's done playing.  This is especially annoying when I'm in the middle of typing a comment as it will cause me to lose what I have typed.  I'd like the video to simply stop and for no further action to take place once it is finished playing.  Is there any way to accomplish this?


Merging isolines into polygons to produce isochrone map in QGIS

There is a set of isolines produced with . It shows distances in meters [400, 800, 1200, and everything further] from a certain point.  My desired output is an . However, I do not know yet how to merge/aggregate isolines into polygons, where each isoline located exactly in a proper polygon with no overlaps etc. Better to say I want to draw an outline from the farthest points of each isoline class. What is the best approach? I have tried:  extracting nodes from lines Vector > Geometry Tools > Extract nodes, filtering with a certain isoline class, and then Vector > Geometry Tools > Concave Hull. deploying the QGIS plugin, namely .  Both outputs are represented on the image below, numbered appropriately. But there is a problem, nodes from the higher-class isoline group overlap the lower-class isoline group. How can I handle this issue?  I have seen these articles but nothing spectacular:


In Classical Mechanics one usually considers the Lagrangian as $L = K - U$ where $K$ is the kinetic energy of the system and $U$ is the potential energy. One then gets the Euler-Lagrange equations and everything is fine: if we have a system we can plug in the kinetic energy and potential and find the Lagrangian for it.  The point is that I've already seen a different object: the Lagrangian density $\mathcal{L}$ which is on the other hand a $4$-form on space-time. The main difference being that the action is the integral of $L$ over time and the integral of $\mathcal{L}$ over all space-time.  The problem is that apart from that, no relation between $\mathcal{L}$ and other quantities is given at first. So for instance, in electrodynamics we have  $$\mathcal{L} = -\dfrac{1}{4\mu_0}F^{\alpha \beta}F_{\alpha\beta}-A_\alpha J^\alpha$$  Where $A$ is the $4$-potential and $F=dA$ is the electromagnetic tensor. It is not clear at first, why this is the right Lagrangian density in the sense that it becomes a little hard to see where it comes from.  So, the Lagrangian itself is just $K-U$, but what about the Lagrangian density? How does one find it?


Serials like The Flash, Arrow, and Agents of SHIELD are now in a mid season break.    What does it mean? Why do they take break in series like this?


Troubleshooting Proprietary NVIDIA 319.49 Driver

Though I would prefer to use the open-source nouveau drivers, the support for my 485M chip has not proved fruitful in the past.  Because NVIDIA's driver repository is somewhat dated, I downloaded the latest (recommended, NOT beta) driver install package/script from the official site. I then booted into recovery and ran the installer with no hiccups save for one warning regarding the failure to run a "distribution-provided pre-install script." The install completed successfully with no warnings or errors, and I was sure to build the kernel module and even ran update-initramfs -u to ensure a proper boot. However, after selecting Ubuntu from GRUB, all that is presented is a blank screen with a blinking underscore cursor in the top left corner.  After searching around a bit, I've learned that others experiencing problems with the proprietary drivers in Ubuntu (and Mint) are often presented with TTY error screens during boot displaying some level of verbosity concerning displays, or experience a full graphical boot plagued by blinking/flashing images. I also learned that some problems may be present with the proprietary driver on notebook systems.  Has anyone had a similar experience with this or previous version of the NVIDIA proprietary driver on Ubuntu/Debian-based [or otherwise] Linux systems? Does anything come to mind that might resolve the issue?  I am running a 64-bit system under Ubuntu 13.04 with an Intel Core i7-2920XM chipset and a NVIDIA GTX 485M graphics card.


Connect mobile phone to internet using desktop pc internet

is it possible to share my desktop pc internet to my mobile phone?  im using HTC Hero and a wired internet connection on my desktop pc


Image not rendering as pdf in visualforce page when adding data:image/jpeg;base64 as an image property

I need to render an image in Visualforce as pdf. When I load the page without the renderAs="pdf" the image loads  But the same image doesn't render in pdf except for a small box.  Visualforce page to render the image:  <apex:page standardController="Case" extensions="CasePDFContentGenerator" standardStylesheets="false" applyHtmlTag="false" showHeader="false" applyBodyTag="false" action="{!updatePrintFlag}" renderAs="pdf">  <body>     <c:PDFContentGenerator conObj="{!printInstance}"></c:PDFContentGenerator> </body>     VF component  <apex:component> <apex:attribute type="CasePDFContentGenerator" name="conObj" description="con object instance"/> <apex:repeat id="caseDetails" value="{!conObj.caseList}" var="case">     <div style="page-break-after: always;" id="map">         <!--THIS IS WHERE I PASS THE ID to the component safedropimagecomponent-->    <c:imagecomponent dropid="6cb39aba-65d1-4aad-817d-b51c2118e6b4"></c:imagecomponent>     </div> </apex:repeat>     Please find my jquery script in the imagecomponent , which I am using to handle the id passed from VF component.  <script type="text/javascript">     jQuery(function($) {         var dropId = '574cae51-184b-4257-af2b-7cd6a55fc7e4';//Hard-coded for testing purpose             var text = "";              if(dropId != '') {                  ImageComponentController.getArticleImage(                     dropId,                     function(result, event) {                         if(event.type === 'exception') {                             setSafeDropResponse('ERROR: ' + event.statusCode + ': ' + JSON.stringify(event));                          } else if (event.status) {                             if(result.isError == true) {                                 setSafeDropResponse(result.errorMessage);                              } else {                                 setSafeDropResponse($('<img/>').prop('src', 'data:image/jpeg;base64,' + result.imageBody));                              }                         } else {                             console.log('ERROR:', event);                         }                      }                 );             } else {                 setSafeDropResponse('No guidId Set');             }         //});     }); </script> <script type="text/javascript">     function setSafeDropResponse($response) {         var $wrapper;         if(typeof $response === 'string') {             $wrapper = jQuery('<div />').text($response);         } else {             $wrapper = $response;         }         console.log('test' + JSON.stringify($wrapper));         jQuery('#wrapper-image').empty().append($wrapper);     } </script>   I am assuming, I need to handle this portion differently, but cannot think of what? Please advise.  else {setSafeDropResponse($('<img/>').**prop('src', 'data:image/jpeg;base64,' + result.imageBody));**}


What was the first game to have an explicit "worse than failure" rule?

These days it's not uncommon for systems to have a rule, explicitly stated, in the rulebooks as an "optional" rule, or commonly house-ruled in, where a sufficiently bad roll of the dice not only causes a character to fail whatever they were attempting but also causes some additional bad thing to happen to them (either randomly generated or decided by the GM/storyteller/arbitrator).  Names for such mechanics include "critical failure", "fumble", "botch", etc. Dice mechanics include rolling a natural 1 on a d20, rolling more 1s than "successes" (as defined by the system) on Nd10, rolling 3-of-a-kind on 3d6, etc.  What was the first game system to include an explicit rule of this nature (not a house rule or optional rule)?


Loss reduction: when to use sum and when mean?

In the PyTorch documentation for most losses, there is a parameter called reduction usually, and it is mean, but there is also a sum option. I think optimizer can handle both of the fine, so I don't understand when to use which?


How to know if the number of divisors in a determined range for a number is odd or even

I would like to know if the number of divisors for the number in a determined range is odd or even without counting the divisors, I think the question is a little tad fuzzy, thus, I will supply the question with an example . Suppose we have n = 7 and b = 24, Is the number of divisors for b in range 1 to n odd or even ? in our example we have : 1,2,3,4,6 then we have five divisors, so the number is odd, we just omitted the rest divisors { 8, 12, 24 } because they are out of the range . Is there such a method to solve this matter ?  Thank you !


Can't create a folder inside my local server?

I recently installed Lampp server (version 1.7.7) so I went to my local folder, which I believe is in /opt/lampp/htdocs because that's where I've installed my server, and wanted to create a folder where I can put my projects, but I couldn't because the option in the right-click menu isn't even available.  How can I create a directory here?


Is there a downside of always using fragile?

I am preparing a presentation and since I am presenting a lot of code, I find myself adding [fragile] to many slides such that I can put verbatim code in it (actually lstlisting from from the listings package).  \begin{frame}[fragile]{Title} \begin{lstlisting} double arr[5][12][27]; \end{lstlisting} Blah \end{frame}   It is so common that now I am putting fragile just-in-case and to avoid a surprising compilation error.  What is the cost or downside of adding fragile to all the slides?   If there is none, why packages such as Beamer just don't set the environments to be fragile by default?


Set of Linear equation has no solution or unique solution or infinite solution?

For the system  $$ \left\{ \begin{array}{rcrcrcr}  x &+ &3y &-  &z &= &-4 \\ 4x &-  &y &+ &2z &= &3 \\ 2x &-  &y &- &3z &= &1 \end{array} \right.  $$ what is the condition to determine if there is no solution or unique solution or infinite solution?   Thank you!


Can it be proven in $\sf ZF^{\neg\infty}$ that the sets $x_n=\{x_{n+1}\}$ do not exist?

This question is my attempt to hone in on the problem of proving the strong form of the Axiom of Regularity $A\neq\emptyset\to\exists x\in A(x\cap A=\emptyset)$ (where $A$ is an arbitrary class) from the weak form $\forall a\!:a\neq\emptyset\to\exists x\in a(x\cap a=\emptyset)$. In ZF with the negation of the Axiom of Infinity (which I abbreviate as $\sf ZF^{\neg\infty}$), all sets have finitely many elements, and this allows us to prove that sets like $x=\{\{\{x\}\}\}$ do not exist, but I don't see how to prove that the infinite family $x_n=\{x_{n+1}\}$ does not exist, since I can't collect all the elements together and use regularity on that, since the resulting class is (provably) not a set.  My ultimate goal is to prove that every set has a transitive closure (that is a set), but these sets will foil my attempt if I can't prove their non-existence. Conversely, supposing I couldn't prove this, this would mean that $\infty$ is required for the proof, so could I turn it around and prove, given that every set has a transitive closure, that $\omega\in V$?


I am trying to install GCC by the command sudo apt install gcc in the terminal of my Ubuntu 18.04.1. But I am getting the following message:  bharath@bharath-Lenovo-G50-80:~$ sudo apt install gcc [sudo] password for bharath:  Reading package lists... Done Building dependency tree        Reading state information... Done E: The package savap:i386 needs to be reinstalled, but I can't find an archive for it.   bharath@bharath-Lenovo-G50-80:~$ apt-cache policy savap:i386 savap:i386:   Installed: 14.0.3876-1100   Candidate: 14.0.3876-1100   Version table:  *** 14.0.3876-1100 100         100 /var/lib/dpkg/status   Could anyone please suggest a way to fix this?


Difference between 'which' and 'that' in restrictive (defining) relative clauses

Excuse me if this topic has been brought up before though I couldn't find it. It seems that there are many similar topics related to both defining and non-defining clauses but there is still one question that bothers me. I want to know about the difference between wh- pronouns (who, which, what...) vs. that in restrictive relative clause.   For example: The man that I saw at the mall looked puzzled.  The man who I saw at the mall looked puzzled.  I omitted commas intentionally, as I'm willing to talk about defining clauses only.   The Cambridge Grammar of the English Language gives quite vague description on that and I cannot think about actual examples:  "Relative clauses are so called because they are related by their form to an antecedent. They contain within their structure an anaphoric element whose interpretation is determined by the antecedent. This anaphoric element may be overt or covert. In the overt case the relative clause is marked by the presence of one of the relative words who, whom, whose, which, etc., as or within the initial constituent: clauses of this type we call wh relatives. In non-wh relatives the anaphoric element is covert, a gap; this class is then subdivided into that relatives and bare relatives depending on the presence or absence of that." Thanks in advance!   UPD: I know that it seems that in general there is no need to dig for this information but still I need this for my research.


Techniques for modeling a network of blood vessels

If you've ever seen anything like Body Worlds or the Bodies: The Exhibition you'll know how they dissect individual organ systems and put them on display with a technique known as . For instance, plastic can be pumped through the circulatory system such that when it hardens, acid can be used to dissolve the rest leaving the underlying network of blood vessels underneath.    I'm looking forward to modeling something as intricate as this, but my first attempts have failed. The initial idea was to generate a tree structure with the Sapling Tree add-on. Then I could do a Boolean modifier with my model, and touch up the end points individually by extruding to follow the contours of the model's surface. However, the Boolean modifier fails in this example.  Do I have to code this procedurally with a Python script or is there some other method I should try first?


How to use "`" in the same way it is used on the SE websites?

On any SE post one can use the backtick symbol ("`") in order to mark some text as being a piece of code, or computer output. For example: void main().  Is there a way to make use of "`" the same way in a LaTeX document?


Find the maximum area possible of equilateral triangle that inside the given square

How can I find the maximum area possible of equilateral triangle that inside a square whose sides have length a. And how does that triangle look like? Can we construct it (with compass and straightedge)?


get error while sudo apt update in ubuntu 18.04

My system is broken not able to work anything on that. Ubuntu online store shows empty  when I try to update I get an error related to Appstream  AppStream system cache was updated, but problems were found: Metadata files have errors: /var/lib/app-info/yaml/archive.linux.duke.edu_ubuntu_dists_bionic-security_universe_dep11_Components-amd64.yml.gz, /var/lib/app-info/yaml/archive.linux.duke.edu_ubuntu_dists_bionic-security_main_dep11_Components-amd64.yml.gz, /var/lib/app-info/yaml/archive.linux.duke.edu_ubuntu_dists_bionic-backports_universe_dep11_Components-amd64.yml.gz, /var/lib/app-info/yaml/archive.linux.duke.edu_ubuntu_dists_bionic-updates_universe_dep11_Components-amd64.yml.gz, /var/lib/app-info/yaml/archive.linux.duke.edu_ubuntu_dists_bionic-updates_main_dep11_Components-amd64.yml.gz, /var/lib/app-info/yaml/archive.linux.duke.edu_ubuntu_dists_bionic_multiverse_dep11_Components-amd64.yml.gz, /var/lib/app-info/yaml/archive.linux.duke.edu_ubuntu_dists_bionic_universe_dep11_Components-amd64.yml.gz, /var/lib/app-info/yaml/archive.linux.duke.edu_ubuntu_dists_bionic_main_dep11_Components-amd64.yml.gz, /var/lib/app-info/yaml/packages.elementary.io_appcenter_dists_bionic_main_dep11_Components-amd64.yml.gz Reading package lists... Done E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh-cache > /dev/null; fi' E: Sub-process returned an error code  I tried every possible solution found on the internet to fix this error but not helpful. Please, somebody guide me to fix this. Thanks


How to write a test class for a method that send a htttp request among other things

I'm trying to write the test class for a method like this.       @AuraEnabled   public static DynamicTableMapping getFilteredAccounts(String filterId){         List<string> headervalue = new List<string>();         String nombreLista = [SELECT Id, Name FROM ListView WHERE Id = :filterId].Name;         HttpRequest req = new HttpRequest();          String baseUrl = URL.getSalesforceBaseUrl().toExternalForm();          String endPoinURL = baseUrl+'/services/data/v45.0/sobjects/Account/listviews/'+filterId+'/describe';          req.setEndpoint(endPoinURL);         req.setMethod('GET');         req.setHeader('Authorization',  'Bearer ' + UserInfo.getSessionId());         Http http = new Http();         HTTPResponse response = http.send(req);          Map<String, Object> tokenResponse = (Map<String, Object>) JSON.deserializeUntyped(response.getBody());         String query = (String) tokenResponse.get('query');         System.debug('query --> ' + query);         for(string s:query.split(',')){             s = s.trim();                 if(s.startsWith('SELECT')){                 headervalue.add((s.removeStart('SELECT')).trim());                     }else if(!s.startsWith('SYSTEMMODSTAMP') && !s.equalsIgnoreCase('SYSTEMMODSTAMP FROM ACCOUNT ORDER BY NAME ASC NULLS FIRST') && !s.contains('ASC')){                 headervalue.add(s.trim());             }         }         return new DynamicTableMapping(headervalue); }   The problem is that I'm getting this error: Method defined as testmethod does not support web service callouts. I've read this answer but I dont understand how to implement the solution:   What can I do to pass the cover for my method? My method DOESN'T RETURN a http response so I don't know how to make the mock properly. All examples I've found returns a http response...  Thanks in advance


I'm reading "BASH pocket guide of Oreilly". It said:      The process ID of the current Bash process.   In some cases, this can differ from $$.   Above explanation , explained $BASHPID variable.  Question: which cases?


C++ structs, difference between new type; and new type()

for example I have in C++ a struct like  typedef struct point {     double x, y; };   I can use  point *p = new point;   or  point *p = new point();   To create a point dynamically.   Whats the difference? In the second case x and y are initialized implicit to zero. Why not in the first case?


Is it safe to disable System Integrity Protection?

While using OS X El Capitan 10.11.x, is it safe to disable System Integrity Protection? There are all these additional apps that modify folders and the dock that I want to install but you have to disable rootless first.  Good idea or bad idea?


i'm trying to install kde5 on ubuntu 14.04 but after update system and add some PPA, packages dont find in repository.  sudo apt-add-repository ppa:kubuntu-ppa/next sudo apt-get update sudo apt-get dist-upgrade sudo apt-get install kubuntu-plasma5-desktop  Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package kubuntu-plasma5-desktop   or this way:  sudo add-apt-repository ppa:neon/kf5 Cannot add PPA: 'No JSON object could be decoded'.   or try this way:  sudo apt-get install project-neon5-session project-neon5-utils                                The following packages have unmet dependencies:  project-neon5-session : Depends: project-neon5-plasma-framework but it is not installable                          Depends: project-neon5-kde-workspace but it is not installable                          Depends: project-neon5-kde-runtime but it is not installable E: Unable to correct problems, you have held broken packages.   how to add correct repository and resolve this problem


To start off let us construct a situation were I am walking along and I pass another person. Depending on the time of day and to be polite I say one of the following:   "Good Morning!" "Good Evening!" "Good Night!" "Good Day!"   Now 1 and 2 are common welcoming and polite gestures and I have no problem with their use. However the problem lies with 3: Why is it so dismissive compared with 1 and 2?  If I said "Good Night!" to somebody when walking at around 11 p.m why does it sound like I am putting them to bed?  Finally as a related matter, why is 4 not used too often? In other languages 4 seems to be more common then an equivalent "Hello!" and sometimes 4 and "Hello!" posses the same.meaning.


Infinite rationals approaching irrational within denominator squared

We have been asked to prove that given an irrational $\alpha$ there exist infinitely many relatively prime pairs $(p,q)$ such that $|p/q-\alpha|<1/q^2$. I have so far found a constructive solution with continued fractions, but only existence is required and I feel like there must be a much more concise and precise solution that does not require introducing continued fractions. As a tip we are told to use the pigeonhole principle.  Any other tips or piece of advice will be helpful. Thank you.


How to reboot Windows 10 [UEFI] after installation of Linux (Fedora) in Legacy mode?

Recently I tried installing Linux in my laptop to dual boot with Windows 10, but I accidently did it in Legacy mode. I created a separate partition with 20gb for Linux and installed it in that partition. Through Linux I know that none of my other drives are affected as all the files are intact.  I'm able to use Linux through Legacy boot with no problems. I'm unable to boot Windows through UEFI boot configuration as it throws a "disk not found" error.  Q: Can someone please help me reboot to Windows 10???  Laptop Details: Acer Aspire 8gb RAM 2.6 GHz 700gb Drive  PS: If solution requires Fedora to be uninstalled, that would not be a problem.


Why does my dwarf stand idle when having a strange mood?

I have a dwarf which has already gathered some materials. He now:   sketches pictures of stacked leather sketches pictures of stacked cloth sketches pictures of a quarry   but I have tons of stones available, 30 units of cloth and 2 units of tanned hides. Why is the dwarf not collecting the resources and start working on the artifact?


In Overwatch, a player can be issued medals for peak performance in 4 categories; Eliminations, Damage, Healing, and Objective Time, and Objective Kills. Bronze, Silver, and Gold medals are awarded for 3rd, 2nd, and 1st in that category, respectively.  How is EXP gain calculated from these medals? What are the specific EXP numbers gained from the different categories of medals? Will multiple Gold medals stack their EXP? Can EXP from multiple categories of medals stack, or is only the highest achieved counted?  All this time playing the game, and I still don't know how medals work...


I am trying to create a key and value array from database record, but the array just getting the final record! Here is a snippet of my code:  $cateogiresArr = array(); while ($row = mysqli_fetch_row($result)) {   $cateogiresArr["categoryname"] = $row[1];   $cateogiresArr["description"] = $row[2]; } header("Content-type:application/json"); $json_categories = json_encode($cateogiresArr);


When I install openssh-server with apt-get install on my ubuntu 18.04.2 LTS server an error occures when kpgk processes the package. The server is a cloud machine with 1 VCPU, 2 GB RAM, 20 GB Disk (4 GB still available).  dpkg --print-architecture: amd64  dpkg --print-foreign-architectures: i386  name -a: Linux [computer-name] 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux  Here is the exact command and full output:  apt-get install: Reading package lists... Done Building dependency tree Reading state information... Done The following packages werde automatically installed and are no longer required:   linux-image-4.15.0-42-generic linux-modules-4.15.0-42-generic Use 'apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. 1 not fully installed or removed After this operatoin, 0 B of additional disk space will be used. Setting up openssh-server (1:7.6p1-4ubuntu0.3) ... /var/lib/dpgk/info/openssh-server.postinst: 95: /var/lib/dpkg/info/openssh-server.postinst: tempfile: Exec format error dpkg: error processing package openssh-server (--configure):    installed openssh-server package post-installation script subprocess returned error exit status 2 Errors were encountered while processing:    openssh-server E: Sub-process /usr/bin/dpkg returned an error code (1)   The dpkg status of the package is now "install ok half-configured"  Maintainer is Ubuntu Developers   can someone give me a push in the right direction on how to solve this?`  Thanks


DAC connection to sql instance not working

I have configured one remote sql server with 2 instances A,B. I have enabled TCP/IP,Port 1434, remote connections, sql browser running and firewall inbound rule. I've enable DAC using sp_configure 'remote admin connections', 1; and reconfigure. However when I try to connect via SSMS or SQLCMD using admin:hostmachine\sqlinstance or sqlcmd -S hostmachine\sqlinstance -U sa  -P pass -d master -A I'm getting the following error : A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 43 - An error occurred while obtaining the dedicated administrator connection (DAC) port. Make sure that SQL Browser is running, or check the error log for the port number) (Microsoft SQL Server, Error: -1) I can connect using DAC but only as admin:hostmachine or sqlcmd -S hostmachine -U sa  -P pass -d master -A


Difference between DL380 rails for different generations?

I just got an HP Proliant DL380 G5 server (it's actually Cisco branded, but I don't think that matters), without the rack rails. I'm trying to learn some server architecture and use it as a basic server. I am looking for some rails to mount it in my rack.  What are the differences of the rails between generations? I see a lot of G6 rails with the cable management arm for sale; is it backward compatible with the G5? Or, do I need to seek out a G5 rail specifically?  If the differences are minor enough, could I simply mod the rails? (e.g. drill my own holes).


How to use grep to search for a line with one of two words but not both?

I want to search for lines with 'word1' XOR 'word2' in a text file. So it should output lines with word1, word2 but not the lines with both of these words. I wanted to use the XOR but I do not know how to write that in linux command line.  I tried:  grep 'word1\|word2' text.txt grep word1 word2 text.txt grep word1 text.txt | grep word2 grep 'word1\^word2' text.txt   and many more, but could not get sucess.


What exactly is data.stackexchange.com? I cannot understand, regardless of how much I read about it. It would be helpful if someone explained.


how to set AlarmManager for specific date, hour, minute and second

the alarm doesn't work at the specified time (20 December 2018, 12:10:02)  what is the problem with this code?  Calendar c = Calendar.getInstance(); c.set(Calendar.MONTH,12); c.set(Calendar.YEAR,2018); c.set(Calendar.DAY_OF_MONTH,20); c.set(Calendar.HOUR_OF_DAY,12); c.set(Calendar.MINUTE,10); c.set(Calendar.SECOND,2);  Intent intent = new Intent(ProfileList.this, IntentBroadcastedReceiver.class); PendingIntent pintent = PendingIntent.getService(ProfileList.this, 0, intent, 0); AlarmManager alarm = (AlarmManager)getSystemService(Context.ALARM_SERVICE); alarm.setRepeating(AlarmManager.RTC_WAKEUP, c.getTimeInMillis(), 30*1000, pintent);


I see user name in the title when it shouldn't be showed. Steps to reproduce:  Select any site on the left panel  Tap on the title and select users  Select any user (e.g. Shog9)     Select any site where user has activity     Select any site on the left panel     User name doesn't disappear from the title        App Version: 1.0.89 Device Manufacturer: samsung Device Model: Nexus 10 OS Version: 5.1.1 (2640980)


Why does the fist print statement of b in the function print 5 and not 6?

I'm confused. I would expect that the first print statement in the function would print 6 and not 5. Because a++ + c++ = (1+1) + (3+1) = (2+4 = 6). #include <iostream> #include <string>  int main() {     int a = 1;     int b = 2;     std::cout << "intitialisation b:"<< b << std::endl;     int c = 3;     {         auto b = ++a + c++;         std::cout << "increment b in function:" << b << std::endl;         auto e = b;         c += ++b;         std::cout << "increment b in function:" << b << std::endl;     }     std::cout << "increment b out function:" << b << std::endl;     int* p = &a;     int* q = &b;     std::cout <<"value pointer:" << *q << std::endl;     ++(*q);     std::cout <<"value pointer:" << *q << std::endl;     *p += a++ + (*p)++; }   intitialisation b:2 increment b in function:5 increment b in function:6 increment b out function:2 value pointer:2 value pointer:3  Nadine


How to use a single count for tables and figures?

In a short document, I wrote reference-based sentence, which ended up reading :     With the previous example (figure 1), the features used are presented in table 1.   I would like both figures and tables to share the same counter, so after figure 1 comes table 2, then table 3, figure 4, etc.  How can I merge the counts for tables and figures ?  A similar question was asked on SO () but I couldn't make the answers work.


Imported PNG shows black instead of transparency in the background

Importing a 'smoke' image as a plane shows no transparency. Still have black background.    What other settings should I tweak?


Does a homomorphism of rings always send ideals into ideals?

A basic algebra question: does a homomorphism of rings always send ideals into ideals?


advert web pages opened on phone by bg app

I have some unwelcome behavior on my Samsung S4 AOS 5.0.1 (unrooted) phone. A few days ago I start to get attempts to open my web pages (up to 3 times a day so far) while my phone is idle. All cases have been bit.ly links for example:  http://bit.ly/2KG1tdA+ -- http://www.gohoi.com/jaguar-xj/ http://bit.ly/30muksQ+ -- http://www.gohoi.com/lincoln-mkz/ http://bit.ly/2nVdS4m+ -- https://t.co/leK1JpzypD http://bit.ly/34WUUeL+ -- https://fb.itfactly.com/?url=https://l.facebook.com/l.php?u....   As I have no default browser I was able to capture URL and add "+" to end so I can get the detination URL on bitl.ly stats page as shown above in 2nd column. The first link went to at least 0.5 Million devices so somebody out there must have run into this phone abuse.  Is there anyway to trace what process is triggering the open web request (eg using logs, trace tools etc), so I can uninstall the app or disable it if it is builtin. Could it be "Peel remote".


existence of $a \neq e$ in group such that $a^2=e$

$G$ - group, $|G|=2k$, $k\in \Bbb N$  Does there exist $a\in G; a \neq e: a^2 =e$?  I think I should somehow use the fact, that there is odd number of elements of $G$ which are not $e$.


Whenever I try to add folders to git hub it gives "files are empty" am i missing something? Anyone know why? It seems to me that I'm adding the folders wrong.


How to upgrade a remote box from 10.10 to 12.04 LTS when apt doesn't work?

I have a virtual private server that runs the out-of-date Ubuntu 10.10. I'd like to upgrade to 12.04 LTS.  Currently apt doesn't work on this box, and the command do-release-upgrade is not found.  There is nothing on this VPS that I need to save, I'm OK with wiping it clean and installing 12.04, but I don't know how to do that when my only access is to a terminal remotely.


Permanently change system color temperature

I want to change my system screen color settings to red color temperature of 3000k. I am using ubuntu 16.04LTS, I have also tried with Flux and redshift, It doesn't help me.  Flux - doesn't have permanent color shift for 24/7


Tight Flight connection : Have I made a mistake?

I'm traveling to the US from India, specifically the Bangalore - Schiphol - Seattle route. The first leg is operated by KLM and the second leg is operated by KLM partner Delta. I just have a 1 hr 25 min flight connection time. Will be arriving at 8:25 AM in Schiphol and next departure is at 9:50 AM. Since this is an international flight and I have to pass through screening again, I'm wondering if I have made a mistake booking this flight. Both flights are on the same ticket/booking.


Can C++ 17 handle nested variadic templates?

Consider the C++ 17 code below, which tests a set of enum values to see if another enum value is contained in that set:  enum Flag { val1, val2, val3, val4, val5 };  template<Flag arg> struct Value {     template<Flag... set> struct IsIn {         static constexpr bool value =             static_cast<bool>(((set == arg) || ...));     }; };   This works as intended:  bool x = Value<val4>::IsIn<val1, val2, val5>::value; // x == false  bool y = Value<val2>::IsIn<val3, val2>::value; // y == true   However, I wish to test if all of a set of values are contained within another set, like so:  template<Flag... args> struct Values {     template<Flag... set> struct AreIn {         static constexpr bool value =             static_cast<bool>((Value<args>::IsIn<set...>::value && ...));     }; };   The above does not compile on GCC 7.3 or Clang 5.0; they both give rather cryptic answers that give little insight into the problem. Given that parameter pack expansion in a template parameter list is allowed (as long as the template supports the expansion), I'm having a hard time figuring out why this isn't legal C++.


Is there a cheat code or other way to obtain infinite candies?

I've been searching everywhere for a cheat to get infinite candies, I find that candy box kind of rips me off!  So is it possible to get infinite candies?


How can I make ubuntu14 desktop like win 7

I have Ubuntu 14 running in vmware but I want to make the desktop look like Windows 7. I tried  sudo apt-get install xubuntu-desktop   but when logged out I can't see xfce session.  I also tried  sudo add-apt-repository ppa:upubuntu-com/gtk3  sudo apt-get update  sudo apt-get install win2-7  gsettings set org.gnome.desktop.wm.preferences theme 'Win2-7-theme'  gsettings set org.gnome.desktop.wm.preferences button-layout 'menu:minimize,maximize,close'    to no avail.


Can't access Nginx webserver after configuring SSL (Certbot, LetsEncrypt)

I'm brand new to AWS and web servers, using nginx for this project & MERN stack for the code. Anyways I got my website up and running using  tutorial, and used  tutorial (uses letsencrypt and certbot) to try to add SSL to my website, which was working fine in standard http. Now when I attempt to access the site it times out and chrome shows This site can’t be reached www.instaspots.net took too long to respond. My nginx config file looks like   server_name instaspots.net; add_header Content-Security-Policy upgrade-insecure-requests;    # react app & front-end files   location / {     root /opt/frontend/build;     try_files $uri /index.html;   }    # node api reverse proxy   location /items/ {     proxy_pass http://localhost:4000/;   }      listen 443 ssl; # managed by Certbot     ssl_certificate /etc/letsencrypt/live/instaspots.net/fullchain.pem; # managed by Certbot     ssl_certificate_key /etc/letsencrypt/live/instaspots.net/privkey.pem; # managed by Certbot     include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot     ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot  } server {     server_name www.instaspots.net; # managed by Certbot add_header Content-Security-Policy upgrade-insecure-requests;    # react app & front-end files   location / {     root /opt/frontend/build;     try_files $uri /index.html;   }    # node api reverse proxy   location /items/ {     proxy_pass http://localhost:4000/;   }      listen 443 ssl; # managed by Certbot     ssl_certificate /etc/letsencrypt/live/instaspots.net/fullchain.pem; # managed by Certbot     ssl_certificate_key /etc/letsencrypt/live/instaspots.net/privkey.pem; # managed by Certbot     include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot     ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot    }server {     if ($host = instaspots.net) {         return 301 https://$host$request_uri;     } # managed by Certbot     listen 80 default_server;   server_name instaspots.net;     return 404; # managed by Certbot   }server {     if ($host = www.instaspots.net) {         return 301 https://$host$request_uri;     } # managed by Certbot     listen 80 ;     server_name www.instaspots.net;     return 404; # managed by Certbot   }  sudo netstat -plnt | grep nginx returns tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      62312/nginx: master  tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      62312/nginx: master   which all seems fine, but someone else debugging this used nc -zv instaspots.net 443 but when I try that it returns  connectx to instaspots.net port 443 (tcp) failed: Operation timed out leading me to believe this may help point to the problem. Unfortunately my debugging skills are lacking when it comes to sysadmin things, so if anyone could guide me on debugging this I would be very thankful.


I cannot open docx files which have been emailed to me.  My operating system uses windows-8.  When I try to open, the prompt tells me to  purchase Microsoft Office.


Why do I get an "extra }" error when using a default argument in a theorem name?

Consider the following latex code:  \documentclass{article}  \usepackage{amssymb} \usepackage{amsthm}  \newtheorem{thm}{Theorem}  \newcommand{\Zn}[1][n]{\mathbb{Z}_{#1}}  \begin{document}  $\Zn[p]$  \begin{thm}[$\Zn$] \end{thm}  \end{document}   This compiles without errors obtaining:    Now, if I change the \Zn to \Zn[p] inside the theorem title:  \begin{thm}[$\Zn[p]$] \end{thm}   I get the following error when compiling:  ! Argument of \\Zn has an extra }. <inserted text>                  \par  l.14 \begin{thm}[$\Zn[p]                         $] Runaway argument? p) ! Paragraph ended before \\Zn was complete.   Yet the \Zn[p] outside the title works fine. Moreover if I put the command in a group, as in {\Zn[p]}, it compiles successfully with the expected output:  \begin{thm}[${\Zn[p]}$] \end{thm}   Is there something wrong with my definition of \Zn? Or is there a bug in how the theorem environment handles its title? Why does this happen?


How to append html using jquery with less than character

I am trying to display and append a string HTML with "<" character on it. But it somehow breaks the line by treating it as HTML tag.  $(this).html.append(' < Click here  with');   How Can I fix this?


How find this Fibonacci sequence sum $\sum_{k=0}^{\infty}\frac{1}{F_{2^k}}$

let sequence $\{F_{n}\}$ such $$F_{1}=1,F_{2}=1,F_{m+1}=F_{m}+F_{m-1},m\ge 2$$  Find this value      $$I=\sum_{k=0}^{\infty}\dfrac{1}{F_{2^k}}$$   My try: I know this      $$F_{n}=\dfrac{1}{\sqrt{5}}\left(\left(\dfrac{\sqrt{5}+1}{2}\right)^n-\left(\dfrac{\sqrt{5}-1}{2}\right)^n\right)$$   so     $$\dfrac{1}{F_{2^k}}=\dfrac{\sqrt{5}}{\left(\dfrac{\sqrt{5}+1}{2}\right)^{2^k}-\left(\dfrac{\sqrt{5}-1}{2}\right)^{2^k}}$$   so   we only find this sum   $$I=\sum_{k=0}^{\infty}\dfrac{\sqrt{5}}{\left(\dfrac{\sqrt{5}+1}{2}\right)^{2^k}-\left(\dfrac{\sqrt{5}-1}{2}\right)^{2^k}}$$   But I can't.Thank you


I want to know if there is a possibility to "cut" the mesh into single objects (triangles, other polygons) I create using Pen Tool? I followed examples in these two tutorials:  and ...  However the first one seems like too much effort (as I am still struggling with mastering the Illustrator tools and have a deadline on me) and second one isn't accurate enough.   I came up with the idea to just draw the mesh above the picture I'm working on and add colours individually to the polygons.     However the paths I'm creating aren't split into individual polygons but remain a singular path. Is there a possibility to cut a complex path into smaller objects (polygons)?  For example this one     split into individual polys?  EDIT:  I finally conquered the problem thanks to @joojaa here's my first attempt finished (still needs a lot of polishing and patience):


Book with a girl whose grandma is a phoenix, cover depicts the emerald/green-eyed blonde girl

I read this book in 2016, but I remember the cover being torn up, so it couldn't have been a new book. There was a girl's face on the cover. She had lightly colored skin, and beautiful emerald green eyes. Her hair was a dirty blond. This book was first in a trilogy and the cover was illustrated.  The girl's grandmother in the story was actually a phoenix (I think this was revealed in a different book in the trilogy though). The book started out in a small village, and I can't remember exactly where in the village chapters (the chapters that took place in the village) but she sneaked her deceased mother's green dress out of a trunk she wasn't supposed to go in, and I think she wore it to some event.


What's the difference between `` and $()?

When you want to return a command line output, you may consider using two methods: `cat file` or $(cat file). As far as I know, they are equivalent before my eyes.  Is there a difference between both? If so, what's the difference please?


Good, Better, Best vs. High Higher Highest

The comparison in question isn't so much about Higher/Highest specifically, but why do we start with Good and not go to Gooder, Goodest?  Edit: I was flagged a duplicate despite previous searching.  I think I got a more satisfactory answer than has been previously provided.


Apostrophe in sports team age division: 12s vs. 12's

In youth volleyball teams are divided by age. For example, a team consisting of kids 12 and under is referred to as a "12s team" or "12's team", and they typically play teams in that same division. This age designation can also be paired with other words like "division", for example, "they're holding a tournament for teams in the 12s (12's) division."  I've seen both "12s" and "12's" in use, although "12's" seems more popular in Oklahoma. Which one is grammatically correct?  This is not a question on how to pluralize numbers, but rather a question about whether we are pluralizing numbers (12s) or if this is the possessive usage of a number (12's), or perhaps even an abbreviation (just like "they are" abbreviates to "they're"). In other words, are people implying "this is a team consisting of a multitude of 12s", "this is a team belonging to group number 12", or "this is a 12-and-under team"?


How can I assign a std::string from a char *

This may be trivial, but I'm new to C++ and an getting confused here.  I have the method:  bool load_database_file( const std::string& filename, std::string& contents ) {      std::ifstream is (filename, std::ifstream::binary);     if (is) {         // get length of file:         is.seekg (0, is.end);         int length = (int)is.tellg();         is.seekg (0, is.beg);          char * buffer = new char [length];          std::cout << "Reading " << length << " characters... ";         // read data as a block:         is.read (buffer, length);          if (is)             std::cout << "all characters read successfully.";         else             std::cout << "error: only " << is.gcount() << " could be read";         is.close();          // ...buffer contains the entire file...          std::string str(buffer);         contents = str;          delete[] buffer;     }      return true ;   }   where I would like to read a file and assign it's contents to contents so that it can be read by the calling function.  My issue is that after this function is run, I see that only the first character of buffer was copied to contents.   How can I copy/convert the entire contents of buffer (a char *) to contents (a std::string).


Is there a way to show only uncommented lines in a text file/script?

Many a times when manually grepping through a file, there are so many comments that your eyes glaze over and you start to wish there was a way in which you just could show it to display only those lines which have no comments.  Is there a way to skip comments with cat or another tool? I am guessing there is a way and it involves a regular-expression. I want it just to display and not actually remove any lines or such.   Comments are in the form of # and I'm using zsh as my xterm.


Firefox "not responding", can't force quit, doesn't show in activity monitor

I have entered a weird state  Firefox was open. The icon appears in the cmd+tab task menu.  In the dock it shows as "not responding". Force Quit does nothing though.    Ok... but then it doesn't show in Activity Monitor either.  I have searched for "Firefox", "fox", "ff", "mozilla" and skimmed through by eye.  I have also tried grepping the output of ps aux and top in terminal but I can't find it.  I wondered if maybe it wasn't really open and just the dock icon/task switcher were confused, but when I double-click Firefox from the Applications folder:    I have tried relaunching Finder but it doesn't fix anything.  I assume a reboot will fix it, can anyone suggest another avenue?


For my thesis, I use biblatex for the bibliography.  As seen , biblatex is not compatible, with \usepackage[utf8x]{inputenc}. It was reported as close but I still have the same problem with my version of bibtex (last one on archlinux ). I want to use the € symbol inside my report but it fails without utf8.  ! Package biblatex Error: Incompatible package 'ucs'.  See the biblatex package documentation for explanation. Type  H <return>  for immediate help.  ...                                                l.7 \begin{document}   Any idea idea how to fix ?  \documentclass{report}  \usepackage[utf8x]{inputenc} \usepackage{biblatex} \bibliography{includes/mybib}{}  \begin{document}  X said Y \cite{bib1}  \printbibliography  \end{document}   and the file mybib  @online { bib1,        title = {Refrence title},        author = {X},        url = {http://site.com/y}}


Which flag should I use to report a dead link?

In this  question,  contains a . I want to flag this answer but I don't know which flag I should use for dead links. Can I choose Other and just comment "Dead link"?


Pass qouted filename with spaces in a bash variable

In a bash shell, consider this: $ x="-name 'foo bar'" $ find $x find: paths must precede expression: `bar'' $ find -name 'foo bar' ./foo bar  What can I put in $x to make find $x behave like find -name 'foo bar'?


Would it be sleazy to take my content from other sites and post it as StackOverflow self-answered questions?

I already understand that StackExchange considers self-answered questions to be OK. I'm wondering about a specific class of self-answered questions, those that merely rephrase the author's posts from other sites.   Like, would it would be considered "double-dipping" for points/reputation?  Specifically, I recently created . I think the content of that pro tip would make a good StackOverflow question-&-answer, plus I believe a S.O. post would have more Google visibility.  Does anyone know if there's any precedence for this kind of duplication/adaptation being unwelcome? Or is it perfectly kosher?


I declare a global variable pos, anyway the method printArr() doesn't see it. The interpreter says: undifined variable pos. Why? Thanks  import nltk   class Analyzer():      """Implements sentiment analysis."""          def __init__(self, positives, negatives):         global pos         global neg         positives=[]         negatives=[]         i=0         file = open("negative-words.txt","r")         for line in file:             h=file.readline()             if h!="":                 if h[0]!=';':                     negatives.append(h)                     i=i+1                     print(h)          i=0         file = open("positive-words.txt","r")         for line in file:             h=file.readline()             if h!="":                 if h[0]!=';':                     positives.append(h)                     i=i+1                     print(h)         neg=negatives         pos=positives       def printArr (self, arr):         print (pos[2])     """Initialize Analyzer."""   I'll try to make it easier: The next code does not work properly, the program still prints out "0", not "5"  import os import sys global x x=0  def func1():     x=5 def func2():     print (x)  func2()


Does every $\mathbb{R},\mathbb{C}$ vector space have a norm?

Is there a canonical way to define on any vector space over $\mathbb{K}=\mathbb{R},\mathbb{C}$ a norm ? (Or, if there isn't, can someone give me an example of a vector space over $\mathbb{K}$ that is not normable ?)  I have now looked through several books on the subject but nowhere is something like this mentioned and I also wasn't able to find a way to construct such norm (or to find a counterexample).


Is there any difference between this command: apt-get purge firefox   and these 2 commands:  sudo apt-get remove firefox && sudo apt-get autoremove


If $a^n-1$ divides $b^n-1$ too often, then $b=a^k$

I am looking for references to the following problem, which I saw a long time ago and I think is a well-known problem (maybe from IMO or American Mathematical Monthly), I hope to remember it correctly.  Problem. Let $a$ and $b$ be two positive integers. If $a^n - 1$ divides $b^n - 1$ for all the positive integers $n$, then $b = a^k$ for some positive integer $k$.  Thank you in advance for any answer.  EDIT: As noted by cr001, a solution to the problem was given on Math.StackExchange (see ). However, what I am asking for is a reference to a journal or book.


Is there a limit to the number of different antibodies one individual can have in their body?

If my understanding is correct, we create antibodies after vaccines and after getting infections. So, after 10 vaccines and 2 contracted diseases, I can have in my body antibodies for 12 types of diseases.  Is there a limit to the number of different antibody types that we can have in the body at one point?   Also, do we spend resources keeping those numbers up when the antibodies are not used?  Thanks.


What is the best way to invest short term without losing principal?

My wife and I were planning to buy a house this year, but the plan fell through, so right now we are sitting on the money that we saved towards down payment and renovations (prior to now money was in the Money markets, Savings & CDs). We decided to stop looking for a house for about a year, and resume next February, though if a nice deal shows up we want money easily available. So in our situation what is the best way to make sure we don't lose any principal, but to see that our money doesn't sit idle. CDs are pretty much out of the question: for a 6-9 months period interest is lower than savings. The best I was able to come up with (according to ) were:   - 1.2% + 10% on the interest earned.   - 1.15%   - 1.15%   According to their websites all of them are FDIC members. Are there any other options? I don't really know anything about bonds. Are they a viable option? Final Solution: My boss recommended I check out  ( they are a Texas bank with locations in CA, IL & TX, obviously the website.) They are offering 2.02 % on a 60 months CD - but here is the kicker, if I need to pull the money before it matures, they only take the last 2 months of interest as a penalty. So I think that's a good solution for me. The website says they are FDIC insured and there are a brick and mortar branches not far from me. Update: This bank I mentioned, doesn't seem to exist anymore, through a series of purchases. So scratch that suggestion. Thank you everyone for your recommendations.


I asked a math professor once about infinity and his answer puzzled me. I asked if i had two sets of numbers:   A =  all the whole numbers in infinity B = all the whole and half numbers (1, 1.5, 2, 2.5 etc...)  Is B twice as large as A?  He chuckled and said no, and then explained something about ordinal and cardinal numbers, that left me confused and still not understanding why my logic that it would be twice as large (and not the same size as he argued) did not hold up. Any good way to explain it to a non-mathematician?


Downloaded a program to my home/downloads folder and can't access it

I have already installed Apache OpenOffice 4.0.0 and would like to update it to the newer version which is Apache OpenOffice 4.0.1.    I have already downloaded the _deb.tar.cz files that were required but I can't seem to access the download through the terminal to install it.    What I tried was to open the Home/ directory but it can't seem to find it using the command:   cd /home/downloads/apache    What did I do wrong?


i have installed code blocks from Ubuntu software Center. When I create a new project and compile it, in the output window it say "permission denied". How must I run code blocks, or where should I place the project files to remove this error ?!


Breakers loose in main panel, does whole panel need to be replaced?

I went on a breaker flipping binge the other day because the panel at my house wasn't labeled and I had a doorbell transformer to replace. After I got the doorbell finished I realized the fridge wasn't running. Investigated and found that the issue is the breakers have some wiggle to them, not flopping around but if you apply slight pressure to top or bottom they move a fair bit. Can reliably get fridge to turn off by wiggling that breaker.  The Wiggle (animated gif but seems to only go if clicked on):   I'm not super comfortable with fussing in the main panel, I'm just wondering if I should expect an electrician to want to replace the whole panel? Does replacing the whole panel seem reasonable for something like this? Should I just swap out this one breaker for now and see if that helps?


Gnome-Tweaks capslock setting doesn't work on external keyboard

I use gnome-tweaks to remap my caps-lock key as escape. This has worked fine for a long time, but since updating the OS yesterday the remapping doesn't apply if I plug in my USB keyboard after I set it. The machine: Ubuntu 20.04 ~$ echo "$XDG_CURRENT_DESKTOP" ubuntu:GNOME GNOME Tweaks 3.34.0 GNOME Shell 3.36.4 (ubuntu mode) GTK 3.24.20  Specific symptoms: I noticed my "escape" key wasn't working right today, so I checked in Tweaks: said it was properly remapped. I flicked it back and forth, after which it was working. Since then, the caps-lock key on the laptop's built-in keyboard seems to reliably work as ESC, but if I un-plug and plug-back-in my external keyboard its caps-lock is caps-lock until I go back into Tweaks and toggle the setting. Note that the setting never changes in Tweaks, it just doesn't apply to the external keyboard until I change it to something else and back again.


What do people recommend for a torrent app for Ubuntu 16.04? And how do I install it? I tried downloading one but I couldn't install it? Do I have to type in some code?  Thanks for the replies guys. I might try giving Deluge a try. I'll also read through the posted links (thumbs up).


How can I check tire pressure without a pressure gauge?

I would like to tell if my tires are correctly inflated, in this case road tires, but I do not have a pressure gauge.  Is there a handy heuristic for checking the pressure? Could I do it, for example, by trying to squeeze the tire between two fingers and seeing how easily it gives? (I can do that anyway, but it wouldn't give me any idea about the pressure level.)


Prve that $x^4+x^2+x+1$ is irreducible over $\mathbb{Q}$.

I try Eisenstein's Criterion, replacing $x$ as $x+1$, $x+2$ or $x-1$. But they are the forms we need.


Let $f : \mathbb{R}^{2} \to \mathbb{R}$ be of class $C^{1}$. Show that $f$ not is injective.   Well, I know that $f$ is injective when $f(x) = f(y)$ implies $x = y$. Since $f$ is of class $C^{1}$ then $f$ is differentiable in $\mathbb{R}^{2}$ such that its derivative is continuous. I can not figure out the ideas. This question seems to suggest a counter example, but none is working. Thanks for the help!


I want to composite a cube over a background while still keeping the alpha channel for the cube. I want the composited image to be a cube over an image. The alpha channel should be only the cube. I would like to use the alpha channel as a mask for further compositing. The problem is that with my current node setup there is a border around the cube.


What are the main ways to generate a pwm?

Let's suppose to use PWM (e.g.  to control the 'speed' of a motor)  What would be the possible way to generate a PWM signal?  On the one extreme, there is pure software techniques where 'a programmer typically writes a value to a memory-mapped register to set the duty cycle' [Lee & Seshia, Introduction to Embedded Systems]. On the other extreme, there is dedicated PWM Peripheral. What are the other ways to genrate a PWM?


Odd duplicates link for questions that were closed as duplicates a long time ago

I occasionally notice this odd duplicate notice, but only for questions that were closed a long time ago. Apparently there was an update that changed the interface, changed how closing questions as duplicates work, but it didn't exactly migrate older questions to look correct after the update. Can this be fixed?


Drive letter for MTP connection under Windows

In Android 3 the connection to PC as Mass Storage Controller feature was removed.  Is there a way to access MTP-mounted phone as a drive letter? I want standard file manager programs (e.g. Total Commander) to work.


I have an external system that needs to update a record in my org. This system only knows the external id, but the problem is that this external id is not unique, e.g. multiple records might have the  external id. Now I am changing the record id to be unique, and I want to query the all records created with a duplicate record id.  How can I perform this query?


If $X$ is a random variable with a continuous uniform distribution on (0,10), and $Y$ is also from a continuous uniform distribution on (0,10) how do I calculate the CDF of $X+Y$?


Taylor series $\frac{z^2+z}{(z-1)^2}$ at $z=-1$

Taylor series expansion for $\frac{z^2+z}{(z-1)^2}$ at $z=-1$. Also find its radius of convergence.  One way is to expand with the general formula and calculate derivative of all orders but that is very tedious. Is there a way to find the series without calculating every term?   Here's the answer from WA if it helps: $-\frac14(z + 1) + \frac1{16} (z + 1)^3 + \frac1{16} (z + 1)^4 +\frac3{64} (z + 1)^5 + \frac1{32} (z + 1)^6 + O((z + 1)^7) $


Will we ever reach a point where all the light that was set free by recombination finally reaches us from our point of view and the CMB stops "shining" for observers on Earth?


Restrict the visibility of EC2 instances using IAM accounts

I'm looking for a way to restrict the visibility ec2 instances to certain IAM accounts. I'd really like a way for a particular account to only be able to see the instances that it has created i.e. when it does a describeInstances only those it has created are present.   I've been looking into using custom IAM policies based on resource tags to do this and while the management looks to be ok, each account can still see instances created by other users using describeInstances.  Really I'm looking for a way to hide resources created by different IAM accounts from one another. Is this currently possible?


I could not install Wine due to EULA message

I was trying to install Picasa on Ubuntu 12.04 and first had to install Wine which came up with a EULA that I could not see how to agree to.    When trying to install Picasa from the terminal I got the following message:   ian@ian-Dimension-8100:~$ wine ~/picasa39-setup.exe The program 'wine' is currently not installed.  You can install it by typing: sudo apt-get install wine1.4-i386 ian@ian-Dimension-8100:~$ sudo apt-get install wine1.4-i386 [sudo] password for ian:  E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?   How to I overcome this problem? The following are the instructions I was following:   Open a terminal by pressing Ctl+Alt+T or search terminal in Dash,then install wine and winetricks using below command  sudo apt-get install wine winetricks Download Picasa 3.9 from Google use below command  cd ~/ && wget http://dl.google.com/picasa/picasa39-setup.exe Install Picasa 3.9 via wine use below command  wine ~/picasa39-setup.exe Install IE6 via winetricks  WINEARCH=win32 WINEPREFIX=~/.wine sh winetricks -q ie6 Done, you launch Picasa 3.9 by searching picasa in Dash now


Differentiate between employees and moderators

My understanding of who has diamonds:   All moderators have diamonds on the sites they moderate and their respective meta Stack Exchange employees have diamonds      Right now, there are a lot of new diamond moderators across the network, with more being added in the near future.  Stack Exchange has also been doing a lot of hiring lately, which means there are a lot of newish ex officio diamond moderators as well.    I think it would be helpful if there was a way to differentiate between moderators and employees across the SE sites.   A couple of examples of where it would have been helpful:   On betas, right after opening: users see people with diamonds and wonder where these moderators came from—it would be clearer if they were easily identified as employees. On MSO, when (for instance) someone responds to a feature request. It's useful to know if that response is from, say, the programmer who's currently working on that exact code versus a volunteer mod who has an opinion that something is/isn't/will never happen.     Suggested solution: Give employees a different symbol.     Possiblilities:      ♢   ❖   ◇   ◆   ▰   ∆   ∇   ⍚   ␎   ◈   ♠   ♣   ♥        Suggested but unusable:      ⧗   ⧱   ⸭   ⟐   ⧓   ⧗   ⧫   ⧱   ⧎   ⎆   ⎏   ⎐   ⎑   ⎒   ⬙   ⬘   ⬗   ⬖       Misc thoughts:   The super-coolest kids on the block would be those with both symbols. Someone would need to verify that there are no users on any site whose user name ends with the new symbol (and keep people from changing their user name to have it). While these symbols are all valid Unicode characters, some of them might not be visible on all browsers (IE, I'm looking at you…). Those that aren't visible on all supported browsers should be ruled out.


How can I completely and surgically block any communication between adobe.com and my computer?

I'm not much of a networking guru, but I'm needing to conduct an experiment to see why some RSLs are not loading on some client computers when they try to load a swf off of their intranet's server.  I'm tempted to believe this is the result of their inability to access adobe.com to download the RSLs.  However we have seen these same swfs work on other computers that are kept away from the Internet, and my theory here is that this is simply due to the RSLs being cached a while back inside of their Flash Players.  To test the theory, I'm wanting to completely block *.adobe.com from my computer, so as to avoid being able to download RSLs from their website.  Then I want to completely uninstall, then reinstall Flash Player, then load the swf from one of our own servers.  I am NOT able to manipulate hardly any of our own networking at all.  I can use Windows Firewall, but that doesn't appear to be able to block specific sites.  I have tried adding this site to things like the Restricted Zone in IE, but I'm still able to visit the site just fine for some reason.  There is no reason this should be so difficult.  Any ideas?  Thanks!


Let $G$ be a group that $|G|=p^n$, with $n \geq 2$ and $p$ prime.  Show that G is not simple.  I know that, if $G$ is not abelian, then $Z(G) \not= G$ and $Z(G)$ is a normal subgroup of $G$ with $|Z(G)|= p^m >1$ and $m <n$. And since $Z(G) \lhd G$, we have G being not simple.  But what if G is abelian? That proof would not be possible.


Set a script to automatically detect character encoding in a plain-text-file in Python?

I've set up a script that basically does a large-scale find-and-replace on a plain text document.   At the moment it works fine with ASCII, UTF-8, and UTF-16 (and possibly others, but I've only tested these three) encoded documents so long as the encoding is specified inside the script (the example code below specifies UTF-16).  Is there a way to make the script automatically detect which of these character encodings is being used in the input file and automatically set the character encoding of the output file the same as the encoding used on the input file?  findreplace = [ ('term1', 'term2'), ]      inF = open(infile,'rb')     s=unicode(inF.read(),'utf-16')     inF.close()      for couple in findreplace:         outtext=s.replace(couple[0],couple[1])         s=outtext      outF = open(outFile,'wb')     outF.write(outtext.encode('utf-16'))     outF.close()   Thanks!


I have some templates that I need to change the font size on. Any suggestions as to the best free software to do this, and can you tell me how to change the font size? Thanks.


How to add horizontal line after header and before footer?

How can I add horizontal line after header and before footer?   header ---------  --------- footer


Bands disappear after Raster Calculation ArcGIS

I have a tif file containing 36 bands. After I applied raster calculation on the file the bands aggregate into one single band which I don't want because I need them for further calculation. People say that I can apply raster calculation on each band. I can do that but it is too troublesome .Is there any better way to keep all the bands as well as performing calculations on them?


I was checking the following Euler's theorem exercise:     What are the possible remainders when the $110^{th}$ power of an integer is divided by $121$?   I've started working from calculating $\phi (110) = 40$  Now I'm thinking about applying $\mod 121$ but I'm unable to. So now I'm maybe in the wrong way. Any help or clue will be really appreciated.


Prove that if $n>1$ is odd, then $1^n+2^n+3^n+\ldots+(n-1)^n$ is divisible by $n$.   I'm pretty sure I need to prove this using induction but I am unsure as to how to go about it.


How to change boot splash screen in 18.04

I have done this in the past in 16.04 and 17.10 but in 18.04 I can not get plymouth manager to work.  Downloaded it from the software center but it doesn't work.  Is there a guide available that will let me do it in terminal?


Identify The Day of the Doctor old shots

This will be pretty hard, challenging and probably only for the real hard Whovians.  I watched  again. I assume that all of the old Doctor scenes (and I would say also the 9th Doctor scene) are from the archive (correct me if they are not)  They are mostly very short and I am curious, from which episodes they come from.


Magneto currently resides with Cyclops on utopia and is barely showing any signs of aging, despite being born in the 1920s. I realize that this is also the case for many other characters in cartoons and comics who aren't portrayed by actors and thus aren't constrained by consistent casting.  I know in the X-Men: Evolution cartoon he undergoes some process to heighten his mutant abilities, which also seems to have strengthened him in general, but this is the only instance of his age being reduced or otherwise fortified that I can find. I also know he was supposedly 'de-aged' but it turns out that was merely a clone.  How has he aged so gracefully then?


Counting irreducible polynomials over finite fields

How many irreducible polynomials in $Z_2[x]$ of degree $3$?   I have discussed this with my friend before and we found that $x^3 + x^2 + 1$ and $x^3+x+1$ are the two said polynomials which irreducible. We got this the approachment that polynomials $p(x) = ax^3+bx^2+cx+d$ must satisfy $a\ne 0$ and later $d \neq 0$ and here we only need to take some cases of the value of $b$ and $c$.  Do you have idea to solve this problem clearly without guessing?  I am afraid that there will be a new problem asking for polynomials whose degree is higher than this one and here I will be stuck.


Analytical Hierarchy Process (AHP) tool: Input layers do not have same grid extent

I am using this tool to create a suitability map for landfill site selection. However, when I gave the input raster layers, the .csv file for comparison table and run the tool, an error message saying- "Unable to execute algorithm - Input layers do not have same grid extent"  I infer from this that the size of all input layers must be same, but do not know if that can be done or not. And if yes, then how?


To move back the centre origin point to were the object is

Hi Please can you tell me how to move the 3D cursor and centre origin point back to were the object selected is please?  I am selecting the landing feet and the X,Y and Z axis arrow is all the way to the right hand side please can you tell me how to fix it so it is situated relatively close to the object in this case the landing feet.  Thanks  Simon


Reduce space between title and bars in pgfgantt

I think the space between title and bars in pgfgantt is too big. Is there a way to reduce it? For example, this code  \begin{ganttchart}[ x unit = 0.30cm,                     y unit chart = 1.3cm,                     hgrid,                     vgrid={draw=none,dotted},                     time slot format = isodate-yearmonth,                     compress calendar,                     today=2014-4,                   ]{2013-05}{2017-02}     \gantttitle{2013}{8}     \gantttitlelist{2014,2015,2016}{12}     \gantttitle{2017}{2}\\     \gantttitlelist[title label font=\tiny ,y unit title = 0.7cm]{5,...,12}{1}     \gantttitlelist[title label font=\tiny ,y unit title = 0.7cm]{1,...,12}{1}     \gantttitlelist[title label font=\tiny ,y unit title = 0.7cm]{1,...,12}{1}     \gantttitlelist[title label font=\tiny ,y unit title = 0.7cm]{1,...,12}{1}     \gantttitlelist[title label font=\tiny ,y unit title = 0.7cm]{1,2}{1}\\     \ganttbar{Task 1}{2013-05}{2014-08}\\     \ganttbar{Task 2}{2013-12}{2015-05}\\     \ganttbar{Task 3}{2014-12}{2016-11} \end{ganttchart}   renders a picture with a too large space between the months and the tasks... making it difficult to read. Is there a way? Thanks


x=(100+1.0/3)-100 y=1.0/3 z=1+1.0/3-1   x, y, z clearly have the same values mathematically, but   print(x==y) print(x==z) print(y==z)   generate False values for all.   Is there any way to make them equal to each other in python? I'm not quite sure why they're not considered same. I'm aware that rounding off would be the cause of it, but I'm not sure why that happens in different ways for x, y, z.


As root run: cd /tmp seq 10 > foo chmod 666 foo seq 10 >> foo chown daemon foo seq 10 >> foo  This gives: -bash: foo: Permission denied  It is clear that it is due to /tmp's special permission (drwxrwxrwt), because it works fine in /tmp/bardir. But why? Should the group ownership and permission not allow root to append to the file? $ ls -l foo -rw-rw-rw- 1 daemon root 42 Dec  6 09:11 foo $ lsattr foo -------------------- foo $ ls -ld /tmp drwxrwxrwt 34 root root 137 Dec  6 09:11 /tmp $ lsattr -d /tmp -------------------- /tmp


Can a familiar use the Help action on an ally within 5 feet without being within 5 feet of the enemy the ally is attacking?

I was looking at the thing a familiar could do in combat and found the Help action. The description of the  action is as follows:  You can lend your aid to another creature in the completion of a task. When you take the Help action, the creature you aid gains advantage on the next ability check it makes to perform the task you are helping with, provided that it makes the check before the start of your next turn. Alternatively, you can aid a friendly creature in attacking a creature within 5 feet of you. You feint, distract the target, or in some other way team up to make your ally’s attack more effective. If your ally attacks the target before your next turn, the first attack roll is made with advantage.  As I see it the following could be possible:  I, my familiar, and an enemy are standing in a line so that I am standing between my familiar and the enemy. My familiar can use the Help action on me to give me advantage while standing 5 feet from me and 10 feet from the enemy. The enemy can not hit (without ranged attack or reach) my familiar.  This seems strange to me as there are a lot of people saying that a non-owl familiar is very vulnerable when using the Help action as they would be in range of the enemy, but in the situation that I just described it seems that my familiar seems safe. Am I missing something here or is this totally possible?


Can someone please elaborate on Gradient Descent vs Newton's Method? I am studying for my ML exam tomorrow and saw this as a bullet point but cannot find many great answers. Can anyone fill me in some details on the both of these, as deep as you would like to go.


How to get metadata from a list of .mp3 files and store it in ArrayLists?

The following code is supposed to:   import music files with a FileChooser get the metadata values for title and artist and store them in two ArraList print out the values in the lists using the test() method.   The problem is I get nullpointer exceptions when I run the open() method. I assume the ChangeListener isn't actually doing anything and can't figure out why.  public class ManagerController implements Initializable { @Override public void initialize(URL location, ResourceBundle resources) {  }  private Stage stage; private List<File> filelist; private ArrayList<String> artist; private ArrayList<String> title;  public void test(){     for(int i = 0; i < filelist.size(); i++){         System.out.println(title.get(i));         System.out.println(artist.get(i));     } }  public void handleMetadata(String key, Object value){     if (key.equals("title")){         title.add(value.toString());     }     if (key.equals("artist")){         artist.add(value.toString());     } }  public void open(){     FileChooser chooser = new FileChooser();     filelist = chooser.showOpenMultipleDialog(stage);     for(File f:filelist){     try {         Media media = new Media(f.toURI().toURL().toString());         media.getMetadata().addListener(new MapChangeListener<String, Object>(){             @Override             public void onChanged(Change<? extends String, ? extends Object> change) {                 if(change.wasAdded()) {                     handleMetadata(change.getKey(), change.getValueAdded());                 }             }         });     } catch (MalformedURLException e) {         e.printStackTrace();         }     } }   }  Exception:  Exception in thread "JavaFX Application Thread" java.lang.NullPointerException at com.musicstuff.musicmanager.ManagerController.handleMetadata(ManagerController.java:56) at com.musicstuff.musicmanager.ManagerController$1.onChanged(ManagerController.java:73) at com.sun.javafx.collections.MapListenerHelper$SingleChange.fireValueChangedEvent(MapListenerHelper.java:163) at com.sun.javafx.collections.MapListenerHelper.fireValueChangedEvent(MapListenerHelper.java:72) at com.sun.javafx.collections.UnmodifiableObservableMap.callObservers(UnmodifiableObservableMap.java:65) at com.sun.javafx.collections.UnmodifiableObservableMap.lambda$new$20(UnmodifiableObservableMap.java:59) at com.sun.javafx.collections.UnmodifiableObservableMap$$Lambda$276/1777882240.onChanged(Unknown Source) at javafx.collections.WeakMapChangeListener.onChanged(WeakMapChangeListener.java:88) at com.sun.javafx.collections.MapListenerHelper$SingleChange.fireValueChangedEvent(MapListenerHelper.java:163) at com.sun.javafx.collections.MapListenerHelper.fireValueChangedEvent(MapListenerHelper.java:72) at com.sun.javafx.collections.ObservableMapWrapper.callObservers(ObservableMapWrapper.java:115) at com.sun.javafx.collections.ObservableMapWrapper.put(ObservableMapWrapper.java:173) at javafx.scene.media.Media.updateMetadata(Media.java:531) at javafx.scene.media.Media.access$200(Media.java:78) at javafx.scene.media.Media$_MetadataListener.lambda$onMetadata$10(Media.java:542) at javafx.scene.media.Media$_MetadataListener$$Lambda$281/790426132.run(Unknown Source) at com.sun.javafx.application.PlatformImpl.lambda$null$170(PlatformImpl.java:295) at com.sun.javafx.application.PlatformImpl$$Lambda$48/1144405258.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(PlatformImpl.java:294) at com.sun.javafx.application.PlatformImpl$$Lambda$46/237061348.run(Unknown Source) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.lambda$null$145(WinApplication.java:101) at com.sun.glass.ui.win.WinApplication$$Lambda$36/2117255219.run(Unknown Source) at java.lang.Thread.run(Thread.java:745)


Navigate to a new URL in Javascript with post parameters

I wanted to know if there was any way to navigate to a new URL using JavaScript with POST parameters.  I know with GET you can just append a param string on the URL using window.location.replace()  But is there any way to do this using POST to hide the parameters. Or with jQuery?


Creating coloured map from Excel using ArcGIS for Desktop?

I have an Excel file with some data and I want to create a map and present data with colours. I do everything well except for I present my data with dots. Instead, I need to cover the free space with an average of neighbour dots so as to have a solid map. Check out the photos to understand what I am saying.  This is what I have:    and this is what I want to make:    All the above has to be done in ArcMap.


Are the fields $\mathbb{Q}$ and $\mathbb{Q[\sqrt2]}$ isomorphic?

This is a probably a stupid question, but I can't figure it out myself.   I think that they are not, but I can't prove it formally. One reason that they are probably not isomorphic is that $x^2-2x-1 \in \mathbb{Q}[x] \subset \mathbb{Q}[\sqrt2][x]$ has no roots in $\mathbb{Q}$, but it has its roots in $\mathbb{Q}[\sqrt2]$.   I am not sure whether or not my argument is valid. Any hint/suggestion would be appreciated.


I’m using Ubuntu Mate:   Operating System: Ubuntu 16.04.6 LTS    Kernel: Linux 3.4.39-BPI-M3-Kernel     Architecture: arm  I have installed Python 2.7 as well as 3.7.7  pi@bpi-iot-ros-ai:~$ python2 -V Python 2.7.12 pi@bpi-iot-ros-ai:~$ python3 -V Python 3.7.7 pi@bpi-iot-ros-ai:~$ pip -V pip 20.0.2 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7) pi@bpi-iot-ros-ai:~$ pip3 -V pip 20.0.2 from /home/pi/.local/lib/python3.7/site-packages/pip (python 3.7)  The problem is that system returns me a warning when I’m trying for example use pip3- V:  “WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see  for advice on fixing the underlying issue. To avoid this problem you can invoke Python with '-m pip' instead of running pip directly. pip 20.0.2 from /home/pi/.local/lib/python3.7/site-packages/pip (python 3.7) ” ?  I have appied some workaround by adding an alias:  pi@bpi-iot-ros-ai:~$ alias pip3='python3 -m pip' pi@bpi-iot-ros-ai:~$ pip3 -V pip 20.0.2 from /home/pi/.local/lib/python3.7/site-packages/pip (python 3.7)  It works fine for some time, until this alias is removed from system somehow.. Is there way to let know to system that I want it be forever? Also set a higher priority for Python 3.7: pi@bpi-iot-ros-ai:~$ update-alternatives --list python3 /usr/bin/python3.5 /usr/bin/python3.7  Ho to fix a following that warning? Github issues and solutions doesn’t work in my case.


I'm following Google's android dev tutorial. I'm at the very beginning but I've run into a problem and can't seem to solve it.   Whenever I click the "Send" button, my app crashes instead of opening the new activity.   The XML for my initial home activity:  </LinearLayout>     <EditText     android:id="@+id/edit_message"     android:layout_weight="1"     android:layout_width="0dp"     android:layout_height="wrap_content"     android:hint="@string/edit_message" />      <Button     android:id="@+id/button"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:text="@string/button_send"     android:onClick="sendMessage"/> </LinearLayout>   The sendMessage method in the Home.Java file  public void sendMessage(View view){     Intent intent = new Intent(this, DisplayMessageActivity.class);     EditText editText = (EditText) findViewById(R.id.edit_message);     String message = editText.getText().toString();     intent.putExtra(EXTRA_MESSAGE, message);     startActivity(intent); }   And the Java for the new activity      //Get the message from the intent     Intent intent = getIntent();     String message = intent.getStringExtra(Home.EXTRA_MESSAGE);      //Creating the textview     TextView textView = new TextView(this);     textView.setTextSize(40);     textView.setText(message);      //Set text view as activity layout     setContentView(textView);   The Main error:     java.lang.RuntimeException: Unable to start activity   ComponentInfo{appfactree.me.dotnotes/appfactree.me.dotnotes.DisplayMessageActivity}:   java.lang.NullPointerException: Attempt to invoke virtual method   'java.lang.CharSequence android.support.v7.widget.Toolbar.getTitle()'   on a null object reference   Please ask if you need anything else. Thanks a lot for any help.  EDIT: As requested the full DisplayMessageActivity.java code:  public class DisplayMessageActivity extends AppCompatActivity {      @Override     protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);     setSupportActionBar(toolbar);      FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);     fab.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View view) {             Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)                     .setAction("Action", null).show();         }     });     getSupportActionBar().setDisplayHomeAsUpEnabled(true);      //Get the message from the intent     Intent intent = getIntent();     String message = intent.getStringExtra(Home.EXTRA_MESSAGE);      //Creating the textview     TextView textView = new TextView(this);     textView.setTextSize(40);     textView.setText(message);      //Set text view as activity layout     setContentView(textView);     } }


How to find the frequency and type of my current RAM?

How shall I find out the frequency and type of my current RAM? My OS is Ubuntu 12.04.


External drive is considered read-only on shell and in Nautilus

I am connecting an external drive from Intenso to my Ubuntu 16.04 LTS. Both in Nautilus and on the command line I am not allowed to write/delete/change files and folders. For instance, mkdir says: mkdir: cannot create directory ‘test’: Read-only file system  I tried the accepted answer from this question:  However, then I can e.g. create files for a few minutes. Afterwards the drive appears read-only again.  Any idea how to overcome this?


How do I install linux-manta_3.4.0-6.25.tar.gz?

I am trying to install Ubuntu Touch but I have missing the package linux-manta_3.4.0-6.25.tar.gz. when I decompress it i didn't find the configure and make files to install it.so how can I install it


The table is laid out like       name, id, attr1, attr2, data_date     a,    1,  sals, ksdjf, 05-25-2018     b,    1,  laskd, lskd, 05-20-2017     c,    2,  klss,  kjfe, 03-20-2018     d,    2,  aow , lww ,  02-10-2018  .....    select name, id, attr1, attr2, data_date from table1 where (id,data_date) in  (select id, max(data_date) from table1 group by id)   The above query works. Essentially for each ID, I want to select the row with the max( data_date ). I am sure there is a better way with analytic functions.    Results of my query should be    name, id, attr1, attr2, data_date a, 1, sals, ksdjf,05-25-2018 c, 2, klss, kjfe, 03-20-2018    Appreciate any help to rewrite it better. Thank you.


How to cite a University lecture (or its slides or script)

I need to write an introduction to a topic which relies heavily on several University lecture slides and scripts. I would like to acknowledge this by using something like this:     The following exposé is based on the lectures by \citet{A, B, C} and on \citep{X, Y}.   But the question is, how do I cite them properly? In particular, what is the right BibTeX category? Is the following the only way? I would like to use something as unspecific as misc as little as possible.  @misc{LectureA,   Author = {Ridcully, Mustrum},   Institution = {Unseen University},   Howpublished = {University Lecture},   Year = {2000},   Title = {An Introduction to Crossbow Hunting} }


Is it "when he's massaging me" or "while he's massaging me" : which one is correct?

In this sentence: "when he's massaging me, I'm wondering about you."  Is the "when" correct or instead of "when" should I use "while"? Or are both correct for the context?


Please note that we are sending mails from the domain name trendsinvogue.in to Gmail. All mails going to spam folder only. Also the mail server ip is not listed in the spam database.    Please check and update us.


So I'm trying to make a command where you throw a snowball and a trail of lighting bolts follows it.   Heres the command:  /testfor @e[type=snowball]   With a comparator facing into this one,  /execute @e[type=snowball] ~ ~ ~ /summon lightning ~ ~1 ~   When I throw the snowball, it says:      Failed to execute '/summon lightning ~ ~1 ~' as Snowball   Why?


Software center and Update center not working after failed "moonlight" installation

I was trying to install Moonlight, but following the commands didn't work.  Now I don't care about that any more, but my Software Center and Update Center kept on crashing.  I managed to get rid of them through the terminal, but reinstalling them is proving to be a problem I keep on running into.   Output from the terminal, which is as I think a piece of information left over from the attempt to install moonlight.   E: Type 'echo' is not known on line 2 in source list /etc/apt/sources.list.d/mono-xamarin.list E: The list of sources could not be read.   How to I get rid of this and reinstall my Software/Update Center?


C# - auto-properties VS pre-3.0 properties

Excuse me if my question is pretty much about code-style, but for simple cases which of the bellow is better?  CASE 1:  private static int number = 1; public static int Number {     get { return number; }     set { number = value; } }   CASE 2:  public static int Number {     get;     set; }   I think case 2 is better because, when you have many properties in your class they won't consume so much space and the filesize will be reduced.