I have a Lenovo G580 with 4 GB DDR-3 RAM and i5 3rd gen processor. I installed Ubuntu 18.04.5 LTS and it takes about a minute to boot. Is it a problem for me? If yes, how can I solve it? Is it booting slowly with respect to my hardware? My laptop is 7 yrs old and has a traditional HDD. I ran systemd-analyze command and got following output - Startup finished in 4.627s (kernel) + 1min 5.376s (userspace) = 1min 10.003s graphical.target reached after 1min 5.257s in userspace

There is a long time where SSD does nothing.   How can I find the fault and fix it ? Already checked /etc/fstab, no swap or anything wrong there (32GB of RAM, no swap)     [    2.173492] usb 2-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [    2.173497] usb 2-1.6: Product: DW375 Bluetooth Module [    2.173501] usb 2-1.6: Manufacturer: Dell Computer Corp [    2.173511] usb 2-1.6: SerialNumber: 7CE9D3C0713B [    2.323728] ata4: SATA link down (SStatus 0 SControl 300) [    2.441062] input: AlpsPS/2 ALPS GlidePoint as /devices/platform/i8042/serio1/input/input6 [    2.640309] ata5: SATA link down (SStatus 0 SControl 300) [    2.954947] ata6: SATA link down (SStatus 0 SControl 300) [    3.068090] clocksource: Switched to clocksource tsc [   36.584826] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null) [   36.726117] ip_tables: (C) 2000-2006 Netfilter Core Team [   36.732610] systemd[1]: systemd 237 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +AC L +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid) [   36.751996] systemd[1]: Detected architecture x86-64. [   36.753867] systemd[1]: Set hostname to <latitude-e5520>. [   36.868561] systemd[1]: Started Forward Password Requests to Wall Directory Watch. [   36.868594] systemd[1]: Reached target Remote File Systems. [   36.868751] systemd[1]: Created slice User and Session Slice. [   36.868869] systemd[1]: Created slice System Slice. [   36.868948] systemd[1]: Listening on udev Control Socket. [   36.868957] systemd[1]: Reached target Slices. [   36.868996] systemd[1]: Listening on udev Kernel Socket. [   36.895156] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro [   36.898185] lp: driver loaded but no devices found [   36.903941] ppdev: user-space parallel port driver


I am wondering how do i download ubuntu for the google nexus 5, and have they released an official os yet or is it still the beta?

With the announcement of the Ubuntu Phone OS I'd like to know what phone (and tablet) models are supported at this time.  Note from foss & Oli: We are making this the master question for all future "Will this work on <insert random tablet/phone/device here>?!" questions


On the , there is this line:      $p(\mathrm{height}|\mathrm{male}) = 1.5789$ (A probability distribution over 1 is OK. It is the area under the bell curve that is equal to 1.)    How can a value $>1$ be OK? I thought all probability values were expressed in the range $0 \leq p \leq 1$. Furthermore, given that it is possible to have such a value, how is that value obtained in the example shown on the page?


So 1.8 brought the ability to test for whatever the player currently has selected.  For example (maybe not exactly, but something like this),  testfor @a {SelectedItem:{id:minecraft:stick}}   How do you go about selecting based on this? I'm looking for something like this:  tp @a[SelectedItem:{id=minecraft:stick}}] ~ ~5 ~   I've tried many different permutations of syntax but the Command Block still outputs errors. Any ideas?

I'm building a CTF map of sorts, using command blocks in vanilla 1.8. I've discovered two commands for detecting if an item is in a players inventory:  /clear @a[team=Red] banner 4 0  /testfor @a[team=Red] {Inventory:[{id:"minecraft:banner"}]}  Those work fine, unless you want to perform a command ON the player carrying that item. For example: I want to cause the player who picks up a banner of the opposite team, to automatically equip that banner in their head slot with a command similar to this:  /replaceitem entity @a[???????] slot.armor.head banner 1 4  Can this be done? If not, is there a way to mark a specific player carrying an item using scoreboards?


Is there any way to disable the monitor going into sleep for Ubuntu Desktop/Server 16.04 LTS.  The internet is full of suggestions, i've tried them all but none work  Edit:   None of the solutions provided by the above link work for Ubuntu 16.04.

I am getting a web server setup at home on an older AMD 2400+ desktop. I have Ubuntu 11.04 installed and running however, after a time, I can no longer browse to the server. When I go to the keyboard and press a key, everything magically works again.   I have looked through the BIOS and I am not seeing any power saving features enabled. Is there anything like that in Ubuntu? Can it be disabled?  I don't have any GUI installed. This is console only.


My code  1st file:  data = {'school':'DAV', 'standard': '7', 'name': 'abc', 'city': 'delhi'} my_function(*data)   2nd file:  my_function(*data):     schoolname  = school     cityname = city     standard = standard     studentname = name   in the above code, only keys of "data" dictionary were get passed to my_function(), but i want key-value pairs to pass. How to correct this ?  I want the my_function() to get modified like this   my_function(school='DAV', standard='7', name='abc', city='delhi')   and this is my requirement, give answers according to this   EDIT: dictionary key class is changed to standard

I'd like to call a function in python using a dictionary.  Here is some code:  d = dict(param='test')  def f(param):     print(param)  f(d)   This prints {'param': 'test'} but I'd like it to just print test.  I'd like it to work similarly for more parameters:  d = dict(p1=1, p2=2) def f2(p1, p2):     print(p1, p2) f2(d)   Is this possible?


I want to be able to extract a flag (-q) and its value from a string. An example:   <string1> -q <value> <string2>  Here, <string1> and <string2> can contain any set of characters. To clarify <string1> and <string2> are placeholders for any possible string.  I want two things:   Be able to get the string  <string1> <string2> Be able to get the string <value>   I would also be able to do something similar for this input:  <string1> --all <string2>  where --all is extracted and <string1> <string2> is is kept.  Unlike the proposed solution in , I want to be able to extract a flag and its value and then keep the original command line input without the flag and that value.

Say, I have a script that gets called with this line: ./myscript -vfd ./foo/bar/someFile -o /fizz/someOtherFile  or this one: ./myscript -v -f -d -o /fizz/someOtherFile ./foo/bar/someFile   What's the accepted way of parsing this such that in each case (or some combination of the two) $v, $f, and  $d will all be set to true and $outFile will be equal to /fizz/someOtherFile?


I wanted to test newest lubuntu on my machine and booted it from usb. I didn't found the option to test and cancelled installation after choosing language and keyboard layout. Tried to remove usb stick and launch to my installed windows, but there is "no operating system" error on launch. How to fix this and recover my files?

I installed Windows on my computer, followed by an installation of Ubuntu. However, now I'm unable to boot into my Windows install.  What can I do to fix this?


If given a REST or SOAP webservices URL, how can we find the method it offers.  For ex: http://ipAddress:port/projectName/services

Can somebody explain what is  and what is  in plain english? And how Web Services work?


Convergence of $\displaystyle \sum_{1}^{\infty} \frac{1}{n^{\ln n}}$ How can we check the convergence of the given series . I tried a lot of series convergent tests ,but none of them seems to be  working, Please provide me a hint , so that i can proceed it further. Thank you.

$$\sum_{k=1}^{\infty} \frac{1}{k^{\ln k}}.$$  I have some problems with this sum, I have tried most of the common methods, such as the ratio/root test, integral test, etc. I do believe it looks like a problem easily solvable by a direct comparison with some p-series, however, I do not know how to formulate the inequality.   I did try using the common fact that $\ln(x) \ll x^p$ for large $x$ but that of course only bounds it from below with a convergent series saying nothing about ours. Also I tried rewriting the 'summand' as $e^{\ln(k^{\ln k})}=e^{\ln k \cdot \ln k}$ but this did not really yield anything.   Any answer or hint would be greatly appreciated.


I know what I am asking is a very basic example question. But I am trying to understand the application event using an example and it is not working. I tried to figure it out all by myself for a long time, but couldn't succeed. Can anyone kindly let me know what am I doing wrong. The code is as below     appEvent.evt   <aura:event type="APPLICATION" description="Event template"> </aura:event>      appEventChild.cmp   <aura:component >     <aura:registerEvent name='four' type='c:appEvent' />     <lightning:button label='Submit' onclick='{!c.show}' /> </aura:component>      appEventChildController.js   ({     show : function(component, event, helper) {         var evt = $A.get('e.c:appEvent');         //console.log(evt);         console.log('child called');         evt.fire();     } })      appEventParent.cmp   <aura:component >     <aura:handler name='four' event='c:appEvent' action='{!c.show}' />     <c:appEventChild /> </aura:component>      appEventParentController.js   ({     show : function(component, event, helper) {         console.log('parent is invoked');     } })      appEventApp.app   <aura:application extends='force:slds'>     <c:appEventParent /> </aura:application>   Thanks in advance.

I am trying to handle Application event in a listening component but it doesn't work for some reason. Please, help. I can't write in console log "here" in the end   Application  <aura:application extends="force:slds" access="global">     <c:SearchCmp/>     <c:DisplaySearchResultCmp/>    </aura:application>   Search Component  <aura:component implements="force:appHostable,flexipage:availableForAllPageTypes" access="global" >     <aura:registerEvent name="searchEvt" type="c:SearchEvent" />     <aura:attribute name="inputSearch" type="String"/>
         <lightning:input label="Search for books and writers:" value="{!v.inputSearch}"/>
     <lightning:button         label="Search"         onclick="{!c.getInput}" /> </aura:component>      Search Component Controller  getInput : function(component, event, helper) {     helper.fireAppAction(component, event); }   Search Component Helper  fireAppAction : function(component, event) {         var appEvent = $A.get("e.c:SearchEvent");         appEvent.setParams({             "searchQuery": component.get("v.inputSearch")             });         appEvent.fire();     }   Result Component  <aura:component implements="force:appHostable,flexipage:availableForAllPageTypes"  access="global" controller="SearchCmpController">      <aura:handler name="showResultList" event="c:SearchEvent" action="{!c.searchData}"/>     <aura:attribute name="resultWrappers" type="SearchCmpController.BookWriterWrapper[]"/>     <aura:attribute name="isEmptyResult" type="Boolean" default="true"/>

Results

No Results

  </aura:component>   Result Component Controller  searchData : function(component, event, helper) {         console.log("here");         component.set("v.resultWrappers", true);     }   Event "SearchEvent"  <aura:event type="APPLICATION">     <aura:attribute name="searchQuery" type="String"/> </aura:event>


Let's calculate the sun's surface temperature using the Stefan-Bolztman law in the form  $$\langle w\rangle=\frac{4\sigma}{c}T^4$$   where $\sigma=5.67\cdot10^{-8}$ W$\cdot$m$^{-2}$/K$^4$ is the Stefan–Boltzmann constant, $\langle w\rangle$ is the timep-average of the energy density of the sun's radiation, and $T$ the temperature we are looking for.  I am given the value $I_0=1.35$ kW/m$^2$ of the solar constant (the power per unit area of the solar radiation on a panel oriented perpendicular to the sun's rays in the high Earth atmosphere).    From electromagnetism we know that the magnitude of the Poynting vector is simply $wc$ and the power per unit area $I_0$ is the time-average of the magntitude Poynting. Hence $I_0=\langle w\rangle c$.  We thus have $T=\left(\dfrac{I_0}{4\sigma}\right)^{1/4}=277$ K  which is obviously false as the real value is $5760$ K.  What is wrong with this temperature calculation?

In , the following calculation for the temperature on the surface of the Sun is made:  $\sigma=5.67*10^{-8}\frac{W}{m^2K^4}$ (Stefan-Boltzmann constant)  $S = 1367\frac{W}{m^2}$ (solar constant)  $D = 1.496*10^{11} m$ (Earth-Sun average distance)  $R = 6.963*10^8 m$ (radius of the Sun)  $T = (\frac{P}{\sigma A})^\frac{1}{4} = (\frac{S4 \pi D^2}{\sigma 4\pi R^2})^\frac{1}{4}=(\frac{SD^2}{\sigma R^2})^\frac{1}{4} = 5775.8\ K$  (Wikipedia gives 5777K because the radius was rounded to $6.96*10^8m$)  This calculation is perfectly clear.  But in Gerthsen Kneser Vogel there is an exercise where Sherlock Holmes estimated the  temperature of the sun only knowing the root of the fraction of D and R.  Lets say, he estimated this fraction to 225, so the square root is about   15, how does he come to 6000 K ? The value $(\frac{S}{\sigma})^\frac{1}{4}$  has about the value 400. It cannot be the approximate average temperature  on earth, which is about 300K. What do I miss ?


When a subject is a whether-clause, it can be extraposed:     [Whether (or not) he comes] makes no difference.　　(basic version)   It makes no difference [whether (or not) he comes].　　(extraposed)   The logical subject is "extraposed", pulled out of its basic position and moved to the end of the sentence.  Since the sentence needs a grammatical subject, dummy it appears in its place at the beginning.    Can an if-clause be used as an extraposed subject, too?     *[If he comes] makes no difference.　　(basic version)   It makes no difference [if he comes].　　(extraposed)   Is the extraposed version okay?  It's unclear because the basic version seems to be ungrammatical.

Sentence 1: I don’t know if it won't rain tomorrow.  Sentnece 2: I don’t know whether it won't rain tomorrow.  Which sentence sound natural to you? Is there a rule that we should use "if" rather than "whether" when the object clause is negative?  Thank you very much!


The idea is explained   In simple words, Nginx Proxy plays the role of load balance and transmits the HTTP/HTTPS requests to servers.  If the number of request times within a certain period from an individual IP exceeds a threshold, it will trigger a captcha for the upcoming requests.  And the end-user must input the correct captcha code before he can continue to access the site.  Do you know any open source / free NGINX module for this usage? I searched on the Internet and here is one of them:  seems it needs modification.  Any suggestion / experience is welcome, thank you

This is a  about DoS and DDoS mitigation.   I found a massive traffic spike on a website that I host today; I am getting thousands of connections a second and I see I'm using all 100Mbps of my available bandwidth.  Nobody can access my site because all the requests time out, and I can't even log into the server because SSH times out too!  This has happened a couple times before, and each time it's lasted a couple hours and gone away on its own.  Occasionally, my website has another distinct but related problem: my server's load average (which is usually around .25) rockets up to 20 or more and nobody can access my site just the same as the other case.  It also goes away after a few hours.  Restarting my server doesn't help; what can I do to make my site accessible again, and what is happening?  Relatedly, I found once that for a day or two, every time I started my service, it got a connection from a particular IP address and then crashed.  As soon as I started it up again, this happened again and it crashed again.  How is that similar, and what can I do about it?


I have built a simple OpenLayers 3 map, see below for code:  HTML code:

   CSS:  #map{      width:100%;      height:800px; }          OpenLayers map initialization code:  var map;     function init(){     map = new ol.Map({         target:'map',         renderer:'canvas',         view: new ol.View({             projection: 'EPSG:900913',             center:[-8015003.33712,4160979.44405],             zoom:5         })     });       var newLayer = new ol.layer.Tile({     source: new ol.source.OSM()     });     map.addLayer(newLayer); }   Now my map loads just fine, what I would really like to do is, I would like to have only a specific area loaded, for which I need a bounding box, I would like to load the the bounding box for  area. But I am new to OpenLayers 3, so I tried and I just couldn't make the bounding box.  Can somebody help me make the bounding box please?

I have built a simple map using OpenLayers 3, have a look at the code below:  JavaScript code:  var map;  function init(){     map = new ol.Map({         target:'map',         renderer:'canvas',         view: new ol.View({             projection: 'EPSG:900913',             center:[-8015003.33712,4160979.44405],             zoom:5         })     });      var newLayer = new ol.layer.Tile({     source: new ol.source.OSM()     });      map.addLayer(newLayer);      /*          get and display extent          http://gis.stackexchange.com/questions/168590/how-to-get-extent-in-openlayers-3     */      var size = map.getView().calculateExtent(map.getSize());      console.log(size);      console.log(map.getSize());       /* ========================== */  }  /* function to remove layer */  function removeTopLayer(){     var layers = map.getLayers();     layers.pop(); }  /* ========================= */   /* swap layers function */  function swapTopLayer(){     var layers = map.getLayers();     var topLayer = layers.removeAt(2);     layers.insertAt(1, topLayer); }  /* =================== */   HTML code:

         <button style='position:absolute; left: 10px; top:30%' onclick='removeTopLayer()'>Remove Top Layer</button>         <button style='position:absolute; left: 10px; top:40%' onclick='swapTopLayer()'>Swap Top Layers</button>         Functioning link can be found .   Now I wanted to add a bounding box, so that when the map loads, it only loads for a specific area, I searched for examples online, but  they are either of OL2 or are about a user selecting a bound box dynamically, which is not my requirement. My requirement is pretty simple, all I want is the tiles for a specific bounding box to load instead of the map for the entire world to load.   I found the below method in OpenLayers 3.0 doc's , but I am not sure how to use it. :(  So now suppose I want to add a bounding box for THIS area, how would I go about doing it, using the boundingExtent method? Can anybody explain?   I have been scratching my head over this one for quite sometime now, can anybody help me achieve my goal of have only a specific bounding box load?


For example this equation (1): $$\sqrt{4x^2}-x+2=0$$ which then expanded to (2) $$3x^2+4x-4=0$$ and the roots via quadratic formula to (2) is $-2$ and $2/3$, but when put into (1), they don't agree with the first equation. What is the explanation behind this?

Why can't you square both sides of an equation?  I've been asked this many times and can never quite give a good, clear, concise answer (for beginning algebra students) in plain language. I just searched the web and still couldn't find a simple-to-understand answer for why squaring both sides gives you extraneous solutions.


My confused mind swapped old/new state in suggested edit and I've approved an edit that introduced rubbish when I was thinking I was approving an edit that removed rubbish. How can I undo this?

I accidentally clicked reject on the suggested edit on this question(). I can't find the button to change it to Approve?


I have this in GParted.  I want to extend my / filesystem (by eventually reducing the /home partition). I've seen , but the answers doesn't fit my need.

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


I have to prove that if $k \in 2 \mathbb N $ every $q+1$ divides $q^k-1$ and I really have trouble understanding how to do this.

How to prove $x^a-1\mid x^b-1 \iff a \mid b$, where $x \ge 2$ and $a,b,x \in \Bbb Z$.  I've tried the following in attempting to solve this:  $$a\mid b \Rightarrow aq=b \Rightarrow x^{aq}=x^b \Rightarrow x^ax^q=x^b$$  Because $x^q \in \Bbb Z$, it follows that $x^a\mid x^b$.  This is as far as I have gotten; any help getting further is appreciated.  Note: It may be that this identity is not true at all?


I've executed this command chown -r user:user /after which I can't perform any sudo command. Also I can't connect to any Network. I want return all back. But how?

I accidently ran  sudo chmod 755 -R /   instead of  sudo chmod 755 -R ./   I stopped it after few seconds, but now there is some problems such as  sudo: must be setuid root   How can I revert permissions back?


Simple maths with JS gets wrong when using decimals.   console.log(.6+.6+.6) //1.7999999999999998   One possible solution could be multiply each number by a million and then divide it by a million, but seems is not efficient at all.  console.log(((.6*1000000)+(.6*1000000)+(.6*1000000))/1000000) //1.8   Is there any "proper" way to sum with decimals in JS without a library?   If it isn't must recommendations are to use other libraries like  or   or  which one you recommend?  At the moment I believe would be better to multiply only by 1000000 and divide it later, this way I do not have to install a whole module for the "basic" operations... but again, basic operations in JS are not basic.

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


So, I had this book when I was about 6. I lost it around when I turned 8, (parents found it, and lets just say they weren't fans of SF) and haven't seen it since. Lately I've been wishing I could let my own kids read it, so I'm hoping for either some ID's on any of the stories, or the entire anthology.  The hardcover book I had came with a dust jacket (which didn't survive long under my tender mercies). The book itself was predominantly orange. The title almost certainly had the words science fiction, and possibly even for kids or children, and collection in it. But, that isn't a strong memory, so I cannot attest to that one.  There were a number of stories in this anthology (yes yes, I know that's redundant) but I can only think of enough information about a few of them to describe the stories.  In no particular order.  A story about two robots stranded on a planet due to two enemy ships fighting and then crashing, one has two heavy duty limbs, the other has 4 more flexible lighter duty limbs, from enemy factions. The humans (and aliens) are dead, and once the robots realize they do not have sufficient firepower to  hurt each other through their integral shields.  Soon they slowly begin playing a game that involves throwing rocks, and sort of make friends with each other.  Another story is about a mutiny on a star ship, where they force the captain to record all the possible voice commands to the ship computer, but they lack the "voice prints" to make new things, and once they have spaced him, they realize that him always addressing the computer very politely e.g. "Computer, please engage the port thrusters." vs "Computer, engage the port thrusters."  The mutineers then realize that without those commands they are also totally screwed.  Another story is three young boys playing a sort of mishmash game with various bats and racquets hitting a baseball around an alley. Then one kid gets sucked into a wormhole and dumped into some kind of interstellar gladiator pit, being forced to fight this giant scaly and scary looking guy who is wielding a big sword and spiked balls in chains. Kid realizes its a low G world, and that he's surprisingly strong compared to the other beings there.  When its the kid's turn, runs and dodges until the alien gladiator throws one of the spiked balls at him, and then uses the little sword they gave him to hit it back as hard as he can. Very David and Goliath. Alien falls, kid gets sent back to his point of origin with a broken scimitar looking alien sword as a souvenir.  The last one I can recall for sure (although IIRC its one of the first stories in the anthology).  Pilot gets in trouble, and compounds his trouble by jumping in his fighter and going awol. While he's out in the asteroid belt thinking things over, he realizes an entire armada of the enemy fleet is sneaking through the belt to launch a massive surprise attack on Earth.  He doesn't know what he can do about it, communications aren't an option (Sorry I don't recall why, but I was a kid). He ends up setting up his fighter to release every piece of firepower it has in one volley,  targeted at one of the largest ships in the center of the very tight stealthy formation. Its implied that sending this much firepower all at once might destroy his own ship in the process. The blast destroys the big ship, and then the blast waves end up creating a chain reaction of other ships being destroyed, resulting in the entire invading fleet being destroyed.  That's all the stories I am sure were in that anthology. Any help identifying either the stories, or the entire anthology would be appreciated.

I read this in the early to mid 80's.  It was a textbook sized hardcover anthology with color illustrations throughout.  Each story had a few images, some were full page illustrations.  The particular story I remember the most involved Earth survivors living underground.  Robots controlled the war from the surface.  A teenage girl and boy decided to sneak away to the surface as no one had been up there in a long time.  The kids discover greenery and a healthy environment, with rusted robot guardians.  The robots had been keeping the humans fooled that the war was still going on, and had kept them under the surface.  Mars had been wiped out from nearly the first volleys of missiles.    The robots judge the teenagers as worthy and let them remain on the surface.  The kids had silver jumpsuits that dissolved when they got wet.  The robot illustrations were blocky, almost weathered stone-like statues.  They had nearly spherical feet and square simple heads.  The faces had eyes and simple mouths.  -edit- The robots were similar in shape to the one in this picture, but smoother, and no arms.  The illustrations with them had the robots being several stories tall.  I kind of remember that the kids emerged from the belly of one or something like that.


thats almost litterally the question asked here but these don't seem to be working with 2.80   i have PNG, Rgba, 8bit, 15% compression  and the holdout material still renders as black.

I would like to render an animation as a series of .png images with transparent backgrounds for use in a video. Is this possible?


the formula for  by a conservative force is given by:  $$ F = -\nabla U(r), $$  which in one dimension may be simplified to:  $$ F = -\frac{dU}{dx} .$$  My question is how is it derived and why do we use a negative sign in the formula?. Is this by definition or is there some other reason?

My text book reads      If a particle is acted upon by the forces which are conservative; that is, if the forces are derivable from a scalar potential energy function in manner $ F=-\nabla V $.   I was just wondering what may be the criteria for force to be expressed as negative gradient of scalar potential energy and HOW DO WE PROVE IT?


When running the following script: #!/bin/bash set -e export X=$(false) echo That did not abort X=$(false) echo That did abort  It outputs: That did not abort  So export X= doesn't abort the execution, but X= does. Why does it not abort on an erroneous export X=, even though set -e is set?

I've run into some strange behaviour today:  #!/bin/bash set -ex export a=$(cat foo) echo "It's a living thing" b=$(cat foo) echo "This won't make it"   This won't stop on cat foo even though foo does not exist. But without the export, it fails. Why?


\documentclass[french]{beamer}  \usepackage[french]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc}  \definecolor{links}{HTML}{2A1B81} \hypersetup{colorlinks,linkcolor=,urlcolor=links}  \mode<presentation> {   \usetheme{Madrid}      % o1r try Darmstadt, Madrid, Warsaw, ...   \usecolortheme{beaver} % or try albatross, beaver, crane, ...   \usefonttheme{serif}  % or try serif, structurebold, ...   \setbeamertemplate{navigation symbols}{}   \setbeamertemplate{caption}[numbered] }   \setbeamertemplate{headline}{} \makeatletter \setbeamertemplate{footline} {   \leavevmode%   \hbox{%   \begin{beamercolorbox}[wd=.8\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%     \usebeamerfont{author in head/foot}%     \insertsectionnavigationhorizontal{.7\paperwidth}{}{}%   \end{beamercolorbox}%   \begin{beamercolorbox}[wd=.2\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%     \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{1.5em}     \insertframenumber{} / \inserttotalframenumber\hspace*{2ex}    \end{beamercolorbox}}%   \vskip0pt% } \makeatother  \usepackage{amsmath, amssymb,mathtools,marvosym,graphicx,MnSymbol,wasysym,epstopdf, scalerel,gensymb}     \usepackage{listings} \lstset {     language=[LaTeX]TeX,     breaklines=true,     basicstyle=\tt\scriptsize,     %commentstyle=\color{green}     keywordstyle=\color{blue},     %stringstyle=\color{black}     identifierstyle=\color{magenta}, }   \settowidth{\leftmargini}{\usebeamertemplate{itemize item}} \addtolength{\leftmargini}{\labelsep} \settowidth{\leftmarginii}{\usebeamertemplate{itemize item}} \addtolength{\leftmarginii}{1.5\labelsep}   %Pour le TITLEPAGE \title[Exposé]{CONCOURS} \subtitle{Exposé de candidature } \author[DSA]{Joe Smith} \titlegraphic{\vspace{-15pt}\includegraphics[height=0.1\textheight,keepaspectratio=true]{logopolito}\hspace*{3cm}~%   \includegraphics[height=0.1\textheight,keepaspectratio=true]{logopolito}    \hspace*{3cm}~%    \includegraphics[height=0.1\textheight,keepaspectratio=true]{logopolito} } \institute[AU]{{\Large Null part Université}\\\vspace{5pt}Blablabla\\\vspace{5pt}Blablabla\\\vspace{5pt}{Blablabla\\\vspace{5pt} Blabla\\Blablablabla}}  \date{}  \newif\ifshowtoc \showtoctrue% toggles to show the toc  \AtBeginSection{% \ifshowtoc \begin{frame}     \tableofcontents[currentsection, subsectionstyle=show/show/hide] \end{frame} \fi }  \begin{document}  \begin{frame}     \titlepage \end{frame}  \begin{frame}{Plan}   \tableofcontents[hidesubsections]   % You might wish to add the option [pausesections] \end{frame}  \section[CV]{Curriculum Vitae} \begin{frame}{Curriculum Vitae résumé} \begin{block}{Diplômes} \begin{itemize} \item  \end{itemize} \end{block} \begin{block}{Parcours post-doctoral} \begin{itemize} \item  \end{itemize} \end{block}   \end{frame}  \section{Enseignement} \subsection{Enseignements réalisés} \begin{frame}{Avignon Université, depuis se 2016, 563 heures Eq. TD}   \end{frame}  \begin{frame}{Avignon Université, Répartition des enseignements}  \end{frame} \subsection{Projet d'enseignement}  \section{Recherche} \subsection{Contexte} \subsection{Projets réalisés} \subsection{Projet de recherche} \section{Conclusion} \showtocfalse \section*{Remerciements} \begin{frame} \begin{block}{\MakeUppercase{Je vous remercie de votre attention.}} \end{block} \end{frame} \end{document}   1/ How can I have the total number of slides in the Title Slide ONLY?   2/ There is one slide with outline.  How can I have this slide not depicting the X/Y pages on the right corner ? I also want that this slide does not count to the total number of slides.  3/ Before each section a slide appears with current active section.  How can I have this slide (and the other slides highlighting future actual sections) not depicting the X/Y pages on the right corner ? I also want that the highlighting current actual slides do not count to the total number of slides.

I'm preparing a presentation and I would like to have transition slides without any noise, so I want to remove even the frame number (which I need for non-transition slides).  I modified the footer of the slides such that I insert the frame number instead of the page number:  \setbeamertemplate{footline}{%   \raisebox{5pt}{\makebox[\paperwidth]{\hfill\makebox[10pt]{\scriptsize{\color{blue}\insertframenumber}}\hspace{2mm}}}}   How can I turn off the frame number in these transitions slides.  The full MWE is as follows.  \documentclass[xcolor=dvipsnames, fleqn, usenames, table]{beamer}  \setbeamercovered{invisible}  \mode<presentation> {  \usetheme{default}  \setbeamertemplate{footline}{%   \raisebox{5pt}{\makebox[\paperwidth]{\hfill\makebox[10pt]{\scriptsize{\color{blue}\insertframenumber}}\hspace{2mm}}}} }  % comment to show navigation bar \beamertemplatenavigationsymbolsempty  \usepackage{color} \usepackage{lipsum}   \begin{document}  \begin{frame} \lipsum[2] \end{frame}   % transition slide \begin{frame}   {\huge     \begin{center}    {\color{blue} Transition}     \end{center}   } \end{frame}   \begin{frame} \lipsum[2] \end{frame}  \end{document}


I need to animate sliding gate following the path in two points where the wheels touch the rail. The rail is not straight.

I've searched google extensively on this. Can't seem to find an answer.   I know about spline IK, which is wonderful for conforming a row of bones to a path. But combining the armature object with a follow path modifier causes the point of origin to move, but the bones themselves stick to the beginning of curve.   Ultimately my goal is to make a creature like a snake or centipede follow a curve path, thus animating it fairly realistically ...


Can I install Window7 on an existing Ubuntu 14 laptop by shrinking the Ubuntu 14 partition, installing Windows 7 into the created freespace, and running Boot Repair to get the Grub boot menu with both Windows 7 and Ubuntu 14.  Here is the layout of my partitions as shown by GParted:  Partition     FileSystem   Size           Flags /dev/sda1   Fat32          512.00 Mig      boot  /dev/sda2   ext4           224.42 Gig /dev/sda3   linux-swap       7.97 Gig   Does this still look ok in terms of installing Windows after shrinking /dev/sda2?

I have Ubuntu on my laptop. Now I want install Windows 7 in a dual-boot. How can I do this? I can't lose my Ubuntu files, and I'm afraid that I might break . Go  for UEFI only!


Let $f$ a polynomial with real coefficients. There exists a constant $ c $ such that $f(x)=c $ for infinitely many numbers $x$. Prove $f$ is constant.   I have no idea how to do this. I started by denoting $f=a_n x^n+...+a_0$ but I have no idea how to continue.

This is my hypothesis and I am not sure if this is a valid one. I need a proof for this. My point is that infinite number of minimas are needed if this is valid, but I am lack of knowledge to prove it.   Any one has a proof ?   Hypotehis:  I want to show that a non-constant polynomial $P(x)$ where $x \in \mathbb{N}$ can not have infinite number of the same constant values in its range.   i.e. for some infinite set of distinct $x_i$  values, where $i \in \mathbb{N}$ and $c$ is a constant, $P(x_i) \ne c $


I have a question that I have asked in many Stack Exchange sites and it got deleted there, its format is the one that I am providing here:     Title: How to help a postgraduate student to write a book?        Body:   What is the best way to help a weak student who has already completed   her post-graduation but has also secured a result much worser than her   expected result during the completion of graduation, to write a good   quality book which shall be recommended to higher secondary level   students after it gets released.   Can you please suggest which Stack Exchange site this question can fit into?

I would like to ask a question about Java that doesn't have a specific answer. It's a question to see what people think and to share their opinion.    Will Stack Overflow tolerate this, or is there another Stack Exchange resource where I may ask a question like this?


Truncating a hash function's output should, in theory, not increase the likelihood of a collision more than you would expect based on the truncated output size. This makes sense when thinking about the the ideal hash function, a random function.  Since real-world hashes are not random functions, what properties of algorithms like sha2 make us comfortable with truncating, and what (popular) hashes exist out there that are known to have issues?

When I need to generate unique id's based on some information hashing is typical choice. However, sometimes that id needs to be of a particular size.  I've seen a lot of schemes (HMAC-MD5-96 in SSH, CGA in SeND for IPv6) that use a portion of a hash, so I'm thinking it might be alright to use it that way.    Which properties of a hash are preserved and which do not apply anymore?  Obviously, with less bits, the chance of collision goes up, but can I still rely on the partial hash for uniform character distribution?  What about the ?  I'm guessing that if a hash modifies the entire hash upon the smallest change to the input, that would imply that a portion of that hash would be equally well changed.  Am I thinking about this correctly?  Also, would these behaviors be different for different hashing algorithms?


I need convert strings to price format.   For example    150 = 150.00 1000 = 1'000.00 25500 = 25'500.00 1000.80 = 1'000.80 etc.    I wrote code  but not sure it is good:  function insert(str, index, value) {   return str.substr(0, index) + value + str.substr(index);  }  function convert(n) {   n = n.toString();   var length = n.length;   if (length < 4) {     n = insert(n, length, '.00');   } else if (length === 4) {     n = insert(n, 1, "'");     n = insert(n, length + 1, '.00');    } else if (length > 4) {     var floatFlag = false;     if (n.indexOf('.') > -1 || n.indexOf(',') > -1) {       floatFlag = true;       n = n.replace(/,/g, '.');      }     var thouthandNumer = n / 1000;     thouthandNumer = thouthandNumer | 0;     n = n.replace(thouthandNumer, thouthandNumer + "'");     if (!floatFlag) {       n = insert(n, length + 1, '.00');     }   } } var n = 15000 convert(n); //return 15'000.00   How can I convert strings in correct way? Thanks for help.

I would like to format a price in JavaScript. I'd like a function which takes a float as an argument and returns a string formatted like this: "$ 2,500.00"  What's the best way to do this?


I am trying to list the number of occurrences of lines that contain a certain word within a file. The words I am looking for are stored in a separate file that I'm looping through with this code: cat swissprot_anims.txt | while read line do     grep "$line" swissprot_list.txt | wc -l done  Where swissprot_anims.txt is the file containing the keywords in this format: BOVINE CHICKEN DROSOPHILA MELANOGASTER HUMAN MOUSE PIG RAT XENOPUS LAEVIS MELANOGASTER  And swissprot_list.txt is the file I'm combing for matches: Acetylcholine (muscarinic) receptors ====================================  ACM1_HUMAN (P11229)   MUSCARINIC ACETYLCHOLINE M1 [CHRM1] - HUMAN ACM1_MOUSE (P12657)   MUSCARINIC ACETYLCHOLINE M1 [CHRM1] - MOUSE ACM1_PIG   (P04761)   MUSCARINIC ACETYLCHOLINE M1 (BRAIN) [CHRM1] - PIG ACM1_RAT   (P08482)   MUSCARINIC ACETYLCHOLINE M1 [CHRM1] - RAT ACM2_BOVIN (P41985)   MUSCARINIC ACETYLCHOLINE M2 [CHRM2] (FRAGMENT) - BOVINE ACM2_CHICK (P30372)   MUSCARINIC ACETYLCHOLINE M2 [CM2] - CHICKEN ACM2_HUMAN (P08172)   MUSCARINIC ACETYLCHOLINE M2 [CHRM2] - HUMAN ACM2_PIG   (P06199)   MUSCARINIC ACETYLCHOLINE M2 (CARDIAC) [CHRM2] - PIG ACM2_RAT   (P10980)   MUSCARINIC ACETYLCHOLINE M2 [CHRM2] - RAT ACM3_BOVIN (P41984)   MUSCARINIC ACETYLCHOLINE M3 [CHRM3] - BOVINE ACM3_HUMAN (P20309)   MUSCARINIC ACETYLCHOLINE M3 [CHRM3] - HUMAN ACM3_PIG   (P11483)   MUSCARINIC ACETYLCHOLINE M3 [CHRM3] - PIG ACM3_RAT   (P08483)   MUSCARINIC ACETYLCHOLINE M3 [CHRM3] - RAT ACM3_CHICK (P49578)   MUSCARINIC ACETYLCHOLINE M3 - CHICKEN ACM4_BOVIN (P41986)   MUSCARINIC ACETYLCHOLINE M4 [CHRM4] (FRAGMENT) - BOVINE ACM4_CHICK (P17200)   MUSCARINIC ACETYLCHOLINE M4 - CHICKEN ACM4_HUMAN (P08173)   MUSCARINIC ACETYLCHOLINE M4 [CHRM4] - HUMAN ACM4_MOUSE (P32211)   MUSCARINIC ACETYLCHOLINE M4 [CHRM4] - MOUSE ACM4_RAT   (P08485)   MUSCARINIC ACETYLCHOLINE M4 [CHRM4] - RAT ACM4_XENLA (P30544)   MUSCARINIC ACETYLCHOLINE M4 - XENOPUS LAEVIS ACM5_HUMAN (P08912)   MUSCARINIC ACETYLCHOLINE M5 [CHRM5] - HUMAN ACM5_RAT   (P08911)   MUSCARINIC ACETYLCHOLINE M5 [CHRM5] - RAT ACM1_DROME (P16395)   MUSCARINIC ACETYLCHOLINE DM1 [ACRC] - DROSOPHILA   But when I run the script it is unable to find matches this way, even though when I replace $line with RAT for example it finds the correct number of matches so the RAT that is read in from the file is somehow not equivalent to the RAT that I put in manually even though the read command should strip the lines of all whitespace (besides the fact that there is no whitespace in my file). What am I doing wrong here?

When I open the file in Vim, I see strange ^M characters.  Unfortunately, the world's favorite search engine does not do well with special characters in queries, so I'm asking here:   What is this ^M character? How could it have got there? How do I get rid of it?


If we know that $\mathbb{N} \times \mathbb{N}$ is equivalent to $\mathbb{N}$ (same cardinal), can we conclude that the cartesian product $A \times B$ of two countable sets $A$ and $B$ is countable? In particular I already proved that a bijection $\phi: \mathbb{N} \times \mathbb{N} \rightarrow \mathbb{N}$ exists such that $\phi(x, y) = x +\frac{(x + y -1)(x + y - 2)}{2}$. So, presuming that I am writing a formal proof, how would I show that $A \times B$ is countable? Any assistance is much appreciated.

Is the finite Cartesian Product of Countable sets countable?  If possible, could you give a bijection that would work for any example?  Any help would be appreciated.


on my account page, a link said I'm in the top 2% this week for reputation.  I looked at the list and it shows me having a change of +49287 in reputation.  Yet I'm back to my humble 358.  Just curious about what happened.

What does the Change field represent on the  for SO? Refer to the highlighted areas in the image below:   Rank: the user's ranking for the selected time period (week, month, quarter, year) Change: +/- change representing... ??? Total Reputation: the user's total reputation [Time Period] Reputation: the user's reputation for the selected time period (week, month, quarter, year)  So what is the Change field measuring?


Can I uninstall a preloaded app I want to remove flip board but it pops up with a warning that it may cause problems with other apps?

Possible Duplicate:           There are alot of stock android apps on my phone like Email, News and Weather etc. that I dont use. I really need the space because my phone is running low on memory so I am wondering if there is a way to uninstall them because I dont see that option in the Manage apps section.


I have a Synaptics touchpad whose whole surface is clickable (so the whole surface physically moves down). In windows, I can configure it so pressing the pad with two fingers works like right-click and tapping the pad with two fingers works as middle-click. How can I configure it this way in Ubuntu 13.04?

I'm trying to setup my multi-finger tap in the following way:   Single finger - Left click Two fingers - Middle click Three fingers - Right click   What I currently have is:   Single finger - Left click Two fingers - Right click Three fingers - none   I've looked up several questions here on Ask Ubuntu, as well as the Ubuntu wiki on the subject (plus some general Google searching), but couldn't find anything to help me out. I know of xinput, but I don't know what to change there and how.  If anyone is able to point me to the right direction, I'd be grateful and award him with 25 shiny rep points, a large green tick mark, and some cookies.


I went through other links with a similar question, but couldn't find a solution that I wanted.  I am trying to provide documentation for my tool in PDF format. I have a bunch of .html files that reference each other using relative address. When I convert it to PDF, these references are not resolved to the pages within the PDF but refer to the .html file which is incorrect.  Are there any tools that achieve this facility, wherein one .html file which refers to other .html file when converted to PDF resolve to right pages within the PDF.

I have a HTML file that is using a style.css and has colors, ex.: <font style="background-color: red; color: white;"> FOO </font>  How can I "export" this local file on my Ubuntu 12.04 to a PDF? (the look and color should stay the same). I tried ex.: Ctrl+P -> print to PDF, but it didn't preserve the colours. I tried htmldoc with the --color option.. but it's the same problem.. It would be great to do this via the command line.


After switching to Ubuntu 13.04 64bit, AMD proprietary drivers stopped working on my laptop with AMD/Intel hybrid graphics.   I tried installing older version of Intel graphics as described in this thread .  This solution works great with one monitor, but when I try to connect second one while using discrete card, my screen starts flickering and glitching very hard. It's hard to explain, seems like it tries to intersect two screens.  I noticed, that command sudo aticonfig --set-pcs-str="DDX,EnableRandR12,FALSE" failed to deactivate RandR1.2, so there's no Display Manager in amdcccle. I tried to search a solution for disabling RandR, but found none working.  I had none of these problems on Ubuntu 12.10 64bit.  Any help is appreciated. Thank you.

On Ubuntu 12.04 my Sony Vaio VPCSE with Intel® HD Graphics 3000 and AMD Radeon™ HD 6630M worked fine with the Catalyst Control Center version 12.6. Also the switching between integrated and discrete graphic card was working.  In both cases, I followed this .  But it is not working on Ubuntu 12.10.   I tested the tutorial with the Catalyst Control Center from the Ubuntu Software Center, the version 12.8 and version 12.9. Always the same problem: After installation process I am able to boot in the login-screen. But after entering the password for my username, only the background-image appears. Unity seems not to be starting. I am only able to reach the context-menu by right clicking the mouse button.  I also tried , but is also does not work for me.  Any ideas what to do to fix this problem?   Update: Same problem on Ubuntu 13.04!  Update: Solution for 13.04 ist not working on Ubuntu 13.10!


If some question is of some rare topic, and no Stack Exchange site has this topic, is there some special Stack Exchange site meant for such rare "Misc" questions, like misc.stackexchange.com or other.stackexchange.com? If in the future new Stack Exchange site/community is created that covers this rare question's topic then somehow popular questions can be moved from Misc to that new site. I just thought that it would be nice to have some Misc site to at least post your question somewhere for history to have a chance for it to be answered, instead of not having such site and losing your question. It would also be nice for promoting the Stack Exchange platform and tools for those who prefers them, if such questions goes here instead of /.

I have an idea or subject that should have a Q&A, and want to propose a new site. How can I do this?  Related:


There is a content type in my website that has an image field. Some contents have images that are larger than 20MB.   I created an image_style called fp which scales and resizes the images in 800X400px it works well but when the browser displays this resized version it reports the following error     Allowed memory size of 134217728 bytes exhausted (tried to allocate 73834563 bytes) in modules/system/image.gd.inc on line 237   I know by increasing the memory_limit the problem will be solved (even though it is not recommended).  From what I know Drupal creates a distinct file of the original image for every image style, so in sites/default/files/styles/fp there is a resized version of the original image. It means when browser displays the resized image, the PHP needs no process to resize the image, it only displays another image which is the resized version. But why it displays the above error while it only needs to display an image (styled version) which its size is about 200kb ?

I have a issue with my Drupal installation, for example:   when I enable or disable the modules, It redirects me to a blank page, when I create a new content type and save it, redirects me to a blank page, when I add a new view and save it, it redirects me to a blank page, when I try to clear the cache, it redirects me back to a blank page, or in similar cases.   Basically all the confirmation pages redirect me to a white screen. When I refresh it again, it shows me the page. I tried to increase the PHP memory value but it doesn't help.  Are there any other solutions for this?  The error which I'm having:      Fatal error: Allowed memory size of 100663296 bytes exhausted (tried to allocate 8192 bytes) in sites/all/modules/views/plugins/views_plugin_localization_none.inc on line 1


My steps:   run the final pg_dumpall on a server prod-server-old Shut down prod-server-old for ever. copy the output to a different server (prod-server-new) Restore the db there. All traffic goes to prod-server-new now   How can I avoid modification to the database during pg_dumpall (between step1 and step2), so that modifications during this time cannot be lost?  In my case it is 100% OK to have a small down time.   There are several databases in the "cluster" (btw, I do not like the word "cluster". I guess most people think a "cluster" is a group of several computers, but in this case it means one Postgres server, which holds several databases).  My question was marked as possible duplicate to "Make Postgres database temporarily read-only (for performing volume snapshots)". I don't think it is a duplicate, since in my case is different since I don't ask for a temporary read-only state.

I want to do a final pg_dumpall on a server, then copy the output to a different server and restore the db there.  How can I avoid modification to the database during pg_dumpall?


I have Paint on Windows and I use it for combining images from different files. Say I have several pictures I want to combine into one. Is there any linux application that will do that?

I want something similar to "preview" in macs.  For example: I want an image editor that ONLY does simple adjustments like increase/decrease contrast, saturation, exposure, color tinting.... rotate, flip vertically, flip horizontally, make black and white, change size or format, crop.  THATS IT.  I know gimp can do all those things but its a bit overkill.  I just want to right click an image, open it with this magical program i just described, do a few quick adjustments, and then save and exit.  Nothing really fancy.  Anyone know of anything like this?  Btw I am using ubuntu 12.04 :) It rocks and I am glad I switched from mac, i just need to replace this one piece of software.


Let $f:\mathbb{R} \to \mathbb{R}$ be a continuously differentiable function. Show that if $f$ satisfies: $\frac{1}{2y} \int_{x-y}^{x+y}f(t)dt=f(x)$ for all $x\in \mathbb{R},y>0$ then there exists $a,b \in \mathbb{R}$ such that $f(x)=ax+b$ for all $x\in \mathbb{R}$ Attempt: Differentiating w.r.t $x$ on the given equation we get $\frac{f(x+y) - f(x-y)}{2y} = f'(x)$, i.e $f(x+y) - f(x-y) = 2f'(x)y$, Differentiating w.r.t $y$ we get $f'(x+y) + f'(x-y) = 2f'(x)$. Since $f'$ is differentiable, Again differentiating w.r.t $y$ we have  $\ \ f''(x+y) - f''(x-y) = 0 \implies f''(x+y) = f''(x-y)$ from here we can conclude that $f''$ is constant. But after integrating I think I might get a second degree polynomial. So I'm stuck here, Help me out. Any hints would be appreciated.

Here's the question:     Let $f:\mathbb{R}\to\mathbb{R}$ be a twice differentiable function   such that $$\frac{1}{2y}\int_{x-y}^{x+y} f(t) dt=f(x)\text{ for all  }x\in\mathbb{R},y>0$$ Show that there exist $a,b\in\mathbb{R}$ such   that $f(x)=ax+b$ for all $x\in\mathbb{R}$.     My attempt:  It immediately follows from Fundamental Theorem of Calculus that $f'(x)=\frac{1}{2y} \left( f(x+y)-f(x-y) \right)$ for all $x\in\mathbb{R},y>0$.  Let $x\in\mathbb{R}$ and $y>0$ be arbitrary. Then there is a $c\in(x-y, x+y)$ such that $\frac{f(x+y)-f(x-y)}{2y}=f'(c)$. But $\frac{f(x+y)-f(x-y)}{2y}=f'(x)$ hence,  $f'(x)=f'(c)$. But since $x$ was arbitrary, $f'(x)=f'(c)$ for all $x\in\mathbb{R}$. Hence, it follows again by Fundamental Theorem of Calculus that $f(x)=f'(c)x+f(0)$ for all $x\in\mathbb{R}$.    It appears to me as if my proof is correct but I never used the "twice differentiable part". Are there any flaws in my proof? Alternative proofs are welcome.    EDIT: As pointed out by , my proof is wrong. Hints would be appreciated.


Java is pass-by-value. This means that a called method acts on a copy of an object that was passed in, not on the original object.  If the object is not changed in the method, creating an actual copy seems unnecessary. So a compiler that implements the program to create such a copy would be pretty inefficient. Are all Java compilers (javac, gcj, ECJ, etc.) really doing that?  At least in the case where a parameter is declared final it would make a lot of sense not to copy.  EDIT  OK, so objects are not copied. I got confused because String is special in that it is copied (immutable). Sorry about my unknowings. Just to make up for it, here is a thousandth example of what happens when an object is passed:  import java.lang.System;  class C { int member; }  public class Test {     static void subMethod(C object) { object.member=1; }      public static void main(String[] args) {         C object = new C();         object.member=0;         subMethod(object);         System.out.println(object.member);  // prints "1"     } }

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


let $f: \Bbb R \to \Bbb R $ be defined by $f(x) = x^5 + 2x^3 + 3x^2 + 6$  Prove that function is continuous?  I am just stuck on the first step how to manipulate the function algebraically and then I can apply the $\epsilon - \delta$ definition. Any hints on how to that?? Thanks in advance!!

I am expected to prove by induction that any polynomial function is continuous. In which "direction" would you advise to make induction?   e.g. Taking $x^n$ and making induction on $n$ is not sufficient. By polynomial I understand, $\sum^{m}_{n=1}a_n x^n$. How do I prove it's continuity using epsilon delta notation? And further do I make an induction on $n$ only? Is not $a_n$ a variable as well?  It seems complicated. If you have any suggestion, I would be obliged.


See the accepted answer in this question:   There is a YouTube link at the end of the post which doesn't appear (neither the link or onebox).

On  question, there is a YouTube video in , on the Android app the video shows up as a white space. There is no indication that it is a video.  Would it be possible to show the video in the app or link to the video on YouTube instead?


I have a LDAP server request in my code. I open an connection with ldap_connect and check that returned descriptor is valid, but then I make a search request with ldap_search using the open descriptor. But sometimes due to the network failure or something else, ldap_search fails with warning Search: Can't contact LDAP server.  On my production server I treat all warnings as fatal errors, so the whole page render fails.  Should I just prepend ldap_search with @ and just check the value returned (I do check it now as well) or there's a better way to handle this?

In your opinion, is it ever valid to use the @ operator to suppress an error/warning in PHP whereas you may be handling the error?  If so, in what circumstances would you use this?  Code examples are welcome.  Edit: Note to repliers. I'm not looking to turn error reporting off, but, for example, common practice is to use  @fopen($file);   and then check afterwards... but you can get rid of the @ by doing  if (file_exists($file)) {     fopen($file); } else {     die('File not found'); }   or similar.   I guess the question is - is there anywhere that @ HAS to be used to supress an error, that CANNOT be handled in any other manner?


Let $X$ be a measurable subset of $\mathbb{R}$ with $m(X) < \infty$. Let $f \in L^\infty(X)$ with $||f||_\infty > 0$. I'm trying to show that $$\lim_{p \to \infty} \frac{||f||^{p+1}_{p+1}}{||f||_p^p} = ||f||_\infty.$$ So far, I've shown that $$\frac{||f||_{p+1}^{p+1}}{m(X)^{1/{(p+1)}}||f||_{p+1}^p} \leq \frac{||f||^{p+1}_{p+1}}{||f||_p^p}$$ so that when I take the $\liminf$ of both sides the left side tends to $||f||_\infty$. Now for the upper bound, let $\epsilon > 0$ with $\epsilon < ||f||_\infty$. Define $X_\epsilon = \{x \in X : |f(x)| > ||f||_\infty - \epsilon \}$ so that $m(X_\epsilon) > 0$. Then, we have $$\frac{||f||^{p+1}_{p+1}}{||f||_p^p} \leq \frac{m(X) ||f||_\infty^{p+1}}{m(X_\epsilon)(||f||_\infty - \epsilon)^p}.$$ I'm not sure how to proceed from here and would appreciate any help.

I am trying to show that for nonnegative $f$ on $\mathbb{R}$ if $||f||_1<\infty$, we have  $$ \lim_{p\uparrow \infty}||f||_p=||f||_\infty $$ I have tried to fiddle around with  $$ \left(\int_\mathbb{R}|f|^p|f|^{1-p} \right)^{1/p}<\infty $$ but haven't found a nice way to get an estimate on $\int_E|f|^p$ from this. Honestly I am pretty uncomfortable with non finite measure spaces.   Any hints would be awesome! Any references for problems similar to this would also be awesome.  edit: this is not a duplicate of the linked question as 1) my measure space is not finite, 2) my function is in $L^1$ and not necessarily in $L^\infty$


I just learned about compound interest, and I want to know if I understood it right: You buy a stock, and then you just keep it. And over time, you will just earn interest on your interest. Is that correct? You have to do nothing else than to just buy a stock and wait. Because in the videos I watched, compounding was explained as re-investing your interest, which implies that you have to take an action to re-invest it. But really, all you have to do is just not take the gained interest out, right? Because I mean, if you buy a stock at 100$ and it grows to 110$ and you sell the stock at 110$ just to buy it again at 110$ dollars (as to re-invest your money) you'd be at the same place as if you had just never sold the stock at 110$. Am I correct in my assumptions? Please explain it to me, because I'm confused.   In order to receive compound interest, all I have to do is buy a stock once and then wait, and the compound interest will accumulate automatically, without me having to do anything for it. Is this correct? Thank you for your answer!

I've read Einsteins quote stating "The most powerful force in the universe is compound interest." However, everywhere I read this is basically only possible with dividend paying stocks and then applying a dividend reinvestment plan.  Is there a re-investing strategy like this for non-dividend paying mutual funds (or even non-dividend paying stock)? I figured that the only way would be to sell all your funds and then buy x+1 funds again, but this would cause a big loss because of transaction costs from the broker.


I would like to know what settings should be changed on a new Windows 10 (Pro, but a canonical answer covering all editions would be nice) installation to disable as much of the built-in telemetry/tracking as possible.  I am looking for both GUI-solutions as well as GPO/Registry modifications.  The duplicate doesn't answer my question as I'm also looking for hidden settings only accessible via GPO/registry, like for example disabling the start menu's web search (impossible via the normal GUI after the anniversary update).  Regards.

Windows 10 introduced many new features which leak personal data to Microsoft, you can turn most of them off but it involves a lot of clicking and research because they are not all in one place.   A good list of these settings is at   I would like some sort of batch file that can change all these settings in one go.


How can i get rid of this problem. How to create multiple thread objects?  public void filterControl (int threadCount) {     this.rowCount = img.getHeight() / threadCount;     Thread[] t = null;      for (int i=0; i<threadCount; i++) {         t[i] = new Thread(new Runnable(){ //there is a NullPointerException              @Override             public void run() {                 filtering(startRow, rowCount);             }         });          t[i].run();     } }

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


$$ L = \lim_{n \to \infty}\prod_{i = 1}^{n}\left(\, 1 + {i \over n^{2}}\,\right) $$  Consider, $$ L_{1} = \prod_{i = 1}^{n}\lim_{n \to \infty}\left(\,1 + {i \over n^{2}}\,\right) $$ Q1. Is $L = L_{1}$ ?. Probably not but why can't I distribute the limit over product ?.  Q2. As I see it, each term in $L_{1}$ is individually $1$, therefore $L_{1} = 1\cdot 1\cdots \infty$ times $ = 1$. But if I write $L_{2} = \lim_{n \to \infty}\left(\, 1 + {1 \over n}\,\right)^{n}$ as $$ \lim_{n \to \infty}\left(\,1 + {1 \over n}\,\right)\cdot \lim_{n \to \infty}\left(\, 1 + {1 \over n}\,\right)\cdots \infty\ \mbox{times,} $$ I get $1$ again because each term goes to $1$. However, it is equal to $\,\mathrm{e}$. The mistake lies in the distribution of limit part. What is the mistake ?.  Please be elaborate because I can't get it ?.

I've got a limit which puzzle me several days. The question is  $$ \lim_{n\to+\infty} \prod_{k=1}^n\left(1+\frac{k}{n^2}\right).$$  Can you help me? Thank you in advance


I have been running into issues with my Ubuntu server (EC2 instance) where I installed NVM (Node Version Manager) under the default ubuntu user that Amazon provides you (Also the recommended installation) and then installed node with npm version via NVM to the following path,   $which node /home/ubuntu/.nvm/versions/node/v6.12.3/bin/node  $which npm /home/ubuntu/.nvm/versions/node/v6.12.3/bin/npm   with $PATH equal to:  PATH=/home/ubuntu/bin:/home/ubuntu/.local/bin:/home/ubuntu/.nvm/versions/node/v6.12.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin   but when I try to run sudo commands it is not picking up on npm or node and after some research I’m curious if it has to do with either of the following reasons or if it is something I’m not noticing.   Issue specific to Ubuntu where “node” is associated with a different package, so “nodejs” had to be used? nvm, node and npm need to be installed with sudo so path can be accessed by root   sudo errors:  sudo npm install sudo: npm: command not found  sudo node run sudo: node: command not found   Here are additional environment variables that might be helpful:  HOME=/home/ubuntu NVM_DIR=/home/ubuntu/.nvm USER=ubuntu   Error message sent from deployment logs:  [stderr]/usr/bin/env: ‘node’: No such file or directory

I ran into a problem today when I decided to use npm update -g in a nodejs app directory. This was a bad decision, because it caused me to run into a .   The solution is to reinstall nodejs and npm. Unfortunately when I go to install npm using sudo apt-get install npm it doesn't work.  The full error in the terminal is here:  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that  some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies:  npm : Depends: nodejs but it is not going to be installed    Depends: node-abbrev (>= 1.0.4) but it is not going to be installed    Depends: node-ansi but it is not going to be installed    Depends: node-archy but it is not going to be installed    Depends: node-block-stream but it is not going to be installed    Depends: node-fstream (>= 0.1.22) but it is not going to be installed    Depends: node-fstream-ignore but it is not going to be installed    Depends: node-github-url-from-git but it is not going to be installed    Depends: node-glob (>= 3.1.21) but it is not going to be installed    Depends: node-graceful-fs (>= 2.0.0) but it is not going to be installed    Depends: node-inherits but it is not going to be installed    Depends: node-ini (>= 1.1.0) but it is not going to be installed    Depends: node-lockfile but it is not going to be installed    Depends: node-lru-cache (>= 2.3.0) but it is not going to be installed    Depends: node-minimatch (>= 0.2.11) but it is not going to be installed    Depends: node-mkdirp (>= 0.3.3) but it is not going to be installed    Depends: node-gyp (>= 0.10.9) but it is not going to be installed    Depends: node-nopt (>= 2.1.1) but it is not going to be installed    Depends: node-npmlog but it is not going to be installed    Depends: node-once but it is not going to be installed    Depends: node-osenv but it is not going to be installed    Depends: node-read but it is not going to be installed    Depends: node-read-package-json (>= 1.1.0) but it is not going to be installed    Depends: node-request (>= 2.25.0) but it is not going to be installed    Depends: node-retry but it is not going to be installed    Depends: node-rimraf (>= 2.2.2) but it is not going to be installed    Depends: node-semver (>= 2.1.0) but it is not going to be installed    Depends: node-sha but it is not going to be installed    Depends: node-slide but it is not going to be installed    Depends: node-tar (>= 0.1.18) but it is not going to be installed    Depends: node-which but it is not going to be installed E: Unable to correct problems, you have held broken packages.   What can I do to get npm properly installed and running again?  Thanks.


I did MD5 Password hash but since it is that MD5 password Hash is crackable is there any other built in password hash function in PHP?  Which is easy to implement and no need for other libraries.  Big thanks in advance

It is currently said that MD5 is partially unsafe. Taking this into consideration, I'd like to know which mechanism to use for password protection.  This question,   suggests that hashing multiple times may be a good idea, whereas  suggests using salt.  I'm using PHP. I want a safe and fast password encryption system. Hashing a password a million times may be safer, but also slower. How to achieve a good balance between speed and safety? Also, I'd prefer the result to have a constant number of characters.   The hashing mechanism must be available in PHP It must be safe It can use salt (in this case, are all salts equally good? Is there any way to generate good salts?)   Also, should I store two fields in the database (one using MD5 and another one using SHA, for example)? Would it make it safer or unsafer?  In case I wasn't clear enough, I want to know which hashing function(s) to use and how to pick a good salt in order to have a safe and fast password protection mechanism.  Related questions that don't quite cover my question:


If I want to make a bar across h I just use \hbar. But what shall I do if I want to make a line across \lambda like on the picture?    PS: I use the the book document class.

I would like to be able to add the symbol "lambda-bar" (see below) into an equation. How can I do this?


I want to hide all those lines, only keeping the main curve while working, how can i do that?

In this example I use Nurbs curves to create shoe laces and it becomes quite hard to operate curves in the regions of loops and knots because of the curves' tilt/scale guides (not sure how to call them). I would really like to hide these guides when I edit curves. Is it possible?


Unfortunately I changed my Ubuntu 18.04 sources.list. How can I restore sources.list file in my Ubuntu software?  I got these errors while editing sources.list:  $ sudo gedit /etc/apt/sources.list  ** (gedit:3491): WARNING **: 10:51:37.148: Set document metadata failed: Setting attribute metadata::gedit-spell-language not supported  ** (gedit:3491): WARNING **: 10:51:37.148: Set document metadata failed: Setting attribute metadata::gedit-encoding not supported  ** (gedit:3491): WARNING **: 10:51:52.500: Set document metadata failed: Setting attribute metadata::gedit-position not supported  $ sudo apt-get upadate E: Invalid operation upadate

There are now errors when updating and I cannot install most software due to a corrupted  /etc/apt/sources.list   file. Is there a copy I can download to replace it?  The file would be for Ubuntu 12.04 (Final Beta) in the United States.


I run a simple Python script in a docker container (single process, no multiprocessing or multithreading).  When looking at it with ps (one instance):  root@srv ~# ps -ef | grep homemonitor root     17858 17824  0 19:43 ?        00:00:00 /bin/sh -c python3 homemonitor.py root     18080 17858 12 19:43 ?        00:03:04 python3 homemonitor.py   When looking at it with top (one instance):  (...) 26307 root      20   0 2782476  37300  10868 S   4.3  0.5   0:04.56 python3 homemonitor.py (...)   When looking at it with htop (multiple instances, among other processes I removed here):  31230 root       20   0 7855M     0     0 S  0.0  0.0  0:00.23 python3 homemonitor.py  6270 root       20   0 7855M     0     0 S  0.0  0.0  0:00.42 python3 homemonitor.py  4246 root       20   0 7855M     0     0 S  0.0  0.0  0:00.14 python3 homemonitor.py 26351 root       20   0 7855M     0     0 S  0.0  0.0  0:00.18 python3 homemonitor.py  6349 root       20   0 7855M     0     0 S  0.0  0.0  0:00.42 python3 homemonitor.py 22836 root       20   0 7855M     0     0 S  0.0  0.0  0:00.48 python3 homemonitor.py 14805 root       20   0 7855M     0     0 S  0.0  0.0  0:00.38 python3 homemonitor.py  4953 root       20   0 7855M     0     0 S  0.0  0.0  0:00.30 python3 homemonitor.py 22400 root       20   0 7855M     0     0 S  0.0  0.0  0:00.37 python3 homemonitor.py  6278 root       20   0 7855M     0     0 S  0.0  0.0  0:00.15 python3 homemonitor.py  6512 root       20   0 7855M     0     0 S  0.0  0.0  0:00.41 python3 homemonitor.py 23500 root       20   0 7855M     0     0 S  0.0  0.0  0:00.47 python3 homemonitor.py 16153 root       20   0 7855M     0     0 S  0.0  0.0  0:00.08 python3 homemonitor.py 22151 root       20   0 7855M     0     0 S  0.0  0.0  0:00.08 python3 homemonitor.py  9906 root       20   0 7855M     0     0 S  0.0  0.0  0:00.30 python3 homemonitor.py 17790 root       20   0 7855M     0     0 S  0.0  0.0  0:00.28 python3 homemonitor.py  4702 root       20   0 7855M     0     0 S  0.0  0.0  0:00.14 python3 homemonitor.py 23645 root       20   0 7855M     0     0 S  0.0  0.0  0:00.37 python3 homemonitor.py  5108 root       20   0 7855M     0     0 S  0.0  0.0  0:00.31 python3 homemonitor.py 14530 root       20   0 7855M     0     0 S  0.0  0.0  0:00.38 python3 homemonitor.py 26430 root       20   0 7855M     0     0 S  0.0  0.0  0:00.18 python3 homemonitor.py  7837 root       20   0 7855M     0     0 S  0.0  0.0  0:00.30 python3 homemonitor.py 10054 root       20   0 7855M     0     0 S  0.0  0.0  0:00.23 python3 homemonitor.py 21461 root       20   0 7855M     0     0 S  0.0  0.0  0:00.35 python3 homemonitor.py 18889 root       20   0 7855M     0     0 S  0.0  0.0  0:00.27 python3 homemonitor.py 30939 root       20   0 7855M     0     0 S  0.0  0.0  0:00.16 python3 homemonitor.py   Why is htop display do different? What do the multiple processes actually mean in that display?

In ps xf  26395 pts/78   Ss     0:00  \_ bash 27016 pts/78   Sl+    0:04  |   \_ unicorn_rails master -c config/unicorn.rb                                            27042 pts/78   Sl+    0:00  |       \_ unicorn_rails worker[0] -c config/unicorn.rb                                           In htop, it shows up like:   Why does htop show more process than ps?


When I take a hot shower, there is normally a fair amount of steam. However, I don't think the water coming out of the shower-head is actually boiling (unless I am mistaken).      Why is there water vapor in a hot shower?

When the sun is out after a rain, I can see what appears to be steam rising off a wooden bridge nearby. I'm pretty sure this is water turning into a gas.  However, I thought water had to reach 100 degrees C to be able to turn into a gas.  Is there an edge case, for small amounts of water perhaps, that allows it to evaporate?


Iam trying to calculate new date based on  provided  no. of days to base date(i.e current date or any specific date). Linux shell can do by date -d "2020-10-19 30 days" 2020-10-19  is base date 30 is new date after 30 days.

I'm working with a date in this format: yyyy-mm-dd.  How can I increment this date by one day?


I want to make a perfectly equilateral triangle but with curved corner and curved sides (not just rounded corners)   I tried to use the polygon tool with the "Smooth Corners" option and got this:    It's close to what I want, but I want to be able to control the roundness more. I want it to be a bit more sharper  How do I do this while keeping it still perfectly equilateral?  I'm using Photoshop CC 2014, btw.  Is this even possible in Photoshop? I'm open to suggestions on using other programs if it is impossible  Any help will be appreciated!

I know you can create a rounded-corner rectangle; but, how do you create a triangle with rounded corners in Photoshop?  I am actually interested in making it from scratch, not basing it on a custom shape that is available in Photoshop. Thanks.


When resolving ns1.jiasule.net., here is the response from e.gtld-servers.net. (192.12.94.30) - dig @192.12.94.30 ns1.jiasule.net to reproduce: ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ;; QUESTION SECTION: ;ns1.jiasule.net.       IN  A  ;; AUTHORITY SECTION: jiasule.net.        172800  IN  NS  ns1.jiasule.net. jiasule.net.        172800  IN  NS  ns2.jiasule.net.  ;; ADDITIONAL SECTION: ns1.jiasule.net.    172800  IN  A   113.207.76.78 ns1.jiasule.net.    172800  IN  A   117.21.219.80 ns2.jiasule.net.    172800  IN  A   113.207.76.78  I'm asking A record for ns1.jiasule.net., and it tells me the name server for ns1.jiasule.net. is ns1.jiasule.net. with the A record on the ADDITIONAL SECTION. I do not understand why it does not return directly the A record in the ANSWER? I understand the role of the TLD servers is to provide the authority for the domain requested, but in this case, it would mean "Go and ask to the IP of ns1.jiasule.net. to ns1.jiasule.net.?

This is a  about DNS glue records.   What exactly (but briefly) is a DNS glue record?  Why are they needed and how do they work?


Have never really handled that, cause have no clue how to start with it (the ansver seems really long and no hints like $\tan(x/2)$ in the final answer).  $$\int \sqrt{\tan x}\,dx$$

I have been having extreme difficulties with this integral. I would appreciate any and all help. $$ \int \sqrt{\tan x} ~ \mathrm{d}{x}. $$


How can I remove offensive emojis from my keyboard.  I do not want to remove them all, only those I find offensive.   I could also see someone using this to reduce the volume or make it easier to prefer or select a subset of emoji.   Can I visually suppress or remove one or more emoji?

I would like to be able to delete certain emojis on my keyboard. How do I do that?


I'm planning to stay in Kiev, Ukraine for a week and would like to have mobile Internet. I will need to use a total of 500 MB during that time.   What is currently the cheapest sim-card/plan for my purposes? Preferably one I could buy at Borispol airport.

Next month I am traveling to country X, where I would need Y minutes of calls, Z text messages and most importantly Q megabytes of data. How can I find the cheapest/most reliable SIM card for my needs?


I have some Javascript code that executes a function whenever an element with a condition is clicked. The problem is that if a new element of that kind is added later on, it won't detect it by the code. This is my code:  $("li[data-episode]").on('click', function () {     setTimeout(Aradmey_Later, check_timeout); });   How can I fix it so it always works, even on future elements?

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


I am getting a weird null pointer, If I run the project from netbeans, the programs works just fine, but when I run the compiled jar I get a weird NullPointer whe I'm trying to load the JasperReport I have this class that generates the report, by obtaining an InputStream from within the jar, generates the parameters Map, and selects the appropiate Connection: class ImpresorRemesas {  void mostrarRemesa(String remesa) {     String titulo = String.format("Remesa %s", remesa);     InputStream reporte = getClass().getResourceAsStream("/com/ttracasa/remesas/remesa.jasper");     Map parametros = new HashMap();     parametros.put("remesa", remesa);     Image logo = new ImageIcon(getClass().getResource("/com/ttracasa/remesas/imag_tracasa.jpg")).getImage();     parametros.put("logo", logo);     ReporteJasper.mostrar(titulo, reporte, parametros, Remesas.connection); } }  Notice that I also parametrize resources from within the jar to the Map, I don't think is relevant but nevertheless. This InputStream, Map and Connection are passed along to a static utility class, which loads the JasperReport , fills the JasperPrint and displays the JasperViewer public static void mostrar(String titulo, InputStream stream, Map<String,Object> parametros, Connection connection) {     try {         JasperReport jasperReport = (JasperReport) JRLoader.loadObject(stream);         JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parametros, connection);         JasperViewer jasperViewer = new JasperViewer(jasperPrint, false);         jasperViewer.setTitle(titulo);         jasperViewer.setVisible(true);     } catch (JRException ex) {         UtileriaGui.mensajeError(ex, null);     } }  If I run the project from Netbeans, it works as expected, however, after I compile the jar, I get this NullPointerException. java.lang.NullPointerException at java.io.ObjectInputStream$PeekInputStream.read(Unknown Source) at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source) at java.io.ObjectInputStream$BlockDataInputStream.readShort(UnknownSource) at java.io.ObjectInputStream.readStreamHeader(Unknown Source) at java.io.ObjectInputStream.<init>(Unknown Source) at net.sf.jasperreports.engine.util.ContextClassLoaderObjectInputStream.<init>(ContextClassLoaderObjectInputStream.java:56) at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:277) at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:262) at com.ttracasa.utilerias.ReporteJasper.mostrar(ReporteJasper.java:36) ...  I thought it might have something to do with the jar, but I checked and the resources are inside at the expected path. I also thought it might have to do with my path use of slashes (i.e. /com/ttracasa/etcetera instead of /com\\ttracasa\\etcetera) but does not seems to be the case, it might have something to do with the InputStream being mishandled before JRLoader works with it, but why? what am I missing? it works like a charm within the IDE. The class ImpresorRemesas and my utils are in different jar files, but I dont think it should make any difference. According to  this method returns null if no resource with this name is found. I checked and this seems to be the case, when running from inside the jar the resource can't be found because if I check the stream it is in fact NULL Perhaps it has something to do with how the manifest is being generated:   Manifest-Version: 1.0 Ant-Version: Apache Ant 1.10.4 Created-By: 1.8.0_201-b09 (Oracle Corporation) Class-Path: lib/mysql-connector-java-5.1.23-bin.jar lib/jcalendar-1.4.  jar lib/jasperreports-6.9.0.jar lib/commons-beanutils-1.9.3.jar lib/c  ommons-collections4-4.2.jar lib/commons-digester-2.1.jar lib/commons-  logging-1.1.1.jar lib/groovy-all-2.4.16.jar lib/itext-2.1.7.js6.jar l  ib/poi-4.0.1.jar lib/jfreechart-1.0.19.jar lib/UtileriaGeneral.jar li  b/Permisos.jar lib/Oficinas.jar Main-Class: com.ttracasa.remesas.Remesas

I was loading an image resource with the following code and it works fine from my dev environment (netbeans) but threw an exception as soon as it ran from the desktop.  new ImageIcon(Images.class.getResource("images/highlighter24.gif"));   I traced it down to my file having different case than in the code.  Fine, my bad, but why the inconsistent behavior?  Gremlins?  Note: I'm running on windows before you ask.


Every once in awhile, I find myself needing to list files in a directory that I don't have execution permission on. So I do a sudo:  >sudo ll /opt/mydir [sudo] password for civfan: sudo: ll: command not found   And then I say, "D'oh!" and switch to ls. And then remember I really wanted ls -l. And then remember I REALLY wanted ls -al.   Can someone save me from myself?  I see that ll is an alias for my user:  >alias ll alias ll='ls -alF'   How do I make sudo ll work? Presumably I need an alias for root... if so, how do I set aliases for root?  EDIT: My guess is trying to run sudo ll is so common that this question deserves to stand alone from the suggested duplicate.  UPDATE: root already has an ll alias!   civfan@civfan:~>sudo -s root@civfan:~>alias ll alias ll='ls -alF'   And yet sudo ll doesn't work...  UPDATE 2 - answer:  The answer in the  fits my workflow the best, and I don't see any downsides. I wanted to note it here:  alias sudo="sudo "

I installed Sublime Text 3 in Fedora 20 which has got GNOME, as I couldn't get it being called from terminal I created a .bash_aliases file which a line like this:  alias sublime='sublime_text'   And so also added the sublime_text file location to the PATH by editing .bashrc file adding:  export PATH=$PATH:/usr/local/share/applications/sublime-text-3/   However, when I want to edit any file for which I might get sudo privilege first I want to do:  sudo sublime sudoLikelyFile   or  sudo sublime_text sudoLikelyFile   However I'm getting:  sudo: sublime: command not found   How can I work around for this?


What are the steps when I travel from U.A.E to Philippines with my Indian passport where my residence visa from U.A.E was stamp and I have Philippine passport with no visa stamp on it.   What are the documents I need to carry with me?  I don't want any hassles when I travel, so urgently need some advice.

I am a citizen of two different countries, and have two passports.  How should I use my passports when traveling?


I am relatively new to Git Bash.  Given below is the script that I am trying to execute. I saved the given below 3 lines in a file sshExec and tried running it in Git Bash. The first two line ran as expected but 3rd line didn't run. There is no error or warning as well. So there was no directory change as I wished my script to do.   Why is it that "cd anyPath" is not working in script?    eval "$(ssh-agent)" ssh-add C:\\Users\\xyz\\.ssh\\id_rsa cd D:/Repositories/RELEASE_2017_BugFixing/deltagen_teamlogic

I'm trying to write a small script to change the current directory to my project directory:  #!/bin/bash cd /home/tree/projects/java   I saved this file as proj, added execute permission with chmod, and copied it to /usr/bin. When I call it by: proj, it does nothing. What am I doing wrong?


I wanna develop an application which has a database which is filled with data. How should I fill the database with data? which of the following should I do? 1- Write a little android app and fill the database and somehow get access to the database file and put that in the app. (I think this is bad) 2- Use some kind of sqlite software to fill the database file and then access the database file and put that in the app.(Again I think this is bad) 3-Any other method.

If your application requires a database and it comes with built in data, what is the best way to ship that application? Should I:   Precreate the SQLite database and include it in the .apk? Include the SQL commands with the application and have it create the database and insert the data on first use?   The drawbacks I see are:   Possible SQLite version mismatches might cause problems and I currently don't know where the database should go and how to access it. It may take a really long time to create and populate the database on the device.   Any suggestions? Pointers to the documentation regarding any issues would be greatly appreciated.


I am working with iCloud, iPhone and Macbook Pro on Yosemite.  I receive ICS calendar invites via mail from a user using Outlook. When I click on the ICS file in the mail, it opens and I can add it to my calendar without a problem. It also syncs nicely on all my devices.  However, the sender of the invite does not get a confirmation, in the meeting properties I'm shown as "did not reply". When I open the invite in my calendar, I have no option to accept or send a notification.  In short: ICS invites are added to my calendar but the organizer does not receive a notification.  How can I send an accept notification?


I am trying to solve the following exercise from Kai Kai Chung's A Course in Probability Theory: If $E(X^2)=1$ and $E(|X|)\ge a>0$ then $P[|X|\ge \lambda a]\ge (1-\lambda)^2 a^2$ for every $0\le \lambda \le 1$. I know that the second condition implies that $a\le 1$ by Jensen's inequality and hence the proposition holds for trivial cases $\lambda \in \{0,1\}$. I guess I could integrate some indicator functions but I have no clue. Could someone give me a hint?

If $E(X^2)=1$ and $E(|X|)\ge a >0$, then $P(|X|\ge\lambda a)\ge (1-\lambda)^2a^2$ for $0\le \lambda \le 1$.  I can see from the well known inequality $E(|X|) \le E(|X|^2)^{1/2}$ that it must be the case that $a\le 1$. But what to do next I'm not sure.


I get this message very often:    it happens 1-2 times daily, since ~1 year. The default is to send an error report "to help fix this problem".  It's clear that not all error reports can go to  without flooding the platform. From , I learned that the errors go to , but they don't seem to be more than a pixel in a chart.  My Question is: How can I create a bug report in a similar way as manually calling apport-bug/ubuntu-bug would do for running processes?, so that I can track its progress and add some more information (attachments, text) about it.

It used to be that when a program crashed, especially when a user was using a pre-release of Ubuntu, apport could be used to open a bug report.  The user could then track the bug, see if it affected others, help fix it, etc.  As of Precise 12.04, this behavior and workflow changed.  As I discovered in , by default apport no longer opens a bug report (and it is awkward but not impossible to get it to do so).  At the same time people are noticing a new "whoopsie" process, as described at .  After some more googling, I dug this blueprint up, which describes the whole process: .  (It didn't mention whoopsie or daisy, so I added them - please correct me if I got it wrong).  Wow - this sounds like great work to streamline and improve the crash reporting process.    I'm left with this question: how does a user learn what the status of the problem is? The blueprint now has this requirement     The user should have some way to check back on the status of their crash report; e.g. have some report ID they can look at to see statistics and/or any associated bug #. E.g. provide a serial number at time of filing that they can load via a web page later on.   which seems unimplemented.  Is there anything available in the meantime?  And how does a developer get into the game?  Going to  just provides an "Incorrect Content-Type" error message.  Finally, I suggest documenting the apport behavior changes in the Release Notes.  It should be of interest to anyone who has been trying to help out Ubuntu.


When making a a variable local to a function, every time the function is called the array is  reallocated and 10 things are stuffed into it. In a more complicated situation this can take up time.  This closure apparently solves that problem by returning a function. The function it returns is assigned to digit name and the function is invoked immediately. I cannot wrap my mind around this. Now I somewhat understand what a closure is, but I have no idea how it is working.   var digit_names = (function() {     var names = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'];      return function (n) {       return names[n];   }; }());  alert(digit_names(3)); // 'three'   Please explain in detail what is going on here. How is the returned function being invoked before the array is allocated? When I call the function, how is it ignoring var names before it gets to the returned function? Or is that question even accurate?

How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?  I have seen  given on Wikipedia, but unfortunately it did not help.


I found this bug in my apartment in Chicago.  We had bed bugs in our house the previous year (but we thought we got rid of them).  This bug was very small - maybe 2 millimeters in length.  These photos are all of the very same bug (just different lighting).

I have a large wooden cutting board which is used in my kitchen mainly for preparing egg pasta. The wood type is Populus (poplar or aspen or cottonwood).  The main ingredients used with the cutting board are: flour (mainly soft wheat flour), hens' eggs, white sugar, butter, and baking powder.  After the food preparation, the cutting board is cleaned by scraping away the ingredients remains.  The board has some cracks and some small unknown insects are living inside the cracks.   The board has also a lot of holes due to woodboring beetles but I think the woodworms operated long time ago and they no longer live in the cutting board.  The unknown insect has an approximate length of 1 mm (along the direction of their movements) and a width of 0.3 mm. The unknown insects do not have wings, they just walk. I am not able to see how many pairs of legs they have.  The color of the insect is pale brown.  The cutting board was free from these unknown insects some months ago but then they appeared.  My questions:   What insects are they? Are these insects poisonous to humans? How can I get rid of them?   Update  The unknown insects could be Acarus siro, I will try to get a picture of the insects.  Update 2  Here is a picture. The bottom part of the image is a one Euro coin, the top part of the image is a caliper (each bright area is one mm tick).   Some more pictures:


While installing E-sword with wine in Ubuntu 20.10 I get "error 1904: Module C: \windows\syswow64\msxml3.dll failed to register. HRESULT-2147220473. Contact your support personnel." I have searched for fixes and can't find one.


I was wondering if there's a way to hear audio when going through the timeline. So, if I animated a character talking between frames 0 and 40, when playing the animation not only I can see the movement in the viewport but hear the sound.   Thanks in advance.

I want to make an animation in time to a song so when I hit play on the timeline I need to be able to hear the song so I can finely tune the animations to start and end at the right time.  Is it possible to have sound play on an animation while it is playing in the 3d viewport before it has been rendered.


I attempt generating text based on regular expressions using the . I escape the regular expression (which is a string) and use it with RandExp, but the end result is not as expected. What am I doing wrong? I want the end result to be something like: 123-12-1234 or 415-63-8345 import randexp from "randexp";  function main() {        const input = "^\d{3}-\d{2}-\d{4}$";     const escaped = escapeRegExp(input);     const regExp = new RegExp(escaped);      console.log(new randexp(regExp).gen()); // Output: ^d{3}-d{2}-d{4}$ <-- }  function escapeRegExp(string) {     return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string }  main();  The escapeRegExp(string) function is fetched from these URLs:     Thanks!

I would like to create a String.replaceAll() method in JavaScript and I'm thinking that using a regex would be most terse way to do it.  However, I can't figure out how to pass a variable in to a regex.  I can do this already which will replace all the instances of "B" with "A".  "ABABAB".replace(/B/g, "A");   But I want to do something like this:  String.prototype.replaceAll = function(replaceThis, withThis) {     this.replace(/replaceThis/g, withThis); };   But obviously this will only replace the text "replaceThis"...so how do I pass this variable in to my regex string?


I never had a problem with Seagate backup plus for Mac desktop until now. I connected it, and it keeps saying "disk not readable". I have only used it on one device. I have options to initialize, ignore, and reject. How to fix it? I have MacOS high Sierra version 10.13.4 (17E199)

I'm hoping someone can help! I recently downloaded a torrent directly onto an external hard drive, (using a 2009 MacBook Pro and 1TB Seagate Expansion portable Drive) somehow during the download the drive was accidentally ejected, since this incident when I plug the drive back in it’s having problems reading.  The drive works fine for about 10 minutes, I can read/copy/paste and access files but then starts to wreak havoc; apps hangs, it hangs the Finder, etc.  I’ve tried repairing it in Disk Utility, which reads and repairs this disk but problems inevitably continue as described above.  I’ve deleted the Torrent file also. All my files on this external drive so re-formatting is not an option until I can retrieve them.


I need to find the number of ways to color a rhombic dodecahedron using 3 colors. I know that I need to start by working out the group of rotations, and I have seen a similar post for a regular dodecahedron. I would like to use Burnside's Lemma to show a general formula for n-given color schemes for a rhombic dodecahedron. Can anyone assist with the computation?

I found some months ago that there are the Polya's enumeration theorem to compute number of colorings of dodecahedron. I got interested to find how to show by using only Burnside's lemma that there are 9099 ways to color dodecahedrom by three colors. How can I do the computation?


So I met someone ingame, Paladins, and he was referring to me by my steam username, and as we were exchanging not so pleasant pleasantries I couldn't ask him. So, I guess it is possible to find steam account of a paladins player. How do I do that? Or it it is something else then I want to know how can he/she know it?

I was playing with someone on Ark: Survival recently, I CTD'd and couldn't get his information. Are there any means that I could find this user's Steam account even though he hasn't logged in since?  I know of the function View: Players in Steam, but it only shows me the last 24 hours and I haven't played with this player in 3-4 days. Is there a way I could extend the view recent players function on Steam? Is there a record of this somewhere? Or do I have any further options?


I have two files  File1:  a b c   File2:  1 2 3   now I need to combine them to one csv file  a;1 b;2 c;3   As the files are really huge, I would rather not use cat and sed to process the second file. (For smaller files I can use a script). Any Idea ? awk/perl ?

Now,I have two files:  aaaa.txt:  a=0; b=1; c=2;   bbbb.txt:  d=3 e=4 f=5   I want to merge aaaa.txt and bbbb.txt to cccc.txt.   cccc.txt as follow:  a=0;d=3 b=1;e=4 c=2;f=5   So, what can I do for this?


I am researching the capabilities and limitations of the Killing Curse in Harry Potter (Avada Kedavra). Can the Killing Curse be used to kill more than one? Or, is it only able to kill one foe?

If targeted at a group of individuals and with the intention to kill them, could a single invocation of Avada Kedavra eliminate an entire group? I am asking for, er, a friend who has, um, a pest problem.  For example, if I aim over an anthill and I mean to kill all the ants, will I have to kill one at a time? Again, asking for a friend. I don't have any problem with the ants.


I have a content type, I'm trying to add a field that's a boolean. I want the options to be yes or no. This is something I thought would be relatively simple however, I keep getting an error message. I've attached 2 screenshots. 1 is the configuration for my boolean. The other is the error message my site gets. Can someone help me. What am I doing wrong?


Hi I need to know about a sticky notes application in ubuntu similar to that of windows which pops up every time I boot my system as if a start up application.

If I'm right, panel applet is no longer supported in Unity. How can I bring sticky notes back? Is there any application or AppIndicator that has the same functionality (like show all notes when logged in)?  Not tomboy please :), I don't like its interface.