Maxium Resolution resets to 1024x768 after logout

The Display Settings maximum resolution started at 1024x768(4:3)  I tried to use xrandr like so:  >>xrandr Screen 0: minimum 320 x 200, current 1024 x 768, maximum 8192 x 8192 DVI-I-1 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm    1024x768       60.0*     800x600        60.3     56.2      848x480        60.0      640x480        59.9   DVI-I-2 disconnected (normal left inverted right x axis y axis)  >>cvt 1900:900 # 1600x900 59.95 Hz (CVT 1.44M9) hsync: 55.99 kHz; pclk: 118.25 MHz Modeline "1600x900_60.00"  118.25  1600 1696 1856 2112  900 903 908 934 -hsync +vsync  >>xrandr --newmode "1600x900_60.00"  118.25  1600 1696 1856 2112  900 903 908 934 -hsync +vsync  >>xrandr --addmode DVI-I-1 1600x900_60.0  >>xrandr Screen 0: minimum 320 x 200, current 1600 x 900, maximum 8192 x 8192 DVI-I-1 connected primary 1600x900+0+0 (normal left inverted right x axis y axis) 0mm x 0mm    1024x768       60.0      800x600        60.3     56.2      848x480        60.0      640x480        59.9      1600x900_60.00   59.9*  DVI-I-2 disconnected (normal left inverted right x axis y axis)   At this point my display changes to 1600x900.   But after I log-out or reboot it goes back to 1024x768 and I have to re-do this process.  Essentially this is the same as  which only mentions      There is also a section about Setting xrandr changes persistently which can help if the resolution you set does not stay after you reboot.   But I couldn't find it.  Here's the error message I get after reboot:


why is it considered bad to use short PHP tags?

I've always been told to use the long <?php tags instead of the short <? tags. Is there some functional reason for this?


I want to apply for a PhD in computer science. My end goal is to become a professor and teach at a university. I have interests in data structures, algorithms, networks and programming languages. I would love to apply for a PhD in algorithms but cannot figure out a research topic.  Can some one please suggest how should I go about it? I don't mind if I get into a PhD program in a field other than algorithms as the final goal is to teach.  Thanks a ton!


In short, I need to nuke it from orbit (Which seems to be the preferred method)  But how? Is there a package I can use, or do I just rm -rf / like a noob?  I'll point out now that rm -rf / does very Little damage do a chunk of Linux, so probably is more of a Missile strike than nuke.  THIS QUESTION WILL BE WIKI'D WHEN I GET TO IT. So, post all the crazy and fun methods you have.


\tableofcontents does not list the unnumbered chapter

My question is just like the title. Here is a MWE for my case :  \usepackage[paperwidth=16cm,paperheight=24cm]{geometry} \usepackage{amsmath,amsxtra,amssymb,latexsym,amscd,amsfonts,enumerate,ifthen,stmaryrd,amsthm,amstext} \usepackage[mathscr]{eucal} \usepackage[pdftex]{graphicx} \usepackage{xspace} \usepackage{multicol,color} \usepackage{mathrsfs} \usepackage{makeidx} \usepackage{indentfirst} \usepackage[utf8]{inputenc} \usepackage[utf8]{vietnam}  \usepackage{eso-pic} \usepackage{perpage}  \MakePerPage{footnote} \usepackage{fancyhdr} \renewcommand{\headrulewidth}{0pt}  \makeindex \begin{document} \pagenumbering{roman} \pagestyle{fancy} \tableofcontents  \chapter*{Foreword}  Blah blah blah  \chapter*{Preface}  \pagenumbering{arabic}     Blah Blah   Mirella gọi là papa, dạy toán ở nhà cho Mirella.   \thispagestyle{plain}  \chapter{Dido's problem}  \label{chapter:Dido}  \index{Dido (công chúa)} \index{bài toán công chúa Dido}    Blah blah blah   \end{document}   Why the unnumered chapter does not appear in the table of content ? Please help me. Thanks.


Why it is forbidden to import several Apex Methods at once in LWC module?

I have Apex Controller Class, say, LWCController and several methods inside of it, let's say Method1, Method2, Method3, Method4, Method5.   to      Use default import syntax to import an Apex method via the   @salesforce/apex scoped packages.        import { export1 , export2 } from "module-name";  import { foo , bar } from "module-name/path/to/specific/un-exported/file";  import { export1, export2 as alias2 , [...] } from "module-name";  import defaultExport, { export [ , [...] ] } from "module-name";      I am trying to import all of them simultaneously at the same line   import {Method1, Method2, Method3, Method4, Method5 } from '@salesforce/apex/LWCController';   And I receive the following errors   === Deploy Errors PROJECT PATH  ERRORS     N/A           [Line: 2, Col: 118] LWC1501: @salesforce/apex modules should have both class and method names. N/A           LWC1513: @salesforce/apex modules only support default imports.


I have a new gas kitchen stove.  The oven seems to burn so easily. I have a thermometer in there and it is registering the temp that I have the oven set on.  I have seen where people have used a pizza stone to even out the heat.  I want to know if you place a rectangle pizza stone directly on the bottom of the oven or should it be placed on a rack on the lowest setting?  I would appreciate replies from anyone who has used this and if it had helped the problem


Do the following identitities hold: Inf(S+T)=inf(S)+inf(T), where S and T are sets of nonnegative real numbers Also sup(S+T)=sup(S)+sup(T)


Lightning-Input within for:each not correctly resetting values

I am iterating over a list of objects, and creating a new input component for each iteration.  When I use the cancel button, I would like what I typed in the input to revert back to a default value.  While everything looks ok in my JS file, the UI is not refreshing the input, and instead keeps displaying whatever I typed.  Is it possible for my cancel button to revert the values in the lightning-inputs?  html:  <template>     <template for:each={inputs} for:item="inp">         <lightning-input key={inp.key} type="text" value={inp.value}></lightning-input>     </template>     <lightning-button label="Cancel" onclick={cancel} ></lightning-button> </template>   js:  import { LightningElement, track } from 'lwc'; export default class Iteration extends LightningElement {     @track inputs = [];     connectedCallback(){         var input1 = {};         input1['key'] = 'fname';         input1['value'] = 'firstName';         this.inputs.push(input1);     }      cancel(){                 var input1 = {};         input1.key = 'fname';         input1.value = 'firstName';          //trying to recreate the input list from scratch         this.inputs = [];         this.inputs = [...this.inputs,input1];          //everything looks ok in the javascript output, but the ui doesn't revert the value in the input field         console.log('inputs: ' + JSON.stringify(this.inputs));     } }   starting value:    after typing in something and then hitting cancel:


Can I nohup/screen an already-started process?

I'm doing some test-runs of long-running data migration scripts, over SSH. Let's say I start running a script around 4 PM; now, 6 PM rolls around, and I'm cursing myself for not doing this all in screen.  Is there any way to "retroactively" nohup a process, or do I need to leave my computer online all night? If it's not possible to attach screen to/nohup a process I've already started, then why? Something to do with how parent/child proceses interact? (I won't accept a "no" answer that doesn't at least address the question of 'why' -- sorry ;) )


She put forward two proposals, .......... of which didn’t make any sense to the participants in the summit.  The answer for this question in grammar exercises is ‘either’. I am doubtful whether to use either or neither. Can any one clarify this with reason.


Why is quantum mechanics based on probability theory?

What makes us formulate  based on ?  Isn't the real quantum world based on unknown laws to us?  Is it possible that results of an experiment will be measurable in another way but not ?


How to exclude paragraph titles in a table of contest?

I'm using the BOOK class, where \tableofcontents command seems that include always the subsubsection and paragraph titles too  How can I exclude the latter?   thanks in advance Dom


I clicked on render animation (F12) and nothing appears. Here a image of the result:


I think they both acceptable, but which one you recommend me to use in conversation.       If he were/was an elephant.     Isn't were sounds too formal/oldfashioned?


Any word (adjective preferably) that used to describe an achievement of pulling off something big out of the blue and not due to his abilities

For example, someone managed to make a basketball half court shot but it was him trying a thousand times not because he is that good. "Lucky" could be used as the word but I wonder if theres any word that emphasises on the great quality of the achievement, with negative connotation or an undertone of it being something that only happens once in a lifetime and shows the person doing it is not really that impressive.


Simulating survival times following a Weibull (or lognormal) distribution with ?% of right-censored observation

I'm trying to simulate survival times from Weibull(or lognormal) distribution with parameters (shape,scale) including (?%) of right-censored observations.I need to obtain observations of a variable, which include some percentage of right-censored data.


How can I access to my previous account?

I have an account in Stack Exchange communities. I use OpenID login, but apparently I can't do this any more. I add Google address as they asked, but it creates this new account and I lose all my previous work.  So, how can I access to my previous account?


While I was attempting online ISL test, where I got the following MCQ:  Chen's looking forward ______ his job next week. a) to starting b) to start c) starting d) in starting  The ISL considered the option "to starting" as a correct. But I think that the correct option is "to start" because we don't use -ing form after to-infinitive. So which one is correct?   Chen's looking forward to starting his job next week.   OR   Chen's looking forward to start his job next week.


check if string represents valid path in BASH

I currently have a directory in a string, as such:     DESTDIR="/var/files/mydir/filedir/"  Note that this directory does exist. I made sure of that.  I need to check if this directory already exists, or if I need to create it. I am currently doing this using:  if [ -d  $DESTDIR ]; then     echo the directory exists! else     echo the directory does not exist! fi   and, even though the directory does exist - I copy and pasted the name into the variable in my script - it always goes to the else statement. Not only that, but when I do ls $DESTDIR within the script I get a no such file or directory error.  However, when I run ls $DESTDIR from the command line, I get the expected result.  I've tried replacing $DESTDIR with "$DESTDIR", but I still don't get the expected result.


Invalid Topology [Topoengine error] from ArcGIS for Desktop?

Using ArcGIS 10.1 for Desktop, I'm trying to run the Identity function on two large data sets but it fails every time. I don't think it is a lack of hardware as I can run other processes on the same data sets.   I've already updated software, and added the 64 bit geoprocessing add-in, checked and repaired geometry, and done the fix in  (set ARCTMPDIR env variable to a writable local folder).   Executing: Identity DudleyStamp OA2011 "D:\Case Studies\National2\National.gdb\DudleyStampOA11" ALL "1 Meters" NO_RELATIONSHIPS  Start Time: Wed May 08 21:11:43 2013 Reading Features... Processing Tiles... Assembling Tile Features... ERROR 999999: Error executing function. The table was not found. The table was not found. [DudleyStampOA11] The table was not found.   The table was not found. [DudleyStampOA11]   Invalid Topology [Topoengine error.] Failed to execute (Identity). Failed at Wed May 08 21:45:41 2013 (Elapsed Time: 33 minutes 58 seconds)   Based on comments so far I tried copying data to new file geodatabase, and running the tool from ArcCatalog still get exactly the same error.  I have ordered 16GB of the fastest RAM my computer can take (I current have 4GB). I also have a 6 Core AMD Phenom II X6 1090T, SSD, and AMD Radeon HD 6970 Graphics Card. So I'm not sure what more hardware I can add.  I've also tried increasing the size of the page file which was a suggestion I found on Google with no effect.


This might be a very dumb question. I tried to reverse the input number and compare it.If they are same then, the output should be "the number entered is a palindrome" But, I'm getting out for every number like it is a palindrome.   package com.practise.examples;  import java.util.Scanner;  public class Practise  {     public static void main(String[] args) {           Scanner s=new Scanner(System.in);         System.out.println("enter the number to reverse it:\n");         int num=s.nextInt();         int revNum=0;          while(num!=0)         {             revNum=revNum *10;             revNum= revNum+ num%10;             num=num/10;         }         System.out.println("the reverse of the number is: " +revNum);              if(revNum==num)             {                 System.out.println("the number is a palindrome" );              }             else             {                 System.out.println("the number entered is not a palindrome");              }          }     }


I recently installed Ubuntu 12.10 and it requires a passphrase to boot up (I installed it with an encrypted file system).  Do I have to reinstall to change to a standard unencrypted file system?


I'm searching a way to continue a for-loop until a string matches.  @SuppressWarnings("deprecation") public ItemStack[] loadSecoundtLaserInventory(){     ItemStack pan = new ItemStack(Material.STAINED_GLASS_PANE, 1, DyeColor.BLACK.getWoolData());     ItemMeta panmeta = pan.getItemMeta();     panmeta.setDisplayName("");     pan.setItemMeta(panmeta);     List<ItemStack> content = new ArrayList<ItemStack>();     content.add(pan);     //     for(String str : getConfig().getConfigurationSection("lasers").getKeys(false)){         if(!str.startsWith("2")){          }         String[] amounts = getConfig().getString("lasers." + str + "amount").split(";");         ItemStack is1 = new ItemStack(getConfig().getInt("lasers." + str + ".block-id"));         ItemMeta ismeta1 = is1.getItemMeta();         ismeta1.setLore(Arrays.asList(HiddenStringUtil.encodeString(str)));         ismeta1.setDisplayName(ChatColor.translateAlternateColorCodes('&', getConfig().getString("lasers." + str + ".dname-amount").replace("{amount}", amounts[0])));         ItemStack is2 = new ItemStack(getConfig().getInt("lasers." + str + ".block-id"));         ItemMeta ismeta2 = is2.getItemMeta();         ismeta2.setLore(Arrays.asList(HiddenStringUtil.encodeString(str)));         ismeta2.setDisplayName(ChatColor.translateAlternateColorCodes('&', getConfig().getString("lasers." + str + ".dname-amount").replace("{amount}", amounts[1])));         ItemStack is3 = new ItemStack(getConfig().getInt("lasers." + str + ".block-id"));         ItemMeta ismeta3 = is3.getItemMeta();         ismeta3.setLore(Arrays.asList(HiddenStringUtil.encodeString(str)));         ismeta3.setDisplayName(ChatColor.translateAlternateColorCodes('&', getConfig().getString("lasers." + str + ".dname-amount").replace("{amount}", amounts[2])));         is2.setItemMeta(ismeta2);         if(!content.contains(is1)){             content.add(is1);         }         if(content.size() == 2){             content.add(pan);             content.add(pan);         }         if(!content.contains(is2)){             content.add(is2);         }         if(content.size() == 5){             content.add(pan);             content.add(pan);         }         if(!content.contains(is3)){             content.add(is3);         }         if(content.size() == 8){             content.add(pan);             return content.stream().toArray(ItemStack[]::new);         }     }     return null; }   Basically the Strings i loop over is something like  1panda,2boom,3tnt.  The problem is when the string doesn't starts with 2, i want to continue to the next String. I cannot use the return statement, because it would stop the loop. Any other ideas?


help remembering book title - multiverses/bladerunner-ish future. "sphere of influence. 2150"?

I am trying to remember title (and author) of best sci-fi book i have ever read (at least thats what my fading memory tells me).  Plot revolves around multiple-universe theories - set on earth, 'hero' is given a brain implant that allows him to decide which future he wants to exist in (eg: coin toss produces 2 universes - one where it is heads, one tails) - he can 'choose' which of the 2 possible futures to take. The unchosen future is destroyed or disappears somehow(?).  Hero is tasked with finding a young girl who has same ability but can do it without implant. Plan is to find and kill her because the effect of her decisions (and now his) are affecting whole universe and aliens have wrapped solar system in some kind of event horizon to cut us off from universe until we sort out the problem.  Cant remember any real specifics; - lots of action (tech, guns etc), bladerunner-ish. Read it around 1990-5.  Googling hasnt got me anywhere but title potentially something like "sphere of influence. 2150"  If i can find this book, i will be eternally grateful.


How can I determine the outcome of off-screen combat between NPCs?

My players will get a choice as they are assaulting a castle. There will be three magical siege engines they will need to stop so their troops don't get slaughtered.   Now knowing they have a fight with the big bad coming, they can either sneak in and stop all three towers themselves, or just stop one then move in to the boss fight leaving the other two towers to their retainers.  Should the players decide to leave the other towers to their retainers I want a simple way to decide some off screen combat because the retainers might die if it's left to them. How would you guys handle it?


What can be $f$ so that $f^2(x) = -x$ for all $x\in R$?  I know that if $f^2(x) = -x$ then $f(x)$ is injective and $f$ can not be continuous.  But I can not find an example of discontinuous function so that $f^2(x) = -x$ for all $x\in R$.  Can anyone help me?


Why my bedroom lights are on when a light in another room is turned on

During night, when all the lights are off and it is very dark in the room, I noticed that my bedroom lights turn on barely when a light is turned on in another room. The light is very barely visible and I would not notice them if it was during the day, only when it is very dark. I am using Philips Hue in my bedroom.


In the relation between displacement and pressure wave in sound how can there be maximum pressure when there is zero displacement of a particle,doesn't the exact opposite happen in a compression wave when the particles are at the maximum displacement and pressure is the highest?


Please I need help for this exercise : Let $f : \mathbb R → \mathbb R$, and suppose that $|f(x)−f(y)| \leq (x−y)^2$ for all $x, y$ ∈ $\mathbb R$. Prove that $f$ is constant. First if $a<b$ does $lim a < lim b$? If that is correct I can prove that lim of$ |f(x)−f(y)|$ as $x \rightarrow y$ is $0$ by sandwich theorem and hence $ f$ is constant. But this is a chapter about differentiability I think I should proof that $f'(0)=0$ but I don't know how. What do you think?


Can I downgrade my iOS to 7.x? I need to do it for app testing.


Grant Select on a view not base table when base table is in a different database

I have a view which is selecting rows from a table in a different database.  I'd like to grant select access to the view, but not direct access to the base table.  The view has a where clause restricting the number of rows.  Can I grant select to the view and not the base table, or do I need to switch to a stored procedure? I would rather not do it the latter way.


Collective term for data sizes (bytes, kilobytes, megabytes etc.)

As you will probably work out from my profile, I'm a software developer. This is sort of a software development question, but I think this is more suited to English language too.  Feel free to migrate if you think the question does not belong here.  Say I want to refer to the data size, or capacity of something:   A floppy disk can hold 1.44 megabytes of data. My flash drive can hold 16 gigabytes of data. My internet connection can operate at a maximum of 50 gigabits per second I have just managed to compress a file from 1 megabyte to just 200 kilobytes.   How do I collectively refer to these units of data size/capacity?


Proof that the product of a symmetric matrix and its transpose is also symmetric

If A is a symmetric matrix, then verify that A×A' (transpose) and also A'×A is also symmetric


Cut down the same list into given index  Let's say we have a list  mainList = [3,5,2,7,0,9]   If I remove 3 item then mainList should be  [7,0,9]   Is there a way to do that?


Im making lamps which are hand built, and each one is sold as a signed one out of a series of a predetermined number.  The lamps are made of plexiglas, they use an LED strip which is connected to a cable I make with a switch on it - that ends with a female connector like this one:  With the lamps I sell standard power supply that I buy in Europe (comes with a CE mark). The power supply has an output of 12 Volts.  I read lots of documents and still cannot figure out if I need a CE mark to sell in europe. the product is below 50V and it is art and does not fall in any of the categories of the CE mark.  Anybody had to deal with such a thing?  Thank you all in advance Eitan


Issues with Texts Sending Through iCloud

I'm having issues where my texts are sending through my iCloud. I've read the other threads in here and tried the following:  Go to Settings → Messages → Send & Receive  However, under "you can be reached by iMessage at" has my phone number greyed out and two email addresses (my icloud and my apple email).  Under "start new conversations from" it only shows my email addresses and not my phone number.   I think this is also affecting my ability to send texts via my Apple Watch.


Save Illustrator as PDF with transparent background

Is there a way to export my artwork as PDF so that it has a transparent background? Something like exporting objects only... whenever I try to save my .ai as pdf, it always comes with a full white background. If I try to save as eps, I get a chunky white background (where it has white rectangles behind the artwork only where the artwork exists, so there are transparent chunks).  If I export as png, I get an image like what I'm looking for. Is there any way to do that in a vector format?


How to Get elements of a JSON Object in Javascript or JQuery?

I have a JSON object that I get from a PHP script using the JSON_ENCODE method.  My JSON:  [{"0":"1","field_name1":"1","1":"fieldValue1","field_name2":"fieldValue2","2":"0","field_name3":"fieldValue3","3":"1","field_name4":"fieldValue4"}, {"0":"11","field_name1":"1","1":"fieldValue1","field_name2":"fieldValue2","2":"0","field_name3":"fieldValue3","3":"1","field_name4":"fieldValue4"}]   I want to be able to access my field names and my field values via a loop for loop or via an each function , I can use JavaScript or JQuery, but I don't know how to do it, can you help me?   EDIT : I already tried the answer on this question :    it gives me this output :   [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]


If a sorcerer casts Sickening Radiance with the Careful Spell metamagic option, does he have to spend a sorcery point every round?

One of my players is playing a Sorcerer who knows the  spell (XGtE, p. 164):     When a creature moves into the spell’s area for the first time on a turn or starts its turn there, that creature must succeed on a Constitution saving throw or take 4d10 radiant damage, and it suffers one level of exhaustion and emits a dim, greenish light in a 5-foot radius. This light makes it impossible for the creature to benefit from being invisible. The light and any levels of exhaustion caused by this spell go away when the spell ends.   (This spell has a 10-minute duration and is a concentration spell.)  He has also chosen the Careful Spell  option:     When you cast a spell that forces other creatures to make a saving throw, you can protect some of those creatures from the spell’s full force. To do so, you spend 1 sorcery point and choose a number of those creatures up to your Charisma modifier (minimum of one creature). A chosen creature automatically succeeds on its saving throw against the spell.   Sickening radiance forces creatures in the area to make a saving throw each round that it starts their turn in the area of effect.  If the Sorcerer wants their teammates to succeed on the saving throw against sickening radiance each round, do they have to spend a sorcery point each round? Or do the player characters get to pass the check automatically after the initial sorcery point is spent, since it was cast as a Careful Spell?


Automated/geoprocesing tool to slice, clip, or cut polygons using polylines using ArcGIS Desktop?

Looking for a simpler method here.  I am trying to split up / cut / slice existing polygons by using existing poly-lines. An example would be splitting a water body or land parcel at the point where a bridge/road crosses it. But the road network may not necessarily result in a closed loop.   Since the poly-lines are not necessarily interconnected or continuous, creating a polygon from them is not an option (which eliminates using the split tool). Also, I have tried using a topology with the geometry, but it keeps failing, probably due to the large/complex geometry.  Current Workflow: I have accomplished this with the Feature to Polygon tool, combining the lines and polygons together, but it creates additional unwanted polygons anywhere a loop closes. I created a mask of the original polygons, and used this with the overlay->erase tool to remove the unwanted polygons. This still leaves some unwanted geometry (mostly slivers), but is somewhat workable.  This seems like an extremely convoluted and round-a-bout way to accomplish (what seems like it should be) a very simple task.  Other than manual edits, or using a topology, is there is tool that could accomplish this in a single step?  Using: ArcMap \ ArcInfo Desktop 10 SP5  Edit 1: In my case, it is not actually roads as mentioned above. I have water polygons for a coastal area, and need to split the polygons where rock dams or levees have been put across the waterways. Which are typically not interconnected.   The water polygons have been simplified and repaired, to the point where I would no longer call the data "dirty" just complex and large. But I've got the workaround mentioned above working for this case.  I'm looking more "in general" for a tool that can simply divide polygons using polylines.  Edit 2:   Mapperz:Thanks for the Model Builder suggestion. I am going to use that as a stop gap solution, for now.  Jakub: Thanks for the suggestion. I'm not opposed to a programmatic solution or developing a custom tool, although I've never made one before. I have programming experience, but not in conjunction with Arc. I'd prefer something that directly cuts the geometry though, instead of following the roundabout logistics above. In theory that should reduce resultant gaps, since it wouldn't be subject to multiple iterations of cracking/clustering. Although, I'm not sure that would be as easy or even possible.  Edit 3: I'm looking for something to function like on the left in the image.


How can I create a new group in the layer manager using python code?


unable to undeploy my webapp war file from tomcat

I have deployed a webapp named "webappName.war" by putting the war file in /tomcat/webapps. Tomcat successfully extracted that and I've tested my app using "localhost:8080/webappName/..." . But a few days later I've decided to change the deployed app so I simply removed the webappName.war and /webapps/webappName . I thought that's enough to undeploy a webapp. But that old webapp still exists!!!!! I can see it's row in "/localhost:8080/manager" Application table and I can test it using "/localhost:8080/webappName" !!!!!!! There isn't any folder or war in "tomcat/webapps" but the application exists and I can not deploy my new webapp. What should I do? I really need to undeploy that app and fill the context with another one.


The manual for V. 2.80 says:   "To open the User Preferences editor go To File ‣ User Preferences. "  User Preference does not exist under File.  I want to make paths to folders with filepaths Where do I find it?


How to find reminder of $m^{x}$ divided by $n$ using Euler's and Fermat's little theorem

How do you find reminder of $m^{x}$ divided by $n$ using Euler's and Fermat's little theorem? Can anyone show me step-by-step how to apply  and ?  Example: What is the remainder of $59^{28}$ divided by $7$?  The following is the way I know how to do these types of problems:  $59^{28} = (56+3)^{28}$... since $7|56$ then we are left with  $3^{28} = 3^{2*2*7} = 3^{4*7} = 81^{7} = (77+4)^{7}$... since $7|77$ then we are left with  $4^{7} = 4^3*4^{4} = 64*4^{4} = (63+1)*4^{4}$... since $7|63$ then we are left with  $1*4^{4} = 4^4 = 4^3*4 = 64*4 = (63+1)*4$... since $7|63$ then we are left with 4  Since we are left with just 4, we can just do: $4\mod{7} = 4$   So the remainder is 4!


I've been getting pop-up saying 'chromes', 'staticstatus' and one more, I have tried installing all the anti-virus but it still isn't removed completely from the device. Every half an hour it is popping up. It is reoccurring and the anti-virus give the notification saying that it is a Malware.  I do not know what to do. It seems like I got the virus or the Malware attack when I installed some new apps. Especially I doubt on the app voot and there could be a possibility that even the other App might have carried the Malware into my device.     (click screenshots for larger variants)


Let $0 <a <b\ $ let $f >0 $  be continuous and strictly increasing  function on $ [a,b]$. Prove that $$\int_{a}^b f \  + \int_{f(a)}^{f(b)} \ f^{-1}=bf(b)-af(a)$$  How to approach this problem . Any Hint? I am suppose to do it without using antiderivatives.


Sampling from a piecewise linear probability density function

I have a pdf modelled as a piecewise linear function that I can represent as the sequence of pairs of real numbers standing for the points in the of the piecewise line: $\{(x_{1}, y_{1}), \dots, (x_{n}, y_{n})\}$ such that  each $x_{i}, x_{i+1}, i=1\dots n-1$ is a bin; the first two points are on the x axis, i.e. $y_{1}=y_{n}=0$, and the (trapezoid) area defined by the line is equal to 1 (it is a proper probability distribution function).  How can I procedurally sample from such a distribution? I feel like I can first determine one bin, e.g. $x_{s}, x_{s+1}$, by randomly selecting one with probability proportional to the trapezoid mass inside the bin, then how can I sample from the line defined by the two points $(x_{s}, y_{s}), ( x_{s+1}, y_{s+1})$?  Or shall I go through the cumulative distribution function? How can I derive it from the piecewise density representation of a sequence of points?


A question about linear continous operators

Theorem: Let $T:X\rightarrow Y$ be linear operator. Show that if $T$ is continous on X, then it is bounded. The attempt: if $T$ is continous on X, it is contionous at origin. Then,  $\forall x\in X $ we have $\lVert T(x)\rVert<\epsilon $ where $\lVert x\rVert <\delta$, we must show that there is a $C>0$ such that for $\forall x\in X $,  $ \lVert A (x)\rVert <C \lVert x\rVert $. How?


I am trying to figure out why $(X, \mathcal{O}_{indis})$, where $\mathcal{O}_{indis}$ is the indiscrete topology, is connected for every set $X$.  Furthermore, I am trying to understand why $\{ s \} \subset (X, \mathcal{O})$ is connected for any topological space.  Thank you!


Individual tag badge descriptions are incorrect

The individual tag badge descriptions are all stating 80 as the minimum number of answers:    This is incorrect.  80 is only the minimum for the silver badge, as shown on the :     Bronze Badge  You must have a total score of 100 in at least 20   non-community wiki answers to achieve this badge.   50.3k awarded      Silver Badge You must have a total score of 400 in at least 80   non-community wiki answers to achieve this badge.   9.1k awarded      Gold Badge You must have a total score of 1000 in at least 200   non-community wiki answers to achieve this badge.   2.7k awarded   This affects Stack Overflow as well as other sites such as .


Why do we need to rebuild and reorganize Indexes in SQL Server

After searching the internet i couldn't find the reason for    Why do we need to rebuild and reorganize indexes in SQL Server ? what does internally happens when we rebuild and reorganize ?   An article on a  says :     Index should be rebuild when index fragmentation is great than 40%. Index should be reorganized when index fragmentation is between 10% to 40%. Index rebuilding process uses more CPU and it locks the database resources. SQL Server development version and Enterprise version has option ONLINE, which can be turned on when Index is rebuilt. ONLINE option will keep index available during the rebuilding.   I couldn't understand this, though it says that WHEN to do this, but I would like to know WHY do we need to rebuild and reorganize indexes ?


I am trying to post a question, but the title of the question is apparently not of an acceptable quality, resulting in an error.  What are the criteria for an acceptable question title?


Proportional Coloring within polygon for multiple variables

I'm new to QGIS and I am doing some demographic analysis of Ethiopia. I have a vector map with each of the country's administrative zones:   Within the attribute table, I have data for religious demographics in each zone.   What I would like to do is have color swatches appear within each polygon (five different colors each representing the different religion), based on the proportion of the population that follows that religion. So, if one zone was 50% Protestant and 50% Muslim, that polygon would have equal amounts of red and green swatches.   Similarly, if one zone was 30% orthodox, 50% muslim and 20% protestant, there would be three color swatches present, with the color representing muslim being predominant.  Here is also a screenshot of my attribute table, as requested:   The info I'm interested in displaying is to the right: the percentage of a zone's population that follows a certain religion. For many of the areas, it is overwhelmingly a single religion, but a good amount show a lot of variation over two to three different religions.


How to remove text that get stuck after closing or switching from browser

I face this issue many time, whenever I switch from a browser to any other application or browser or anything else. The browser text gets stuck and it doesn't go away until I go back to that page of the browser or restart my system.    Can any one tell me how to get rid of it as it's sometimes difficult to find the browser tab form where the text is appearing.


Could somebody point me in the direction of a mathematically rigorous definition  and  for a given (classical) field theory?  Heuristically I know that global symmetries "act the same at every point in spacetime", whereas local symmetries "depend on the point in spacetime at which they act".  But this seems somehow unsatisfying. After all, Lorentz symmetry for a scalar field $\psi(x)\rightarrow \psi(\Lambda^{-1}x)$ is conventionally called a global symmetry, but also clearly $\Lambda^{-1}x$ depends on $x$. So naively applying the above aphorisms doesn't work!  I've pieced together the following definition from various sources, including . I think it's wrong though, and I'm confusing different principles that aren't yet clear in my head. Do people agree?  A global symmetry is a symmetry arising from the action of a finite dimensional Lie group (e.g. Lorentz group, $U(1)$)  A local symmetry is a symmetry arising from the action of an infinite dimensional Lie group.  If that's right, how do you view the local symmetry of electromagnetism $A^{\mu}\rightarrow A^{\mu}+\partial^{\mu}\lambda$ as the action of a Lie group?


when i render these 2 text objects in blender they wont show up in rendering, both objects are surface


Microeconomics (quasi-linear utility function)

Suppose that Sally’s preferences over baskets containing food (good x), and clothing (good y), are described by the utility function $U(x,y)=\sqrt{x}+y$.  Sally’s corresponding marginal utilities are,  $U^\prime_x=\frac{1}{2\sqrt{x}}$   and    $U^\prime_y=1$.  Use Px to represent the price of food, Py to represent the price of clothing, and I to represent Sally’s income.          Question 1: Find Sally's food demand function, and Sally's clothing demand function.     For the purposes of this question you should assume that I/Py greater than or equal  Py/4Px.      Clothing demand function : y= I/py - Py/4Px  Food demand function : x = P^2y/4P^2x  After deriving demand function for both Clothing and Food, the following  question confused me.     Question 3: Now assume that I/Py less than Py/4Px. Find Sally's food demand function, and   Sally's clothing demand function.   How do i get about doing this following question and getting the NEW Demand function for Food and Clothing?  I do know it might  possible be a corner solution.. But how do i explain it in terms of the function as i am not given the price of food and price of clothing in numerical form?


It is possible to have a subdirectory redirection while keeping the domain name?

We have a working website under the domain x.domain.tld. We want to add a wordpress to it in such way we have x.domain.tld/blog but install it on another server so we don't touch anything on this old (but working) one. So can i start a new server, install wordpress on it, have an apache rediretion on x.domain.tld/blog to redirect to the new server IP WHILE keeping the domain name in the url for the clients ? That doesn't look doable to me. And we're reluctant migrating the whole old application to a new server. Is there another way of doing it ? Thank you for your help


Does it make sense to Favourite a Question you created?

Is this just a redundant act, or are there differences?


A few months back I set to the task of verifying my blog content for Google Authorship. I'm fairly confident I've ticked all the boxes and when I test my posts with the Google Structured Data tool it informs me that .   It has been like this for around 2 months but I am still not seeing my authorship profile in the search results. Do a search for "jQuery Parallax Scrolling Tutorial" and you will see my blog post near the top of the results but no authorship data.  Can anyone suggest why this is not appearing when Google itself tells me that everything is in order? Thanks


Let $(G,\cdot)$ be a group show that  A) $G$ is abelian  B) For all $x,y\in G: (xy)^{-1}=x^{-1}y^{-1}$  C) For all $x,y\in G: (xy)^{2}=x^{2}y^{2}$  D) There existst an $n\in \mathbb{Z}$ such that for all $x,y\in G$  $\displaystyle (xy)^{n-1}=x^{n-1}y^{n-1}$ and $\displaystyle (xy)^{n}=x^{n}y^{n}$ and $\displaystyle (xy)^{n+1}=x^{n+1}y^{n+1}$  are equivalent.    I showed $A\iff B,A\iff C$ and $A\iff D$. That was not really hard, except maybe $D\Rightarrow A$. I would like to do a circular argument, but i have no idea how.  Any hints?  Thanks in advance!


pgfplots: lines and markers in different colors

With pgfplots, I am creating a simple coordinate plot with error bars like this:    \documentclass[crop,10pt]{standalone} \usepackage[english]{babel} \usepackage{pgfplots}      \begin{document}%         \setlength{\linewidth}{246pt}%              \begin{tikzpicture}             \begin{axis}[             width=\linewidth,             ytick pos = left,             xtick pos = left,             clip=false,             axis on top,             tick align = outside,             yticklabel style={%             /pgf/number format/fixed,             /pgf/number format/precision=1,             /pgf/number format/fixed zerofill         },             ytick scale label code/.code={},             xlabel={X},             ylabel={Y},     ]             \addplot[mark=*]             plot[             error bars/.cd,             y dir=both,             y fixed=0.0001     ]             coordinates{(1,0.0005) (1.1,0.0013) (5,0.0015)};             \end{axis}             \end{tikzpicture}     \end{document}   In the original plot I have a lot more points. I would now like the line and the markers (including the error bars) to have different colors to better distinguish the line from the error bars. Is that somehow possible? The only way I found so far is to plot the data just as a line in one color and then plot it again just as markers in another color. This works, but I guess there must be some better solution to this. Thanks for the support, John


I am running these commands to reinstall php5.6 and I getting this error:  add-apt-repository ppa:ondrej/php     W: GPG error:  stable Release: The following   signatures couldn't be verified because the public key is not   available: NO_PUBKEY 6494C6D6997C215E W: There is no public key   available for the following key IDs: 1397BC53640DB551 W: Failed to   fetch      404  Not Found [IP: 172.217.8.142 80]      E: Some index files failed to download. They have been ignored, or old   ones used instead.   Please advise


Is the power set ordered by cardinalities well ordered?

For any non empty set $X$; $A,B \in \mathcal{P}(X)$, the power set, define $A\sim B \iff $ both $A$ and $B$ have same cardinality and let $\tilde{X}$ denote the equivalence classes. For $\tilde{A}, \tilde{B}\in\tilde{X}$, define $\tilde{A} \preccurlyeq\tilde{B} \iff |\tilde{A}| \leq |\tilde{B}|$  where $|\tilde{A}|$ denotes the cardinality of $\tilde{A}$. Now, we know that the axiom of choice implies that $\preccurlyeq$ is a total order.  What I wish to know is whether it is a well-order.


How do I copy data from Command Prompt in Windows 7?

I'm running some tests that take some time in Command Prompt. When you type Ctrl+C Command Prompt on Windows 7, it appears as ^C (or while the program is running it pauses the program and kills the tests).  How can I copy it in a more efficient manner than just typing it all into notepad and then copying it?


I like to use  with  but its not clear to me how to install it within mactex ?


$\text{Ramification Lemma}:$   Let $A$ be a ring, $\alpha$ an ideal of $A$, and $M$ an $A$-module. Then prove $M/ \alpha M \cong (A/\alpha) \otimes_A M $.  Proof: We have the exact sequence: $$0 \to \alpha \to A \to A/\alpha \to 0.$$ (Why ?)  Tensoring with $M$ gives another exact sequence:  $$ 0 \to \alpha \otimes A \to A \otimes M \to A/ \alpha \otimes M \to 0.$$ i.e, $$0 \to \alpha \otimes A \to M \to A/ \alpha \otimes M \to 0,    $$ because $A \otimes M=M$.  The image of $\alpha \otimes_A M$ in $M$ are sums of elements of the form $a_i \cdot m_i$,   where $a_i \in \alpha$ and $m_i \in M$. This implies $M/ \alpha M \cong A / \alpha \otimes_A M$.     Please just explain how the sequence are exact?   what are the functions like $\alpha \to A$, $A \to A/\alpha$ etc?


Calling derived function from a derived function of another class

I have two base classes Vehicle and WorkerUnit and they have derived classes Bus and Maintenance respectively.  The Maintenance class has to be initialized with a variable of class Vehicle (or the derived classes of Vehicle), and the function print() inside class Bus is to be called. How do I achieve this?  #include <iostream> using namespace std;  // Vehicle Class class Vehicle { public:     virtual void print() {         cout << "Vehicle print() called" << endl;     } };  class Bus : public Vehicle { public:     void print() {         Vehicle::print();         cout << "   Bus print() called" << endl;     } };  // Worker Unit Class class WorkerUnit { protected:     Vehicle vehicle; public:     WorkerUnit(Vehicle vehicle) : vehicle(vehicle) {}     virtual void print() {} };  class Maintenance : public WorkerUnit { public:     Maintenance(Vehicle vehicle) : WorkerUnit(vehicle) {}     void print() {         // Problem here where function calls base class Vehicle's print()         // How do I actually call the derived class's print()?         vehicle.print();     } };  int main(void) {     Bus *bus = new Bus();     Maintenance *m = new Maintenance(*bus);     m->print();      return 0; }


jQuery onclick not working for added element from ajax call, i am using onclick handler for my appication and using php for loading data dynamically php html on click event not working when json


Small plugin that lets editors add source links in their articles - does anyone have any idea what is wrong with this code?

I'm using the latest version of Wordpress and I want to upload a small plugin - a metabox that lets editors add source links in their articles. The code looks like this:   /* Do something with the data entered */ add_action( 'save_post', 'wpse_source_link_save' );   /* Adds a box to the main column on the Post and Page edit screens */ function wpse_source_link() {       add_meta_box(         'source_link',         __( 'Source-link', 'myplugin_textdomain' ),          'wpse_source_meta_box',         'post',         'side'     ); }   /* Prints the box content */ function wpse_source_meta_box( $post ) {     // Use nonce for verification   wp_nonce_field( plugin_basename( __FILE__ ), 'myplugin_noncename' );     // The actual fields for data entry   echo 'URL: ';   echo '<input type="text" id="source-link"" name="source_link" value="'.     get_post_meta( $post->ID, '_source_link', true ) .'" size="25" />';     echo 'Label: ';   echo '<input type="text" id="source-link-label"" name="source_link_label" value="'.     get_post_meta( $post->ID, '_source_link_label', true ) .'" size="25" />'; }   /* When the post is saved, saves our custom data */ function wpse_source_link_save( $post_id ) {   // verify if this is an auto save routine.    // If it is our form has not been submitted, so we dont want to do anything   if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )        return;     // verify this came from the our screen and with proper authorization,   // because save_post can be triggered at other times     if ( ! wp_verify_nonce( $_POST['myplugin_noncename'], plugin_basename( __FILE__ ) ) )       return;       // Check permissions     if ( current_user_can( 'edit_post', $post_id ) ) {         update_post_meta( $post_id, '_source_link', sanitize_text_field( $_POST['source_link'] ) );       update_post_meta( $post_id, '_source_link_label', sanitize_text_field( $_POST['source_link_label'] ) );      } }   Metabox works fine and It's possible to add links along with anchors. The problem is, it doesn't show up in posts. I can't figure out what is wrong with this code. Does anyone have any ideas?


Im attempting to resize a filesystem on a mulipathed volume that I've grown, rescanned all the disks, and resized the multipath map.  # resize2fs /dev/mapper/my_vol  resize2fs 1.43-WIP (20-Jun-2013) Filesystem at /dev/mapper/my_vol is mounted on /var/lib/myvol; on-line resizing required old_desc_blocks = 6, new_desc_blocks = 12 resize2fs: Permission denied to resize filesystem    # strace -f resize2fs /dev/mapper/my_vol (finishes with) ....snip....  write(1, "Filesystem at /dev/mapper/my_vol"..., 101Filesystem at /dev/mapper/my_vol is mounted on /var/lib/myvol; on-line resizing required ) = 101 write(1, "old_desc_blocks = 6, new_desc_bl"..., 42old_desc_blocks = 6, new_desc_blocks = 12 ) = 42 access("/sys/fs/ext4/features/meta_bg_resize", R_OK) = 0 open("/var/lib/my_vol", O_RDONLY) = 4 ioctl(4, 0x40086610, 0x7fffb729c2e8)    = -1 EPERM (Operation not permitted) write(2, "resize2fs", 9resize2fs)                = 9 write(2, ": ", 2: )                       = 2 write(2, "Permission denied to resize file"..., 38Permission denied to resize filesystem) = 38 ioctl(2, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 ioctl(2, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0  write(2, "\n", 1 )                       = 1 exit_group(1)                           = ?   I would like to keep this server up as it hosts many virtual machines, and I've not experienced permission denied when running a resizefs as root before, what could be denying root a simple resize? Any help greatly appreciated.   The server has selinux disabled, and the multipath -ll shows the volume in a read-write state. (wp=rw)  myvol (3600c0ff00013d24d8c20725301000000) dm-12 HP,P2000 G3 iSCSI size=186G features='1 queue_if_no_path' hwhandler='0' wp=rw   I have noticed that ls -ld on the mount point shows  drwxr-xr-x  5 root root 4096 Jan 27 12:49 myvol   and not  drwxr-xr-x. 5 root root 4096 Jan 27 12:49 myvol  #ls -Zd myvol drwxr-xr-x root root ?                                myvol   Related?


How to reset compizconfig-settings-manager settings?

So I have a really stupid problem: I followed this tutorial () and accidentally mapped the "Initiate line" hotkey to mousebutton 1, which means that left clicks are no longer registered and all that happens instaed is that I draw a green coloured line on my desktop that stays until I reboot my pc. I was wondering if there was a way to fix this issue using only terminal, which is pretty much the only application I can use right now. The graphics interface of compizconfig-settings-manager is pretty much completely inaccessible now.  Thanks in advance!


Heritable immunity and smallpox vaccination

As I understand it, lack of heritable immunity caused smallpox to wipe out certain communities of native Americans. If vaccination conveys heritable immunity to a population, shouldn’t this make vaccines unnecessary after the first generation?


The tool called 'at' is not available on Ubuntu

I am running the latest Ubuntu on my server VPS on linode and I get this error when installing cronkeep     Oh Snap!      at is not available on this system. CronKeep uses this slick command   internally to run jobs independently from your web server, whenever   you hit "Run". This means you could restart your web server and still   have the process running in the background.      Here's the raw output from the command that may help you debug this   further: sh: 1: at: not found   Is there a tool called at or is this something available on the C compiler?.


Keep FTP folder synchronized with Windows folder

I'm trying to get my Continuous Integration system working from start to finish in the dev environment.  Unfortunately, the last step after publish is copying the folder to an offsite server which I can only access via FTP.  I'd like to have a service running that watches a local folder, and if it changes, updates the FTP server with those changes.  I can't seem to find something to accomplish this in Windows.


Dismiss Windows 8 Volume Box (top left corner)

When adjusting the volume in Windows 8.1, a box appears at the top left corner of the screen. This box sticks around for ~13 seconds before it fades away. If you attempt to dismiss it by click on it, it switches to the music app.  How do you disable or dismiss this annoying box? At the very least, can the time visible be adjusted? More times than not, it's in the way.


Illustrator pen auto-correction on Photoshop

Illustator has a nice effect on it pencil tool : curve auto-correction. When you draw line, it automatically correct your hand, making it more neat and round. Sadly, I don't see this option on the photoshop pencil tool.  And well, I can't /don't want use Illustrator for several reasons, including the fact it's not really suitable for drawing. I'm quite surprised don't found it on Photoshop, according to how usefull it is.  So there is my question : is there any plugin or way to benefit it on Photoshop ? Many thanks.


Does Sarkhan, the Dragonspeaker's first ability trigger "enters the battlefield" effects?

has the ability     [+1]: Until end of turn, Sarkhan, the Dragonspeaker becomes a legendary 4/4 red Dragon creature with flying, indestructible, and haste. (He doesn't lose loyalty while he's not a planeswalker.)    If I were to have  in play when I trigger this ability, do I get to draw a card?     Whenever a creature with power 4 or greater enters the battlefield under your control, you may draw a card.


How to rename various file extension into an extension

I have many files in a directory with various extension (files.txt, files.html, files.jpg, etc). I need to change all the extension of these files into an extension (files.ext.backup). So, I will change:  *.txt ==> *.txt.backup  *.jpg ==> *.jpg.backup  and so on.  I realized that I need to change the extension of each type, but at least I don't have to change them one by one. How should I do that ?


Showing that if $a$ is a transitive set then $\cup a$ is also a transitive set.

I am working on a problem in Enderton's text on set-theory that appears to be deceptively easy. It is likely that I making a mistake somewhere so if someone can comment it would be much appreciated.  Question: Show that if $a$ is a transitive set then $\cup a$ is also a transitive set.  Answer so far: Assume that $a$ is a transitive set. By definition, $\cup a = \{x \in y \ |$ for some $y \in a$}. Since $a$ is transitive, whenever we have for every $x \in y \in a$, we have $x \in a$. But these are just the conditions of set $\cup a$. So $\cup a$ is transitive.


Prove that $x^n+x^{-n} \in \mathbf{N}$ if $x+\frac1x \in \mathbf{N}$

Assume that $x+\frac{1}{x} \in \mathbb{N}$. Prove by induction that $$x^2+\frac1{x^2}, x^3+\frac1{x^3}, \dots , x^n+\frac1{x^n}$$ is also a member of $\mathbb{N}$.  I have my base, it is indeed true for $n=1$..  I can assume it is true for $x^k+x^{-k}$ and then proove it is true for $x^{k+1}+x^{-(k+1)}$ but I'm stuck there.


I may be biased, and will delete if I'm wrong, but why are there so many more insects when compared to quad bugs?


Does the universe expansion theory take into account that light emitted by massive stars is red-shifted?

I have recently noticed this answer by  to a ,     if a star is not a black hole, light shone upwards will escape the star's gravitational field, although light is red-shifted in doing so, heavily so if the star is massive   I'm particularly interested in the red-shifting part of the answer.  Although it's not the first time I'm seeing something similar, I wasn't sure whether this is something universally accepted.  Because if it is, I'm wondering whether the whole theory of the accelerated expansion still stands. As I understand the expansion the red-shift is quite crucial in the conclusion.


Equivalence Principle - mass on table example

I hope this question won't be ill received. I have a rather simple question in physics. I never got a satisfying answer to the following question: If a man holds a massive body in the air such that it is at rest with respect to the earth, then according to Newtonian Physics no work is being done. However everyone knows that this is a process which consumes energy. I thought of resolving this in a few ways:  One way was to say that it has to do with the fact that biological systems need to spend energy in order to exert a force.  The other one is that it is actually related to the equivalence principle. I read in wikipedia (I hope this source is reliable)     According to the equivalence principle it (a body resting in a   gravitational field) should be indistinguishable from a particle in   flat space being accelerated by a force.   So can the expenditure of energy in the case of a man holding a mass be explained by invoking the equivalence principle and saying that the situation is equivalent to the man exerting a force on the body in flat space? If the second explanation would be correct, then that would mean that the friction (electrostatic forces) of  table would have to continuously lose energy in order to prevent a massive body from falling to the ground. That would be absurd?


Goals:   Have a single nginx reverse proxy for all sub-sites (running on other ports). BLOCK all direct connections, and instead; route through nginx.   Problem(s):   502 gateway errors when trying to access https://www.example.com/site1/ (connect() failed (111: Connection refused) while connecting to upstream)   Setup:   example.com running on port 80 (nginx). site1 and site2 running on ports 8001 and 8002 respectively.   nginx config:      worker_processes 1;      events { worker_connections 1024; }      http {         sendfile on;          upstream site1 {             server 127.0.0.1:8001;         }          upstream site2 {             server 127.0.0.1:8002;         }          server {             listen 80 default_server;             server_name _;             return 301 https://$host$request_uri;         }          server {              listen 443 ssl;             listen [::]:443 ssl;             gzip on;             access_log on;             log_not_found on;             error_log  /var/log/nginx/error.log error;             server_name example.com www.example.com;             charset UTF-8;             root /var/www/html;             error_page 404 /404.html;              ssl_prefer_server_ciphers on;             ssl_certificate /etc/ssl/server.crt;             ssl_certificate_key /etc/ssl/server.key;              location /site1/ {                 proxy_set_header X-Original-Request $request_uri;                 proxy_set_header X-Real-IP $remote_addr;                 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;                 proxy_set_header X-Forwarded-Proto $scheme;                 proxy_pass http://site1;             }              location /site2/ {                 proxy_set_header X-Original-Request $request_uri;                 proxy_set_header X-Real-IP $remote_addr;                 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;                 proxy_set_header X-Forwarded-Proto $scheme;                 proxy_pass http://site2;             }         }     }   Facing a few problems regarding setting up my nginx reverse-proxy. Any help in this regard is much appreciated. Many thanks.


What is a Superblock, Inode, Dentry and a File?

From the article  by M. Tim Jones, I read that Linux views all the file systems from the perspective of a common set of objects and these objects are superblock, inode, dentry and file. Even though the rest of the paragraph explains the above, I was not that comfortable with that explanation. Could somebody explain to me these terms?


numbering parentequation of subequations

I would like to change the numbering of the parent equation of the subequations.  \begin{subequations} \label{eq:Parent}   \begin{align}   a& \label{eq:1}\\   b& \label{eq:2}   \end{align} \end{subequations}   I cannot use \tag before \begin{align} since it is not in a math environment.


What is the cardinality of this infinite group?

I need to the detriment the cardinality of a group and prove why.  The group:  A = {The group of all real numbers in the range between 0 and 1, where the digits can only be ones and zeroes, and after each zero comes a one}   At first I thought this is א, and was planning to prove it using the good old technique of picking one where there is zero, and zero where there is one.  But then I came up with the following function:  f:A ---> Z f(x) = {  if the first digit after the point is zero, conversion of the binary digits after the point in x (excluding the first zero) into a decimal number   if the first digit after the point is one, conversion of the binary digits after the point in x into a decimal number, multiplied by minus one }   This function seems to be reversible, and since |Z| is א0, |A| should be א0 as well. on the other hand, if proving using the method I intended to use, the result is that |A| is א.  Which one is it, and why?


Special relativity allows arbitrarily low travel times between two locations

I wish I had a good way of illustrating this, but anyway, doesn't the following travel strategy allow you to get anywhere in arbitrarily little time?  You're at rest at the origin of space-time, and you'd like to meet up with an object some distance away in the positive x-axis - in other words, you'd like to reach the vertical world line of that object. You begin traveling towards the object at t = 0 in the following 3 phase trip:  I. You accelerate nearly to the speed of light relative to the stationary frame of the origin and the object you're trying to reach.  II. You level out your speed and coast.   III. You decelerate right before you reach the object.  As long as the observer travels on a space-time path that's always nearly lightlike, the proper time of his journey will be almost zero. Not that he sees a finite amount of distance go by him in zero time - the proper distance between the endpoints of his nearly lightlike journey is also nearly zero, so the speed of light is never exceeded by objects passed by the traveller.   I realize that the travel time in the stationary reference frame is finite - it's the same as that of a light ray, and that during the acceleration phase (I.), the traveller will see all of this finite time go by at his destination, but he'll never experience that amount of time going by, right?  If the above reasoning is correct, then there isn't really a limit on how far you can travel in a human lifetime, right? People seem to think that the finite maximum speed c is a death knell for, say, trips to Andromeda (and beyond). But if the above is correct, then the only limit on short travel times is the energy required to accelerate (a limit which exists in a Newtonian world as well).   In short, isn't it possible (in principle) to go arbitrarily far in a human lifetime?


Strange vertical spacing with floats and parskip

When I compile the following MWE with lualatex or xelatex I get strange vertical spaces between paragraphs on page 2 (see picture of output below).   \documentclass[a4paper,11pt,parskip=full,twoside]{scrbook} \usepackage{polyglossia} \setmainlanguage{english} \usepackage{blindtext}  \begin{document}  \chapter{Chapter} \section{Section} \blindtext \subsection{Subsection} \blindtext \subsection{Subsection} \blindtext  \blindtext  \blindtext \subsection{Subsection} \subsection{Subsection} \subsection{Subsection} \subsection{Subsection} \subsection{Subsection} \subsection{Subsection} \subsection{Subsection} \subsection{Subsection} \subsection{Subsection} \subsection{Subsection} \subsection{Subsection}  \end{document}   The problem does not occur when I remove the parskip option to the \documentclass. I would like to keep the parskip behaviour but I would like to get rid of these ugly spaces.


Manipulate BGE logic bricks through python

Is it (if at all) possible in Blender 2.6+?   If not, will future versions of Blender support it?  I see some old posts ( and ) saying that it is not possible. However, I found  referring to operators under  that allowed me to add sensors and controllers from python.  bpy.ops.logic.sensor_add(type='ALWAYS', object=my_obj.name) bpy.ops.logic.controller_add(type='LOGIC_AND', object=my_obj.name)   However I am not able to find any way to link them from python. I tried following (but did not work):  new_controller = my_obj.controllers[-1] new_sensor = my_obj.sensors[-1]   It throws AttributeError saying that object has no attribute 'controllers' :-/


$$\lim_{x \to 0}\frac{1-(\cos{x})^{\sin{x}}}{x^3}$$ So what I have tried is defining three functions, $f(x)=\cos{x}, g(x) = \sin{x}, h(x) = x^3$ What I did next was do Maclaurin expansion for three functions up until the third order: $f(x) = 1 - \frac{x^2}{2} + o(x^3)$ $g(x) = x - \frac{x^3}{3} + o(x^3)$ $h(x) = x^3 + o(x^3)$ So when I plug in these values I get: $$\lim_{x \to 0}\frac{1-(1-\frac{x^2}{2}+o(x^3))^{x-\frac{x^3}{3} + o(x^3)}}{x^3}$$ So after plugging in $x=0$ I get $\frac{0}{0}$ and when I try to apply L'Hôpital's rule I find myself in a situation where I need to calculate the derivative of the denominator several times (which would take too long). I'm positive that I'm correct until this point (I checked on wolframalpha, the result is 1/2). Does anyone know how to proceed from here? Do I need to calculate the derivative of the denominator several times or is there a smarter way?


The Question:  Let $n=(6t+1)(12t+1)(18t+1)$, where $t\in \Bbb Z$ and $6t+1$, $12t+1$, $18t+1$ are prime, and $(a,n)=1$.  Show that $a^{n-1} \equiv 1\pmod n$.    My Thoughts:  This blatantly looks like Fermat's Little Theorem, but I can't seem to find a way to adapt the proof of it for this question.  In particular, the proof of FLT fails in the last step in this case when you divide by $(n-1)!$:  $$a^{n-1}(n-1)! \equiv (n-1)! \pmod n \implies a^{p-1} \equiv 1 \pmod n$$  is a false statement because $(n-1)!$ is in fact a multiple of $n$.  Any hints?


What was the first school of magic mentioned in modern Fantasy literature?

What was the earliest school of magic mentioned in modern Fantasy literature, determined by publishing date?  "Modern Fantasy" would be defined as 1880 and later, though I'm tempted to set the era as starting with The Hobbit.  It must be an actual school, meaning:   There are several teachers, teaching different subjects to many pupils. There is more than one chronological "class" of students (I mean that some graduate while the others are still learning). The school must be described at least in some level of detail in the book (as opposed to a simple "He was a good magician, educated in Massachusetts Institute of Transfiguration" mention of existence).   The earliest one I can think of is Ursula Le Guin's Roke in the Earthsea books, but there surely were earlier ones. Middle Earth didn't have one to the best of my recollection.


When is the profile view count incremented? I tried opening the page from different browsers and in incognito mode. But none of my attempts were counted. How do they realize that its me?


Let $R$ be a commutative Noetherian ring (with unity), and let $I$ be an ideal of $R$ such that $R/I \cong R$. Then is $I=(0)$?

Let $R$ be a commutative Noetherian ring (with unity), and let $I$ be an ideal of $R$ such that $R/I \cong R$. Then is it true that $I=(0)$ ?  I know that a surjective ring endomorphism of a Noetherian ring is also injective, and since there is a natural surjection from $R$ onto $R/I$ we get a surjection from $R$ onto $R$, but the problem is I can not determine the map explicitly and I am not sure about the statement. Please help. Thanks in advance.


I have seen many times in code that people use int or Integer to declare variable in beans. I know int is datatype and Integer is wrapper class. My question is, in which condition int or Integer should be used and is there any advantage of either of them over another?


says every point of wavefront emit wavelet in all directions. Then why does a back ward wave not exist? Can any expert tell real answer? On different sites I get different and contradictory answer.  I am asking question from my class 12 book. It says " Huygens argued that the amplitude of the secondary wavelets is maximum in forward direction and zero in the backward direction; by making this adhoc assumption, Huygens could explain the absence of backwave. However, this adhoc assumption is not satisfactory and the absence of the backwave is really justified from more rigorous wave theory."  What justification is given by wave theory?  answer explained by Marty green on   is different from answer given by Acuriousmind on     Which is correct?


Identify Story: 60's or 70's novella about last man alive taken care of by robots

Does anyone remember the name of a story (I think it was a novella from the 1960's or 70's) about the last man left alive on earth after a nuclear war, who is taken care of by a group of robots who gradually evolve into a sentient species?


Using \hfill in a beamer \frametitle in the wuerzburg theme

I'm using a  developed by Christian Gogolin and I'm struggling to get the desired effect using the \hfill command in \frametitle{} in order to have a beamer button aligned completely to the right in the frame title.  Here is a MWE, using Gogolin's own wuerzburg beamer outer theme:  \documentclass[xcolor={x11names,svgnames,dvipsnames}]{beamer}  \usepackage[T1]{fontenc} \usepackage{lmodern}  \useoutertheme[nofootline]{wuerzburg} \usecolortheme{shark} %\setbeamertemplate{frametitle}[default][none] % uncommenting this gives proper placement but overrides the frametitle definition of the outer theme.  \begin{document}  \begin{frame} \frametitle{This is the frame title \hfill \beamergotobutton{right}} Some text \end{frame} \end{document}   This is the result:    The "right" beamer button is not aligned right as expected; its absolute position also changes based on the lenght of the title text.  I tried to implement the advice given : using \frametitle{Title \hspace{1 filll} Logo} (1 filll or 1 fill both do not work).  Using \setbeamertemplate{frametitle}[default][none] gives proper placement but overrides the frametitle definition of the outer theme.  I imagine that the fix would involve the definition of frametitle template in the wuerzburg theme:  \defbeamertemplate*{frametitle}{wuerzburg theme}[1][left] {   \nointerlineskip   \ifbeamercolorempty[bg]{frametitle}{\vskip0.5ex}{%     \hbox to\textwidth{\hskip-\Gm@lmargin\pgfuseshading{beamer@frametitletopmshade}\hskip-\Gm@rmargin}     \nointerlineskip%   }%   \@tempdima=\textwidth%   \advance\@tempdima by\beamer@leftmargin%   \advance\@tempdima by\beamer@rightmargin%   \begin{beamercolorbox}[sep=0.3cm,#1,wd=\the\@tempdima]{frametitle}     \usebeamerfont{frametitle}%     \vbox{}\vskip-1.7ex%     \if@tempswa\else\csname beamer@fte#1\endcsname\fi%     \strut\insertframetitle\strut\par%     {%       \ifx\insertframesubtitle\@empty%       \else%       {\usebeamerfont{framesubtitle}\usebeamercolor[fg]{framesubtitle}\insertframesubtitle\strut\par}%       \fi     }%     \vskip-1.3ex%     \if@tempswa\else\vskip-.3cm\fi% set inside beamercolorbox... evil here...   \end{beamercolorbox}%   \nointerlineskip   \ifbeamercolorempty[bg]{frametitle}{}{%     \hbox to\textwidth{\hskip-\Gm@lmargin\pgfuseshading{beamer@frametitlebottomshade}\hskip-\Gm@rmargin}%     \vskip-1.5pt%   }% }   But I can't figure out what goes wrong here: the text width seems to be correct and I don't understand the role of \strut\par around \insertframetitle.  Any help is appreciated.


How to deploy Java application on different OS?

I'm supposing I have built a nice desktop application written in Java and I want to distribute it to some friends, colleagues, customers,.. in order to use it on their everyday business. Many of them uses Windows, other OSX and no one of them knows Java or programming, they are simple users of computer, so Outlook, Google Chrome, ad-hoc softwares for business (crm, management, ..). I don't want to annoy them saying 'You have to install Java prior to execute the jar file' because makes my software less nice than it really is, and makes the installation not user-friendly.  Is there a way to deploy a Java application in exe, dmg, pkg,.. formats in order to have an installation wizard with custom options (such as 'Company Name', 'Telephone', 'Where do you want to install?', 'Serial code',...), an easy auto-created icon on the desktop to launch the software, an uninstaller to eventually remove the files, and a prior check of the Java version (if installed check the version and eventually 'Follow this link to update Java', if not 'Please follow this link and download Java')?


RSS and $R^2$ are not suitable for selecting the best model, why?

This is in continuation to question   In section 6.1.3 Choosing the Optimal Model of , which states following:     The training error can be a poor estimate of the test error. Therefore, RSS and $R^2$ are not suitable for selecting the best model.   The question is:  we can apply $R^2$ and RSS to test data as well then why these measures are not suitable for selecting the best model?    Reference: An Introduction to Statistical Learning


How to calculate polygon areas and perimeters using QGIS?

Using QGIS, if I load a polygon layer and make a new column, how do I fill that column with the:   area of each polygon and another column with length of the perimeter of each polygon?


download windows 7 and windows 8 free and create a dvd with autorun

I want to download windows 7 and windows 8 properly and like to make a dvd which will help me to format windows 7 and windows 8 and also install window 7 and windows 8. I really very eager to know. I don't have any idea about this...  I want to format my system and install windows 8 but I don't have any dvd or downloaded file....


How to syncronize two animations without delays

I have one character idle animation running inside a game in a loop, over and over again. A a certain time I trigger another animation to be played, for the same character.  The second animation won't play immediately, as will be a discontinuity in my character animation. First I wait for the idle animation to finish and then I play my second animation. Now I have a smooth, continuous animation, BUT I have introduced a delay between my action and character animation.  If I play the second animation right away as it is triggered, the character animation won't be continuous and smooth.  I was thinking on breaking the idle animation in small pieces and also to have the same number of second action animations to match the last frame of the idle pieces. This won't solve the delay completely, only will minimize it a bit.  So it's a magic formula of how can I get rid of this delay?  Thanks.


What is the algorithm for finding the constraint force using the method of Lagrange multipliers?

Is there a general procedure one can follow to find the force of constraint for a classical holonomic system with the nonconstraint forces derivable from a potential energy $U\left(\mathbf{r}_1, \dots , \mathbf{r}_n, t\right)$ where $\mathbf{r}_1, \dots , \mathbf{r}_n$ are the positions of the particles in an inertial reference frame? It seems that one can always find the force of constraint using the method of  which I am not familiar with. If there is an algorithm for finding the force of constraint, what is it?


It is to be solved using trigonometry. I tried taking $x$, $y$ and $z$ as $\sin(a)$, $\sin(b)$ and $\sin(c)$ respectively, but could get no further.


Have root access, still permission denied upon using cat command

I was trying to install SSL certificate (GoDaddy), following their instructions  for nginx on Centos. The zip that I downloaded from GoDaddy contains 3 files - A Primary cert, an intermediate cert and a PEM file. I have root access for my Ubuntu VPS.  But when I use  sudo cat f84e19a2f44c6386.crt gd_bundle-g2-g1.crt >> coolexample.crt   I get  bash: coolexample.crt: Permission denied.


Via trial and error where I guess the number of statistical degrees of freedom, I have determined that the single variable linear regression "automatically" performed by Excel provides a p-value for the Y-axis-intercept  that is identical to the one that can be calculated by "explicit" Excel functions as follows:  2*T.DIST(0-t,n-2,TRUE)  (The p-value is for the null hypothesis that the Y-axis-intercept is zero.)  Here T.DIST is the function name and it is left tailed, hence the need to flip the sign on the t-statistic. This flip operation is visible as the 0-, or "zero minus".  Here t is the t-statistic.  Here n is the number of observations.  Here TRUE means the function operates in cumulative mode.  The second argument to the function is the statistical degrees of freedom. I guessed that the value would be n-1 which was wrong and then I guessed it would be n-2. Why should the statistical degrees of freedom be 2 less than the number of observations?


Consider the problem  \begin{equation} \min_{x\in X, y \in Y} f(x,y) \end{equation}  Can I solve the problem by iteratively solving the following two sub problems?  \begin{equation} x_{k+1} = \arg\min_{x\in X} f(x,y_k) \end{equation}  \begin{equation} y_{k+1} = \arg\min_{ y \in Y} f(x_k,y) \end{equation}  If yes, is there any books/papers talking about this kind of approach?  Thanks


Do rainbows have ultraviolet bands and infrared bands?

We have seen that rainbows looks so colorful as we are only able to see only the visible light. But Do they also have ultraviolet bands and infra-red bands, that we are unable to see? I know someone has already asked the same question but I am concern about the specific ultraviolet and infrared bands only rather than any other wavelength.


How can I open MS Word files in LibreOffice?

I would like to just use Ubuntu from now on, I don't want to go back to windows unless I have to. The problem being, I have a few documents that I need to work on in Microsoft Word. Can someone give me directions on how to open them through Ubuntu?


Does Calm Emotions still allow a saving throw?

Old dragons can frighten you:     Frightful Presence. Each creature of the dragon's choice that is within 120 feet of the dragon and aware of it must succeed on a DC 16 Wisdom saving throw or become frightened for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itselfon a success.   Calm Emotion can suppress this:     You can suppress any effect causing a target to be charmed or frightened. When this spell ends, any suppressed effeet resumes, provided that its duration   has not expired in the meantime.   Do you keep repeating the saving throw while the frightened condition is suppressed?


Assigning curl output to variable only gives last line

I am trying to do some tests to see if I can execute a shell script in a variables contents, similar to the Invoke-Expression function in powershell. I am getting the contents of the variable from curl: a=$(curl https://some.site/test.sh) however, whenever I print out the variable, it only gives the last line of the shell script. Is there something I'm missing here? I'm using echo $a to print the variable.


The bounty gambit: Is it misuse to add e.g. a 50-point bounty aiming to attract >5 upvotes?

On some of my posts (like ) I feel like it would be worthwhile playing the bounty gambit: add a bounty with the sole aim of getting those points back and more in upvotes.  E.g. a 50-point bounty gambit needs to attract >5 upvotes to succeed.  Question: Is it misuse to add e.g. a 50-point bounty aiming to attract >5 upvotes?  It's somewhat unscrupulous: I have no reason to do this other than potentially gaining more reputation than I lose, and perhaps it's a bit disruptive.


boolean d1 = false, d2 = false;  void func(boolean b) {     b = !b; }  void caller() {     func(d1);     System.out.println(d1);//I expect the value of d1 to be true }   How to change the value of d1 by passing d1's pointer?


`do-release-upgrade` is selecting 17.10 instead of 18.04

There was a bug fix awhile back for this problem: . My problem is the opposite of this bug fix.  On my test partition when I try to upgrade 16.04 to 18.04 and I run:  ~$ sudo do-release-upgrade Checking for a new Ubuntu release Get:1 Upgrade tool signature [819 B]                                                        Get:2 Upgrade tool [1,253 kB]                                                               Fetched 1,254 kB in 0s (0 B/s)                                                              authenticate 'artful.tar.gz' against 'artful.tar.gz.gpg'  extracting 'artful.tar.gz'   It is selecting Artful (17.10) and not Bionic (18.04).  If I change /etc/update-manager/release-upgrades last line from:  Prompt=normal   to:  Prompt=lts   and rerun do-release-upgrade I get this:  $ sudo do-release-upgrade Checking for a new Ubuntu release No new release found.   Assuming 18.04 has been properly populated into Canonical Repositories, what am I doing wrong???


Link minimize/maximize/on top between parent/child app windows

I run several apps split between two monitors and I'd love to have parent and child windows minimizing/maximizing and brought to top by each other as they behave in Windows. Anyone know if this is possible under Cinnamon?  Note that I'm NOT looking for a hotkey solution, this is about if an app window is active, it and any child windows - or the reverse, should be on top. And I get this might be impossible, but it's such a huge pain in my ***, windows not being linked. :(  And I have not found any solution anywhere. As a former Houdini LoCo TeamLeader, I have a fair bit of Linux experience, so it's not like I haven't digged into this pretty deeply before looking for help here.


A No-Nonsense Introduction to Quantum Field Theory

I found Sean Carroll's "A No Nonsense Introduction to General Relativity" (about page .  pdf ), a 24-page overview of the topic, very helpful for beginning study.  It all got me over the hump of learning the meaning of various terms associated with GR, most of which I had heard before without understanding.  It also outlined the most important examples.  Is there a similar document for quantum field theory, which presents the main equations, briefly describes the main ideas, and summarizes the most important applications and results so that the reader can feel the lay of the land before studying in depth?


Open-source software solutions for an Esri user

I am currently a student and have been using Esri software pretty much exclusively for my GIS needs. I occasionally use R for raster creation, especially as outputs of statistical models - which I usually bring back into Arc to work with.   I will be graduating in a year or so and may not continue to have access to ArcMap.  I am wondering what programs are recommended in the place of Arc. I currently use R for most of my raster work, but find that it can not always handle large rasters.  Of the other open source GIS software programs, is there one that has the most similarity to Arc (in capabilities and UI), or one (or some) that is easiest to learn coming from that background?  Is it common to use multiple programs for different functions, or do most people have only one or two programs they use?


I have connected to the correct folder on ArcCatalog.   Only the .tif files show on my ArcCatalog tree, but the .tlw files are in that folder too. How do I create a raster layer with this data?   I have tried to drag these over to ArcMap but it says the data is not georeferenced.  There are hundreds of tiles, is having them both in the same folder enough? How else do I get the program to recognise them as the georeferences for my raster .tif tiles?


Is there any UNIX variant on which a child process dies with its parent?

I have been studying the Linux kernel behaviour for quite some time now, and it's always been clear to me that:     When a process dies, all its children are given back to the init process (PID 1) until they eventually die.   However, recently, someone with much more experience than me with the kernel told me that:     When a process exits, all its children also die (unless you use NOHUP in which case they get back to init).   Now, even though I don't believe this, I still wrote a simple program to make sure of it. I know I should not rely on time (sleep) for tests since it all depends on process scheduling, yet for this simple case, I think that's fairly enough.  int main(void){     printf("Father process spawned (%d).\n", getpid());     sleep(5);      if(fork() == 0){         printf("Child process spawned (%d => %d).\n", getppid(), getpid());         sleep(15);         printf("Child process exiting (%d => %d).\n", getppid(), getpid());         exit(0);     }      sleep(5);     printf(stdout, "Father process exiting (%d).\n", getpid());     return EXIT_SUCCESS; }   Here is the program's output, with the associated ps result every time printf talks:  $ ./test & Father process spawned (435).  $ ps -ef | grep test myuser    435    392   tty1    ./test  Child process spawned (435 => 436).  $ ps -ef | grep test myuser    435    392   tty1    ./test myuser    436    435   tty1    ./test  Father process exiting (435).  $ ps -ef | grep test myuser    436    1     tty1    ./test  Child process exiting (436).   Now, as you can see, this behaves quite as I would have expected it to. The orphan process (436) is given back to init (1) until it dies.  However, is there any UNIX-based system on which this behaviour does not apply by default? Is there any system on which the death of a process immediately triggers the death of all its children?


I have tried reinstalling already. I also have allocated 7000MB of ram. It is also running fine on version 1.12  Here is my error log:


I have these variables in Leaflet map .. my difficulty is in visualizing the information using a popup in the Leaflet

var ProvinciasWMS = L.tileLayer.wms('http://localhost:8080/geoserver/Mocambique/wms?',{     layers:'Mocambique:Provincias_Moz',   version: '1.1.0',    transparent:'true',    format: 'image/png',    attribution: "myattribuition" }).addTo(map);  var DistritosWMS = L.tileLayer.wms('http://localhost:8080/geoserver/Mocambique/wms?',{     layers:'Mocambique:Distritos',   version: '1.1.0',    transparent:'true',    format: 'image/png',    attribution: "myattribuition" }).addTo(map);  var PostosAdministraticosWMS = L.tileLayer.wms('http://localhost:8080/geoserver/Mocambique/wms?',{     layers:'Mocambique:Moçambique_Distritos_e_Postos',   // styles:'Provincias',   version: '1.1.0',    transparent:'true',    format: 'image/png',    attribution: "myattribuition" }).addTo(map)  ; //I tried with this code, but the popup doesn't come out with information ... and it automatically downloads a file ... I don't know what the error is map.addEventListener("click", onMapClick); popup = new L.Popup({ maxWidth: 1000 }); function onMapClick(e) {   var latlngStr = "(" + e.latlng.lat.toFixed(3) + ", " + e.latlng.lng.toFixed(3) + ")";   var BBOX = map.getBounds()._southWest.lng + "," +              map.getBounds()._southWest.lat + "," +              map.getBounds()._northEast.lng + "," +              map.getBounds()._northEast.lat;   var WIDTH = map.getSize().x;   var HEIGHT = map.getSize().y;   var X = map.layerPointToContainerPoint(e.layerPoint).x;   var Y = map.layerPointToContainerPoint(e.layerPoint).y;   var URL = "http://localhost:8080/geoserver/Mocambique/wms?SERVICE=WMS&VERSION=1.1.0&REQUEST=GetFeatureInfo&LAYERS=" +     "Mocambique:Provincias_Moz,Mocambique:Distritos,Mocambique:Moçambique_Distritos_e_Postos" +     "&QUERY_LAYERS=" + "Mocambique:Provincias_Moz,Mocambique:Distritos,Mocambique:Moçambique_Distritos_e_Postos" +     "&STYLES=&BBOX=" + BBOX +     "&FEATURE_COUNT=5&HEIGHT=" + HEIGHT + "&WIDTH=" + WIDTH +     "&FORMAT=image%2Fpng&INFO_FORMAT=text%2fhtml&SRS=EPSG%3A4326&X=" +     X + "&Y=" + Y;   popup.setLatLng(e.latlng);   popup.setContent(     "<iframe src='" + URL + "' width='400' height='200'         frameborder='0'></iframe>"   );   map.openPopup(popup); }


Why doesn't Leia get Force training in the original movies?

Wouldn't taking down the Empire have been easier with two Jedi? I'm looking for in-universe reasons and storytelling explanations.


Determining whether Newton-Raphon's method will converge linearly or quadraticaly

So lets say you have the following two polynomials:  $$f_1(x)=(x-1)(x-2)^2$$  and  $$f_2(x)=(x-1)^2(x-2)$$  And we want know whether Newton-Raphon's method will converge quadraticly or linearly for finding the root $x=2$. How would I go by doing this?


Am I allowed to say something like "If you like my answer, please accept it and give it an upvote" in my answers or comments (specifically on MathSE)? I have read the rules of comments and answers and I found no rules against it. But I have never seen a person saying similar things, so I am pretty confused. I know it sounds like I answer questions and help people only for reputations, but it will be really frustrating if my (correct) answers are ignored. Therefore I have to interact with the OP and find out if she/he is satisfied with my answer. Thanks in advance. Any help will be appreciated.


I'm having trouble installing Oracle java jdk

I want to start learning Java, and I tried to download jdk and also other stuff that is helpful with Java, but I cant find the exact command to install oracle Java through terminal or in any other way. How can I do that?


I am interested in utilizing caret for making inferences on a particular data set. Is it possible to do the following:   produce coefficients of a glmnet model I trained in caret. I would like to use glmnet because of the inherent feature selection as I do not believe glm has it? other than the ROC metric, is there another metric that I can utilize to asses fit of the model? Such as adjusted $R^2$?   The purpose of this analysis is to derive some inference on the effects of particular variables, rather than for prediction. I just like the caret package because it's been easy to work with thus far using matrices.


beamer - change titlepage not to show details in headline/footline

I am using the Berlin theme to create a presentation with beamer. I like the fact that the headline and footline show the navigation, author, etc, but I would like to hide that information on the titleslide, as it is already displayed there, and have it appear again on all following slides.  I, however, do not want to lose the head- and footline themselves (using \setbeamertemplate{headline}{} for example just makes the whole headline disappear).   is somewhat similar to mine, but I tried modifying the code showed there, which did not work for me (see MWE below).  MWE:  \documentclass{beamer}  \title{Title} \author{Jane Doe} \institute{University of Foo} \date{\today}  % Beamer setup \usetheme{Berlin} \usecolortheme{spruce} \setbeamertemplate{navigation symbols}{}  \renewcommand*{\slideentry}[6]{} % hide subsection bullets and remove space  \begin{document}  %\setbeamertemplate{headline}{} \frame{\titlepage}  %\setbeamertemplate{headline}[headline theme] \section{Test} \begin{frame}   Test \end{frame}  \end{document}


How to fix ‘textview data ’ error in android

I want to add the random number to put on textview in Dialogfragment that gets from Timer Activity;  i try to change many times  protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_main);     txt_v=(TextView)findViewById(R.id.hello);     txtv_2=(TextView)findViewById(R.id.textV_2);     btn_str=(Button)findViewById(R.id.btn_give_str);      dia=new DiagFragment();      nBtb=(Button)findViewById(R.id.bt);     nBtb.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View view) {              dia.show(MainActivity.this.getSupportFragmentManager(), null);         }     });       timer.schedule(task, 1000, 5000);   }  TimerTask task = new TimerTask() {     public void run() {         if (dia!=null){              ((DiagFragment) dia).setData2(String.valueOf((Math.random() * 10)));          }     } };   public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {     View view=inflater.inflate(R.layout.list_dialog,null);     mContext=getActivity();      initView(view);      return view; }   public void initView(View view){     tx1=(TextView)view.findViewById(R.id.tv_1);      tx2=(TextView)view.findViewById(R.id.txv_2);  }    public void setData2(String string) {      str2=string;     Log.w(TAG, "setData2: "+string );     tx2.setText(string);   }  I can get data on diafragment, but I get an error when I add data to the TextVIew (tx2)  the error message is :     java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference         at com.soundgil.dailogonclicklistend.DiagFragment.setData2(DiagFragment.java:68)         at com.soundgil.dailogonclicklistend.MainActivity$2.run(MainActivity.java:54)


Should I flag multiple comments that essentially equate to "check my answer above/below"?

I've seen this situation arise a few times lately, and I find that it actually annoys me a bit.  Take  question as an example.  There are 3 comments posted by the same guy (not sure if I should link his profile here directly, or if that would be considered bad form) within the space of a minute that are all asking to check his answer.  One such comment is to the OP directly, and the other two are posted under other people's answers.  It's all pointless, and just adds to the noise, when anyone can read the whole question anyway.  It also makes me feel like the guy's more concerned with farming reputation, rather than creating an answer that is correct (which his isn't).  I could understand if he was pointing out a specific issue with someone's answer, or if it was a link to an answer on a different question, but it's neither of those.  Are these kinds of comments to be discouraged, and should I be flagging them?


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


Why do we lose the abelian property as soon as we reach exponentiation?

The first operation, addition, is abelian and so is multiplication. However, the next operation, exponentiation is not! Why is this? I understand that $2^3$ and $3^2$ are not equal but why do we suddenly lose this property after adding one other operation? Is there a property that we lose for tetration? Or Pentration (the next operation)? If so what property is lost at the nth operation?   Edit: I there anything lost when going from addition to multiplication?


what's the structure of this sentence "condition being, that..."?

What is the structure of this sentence (his only condition being, that they were new ones) in this context below (from perfume 2015 movie script)?  He did not differentiate between what are good smells from bad, at least not yet  he was very greedy.  the goal was to possess everything the world had to offer in odors. his only condition being, that they were new ones.


Is there any difference in meaning between "study/teach at this school" and "study/teach in this school"? Is one of them more usual? Example:   I have studied/taught at this school for ten years. I have studied/taught in this school for ten years.   I know the difference between "at school" and "in school" (without a demonstrative adjective) and that is outside the scope of the question.


How can I achieve dictionary headers for two page spreads in LaTeX

I would like to produce a document where I can display the first and last items of each two page spread in the headers of both the left and right pages. I know I can use \markboth{}{} to collect the usual form of marks that feed \leftmark and \rightmark. But that is limited to the text of one page at a time.  There doesn't appear to be a natural way to use the forward reference mechanism to do this, but there must be a trick, right?


Let $a_n$ be a sequence, such that $-5$ and $5$ are two partial limits of the sequence. In addition, for all $n$, $|a_{n+1}-a_n|<\frac{1}{n}$. Prove that $0$ is a partial limit of the sequence $a_n$.  The question is a bit unclear. The statement in the absolute value above suggests using Cauchy Sequences, but I don't know if and how to do it. $a_n$ does not converge since it has more than one partial limit. How can use it? Thanks!


Transfer files from Windows to Linux via Ethernet cable

I need to transfer a backup that I have on windows 10 PC to a PC with Ubuntu MATE.  I read online that it is possible to do this with a LAN cable. I tried connecting the 2 PCs directly with the LAN cable, but I don't know how to check if they are really connected. And I don't know how to access the windows files from Linux.  Can somebody please explain me step by step how to do it?


Bijection between an infinite set and its union of a countably infinite set

I have $A$ as an infinite set and $S$ as a countably infinite set, (so that means there exists a one-to-one correspondence between $S$ and $\mathbb{N}$).  How do I show that there always exists a bijection between $A$ and $A\cup S$? Can it be done by showing that there is a bijection from $A$ to $S$ or from $A$ to itself? I am lost on this one.   Oh, and can it be possible that there is no bijection if it is between $S$ and $A\cup S$? What about a map that maps $\mathbb{N}\to \mathbb{N}\cup\mathbb{R}$?


Item queue vs items queue? Files list vs File list?

My question is connected with programming. I'm not sure how to name my class.  Should it be ItemQueue or ItemsQueue? We are talking about queue, which stores many items.  We can add new ones or remove existing. Similary, what about file list/files list? I have always wondered which form should I choose.