I would like to test the time required by certain methods and SQL queries in my code. I've tried doing the following:  DateTime start = DateTime.Now;  //Do something  DateTime end = DateTime.Now;  TimeSpan ts = end - start;  int millis = ts.Milliseconds;   But I just don't feel that this is the right way of doing it. I often get back a value of 1 for some methods and values like 200 for others, are there any accurate ways to measure and record this kind of thing?

I need to find a bottleneck and need to accurately as possible measure time.  Is the following code snippet the best way to measure the performance?  DateTime startTime = DateTime.Now;  // Some execution process  DateTime endTime = DateTime.Now; TimeSpan totalTimeTaken = endTime.Subtract(startTime);


New to DNN. I have the following dataset   My target value is "Purchase" column. I know I need to drop "product_id" column and create dummies for "Gender" and "City_category", but do i need to do onehotencoder on any other column even if they are not categorical?  (for instance Stay_In_City_Years) If so, can you explain the reason.  thanks for any help

I'm wondering what the value is in taking a continuous predictor variable and breaking it up (e.g., into quintiles), before using it in a model.   It seems to me that by binning the variable we lose information.   Is this just so we can model non-linear effects?  If we kept the variable continuous and it wasn't really a straight linear relationship would we need to come up with some kind of curve to best fit the data?


i have an array that i encode using '$args = json_encode($arr)' and then i create an sql command using $sql = "INSERT INTO log (/*...*/,`arg`) VALUES (/*...*/,'$args')";  which i then execute. It usually works very well, except when i have a string conating the character " like $name = 'Lore "Ipsum" dolor'; In the resulting sql command this looks like this: INSERT INTO... VALUES(..., '{"name": "Lore \"Ipsum\" dolor"}') which prosudes an Error

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


At the moment my headings are as follows: Chapter 1 Title of chapter Is there anyway to reformat the headings so that they are all on one line? i.e. Chapter 1: Title of chapter

This is what I want:     Chapter 1 : Introduction   but I always get:     Chapter 1       Introduction   How do I do this?


Is there a way to review suggested edits, low quality posts, late answers, etc. through the Stack Exchange application?  If yes, please explain how.  If not, will this be considered as a feature request?  I am currently using the SE Android app.

I know there are some similar posts on adding review queues to the mobile web page. However, this is regarding the Stack Exchange Android app. I really would like to review posts and edits from the Android app, however this isn't included in the app yet. I'm not sure how it would be implemented; maybe there could be a button or something for review. Could we please see this?


In how many ways can you sit 12 men and 12 women on a bench, so that no 2 women sit next to each other? There are 2 possible ways to sit them: 1 - In the first sit (from the left) sits a man, and then a woman, men, woman ... until the last (24'th) sit that's occupied by a man. 2 - In the first sit (from the left) sits a woman, and then a man, woman, man... until the last (24'th) sit that's occupied by a woman. So my answer was $2\cdot12!\cdot12!$ but apparently it's incorrect beause the book says $13!\cdot12!$ What did I do wrong? My answer looks ok to me :(

There are $12$ women and $12$ men. How many ways are there to sit them all on a bench where no woman can sit next to another woman?  Thank you.


How is $\ a^{\log_nb} = b^{\log_na} $ ?   I know this is likely a trivial identity but I don't see how the statements are equivalent.  I came across this equivalence in Chapter 4.4 of Introduction to Algorithms, CLRS

I have been hit with a homework problem that I just have no idea how to approach. Any help from you all is very much appreciated. Here is the problem  Prove the equation: $a^{\log_b c} = c^{\log_b a}$  Any ideas?


I'm trying to get anything inside {{{#!MyTestMacro and }}} using java regex groups, couldn't get there. Basically I want to remove {{{#!MyTestMacro and }}} which surrounds the content inside it.  Below is my code snippet.  File file = new File("mytestfile.txt"); FileInputStream fis = new FileInputStream(file); byte[] data = new byte[(int) file.length()]; fis.read(data); fis.close(); String str1 = new String(data, "UTF-8");  String pattern = "\\{\\{\\{\\s*#!MyTestMacro(.*?)\\}\\}\\}"; Pattern r = Pattern.compile(pattern, Pattern.MULTILINE); Matcher m = r.matcher(str1); if (m.find()){     System.out.println("Found value: " + m.group(0));     System.out.println("Found value: " + m.group(1)); } else {     System.out.println("NO MATCH"); } str1 = str1.replaceAll(pattern, m.group(1)); System.out.println(str1);   Input:  {{{#!MyTestMacro  My desired content. My desired content2.  }}}   Expected Output:     My desired content. My desired content2.

For example, this regex  (.*)<FooBar>   will match:  abcde<FooBar>   But how do I get it to match across multiple lines?  abcde fghij<FooBar>


Question is:  Let $n$ represent a positive integer.  Describe the largest set of values $n$ for which you think that $2^n < n!$  I'm not sure I get this question. For $n > 3$, it seems like $2^n$ is always less than $n!$ So how would I prove this description correct? Would I use principle of simple induction?  Thank you for your help.

I just want to know if my proof to this question is correct. First, I proved it was true for $n = 4$. $$4!>2^4$$ $$24>16$$ Then, I assumed that it was true for $n=k$. $$k!>2^k$$ Afterwards, I tried to prove it for $n=k+1$. $$(k+1)!>2^{k+1}$$ $$(k+1)k!>(2)(2^k)$$ Since $k!>2^k$, am I allowed to simply do $$(k+1)(2^k)>(2)(2^k)$$ $$(k+1)>2$$ and this is true for all $k\geq3$. Would the last two steps be illegal because I only assumed that $k!>2^k$ is true?


I was watching a UV wrapping tutorial and got stuck as the version of blender they use is different to mine.  I looked in the comments and people said that the way to fix it was to turn on cycles render. However, they do not specify where to find this. So I'm stuck.  Any ideas?

I'm new to blender. How do you change the render engine?   According to this video, the button should be along the top. I've searched google, and the blender documentation with no luck.


New to the MEAN stack, trying to make an API response I have properly available to the res.render jade template below.  exports.jap = function(req, res){   var client = new BasicAuth();   client.authenticate(function(err, response, body, cookie) {     var client = new Api('sample.com', cookie);     client.getProducts(function(err, response, body) {         console.log(JSON.stringify(body['result']));         var result = body['result'];         console.log(result);     });   });    res.render('lang', {       title: "灾情 (Mandarin)",       reqFor: "申请人",       product: "产品",       problem: "问题",       results: result // I would like my result var from above accessable here   }); };   Right now I'm getting result is not defined

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


I have a select, lets call it A. When i choose an option from A, with ajax, i load an another select with options into a div. Lets call this second select B.  I have some ajax onchange code on B, but it does nothing, and it gives no error also.  I think, the "site doesnt see the B select", because it isnt in the source code, ajax loads it into a div.  What would be the solution for this?  $('#fizetes_select').on('change', function() {     var SelectedValue = this.value;     if(SelectedValue != 0 )     {         $.ajax({              type: 'POST',              url: 'files/get_fizetes_text.php',              data: { id: SelectedValue },              dataType: "html",              cache: false,              beforeSend: function(){                 $('#preloader_fizetes').show();              },              success: function(data)              {                  var result = $.trim(data);                  $('#fizetes_result').html(result);              },              complete: function(){                 $('#preloader_fizetes').hide();              }         });     }     return false; });   Thats the onchange code for the B select, i only want to display some text with it. The ID-s are correct, i didnt write it bad, i chekced. Its in document ready.

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


I want to install ntpstat in Ubuntu for checking if NTP is working.

How can I install applications like Google Chrome on Ubuntu?  Are there any commands to install an application?    Index of answers:


I have a directory that I is filled by another user, and I'm tasked with maintaining it. I want to delete all its content except a 2 files with a specific name. Is it possible with rm or should I do this:  cp aaa/a ./a && cp aaa/b ./b && rm -rf aaa/* && mv ./a aaa/a && mv ./b aaa/b   where aaa is the directory, a,b are the files I want to keep, and there are (at least, there may be) other files/directories in there.  Is there a better (and shorter) way?

I have a folder containing a lot of folders and different files with the following structures :  NASA │ ├── a │   ├── doc1 │   ├── doc2 │   ├── doc3 │   ├── folder1 │   └── folder2 │ ├── b │   ├── doc1 │   ├── doc2 │   ├── doc3 │   ├── folder1 │   └── folder2 │ ├── c │   ├── doc1 │   ├── doc2 │   ├── doc3 │   ├── folder1 │   └── folder2 │ ├─ x ├─ y └─ z          I want to delete the content of the folder (NASA/) except specified folders and files.   For example I want to keep a folder, b folder and x file.     I tried   :   rm !(a/) -r NASA/   And (as explained in the answer ):  find NASA/ -type f ! -iname "x" -delete   But this is not very straight forward and I have to use a bash script.    Am I missing a more easy way ? How can I do this in a single command?


I canned a bushel of pickles 2 weeks ago.  When I finished up that morning,  all the jars were sealed.  This morning I noticed that about a dozen jars were not sealed.  Just the opposite.  The lids were puckering out to the point of bulging the lids out.  I have been canning for more than ten years and I have never seen this before.  What would cause this and are they safe?

My wife has been trying to can some foods using the canning techniques that she's familiar with from Romania, but with the American-style canning jars and lids that we get here. This involves packing the jar with the canned goods, filling the jar with boiled brine to near the top, and then manually closing the lid. The jars are not immersed in boiling water with their lids on, as is recommended by most American canning guides.   Is this technique safe? Why do American canning guides insist on boiling the jar after it's closed? Several of our jars, after cooling, have the lids popped out and slightly convex rather than concave. Is this a problem? What causes this?


I took as many screen shots to help explain what is going on. I have 17.04 and want to upgrade to Ubuntu 18.04 LTS “Bionic Beaver.

I am currently using Ubuntu 10.04. I know there is a 10.10 release, but can I upgrade directly to 11.04? Could you walk me through the steps please?


I insert   \begin{figure}[ht!] \begin{center} \includegraphics{figure 1.png} \end{center} \caption{First question} \label{fig1} \end{figure}   and the figure and title are appeared correctly but above the figure is appeared 1.png.  How can i omit this?

I am writing a LaTeX document with the apacite and graphicx package. The issue is when I include an image either using figure with an enclosed \includegraphics or \includegraphics by itself it shows the image with the file name to the side.  For example:              --------------             |             |             |    BOX 1    |               --------------- Error1.jpg   I do not want it to write Error1.jpg. Would show the image but it seems I do not have enough rep.  This is an example tex file to show the error (with Windows XP, using Miktex 2.8).  \documentclass[man]{apa} \usepackage{apacite} \usepackage{graphicx} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \begin{document}   \includegraphics{Example Error1.jpg} \begin{figure}[htb] \includegraphics{Example Error1.jpg} \caption{This is the caption of the figure.} \label{fig:fig2} \end{figure} \end{document}


With C/C++ structs, normally, the final struct's size is the plain sum of the sizes of all its elements, but there are cases which this is not true.  I am looking at the technical answer (it has to be one) of why the following struct's size is not equal to the size of all its members:  #include <iostream>  struct {     int a;     long b;     char c; } typedef MyStruct;  int main() {     MyStruct sss;     std::cout << "Size of int: " << sizeof(int) << std::endl << "Size of long: " << sizeof(long) << std::endl << "Size of char: " << sizeof(char) << std::endl;     std::cout << "Size of MyStruct: " << sizeof(sss) << std::endl;     return 0; }   Thas has the following output:  Size of int: 4 Size of long: 8 Size of char: 1 Size of MyStruct: 24   So it can be seen than the size of MyStruct is not 4+8+1 (13) rather, it is actually 24, but why?

Why does the sizeof operator return a size larger for a structure than the total sizes of the structure's members?


I have string like 10000005 (and it is hex) and i want to make uint hex value like: 0x10000005  How can i do this?  Example:  string hexStr="10000005" uint hex= //???  (0x10000005);   P.S. I need that hex should be : 0x10000005

uint color;  bool parsedhex = uint.TryParse(TextBox1.Text, out color);  //where Text is of the form 0xFF0000 if(parsedhex)    //...   doesn't work. What am i doing wrong?


I always seem to have grief with Nvidia drivers and have often had to re-install Ubuntu: is there a better way to remove them? When I first installed the drivers, the display came up on 640 by 480.  I managed to set 2 screens to 1024 by 780 which was usable, but then Ubuntu recommended installing proprietary drivers (nvidia-current-updates 295.40-ubuntu1). After doing this and re-booting it shows LAPTOP and offers only 640 by 480 on a single screen.   Is there any way to revert to the original driver? Is there any way to find out if the new drivers work before installing them? - For years I have been hoping that it would be all fixed in the latest release… I always seem to fall for this!

As expected, Nvidia drivers have reduced my customizations. I can't login to Unity 3D session. I can't find any content to help me to uninstall the driver and I don't know what to do as I have never uninstalled them before.


In the limit as $\epsilon \to 0$, obtain a three-term asymptotic solution to the roots of the following equation.  $$\epsilon x^3+x^2-2x+1=0$$  I'm not too sure where to start

In the limit as $\epsilon \to \infty$, obtain a three-term asymptotic solution to the roots of the following equation.  $$\epsilon x^3+x^2-2x+1=0$$  What I've done so far  I've assumed $x=O(\epsilon^r)$ as $\epsilon \to \infty$ therefore,  $\epsilon x^3=O(\epsilon^{1+3r})$  $x^2=O(\epsilon^{2r})$  $x=O(\epsilon^{r})$  $1=O(\epsilon^{0})$  I'm not too sure what needs to be done from here. any help would be much appreciated.


I have already completed my PhD in Earthquake Engineering with soil dynamics specialization and recently joined as an assistant professor in a state university. In my PhD, although I got couple of publication but I am not satisfied with my work, I could have done way better than what I did in my PhD. So, I want to pursue another PhD in a related field like Geotechnical Engineering. How far it will be effective? And is it possible to apply for another PhD in a related area?Sometimes I feel attracted to change my research direction, I am really fascinated about space and time, would it be a good idea to change my research area to theoretical physics this time, and what are the possibilities to change my research direction into theoretical physics? Please advice.

I am studying a combined bachelor of engineering (electrical) and bachelor of mathematics; I just started this year and will graduate in 2018. The reason why I am doing double degrees and not a single degree is because I love both electrical engineering and mathematics and I could not ignore any of them. So with this in mind, I am thinking of doing two PhDs when I graduate (one in electrical engineering and one in mathematics). Is this a good path or I should concentrate on only one of them?


In organizations sometimes we refer to the manager of a manager as the "grandfather".  For example "candidates for senior level positions must go through a grandfather's interview" meaning those candidates must be interviewed by the hiring manager's manager.  Is there another way of saying this that is more neutral with respect to gender and isn't awkward "manager's manager" or weird "grand-boss"?  I've thought "Überboss" or "grand-manager" or something, but these seem a little too contrived.

As the title says, is there another expression for "my manager's manager"?  For example, in the large company I currently work for, there are 4 managers and the CEO above me.  If there is no single expression for the manager's manager, what do people use to refer to that person's manager? Is it just "manager's manager's manager"?


Why is there no apostrophe 's' after “election body” in the following sentence? Congress goes to top Court over election body 'inaction' on PM's speeches.

Sometimes it’s possible to use either a noun adjunct or the possessive case.     the shop door   the shop’s door   However, in certain phrases it’s not OK to do so.     the ship’s crew (the ship crew is wrong)   The questions are:   How can one find out what to use in such cases as “the shop(’s) door” when a noun adjunct option and the possessive case option are available?  How can one know which option is wrong in order to avoid the construction “ship crew”? Is there a difference in meaning between (a) the shop door (b) the shop’s door?


So, I was practicing functions loops etc. and I stuck on doing this.I am pretty beginner on programming but I search a lot which makes me learn real faster. (By the way I tried my code to check if the input from user is number or not. )   printf("Define numbers.\n");         printf("Select: ");         scanf("%d", &x);         printf("Select: ");         scanf("%d", &y);         if (y = temp)         {             printf("Division of something by 0 is undefined.\n");         }         else         {             printf("Division of %d and %d is %d\n", x, y, div(x, y));         }   So I declared temp = 0 I thought it would do the trick but it didnt.

It seems that   if (x=y) { .... }   instead of  if (x==y) { ... }    is a root of many evils.  Why don't all compilers mark it as error instead of a configurable warning?  I'm interested in finding out cases where the construct if (x=y) is useful.


It is a question listed on Glassdoor of DRW. Link for reference:  Question:  Let $x$ ~ Uniform$(0,1)$ and $y$ ~ Uniform$(0,2)$ be independent random variable. What is the expected value of $|x-y|$  I thought it is will be just an application of Linearity where the expectation of the sum is equal to the sum of the expectation. So $E[|x-y|] = |E[x] - E[y]| = |0.5 - 1| = 0.5$ But apparently, the answer from glassdoor is quite different with an answer of $\frac{1}{4}$ and another being $\frac{3}{4}$, with integrals and what not. I wonder what is the correct approach here?

Let $X \sim U(0, 1)$ and $Y \sim U(0, 2)$ be independent random variables. What's the expected value of $|X - Y|$? I found $f_{X}(x) = 1$ and $f_{Y} = \frac{1}{2}$ so that $f_{XY}(x, y) = \frac{1}{2}$ and $$\mathbb{E}[|x - y|] = \int_{0}^{1} \int_{0}^{2} \frac{|x - y|}{2} \mathop{dy} \mathop{dx},$$ but how can I compute this quantity? It looks tricky. I know the trick where you split the integral in the one-dimensional case, but I'm having trouble getting it in the two-dimensional case.


Say a red colour with 400nm mixes with blue colour with 700nm, but out of phase by a little. What would be the resultant colour?  I would know how to represent the resulting wave mathematically, but what colour is it? Is the colour only determined by the resulting wavelength?

Observation:  So, I know that all computer screens are able to project many different colors by varying how they display the RGB (Red, Green, Blue) pixels.  Question  What's the difference between say, yellow light (575 nm) from sunlight vs. the same yellow light that's displayed on the computer screen? Aren't they different? Is our brains mixing together the RGB lights together and its being interpreted as yellow light or is yellow light the same (575 nm) light that comes from sunlight actually hits our eyes?  Relationship between Fourier Series and light?  1) So I know that in Fourier Series, you have basis functions, sines and cosines that make up any other function depending on the coefficients that are in front of the sines and cosines terms.  2) I know that RGB colors on a screen are the "basis" for all the other colors that a computer screen makes up and the intensity of each of the RGB are like the "coefficients". So, am I making the correct relationship here?


I have two Macs, each with ^-1 through ^-4 configured to switch between Mission Control desktops in Keyboard/Shortcuts. When I use Screen Sharing, these shortcuts always go to the local Mac, never to the remote Mac, regardless of whether the remote Mac otherwise has focus.  If I go into Keyboard/Shortcuts and disable these on the local Mac, I can then use them on the remote Mac. However, it's a hassle to toggle these every time I start/stop using Screen Sharing. Is there a way to get the local Mac to stop grabbing the shortcuts?

I'm using the built in Screen Sharing tool in El Capitan to control an iMac from a Macbook Pro in full screen mode. Everything works beautifully except that many special keys and gestures are intercepted by the local Mac and not sent to the shared Mac. Specifically:   Ctrl-Arrow (Desktops and Mission Control) F3 (Mission Control) F4 (LaunchPad) Three finger swipe (Switch between Desktops, Mission Control, Exposé) Two finger swipe from left side (Notification Center) Pinch with four fingers (Launchpad)   I can't find any way to switch between desktops on the remote machine other than manually opening the Mission Control app from the Finder or Dock. Disabling the gestures on the local machine doesn't help; they still don't get sent to the remote machine.  Is there any way to get special keys and gestures passed to the shared machine?


Is it true that any set $P$ can be endowed with a total order $"\leq" \subseteq P\times P$?

Consider this statement: "every set can be linearly ordered." Can we prove it without AC?


I'm trying to convert my three DEM products (colour, hillshade and slopeshade; the latter two generated using gdaldem) from EPSG:4326 -> EPSG:3857 using gdalwarp, via the command:  gdalwarp -of GTiff -s_srs epsg:4326 -t_srs epsg:3857 -co "tfw=yes" {src} {dst}   This works fine for the colour geotiff, but the resulting hillshade and slopeshade geotiffs now appear blank.  Sample output from gdalinfo for the slopeshade geotiff is below, with links to the original and converted files at the bottom.  gdalinfo before:  Driver: GTiff/GeoTIFF Files: slopeshade_dem.tif Size is 4557, 3577 Coordinate System is: GEOGCS["WGS 84",     DATUM["WGS_1984",         SPHEROID["WGS 84",6378137,298.257223563,             AUTHORITY["EPSG","7030"]],         AUTHORITY["EPSG","6326"]],     PRIMEM["Greenwich",0],     UNIT["degree",0.0174532925199433],     AUTHORITY["EPSG","4326"]] Origin = (-121.460761599999998,38.583444700000001) Pixel Size = (0.000000654597323,-0.000000654598826) Metadata:   AREA_OR_POINT=Area Image Structure Metadata:   INTERLEAVE=PIXEL Corner Coordinates: Upper Left  (-121.4607616,  38.5834447) (121d27'38.74"W, 38d35' 0.40"N) Lower Left  (-121.4607616,  38.5811032) (121d27'38.74"W, 38d34'51.97"N) Upper Right (-121.4577786,  38.5834447) (121d27'28.00"W, 38d35' 0.40"N) Lower Right (-121.4577786,  38.5811032) (121d27'28.00"W, 38d34'51.97"N) Center      (-121.4592701,  38.5822740) (121d27'33.37"W, 38d34'56.19"N) Band 1 Block=4557x1 Type=Byte, ColorInterp=Gray   Mask Flags: PER_DATASET ALPHA  Band 2 Block=4557x1 Type=Byte, ColorInterp=Alpha   gdalinfo after:  Driver: GTiff/GeoTIFF Files: slopeshade_dem.tif Size is 4088, 4105 Coordinate System is: PROJCS["WGS 84 / Pseudo-Mercator",     GEOGCS["WGS 84",         DATUM["WGS_1984",             SPHEROID["WGS 84",6378137,298.257223563,                 AUTHORITY["EPSG","7030"]],             AUTHORITY["EPSG","6326"]],         PRIMEM["Greenwich",0],         UNIT["degree",0.0174532925199433],         AUTHORITY["EPSG","4326"]],     PROJECTION["Mercator_1SP"],     PARAMETER["central_meridian",0],     PARAMETER["scale_factor",1],     PARAMETER["false_easting",0],     PARAMETER["false_northing",0],     UNIT["metre",1,         AUTHORITY["EPSG","9001"]],     EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext  +no_defs"],     AUTHORITY["EPSG","3857"]] Origin = (-13520950.132675198838115,4662178.034760829061270) Pixel Size = (0.081230547006284,-0.081230547006284) Metadata:   AREA_OR_POINT=Area Image Structure Metadata:   INTERLEAVE=PIXEL Corner Coordinates: Upper Left  (-13520950.133, 4662178.035) (121d27'38.74"W, 38d35' 0.40"N) Lower Left  (-13520950.133, 4661844.583) (121d27'38.74"W, 38d34'51.97"N) Upper Right (-13520618.062, 4662178.035) (121d27'28.00"W, 38d35' 0.40"N) Lower Right (-13520618.062, 4661844.583) (121d27'28.00"W, 38d34'51.97"N) Center      (-13520784.097, 4662011.309) (121d27'33.37"W, 38d34'56.19"N) Band 1 Block=4088x1 Type=Byte, ColorInterp=Gray Band 2 Block=4088x1 Type=Byte, ColorInterp=Undefined   Links to the slopeshade file before conversion (in EPSG:4326):    Links to the slopeshade file after conversion (in EPSG:3857):

I'm trying to convert  to EPSG:3857, but when I run:  gdalwarp -of GTiff -s_srs epsg:4326 -t_srs epsg:3857 -co "tfw=yes" original.tif converted.tif   I just get a black TIF do you know what I am doing wrong?  Command output  > gdalwarp -of GTiff -s_srs epsg:4326 -t_srs epsg:3857 -co "tfw=yes" original.tif converted.tif Creating output file that is 4088P x 4105L. Processing input file original.tif. Using band 2 of source image as alpha. 0...10...20...30...40...50...60...70...80...90...100 - done.


I asked a  5 days ago. Now I know that there are no solutions for what I was searching for.   So there can't be a correct answer, so I never can mark any answer as the correct one. What should I do now? Let the question be unanswered or should I write something?   I won't delete the question, because it's a positive upvoted question, so other users are might also interest in a solution or want know that there is no solution.

The FAQ mentions bounty, but sometimes a question just doesn't really have a right answer:   No solution exists The question as written is unanswerable and unsalvageable There may be a technically correct answer, but the asker is unable to utilize it for some reason.   In these cases, a bounty, and more answers, won't really help. What is the appropriate etiquette in these cases? Should the question be closed? Left hanging?


In this , the OP had a bunch of syntax errors in his program. I simply went through and fixed them all, and judging from the fact that he accepted my answer, there was nothing else (in his view) wrong with the program. I also did this for another question, although my answer was slightly incorrect and so I deleted it.  From what I can see, these questions are a bit more rare than your average "fix my typo" questions because it's an entire program, rather than just a missing semi-colon or whatever. However I was wondering if the question is off topic since the only issue was numerous syntax errors.

Recently, I've seen many questions with this structure:   a wall of code a request for the community to debug it by inspection   You can find a nice selection .  I offer, as a thesis, that these questions are not consistent with the stated goals of SO. They do not, usually, create a resource of use to other people.   As a community, we could politely but firmly tell these askers to do enough of their own work to come up with a concrete, specific, programming question, other than 'can someone tell me what's wrong with this?'  Don't get me wrong. I'm sympathetic to people with problems. I have not been downvoting or voting to close these, because the community seems to be inclined in general to be helpful. I'm asking, are we really doing the right thing by encouraging the site to populate with these?  If the consensus is 'yes' then I'll just slink back to my cave. I'm not interested in starting a campaign here.


Suppose $a^4=0$, for some $a \in R[x]/(d)R[x]$, then prove that $1-a$ is invertible.   I was thinking since $a^4 = a \cdot a \cdot a \cdot a=0$, this implies that $a$ has to be zero (?) . Now we have that $1-a=1-0=1$, and $1$ is invertible, since $1 \cdot 1 = 1$. Is it really that simple or am I making a logical error somewhere?

If $ua = au$, where $u$ is a unit and $a$ is a nilpotent, show that $u+a$ is a unit.   I've been working on this problem for an hour that I tried to construct an element $x \in R$ such that $x(u+a) = 1 = (u+a)x$. After tried several elements and manipulated $ua = au$, I still couldn't find any clue. Can anybody give me a hint?


gives the Ascoli-Arzela theorem for a Compact Hausdorff Space. Following through the proof sketch at the end of the linked section, I could not find where the Hausdorff property is used. The reference, Dunford & Schwartz also seems to say that Hausdorff property is not required. Is it true that the Hausdorff property is not required in the theorem?  Thanks,

The more general version of this theorem in Munkres' 'Topology' (p. 290 - 2nd edition) states that   Given a locally compact Hausdorff space $X$ and a metric space $(Y,d)$; a family $\mathcal F$ of continuous functions has compact closure in $\mathcal C (X,Y)$ (topology of compact convergence) if and only if it is equicontinuous under $d$ and the sets  $$ \mathcal F _a = \{f(a) | f \in \mathcal F\} \qquad a \in X$$  have compact closure in $Y$.  Now I do not see why the Hausdorff condition on $X$ should be necessary? Why include it then? Am I maybe even missing something here (and there are counterexamples)?  btw if you are looking up the proof: Hausdorffness is needed for the evaluation map $e: X \times \mathcal C(X,Y) \to Y, \, e(x,f) = f(x)$ to be continuous. But the only thing really used in the proof is the continuity of $e_a: \mathcal C(X,Y) \to Y, \, e_a(f) = f(a)$ for fixed $a \in X$.  Cheers, S.L.


I changed micro usb port which was broken (it takes out from motherboard) on tablet. On motherboard are 5 contacts and one is damaged (4. - it is for data transfer, ID). I solder +5 VDC contact and Ground, and left 4,3,2 pins for data transfer (not solder them). Now tablet is charging but "only" with 450mA. Why charging chip doesnt increase charging power more than 450mah. I think that 4,3,2 pins are not needed for charging by charger, only for data transfer and smart recognition. Am I right or wrong?

I'm trying to use a mobile phone charger for my projects, and want a high current output. I have read , however my measurements show something else.  is a link to the Battery Charging Specification Rev. 1.2.  1.4.7 Dedicated Charging Port A Dedicated Charging Port (DCP) is a downstream port on a device that outputs power through a USB connector, but is not capable of enumerating a downstream device. A DCP shall source \$I_{DCP}\$ at an average voltage of \$V_{CHG}\$. A DCP shall short the D+ line to the D- line.   I verified on three different chargers, and all read \$R_{DCP\_DAT}\$ as ~1.5 Ohms. Now, if there is a short between the D+ and D-, there is no detection on the charging port side, and the charger should always output \$I_{DCP}\$ {0.5 - 5.0A max} on the VBUS line - is this correct? I tested the current output of three chargers, but they are all completely different. Charger 1 - Nokia Rated current output: 1.3A Measured current output: 1.34A Charger 2 - Asus Rated current output: 2.0A Measured current output: 0.7A - 1.1A (unstable) Charger 3 - HTC Rated current output: 1A Measurent current output: 0.1A If all these dedicated charging ports have no current negotiation, how come only one charger is showing it's rated output? N.B All three chargers can charge a mobile phone in a reasonable amount of time.


I am very new to Latex and I have a file I need to compile. When doing so I get the message: The required file tex\latex\arabi\bblopts.cfg is missing. It is a part of the following package: arabi".  I hit install and install the package. However, the next time I compile the file I get the same message over and over.  What is the issue?  I also attached message screenshot

After not updating my MiKTeX 2.9 for a very long time, I did it a few days ago. I had  pdfTeX 3.14159265-2.6-1.40.16, LaTeX2e <2014/05/01>, babel <3.8m>,  and now I have  pdfTeX 3.14159265-2.6-1.40.17, LaTeX2e <2016/03/31>, babel <3.9r>.  Something (bad) happened in between: now, whenever I use the babel package (with any language), MiKTeX tells me that bblopts.cfg is missing and requires the installation of the arabi package - which actually contains that file.   Note that I don't even have arabic hyphenation in the format file and, after ignoring that request, the tex file is compiled without errors. Indeed, the rather weird fact is that bblopts.cfg is an optional file: it only appears in this line of babel.sty code:     \InputIfFileExists{bblopts.cfg} ...   Anyway.... To overcome the impasse, since I don't need the arabi package, I simply created an empty bblopts.cfg file. The very weird behaviour of MiKTeX follows:   If bblopts.cfg is in the tex path, e.g., C:\localtexmf\tex\generic\babel,    findtexmf returns the correct path C:\localtexmf\tex\generic\babel, MiKTeX includes bblopts.cfg, as the log file shows     * Local config file bblopts.cfg used   *   (C:\localtexmf\tex\generic\babel\bblopts.cfg).  but it still says that bblopts.cfg is missing and that I have to install the arabi package!  If bblopts.cfg is in the current folder,   findtexmf returns the correct path .\bblopts.cfg MiKTeX includes bblopts.cfg, as the log file shows     * Local config file bblopts.cfg used   *   (bblopts.cfg).  and no warnings or package installation requirements appear!    Does anyone have a clue? Is it just me or is it a MiKTeX bug?? If you want to try, be sure not have the arabi package installed and add the babel package to your tex file. A toy example could be:     \documentclass{article}\usepackage[british]{babel}\begin{document}.\end{document}   Just in case it matters: my OS is Windows 7 SP1 Enterprise...


I need to add a column to my table with the count of every occurrence of. So if the value is unique the column value should be 1, but if there is multiple copy i need a differente value for every row (1,2...) The database is postgres for example     id value count     1 a 1   2 a 2   3 b 1   4 b 2   5 b 3   6 c 1     database example

I would like to add an order column wich will be position of my record. Positions are connected with name. If the name is S1 - order should be 1, for S2 - order should equal 2 etc. How can I do this?  Real state:   id       name     position -------  -------  ------- 1        S4       null 2        S2       null 3        S3       null 4        S1       null     Expected:   id       name     position -------  -------  ------- 1        S4       4 2        S2       2 3        S3       3 4        S1       1   I tried with update:  WITH x AS (   SELECT       id,       name,       ROW_NUMBER() OVER (ORDER BY name) position   FROM       stage ) UPDATE     stage SET     position = x.position FROM     x WHERE     x.id = stage.id;   Stage is the name of the table.


I just added a new 70-300 Nikkor lens to my Nikkon D3000 camera. It will not auto focus or take a picture with the new lens. It seems to be installed properly and is communicating with my camera. It just does not allow me to take a picture. I can put the old 55mm lens on and it works fine. Help!

I just bought Nikon 18 - 55 mm f/3.5 - 5.6G VR AF-P DX Nikkor from .  When I connected it to my Nikon D5100, the autofocus didn't work. There was nothing about this from the original seller's website.  Is there anything I can do short of returning?


I've been catching Pikachus wear some spiffy looking hats on Pokemon Go. Some of them have party hats, while others have Santa hats. If I decide to evolve them into Raichus, do they get to keep their spiffy hats?

It was announced on the official  that:     Did you know February 27 is Pokémon Day? We’ve teamed up with our friends at The Pokémon Company International for their annual celebration of all things Pokémon, and we have a special treat for you this Pokémon Day! From February 26 at 1:00 P.M. PST to March 6 at 1:00 P.M. PST, special Pikachu appearing all over the world will be celebrating Pokémon Day by wearing festive party hats. These special Pikachu will keep their party hats forever, but they can only be found during this limited-time celebration, so make sure to keep an eye out for them as you explore!   The special Pikachu looks like the following:    If I evolve my special Pikachu, do I also get a special Raichu with a hat?


I'm trying to horizontally center a <div> block element on a page and have it set to a minimum width. What is the simplest way to do this? I want the <div> element to be inline with rest of my page. I'll try to draw an example:  page text page text page text page text page text page text page text page text                -------                | div |                ------- page text page text page text page text page text page text page text page text

How can I horizontally center a
 within another
 using CSS?

Foo foo


In my code there is a div  with id="mix" generated dynamically with the jQuery load() method:  $('#mix').load('handlers/muscript.php');   muscript.php contains a few input element, which will be loaded into this div having id "mix" .  the event keyup is not firing when the user enters their text.  The code for creating the new input elements is:  $('#add').click(function() {     $('<input id="'+k+'" type="text" name="trans' + k + '"  />')       .appendTo('#mix');   The code for capturing the user's values is:  $('input').keyup(function() {     handler = $(this).val();     name = $(this).attr('name');   This second code block work for the single element, but it is not fired for dynamically generated elements.

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


For example:   Albin, S.L., Barrett, J., Ito, D., Mueller, J.E., 1990. A queueing network analysis of a health center. Queueing Systems 7, 51–61.

When working with Bibtex, manually transferring the citation information for articles, prooceedings, books, etc. can be a tedious work. Some web sites provide citations in Bibtex format. What are your favorite sites to get Bibtex citations of your used references?


Supposing some strings (like 123 or abc or test123) would automatically appear on the screen after last command and I cannot know the exact value of the string in advance.   Next I want to make a new directory named after that string (like ./123/ or ./abc/ or ./test123/), which means the string should be given to a variable var so that the new directory could be created by mkdir $var.

I'd like to know how to reuse the last output from the console, ie:  pv-3:method Xavier$ python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" /Library/Python/2.6/site-packages pv-3:method Xavier$ cd **LASTOUTPUT**


It's naive of you to believe that.   Why do we use 'of' and what's the meaning of 'of' and why can't we use 'for'? There are some cases that we use only 'of' such as "kin of you, nice of you, etc.   It's naive for you to believe that.   This one is wrong as per my knowledge. If I use 'for', what does ist sound to natives?

The high efficacy of the new drug is coupled with a lack of adverse effects that are typical for high-dose parenteral interferon administration.    Is it okay, or is it better to use of?     The high efficacy of the new drug is coupled with a lack of adverse effects that are typical of high-dose parenteral interferon administration.    I google for "effects typical of\for" and seem to find both variations:     Similarly, toxic side effects typical for systemic amphotericin B application as fever, chills, or nausea were not noted.       Sleep effects typical of SSRIs were greater with PAR 20 mg/day than CIT 20 mg/day, suggesting greater effects on 5HT uptake blockade   Is "for" better because it's "administration", not just "interferon"?


Question:  Prove that $\tan^{-1}(\frac{1}{2} \tan2A)+\tan^{-1}(\cot A)+\tan^{-1}(\cot^{3} A)=0$  MyProblem  We can just use the formula of $\tan^{-1} A +\tan^{-1} B$ but I think it would be a waste of time. Is there any other shorter and simpler method to solve it.

How to simplify $$\arctan \left(\frac{1}{2}\tan (2A)\right) +  \arctan (\cot (A)) + \arctan (\cot ^{3}(A)) $$ for  $0< A< \pi /4$?  This is one of the problems in a book I'm using. It is actually an objective question , with 4 options given , so i just put $A=\pi /4$ (even though technically its disallowed as $0< A< \pi /4$) and got the answer as $\pi $ which was one of the options , so that must be the answer (and it is weirdly written in options as $4 \arctan (1) $ ).  Still , I'm not able to actually solve this problem. I know the formula for sum of three arctans , but it gets just too messy and looks hard to simplify and it is not obvious that the answer will be constant for all $0< A< \pi /4$. And I don't know of any other way to approach such problems.


$|a-b|^p \le 2^{p-1} (|a|^p + |b|^p)$ for $a,b \in \mathbb{R}, p \ge 1$.   How do we get this inequality? I can get $|a-b|^p \le 2^{p} (|a|^p + |b|^p)$ but I don't know how to get rid of a factor of $1/2$ on the RHS.

I have a small question that I think is very basic but I am unsure how to tackle since my background in computing inequalities is embarrassingly weak -   I would like to show that, for a real number $p \geq 1$ and complex numbers $\alpha, \beta$, I have \begin{equation} |\alpha + \beta|^p \leq 2^{p-1}(|\alpha|^p + |\beta|^p) \end{equation}  I thought it would be best to rewrite this as  \begin{equation} \left|\frac{\alpha + \beta}{2}\right|^p \leq \frac{|\alpha|^p + |\beta|^p}{2} \end{equation}  but then I am unsure what to do next - is this a sensible start anyways ? Any help would be great !  (P.S. this is not a homework question - I am currently trying to brush up my knowledge of $L^p$ spaces, and this inequality came up as a statement. I thought it might be worthwhile to  make sure I can fill in the gaps to improve my skills in computing inequalities.)


We know from the first book that Dumbledore guessed what Harry must be seeing in the Mirror of Erised (his family, assuming Dumbledore cannot directly see the Mirror anyway - which could be a possibility since he could alter it).  In the chapter in which this happens, JKR doesn't immediately reveal what Dumbledore sees when he looks in the Mirror.  Is it later revealed by JKR what Dumbledore sees when he looks in the Mirror of Erised?

In the Harry Potter books, Prof. Dumbledore doesn't fail to mention his love for socks, but he does fail to mention the reason for his fascination with them.  I think that when Harry asked him what Dumbledore saw in the Mirror of Erised, the truth was he saw his family: his sister, brother and mother; but he told Harry his second favorite desire instead: Holding woolen socks. What is the meaning of this fascination?


$abc=1$ where $a$, $b$, $c$ are positive reals. Prove that $$\sqrt{\frac{a}{a+8}} + \sqrt{\frac{b}{b+8}} + \sqrt{\frac{c}{c+8}} \ge 1$$

If $a,b,c$ are positive reals such that $abc=1$, then prove that $$\sqrt\frac{a}{a+8} + \sqrt\frac{b}{b+8} +\sqrt\frac{c}{c+8} \geq 1$$ I tried substituting $x/y,y/z,z/x$, but it didn't help(I got the reverse inequality). Need some stronger inequality. Thanks.


This question was asked several years ago at: , but it seems that versions have changed since then.  I currently have ArcGIS 10.0 installed (not sure when I will upgrade to 10.1) and I would like to install OSGeo4W on my computer as well.  ArcGIS 10.0 installs Python 2.6.5 and OSGeo4W wants to install Python 2.7.2.  Can these two packages use the same Python installation despite different versions?  Otherwise, is there an easy way to install OSGeo4W with the correct Python version and keep the two Python versions completely separate on a single computer?

I see a lot of Q&As asking how you can create a separate Python installation (e.g. the Anaconda or Python XY distribution) that can use arcpy, while not 'breaking' the original ArcGIS python installation.  I had this same problem, and I think I have found a 'universal' solution. So far we have done this on about 8 computers at work and it all works fine.   How to install a separate Python distribution that can use ArcGIS?


Suppose that the function $f\; :\; [a,b] \rightarrow \mathbb{R}$ is integrable on $[a,b]$. Prove that $|f|$ is integrable on $[a,b]$ and $$\left|\int_a^b f(x) dx\right| \leq \int_a^b |f(x)|dx$$ I don't know how to go from one step to another... I kind of intuitively understand that its the distance or width between the function's two points on $[a,b]$ but not fully sure where to even start. $$\sup_{x \in I} |f(x)| - \inf_{x \in I} |f(x)| = \sup_{x,y \in I} |\,|f(x)| - |f(y)|\,| \leqslant \sup_{x,y \in I} |\,f(x) - f(y)\,| =  \sup_{x \in I} f(x) - \inf_{x \in I} f(x)$$

Claim: If f is integrable, $\left|\int_a^bf(x)dx\right|\le\int_a^b|f(x)|dx$  Proof (attempt):   We know $-|f|\le f \le|f|$,  so $\int-|f| \le \int f \le \int|f|$.*  Since, if $-b<a<b$, we say $|a|<b$,  we can say $|\int f| \le \int |f|$  *: Is this true? If so, how can I prove this?  Would this be a rigorous enough proof (well, I did neglect to write out a,b for the integrals, but besides that)? It just seems too simple for some reason.


email is missing from my settings on iphone 5c.  The icon is also missing.  I don't know how it disappeared.

I've lost my Settings → Mail, Contacts, and Calendars on my iPhone 5.  No icon for Mail and no Mail settings.  How do I get it back?


Everything is in the title ...  I created a code running on an element range:  (function($){     $('.range').each(function(){         var range = $(this);         range.on('input', function(){             range.next().text($(this).val());         })         .next().text(range.val());     }); })(jQuery);   I wish it also works on the same element called by Ajax.  $('.ajax-global').on('click', function(){     var param = $(this).attr('id');     $('.ajax-window').load('./Ajax/' + param + '.php'); });   Here is a practical example of these tags Range: .  If I call the same html code via Ajax, javascript does not apply to the latter.  (press the "Welcome Stackoverflow" button).  How to proceed? This is a dilemma that I can not solve, and that for a while ...  EDIT :  I remembered a useful function: $.getScript(), I'm almost there:   $('.ajax-global').on('click', function(){     var param = $(this).attr('id');     // Ouverture dans une fenêtre ajax généraliste :     $('.ajax-window').load('./Ajax/' + param + '.php', function() {         $.getScript( "./Scripts/Public/Scripts.js");     }); });   It works ... except that the file called is reapplied to the entire document, whereas I want to limit only to new html elements called via Ajax (in order to limit the bugs).

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


I have problem sorting videos in VLC because it is using the metadata title to sort them, but they all have the same title. Which is why I want to remove all metadata, especially titles.  How can I achieve this easiest and safest? I have over 2000 video files to process and I dont want to break them in the process.  The video files are in format .avi, .mp4, .mkv, .wmv, and more.

How can I remove all metadata from all formats via FFmpeg?  I can just set special metadata for each format per man ffmpeg. Any option or method to clear all metadata and strip media from all metadata available on ffmpeg?     -metadata key=value        Set a metadata key/value pair.         For example, for setting the title in the output file:                 ffmpeg -i in.avi -metadata title="my title" out.flv


I want to know if it would be possible to connect my laptop to my tablet with a mini display port to HDMI cable and use the tablet to capture the video stream from the laptop i.e. record the screen. Anything else I would need besides a cable (hopefully no capture card bs)?

Say I had a laptop [Correction: notebook, don't want my thighs medium rare], any OS, and it has an HDMI port built into the side. Would it be remotely possible to hack it into an input, provided it wasn't already designed for that? I would figure all video ports operate straight off the graphics chip, however, are there ways to override that functionality on the driver level? Driver hacks already exist for plenty of things such as the classic example: Bluetooth adapters (so we can play with our PS3 controllers and save a buck) However, is HDMI one of these tamperable interfaces? As far as the interface standard is concerned, are HDMI ports designed to be either way or are they Input/Output specific?


Col Zemo is after Bucky's mission report from 1991, but how does he even know it exists?   After all,  it's Captain America he's been studying.

At the end of Captain America: Civil War, Zemo reveals that       he trapped Bucky to make the Avengers fight each others.   But around the middle of the film, he      interrogates Bucky    in order to learn what happened on 16 December 1991.  It doesn't seem to be an essential part of the plan, and everything has already happened when all is revealed. Actually to me it looks more like a matter of luck if he has something he could use it      to make Iron Man fight Cap and Bucky    after      they all made a truce... Which happened because Tony knows that all is Zemo's fault.   So why does he want so much to know that?


I have this output after executing diff:  < #R1#Number = Gauge32: 258     Name = STRING: "TATA" --- > #R1#Number = Gauge32: 280     Name = STRING: "TATA"   I need to implement a sed command in a shell script to have this output:  Hostname=R1; old=258 new=280, Name="TATA"

I have this output as a result of comparing files with diff:  < IF-Name :STRING: "lns-wall-01-t2"       Index:Gge32: 260 --- > IF-Name :STRING: "lns-wall-01-t2"       Index:Gge32: 25   I need this output:  lns-wall-01-t2 old:260 new:25   I want to use sed.


I am trying to install a plugin for Wordpress on Ubuntu 14.04 Server but it keeps failing. I assume it is a rights issue because of a directory not being able to create. This is my last ditch effort I have Googled and looked all I could but nothing has worked. Here is the error it happens on any plugin:  Downloading install package from …  Unpacking the package…  Could not create directory.

I want to stop having to use sudo everytime I work in /var/www. How can I do that? I simply want to put all of my sites into this directory and work with them without too much pain.


When writing the quotient with respect to, say, a group action, the notation is X/G, and in latex, this compiles to look almost the same as X/G. The problems come when writing the quotient w.r.t. a left action, in which case it is G\X. I thought for the longest time that the author(s) were writing some kind of set difference and that either I or them had confused things.  Ideally I would like X to be slightly elevated above the slash, and G to be slightly lowered below, but keeping the distances in check (nothing like X  /  G just for the sake of elevating/lowering).  Does anyone know of any good tricks or methods to achieve this? Thanks in advance.

How does one produce a backslash fraction? That is, something like 2\1 with the 1 above the 2.


If there are two light waves of same amplitude but of different frequencies then their energy will be same or different? If same then how will you define the light waves as photons and will there be a difference between the number of photons in both the Waves?

The intensity of an electromagnetic wave is only related to its amplitude $E^2$ and not its frequency. A photon has the same wavelength as the wave that's carrying it, and its energy is $h  f$.   So if a laser wave is kept at the same amplitude and the wave length is reduced, why does its intensity remain the same even though its photons now carry less energy?  Why are the intensities of electromagnetic waves so different to sound waves (and other waves travelling through a medium) which are related to $f^2  E^2$?


I'm travelling to Denmark with a Schengen visa type C single entry for 21 days.  Can I travel to Paris or Switzerland and back to Denmark with the same visa?

I am visiting a friend in Switzerland for ten days. I have already got visitor's visa for the same on my Indian passport. Particulars mentioned on my visa are:  1. 'Etats Schengen' , 2. Single entry 3. Dates of visit. & 4. Type of visa : C.  I understand that having already got ‘Etats Schengen' visa, I can travel to all Schengen countries.  I am also planning to visit Paris for a day during my stay in Switzerland. However, I never mentioned this in my visa application. I am planning to take a train from Geneva to Paris and book a hotel in Paris for one night. Can I possibly plan my Paris trip this way as I have Schengen visa, or I am not allowed to travel out of Switzerland as I never mentioned this in my visa application?   Also what does Single entry on my Schengen visa means: does it mean that I can enter and leave Switzerland only once or it means that I can enter and leave the Schengen region only once.


I want to select rows BETWEEN @From and @To from a certain column depending on the filter @Filter. Here is a sample of my code. The WHERE does not work, I understand why, but I don't know how to fix it. DECLARE @From VARCHAR(20) DECLARE @To VARCHAR(20) DECLARE @Filter VARCHAR(20)  SET @From = '01' SET @To = '06' SET @Filter = 'Department'  SELECT      Employee.Number,     Employee.Name,     Clocking.Date,     Clocking.Time FROM      Employee LEFT JOIN     Clocking ON Employee.Number = Clocking.Number WHERE     CASE WHEN @Filter = 'Department' THEN Employee.Department END BETWEEN @From AND @To,     CASE WHEN @Filter = 'ReportCenter' THEN Employee.ReportCenter END BETWEEN @From AND @To ORDER BY     CASE WHEN @Filter = 'Department' THEN Department END,     CASE WHEN @Filter = 'ReportCenter' THEN ReportCentre END  I don't know how to select the column that should be filtered depending on the @Filter provided.

I tried searching around, but I couldn't find anything that would help me out.  I'm trying to do this in SQL:  declare @locationType varchar(50); declare @locationID int;  SELECT column1, column2 FROM viewWhatever WHERE CASE @locationType     WHEN 'location' THEN account_location = @locationID     WHEN 'area' THEN xxx_location_area = @locationID     WHEN 'division' THEN xxx_location_division = @locationID   I know that I shouldn't have to put '= @locationID' at the end of each one, but I can't get the syntax even close to being correct. SQL keeps complaining about my '=' on the first WHEN line...  How can I do this?


How do I specify the argument passed to orderby using a value I take as a parameter?  Ex:  List<Student> existingStudends = new List<Student>{ new Student {...}, new Student {...}}   Currently implementation:  List<Student> orderbyAddress = existingStudends.OrderBy(c => c.Address).ToList();   Instead of c.Address, how can I take that as a parameter?  Example    string param = "City";  List<Student> orderbyAddress = existingStudends.OrderByDescending(c => param).ToList();

I found an example in the  for Dynamic LINQ that allows you to use a sql-like string (e.g. OrderBy("Name, Age DESC")) for ordering. Unfortunately, the method included only works on IQueryable<T>. Is there any way to get this functionality on IEnumerable<T>?


I am trying to develop a methodology for separating pixels from one another to determine whether they belong to a city cluster or not. Starting at the center pixel of the city I want to select all pixels that fall under a certain pixel neighborhood. I want to examine a few different ones 3x3, 4x4, etc.. The selection would expand outward, examining each connected pixel to select its neighbors, and so on, until there are no neighbors for any of the pixels. I have tried focal statistics in arcgis, but I cannot find out if there is a way to use the tool on just one pixel. The picture below shows the issue. I cannot tell if the pixels circled in black are actually connected to the center pixel. This is the output of focal statistics showing number of neighbors in 3x3 rectangular neighborhood. I would prefer a python solution if possible.

I am a relative beginner to using GIS, and am running QGIS 2.0.1 in Linux. I have two historical maps which I want to analyze, that show land use patterns in the same area at two different moments in time. I have them scanned and geo-referenced as layers in one file. Side by side, they look like this:     The main thing I am interested in is to compare the extent of the light and dark green areas between the two maps. Is this possible, and if so, what is the simplest approach? Is there a way to do this based on raster analysis? And if I have to make a shapefile, what is the best way to do that?  What I have already considered:   Drawing shapefiles as polygons by hand, as described in . That would be VERY tedious. Creating simplified, high contrast raster images by using color selection, filters etc. by trial and error in the Gimp and converting that to a shapefile. The results were very sloppy.


If we want to write for example $\mathbb{N}=\mathbb{N}\times\dots \mathbb{N}$ and below the RHS write "n copies" how we will do it in Latex?

Inspired by  on the math StackExchange, suppose you want to typeset the square root of the number 144...4, that is, 1 followed by n 4's. If you write $\sqrt{1\underbrace{44\ldots4}_{n\ \text{times}}}$, as in the current version of the question, you get a huge radical sign that reaches down to match the "n times" text below the number. Is there an elegant way to typeset this so that the radical sign looks like it would with $\sqrt{144\ldots4}$, but also keeping the underset text in the right place?


I was looking for a solution to convert each object's properties on a List to some arrays when finally I found   Then I found this code  MyList.Select(x=>x.Name).ToArray();   which is the solution to my problem. But I still don't understand on what the variable 'x' means. can anyone could explain to me briefly on how this syntax work?

I have quickly read over the  documentation.  This kind of example has helped me to understand better, though:   delegate int del(int i); del myDelegate = x => x * x; int j = myDelegate(5); //j = 25   Still, I don't understand why it's such an innovation. It's just a method that dies when the "method variable" ends, right? Why should I use this instead of a real method?


I am running VirtualBox Version 5.0.22 with Ubuntu 16.04. I performed an update today and then got into the problem that has happened  to so many others:  Icons&menys dissapeared.  There is a thread for this discussed here:    But, I believe I have tried everything discussed in that thread, like:  sudo service lightdm stop rm ~/.config/dconf/user sudo service lightdm start  and:  sudo apt-get install --reinstall ubuntu-desktop sudo apt-get install unity  and:  using unity-tweak-tool.  and:  and enable Unity using ccsm,   and  export DISPLAY=:0 sudo dconf reset -f /org/compiz/ setsid unity  and other suggestions presented:  but nothing seem to works.  Anyone else who have run into this?   Someone who have a suggestion not already discussed or have a proposal of a solution already presented, that needs some tweaking for 16.04 ?

When I login, nothing happens.   I am presented with my desktop wallpaper.    No Dash, no Launcher, nothing.


I am currently working on a profile page for my website. Under the profile page you can enter information about yourself under the About section. It first asks you to enter what you want, then it saves it to a variable. After that it gets entered into the database. Then the information is shown on the screen by PHP again.  The problem is the spacing though. Here is a example:  This Is Example Line 1  This Is Example Line 2  This         IS EXAMPLE        LINE 3  ThisIsExampleLine4ThisIsExampleLine4ThisIsExampleLine4ThisIsExampleLine4   When printing to the screen I have been using a <pre> tag around the PHP variable. When the <pre> tag is used, everything below is shown the way it was entered. Yet Line 4 will not wrap, because it is in a <pre> tag, and it is overflowing the <div>.  Yet when I take out the <pre> tag, the tag is not using the spaces. So how can I keep the spaces, but also wrap the words?

pre tags are super-useful for code blocks in HTML and for debugging output while writing scripts, but how do I make the text word-wrap instead of printing out one long line?


In the SE Data Explorer, if you attempt to compose a query and scroll to the PendingFlags table, two columns (CloseAsOffTopicReasonTypeId and BelongsOnBaseHostAddress) overlap into the column type column:    I was able to see this in both Chrome and IE.

Overlapping text on right side box:  To repro, follow  and scroll down about half way.


This doesn't quite sound right but might be right. Consider  "Can you send me Fred and Amy's flight information?" This is correct via The Chicago Manual of Style.  Alternatively,  "Can you send me your and Fred's flight information?"  "Can you send me Fred's and your flight information?  or even "Can you send me Fred and yours flight information?"  How about some help?

which is correct:  Thank you for your and your team's time  or  Thank you for yours and your team's time  and should (or does it make a difference if) I place commas before and after "and your team's"  ... thanks!!


Sometimes it's important to generate data due to data imbalance issues. I heard that data augmentation by leaning distribution of data is a hot topic now. Could you please give me some resources and useful material for data generation by learning data distribution?

We already had multiple questions about unbalanced data when using , , ,  and a number of other similar questions, what makes it a very popular topic! Unfortunately, each of the questions seems to be algorithm-specific and I didn't find any general guidelines for dealing with unbalanced data.  Quoting , dealing with unbalanced data     (...) heavily depends on the learning method. Most general purpose   approaches have one (or several) ways to deal with this.   But when exactly should we worry about unbalanced data? Which algorithms are mostly affected by it and which are able to deal with it? Which algorithms would need us to balance the data? I am aware that discussing each of the algorithms would be impossible on Q&A site like this, I am rather looking for a general guidelines on when it could be a problem.


I am aware that this has been asked before, but the paper is nowhere to be found online, the provided link in the old thread leads to nowhere, and I'm really at wits end to find this paper, can anyone provide a working source for this paper in either english or spanish?

I am looking for an English translation of Markov's 1958 paper, On insolubility of the homeorphy problem, which I remember coming across on a website for a computational topology course (taught by Afra Zomorodian).


I know that we can have a $U(1)$ bundle over the base manifold like $S^2$. For example, we can choose the fibre $U(1)=S^1$ over $S^2$ as the $S^3$ Hopf fibration. I know that we can have a $SU(2)$ bundle over the base manifold like $S^4$. For example, we can choose the fibre $SU(2)=S^3$ over $S^4$ as the $S^7$ Hopf fibration. Correct me if I was wrong! Now, can we have any nontrivial $SU(2)$ bundles over a flat Euclidean $\mathbb{R}^d$ or Minkowski $\mathbb{R}^{d,1}$ space?? If so, could you give some examples? If not, could you give me a proof? (or at least sketch your arguments to convince me?)

What's the easiest way to see this? The only thing I could think of was to try to patch together trivializations. I couldn't find a way to make that work. Thank you! edit: For the record, here's why I asked about this special case of the more general result about fiber bundles over contractible spaces. In the much beloved book by Bott and Tu, it's claimed that the Leray Hirsch theorem can be proven in the same way the Kunneth theorem is proven:  induct on the size of a finite good cover for the base space, then apply the Mayer Vietoris sequence and the Poincare lemma for the induction step. It's assumed that there exists a finite good cover for the base space, but it's not assumed that this cover is a refinement of the cover of the base space, which gives the local trivializations of the fiber bundle. Therefore, to apply the Poincare lemma in the induction step, it seems that you need to know that the result I asked about is true. Since fiber bundles had just been introduced in the text, I thought there may be a short, elementary proof that the authors had taken for granted.


I didn't design this table; I just have to work with it. And modifying the design isn't really possible.  The table has ~50 columns. I want to copy a row, update two of the columns (a GUID and an int), and then insert it back into the table.  I can't seem to come up with how to do this without listing all the columns. Does someone have any techniques?

comes close to what I need, but my scenario is slightly different. The source table and destination table are the same and the primary key is a uniqueidentifier (guid). When I try this:  insert into MyTable     select * from MyTable where uniqueId = @Id;   I obviously get a primary key constraint violation, since I'm attempting to copy over the primary key. Actually, I don't want to copy over the primary key at all. Rather, I want to create a new one. Additionally, I would like to selectively copy over certain fields, and leave the others null. To make matters more complex, I need to take the primary key of the original record, and insert it into another field in the copy (PreviousId field).  I'm sure there is an easy solution to this, I just don't know enough TSQL to know what it is.


As a physics student with very little understanding of biology, in a course about physics foundations diagnostic techniques I have come up with this question. I don't even know if it does make sense or not; in the latter case, please excuse me.   As far as I know, in the human brain the right hemisphere controls the motion of the left side of the body, while the left hemisphere controls the right side. Moreover, the part related to sight is on the back of the brain.  To me, it seems that there is a sort of opposition between the part of the body considered and the area of the brain that have to control it. Is this statement right? Only for human beings or also for animals? Are there any exception to this sort of pattern (if there is anyone)? Is there a logical reason to the fact that we show this characteristic and it couldn't be different from how it is?

Why does the left hemisphere control the right and the right hemisphere control the left? I googled it but didn't find a good answer regarding this. Could someone explain?  Does this adaptation help in the speed of transmission of nerve impulses?


We are to find number of elements and charecterisstic of $R =$ $Z[I]/\langle 2+2I \rangle$. Here $\gcd (2,2) \ne 1$ .So I can't say that it is isomorphic to $Z_8$ . By the fact that $Z[i]$ is ED I can say that $R$ has those elements which have norm $0$ to $7$.But then I have $0,1,i,-1,-i,1+i,1-i,\dots$ "so on ! Is it true? It seems horrible to me to find charecteristic from my observaation (not sure is true). So ,I need a hint , thanks for reading!

The isomorphism $\mathbb{Z}[i]/(a+bi) \cong \Bbb Z/(a^2+b^2)\Bbb Z$ is , when the integers $a$ and $b$ are coprime. But what happens when they are not coprime, say $(a,b)=d>1$?      — For instance if $p$ is prime (which is not coprime with $0$) then $$\mathbb{Z}[i]/(p) \cong \mathbb{F}_p[X]/(X^2+1) \cong \begin{cases} \mathbb{F}_{p^2} &\text{if } p \equiv 3 \pmod 4\\ \mathbb{F}_{p} \times \mathbb{F}_{p} &\text{if } p \equiv 1 \pmod 4 \end{cases}$$ (because $-1$ is a square mod $p$ iff $(-1)^{(p-1)/2}=1$).  — More generally, if $n=p_1^{r_1} \cdots p_m^{r_m} \in \Bbb N$, then  each pair of integers $p_j^{r_j}$ are coprime, so that by CRT we get $$\mathbb{Z}[i]/(n) \cong \mathbb{Z}[i]/(p_1^{r_1}) \times \cdots \times \mathbb{Z}[i]/(p_m^{r_m})$$  I was not sure how to find the structure of $\mathbb{Z}[i]/(p^{r}) \cong (\Bbb Z/p^r \Bbb Z)[X] \,/\, (X^2+1)$ when $p$ is prime and $r>1$.  — Even more generally, in order to determine the structure of $\mathbb{Z}[i]/(a+bi)$ with $a+bi=d(x+iy)$ and $(x,y)=1$, we could try to use the CRT, provided that $d$ is coprime with $x+iy$ in $\Bbb Z[i]$. But this is not always true: for $d=13$ and $x+iy=2+3i$, we can't find Gauss integers $u$ and $v$ such that $du + (x+iy)v=1$, because this would mean that $(2+3i)[(2-3i)u+v]=1$, i.e. $2+3i$ is a unit in $\Bbb Z[i]$ which is not because its norm is $13 \neq ±1$.  — I was not able to go further. I recall that my general question is to known what $\mathbb{Z}[i]/(a+bi)$ is isomorphic to, when $a$ and $b$ are integers which are not coprime (for instance $a=p^r,b=0$ or $d=(a,b) = a^2+b^2>1$).  Thank you for your help!


I have two Ubuntu 18.04 and 20.x installs at home and trying to ssh between them, I can connect by Internal IP but not by hostname Setup: Machine A: 192.x.x.115 Machine B: 192.x.x.125 both installs have ssh running and I can connect fine using internal IP. From Machine B I would like to connect to Machine A using hostname  or hostname.ddns.net Here are things I have setup: Machine A: machineA> /etc/hosts 127.0.0.1    machineA.ddns.net machineA  192.x.x.115  machineA  machineA> /etc/hostname machineA.ddns.net  machineA> /etc/resolv.conf nameserver 127.0.0.53 options edns0 trust-ad search hsd1.xx.isp.net  Machine B: machineB> ssh user@192.x.x.115  # i.e machineA is successful machineB> ssh -vvv user@machineA.ddns.net gives Connecting to machineA.ddns.net [ISP assigned address] port 22.  ssh: connect to host machineA.ddns.net port 22: Connection timed out  machineB> ssh -vvv user@machineA ssh: Could not resolve hostname machineA: Name or service not known  SSH_from_external_to_machineA is successful ssh user@machineA.ddns.net  # is successful commands tried on machineA: machineA> sudo service ssh status   # gives active(running) machineA> sudo netstat -alnp | grep :22  # shows :22 with LISTEN machineA> sudo iptables -A INPUT -p tcp --dport ssh -j ACCEPT  I feel ISP is not blocking ssh from ssh since I can connect from external using machineA.ddns.net  Router is allowing port 22 since I can connect using IP.   I feel hostname is not resolved correctly, please review and let me know if I am missing any additional steps. Thanks, Additional edits: machineB> ping machineA_Hostname   is successful machineB> nslookup machineA.ddns.net is showing external IP as expected machineB> ssh machineA   # Could not resolve hostname: Name or service not known machineB> ssh machineA.ddns.net attempts to connect to exact external IP that was reported by ping and 'Connection timed out'

I have two ubuntu computer shared the same wifi and desire to reach another from one's terminal.  First create an user on the second computer named "Second" and hostname "Algorithms"    Then tried to reach it from the other with SSH,  but get error report as   $ ssh second@Algorithms   ssh: Could not resolve hostname algorithms: nodename nor servname provided, or not known   The solution I tried is based on   What's the problem with my experiment?


I am beginner with ubuntu. I've got stuck with an error. I can't install application. Any ideas what may be wrong?  usic@hosttt:~$ sudo apt-get install /myprogram/program.deb Reading package lists... Error! E: read, still have 59 to read but none left E: Error reading archive member header E: Could not read meta data from /myprogram/program.deb E: The package lists or status file could not be parsed or opened.

Say, I have foo-1.2.3.deb which depends on perl and python, however, running command:  dpkg -i ./foo-1.2.3.deb   won't install these dependencies. So I must apt-get install perl python by hand.  How to make dpkg -i install these dependencies for me automatically?


Trying to compile   \documentclass{article} \begin{document} \include{übergröße} \end{document}   with pdflatex and the file übergröße.tex in the same directory leads to the error:  This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018/Some Linux) (preloaded format=pdflatex) restricted \write18 enabled. entering extended mode (./test.tex LaTeX2e <2018-04-01> patch level 5 (/usr/share/texmf-dist/tex/latex/base/article.cls Document Class: article 2014/09/29 v1.4h Standard LaTeX document class (/usr/share/texmf-dist/tex/latex/base/size10.clo)) No file test.aux. (./.tex) [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./test.aux ! Undefined control sequence. <argument> ...spacefactor \accent@spacefactor \OT                                                1\ss e.aux l.2 ...cefactor \accent@spacefactor \OT1\ss e.aux}   How do I include or input files whose path or filename contains non-ascii (unicode) characters?

I work in Linux with the latest TeX Live. The system encoding is UTF-8. It is also the default editor encoding in my TeXstudio 2.12.8.  I have figures in files like σ_1_μ_02_per_5.tikz, and I included them using \input{}.   Now, the most interesting part: it had worked fine (even without inputenc etc), then it just stopped. I have not change a single line in my files. Now I get  Package inputenc Error:  Unicode character σ (U+3C3)(inputenc) not set up for use with LaTeX. ...σ_1_μ_02_per_5.tikz   I have tried:   using babel inputenc with utf8, utf8x, latin1 fontenc with different parameters opening and saving in UTF-8 in other editors   And in this case I get:  Undefined control sequence. ...μ_02_per_5.tikz} Missing $ inserted. ...μ_02_per_5.tikz} Double subscript. ...μ_02_per_5.tikz} Undefined control sequence. ...μ_02_per_5.tikz}   How to fix this?    Minimal not working example:  \documentclass[10pt,a4paper]{article} \usepackage[utf8]{inputenc} \begin{document}     \input{1.tex}     \input{σ.tex} \end{document}


Say, in Large Hadron Collider how can people separate a proton from an atom and then accelerate it and what is even more miraculous to collide it with another proton? It sound like impossible. Especially when you consider a particle to be a wave and a particle.

I heard that the LHC smashes two protons together to research the universe.  But how does it create the protons for collision? If we strip off the electrons won't there be neutrons along with protons?  A  is used by the LHC, it ionises atoms into negative or positive ions but how is the proton separated from that?


I have a "change password" screen where the user's password has expired and he/she has to change it. it's a standard screen with "New password" and "Re-type new password" fields, with an inline validation that checks whether the password guidelines are met (while the user is typing): 8 characters, 1 digit, 1 number, 1 special character.  we have an argument whether the main "change password" action button should be disabled until all the validations are clear, or to keep it active and provide an error message if needed.  what do you think is better?

In forms we often see the 'continue' button inactive until all the required fields are complete:         – Wireframes created with   Is this actually a help to the user, or a hindrance?  I imagine the Pro for this is that it's a visual indicator to the user that they haven't finished filling in the form or dealing with errors (because even with inline validation a user won't be informed if they've never actually interacted with a field so won't show any errors for those at that point).  But then the main Con for this (which I've also seen borne out in usability testing) is that users will be confused why they can't click the button.  Is the pattern of disabling the Continue button until validation is complete actually providing a negative user experience?


I'm learning C, I'm trying to read the contents of a file; I do not understand why the function does not fill the string of characters and reads 0 bytes. However, I think I read the manuals.  char *read_file(const char *filename) {     int         file;     int         nb;     off_t       size;     char        *buffer;      file = open(filename, O_RDONLY);      if (file < 0)         return (NULL);      size = lseek(file, 0, SEEK_END);     buffer = (char*)malloc(sizeof(char) * (size + 1));      if (buffer == NULL)         return (NULL);      if ((nb = read(file, buffer, size)) < 0)         return (NULL);      close(file);     buffer[size] = '\0';     return (buffer); }

What is the simplest way (least error-prone, least lines of code, however you want to interpret it) to open a file in C and read its contents into a string (char*, char[], whatever)?


at the time I looked at it, had comments from 3 different users, 2 close votes - and a view count of 1:    Obviously the view count shown is out of date. A minor issue, but I thought it worth reporting, as I haven't found any prior similar posts.

Two close votes and only one person has viewed the question?    How did this happen?


"Nothing in her phone indicated she was planning to leave!," Jonie   Barnett said on Facebook.

Where would I insert an exclamation mark and a comma in the below sentence?     "Look at that boy" he exclaimed.


Let $K\subset L$ a field extension and $\alpha,\beta\in L$ with minimal polynomials $f,g\in K[X]$.  How to show that $f\in K(\beta)[X]$ is irreducible iff $g\in K(\alpha)[X]$ is irreducible?

Let $f(x)$ and $g(x)$ be irreducible polynomials over a field $F$ and let $a,b \in E$ where $E$ is some extension of $F$. If $a$ is a zero of $f(x)$ and $b$ is a zero of $g(x)$, show that $f(x)$ is irreducible over $F(b)$ if and only if $g(x)$ is irreducible over $F(a)$.   Attempt:  Since $f(x),g(x)$ are irreducible over $F \implies a,b \notin F$.  $f(x)$ is irreducible over $F(b) $ and $f(x)$ is irreducible over $F \implies a \neq b$ (As, $a$ is the zero of $f(x)$)  Which means $b \notin F(a)$ either $\implies g(x)$ is irreducible over $F(a)$.  Similarly, the other half can be proved in a similar way.  Is my solution attempt correct?  Thank you for your help..


My understanding of electrons is that they have no volume, eg they are point particles. If this is true, how can a point spin?

I often hear about subatomic particles having a property called "spin" but also that it doesn't actually relate to spinning about an axis like you would think. Which particles have spin? What does spin mean if not an actual spinning motion?


How many square numbers exist that have the length $N$ in the decimal system?  E.g. for the length $N=1$ there exist 4 square numbers (0, 1, 4, 9).  Thank you

I am trying to group numbers based on the count of digits in the square they produce, and below is the list containing the grouping that I've done so far.  1 - 3     // Numbers producing 1 digit when squared ... 4 - 9     // Numbers producing 2 digits ... 10 - 31   // Numbers producing 3 digits ... 32 - 99   // and so on ... 100 - 316   317 - 999   1000 - 3162 3163 - 9999 10000 - 31622 31623 - 99999 100000 - 316227 316228 - 999999   As one can observe, every range that produces odd digit count has a lower bound of $10^{i-1}$, while its upper bound has an observable pattern. I want to know if this can be represented by a formula or if the upper bound is a known constant such that we can use it as $C \cdot 10^{i-1}$.


Can I travel from San Francisco to Fort Lauderdale with pending Visa U?

I live in the U.S. for the last two years, I came here on B2 visa. My status has expired due to some problem before. But I still have my passport. Can I still fly a domestic airline from Boston to Dallas or any other airport in USA with my passport? Would there be any problem?


I've recorded a video on my smartphone (android-based).  I've been recording it in a landscape mode.  Then when I uploaded it on youtube - it somehow recognized the original orientation and made it to portrait mode.  I understand that I may use youtube editor feature and rotate it there - but I don't want to do that for 2 reasons:   It is another lossy conversion The video in a wrong orientation is of a lower resolution - 720p, whereas the original video is 1080p.   So what I would like to know from community either:   if it's possible to reset an orientation flag in the video (it was compressed using h264 in mkv with ffmpeg) or how to disable auto-rotating on youtube   ?  PS: yep, I tried to google on both questions

I have an MacBookPro with Windows installed via BootCamp.  I copied a video off the iPhone and saved it on the windows partition.  The thumbnail of the video looks upside down.  When I play it in Windows Media Player or VLC, the video looks upside down.  When I play it in the QuickTime player (still on Windows), it looks right side up.  I then boot into MacOS.  The thumbnail looks right side up and when I play it it looks right side up.  So what is going on - which app/os is telling me the truth?  I want to make sure because I want to upload it to youTube and the file is huge, so don't feel like wasting time/bandwidth.  P.S. EDIT: Just like a couple of folks pointed out - some programs are ignoring the orientation tag.  I tried it on Windows 8 and all programs seem to respect the tag (including Windows Media Player and Movie Maker and Video applet in Metro screen). So good progress.


In my iPhone app, when people are playing it, the screen goes black until you touch it again  after they play it for a couple minutes. Is there any way for me to prevent this from happening?

I'm working on an app that requires no user input, but I don't want the iPhone to enter the power saving mode.  Is it possible to disable power saving from an app?


I have just started using ubuntu and I want to continue developing my website however I realised notepad++ isn't Linux compatible and I was wondering is there something similar to notepadd++ that doesn't have that many features but has syntax highlighting. I know  ubuntu comes with one but I don't like the look and indenting of the text and how it responds. Thank to anyone who can help.

I use  on Windows 7 and I want to know if there is a good substitution for it on Ubuntu.   I want something that is good for editing html files.


I don't really understand the reason why wave theory of light fails to explain the blackbody radiation. My textbook says the Planck's quantum theory explains blackbody radiation. It says "If we assume, he said, that radiation is emitted in packets of energy instead of continuously as in a wave, then we can explain the black body spectrum."   So, the problem in the wave theory is that energy is absorbed or emitted continuously, not in multiple quanta.  But why is continuous emission or absorption a problem when we deal with black body radiation? I was taught in class (or maybe I interpreted it this way) that if energy would be continuously radiated, then the intensity of radiation must increase on heating the black body and wavelength of light would stay same. But from experiment, wavelength changes. Hence it fails to explain it.  But assuming that what I wrote above is correct, why can't the wavelength change?  And even in Planck's theory, why can't simply the number of quanta emitted increase and frequency be constant, so it gives radiation of same wavelength?  Please note that I have tried my best to look this up on the Internet, but all I see is explanations for back body radiations in terms of Planck's theory.   If you find this question not framed well/not acceptable in its current form, please leave a comment so that I can edit it, before downvoting it to close it.

My question is simple, why do we believe  to be absurd? Is the Ultra-violet catastrophe incorrect or is it only because we can not create or know of a perfect emitter? I am a bit confused as to why Quanta was necessary.


I had little knowledge of Ubuntu before I installed it, and I still have little knowledge of it with it installed. I'm trying to work my way around Ubuntu 14.10 and I'm in utter confusion. Nothing makes sense, because I'm used to the extremely simple nature of Windows.  I made the decision to wipe Windows from my computer entirely and replace it with Ubuntu. I'm stuck with an operating system that's too intricate for me to understand and I'm not really sure how to get Windows back. I'd like to replace Ubuntu with Windows (like it used to be) but I'm not sure how to. I know nothing about the terminal, nothing about partitions, just nothing. I've tried to go through a few of the topics on here with the same problem but I didn't really understand how to go about any of it.  Hey, I might just buy a different computer sooner or later. But for now, I need Windows back on this computer.

I purchased a PC six months ago for work related tasks. I do 95% of my work on Ubuntu (web development). Now, I want to install Windows on another partition to play a few games on my relax time. Which steps should I follow? Any suggestions? Every guide I found suggest to install Windows and, after that, Ubuntu. Being this my main development machine, I cannot afford the risk of wiping everything.


I'm trying to modify the autoIncrement() python script to auto number based on another field. For example, I need the autoincrement to restart when the field "STD_ID" changes value. This is my attempt but I'm not getting the results I need.  rec=0 stand = "STD_ID" stand2 = "STD_ID" def autoIncrement():     global rec     global stand     global stand2     pStart = 1 #adjust start value, if req'd      pInterval = 1 #adjust interval value, if req'd     stand2 = "STD_ID"     if (rec == 0):          rec = pStart      elif (stand2 == stand):          rec = rec + pInterval       else:         rec = 1         stand = "STD_ID"       return rec

I am needing to auto increment a field based on groups within a feature class. I have 8 plots within a given polygon and I need to assign them an ID from 1-8 for each set of plots within each polygon. The polygon would have its own unique ID number to be used to group the plots.  I assume it would be an alteration of this:  rec=0 def autoIncrement():  global rec  pStart = 1   pInterval = 1   if (rec == 0):    rec = pStart   else:    rec = rec + pInterval   return rec


Here, the content of parenthesis means superclass.   class Tag(enum.Enum):     a = 1     b = 2 if __name__ == '__main__":     print(Tag.a)   output is as follows:  Tag.a   After I replaced "Tag.a" with "Tag.a.value", I got the output as follows:  1   Why is class variable' s type the superclass's type? I can't understand the code. Please interpret the result as explicitly as possible.

I'm mainly a C# developer, but I'm currently working on a project in Python.  How can I represent the equivalent of an Enum in Python?


Let $(p_n)_{n \geq 1}$ be a sequence of numbers in $[0,1]$ such that $p_n \to p$. Let $(X_n)_{n \geq 1}$ be a sequence of independent random variables where $X_n \sim Bin(n,p_n)$. Is it true that $X_n/n \to p$ almost surely as $n \to \infty$? In such case, how can it be proved?

Let $(X_n)$ be a succession of independent r.v., such that $X_n$ ~ $Bern(p_n)$. I know then that $\lim_{n \to \infty}p_n=p$ and $p_n>p>0$ for each $n \in \mathbb{N}$. I have to prove that  $\dfrac{X_1 + \dots + X_n}{n} \rightarrow p$   almost surely.  Intuitively, by the strong law of large numbers, I would say it is true. The problem is that the succession $p_n$ is not constant, so I do not know how to conclude in a formal way.  Thanks to who will solve my doubt.


I have the following question:  Find a permutation $\alpha ∈ S_7 $ such that $\alpha^4 = (2 1 4 3 5 6 7)$. Is $\alpha$ unique?  How should I go about this? I've tried a few different trial and error type solutions but to no avail.  Thanks

Sorry for the vagueness of the title, I couldn't think of a better way to put it. I just wanted to run a couple of simple questions past SE to check my reasoning is correct etc.     Find a permutation $\alpha \in S_7$ such that $\alpha^4 = (2143567)$   Since any permutation can be expressed as a product of disjoint cycles, $\alpha$ cannot be comprised of any disjoint transpositions as then $\alpha^4$ maps the elements of the transposition back to itself. $\alpha$ cannot have any disjoint $3$-cycles, $p_i$ as then $p_i^4 = p_i$. We can argue like this to see that $\alpha$ must be a $7$-cycle. So since $\alpha^4 = (2143567)$ in $\alpha$ there are three other elements between the consecutive elements in $\alpha^4$. So between elements $2$ and $1$ in $\alpha$ there are $3$ other elements, between $1 $ and $4$ in $\alpha$ there are $3$ other elements, there is only one such permutation and   $\alpha = (1362457)$  Clearly we could write $\alpha = (3624571)$, which satisfies the condition above, but this is the identical permutation. Therefore, $\alpha = (1362457)$ and is unique.     Find all permutation $\alpha \in S_7$ such that $\alpha^3 = (1234)$   Clearly, there is more than one such permutation as $\alpha$ could be a $4$-cycle with elements $1,2,3,4$ or $\alpha$ could be a $4$-cycle of elements $1,2,3,4$ and a $3$-cycle of elements $5,6,7$.   $\alpha$ cannot be a product of any disjoint transpositions as $(ij)^3 = (ij)$. Also $\alpha$ cannot have any disjoint $k$-cycles where $k\geq4$ as there would be the same length cycle in $\alpha^3$.  So one possible permutation is $\alpha_1 = (1432)$  There are no other possible permutations comprised of just one $4$-cycle for reasons discussed in the previous question. Now, there are $2$ possible ways to arrange the elements $5,6,7$ in a $3$-cycle, $(567)$ and $(576)$ so two further permutations are  $\alpha_2 = (1432)(567)$ and $\alpha_3 = (1432)(576)$  In total there are $3$ permutations that satisfy $\alpha^3 = (1234)$    If there are any errors with this, or if there is a better method to exhaust possibilities, I'd appreciate your input. Thanks.


I'm trying to learn about using the AM-GM inequality. I understand the basics of it so far, but I'm having a difficult time in terms of applying it to solve problems. I've encountered the problem below and just can't seem to find a way to solve it.     Find the maximum value of the expression $$(1-x)(2-y)(3-z)(x+\frac{y}{2}+\frac{z}{3})$$   given that $x<1$, $y<2$, $z<3$, and $x+\frac{y}{2}+\frac{z}{3}>0$.    So, how do you? It seems that expanding the expression above just makes it more complicated. Should I even try to use AM-GM for this?  Thanks in advance.

Find the maximum value of $$(1-x)(2-y)(3-z)(x+\frac y2+\frac z3)$$ where $$x<1,y<2,z<3,x+\frac y2+\frac z3>0$$  I tried several cases to find a certain product. I tried 7 such cases. Three of them yield negative values while 4 gave postive fractional values. I chose the highest value which is 5/3. I already gave up and looked at the answer at the back of the questionnaire. The answer is $$\frac {243}{128}$$  Can anyone help me in answering this question?


How can I prevent Windows 10 from updating AMD video card drivers? I ask, because it installs the old drivers from 15.07, and with them my laptop starts to shut down one minute after I turn it on. Thanks in advance.

Every time Windows 10 runs updates (which I see no way to control), it updates my graphics driver.  I like the old one because it is faster.  So, I have to reinstall it.  This is getting to be a pain.  Is there any way to stop Windows 10 from updating it again?


I was reading an article about Apple's products, and at the part describing this years rumor to upcomming new laptop computers it went "a major upgrade has been due for a while"  I'm not sure if I took the meaning of "for a while" correctly. Does this means "in a while", "in the near future" or "in the immediate future"?  The above phrases is extracted from "Report: New ultra-thin MacBooks coming later in 2016, featuring new metal-injection molded hinges"    Thank you for the help as always!

I recently got a message that says      Haven't heard anything from you in a while.   I always thought that the right way to say this would be to use for insdead of in. Are both versions correct? Would there be a difference in meaning?


How to evaluate the following integral? $$ \int_{0}^{1} \frac{\ln(1+x)}{x} dx .$$ I have expanded the numerator using Maclaurin series and the result is $$ \int_{0}^{1} \frac{x -\frac{x^2}{2} + \frac{x^3}{3} - \frac{x^4}{4}+\ldots}{x}dx. $$ And I have found out that it is $ \pi^2/12 $. Is this correct?

There is supposed to be a clean solution to the integral below, maybe involving some symmetry $$ \int^1_0 \frac{\ln(1+x)}{x}dx$$ I have tried integration by parts as followed: $\ln(x+1)=u$ ,$\frac{1}{x+1} dx = du$ and also $\frac{1}{x}dx=dv$, $\ln(x)=v$. Then, the integral becomes $$\int^1_0 \frac{\ln(1+x)}{x}dx=- \int^1_0 \frac{\ln x}{1+x}dx$$ which does not make this easier. I have also tried using the identity $\int_a^bf(x)~dx=\int_a^bf(a+b-x)~dx$. So let $I = \int^1_0 \frac{\ln(1+x)}{x}dx$ and also $I = \int^1_0 \frac{\ln(2-x)}{1-x}  $. Then $$2I= \int^1_0 \ln(1+x)+\ln(2-x)$$ which is not any easier, either. Any ideas? :)


I have a functions A B with same method in them. I want to access this method from another function. Depends upon some condition ill choose any one of version!      function A() {         var method = function() {             // do something..                 }             }      function B() {         var method = function() {             // do something..                 }             }      function other() {         // access method from function A() or B();     }   is there any way to access using objects like we do in JAVA or any other way?

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


I have several utility programs that I can run only by clicking on their "generic" executable file. How can I assign an icon to each of them for it to show in the Launcher? I am using Ubuntu 14.04 LTS. Thanks.

Will Unity allow making custom launcher icons from .desktop files or via menu editing system? (Right now the launcher doesn't give the option to "keep in launcher" on all programs.  For some programs I use, I have to make custom launchers or .desktop files.  For instance, daily blender builds are generally just folders with an executable.  In basic Gnome or KDE, I can make a new menu entry with the menu editing system. Then, I can also add it to Docky either from the menu or by dragging a .desktop file to it. Unity launcher doesn't support drag and drop, so thats not a bug or anything, but when I open a .desktop file, it has unpredictable results. Most time it will not have "keep in launcher". Sometime it will have a pinnable item without the .desktop's icon, and if I pin the item to the launcher, it will not call upon the program again after closing it. I've also gotten it to just work with a .desktop file for celtx.


I have ubuntu 12.04 (original) installed on a server.  How do I upgrade this to 12.04.03?

There are so called "point releases" for LTS versions of Ubuntu. 10.04.3 for instance.  What are those "point releases" releases?


I want to get filename of every file with specific extension in a folder one by one ( something like foreach loop ) actually I am consuming them in a BizTalk application so being able to get it one by one is very important.

How do you iterate over each file in a directory with a .bat or .cmd file?  For simplicity please provide an answer that just echoes the filename or file path.