yesterday i got pm by online buyer for gold coin from oversea, and he want my id picture for security he said..but the deal is canceled because his manager not interested at that coin..today he said he want to help me and willing to give me money if i help him..he said he got staff around my state, and the staff will transfer him money every week, but it hard because got so many staff, it will make commotion..so he ask me to open an account bank in this state using my name so it will make easier the staff to transfer money if in same country..so all the staff will tranfer money to me, and latter ill transfer to him using online bank in..he ask me to give the back account and password so he can monitor the money inside..it willing to pay me every week if ill help..yesterday ask for my I.D and today ask to open bank account..it is a scam?please help me

A man in  west  coast  Austria wants to deposit money  into  my account.  I'm in Alabama.  I had to get an online  account.  I did that, but he says his bank manager  needs all this information:   DOB SSN    online access username  online access  password   security  question and answer   bank name   bank address   bank number  person who is on the account     their name their address    account no   routing no     OK. Is it safe  to do this or am I being scammed?  I don't want him  to be able to end up withdrawing all my money instead of depositing money.


Is it possible to install cloud apps like Dropbox or OneDrive or Google drive on Ubuntu 14.04?

For some reason installing Dropbox via software center does not work.  I get a message that sends me to Dropbox website where I follow the instructions. But at the end it says it says:     Next, run the Dropbox daemon from the newly created .dropbox-dist folder.   I am not able to do this. Running the command ~/.dropbox-dist/dropboxd fails for me.  Running Ubuntu on Windows 7 Home Edition.


I am using the following code to upload the file and data.  $(function() {     //Callback handler for form submit event     $("#core").submit(function(e)     {         var formObj = $(this);         var formURL = formObj.attr("action");         var formData = new FormData(this);         $.ajax({             url: formURL,             type: 'POST',             data: formData,             mimeType: "multipart/form-data",             contentType: false,             cache: false,             processData: false,             success: function(data, textStatus, jqXHR)             {             },             error: function(jqXHR, textStatus, errorThrown)             {             }         });         e.preventDefault(); //Prevent Default action.          //e.unbind();     }); });   I want to track the progress please tell me how to do it. I know the jquery.form.js has the uploadprogress event. But I don't want to use the library. I made some modifications but after the modification; it is not sending any network request although the function is executing i checked this via alert here is the code.   $(function() {                 //Callback handler for form submit event                 $("#core").submit(function(e)                 {                     alert("Hello");                     var formObj = $(this);                     var formURL = formObj.attr("action");                     var formData = new FormData(this);                     $.ajax({                         url: formURL,                         type: 'POST',                         data: formData,                         mimeType: "multipart/form-data",                         contentType: false,                         cache: false,                         processData: false,                         xhr: function() {                             var myXhr = $.ajaxSettings.xhr();                             if (myXhr.upload) {                                 myXhr.upload.addEventListener('progress', progress, false);                             }                             return myXhr;                         },                         success: function(data, textStatus, jqXHR)                         {                          },                         error: function(jqXHR, textStatus, errorThrown)                         {                         }                     });                     e.preventDefault(); //Prevent Default action.  //                    e.unbind();                 });              });             function progressHandlingFunction(e) {                 if (e.lengthComputable) {                     $('progress').attr({value: e.loaded, max: e.total});                 }             }

I would like to upload a file asynchronously with jQuery.     $(document).ready(function () {     $("#uploadbutton").click(function () {         var filename = $("#file").val();          $.ajax({             type: "POST",             url: "addFile.do",             enctype: 'multipart/form-data',             data: {                 file: filename             },             success: function () {                 alert("Data Uploaded: ");             }         });     }); });  File <input type="file" id="file" name="file" size="10"/> <input id="uploadbutton" type="button" value="Upload"/>     Instead of the file being uploaded, I am only getting the filename. What can I do to fix this problem?


I know this question has been answered before, but I don't even know how to start this one.   I know  $\phi$ is a multiplicative function, but I'm honestly so lost I don't know what to do.   Could anyone shed some guidance? Forgive my ignorance, please. I want to learn but I feel as though I've been left to fend for myself in this course

I know the following:  $$\varphi(2n)=\varphi(2)\varphi(n)=\varphi(n)\iff(2,n)=1$$ And  $$\varphi(3n)=\varphi(3)\varphi(n)=2\varphi(n)\iff(3,n)=1$$  But now I'm not sure what to do with this info.


My machine is windows machine. I have Ubuntu hosted in virtual box. I used apt-get to install opencv-python. Now when I try to import cv2, I get an error message: Import Error: No module named cv2. I have python 2.7 and 3.5, but I have changed the interpreter from python 2.7 to 3.5 in my Pycharm IDE. I am on Ubuntu 16.04 LTS.  When I try to use pip to install opencv, I get an error message: Permission denied. How do I install opencv using python 3.5 64bit without running into these nasty errors?

How to install OpenCV version 3.1 on Ubuntu 16.04 LTS to work with Python 3.5.1?  I tried  on a VM but obviously that is useful to do if you want to work with Python 2.


I'm writing a script like the following:  In the input for text, I'll write a word, and if the letter in that word is abcde it will just print the letter, else its going to print the letter + oand then the letter again.  For the result right now, I get (for example the text = allan), "a lil lil a nin".  I want the result to be: "alillilanin".   How do I remove the whitespace?  def sprak(text):     bok = "abcde"     for letter in text:            if letter in bok == bok:             print letter,         elif letter != bok:             print letter+"u"+letter,   text = raw_input("what word ") sprak(text)

In python, if I say  print 'h'   I get the letter h and a newline.  If I say   print 'h',   I get the letter h and no newline.  If I say  print 'h', print 'm',   I get the letter h, a space, and the letter m.  How can I prevent Python from printing the space?  The print statements are different iterations of the same loop so I can't just use the + operator.


I've installed QGIS 2.8.2 since a few days and have no experience with this application. I try to extract the outer points of a Point Shape into a Line Shape, like a shell for the inner points. All points of the shape has to be in or on the border of the line.  Is there any possibility or function in QGIS, to do this ? (see figure  below)

I'm trying to convert sets of points to their respective polygon boundaries.  I think this is something like a Voronoi diagram or Convex Hull, but not quite.  I'm sure there's a technical term for it, but I'm a beginner to GIS.  It's probably best illustrated with the following image:    So, given 4 sets of points (each set in its own colour), what are the four polygons surrounding each respective set of points such that the spacing between polygons maximizes the margins and all the polygons meet together?  Here's a simplified example with 3 points:   A,43.656943,-79.393928,blue B,43.66663,-79.402682,green C,43.656447,-79.408004,green   You'll have to view the following graphic for it to make sense:   Essentially, each point has a colour and you expand a buffer of a certain distance out from it to start.  The hard part is when there's a collision with other points (their boundaries) and where to compute that boundary. The result is a set of polygons (one for each colour/set).


I have a fresh installation of GeoNode 2.6 on Ubuntu 16.04. The Web site is accessible, however, we are experiencing issues with the "template-overriding" feature.  I'm aware of .   I have read the doc about . (I could have missed something though, feel free to point it out if that's the case)  From my understanding if I put my HTML sources in /etc/geonode/templates they should override the default sources (that's the behaviour I'm seeking) and the page should update automatically. However that does not seem to be the case. In fact nothing happens (apparently) when I do the latter. I even tried executing the following commands to no avail.  geonode collectstatic service apache2 restart   My local_settings.py seem all right  GEONODE_ROOT = os.path.dirname(geonode.__file__) TEMPLATE_DIRS = ( '/etc/geonode/templates', os.path.join(GEONODE_ROOT, 'templates'), )  # Additional directories which hold static files STATICFILES_DIRS = [     '/etc/geonode/media',     os.path.join(GEONODE_ROOT, 'static'), ]   Is it possible use my templates by putting them in /etc/geonode/templates (as mentioned here) in order to theme GeoNode?   If possible how can that be done ?   If not possible, why is it not?

I´m making a GIS-Portal with GeoNode 2.6 (running in ubuntu 16.04 server) and I want to change the look of the home page following this instructions:  (I´m a beginner at this). I have copied the "site_index.html" and "site_base.html" from  /usr/local/lib/python2.7/dist-packages/geonode/contrib/geosites/site_template/templates/ to /etc/geonode/templates/ I edited both html files. Then I run the collectstatic command and restart apache2, but i see no changes in the homepage.  in local_settings.py is set:  TEMPLATE_DIRS = (     '/etc/geonode/templates',     os.path.join(GEONODE_ROOT, 'templates')  Any ideas of what i´m missing to make it work?  I also tried editing the index.html file without any luck. It only changes when editing /usr/local/lib/python2.7/dist-packages/geonode/templates/index.html


I can't remember the author or title of this book. The main character however is an advertising executive who ends up in a different world.  Its main identifying feature of magic there from what I recall was that magic is performed through words and intent - but each combination of words with intent can only be used once. Once a phrase had been used, it could never be used to repeat that magic. As such, the main character could use magic in ways even the magic users of the world could not with his ingenious ways to describe a specific item he needed at a particular time.  The novel is at least 20 years old, possibly older.

I read a book when I was younger, that started off with a man directing a play. When it was over, he went to a party with his cast and came out of his drunken stupor in the lap of some woman, drunk and missing his wife, so he goes back home to be with her. As the story progresses you find out this man was somehow sucked into this world from Earth, likely in a previous book. I remember the book specifically describing him having cotton mouth. Weird thing to recall. But there it is. I also think his wife is pregnant.  I don't recall much. I remember he has a friend that sort of resembles a monkey. He has an older friend who guides him, I think some sort of mage. He lives in a city that's somewhat/somehow important in this world. His quest in this book is somehow supposed to save this city or the world. He has to sail to wherever he's off to.  In one scene he's in a port city and two ruffians in a bar challenge him. He fights them but gets beat up bad. They congratulate him for standing up for himself and his little monkey-like friend, and buy him drinks.  At some point he meets some living rock creatures and befriends them. I don't recall how it happens exactly, but when those creatures are broken the new shard has an ego all its own while the original part stays as the original ego. I think when you meet them there's just one. Then he gets broken and then has a "brother".   At some point there's a goblin cave... thing. Like a mountain range with a ton of goblins in it. I remember picturing in my head as being a ton of cave mouths densely packed. I don't remember if this was their destination, but I think they had to go into it.  There was magic in this world but I don't think it was overly prominent. I remember the cover sort of making me think of clockwork or Leonardo-type machinations. I don't mean to say it had machines on it. It just made me think of that period and that sort of innovation.  Any help would be appreciated!


If I and my wife are traveling to India can I take two mobile phone, one smartphone and one I pad?

I am planning to travel to India (COK airport, Kerala) from United States. I want to take my laptop as well as my tablet (iPad). Am I allowed to take both in my backpack with my documents related my work. I think I am allowed to take only one computer as per the rule. Will the customs consider my iPad as a computer?  What all I can take?   One of my friends took 2 laptops (1 work and 1 personal) and had trouble at the airport.  Also I am planning to take some wristwatches (7 of them, each avg price is 45 $). I read in a website that I can take stuff up to max 35000 INR. Is that true? In that case, how will I manage my stuff?


I am a Nigerian, I understand the issue of travel history problems. But i want to know something, Please does Estonia and Iceland require travel history to apply for a tourist Visa? I  work in a Bank here as a software Engineer, with a good salary, but i am not married.   Kindly advise.

Good evening. Please I want to know something. Do I need travel history for Estonia? I am applying from Nigeria.


Getting java.lang.NoClassDefFoundError error when running xml file using testng. Error details: java.lang.NoClassDefFoundError: Could not initialize class com.listeners.ExtentTestManager at com.listeners.Listeners.onTestFailure(Listeners.java:56)  I am using testng version 6.9.10 in pom.xml.  Hi, I am getting this error when I use listeners in my xml file. If I remove listeners and run the xml file, it is working. Please let me know if anything wrong with ExtentTestManager class or the dependencies. I am unable to add code in stackoverflow, so I have attached in this link:  Pls check.  Thanks in advance.

I am getting a NoClassDefFoundError when I run my Java application.  What is typically the cause of this?


I use the following <video> tag to play an HTML5 video as a background on my website:  <video autoplay loop mob-hide>     <source src="../Images/myvideo.mp4" type="video/mp4" />     Your browser does not support the video tag. I suggest you upgrade your browser.</video>   At the moment, I am hosting this on my web server, but would ideally like to host it on one of the freely available video sites, e.g. YouTube or Vimeo. Is it possible to do this, without embedding one of their players? NB: this doesn't need to work on mobile

So I was searching for one of my own websites on Google: http://www.botlibre.com  and to my surprise found some clones of my website, like:  http://83waystowasteyourtime.adidas.com  and:  http:// mediaiq.astral.comm  My question are:   Why are they creating clones of my website?  Some kind of SEO scheme or what? What gain could they be getting? How do they have a URL at adidas.com and astral.comm?  I assume it's not Adidas steeling my content. How do I shutdown these sites and stop people from stealing my content? (on Tomcat)


I am trying to understand Run Levels in Unix, I found Runlevel 6 is state of reboot. So I tried to switch to run level 6 using the command telinit 6 and it worked same as reboot on my computer. I am using Kali Linux, so sudo is not required.  Is changing/switching runelevels just commands to invoke some process?  When we are booting up or restarting or powering off, are we just changing run levels?

I just want to know difference between in     reboot  init 6 shutdown -r now   and which is the safest and the best?


The circles $C_1$ and $C_2$ are given by $x^2+(y+3)^2=1$ and $x^2+y^2-12x-10y-60=0$  C1 has a centre of (0,-3) and radius of Square root 1, whereas C2 has a centre of (6,5) and radius of 11!

Currently I started studying about ray-casting when I came across this following problem based on ray-triangle intersection. The problem was:  You are provided with a triangle with vertices ,(x1,y1,z1), (x2,y2,z2) and (x3,y3,z3). A ray with origin (a1,b1,c1) and direction (a2,b2,c2) is also given. Your task is to find:   1)Whether or not the ray intersects the triangle  2) If the ray intersects the triangle, what's the point of intersection and also find the distance of theat point from the origin of the ray  Examples:  1) For (x1,y1,z1)=(-2,2,6), (x2,y2,z2)=(2,2,6), (x3,y3,z3)=(0,-4,6) , (a1,b1,c1)=(1,0,0),(a2,b2,c2)=(-0.2,0,1) the answer is: coordinates of intersection:(-0.2,0,6) and the distance of the origin of the ray from the point of intersection is 6.12  2) For (x1,y1,z1)=(-2,2,1), (x2,y2,z2)=(2,2,1), (x3,y3,z3)=(0,-4,1) , (a1,b1,c1)=(0,0,0),(a2,b2,c2)=(0,0,1) the answer is: coordinates of intersection:(0,0,1) and the distance of the origin of the ray from the point of intersection is 1      3) For (x1,y1,z1)=(-10,-2.3,0), (x2,y2,z2)=(4.4,20.3,9.5), (x3,y3,z3)=(9.8,-10,0) , (a1,b1,c1)=(0,0,0),(a2,b2,c2)=(0.68,-1.14,1.82) the answer is: coordinates of intersection:(0.67, -1.12, 1.79) and the distace of the origin of the ray from the point of intersection is 2.22    All I need is to understand the general equations to solve this question. I need to know how the equations are formed and how the problem is solved. This seems a pretty hard question for me.


Can I say, for example, "You aren't either pretty nor funny"? And if so, is it any different from saying "You aren't either pretty or funny"?

Taken from BBC   Interim President Oleksandr Turchynov described the referendum as a "great farce" which "will never be recognised either by Ukraine or by the civilised world".  My try is   Interim President Oleksandr Turchynov described the referendum as a "great farce" which "will never be recognised neither by Ukraine nor by the civilised world".


I have installed PostgreSQL 11 on Ubuntu 18 and while creating PostGIS extension it gives this error.     could not load library "/usr/lib/postgresql/11/lib/postgis-2.5.so":   /usr/lib/postgresql/11/lib/postgis-2.5.so: undefined symbol:   AllocSetContextCreate   The command I used to download PostGIS   apt install postgis postgresql-11-postgis-2.5

I am a few days new to Linux Ubuntu and am in the process of setting up a PostGIS database to use in GeoDjango.  I am going to post all my commands that I have done so far  these are installed in order:   -------------------------------postgres------------------------ sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list' wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | sudo apt-key add -  sudo apt-get update sudo apt-get upgrade  sudo apt-get install postgresql postgresql-contrib libpq-dev pgadmin4  sudo apt-get install postgis  -------------------------------geodjango------------------------  sudo apt-get install binutils libproj-dev gdal-bin sudo apt-get install build-essential sudo apt-get install gcc g++ clang make  --geos wget http://download.osgeo.org/geos/geos-3.4.2.tar.bz2 tar xjf geos-3.4.2.tar.bz2 cd geos-3.4.2 export CXX="g++ -std=c++98" ./configure make sudo make install cd ..  --proj 4 wget http://download.osgeo.org/proj/proj-4.9.1.tar.gz wget http://download.osgeo.org/proj/proj-datumgrid-1.5.tar.gz tar xzf proj-4.9.1.tar.gz cd proj-4.9.1/nad tar xzf ../../proj-datumgrid-1.5.tar.gz cd .. ./configure make sudo make install cd ..  --gdal wget http://download.osgeo.org/gdal/2.2.0/gdal-2.2.0.tar.gz tar xzf gdal-2.2.0.tar.gz cd gdal-2.2.0 ./configure make sudo make install   now when I go into pgAdmin 4 and run create extension postgis i get this error  ERROR:  could not load library "/usr/lib/postgresql/10/lib/postgis-2.4.so": /usr/lib/liblwgeom-2.4.so.0: undefined symbol: GEOSVoronoiDiagram SQL state: XX000   UPDATE  followed the directions in this link  and still got the same error


I have a blend file. I got it from . A strange thing happens when you go to Edit Mode on "body" part. Well, the object called "body". Anyway, when you do that the half of the object is clipped, you go back to Object Mode, the clipped part goes back. I figured out that applying the existing subsurf modifier fixes this weird behavior.  And another thing. The origin point is cyan instead of orange.   Any thoughts on why this happens and what's with the origin point color?   (if you don't have an acc on blendswap)  Edited:   Thanks to Gonzou, his answer solves the mystery of the disappearing mesh.  The cyan dot mystery still remains. I looked through theme colors and didn't find any entry that controls that cyan dot. The "Active Object" entry only controls the outline color on that object. However, on a newly created object an origin dot color is orange (as it expected) and that "Active Object" entry controls an outline and dot colors.

I have append a mesh (rex) from this .blend .  In edit Mode I see different vertices from objcet mode (see pictures). The vertices of belt are missing!  OBJECT MODE:   EDIT MODE:   How can I edit vertices of belt? Is It a bug?  This is my .blend  maybe can help.


In QGIS I have two vector layers, the first is a set of polygons and the second is a series of points.  Each point has a numerical attribute associated with it and is located within one of the polygons.  What I'd like to do is to run a points in a polygon function to collect how many points fall within each polygon but in addition, I would like to sum each of the numerical attributes found in each point so that the end result is a total of the numerical attributes for each polygon.  For example: Say I want to generate a map with the total population of each city in the greater Los Angeles region (County). I have point data representing the centroid of each census block group. I then table join the centroid and the population data associated with each block group.  My attribute table for the centroids then has a column listing the population.  I would like to add the population of each centroid together with the population of other centroids that fall into each city's polygon. I've tried the instructions given in  but I am still am not getting the results that I need.

I have a polygon shapefile of many lakes, I also have a point shapefile of locations on those lakes where fish were caught.  The point shapefile contains the attributes: Fisherman_iD, Fish_Caught, Lat, Long.  The polygon shapefile contains the attributes Lake_name, Points_per_polygon(PNTCNT)  Each point obviously has differing entries under the fish_caught field.   What I want to get is the average fish caught per lake (polygon).  So I need to have a total number of fish caught, per individual polygon, and then I can divide that by the PNTCNT file I create using the Points in a Polygon tool.  Ideas? I am relatively new to QGIS.


Could you recommend some stochastic calculus literature that has a lot of examples? I am particularly interested if there are good books with stochastic differential equations explained on real problems, for instance, some kind of a seminar-like problems-with-solutions set.

I am in search of a good book for learning Stochastic Calculus from a purely mathematical/statistical point of view. Almost all the books I see are based on Finance. Also, please specify the pre-requisites for this course.  Actually, I am quite knowledgable in Measure Theory, Markov Chains and Martingale Theory. I believe this knowledge should suffice.  I am planning to self-study this subject. Please suggest me good books.  Thank you.


I resently started to like Google docs. The ability to write every I am, anytime I want. Especially mobile, with a tablet. Because the best Ideas don't care what you are doing, they just pop in your head.  I also started to use LaTeX. Is there anything in the LaTeX world, that provides the flexibility and freedom something like Google docs?

I have heard rumors that you can compile documents online, and more specifically that Google has a free online compiler, but I have never been able to find any. Is there a way to compile documents online, so that I can write and compile documents even if I don't have a TeX distribution installed on my computer?


I mounted an NFS filesytem from the shell using the code:  LINE='nfs.francky.me:/export/beatdb /beatdb nfs tcp,intr,rw 0 0' grep "$LINE" /etc/fstab >/dev/null || echo $LINE >> /etc/fstab mkdir /beatdb mount -a # Remount /etc/fstab Without Reboot in Linux   How can I determining which version of the NFS protocol is in use?  I tried using nfsstat -c as well as rpcinfo -p nfs.francky.me, my understanding is that the latter shows that the server supports version 2 and 3 of the NFS protocol, but I don't know which one is been used. I don't have access to the NFS server so I am looking for a solution client-side.

I'm mounting a NFS filesystem on my machine.  How do I figure out what version of the NFS protocol the server uses?  I don't have access to the NFS server machine, but I do have root on my client machine.  Is there anything I can run on my client machine to identify what version of the NFS protocol is being used by the server, or what versions it supports?  I wasn't able to find any useful information in /var/log/messages or kernel debugging output (dmesg).  I have tried running nfsstat, but I'm not sure if it is giving me any useful information.  However, when I run nfsstat -s to request information about the server, I don't see anything useful:  # nfsstat -s Server rpc stats: calls      badcalls   badfmt     badauth    badclnt 0          0          0          0          0          When I run nfsstat -c to request information about the client, I do see some information about Client nfs v3, but I'm not sure how to interpret this.  Does this tell me anything about the protocol being used between my client machine and the NFS server?  Does it mean I am currently using v3 of the NFS protocol?  Does it tell me anything about what versions of the NFS protocol the server supports, e.g., NFS v4?


"Look, some buses are coming this way, don't you see them?" "Look, some buses are coming this way, did you see them?" What is the difference between them? Context: I was doing some translation from English to Chinese. As I compared my translated version with that in the answer key, they turned out to be quite different. At first, I thought the sentence “Look, some buses are coming this way, don't you see them?” meant something to the effect that "I saw the buses coming, so I thought you did, too". More, similar structures: "It's getting dark, don't you think it's going to rain?" (do you think...?) "Can't you see that our city is growing more prosperous?" (Can you see...?) Any answer would be appreciated...

We always use a positive tag question after a negative sentence:  You shouldn't take this medicine, should you?  We use a negative tag question after a positive sentence:  She must leave early, mustn't she?  But when there is a negating prefix on the adjective (impatient vs. patient) after the verb "to be", then the sentence is negative in meaning. Does this mean the tag should be positive? Which is correct, A or B?  A: I am impatient, am I? B: I am impatient, aren't I? A: The class was dismissed, was it? B: The class was dismissed, wasn't it?


I have ruby and homebrew running for a while and I'm starting to play with Bash. I have encountered a problem with my PATH variable as echo'd:  /opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin??n’export   As you can see, there is both redundancy and junk at the end int he form of illegal characters (causing a host of other issues). I can change the PATH with   export PATH="/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin"   which does indeed return the desired PATH when echo'd:  /opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin   But I can't figure out for the life of me how to save the PATH so that it doesn't reset on reopening. I don't need to add paths. I just want to make this the new value of that variable. Please, how can I make this change permanent?

For some reason when I run echo $PATHI get the following directory: /Users/<home>/Library/Applications/.  How do I set it back to its default location so that I don't have to run this command, export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin each time I want to run commands in Terminal?   Thanks for the consideration


I know this may be extravagant, but I was wondering if it was possible to embed a terminal command in a beamer pdf that can be launch by clicking on it. My idea is that during my presentation, I could just click on a button displayed on my slide to launch a program. This way, I don't have to quit the presentation and open a terminal window. I'm using mac OSX and I need the view the pdf with Adobe Reader. Is there a way to do it without using php forwarding like in ? Edit: I tried this code: \begin{filecontents*}{shell.command} #!/usr/bin/env sh echo "Hello, World!" \end{filecontents*}  \documentclass{beamer}  \begin{document}  \begin{frame}     \href{run:shell.command}{here} \end{frame} \end{document}  And Adobe Reader says it can't find an app to open the file. I also tried opening the file with Safari and it shows the script file, it doesn't run it. This is annoying because if I click on the shell.command file through the Finder, it simply runs it, as it should.

I want to add a "run demo" button to a Beamer presentation (PDF file) that will launch an external Java application.  Can this be done somehow - Embed an "exec" command inside a PDF using LaTeX/Beamer?


Similar to , but containing more bugginess.  Take a look at this:    The post was grayed out because it received (presumably) 3 offensive flags.  was simply a random string of profanities.  Grayed out? Good. Grayed out flag dialog? Not good, but . The editor has a higher z-index than the flag dialog. Definite original . Please fix.  Update: In some situations, it can even appear below other answers making selecting a flag option impossible. The only workaround is to drag the box -- using the top right corner -- to whitespace on the right side. Then the post may be flagged.

When flagging an answer that is grayed-out because it has a score of -3 or lower, the flag dialog is also grayed-out. If you drag it over a non-grayed-out answer, it appears semi-transparent. The same is true when you flag a comment on a grayed-out answer.     This looks like a regression of , perhaps due to .


I am using Lightroom, version 5.7.1 to be specific. I have shot many photos and edited (retouched) for a client, exported them. But my client is so paranoid that she also wants unedited version of the photo.   I know how to export photos simply. But how to export unedited one without losing my precious edits? Please note that I want to keep the straightening data (crop), but not other ones.  I want jpg format images. Not the originals, which is cr2 for me.

There are a couple of photos that I have adjusted using camera raw in Lightroom. Now I want to export those images in their original state (before adjustments). But I can't find any shortcut to do it.   What I'm having to do now is:    first copy all settings  reset all changes  export original image with specific resolution  then paste settings.   Is there any way to do this directly because I have so many photos that I want to export in both the original and adjusted states for before/after image comparisons.


I am working with Ubuntu    Server and Desktop    and both are based with the 18.04 version  I need work with vim - by default it is installed in Server - it has the 8.0.1453 version.  But in the Desktop is not installed, therefore for the Desktop I did the following:   sudo apt update sudo apt upgrade sudo apt install vim   All ok, Vim is installed how is expected but again it is based for the 8.0.1453 version.  Even if in the Server I do   sudo apt update sudo apt upgrade   Nothing to update but Vim remains with the 8.0.1453 version  I am confused because in  page has the following note:  Version  Vim 8.2 is the latest stable version. It is highly recommended, many bugs have been fixed since previous versions.   Therefore from 8.0.1453 to 8.2 there is a considerable difference between the releases.  I am assuming that I should do a reference for a special 'repository' (I had this experience through MySQL), which one? and from where I should take that 'official' reference?

The breakindent feature is the greatest thing ever, but it's in 7.4.338. The latest version in the Ubuntu repos is just 7.4, I think. I notice , but I can't seem to find one for Ubuntu yet. I'm hopeless with compiling things, otherwise I'd compile it myself.


Say, I'm given a filename like libasound.so.2. Is there a way to query the package manager to correlate the filename with its corresponding package?  I'm interested to get answers for any package manager, but my primary focus is on apt and yum.

For example, on Debian or Ubuntu, which package has the /sbin/shutdown command in it? I want to read the source of that command (and possibly modify it to report notification on desktop) and I didn't know which package source to download.


Whenever the Avatar dies, they reincarnate into a new body from the next nation in the Avatar cycle. For instance, Roku reincarnated into Aang who reincarnated into Korra.  Is there any evidence that people aside from the Avatar reincarnate as well?

Obviously, human spirits can reincarnate, as the Avatar is constantly reincarnated into another body.  Through Avatar: The Last Airbender and Avatar: The Legend of Korra, we see and hear about spirits of people which are trapped in the spirit world. Do any human spirits other than the Avatar ever get reincarnated into a new body?


The above table is from   \documentclass[a4paper,oneside,12pt]{report} \begin{document} \begin{small} %\begin{sidewaystable}[h] \begin{table}[htp] %\restylefloat{table}  \centering\small\setlength\tabcolsep{3pt}  %\centering \footnotesize\setlength{\tabcolsep}{0.5pt} %\toprule \hspace*{0cm}\begin{tabular}{l@{\hspace{3pt}} *{15}{c}}  %\begin{tabular}{l@{\hspace{1pt}} *{12}{c}} \hline \hline  %\bfseries cluster& \multicolumn{6}{c}{\bfseries previous study}& \multicolumn{6}{c}{\bfseries present study}\\           \hline clusters & $RA_{J2000}$ &$DEc_{J2000}$& $r_{core}$& $r_{lim}$ & $\log(age)$&E$(B-V)$&d&$RA_{J2000}$&$DEc_{J2000}$& $r_{core}$& $r_{lim}$ &$\log(age)$&E$(B-V)$&d\\           &        &(hms)&(dms)& (arcmin)&(arcmin)&(year)&(mag)&(Kpc)&(hms)&(dms)&(arcmin)&(arcmin)& (year)&(mag)&(Kpc)\\          \hline \bfseries Berkeley 53          &$20 55 56$&$+51 02.8$& $2.5\pm0.1$&$\simeq 20$&$9.09\pm0.02$&$1.52\pm0.01$&$3.1\pm0.1$          &              &               & $4.19\pm0.28$ &$20\pm1.6$ &$9.10\pm0.05$  &$1.39\pm0.42$&$3240\pm440$\\ \hline \hline %\toprule \end{tabular}\hspace*{0cm} \caption{astrophysical parameters obtained from ischrone fitting}\label{tab:comber} %\end{sidewaystable} \end{table} \end{small} \end{document}     I want table like in the picture.


So here goes the problem :   Compute:  2^1234 (mod 11)   How would I go about trying to solve this ?   This is what I have tried so far      I know that 2^10 (mod 11) is congruent to 1,but that is about it.

I've read about Fermat's little theorem and generally how congruence works. But I can't figure out how to work out these two:   $13^{100} \bmod 7$ $7^{100} \bmod 13$   I've also heard of this formula:  $$a \equiv b\pmod n \Rightarrow a^k \equiv b^k \pmod n $$  But I don't see how exactly to use that here, because from $13^1 \bmod 7$ I get 6, and $13^2 \bmod 7$ is 1. I'm unclear as to which one to raise to the kth power here (I'm assuming k = 100?)  Any hints or pointers in the right direction would be great.


After searching for how to turn off 'Hot Network Questions' I see that debate over this topic has been raging for years. Threads have repeated and on-going replies with users posting their frustrations at looking to remove it.  It is extremely surprising that there is still no option to do so. Why is this?  Like many others, I find Stack Overflow a useful resource for professional programming and statistical issues, but this time is much less productive than it should be because of this section, and frequently turns me off Stack Overflow and makes me look for other sources first, where I won't be distracted by, for example, philosophical debate (from the interesting to the ludicrous, they're still a distraction and often not appropriate for work) or this week's Game of Thrones spoilers.  I realise this is a repeat topic, but there seems to be a large body of users who are against the Hot Network Questions sidebar, at least in its current implementation, and there does not seem to be a clear justification for why it remains like this.   Edited to clarify distinction from previous question 'what is the goal of "Hot Network Questions?" (although this also seems unresolved); I think the specific issue that I and a lot of other users have is that they are an unwanted and inappropriate distraction when trying to use Stack Exchange for work purposes.

There has been a tug-of-war in the  list.  seem to be unhappy with the traffic that it brings to their site:  'But we want to encourage people to post, that's the whole point of the HQ list!' I hear you cry. I disagree. We want to encourage people to the site not just to that question.  The SE Community Team seems to have  (emphasis mine):  the results have been... Not great so far: a significantly smaller number of people are clicking through to randomly-selected questions than to the top questions, which hints that the algorithm may've been doing a better job of identifying general-interest questions across topics than some expected.  Disclaimer: This should not be taken as a slight of the community team whatsoever, nor do I think this is some cause for revolt or a boxing match as the below prose may indicate. These are just poorly applied literary tools to emphasize the drastically different approaches to the same list between two groups. In the Red Corner, the Community Members The goal of the hot questions should be to drive up interest in the site. The hot questions should be a lure to encourage SE network users to contribute to other content, not just do a drive-by on the hot question. In the Blue Corner, the Community Team The goal of the hot questions should be to drive traffic to general-interest questions. After all, the Hot Network Questions used to be more accurately named as "Popular Questions". What is the Goal of Advertising Network Questions? Before discussing , or , we need to come to an agreement on what the heck we are actually trying to achieve. Once we know what we are looking to accomplish, we can find the best way to do that. The list of questions from a variety of sites is in a great location screen-wise, it is readily accessible and does get a lot of eyes on it. But as with any marketing, the goal isn't just to grab eyes, it's to grab the right eyes.* * I have nothing against left eyes. Most of my friends have left eyes too. And they are awesome. But in the context right eyes are not a geospatial thing, but rather in the 'correct' sense. So what are the right eyes? What type of people do we want to attract to our site? What would we determine as 'success'? How can we measure that success? Please do not limit yourself to the very narrowly scoped topic above. Think outside the box if you'd like. On every page across the network we have a nice piece of real estate for showing off the rest of the network. How can that space best be used if not on a list of questions picked by an arbitrary algorithm?


I have heard that everything in our physical reality is relative. But I wonder:   Does the universe have an edge? In an expanding sphere, there would be an edge is it like that? If the above is true then isn't everything relative to the edge. And not relative to eachother? Also, the speed of an object could be measured not as its speed moving away from an object but rather its speed moving away from the edge when it started or at all times (there would be a cancelation and I guess that would mean it could even be a - speed)

If the big bang was the birth of everything, and the big bang was an event in the sense that it had a location and a time (time 0), wouldn't that mean that our universe has a center?  Where was the big bang? What is there now? Are we moving away from the center still? Are these even valid questions?


App version: 1.0.27  When I try edit a post on the app I get a notification saying: "Account is not allowed to suggest edits" . I can edit the same post if I try and do it on the browser.

I edited a question, on Stack overflow and when submitting preview, got red bar telling me my account isn't allowed to make suggested edits.  On the Sandbox android question it works fine, but that is editing an answer to my question.   The message I receive is:     Account is not allowed to suggest edits   Are the rules for suggested edits different for Android app?


When we're talking about spatial rotations is quantum mechanics, why do we need to resort to $SU(2)$? Why isn't $SO(3)$ enough?  I've read that $SO(3)$ isn't , and I've read about , and , but I'm falling down deeper and deeper into pure mathematics (esp. topology). Is there a "topology for physicists" explanation of what's going on here?

$SU(2)$ is the covering group of $SO(3)$. What does it mean and does it have a physical consequence?  I heard that this fact is related to the description of bosons and fermions. But how does it follow from the fact that $SU(2)$ is the double cover of $SO(3)$?


I have come to understand that we have two methods of redirecting both stdout and stderr to the same file. The first method is: ls -l /bin > ls-output.txt 2>&1 As the author of  states: Using this method, we perform 2 redirections, first we redirect stdout to ls-output.txt and then we redirect stderr(file descriptor 2) to stdout(using file descriptor 1).  The order of redirections is important.  ls -l /bin 2>&1 >ls-output.txt would redirect stderr to screen.  My question is: Like in many programming languages, was the command designed with some associativity and precedence rules in mind and how do we read the command while writing it on screen? and what is the sequence of the backend execution of the command?  Here's what i think about the execution sequence: First, the command ls -l /bin sends its output to stdout and error to stderr(any one of those). Then, the stderr is redirected to stdout.(if there is any error, eg: if ls -l /binn is used) Now, the stdout stream contains one of the two(either output or error) which it then redirects to the file ls-output.txt

I don't quite understand how the computer reads this command.  cat file1 file2 1> file.txt 2>&1  If I understand, 2>&1 simply redirect Standard Error to Standard Output.  By that logic, the command reads to me as follows:    concatenate files file1 and file2.  send stdout from this operation to file.txt. send stderr to stdout. end?   I'm not sure what the computer's doing. By my logic, the command should be   cat file1 file2 2>&1 > file.txt   but this is not correct.


I have a connecting flight with night stay in Paris. I'm going to get to the city. I have already been in Paris, so I've seen the Eiffel Tower and famous tourists sights. Are there any places worth visiting at night?

I am on a conference in Paris and I have free time after 7 pm. What can I see at this time? Last time I went up the Eiffel tower, this was great at night and still open. What else can I do?   Which sights have long opening hours?


I have no idea how to work on the following proof. Any Suggestions?   Prove that for any sets A and B, if P(A) ∪ P(B) = P(A ∪ B) then either A ⊆ B or B ⊆ A.  Thanks

I know that they are equivalent if we have $\cap$ instead of $\cup$.  If we start from left, we have:  $X \in P(A) \cup P(B)$  $X \subset A \lor X \subset B$  If we start from right, we have:  $X \in P(A \cup B)$  $X \subset (A \cup B)$  And now, how do we proceed proving that they are not equivalent?


In the textbook An Introduction to Language (10th Ed.) by Fromkin, Rodman and Hyams, the authors used the sentence     What he did was climb a tree   on page 7 to illustrate the difference between a sentence and nonsentence.  The authors claim that the quoted sentence is grammatically correct, but I disagree. The problem I feel like is the word "climb". The quoted sentence has the basic structure of "subject + linking verb + predicative expression". Therefore what comes after the linking verb "was" can either be a gerund ("climbing the tree") or a clause ("that he climbed a tree"), but not another verb. Also, it doesn't make any sense to interpret "climb" as a noun because I don't think the verb "was" can be followed by two predicative expressions.  So my question is: is the quoted sentence grammatically correct, or am I right in claiming that the verb "climb" is used incorrectly?

I'm confused about the following examples, and I'm pretty sure I've seen both of them in books and white papers.   What I have to do is find her. What I have to do is to find her. What I would like to do is to buy it. What I would like to do is buy it   Can anyone please tell me which one is correct?  Many thanks


Consider a matrix M(i,j). It has n columns and m rows. How do I indicate m rows for matrix M? What is the notation?

I want to explicitly specify dimension of matrices in some expressions, something like   $$\boldsymbol{A}_{m \times n} \boldsymbol{B}_{n \times m} = \boldsymbol{C}_{m \times m} \, .$$  Is there any more or less standard notation for this?    While this notation is generally unambiguous, I think it become ambiguous, for example, in the following case. Suppose that I have some column or row vector which is conjugate transpose of correspondingly row or column vector. If I write it in the following way  $$\boldsymbol{A}_{n \times 1}^{\dagger} \, ,$$ we can have 2 different interpretations:   matrix $\boldsymbol{A}_{n \times 1}$ is $n \times 1$ column vector and by $\boldsymbol{A}_{n \times 1}^{\dagger}$ I'm referring to its conjugate transpose which is $1 \times n$ row vector; matrix $\boldsymbol{A}_{n \times 1}^{\dagger}$ itself is $n \times 1$ column vector which is conjugate transpose of $1 \times n$ row vector $\boldsymbol{A}$.


I have a problem with data not uploading to database. I tried everything and looked into serveral tutorials on YouTube but none worked. Error From Console:  Code: if(args[0].equals("report")) {                 StringBuilder message = new StringBuilder();                 for(int i = 0; i < args.length; i++) {                     message.append(args[i]).append(" ");                 }                     PreparedStatement ps = null;                 try {                     ps = MySQL.con.prepareStatement("INSERT INTO `sawio`(`admin`, `reciever`, `priority`) VALUES (?,?,?)");                     ps.setString(1, p.getName());                     ps.setString(2, p.getDisplayName());                     ps.setString(3, p.getCustomName());                     ps.executeUpdate();                     p.sendMessage("OKOK");                     p.sendMessage("PL");                 }catch(SQLException ev) {                     ev.printStackTrace();                 }             }             return true;         }

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


I have So many more things than another player called Sam L-H in clash of clans, but in war he is in 5 Place and I am in 6. My question is how are we placed in clash of clans wars, Why am I in 6 And Sam is in 5.

I am #10 in my clan (cause I'm farming) but I am #2 in clan wars. I don't have the strongest troops in my clan. I'm just wondering how the order is set up, the only thing i can think of is that it is based off of your defense, but I'm not sure. Anyone know?


Find $\displaystyle\int \frac{dx}{(a^2\cos^2x+b^2\sin^2x)^2}$, where $a,b$ are constants.  I tried it some specific values of $a,b$ and tried many substitutions but it doesn't seem to work.   Just throw me a hint. Thanks.

Integrate $\dfrac{dx}{(a^2 \cos^2x+b^2 \sin^2x)^2}$.  I can go up to the residue formula like in this example   but then I just can't end up with the result for when $n=2$. I keep messing up my math. Can someone please show me how to get to the answer when $n=2$? I think I've spent 3+ hours trying to get to it and no luck unfortunately. Thank you!


I have Table A with columns CompetenceId, Description and Development Action. This is Table A    I have another table B with CompetencyId and Development Action.    As each CompetenceID is having multiple development actions in table B. My requirement is  for 'Table A'  I need 'Development action' column for a particular competencyId in the same row up on joining Table B. The result should look like below for Table A     How can I achieve this? Thanks in advance

I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life).  In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently.  group_concat, by the way, does this: given a table of, say, employee names and projects...  SELECT empName, projID FROM project_members;   returns:  ANDY   |  A100 ANDY   |  B391 ANDY   |  X010 TOM    |  A100 TOM    |  A510   ... and here's what you get with group_concat:  SELECT      empName, group_concat(projID SEPARATOR ' / ')  FROM      project_members  GROUP BY      empName;   returns:  ANDY   |  A100 / B391 / X010 TOM    |  A100 / A510   So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat?   I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :)


What has  got to do with ? Arguably, special relativity is encompassed in the requirement that the dynamical laws of physics be Poincare invariant (as opposed to Galileo, or something else).   General relativity, on the other hand, can be characterised first off by the claim that free-fall motion is geodesic motion, and secondly that the connection determining the geodesics is curved in the presence of matter.   At least on these two readings, the theories are independent of each other in their basic assumptions. Indeed, gravity in Newton-Cartan theory arises from a curved connection while assuming a Newtonian absolute time.   Yes, in both SR and GR there is a Lorentzian metric. But I'm taking that to be a non-essential feature of GR, the essential one being that free-fall worldlines are geodesics.   Historically, it appears that some (Einstein I believe) thought of the two subjects as linked in their foundations, and somewhat interdependent. If this was believed at some point, what was the link supposed to be? Why are they both 'relativity' and not the theory of relativity (SR), and the theory of spacetime curvature (GR)?  Edit:  It seems the question has been misunderstood. Poincare invariance and geometrised gravity are independent (just recall the Newton-Cartan theory a.k.a. geometrised Newtonian gravity). My question is why historically geometrised gravity came up in the context of Lorentzian spacetime, not, for instance, a classical (Newtonian) spacetime.

What is the connection between  and ? As I understand general relativity does not need the assumption on speed of light constant. It is about the relation between mass and spacetime and gravity. Can general relativity be valid without special relativity?


I want to modify the catcode of comma, with the following code  \documentclass{article} \AtBeginDocument{%   \catcode`\,=\active   \protected\def,{...}% } \begin{document} a,b,c $a,b,c$. \end{document}   I get the following error message:  ! Missing control sequence inserted. <inserted text>                  \inaccessible  l.6 \begin{document}   But with the following code, I get correct result:  \documentclass{article} \begingroup   \catcode`\,=\active   \protected\gdef,{...}% \endgroup \AtBeginDocument{%   \catcode`\,=\active } \begin{document} a,b,c $a,b,c$. \end{document}   I'm wondering what are the differences between these two ways. Why the first way causes problem?  Edit: Althougn David Carlisle give another related question, but I think this question maybe not the same as that question, since both examples contains  \AtBeginDocument{%   \catcode`\,=\active }   I could not understand why only one example causes problem.

I have a very simple question. When I do this:  \catcode`\@=0 \catcode`\\=11 @mycommand{a} @catcode`@\=0 \catcode`\@=11   It works perfectly and calls \mycommand correctly. However, when I try to define \mycommand with similar trickery:  \newcommand\mycommand[1]{   \catcode`\@=0   \catcode`\\=11   @textbf{Hello #1}   @catcode`@\=0   \catcode`\@=11 }   compilation stalls and gives me the * prompt. If I give it Ctrl+D, it terminates without producing any output. Indeed, it seems that changing the catcodes inside a command has no effect whatsoever, because the following works perfectly (whereas, from my understanding, it shouldn't):  \newcommand\mycommand[1]{   \catcode`\@=0   \catcode`\\=11   \textbf{Hello #1} }   Can anybody please explain to me what's happening?


In the papers I usually read, it is common to present a new idea or an optimization of an existing idea that outperforms the known approches in the field.   Can a paper reporting that a new Idea or method (presented in this latter) doesn't outperform the existing approaches on the same fields be accepted for publication?  I'm asking this because I think that such papers could help the community to know that these approaches cannot improve the current state of the art on the field.

Negative results are sometimes seen as failures, and confirmatory results as lack of creativity, even though both kinds can be useful. Have researchers any incentive to publish negative or confirmatory results (put aside the cases when they are forced to, e.g. certain registered clinical trials)?


I am trying to work in the BASH shell on a shared CentOS 7 Linux machine. I am not the admin. The default shell was set to TCSH for new users. I access it remote via ssh. When I type on my keyboard in the terminal (logged in the TCSH shell) all my keys on my keyboard function properly. If I switch my terminal from TCSH to BASH by typing bash, the n character doesn't work within the terminal prompt. For example, if I type conda, what displays in the terminal is coda as if it isn't registering. It only seems to occur when I switch to the BASH shell. I have an extra keyboard and I tried plugging that in and was unable to get the n to work as well. However, capital N still works.  I work with windows and ssh using the Windows Subsystem for Linux (Ubuntu flavor) and I use VS code as my terminal GUI. I thought that the Linux Subsystem might have something to do with it, but my admin logged onto my user using Cygwin and had similar results. Other users have had similar issues in the past on this machine but are no longer part of our group and they are hard to reach. I saw some helps online that seemed to have similar problems with specific keys not work and most indicated that an update to vi or vim was necessary. I had the admin update all packages on the CentOS machine (including vi[m]) and the problem persisted. If I open a vi or vim text and type n, the key registers. It seems to be specific to the BASH terminal.   I was informed to check for an ~/.inputrc file in my home directory but no such file exists. Since my n character doesn't function, I tested several inputs in the tcsh shell to open a clean version of bash: bash --norc, as well as env HOME=/nowhere bash. Both clean bash profiles still had similar issues with no registering n characters. Typing echo $INPUTRC in both the bash and tcsh environment gave no outputs.   I cannot figure out what might be causing this issue and any advice is appreciated. Thanks in advance.

In bash, the key that normally outputs the i character, stays dead. It does not output anything, no space no character, multiple keystrokes of same key do neither.  This is happening on trisquel8, out of the blue, no upgrades, and reproducible after startups, restarts, halt and hard restart. It's only happening within the xterm, the mate-terminal, the console... at the bash prompt (shell used is bash). Any other application WILL recognize the i as always. The login prompt recognizes i.  Hardware is tested and functional. Asus SyncMaster laptop, internal and external Logitec keyboard produce the same ¨silence¨(no output).  Suppose it must be something to do with bash specific issues. Within commands (nano, since vim has an i which cannot be typed to call vim), there is also the regular output expected i.  Again stumped, this incapacitates the whole system, and that with no probable preliminary settings tweaks.


I really want to change mine but I don't know how to.

I'm trying to change my Minecraft username. I've logged onto my Mojang account, but can't find where to change my username.  When I log in, it should show me the games by Mojang that I own, as well as my username for them. However, it only shows me "My Gift Codes", and won't let me scroll up or down. I've tried videos, I went to the Mojang help site, and even my best friend isn't having this problem. Any ideas?


I have a python script that runs in QGIS that I would like to run without opening QGIS. The script is as follows:  QGIS_Zonal_Stats_osGeo.py  import sys from qgis.core import *  QgsApplication.setPrefixPath("C:/OSGeo4W64/apps/qgis", True) app = QgsApplication([], True) QgsApplication.initQgis()  sys.path.append("C:/OSGeo4W64/apps/qgis/python/plugins")  from processing.core.Processing import Processing Processing.initialize() import processing  from qgis.analysis import QgsZonalStatistics  import datetime  today = datetime.date.today() one_day = datetime.timedelta(days=1) yesterday = today - one_day yesterday_date = yesterday.strftime('"%Y-%m-%d"').lstrip("0").replace(" 0", " ") yesterday_date_name = yesterday.strftime("%B_%d_%Y").lstrip("0").replace(" 0", " ")  rasterFilePath = 'C:/Users/bboyko/Desktop/precipitation_download/Daily_Rainfall/' + str(yesterday_date_name) + '.tif'  polygonLayer = QgsVectorLayer('C:/Users/bboyko/Desktop/precipitation_download/candidate_singlepart.shp',  'candidate_singlepart', "ogr")   rasterLayer = QgsRasterLayer(rasterFilePath, str(yesterday_date_name))  zoneStat = QgsZonalStatistics (polygonLayer, rasterLayer, 'rain_', 1, QgsZonalStatistics.Mean)  zoneStat.calculateStatistics(None)   And this is the .bat file I am using:  Launch.bat  SET QGIS=C:\OSGeo4W64\apps\qgis SET PATH=C:\OSGeo4W64\bin;C:\OSGeo4W64\apps\qgis\bin;%PATH% SET PYTHONHOME=C:\OSGeo4W64\apps\Python37 SET PYTHONPATH=C:\OSGeo4W64\apps\qgis\python;%PYTHONPATH%  python C:\Users\bboyko\Desktop\precipitation_download\QGIS_Zonal_Stats_Three_osGeo.py pause   When I run the batch file this is the message I receive in a command prompt:  C:\Users\bboyko\Desktop\precipitation_download>python C:\Users\bboyko\Desktop\precipitation_download\QGIS_Zonal_Stats_Three_osGeo.py   File "C:\OSGeo4W64\apps\Python37\lib\site.py", line 177     file=sys.stderr)         ^ SyntaxError: invalid syntax   Is the mistake coming from my python script or my .bat file, of from some other issue I haven't considered.

I would like to use OSGeo4W shell with Python3 but when typing python3 I get the following error:  Fatal Python error: Py_Initialize: unable to load the file system codec   File "C:\OSGEO4~1\apps\Python27\lib\encodings\__init__.py", line 123     raise CodecRegistryError,\                             ^ SyntaxError: invalid syntax   How can I use Python3?


New comer to measure theory!  I'm struggling to wrap my head around this concept...  Referring to Lebesgue Measures!   Could someone provide a concrete example of a set in the interval $[0,1]$ such that the probability of choosing a point in that set is not well defined?

I'm a newcomer in real analysis. I am learning the concept of measurable by myself using Royden's book "Real Analysis". I have a question regarding measurable sets. The following definition comes from Royden's book (page 35).  Definition: A set $E$ is said to be measureable provided for any set $A$, $$m^*(A)=m^*(A\cap E)+m^*(A\cap E^C)$$ where $m^*(\cdot)$ denotes the outer measure of a set.  To me, intuitively the above equation holds for all sets. In $\mathbb{R}$, I think a set can either be an interval or a series of isolated points (right?). It seems these kinds of sets are all measurable by the definition. Can anybody give me an example of non-measureable sets so that I can have an intuitive understanding regarding this concept? Thanks.


I searched the internet to find out about the effects of outliers on k-means clustering, but could not find any useful source. Does it cause bad clusters to be formed? If so, how?  (Please also provide a simple example with data such as a list of integers so that my doubt can be clarified.)

K-means is a widely used method in cluster analysis. In my understanding, this method does NOT require ANY assumptions, i.e., give me a dataset and a pre-specified number of clusters, k, and I just apply this algorithm which minimizes the sum of squared errors (SSE), the within cluster squared error.  So k-means is essentially an optimization problem.  I read some material about the drawbacks of k-means.  Most of them say that:   k-means assumes the variance of the distribution of each attribute (variable) is spherical;  all variables have the same variance; the prior probability for all k clusters is the same, i.e., each cluster has roughly equal number of observations;   If any one of these 3 assumptions are violated, then k-means will fail.  I could not understand the logic behind this statement. I think the k-means method makes essentially no assumptions, it just minimizes the SSE, so I cannot see the link between minimizing the SSE and those 3 "assumptions".


I have an Android 4.4 ARM phone and it is not rooted.  I would like to try out Ubuntu Touch on it.  Is it possible to install it, dual boot it with Android or run it from a VM?  UPDATE  My device is not in the list of Supported devices. Does it means that it is impossible to install it (without damaging the device)?

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


I recently read a fascinating article about string theory, which discussed higher-dimensional algebras and their applications to supersymmery. The author mentioned that there were only four algebras in which this was possible:   $\mathbb{R}$ (dimension 1),   $\mathbb{C}$ (dimension 2),   $\mathbb{H}$ (Quaternions, dimension 4),   $\mathbb{O}$ (Octonions, dimension 8).  My question is why does division not work in other dimensional algebras? What's so special about 1, 2, 4, and 8 that make this possible? I am looking for a high-level answer to this question, as I don't have much familiarity with algebra.

I have been reading about multi-dimensional numbers, and found out that it's been proven that the Octonions are the composition algebra of the largest dimension. I was wondering why, despite having infinitely many different dimensions of numbers, the only composition algebras are of 1, 2, 4, and 8 dimensions. What's so special about 8?


Should it be      This helps understand something   Or      This helps to understand something   Note that it is not      This helps us understand something,   although this is what I want to express.

Actually I should be working on my bachelor report (it's due tonight), but hey, there are more important things like: Can I omit the to in the following sentence?     ... foster behaviour that would help the robot population (to) adapt to the MONEE environment.


How do you make NTFS file system with the cluster size of 512? Using only the command line?

I want to know how to format a storage drive from the terminal. Helpful things to provide in the answer would be often used options for commands and base knowledge that one can use to extrapolate future uses. Specifically I would like to know how to format in the different file systems such as NTFS, FAT32, EXT4, etc. Information on how to partition the drive via terminal is also wanted.  I am trying to format a high capacity external hard drive (EHDD) into NTFS - from the terminal.   I know I can use gparted for this as well as other GUI programs, but I still want to now how to do it from the terminal.


While installing various programs, I get asked to download some packages that are required for it to work. Some of them are well known applications, where the read-me document is trustworthy whereas some other lesser known programs are the ones where I guess I need to be careful.  So, I'm trying to install a game known as Tennis Elbow, where the read me doc says:     On Ubuntu 14.10 64bit, the following instructions have been reported to work:  sudo apt-get install libcurl3:i386 sudo apt-get install libvorbisfile3:i386    So, how can we know if the files I download are safe or not?  I know this seems like more than one question, but I basically need this game to work, and so I just need know if I it is safe to install the packages mentioned or not.

I see a lot of interesting programs out there that can only be obtained by adding a "PPA" to the system but, if I'm understanding correctly, we should stay within the official "repositories" for adding software to our system.   Is there any way for a novice to know if a "PPA" is safe or if it should be avoided? What tips should the user know about when dealing with a PPA?.


So I thought...   If $\frac00 = x$... then  $0 = x\cdot0$... then  $0x = 0$... then its technically possible to divide by $0$ again  $\frac{0x}0 = \frac00$ ... since $\frac00 = x$ and $\frac{0x}0 = \frac00$.. then $x = \frac{0x}0$ ...   $0x = 0 ... x = \frac00 ...$  $\frac00 = \frac00=...$ $\frac00$ can only equal itself, meaning the value of it is an exact value, but it cannot equal anything else because the value it has is not from any branch-type of numbers that we know. It isnt imaginary nor anything else. Does this mean we need a new type of number that will make the mechanics of $0$ in maths work?  T.S SVK 1998 (17)

We add negative numbers and zero to natural sequence to make it closed under subtraction, the same thing happens with division (rational numbers) and root of -1 (complex numbers).  Why this trick isn't performed with division by zero?


Here's a simplified view of my database  |---------------|     |-----------| | ORGANIZATION  |     | CONTACT   | |---------------|     |-----------| | OrgId         |     | ContactId | | OrgName       |     | OrgId     | | MainContactId |     | FullName  | |---------------|     |-----------|   Is there a way to ensure that MainContactId only belongs to the subset of the CONTACT table where the OrgId matches?   I did some looking and found that I can use a user defined function, but that appears to have performance issues. Do I have any other options here?   EDIT: I played around, and got the following working. Is there a problem with this approach?       CREATE FUNCTION dbo.CheckOrgMainContact(@OrgId int, @ContactId int)     RETURNS int     AS     BEGIN         DECLARE @Result int          IF @ContactId IS NULL --if the contact ID is not set, don't check it         BEGIN            SET @Result = 1         END         ELSE         BEGIN             IF EXISTS (SELECT *                         FROM dbo.Contact                        WHERE OrgId = @OrgId and                               ContactId = @ContactId)                SET @Result = 1             ELSE                SET @Result = 0         END         RETURN @Result     END     GO      CREATE TABLE dbo.Organization     (        OrgId int NOT NULL IDENTITY(1,1) PRIMARY KEY,        OrgName varchar(50) NOT NULL,        MainContactId int NULL,        CONSTRAINT [CheckOrgMainContact_Constraint] CHECK (dbo.CheckOrgMainContact(OrgId, MainContactId)=1)     )     GO      CREATE TABLE dbo.Contact     (        ContactId int NOT NULL IDENTITY(1,1) PRIMARY KEY,        OrgId int NOT NULL FOREIGN KEY REFERENCES dbo.Organization(OrgId),        FullName varchar(50) NOT NULL     )       GO     ALTER TABLE Organization      ADD CONSTRAINT FK_MainContact FOREIGN KEY (MainContactId)          REFERENCES dbo.Contact (ContactId)      GO      --let's get some date inot the tables     SET IDENTITY_INSERT Organization ON     INSERT INTO Organization (OrgId, OrgName)     VALUES(1, 'Google'),           (2, 'Microsoft'),           (3, 'Leidos');     SET IDENTITY_INSERT Organization OFF      SET IDENTITY_INSERT Contact ON     INSERT INTO Contact (ContactId, OrgId, FullName)     VALUES (1, 1, 'Homer'),            (2, 1, 'Marge'),            (3, 1, 'Bart'),            (4, 2, 'Bob'),            (5, 2, 'Linda'),            (6, 2, 'Gene'),            (7, 3, 'Frank'),            (8, 3, 'Dee'),            (9, 3, 'Dennis')     SET IDENTITY_INSERT Contact OFF       UPDATE Organization SET MainContactId = 1 WHERE OrgName = 'Google' --set this to a valid contact      UPDATE Organization SET MainContactId = 4 WHERE OrgName = 'Google' --try setting this to an invalid contact       SELECT o.OrgName, c.FullName FROM Organization o INNER JOIN Contact c on o.OrgId = c.OrgId --get all the contacts     SELECT o.OrgName, c.FullName as MainContact FROM Organization o LEFT JOIN Contact c ON o.MainContactId = c.ContactId

I want to have a one-to-many relationship in which for each parent, one or zero of the children is marked as a “favorite.” However, not every parent will have a child. (Think of the parents as questions on this site, children as answers, and favorite as the accepted answer.) For example,  TableA     Id            INT PRIMARY KEY  TableB     Id            INT PRIMARY KEY     Parent        INT NOT NULL FOREIGN KEY REFERENCES TableA.Id   The way I see it, I can either add the following column to TableA:      FavoriteChild INT NULL FOREIGN KEY REFERENCES TableB.Id   or the following column to TableB:      IsFavorite    BIT NOT NULL   The problem with the first approach is that it introduces a nullable foreign key, which, I understand, is not in normalized form. The problem with the second approach is that more work needs to be done to ensure that at most one child is the favorite.  What sort of criteria should I use to determine which approach to use? Or, are there other approaches I am not considering?  I am using SQL Server 2012.


I'm fairly new to blender and I want to build something similar to a rollercoaster. I already got the path and follow path constraint with F-Curve editor and everything down, but I need something more realistic. Is there a possibility to control the follow path constraint like it's driven by gravity? Like accelerating downhill and slowing down uphill and stuff like that - Just like a real roller coaster.   I suppose I could do It by putting a real car with wheels and such on a track and animate it with the rigid body tools, but that would require a good wheel construction with multiple wheels to keep the car from derailing... I think the path thing should be way simpler in terms of optimization, modelling and the overall mechanics, I just don't know how to do it. Do you?  I would be glad if someone could give me a hand with this!  all the best  Simon

I am trying to animate a rollercoaster. For now I have a cube following the Bezier path of the track. I need the cube to change its follow speed based on its height. (the higher it is, the slower it is).  How do I control follow speed based on the height of the object? Keyframing is not an option as the relationship is too complex.  I tried this with animation nodes, however height is affected by position on curve, which is affected by speed. Trying to control speed by height creates a paradoxical loop. Is there a way (in animation nodes or otherwise) to use the cube's current height, to determine its rate of change of position on the curve in the following frame?  Sidenote: I have an expression for speed (from physics energy formulas): speed = (200 - (2 x height))^0.5


Can I use a 47" 3d led hd tv with my pc to post process my photos? I am not sure how the quality will be on such a big screen photo being of some 4900x3600 approx.

Over the past weeks, I've been trying to get all of my color issues worked out. Getting closer, but I'm not there. I've calibrated my monitor with a friend's calibrator and that helped. I'm using the profiles provided by the local processor.  It's close. How close depends on the viewing angle.  So I'm thinking IPS monitor might be a good next step.  Googling around, I see that I could get an   Given that IPS based 22/23" monitors run $250-$300, this seems like a lot more monitor for not much more money.  What are the faults in this logic?


I have a path to a file and a path to a directory. The file is supposed to be somewhere (multiple levels) in that directory. I want to compare the beginning of the path to the file with the path to the directory. So what I basically do is:  if file_path.startswith(directory_path):     do_something()   Both paths are strings. Unfortunately, my path to the file includes ".." and ".". So it looks something like this: /home/user/documents/folder/../pictures/house.jpg. As the other path does not contain those dots, the comparison fails, obviously. Is there a way in python to remove those spots from the string? I thought of using path.join() from the os module, which did not work. Thanks a lot for any help :)

Given a path such as "mydir/myfile.txt", how do I find the file's absolute path relative to the current working directory in Python? E.g. on Windows, I might end up with:  "C:/example/cwd/mydir/myfile.txt"


im using T1-T2 in order to take the time delta and then i want to make it back into string I've trying the following code  layover_info = datetime.strptime(leg_info['dep_time'], '%H:%M') - start_waiting_time layover_info_str = layover_info.strftime('%H:%M')   but it doesnt work.. im getting the error  error: 'datetime.timedelta' object has no attribute 'strftime'

I'm having trouble formatting a datetime.timedelta object.  Here's what I'm trying to do:    I have a list of objects and one of the members of the class of the object is a timedelta object that shows the duration of an event.  I would like to display that duration in the format of hours:minutes.  I have tried a variety of methods for doing this and I'm having difficulty.  My current approach is to add methods to the class for my objects that return hours and minutes.  I can get the hours by dividing the timedelta.seconds by 3600 and rounding it. I'm having trouble with getting the remainder seconds and converting that to minutes.  By the way, I'm using Google AppEngine with Django Templates for presentation.


Hey guys I know it's bit weird situation, but if anybody face and resolved this problem before, would be able to help me. For example I have written
sydney's
in my html markup and It looks something like this on webpage - Sydneyâ€™s.   Platform I am using is Asp.net 2.0.  Thanks in advance.

I have a a string in c# initialised as follows:  string strVal = "£2000";   However whenever I write this string out the following is written:  Â£2000  It does not do this with dollars.  An example bit of code I am using to write out the value:  System.IO.File.AppendAllText(HttpContext.Current.Server.MapPath("/logging.txt"), strVal);   I'm guessing it's something to do with localization but if c# strings are just unicode surely this should just work?  CLARIFICATION: Just a bit more info, Jon Skeet's answer is correct, however I also get the issue when I URLEncode the string. Is there a way of preventing this?  So the URL encoded string looks like this:  "%c2%a32000"  %c2 = Â %a3 = £  If I encode as ASCII the £ comes out as ?  Any more ideas?


I was posed the following question recently:     Suppose a brand of cereal has four different toys included in their cereal boxes, each with an equal probability of being found: On average, how many boxes of cereal do you need to buy to get all four toys?   Since getting a toy in each box is an independent event and the probability stays constant, I guessed that you could model this using the binomial distribution:  \begin{align} X &= \text{number of unique toys}\\ X &\sim B(n, 0.25) \end{align}  Where $n$ is the number of trials. The probability function for getting four unique toys would therefore be:  $$P(X = 4) = {n \choose 4} \cdot 0.25^4 \cdot 0.75^{n-4}$$  So, to find the mean number of trials, I perform the infinite sum:  $$\sum \limits_{n=4}^\infty \left[n\cdot P(X=4)\right] = \sum \limits_{n=4}^\infty \left[n\cdot {n \choose 4} \cdot 0.25^4 \cdot 0.75^{n-4}\right]$$  Which, when I plug this into Wolfram Alpha returns $76$.   So, according to my calculation, on average you need to buy $76$ boxes of cereal to get all four toys. Is this right?

What is the average number of times it would it take to roll a fair 6-sided die and get all numbers on the die?  The order in which the numbers appear does not matter.  I had this questions explained to me by a professor (not math professor), but it was not clear in the explanation.  We were given the answer $(1-(\frac56)^n)^6 = .5$ or $n = 12.152$  Can someone please explain this to me, possibly with a link to a general topic?


I have the following equation, where I need to calculate x.  $$ C_x^0 + C_x^1 + \cdots + C_x^n = 2^n $$  I have expanded this to  $$ \frac{x!}{0! \times x!} + \frac{x!}{1! \times \left(x - 1\right)!} + \cdots + \frac{x!}{\times \left( x - n \right)!} = 2^n $$  Which can be rewritten as  $$ \sum_{k=0}^n \frac{x!}{k! \times \left(x - k \right)!} = 2^n $$  I got stuck here, so I tried to calculate $x$ for $n$ from $0$ to $3$.  For $n = 0$ $$ \frac{x!}{0! \times x!} = 1 \iff 1 = 1 \;\text{True for any $ x \in \Bbb N $} $$  For $n = 1$ $$ \frac{x!}{0! \times x!} + \frac{x!}{\times \left( x - 1 \right)!} = 2 \implies x = 1 $$  For $n = 2$ $$ \frac{x!}{0! \times x!} + \frac{x!}{1! \times \left( x - 1 \right)!} + \frac{x!}{2! \times \left( x-2 \right)!} = 4 \implies x \in \{2, - 3\} \implies x = 2 $$  For $n = 3$ $$    \frac{x!}{0! \times x!} + \frac{x!}{1! \times \left( x - 1 \right)!} + \frac{x!}{2! \times \left( x-2 \right)!} + \frac{x!}{\times \left( x - 3 \right)!} = 8 \implies x^3 + 5x = 42 \implies x = 3 $$  Did I do any mistakes so far? How would I go about calculating the general formula?  EDIT: Revised and got the right answers.

Here's how it is.  So I was studying some notes on Discrete Structures then I discovered this. Prove that $2^N = \binom{N}{0} + \binom{N}{1} + \binom{N}{2} + \dots + \binom{N}{N}$ Since I was new to this, I didn't quite understand it.  I tried using the binomial expansion but it confused me a little.  Can someone please help me solve this.  That would be great.


Here's my code: if __name__=='__main__':     while True:         r=float(input("\nEnter the radius of cylinder: "))         h=float(input("\nEnter the heir of the cylinder: "))         v=3.14*r*r*h;         print("\nThe volume of your cylinder is {0}" .format(v))         choice=input("\nDo you want to continue? (Y/N) ")         if choice == 'N' or 'n': #1             break;  Here's my output: Enter the radius of cylinder: 2  Enter the heir of the cylinder: 5  The volume of your cylinder is 62.800000000000004  Do you want to continue? (Y/N) n  Why is the output showing v as 62.800000000000004 and not as 62.8 as it should've been? How can I get 62.8 as output? Also, is my usage of or in #1 the right way to do it?

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


I would like to adjust the camera view, so I press the CtrkAlt0 to switch to the camera view window, then I try to adjust the camera window.    Then, I press the G key, and try to move the view window up or down, but finally, I see that all the objects were moved, not the camera view itself:    What causes this behavior?  BTW: I have just tried a very simple blender file (which only contains the default Cube, and I can correctly move the camera view), so are there some settings wrong in my first case? Thanks.  Edit:

I'm facing this frustrating "feature" that I can't seem to remedy; when I duplicate an object (and now, even when I create two completely new objects), their transformations/scaling is synchronized. This is extremely annoying when trying to use any sort of transformation keyboard shortcut.  It should be noted by going to the properties menu (N) and manually setting the properties works just fine.  For instance, here is just the camera selected (trust me, I made sure):   And when I try to transform by clicking+dragging on the X axis OR by hitting G->X, this happens:   They are not grouped (verified by going to the Groups list up in the Scene panel) and they do not have parents (verified by going to Object->Relations).  I have tried the unlink command as well, to no avail.  I have seriously run out of options; what did I change to have my G->X shortcuts transform multiple objects? It seems completely at random, too; certain objects seemed to be "linked" to other random objects, and this "linking" is guaranteed when duplicating even when I do a non-linking duplicate (Shift+D).  What gives?


I have come up with a theorem. (It probably doesn't qualify as a theorem, but I don't know what else to call it) This is what it states:  If  $$\lim_{x\to\infty}f'(x)$$ exists (is finite), then $$\lim_{x\to\infty}\frac{f(x)}x=\lim_{x\to\infty}f'(x)$$ I have yet to find a counterexample, and it just seems to make sense to me, but I can't actually prove it.  This "theorem" is crucial to an answer to a question that I was asked to give, but my answer won't be a very good one if I can't prove why it works.    What I've tried:  I have been able to prove it if $f(x)$ has a linear asymptote (I think my terminology is correct).  If:  $$\lim_{x\to\infty}f(x)=\lim_{x\to\infty}mx+b$$  Then:  $$\lim_{x\to\infty}\frac{f(x)}x=\lim_{x\to\infty}\frac{mx+b}x=m$$  But that doesn't work if there is no asymptote. Take $f(x)=\ln(x)$ for example. the $b$ in $mx+b$ would be infinite.

I'm trying to solve this question:     Let $f:[0,+\infty) \to \mathbb{R}$ be derivable and $\lim_{x \to +\infty} f'(x) = L$, then $\lim_{x\to \infty}\frac {f(x)}{x}=L$.   I'm trying to solve this question using l'Hôpital rule, but I couldn't use it, because I don't know if $\lim_{x\to +\infty} f(x)=+\infty$.  I need help.  Thanks a lot.


I saw this shot in so many movies: Cape Fear (1991) also.  So what is the name of this shot used?

While watching  I noticed a very characteristic camera shot. At a scene where the main character, Wendy, sits in her room at the computer (watching the supposedly foretelling fotos), her sister talks to her from the outside (asking if she can have the camera/fotos). There is a certain camera shot, where on the left side a frontal close-up of Wendy's face is shown, while on the right side you see her sister standing in full height inside the open door.    This shot immediately struck me as being somehow characteristic and out of place and infused feelings to me of some kind of older Hitchcock or Brian De Palma thriller or something the like. I also think to remember of having seen this kind of shot or something similar used in , where Jessica Lange is shown in front of the dresser talking to Nick Nolte who stands in the door or father away.  I would like to know if this technique has a certain name or theory behind it and where its origins lie, or if there is any particular director or movie who made this famous. It may be even that Final Destination 3 uses this especially in reference to some director or movie.


When I connect my external monitor it shows up in the audio settings.   That makes zero sense, as this monitor does not have any speakers.  How can I prevent it from popping up as an audio output option?

Since my Cinema Display is both connected through mDP and USB, I can (stupidly enough) both choose “LED Cinema Display” or “Display Audio”.  Also, I never use the internal speakers since they sound extremely tinny.    How do I remove/delete/disable unwanted audio devices? It must be possible somehow!


I want to apply a alert pop on browser back button or reload button when exiting from current landing page (or switching from current page). ** I am using this code. <script> $(window).on('beforeunload', function() { var c = confirm();  if (c) { return true;  } else  return false;  });  </script>  Result: I am getting an alert popup on the browser back button after clicking on any hyperlinks or buttons on my current landing page. Looking for the result: An alert popup on the browser back button should come without clicking on any hyperlinks or buttons on my current landing page. Scenario ** : After landing on my desired page, if I clicked on the browser back button directly (without any click on the current landing page) then it should give me an alert pop (eg : content has not been saved, do you want to save it). Can someone please help me in that.

I am currently looking at the "unload" event of a window to try to determine how the "unload" event was triggered, but am having little success. Is there a way to determine how the javascript event was triggered?   Page Refresh Back Button (or navigate away from the page) Closing the Browser   Essentially I need to execute some code only when the browser window is being closed, not refreshed or navigated away from.  Purpose: When a customer does an update of our software, the update will redirect their first Internet request to an offer page. There is a button for a "Do Not Bother" option, but some users will simply close their browser. Upon closing the browser, I need to duplicate the "Do Not Bother" functionality so the user no longer gets redirected to the offer page. Simply attaching to the "unload" event will not work due to the different ways of leaving a page.


The locate command on ubuntu is so great that I miss it a lot on Windows 7.  Do you know of an alternative?  Ok I found this but it's not great:    Thank you

Using the Windows CLI (cmd), how does one locate a file that he knows part of the name of? For instance, every single Windows workstation installs javac in a different location, how would one find it from the Windows CLI (cmd)?  Googling I see mention only of using the Windows Explorer (file manager) GUI or downloading some freeware application. Does Windows really not have a locate command built in? Do the server editions have it? I do not want to install cygwin or anything else, these are typically not my machines.


Find all integers m such that $0 < m < 1008$ and $\gcd(m, 2016-m) = 1$.  The following is my solution: Note that $1 = \gcd(m, 2016-m) = \gcd(m, 2016)$. Since $2016$ is even and divisible by $3, 7, 9, 21, 63$ and $\gcd(m, 2016) = 1$, so $m$ is odd and $m\neq 3k, 7l$, where $k, l\in \mathbb Z,$ and $k, l$ are odd numbers. Since $0 < m< 1008,$ we deduce that $1\leq k\leq 335, \ 1\leq l\leq 143$ and $k, l$ are odd. We set $$A = \{3k|\ k\in\mathbb Z,\ 1\leq k\leq 335,\ k \mbox{ odd}\}$$ and $$B = \{7l|\ l\in\mathbb Z,\ 1\leq l\leq 143,\ l \mbox{ odd}\}.$$ Then, we have $|(A\cup B)\setminus (A\cap B)| = 168 + 72 - 48 = 192.$ On the other hand, from $1$ to $1008$ we have $\frac{1007-1}{2} + 1 = 504$ odd numbers. Combining these data, we conclude that there are $504 -192 -24 = 288$ positive integers $m$.

Given: $a = qb + r$. Then it holds that $\gcd(a,b)=\gcd(b,r)$. That doesn't sound logical to me. Why is this so?    Addendum by LePressentiment on 11/29/2013: (in the interest of  and averting a duplicate)  What's the intuition behind this result? I only recognise the proof and examples solely due to algebraic properties and formal definitions; I'd like to apprehend the result naturally.


We know that we can operate addition$(+)$ , subtraction$(-)$ , multiplication$(×)$ on a matrix. But why we can't operate division $(÷)$ on a matrix?...  Sorry for my bad english

Is it possible to divide a matrix by another? If yes, What will be the result of $\dfrac AB$ if $$         A = \begin{pmatrix}         a & b \\         c & d \\         \end{pmatrix},         B = \begin{pmatrix}         w & x \\         y & z \\         \end{pmatrix}? $$


For example, when referencing the model we presented in the paper,     The presented model is helpful to many other related   researches.   or      The model presented is helpful to many other related   researches.   If it is proposed, I think both is OK, and proposed model might be slightly better in academic writing? What about presented?  I also see sentences like      The model presented in this section gives a brief introduction on the   use of the COMSOL ECRE Version.

I comforted a crying kid. I comforted a kid crying.   Is there any difference of the two sentences above in meaning?


Trying to produce this as output 1H, 2i, 3p, 4p, 5o, 6p, 7o, 8t, 9a, 10m, 11u, 12s, but keep receiving 1 H, 2 i, 3 p, 4 p, 5 o, 6 p, 7 o, 8 t, 9 a, 10 m, 11 u, 12 s, animal = "Hippopotamus"  for i, letter in enumerate(animal):     print(i + 1, letter, end = ", ")  1 H, 2 i, 3 p, 4 p, 5 o, 6 p, 7 o, 8 t, 9 a, 10 m, 11 u, 12 s,

I'd like to do it in Python. What I'd like to do in this example in C: #include <stdio.h>  int main() {     int i;     for (i=0; i<10; i++) printf(".");     return 0; }  Output: ..........  In Python: >>> for i in range(10): print('.') . . . . . . . . . . >>> print('.', '.', '.', '.', '.', '.', '.', '.', '.', '.') . . . . . . . . . .  In Python print will add a \n or space, how can I avoid that? Now, it's just an example, don't tell me I can first build a string then print it. I'd like to know how to "append" strings to stdout.


I have some code that seems to me like it ought to work but throws an error when compiling. The header file (min.hpp): #include <type_traits>  namespace test {      template <typename T1>     T1 min(T1 a);     template <typename T1, typename ... Args>     typename std::common_type<T1, Args...>::type min(T1 a, Args ... args);  }  The implementation (min.cpp): #include <type_traits>  namespace test {      template <typename T1>     T1 min(T1 a)     {         return a;     }     template <typename T1, typename ... Args>     typename std::common_type<T1, Args...>::type min(T1 a, Args ... args)     {         typename std::common_type<Args...>::type b = min(args...);         return a > b ? b : a;     }  }  Calling the function (demo.cpp): #include <cstdio> #include "min.hpp"  int main() {     int x = test::min(1, 2, 3);     std::printf("%d\n", x);      return 0; }  Compiling: g++ min.cpp demo.cpp -std=gnu++17 -o main Error message: Undefined symbols for architecture x86_64:   "std::__1::common_type<int, int, int>::type test::min<int, int, int>(int, int, int)", referenced from:       _main in demo-5e729b.o ld: symbol(s) not found for architecture x86_64  However, the code works fine if I move the main() function from the separate file to min.cpp. Why do I get this error and how can I fix it?

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


Prove that for every natural number n, there exists a polynomial p(x) with integer coefficients such that p(1), p(2),......,p(n) are distinct powers of 2.

Does there exist a polynomial $f$ with integer coefficients such that for every natural number $n$, $f(0) , f(1) ... f(n) $ are all distinct powers of 2 ?   I have no clue about how should I start thinking about this problem but I felt that it is very interesting.


I'm trying to read double values from a file into a std::vector. However, I've noticed that the values do not match what is on the file, but has a slight but consistent shift of ~0.000000007. Is this normal? #include <iostream> #include <fstream> #include <iomanip> #include <string> #include <vector>   std::vector< double > readFromFile(const std::string& file_name) {     std::vector< double > values;     std::ifstream file(file_name.data(), std::ios::in);     file.precision(9);   // makes no difference     double value = 0.0;     if (file.is_open()){         while (file >> value) {             values.push_back(value);         }             file.close();     }     return values; }  int main(int argc, char const *argv[]) {      auto vals = readFromFile("src/samples.txt");      std::cout.precision(9);     for (auto& val : vals) {         std::cout <<  std::fixed << val << std::endl;     }      return 0; }  My samples.txt: 1595519203.966806166 1595519204.000087015 1595519204.033377640 1595519204.066651098  And the code output: 1595519203.966806173 1595519204.000087023  1595519204.033377647 1595519204.066651106  This is something I have never dealt with, and am left wondering if the issue is in how the file is read, or in how I am printing it.

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


I'm trying to make a 20 of my instances which are separated meshes, to look like on in particular (indicated in Red). I'm using ctrl+L to link the object data, but once it's applied, all the instances disappear except for the one (indicated in Red)

When I try to copy object data from one mesh object to multiple objects, the rest of the objects disappear, and the object data is only copied to one object. I don't know what I'm doing wrong. Any help would be appreciated.  Problem below (.gif):


I am trying to draw multiple circles using Array list without over lapping so I am using the CheckDistance function to check the x an y of the next shape that is gonna be drawn but it shows me an error of stackoverflow   I have to save them in array to be able to retrieve each shape to do some other functionality on it.   here is my code:  public class Algo  {     public static void main(String[] args)      {         new Algo();     }      public Algo()      {         EventQueue.invokeLater(new Runnable()          {             @Override              public void run()             {                 try                  {                     UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());                 }                  catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex)                   {                     ex.printStackTrace();                 }                  JFrame frame = new JFrame("Airport");                  frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);                  frame.add(new CountriesPane());                  frame.pack();                  frame.setSize(700, 700);                  frame.setLocationRelativeTo(null);                  frame.setVisible(true);             }         });     }      public class CountriesPane extends JPanel     {         private List<Country> Countries = new ArrayList<>(100);          public CountriesPane()         {             for (int index = 0; index < 50; index++)              {                 Countries.add(new Country());             }         }          protected void paintComponent(Graphics g)          {             super.paintComponent(g);              for (Country Country : Countries)             {                 Graphics2D g2d = (Graphics2D) g.create();                  Country.paint(g2d);                  g2d.dispose();             }         }     }      protected static final Random random = new Random();      public double x1;      public double y1;      public class Country     {         private int height = 20;          private int width = 20;          private double x2;          private double y2;          private double space = 10;          private Ellipse2D shape;          private String Name;          public Country()         {             CheckDistance(this);              shape = new Ellipse2D.Double(x2, y2, width, height);         }          public void paint(Graphics2D g2d)         {             g2d.setColor(Color.BLUE);              g2d.fill(shape);         }     }      public void CheckDistance (Country Co)      {         Co.x2 = random.nextInt() + Co.space;          Co.y2 = random.nextInt() + Co.space;          double distancex = Co.x2 - x1;          double distancey = Co.y2 - y1;          if (distancex <= Co.width || distancey <= Co.height)         {             CheckDistance(Co);         }         else         {             x1 = Co.x2;              y1 = Co.y2;         }     } }

What is a StackOverflowError, what causes it, and how should I deal with them?