I'm having some problems with GdalTools on QGIS 1.8, with MacOsx 10.8: I've the GDAL complete library 1.9 but ECW is still a not supported format.  What should I do?

I bought a imac recently and I tried to install qgis: without success! It is not possible to read the raster files.  I installed GDAL ECW plugin, but it is necessary to copy and paste another file from  ERDAS ECW/JPEG2000 following this instruction.  "VERY IMPORTANT POST-INSTALL  You MUST download and install the ECW SDK yourself. I don't have the means to enforce export restrictions. I'm sorry, but installation is a manual process for now:  Go to . Select "ERDAS ECW/JPEG2000 SDK" from the Product popup. Click on the MacOSX line, then the Download Now link.  Open the downloaded disk image and run the installer. It will install into the top of your boot drive, /Intergraph. Dig into this folder to Desktop_Read-Only/redistributable/libstdc++.  Copy the libNCSEcw.dylib file to:  /Library/Application Support/GDAL/1.11/Libraries  and copy the whole Desktop_Read-Only/etc folder here to:  /Library/Application Support/GDAL/1.11  so it looks like (there may be other files in Libraries and PlugIns for other installed plugins):  Library Application Support GDAL 1.11 etc Libraries libNCSEcw.dylib PlugIns gdal_ECW_JP2ECW.dylib  You can trash the installed Intergraph folder when done to save a few hundred MB of space.  I failed the procedure! Could you help me?


What should a young adult - with no credit history, moving out of the parent's home, and not going to college - look for in their first credit card?  I mean for comparing various credit card programs & companies in order to choose which one(s) to apply to. What should it have (eg. interest free pay off in the same billing cycle), and what should it not have (eg. an annual fee)?   Also, what are the reasonable expectations for what said young adult can get? (Like credit limit, interest rate, anything else you can think of)   I'd prefer a detailed answer, with reasons why for each pro and con you advise looking for. Assume complete ignorance about credit cards. :-)

I am looking to open up a new credit card. Throughout college, I had a credit card from a store, but since I don't really shop at the store anymore, I am not really getting value out of the card (besides that it gives me a limit that I pay off in full every month to build credit).  What criteria should I consider when looking at various credit cards before choosing one to open? I am hoping to get a card that has some type of reward option like cash back or points to something, but I'm not really sure where to look. Is there a site that compiles the various types of credit cards that would allow me to look in one spot as a starting point?


I'm using the Views slideshow module and jQuery cycle plugin, but the latter isn't recognized by Drupal 6.  this is the message I get:     Cycle library Non installé Please download the Cycle library from    and place it in   sites/all/libraries/cycle.   The plugin is already into my libraries folder as "jquery.cycle"; if I change it to "cycle", the Views slideshow module stop working.  How should I fix this?

I have installed Views Slideshow module 7.x.3.1.  Also, inside the sites/all/libraries I downloaded the .  I placed jquery.cycle2.min.js into the jquery.cycle2 folder, so it is at sites/all/libraries/jquery.cycle2/jquery.cycle2.min.js.  When I tried creating a view using Format : slideshow, I encountered the following error:     CYCLE OPTIONS You need to install the jQuery cycle plugin. Create a   directory in sites/all/libraries called jquery.cycle, and then copy   jquery.cycle.all.min.js or jquery.cycle.all.js into it. You can find   the plugin at .     Even after installing the cycle plugin in the libraries folder, I could not see an option for cycle2.   Along with with views slideshow, I need   and , with vertical effect instead of horizontal effect.


I am a person that is new to xubuntu using crouton on a chrome book I was wondering how to get the Root terminal open. The reason I want to do this is so I can modify some files that ware left behind by installing wine and removing it  ( Yes I used -Remove -Autoremove and -Purge) I can not do this and also I am morbidly curious so I would like access to the root terminal

When we want to run a programs as root we use sudo, gksu, gksudo and etc. Now my question is how do we can run a Terminal as the root user in Terminal?  I tried with using gksudo terminal and gksu terminal but nothing happens. and by running sudo terminal I get error sudo: terminal: command not found.


Pretty simple but didn't see any viable solutions and couldn't come up with a simple one myself.  is there a kill() command in Blender that kills only the current script/process but doesn't also kill blender?  I'd rather not have to grab the process manually first then end it.  Any help would be much appreciated thanks in advanced.

When using the Text Editor, what is the best command to include inside a script which will abort the script at that line?  quit() and sys.exit() stop the script, but also kill Blender.


My intention with this question is to collect relevant references or literature for a recurrent methodological approach commonly applied in health research.   The main question is: what is the appropriate ratio between case and controls?   Within my research field (primarily neurosurgery), it seems that almost every paper I've read exclusively match one case with five controls; however, I've never seen a reference to literature that actually investigated or argued this ratio.   Hence, I am seeking methodic literautre - preferable published papers, but not necessarily - that actively discuss or investigate the appropriate matching ratio between case and controls.       The main question yields a subsequent question: should researchers apply different case:control-ratios to different study designs? Eg., do a RCT require similar ratios compared to the methodic requirements of an epidemiological study, that match cases to the controls in the general population (through Health Registries)?   Open Discussion is encouraged.

I am using matchit package in R to find a control set for my treated units and I am testing the model with different ratio to get suitable control set. Is there a way to find suitable ratio and I will use that to find my control set.


So I recently installed Ubuntu 18.04 alongside my existing installation of Win 10. Ubuntu is working great, but something in Windows mysteriously broke and Windows is running like utter dogshit for no apparent reason. I’m thinking a repair or reinstall might fix this.   However, there’s one small problem. I have read before that Ubuntu, by default, puts grub on the Win efi partition or something to that effect. I don’t know much about that, but I expect if I reinstall Windows my grub will be wiped out, and a repair may or may not do the same.  So I guess my real questions are as follows: What happens to my grub if I “repair” a Win10 Home 1809 installation? What happens to it if I reinstall Windows? Finally, how do I avoid having to reinstall grub?  Hoping one of you beautiful people knows what I should do here, because I sure don’t.

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back?


Hi! my bike is Trek Marlin 4. I don't know why my axle broke so easy and this happened second time.  its almost winter in my nation we don't have good bicycle shops. They will be close so soon. I can't order a new one what should I do and I want to know why this happened ? Please help me  Is it possible to weld?  I bought my bike about 4 months ago.

So I'm taking the time during the holidays to overhaul my commuter bike. The whole drivetrain was full of old oil, road salt and grime so I decided to take the whole thing apart starting with the back wheel. Once I got it off, I ended up with half of the rear axle in my hand and a bunch of ball bearings on the floor (I found them all eventually).   The bike has been in use for about 18 months, and there were no rust and plenty of lube inside the hub so I don't really think it's natural wear.  What could have caused the axle to break? My theory is that they pulled the nuts too tight when they built the bike.  More importantly, is this a "user serviceable part" or do I need to get it repaired/replace the wheel? Seems to me getting the ball bearings to stay in place while I insert the axle would be quite challenging.


I just read this article:    I put Ubuntu 16 on my HP Stream 13 with a CD/usb. I'm having trouble getting the wifi to work though. The wifi adapter on my machine is a Broadcom BCM 43142 802.11bgn.  I downloaded the driver I found online via an ethernet cable. I installed it from my Downloads folder with   sudo apt-get install bcmwl-kernel-source   and I now see a wireless symbol at the top of my screen, but it's not working. When I click the symbol it says "No network devices available". Also, when I boot the computer now I get 3 error messages that say "System program problem detected" and ask if I want to report the problem.  Help?  Edit: When I type in:  lspci -knn | grep Net -A2; rfkill list   I get:  02:00.0 Network controller [0280]: Broadcom Corporation BCM43142 802.11b/g/n [14e4:4365] (rev 01)      Subsystem: Hewlett-Packard Company BCM43142 802.11b/g/n [103c:2230]      Kernel modules: bcma, wl  0: hci0: Bluetooth      Soft blocked: no      Hard blocked: no

This issue happens only on UEFI systems with enabled Secure Boot.  When I try to install DKMS modules like VirtualBox, Nvidia, or Broadcom drivers, they do not install and I get Required key not available when I try to modprobe them.  VirtualBox complains that vboxdrv is not loaded.  Broadcom wl driver is shown in lspci -k as a kernel module but is not in use. sudo modprobe wl throws Required key not available.  Also this issue may happen when I install some kernel modules from git sources.  This issue may appear after a kernel update as disabled wireless adapter, black screen after a reboot, etc.   How can I fix it?


How can I prove that all finite sets are countable?   A set $S$ is countable if there exists an injective mapping $f:\mathbb{N}\rightarrow S$.   So, shall I prove the above by contradiction? I assume that there exists a finite set, which is not countable, i.e. there exists no injective mapping between the set and that of natural numbers. Then how to proceed to reach the contradiction?  Please help me solve this problem. Thanks in advance.

How can I rigorously prove that a finite set is countable?   A set is countable if there exists a bijective mapping from this set to that of natural numbers.   Please anyone help me to prove it. Thanks in advance.


How do I prove:  $ \sin^2 {2x} - \sin^2 {x} = \sin {3x}\sin {x} $ ?  I'm lost

How would I verify the following double angle identity. $$ \sin(A+B)\sin(A-B)=\sin^2A-\sin^2B $$ So far I have done this. $$ (\sin A\cos B+\cos A\sin B)(\sin A\cos B-\cos A\sin B)  $$But I am not sure how to proceed.


This is related to this question about . I tried the highly-upvoted answer, which sounds like it is correct, but it does not work for me.  I am currently running Ubuntu 17.10 with the X.Org session (due to sometimes relying on X-tools, like x2x). This is in contrast to the OP in the other question, who seems to run the default Wayland session.  When pressing Ctrl-Alt-F3 on this machine, not a lot happens. The desktop freezes, the mouse vanishes, and, most importantly, I don't get a virtual terminal. Pressing Ctrl-Alt-F2 returns me successfully to my running session.  , they cite the release notes, which state that        GDM has replaced LightDM as the default display manager. The login screen now uses virtual terminal 1 instead of virtual terminal 7.      In addition they note that the currently running session moved to tty2 and unused virtual terminals are available after that.  So, why does this work under Wayland, but only partially with the fallback X.Org session? After all, the move of the currently running session to tty2 seems to have worked. But how do I get to a virtual console?

After booting to the GUI in 12.04, I attempt to move to the virtual terminal (or shell, or tty) via Ctrl-Alt-F1 (F1 through F6), and the screen remains blank. I have tried all 6 tty instances and the results are the same. Ctrl-alt-F7 brings me back to the GUI without a problem. Any thoughts?


I Recently noticed an lightweight app (Sonarr) wasn't running, so when into webmin to find a fidk fill error. '/' was 100% full. I have hunted around and sound a few commands to get a bit of short term space back (down to 96%), but there shouldn't be that much usage. I'm just running Ubuntu Server LTS18 and a couple of apps on a 120GB SSD. But I am seeing the below and cannot (and do no know how to) find where the heavy directories and/or file are in /.  Filesystem                                 Size  Used Avail Use% Mounted on udev                                       7.3G     0  7.3G   0% /dev tmpfs                                      1.5G  2.8M  1.5G   1% /run /dev/sde2                                  110G  104G  4.6G  96% / tmpfs                                      7.3G   12K  7.3G   1% /dev/shm tmpfs                                      5.0M     0  5.0M   0% /run/lock tmpfs                                      7.3G     0  7.3G   0% /sys/fs/cgroup /dev/loop0                                  90M   90M     0 100% /snap/core/7917 /dev/loop1                                  90M   90M     0 100% /snap/core/8039

I'm using Ubuntu 11.04 and I want to free up some space in my root directory, which is overloaded. I especially want to change the path used for installing applications (they are getting installed directly to the root drive).  Another consideration is that I'm working on a MySQL database server. The server is installed in the root directory itself, so I don't want to  risk losing any data.  Please give me some tips to help sort out this problem.


What is the plural of input ?  It proves unclear which is correct, input or inputs --- or both up to context of usage.

I am uncomfortable with the use of inputs as the plural noun of the previously non-countable input. Is this a recent computer-related development (as used in many posts on this site) which has spilled into wider use, or is there a subtle demarcation of use happening? I am thinking especially about situations where input equates with a contribution or feedback.    For example, I've seen sentences like: 'The organisation responded to the customers' inputs', and it feels completely wrong. For me this type should always be input whether plural or not.  As an aside I am very comfortable with inputs as the plural of the sockets into which plugs can be put, but again this is a very different meaning. What is the state of play?


I'm trying to replace lines that match the regex => '.*', in one file with lines from another file. Two example files. File 1:     'text_clear' => 'Clear',     'text_search' => 'Search',     'text_enabled' => 'Enabled',  File 2: emptied lost turned off  I'm trying to run a linux command using awk/sed/grep to create a third file that would output File 3:     'text_clear' => 'emptied',     'text_search' => 'lost',     'text_enabled' => 'turned off',  I've been successful in extracting what I want to edit a python script, but if possible I want to just use a linux command to do both. I've been racking my head over this for 3 hours now. Any help would be appreciated.

I have the following kind of text: $OU = 'or'; $DINHEIRO_CAIXA = 'Cash balance'; $PAGINA = 'Page'; $DE = 'from'; $ENVIAR = 'Send'; $PRINCIPAL = 'Main';  I've already got all the text within the single quotation marks using cat arquivo | grep -oP "'[^']+'" | tr -d "'" This extracted text was then translated to Portuguese, but now I don't know how to replace the original text between single quotation marks with the translated text, I was looking for something like $OU = 'ou'; $DINHEIRO_CAIXA = 'Dinheiro em caixa'; $PAGINA = 'Pagina'; $DE = 'de'; $ENVIAR = 'enviar'; $PRINCIPAL = 'Principal';  I've tried using grep -F to replace the file itself, but it failed miserably because the pattern didn't match since I don't have the quotation marks on the new file, is there a way to do this?


i added spot lights to my model, but on rendering EEVEE mode they partially don't show as you can see on the attached images. could anybody give me an advice? the set up of all the spot light is the same  thanks

I don't know if it is a bug or a limitation of Eevee, but the bigger scenes actually needs more than 128 lights. Also, Eevee doesn't bake more than 64 irradiance volumes. If it is not a bug, is there a culling option how to deactivate those lights and light probes that are behind the cameras, behind any object without a visual of them on the camera?  Thanks.


There is /location/of/thefile, which is a continuously changing logfile. The average density of refreshes is 4 per minute, the possible maximal refresh rate could be 30-40 per minute. Every refresh adds 2-5 lines (average), but it could be hundreds in extreme cases. Every line begins with a [YYYY-MM-DD HH:MM:SS] timestamp followed by plaintext (100-200, max. a few hundred characters).  My task is to construct a simple command which continuously watches this logfile, and sends to the stdout every lines that contain the foo OR bar alphabetical strings. Before and after those (sub)strings there could be any characters (\n only after the (sub)string, of course), even \0. The capitalization of the words could be all of the possible variations.  Well, my ideas for the solution always contain syscalls for the timing, but I shouldn't use them. Please construct me a simple command. Thanks a very lot!

I want to output a file's contents while they change, for example if I have the file foobar and I do:  magic_command foobar  The current terminal should display the file's contents and wait until, I don't know, I press ^C.  Then if from another terminal I do:  echo asdf >> foobar  The first terminal should display the newly added line in addition to the original file contents (of course, given that I didn't press ^C).


When trying to reproject a raster from degrees to meters in warp (QGIS) I receive the following error:   Processing algorithm… Algorithm 'Warp (reproject)' starting… Input parameters: { 'DATA_TYPE' : 0, 'EXTRA' : '', 'INPUT' : '/Users/annanilsson/Desktop/in_ref_annual.tif', 'MULTITHREADING' : False, 'NODATA' : None, 'OPTIONS' : '', 'OUTPUT' : '/var/folders/jv/g8xcbz2n4y109pdxsfr1hr080000gn/T/processing_387d8ccc215042b78b22f1546c4dd5c0/34324c65b826461a9a98f356bb1accdc/OUTPUT.tif', 'RESAMPLING' : 0, 'SOURCE_CRS' : None, 'TARGET_CRS' : QgsCoordinateReferenceSystem('EPSG:32635'), 'TARGET_EXTENT' : None, 'TARGET_EXTENT_CRS' : None, 'TARGET_RESOLUTION' : None }  GDAL command: gdalwarp -t_srs EPSG:32635 -r near -of GTiff /Users/annanilsson/Desktop/in_ref_annual.tif /var/folders/jv/g8xcbz2n4y109pdxsfr1hr080000gn/T/processing_387d8ccc215042b78b22f1546c4dd5c0/34324c65b826461a9a98f356bb1accdc/OUTPUT.tif GDAL command output: /bin/sh: gdalwarp: command not found  Execution completed in 0.11 seconds Results: {'OUTPUT': '/var/folders/jv/g8xcbz2n4y109pdxsfr1hr080000gn/T/processing_387d8ccc215042b78b22f1546c4dd5c0/34324c65b826461a9a98f356bb1accdc/OUTPUT.tif'}  Loading resulting layers The following layers were not correctly generated.

/var/folders/jv/g8xcbz2n4y109pdxsfr1hr080000gn/T/processing_387d8ccc215042b78b22f1546c4dd5c0/34324c65b826461a9a98f356bb1accdc/OUTPUT.tif

You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.   Any suggestions on what I might have done wrong?

I installed QGIS 3, and tried to execute tools like "sieve" "merge" and "polygonize". All of them gave me the error message:  GDAL command output: /bin/sh: (scriptname).py: command not found   I found the scripts in both /Username/miniconda3/bin and /Username/miniconda3/lib/python3.6/site-packages/GDAL-2.2.2-py3.6-macosx-10.9-x86_64.egg-info/scripts.  Checking env in Terminal shows that miniconda3/bin is in the path:  PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin://Users/Username/miniconda3/bin  What could be causing the failure of executing those scripts?


I am working on a homework assignment that requires me to draw a tree diagram using LaTeX, and I have such a frustrating problem right now.I tried to manually adjust the distance between siblings, but doing so does not work well. As you can see, the children of <S> and <D> overlap, but I don't know how to separate them. Please teach me how to solve this. Thanks a lot    \documentclass[letterpaper,11pt]{article} \usepackage[T1]{fontenc} \usepackage{tikz,forest} \usepackage[margin=1in]{geometry}  \begin{document}  \begin{tikzpicture}[ level distance=2cm, level 1/.style={sibling distance=8em}, level 2/.style={sibling distance=6em}, level 3/.style={sibling distance=3em}] \node {<S>} child { node { if }} child { node { <E> }      child { node { 0 }} } child { node { then }}           child { node { <S> }      child { node { \{ }}     child { node { <S> }          child { node { if }}         child { node { <E> }              child { node { 0 }}         }         child { node { then }}         child { node { <S> }              child{ node { print }}             child{ node { <E> }                  child { node { 0 }}              }          }         child { node { else }}         child { node { <S> }              child{node {print} }             child{node {<E>}                  child { node { 0 }}              }          }     }     child { node { <D> }          child { node { ; }}         child { node { <S> }}         child { node { <D> }}     } } child { node { else }} child { node { <S> }      child { node { \{ }}     child { node { <S> }}     child { node { <D> }} }; \end{tikzpicture}  \end{document}

I'm trying to get a nice tree without the overlaps, can anyone help me to improve my code?  \documentclass{standalone} \usepackage{amssymb} \usepackage{amsmath} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{dsfont} \usepackage{tikz} \usetikzlibrary{shapes} \usetikzlibrary{graphs}  \begin{document}       \begin{tikzpicture}[baseline,level/.style={level distance=20mm, sibling distance =35mm/#1},scale=1]         \node [ellipse split, draw] {$s_1<s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}             child{ node [ellipse split, draw] {$s_1<s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                 child{ node [ellipse split, draw] {$s_1<s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                     child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                     child{ node [ellipse split, draw] {$s_1<s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                         child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                         child{ node [ellipse split, draw] {$s_1<s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                             child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                             child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                         }                     }                 }                    child{ node [ellipse split, draw] {$s_1<s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                     child{ node [ellipse split, draw] {$s_1<s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                         child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                         child{ node [ellipse split, draw] {$s_1<s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                             child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                             child{ node [ellipse split, draw] {$s_1<s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                                 child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                                 child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                             }                         }                     }                     child{ node [ellipse split, draw] {$s_1<s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                         child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                         child{ node [ellipse split, draw] {$s_1<s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                             child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                             child{ node [ellipse split, draw] {$s_1<s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                                 child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                                 child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                             }                         }                     }                 }             };     \end{tikzpicture} \end{document}


i'd like to convert a decimal to a string, where zeros at the end are preserved. Using str method erases the last zeros.  Example:  number=0.20   Goal: "0.20"  e.g. using: str(number)="0.2" doesn't seem to work.

What is a Pythonic way to pad a numeric string with zeroes to the left, i.e. so the numeric string has a specific length?


Quirrell rolled off him, his face blistering, too, and then Harry   knew: Quirrell couldn’t touch his bare skin, not without suffering   terrible pain — his only chance was to keep hold of Quirrell, keep him   in enough pain to stop him from doing a curse.  Harry jumped to   his feet, caught Quirrell by the arm, and hung on as tight as he   could. Quirrell screamed and tried to throw Harry off — the pain in   Harry’s head was building — he couldn’t see — he could only hear   Quirrell’s terrible shrieks and Voldemort’s yells of, “KILL HIM!   KILL HIM!” and other voices, maybe in Harry’s own head, crying,   “Harry! Harry!” (Harry Potter and the Sorcerer's Stone)    While reading the phrase I fumbled a second for looking for where the complement ‘of’ is. It seems that “KILL HIM! KILL HIM!” is the complement of ‘of’. Then why is there a comma between the two?

When quoting something said by someone else, should I use a comma before the quote? Suppose I quote the definition given in a dictionary. Am I correctly using the the punctuation marks in the following sentences? (I am using them in the way I think correct in American English.)     One of the meanings of cat is, "a small animal with soft fur that people often keep as a pet."        A cadet is, "a young person who is training to become an officer in the police or armed forces."   Should I use a comma only when I explicitly quote somebody?     Groucho Marx once said, "Although it is generally known, I think it's about time to announce that I was born at a very early age."   Should I use a comma in this case too?     As Groucho Marx said,            No one is completely unhappy at the failure of his best friend.      On Comma Sense, A fun-damental guide to punctuation (Richard Lederer and John Shore), I read the following about using the comma:     Use commas to set off complete quotations:           The great general George S. Patton once said, "No, no—the war is this way, you idiots!"


I wrote the code that pulls all the links on a web page. I check with Arraylist to prevent the same link from appearing. But I get stackoverflow error if there are too many links on the site. I keep links in Arraylist for later use. How do I avoid this stackoverflow error? Could the cause of the problem be arraylist?    static ArrayList<String> linkleriTut = new ArrayList();      public void linkleriCek(String url, String taramaTuru) throws IOException{    try {       Document doc = Jsoup.connect(url).get();       Elements linkler = doc.select("a[href]");       for (Element link : linkler) {          if (!linkleriTut.contains(link.attr("abs:href"))) {             linkleriTut.add(link.attr("abs:href"));          }       }    } } catch (Exception e) { } if (taramaTuru.equals("Detaylı Tarama")) {    while (k < linkleriTut.size()) {       k++;       linkleriCek(linkleriTut.get(k), taramaTuru);    } }

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


This is my first time using stack overflow so bear with me. The problem I'm having is when I try to align my divs to the center of the screen, it won't work for some reason. I researched everywhere to try and find a solution but it doesn't work. Does anyone know what the problem is?   body{     margin: 0;     background-image: linear-gradient(to top, rgba(14, 245, 26, 0.829), rgb(0, 102, 255));     background-attachment: fixed; }  .container{     display: flex;     align-items: center;     justify-content: center;     text-align: center; } <!DOCTYPE html>               <title>Super Cool Calculator</title>         <link href="style.css" type="text/css" rel="stylesheet">

The Great Calculator

By Antdog0101

               Here is the result of when I save my code:

I want to center a div vertically with CSS. I don't want tables or JavaScript, but only pure CSS. I found some solutions, but all of them are missing Internet Explorer 6 support.
Div to be aligned vertically
   How can I center a div vertically in all major browsers, including Internet Explorer 6?


I have html being rendered using Razor in an MVC project.  The html itself is on a bootstrap modal, so you click a button, and a modal loads with the following code:

             &times;
Event Details

                 @Html.ValidationSummary()

                 @Html.LabelFor(m => Model.Calendar.EventName, new { @class = "control-label" })                 @Html.TextBoxFor(m => Model.Calendar.EventName, new { @id = "SelectedEventTitle", @class = "form-control formTextBox" })

                 @Html.LabelFor(m => Model.Calendar.DateScheduled, new { @class = "control-label" })                 @Html.TextBoxFor(m => Model.Calendar.DateScheduled, new { @id = "SelectedDateTime", @class = "form-control formTextBox", @readonly = "readonly" })

                 @Html.LabelFor(m => Model.Calendar.TimeScheduled, new { @class = "control-label" })                 @Html.TextBoxFor(m => Model.Calendar.TimeScheduled, new { @id = "SelectedTime", @class = "form-control formTextBox", @readonly = "readonly" })

                 @Html.LabelFor(m => Model.Calendar.EventLength, new { @class = "control-label" })                 @Html.TextBoxFor(m => Model.Calendar.EventLength, new { @id = "SelectedAppointmentLength", @class = "form-control numericOnly formTextBox" })

             <input type="submit" value="Save" id="btnSaveDetailsReferral" class="parsButton" />             <input type="button" value="Cancel" id="btnShowDetailsCancel" class="parsButton" aria-hidden="true" data-dismiss="modal" />

   That's all fine, it acts and looks how is should.  My problem is on the line  @Html.TextBoxFor(m => Model.Calendar.EventLength, new { @id = "SelectedAppointmentLength", @class = "form-control numericOnly formTextBox" })   I want this textbox to only allow numeric input.  I know I can use validation when I submit the form, but I don't want to do it that way, I want only numbers to actually appear in the box when typing, if you type or paste anything else, they won't work.  I tried @type="number", which didn't work.  I also have the following jquery code, which actually works on another part of the project:  $(".numericOnly").bind('keypress', function (e) {     if (e.keyCode == '9' || e.keyCode == '16') {         return;     }     var code;     if (e.keyCode) code = e.keyCode;     else if (e.which) code = e.which;     if (e.which == 46)         return false;     if (code == 8 || code == 46)         return true;     if (code < 48 || code > 57)         return false; });  //Disable paste $(".numericOnly").bind("paste", function (e) {     e.preventDefault(); });  $(".numericOnly").bind('mouseenter', function (e) {     var val = $(this).val();     if (val != '0') {         val = val.replace(/[^0-9]+/g, "");         $(this).val(val);     } });   But for some reason, it doesn't work on this textbox within the modal.  It works on other textboxes that aren't in modals, exactly as expected.  Can anybody identify what the problem is, or what I'm doing wrong?

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 let latex only run one of my defined commands and output results to a tax file.  For example, the following tex file:  \documentclass{article} \usepackage[usenames,dvipsnames]{xcolor}  \newcommand{\note}[3][]{{\color{Orange}#1}{\color{Red}#2}{\color{Cyan}#3}}  \begin{document}  \note[text1]{text2}{text3}  hello world \textbf{here} .  \end{document}   I want latex to only run the \note command and output the results:  \documentclass{article} \usepackage[usenames,dvipsnames]{xcolor}  \newcommand{\note}[3][]{{\color{Orange}#1}{\color{Red}#2}{\color{Cyan}#3}}  \begin{document}  {\color{Orange}text1}{\color{Red}text2}{\color{Cyan}text3}  hello world \textbf{here} .  \end{document}   into a new tex file for example compiled.tax  Is there anyway to achieve this?  Thanks in advance.

I'd like to know if there's a script that reads a .tex file and replace every instance of a non-standard TeX command with whatever it is replacing. I am not sure if what I want is clear but let me give an example:  Suppose the input is:   \documentclass{amsart}  \usepackage{amsmath,amssymb} \newcommand{\N}{\mathbb{N}} \DeclareMathOperator{\End}{End}  \begin{document} In this lecture we'll study the ring of Endomorphisms of an Abelian group $A$. Let's denote this ring by $\End(A)$. Throughout the lecture, $\N$ will denote the set of natural numbers. \end{document}    Then, a desirable output of such a script is:  \documentclass{amsart} \usepackage{amsmath, amssymb} \begin{document} In this lecture we'll study the ring of Endomorphisms of an Abelian group $A$. Let's denote this ring by $\operatorname{End}(A)$. Throughout the lecture,    $\mathbb{N}$ will denote the set of natural numbers. \end{document}   P.S.: I think I had seen something to this effect but I neither remember the place nor a key word to fire up Google.     I meant to write that, all answers here are awesome, but I miscounted 2 for 4. :(


I saw , but I'm not going to draw the whole XYZ (In my case), I just want to take the input properties individually, but I don't understand how  nodes = context.object.active_material.node_tree.nodes map = nodes.get('Mapping') if map:     layout.prop(map.inputs[1],'default_value[0]',text='Position X')

I have a Mix RGB node and want to display the input in a normal panel in the UI. I can show the color widget by using layout.prop(input,"default_value"), but what I want to do is to just show the Value of the input. This would then show a float input instead of the color widget.


I made an app that removes virus shortcuts using attrib command in CMD, and I need administrator rights so I can make the command.   Currently I'm not able to do that neither by whole program nor the Process itself. Here's a piece of code that needs UAC:  private void Button2_Click(object sender, EventArgs e) {     string Disktype = null;     Disktype = ListBox1.GetItemText(ListBox1.SelectedItem); ;     if (Disktype.Contains("C:") == true)     {         MessageBox.Show("You selected C:");     }     else     {         String Message = "Cleaning" + Disk.Diskvolume + "Are you Sure?";         String Title = "Cleaning now";         MessageBoxButtons buttons = MessageBoxButtons.YesNo;         DialogResult result = MessageBox.Show(Message, Title, buttons);         if (result == DialogResult.Yes)         {             String ShowFiles = "attrib -h -r -s /s /d" + Disktype + "*.*";             String RemoveVirus = "del" + Disktype + "*.lnk";             System.Diagnostics.Process.Start("CMD.exe", ShowFiles);             System.Diagnostics.Process.Start("CMD.exe", RemoveVirus);             MessageBox.Show("Cleaning");             System.Diagnostics.Process.Start(Disktype);             Close();         }         else         {             MessageBox.Show("Cleaning done");             Close();         }     }    As you can see,  I made ShowFiles and RemoveVirus directly to the cmd, but I'm having trouble as to how make them run as administrator.  Do I need it for the whole C# application or just the Process.Start ones?

I'm trying to install a service using InstallUtil.exe but invoked through Process.Start. Here's the code:  ProcessStartInfo startInfo = new ProcessStartInfo (m_strInstallUtil, strExePath); System.Diagnostics.Process.Start (startInfo);   where m_strInstallUtil is the fully qualified path and exe to "InstallUtil.exe" and strExePath is the fully qualified path/name to my service.  Running the command line syntax from an elevated command prompt works; running from my app (using the above code) does not. I assume I'm dealing with some process elevation issue, so how would I run my process in an elevated state? Do I need to look at ShellExecute for this?  This is all on Windows Vista. I am running the process in the VS2008 debugger elevated to admin privilege.  I also tried setting startInfo.Verb = "runas"; but it didn't seem to solve the problem.


I have written a batch file which creates a Zip from a set of files. This works fine.  I would now like to extend this batch file so the outputted zip file (from the above batch file) is written to a DVD/CD.  Is this possible?

Does anyone know an easy way to write files to a DVD from the command line. I've found a program that does it for CDs, and another that writes .ISO images to DVD.  I want to use it to write files to a backup DVD overnight.


I notice that the  doesn't get awarded after you read the entire tour page, as it does on other stack exchange sites. It also doesn't claim it is retired (as for example the "Analytical" badge does). Finally, only 14 have ever been awarded, which seems a bit low given that 173K have been given out on Stack Overflow. Is this a bug or a deliberate design choice that is undocumented?

There is an "Informed" badge for reading the meta about page but it was awarded zero times and to make sure I tried reading the about page but did not receive it. If the badge is to be awarded here, then this should be 'fixed'. If not, it should be removed from the list of badges.


When I favourite a question, it may be for a number of reasons. For example:   One or more answers were (very) helpful, and I would like to reference them later. It may be an interesting read/answer, but don't have time now. It's an interesting newly posted question with no answers yet, but I'd like to see what answers will be provided. It's an interesting question and I may be able to provide an answer, but don't have the time to write one. I suspect that one of the answers may be wrong or needs improvement, but don't have time to investigate. It's a canonical question I often link to when explaining something or marking something as a duplicate. ... perhaps more ...   Unfortunately, they're are lobbed together in one big list, which is not very easy to navigate. In fact, it's a real pain to navigate.  There are a number of things that could be improved, but the easiest way with the largest gains is to allow assigning a category or tag to a favourite question.  Just one category per question would be fine; for all I care, they don't even have to be named by every individual user, having 10 pre-made categories named "1" to "10" and/or coloured would already be good enough IMHO and already a large improvement over the current situation.    There is a  from 4 years ago, but that's a whole wish-list of feature requests, this is a more specific feature request.  That question does include an .

I use StackOverflow as a core learning tool and questions posted by others(as well as comments) have much-sought information and nuances.Also,the questions posted by me are likely to increase in numbers with time.I already have nearly a hundred favorite questions despite all attempts to be highly selective in favoriting questions.Taking out hard-prints or pdf prints makes categorizing and searching much more tiresome. I just don't know how to categorize my favorite questions based on aspects of a language like functions,global variables,recursion,syntax and other categories. It is really going to be a headache as I find good questions to add to the list everyday.Due to time constraints I can't read and assimilate the answers rightaway and have to bookmark/favorite them for later reference. I am sure it's common problem and there must be a solution for this on StackOveflow.I tried looking for it and couldn't find.So please suggest me the best option available to users for this issue.


Is there any way I could tidy this code and make it look better and more appealing?  import csv math_class = input ("Which math class would you like to see the results of?") while math_class not in ['1','2','3']:     math_class = input ("Which math class would you like to see the results of?") sort = input ("How would you like to sort the results alphabetical, highest or average:\n") while sort not in ["alphabetical","highest","average"]:     sort = input ("How would you like to sort the results") class_file_names = ['Class 1.csv', 'Class 2.csv', 'Class 3.csv'] scan = open(class_file_names[int(math_class)-1], 'r+') rows = csv.reader(scan) data = [] next(scan)  for row in rows:     data.append(row) scan.close()  if(sort == "alphabetical"):     word = "- Highest Score on test:"     sorted_= sorted(data, key=lambda name: name [0])     field = 5  if(sort == "average"):     word = "- Average Score"     sorted_ = sorted(data, key=lambda average: average[4], reverse=True)     field = 4  if(sort == "highest"):     word = "- Highest Score on test:"     sorted_ = sorted(data, key=lambda total: total[5], reverse=True)     field = 5  for row in sorted_:     print(str(row[0]), word, str(row[field])) input ("Sort Complete, press any key to close the program.")   If there is no way I could clean up the code, then that's fine as it does what I want it to (it's just that I thought the code could look more appealing than it already is).

This code is part of a larger code that generates an Arithmetic Quiz, although the code I have show below just saves the score that the user got on the test and their name. When saving the code it checks if the user has taken the quiz before. If the user has taken the quiz before it saves it as 'Older Score' or 'Oldest Score', however if the user has not taken the quiz before it generates a new row for them. Additionally it works out the average score and highest score for all users it has the data for. For my task I'm supposed to make the code as short as possible.  name = ""+first_name+" "+last_name rows_data = [] class_file_names = ['Class 1.csv', 'Class 2.csv', 'Class 3.csv'] scan = open(class_file_names[int(math_class)-1], 'r+') rows = csv.reader(scan) for row in rows:     rows_data.append(row) scan.close() class_file_names=['Class 1.csv', 'Class 2.csv', 'Class 3.csv'] csvfile=open(class_file_names[int(math_class)-1], 'w', newline="") fieldnames = ['Student Name', 'Oldest Score', 'Older Score', 'Latest Score', 'Average', 'Highest'] writer = csv.DictWriter(csvfile, fieldnames=fieldnames) writer.writeheader() nameFound=False for x in rows_data[1:]:     if x[0] == name:         x[3]=x[2]         x[2]=x[1]         x[1]=str(score)         x[4]=(int(x[1])+int(x[2])+int(x[3]))/3         x[5]=max(x[1],x[2],x[3])         nameFound=True     writer.writerow({'Student Name': x[0], 'Oldest Score': x[3], 'Older Score': x[2], 'Latest Score': x[1], 'Average': x[4], 'Highest' : x[5]})  if nameFound==False:     writer.writerow({'Student Name': name, 'Latest Score': score, 'Older Score': '0', 'Oldest Score': '0', 'Average': score, 'Highest': score}) csvfile.close() input("Test complete! Press anything to close.")


The environment where I work has an application which is available only within the intranet. Meaning it can be accessed using LAN and web access is under some restrictions with proxy server.  To avoid this restriction I use a 3G dongle but in that case I can not access that application even though I am connected to LAN.  How can I make sure web surfing with the 3G dongle and application access with LAN at the same time?  In other words is it possible to dedicate network connection to the applications?


Suppose we have a standard regression model   $$Y= X\beta + \epsilon$$  with  $$\epsilon \sim \sigma^2$$ $$X \sim N(\mu,\gamma^2)$$  Are the estimated coefficients the same as if $X$ was fixed?  Is the estimated variance of $\hat{\beta}$ the same?  Thanks!

If we have stochastic regressors, we are drawing random pairs $(y_i,\vec{x}_i)$ for a bunch of $i$, the so-called random sample, from a fixed but unknown probabilistic distribution $(y,\vec{x})$. Theoretically speaking, the random sample allows us to learn about or estimate some parameters of the distribution $(y,\vec{x})$. If we have fixed regressors, theoretically speaking, we can only infer certain parameters about $k$  conditional distributions, $y\mid x_i$ for $i=1,2,\dots,k$ where each $x_i$ is not a random variable, or is fixed. More specifically, stochastic regressors allow us to estimate some parameters of the entire distribution of $(y,\vec{x})$ while fixed regressors only let us estimate certain parameters of the conditional distributions $(y,\vec{x_i})\mid x_i$. The consequence is that fixed regressors cannot be generalized to the whole distribution. For example, if we only had $x=1,2,3,\dots,99$ in the sample as fixed regressors, we can not infer anything about $100$ or $99.9$, but stochastic regressors can. This is a rather obscure question as many textbooks only talk about the differences in mathematical derivation but avoid discussing the differences to the extent they can be generalized theoretically.


When I look at photos of sunrise respectively sunset and do not know the cardinal direction I'm not able to identify if this photo was taken on sunrise or sunset. So I ask myself the question is there a way to determine? Maybe color temperature of sky, color of the sun or something like this (consider photo no color shifts by post processing).

I was wondering, is there any inherent difference between a still of a sunset and one of a sunrise, if you have no further context?  That is, without knowing the time when the picture was taken, where in the world it was, which way the photographer was facing etc. Just from elements in the picture itself. Is it possible to tell the difference?  For instance, if the earth rotated a lot faster, I assume you would be able to tell by the light trail (or, of course, if it was a long exposure photograph).  Ideas?


Solve $x^2 + x + 47 ≡ 0 \pmod {7^3}$.  I don't know how to go about doing this question. I've tried completing the square and other routes but I always seem to end up with horrible answers for $x$ involving surds.  Any help or hints are appreciated.

Using the quadratic formula, we have either 0, 1, or 2 solutions. I wonder if we could use it this formula for congruence? Or is there a formula to solve quadratic equation for congruence?  Edit Assume that $ax^2 + bx + c \equiv 0 \pmod{p}$, where $p$ is prime with $(a, p) = 1$, then is there a formula for this equation?    Thanks,


I have the following set up: fetch some documents from Mongo. If there is a 'gap' in the dates then compute dates and insert missing rows. An additional requirement is that if the most recent user entry is "Yes", then I should copy the object into each of the inserted rows, i.e. pre-fill some data. Here's a simple example of the object:  {   "section1": {},   "section2": {},   "section3": {},   "section4": {     "question1": "Y",     "question2": "N",     "question3": "true",     "question4": "false",     "question5": "05/15/2017"   },   "section5": {} }   So, if I understand things correctly, I can't simply do something like:  if(oldObj.section4.question1==="Y"){     newObj.section4 = oldObj.section4; //copy the enter sub object  }   JS copies 'by reference'. I need to deep copy oldObj.section4 entirely. It doesn't look like there is an simple way to do this. NPM has a  that I might take a look at. Any advice would be appreciated. Is this the correct approach?

What is the most efficient way to clone a JavaScript object? I've seen obj = eval(uneval(o)); being used, but . I've done things like obj = JSON.parse(JSON.stringify(o)); but question the efficiency.  I've also seen recursive copying functions with various flaws.  I'm surprised no canonical solution exists.


Here :    I asked how it can be proven that a triangular number (a number of the form $\frac{n(n+1)}{2}$) cannot be a cube, fourth power or fifth power and lulu posted very useful results which probably solve the problem completely.   But even more seems to be true :   CONJECTURE : A triangle number cannot be a power $k^s$ with $k\ge 2$ , $s\ge 3$  The conjecture is true for $n\le 10^9$ and I currently verify the range $[10^9,10^{10}]$ without having found a counter-example yet.     Is it known whether this conjecture is true ?

Triangular numbers (See   )  are numbers of the form $$\frac{n(n+1)}{2}$$  In ProofWiki I found three claims about triangular numbers. The three claims are that a triangular number cannot be a cube, not a fourth power and not a fifth power. Unfortunately, neither was a proof given nor did I manage to do it myself. Therefore my qeustions :     Does someone know a proof that a triangular number cannot be a cube, a fourth power or a fifth power ?


I'm looking for a tool to create a point in every polygon, that will be placed in the polygon. these are complex shapes with holes. the point must not put in those holes!  the "plugin RealCentroid"  should do that, but that does not work.   I can get points, on every weight-point, but that is not always inside of a polygon!!

Is it possible (without writing Python code - sorry I'm not a developer) to create a point layer from a polygon layer but ensure the point is within the polygon? The ftools centroid tool is cool but some centroids are created outside the polygon (i.e. irregular polygon). In ArcGIS there is a "Feature to Point" tool similar to the ftools 'polygon centroids' tool but has a checkbox to force the point to be within the polygon.


I understand that I'm asking a very pedantic question, but as far as I'm aware a confidence region is a multi-dimensional generalization of a confidence interval and therefore as a credible interval is not a confidence interval, it is not a confidence region, however despite this I'm seen many sources act as if this is not the case. One such example being Hoff's A First Course in Bayesian Statistical Methods, which spends its entire 'confidence regions' chapter talking about credible intervals. Have I missed something? Why are there sources that treat credible intervals as confidence regions despite them not being the same things?

Joris and Srikant's exchange  got me wondering (again) if my internal explanations for the difference between confidence intervals and credible intervals were the correct ones.  How you would explain the difference?


i=100 while i>=1:   i=i//2   print(i)  What is the time complexity in upper bound for the following code?

Most people with a degree in CS will certainly know what . It helps us to measure how well an algorithm scales.   But I'm curious, how do you calculate or approximate the complexity of your algorithms?


I'm trying to remember a short story I read many years ago about the negative side of developing and deploying advanced weapons technology in an SF setting. It was about some intergalactic power that was trying to crush an adversary by using multiple new military technologies and how each one in turn caused this power so much grief it was defeated by the adversary. I think it was also required reading for military strategists at some schools here in the US, at least at the time I read it. I think the story was written by Brian Aldiss.

I am looking for help to point me out at a very old novel (likely from the '60s) about two empires at interstellar war. When it comes to starships, one is technologically very advanced, and the other has very low and inefficient technology.  The highly advanced empire has apparently strong chances to win the war, in particular considering a new technology they were developing. I remember the technology to work like this: consider the space as a flat surface, and on this surface, a disk around the spaceship. When the technology was turned on, this disk was stretched out, as made of rubber, so that it produced a cone, with the tip being the spaceship. The spaceship was therefore teleported 10 parsec away (if I remember correctly), but retained all the connections to the original position. If the spaceship moved, the cone moved as well. This allowed to move in position among enemy ships completely unnoticed, by stretching while afar, then moving in the proper position 10 parsecs away, then destretching.  Despite this technology, the empire lost the war because of delays. It's a perfect example of how having a disruptive technology does not guarantee to win against the competitors.  I am trying to find out the author and name of this novel, hopefully with the date of publication and in which journal/magazine.


I came across this statement in the book "Quantum Field theory and the Standard Model" by Matthew Schwartz.     "There is a deep connection between Spin and Lorentz invariance that is obscure in Non Relativistic Quantum Mechanics"   What is the connection between Spin and Lorentz Invariance? Is Spin a relativistic effect?

I study physics and am attending a course on quantum field theory. It is hard for me to draw connections from there to the old conventional theories.  In quantum field theory spin originates from the Dirac equation in the case of fermions.   I don't remember where it comes from in quantum mechanics. I just remember that there was the Stern Gerlach experiment where you shoot neutral spin 1/2 Ag atoms in. Is there also a electrically neutral elementary particle? If this is the case, how would this experiment look like in quantum field theory? Of course I ask this for the lowest order, otherwise we would have to calculate an infinite number of Feynman graphs, won't we?


What will happen if two different directories will be mounted on the same local directory? i would like to know if its possible, and if so, why?  thank you

I was running out of /tmp space on one of my servers today so I attached a new 100GB disk to the system and did the following without unmounting /usr/tmpDSK from /tmp:  mkfs.ext4 /dev/xvde mount /dev/xvde /tmp   and now df -h outputs as:  Filesystem      Size  Used Avail Use% Mounted on /usr/tmpDSK      98G  4.5G   89G   5% /tmp /dev/xvde        98G  4.5G   89G   5% /tmp    The size of /usr/tmpDSK shows :  [root@server2 usr]# ll -h /usr/tmpDSK -rw------- 1 root root 2.3G Jan 27 17:32 /usr/tmpDSK    Different forums suggested using mhddfs to mount multiple drives on a single mount point, but I just did it directly and it seems to have worked -- or am I missing something?  I am hoping to better understand what actually happened.


Let x1,x2,x3,.......xn be independent and identically distributed random variables from exponential distribution with mean 1/Lambda. Let Sn=x1+x2+......+xn and N=infimum(n>=1:Sn>1) then what is the variance of N.

Suppose $X_1, X_2, X_3, \ldots, X_n$ be independent and identically distributed random variables having an exponential distribution with mean $\frac{1}{\lambda}$.  If $S_n = X_1 + X_2 + \ldots + X_n$ and $N = \inf\{n \geq 1: S_n > 1\}$, then what would be the value of $\mathrm{Var}(N)$ ?


So I accidentally unmounted my external HDD in gparted and now it shows empty But in testdisk and getDataBack I can see the files and eventually copy them but they make around 900Go and even my two computers together aren't up to that size I wish to know if there's any other way to fix it Thanks in advance

What steps can I take to try to recover lost or inaccessible data from any storage device?  Answers:   This applies to any computer storage device, e.g. internal/external hard drives, USB sticks, flash memory. The most important thing is to STOP using it, any type of I/O can ruin your chances of a recovery.     We have separate questions covering common problems with USB flash drives in greater detail:


Find the inverse modulo,  Modulo inverse of $5991 \pmod{2014}$ ?  I am aware of the Euclid algorithm, but I am not sure how to apply it here?


Given $f$ an entire function so that $f\circ f$ don't have fixed points.  1) Prove that there is a constant $c\in \mathbb{C}$ with $c\not=0,1$ so that $f(f(z))-z=c(f(z)-z)$, $\forall z\in\mathbb{C}$  2) Prove that $f'\circ f$ is a constant function (using the derivative of the expression before).  3) Show that $f$ is a translation $f(z)=z+b$ with $b\not=0$  I have seen similar problems but not exactly this one. For 1) I have used the little Picard theorem with the function $\frac{f(f(z))-z}{f(z)-z}$. As this function doesn't assume the values 0 and 1, it is constant. For 2) I have $f'(f(z))f'(z)-1=c(f'(z)-1)$, but I don't know how to conclude that $f'\circ f$ is constant. For 3) I don't have any ideas. Hints? Thank you very much

Let $f$ be an entire function such that $f\circ f$ has no fixed points. Prove that $f$ is a translation   $$z\mapsto f(z)=z+b \qquad (b\neq 0)$$   Firstly, we prove that there exists a constant $c\in \mathbb{C}\backslash \{0,1\}$ such that  $$f(f(z))-z=c(f(z)-z) $$ applying Picard's little theorem. If $c=0$, then $f(f(z))=z$, so $f\circ f$ has a fixed point (absurd). If $c=1$, then $f(f(z))=f(z)$, so $f$ is the identity $f(z)=z$ and of course it has fixed point (absurd). Then,  $$F(z)=\frac{f(f(z))-z}{(f(z)-z)}$$ is an entire function which does not take the values 0 and 1 so, by Picard's little theorem, it must be constant.  Also, I've proved that $f'\circ f$ is a constant function. Let's see this. Differentiating  $$f(f(z))-z=c(f(z)-z) $$ we have $$f'(z)f'(f(z))-1=cf'(z)-c$$ $$f'(z)[f'(f(z))-c]=1-c$$ Again, the entire function  $$G(z)=f'(z)[f'(f(z))-c]$$ does not take the values $0$ and $1$ so, by Picard's Little Theorem, then is constant.   However, I don't know how to prove this problem. Any help would be appreciate.


I'm on the bottles puzzle and being asked to use " to solve the next puzzle.  I don't have "  To get " I have to reach the other puzzles but I can't get off this island. Does anybody have advice for what I should do? Thank you!

I saw this question  but it doesn't have a full solution. What is the full solution to the 99 bottles of beer on the wall for Vim adventures?  Context: for the sake of being a good SO member I will give more details but a full solution will answer my question. It seems from reading the other post that my register is incorrect for some reason. I can't get the <NL>. I think that's the issue since pasting won't work...


I learnt how to solve a 3x3 Rubik's cube 10 years ago. Every now and then, I picked up a cube, scrambled it, and solved it for fun. I used to work on speed-solving, and memorised lots of formulae for it. However, now I'd like to go a different way: I'd like to solve cubes using the minimal amounts of formulae.  F2L (First Two Layers)  For experienced players, it is clear that with F2L-methods one can solve the first two layers without memorizing any formulae, simply by forming bottom cross, building the 'pillars', and installing the pillars.  Top Cross  I cannot see clearly why the formulae [R'U'F'UFR] (center->bar->L->cross) work, but I have an explanation for it: There are several ways to uninstall and reinstall the pillars that we have installed in the F2L method. By observing what the reinstallations do to the top face, at the end of the day one can write down those that help form the top cross.  Top Face  The formulae [RU'L'UR'U'L] are similar to the above, but it 'reinstalls' two pillars at the same time.  Last layer  This is what I really cannot see/understand. I don't even know how people came up with these formulae..  Questions   Does anyone know how people came up with the formulae for the last layer? How to better see how the "reinstallations" work for the top face. I know this question is very vague; I am just giving a shot to see if someone has a good way to look at them.   Thank you!

I've seen two questions on solving the Rubik's cube but none of the answers have given a complete solution using mainly mathematical techniques. Furthermore, I've not seen a good explanation of general techniques for solving permutation puzzles in general, including those of the Rubik's cube family, without involving any memorized move sequences. So I've decided to write up my method below as an example of how group theory can be applied to solving such puzzles.


I don't know if I'm asking for too much, but the proofs I've seen of the statement  $$\sin(x+y) =\sin(x)\cos(y) + \cos(x)\sin(y)$$  consist of drawing a couple of triangles, one on top of each other and then figuring out some angles and lengths until they arrive at the identity.  And I agree with the proof, is just that, even by flipping the triangle around, it only proves the identity for the case $x+y<\pi/2$, or if it does prove it for all values of $x$ and $y$, I wouldn't understand why.  As to construing a proof by using Euler's identity or the derivatives of sin and cos, I would ask the writer to first prove his/her already accepted formulas without using the addition identity.  So that is my humble question. How could one prove that for all the values of $x$ and $y$, the identity $\sin(x+y) = \sin(x)\cos(y) + \cos(x)\sin(y)$ holds.  Any thoughts/ideas would be really appreciated.

$$\sin(a+b) = \sin(a) \cos(b) + \cos(a) \sin(b)$$  How can I prove this statement?


For ArcMap 10.3: I had two shapefiles, that at one point, were in different coordinate systems. Shp#1 was in NAD_1983_Texas_Centric_Mapping_System_Albers and Shp#2 was in NAD_1927_StatePlane_Texas_Central_FIPS_4203 and those were good times, as the shapefiles were then only 30 or so feet apart. But, I wanted complete accuracy in editing Shp#1 to Shp#2's minor detail change, so I attempted to change the coordinate system on Shp#2 in ArcCatalong by right clicking and going to properties and bring it over to NAD_1983_Texas_Centric_Mapping_System_Albers at which point it got even further away across my map in two completely different locations. I have performed a Define tool in ArcToolbox and a Project tool in ArcToolbox but to no avail-- it stays put in the exact same spot. I have checked MetaData-- no answers. The mouse hovers over the coordinates of each in meters as it should.  I will probably geo-reference it as my last resort, but just out of curiosity I'd thought I'd try here to see if someone could explain to me why exactly something like this would happen.

I put 4 different layers into my ArcMap document, but only one of them will show up on the map! I should be seeing the other 3 layers as well. When I do a Zoom to layer, I can see one layer, but I cannot figure out how to make the other 3 show up at once on top of each other.  Before I opened ArcMap, I used ArcCatalog where I right-clicked 3/4 of the shapefiles and  clicked Properties → Coordinate system → Import and then clicked on my Trees layer, which has the coordinate system I want the other 3 to have. But when I opened ArcMap the 4 layers did not overlap, nor could I move them above or below each other.


I have to determine $$13^{498} \pmod{997}$$  I know that it can only be $1$ or $-1$. But I don't quite know which. How can I decide?

I need some help with this problem:  $$439^{233} \mod 713$$  I can't calculate $439^{223}$ since it's a very big number, there must be a way to do this.  Thanks.


Driver A has boon leading archrival B for a while by a steady 3 miles. Only 2 miles from the finish, driver A ran out of gas and decelerated thereafter at ta rate proportional to the square of his remaining speed. One mile later,driver A's speed was exactly halved.If driver B's speed remained constant,who won the race?  i have tried the set up the relation$d^2x\over dt^2$=$K ({dx\over dt})^2$ and integrate it but dont know how to do.


I am always confused about the end of the movie Interstellar.  What really happened in that black hole? How could he survive in that black hole and then get out?

In the movie Interstellar,  Cooper (played by ) enters a black hole and sends a message to Murph (his daughter). Later, he is found by rangers, but I don't understand how he gets out of the black hole?  As far as I know, nothing can get out of a black hole, as it has extremely high gravity.


I have an ocean texture on a plane in a scene in blender 2.81. When using the evee render engine the ocean texture does not show up when rendering but it does in view port. In cycles it does show up in rendering however I want to render it in evee since it a bazillion times faster and doesn't have as much noise. I will have linked an image of the nodes for the ocean shader/texture and the render in cycles and evee. Nodes:  Cycles:  evee (rendered with 1 sample):

I have a Blender 2.8 scene with animated true displacement. It is created using material nodes and works fine in Cycles. However, EEVEE doesn't displace my meshes truly, only normals are changed. Is it possible and how to solve the problem now or in the future?


Okay so I just want to know why my program keeps crashing, all im trying to do is loop through the pointer to a char array and replace the old character with the new one and return how many times I have replaced it:   int main(void) {     char *s = "hello";        printf("%lu\n",str_replace_all(s,'e','f'));     printf("%s",s);     return 0;  }   size_t str_replace_all(char *s,int oldc,int newc) {      size_t count = 0;      for(;*s != '\0'; s++) {         if(*s == oldc) {         *s = newc;          count++     } }     return count;  }   This compiles fine with gcc -ansi -W -Wall -pedantic but when i run it it crashes with this:  Segmentation fault (core dumped) I need help figuring out whats going on, Thanks!  P.S expected output was hfllo

The following code receives seg fault on line 2:  char *str = "string"; str[0] = 'z';  // could be also written as *str = 'z' printf("%s\n", str);   While this works perfectly well:  char str[] = "string"; str[0] = 'z'; printf("%s\n", str);   Tested with MSVC and GCC.


Sorry if this has already been covered but I'm a bit of a virgin with DSLR's. I have a Nikon D7200 DX Body with a couple of kit lenses. i have recently aquired a Nikkor AF-S 70-300mm 1:4.5-5.6 ED IF which is an FX lens. All the info suggests it should perform as a 450mm on my DX body but ... The focal length and recorded image look exactly the same as my 300mm DX kit lens. Am I missing something ?

I have a Canon 7D, which has a crop factor of 1.6x.  When using a Canon EF-S lens I get the focal length stated on the lens, when using a Canon EF lens I get the focal length times 1.6 when used on the APS-C body. At least that's what I thought.  I just compared two lenses:   Canon EF-S 15-85mm f3.5-5.6 Canon EF 70-200mm f4   .  The top photo is shot with the 15-85, the bottom photo with the 70-200 - both lenses are set to 70mm. Now why do they look the same?  I thought I would get 112-320mm (70mm*1.6 crop factor). What did I misunderstand about the crop factor calculation? Lightroom also displays the photos as having "70mm" and not 112mm.


I just installed Ubuntu 13.10, Saucy Salamander. I would like to install a different Linux distribution, but all of my download crash. I want to use a torrent instead. What software can I install to download torrents in Ubuntu? I used Utorrent in Windows 8 but I don't think they have that for Ubuntu.

What GUI Based Torrent managers exist in Ubuntu and features they offer in terms of:     Speed to start downloading (Search Speed, Seed, Leech)   Speed while downloading   Compatibility   Stability   Data check   Other attributes


I am currently making a lesson plan and I have to put this sentence, but I'm not confident about its grammar correctness. "Students will photograph their works and will post them on the subject’s official Messenger group chat." Is using the word 'will' twice correct?

I wanted to check if the phrase:      The religious vandalism will spread and will contaminate many.    is correct according to English language grammar,   or whether the correct sentence is:     The religious vandalism will spread and contaminate many.   Taken from the following Portuguese sentence, a prophecy from Our Lady:     O vandalismo religioso se espalhará e contaminará a muitos.   Should I repeat will for the second verb, or write “The religious vandalism will spread and contaminate many”?


Hi I would like to know what is the difference between these two forms of type casting:  float flt=2.33; int x; x=static_cast<int> flt;   and    x=(int)flt;

I've been writing C and C++ code for almost twenty years, but there's one aspect of these languages that I've never really understood. I've obviously used regular casts i.e.  MyClass *m = (MyClass *)ptr;   all over the place, but there seem to be two other types of casts, and I don't know the difference. What's the difference between the following lines of code?  MyClass *m = (MyClass *)ptr; MyClass *m = static_cast<MyClass *>(ptr); MyClass *m = dynamic_cast<MyClass *>(ptr);


I have a large file: (file1.csv)  id,code,N 10214411,008.8,1 10214411,038.9,1 10214411,04.81,1 10214411,07.22,1   want to select and generate a new file based on second column with a list of IDs e.g:  second file has a large list of IDs for second column such as:(file2.csv):  0.008.8 07.22   result:(file3.csv)  id,code,N 10214411,008.8,1 10214411,07.22,1

I have a large csv file with these format file 1:  id,ICD,CT 16214497,008.8,1 16227244,401.1,45 27154870,780.79,1   I have another txt file with one column of list of id (header id). file 2:  id 16214497 27154870   I want another file that has only data limited to the list of id in file 2  output file:  id,ICD,CT 16214497,008.8,1 27154870,780.79,1


$$\cos \frac{2π}{2013} +\cos \frac{4π}{2013} +\cdots+\cos \frac{2010π}{2013} + \cos \frac{2012π}{2013}$$  How to sum it up? *Calculator is not allowed.

Possible Duplicate:          Prove $$\cos(\alpha) + \cos(\alpha + \beta) + \cos(\alpha + 2\beta) + \dots + \cos[\alpha + (n-1)\beta] = \frac{\cos(\alpha + \frac{n-1}{2}\beta) \cdot \sin\frac{n\beta}{2}}{\sin\frac{\beta}{2}} $$


It seems like there is no TortoiseHg package available for Ubuntu 20.04.  I was using TortoiseHg with 18.04 without any problem.  What's going on?  It seems like a major issue to me, TortoiseHg is extremely useful.

On previous systems like Ubuntu 16.04 LTS and 18.04 LTS it was possible.  But 20.04 LTS do not have tortoisehg and tortoisehg-caja in .  What to do?


I'm doing a very simple operation. Here's the code: float expectedTotal = 32.97; float firstPrice = 7.99; expectedTotal -= firstPrice;  When I assert that, expectedTotal should be 24.98, but I end up with an error saying: expected [24.980001] but found [24.98]  So the first question would be: Where is this 0.000001 comes from? I have read in other stackoverflow that dealing with currencies is not ideal with float and I should use the DecimalFormat. I tried with the following code: DecimalFormat df = new DecimalFormat("#.##"); String s = String.valueOf(expectedTotal); String newString = df.format(s); expectedTotal = Float.valueOf(newString);  But receive the error: java.lang.IllegalArgumentException: Cannot format given Object as a Number  I also tried with a parse: DecimalFormat df = new DecimalFormat("#.##"); String s = df.format(expectedTotal);         try {             expectedTotal = (float) df.parse(s);         } catch (ParseException e) {             e.printStackTrace();         }  Basically, all I want is expectedTotal as a float with only 2 decimals. Anyone can help me please ?

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


Over the years I have slowly developed a  that validates MOST email addresses correctly, assuming they don't use an IP address as the server part.  I use it in several PHP programs, and it works most of the time.  However, from time to time I get contacted by someone that is having trouble with a site that uses it, and I end up having to make some adjustment (most recently I realized that I wasn't allowing 4-character TLDs).  What is the best regular expression you have or have seen for validating emails?  I've seen several solutions that use functions that use several shorter expressions, but I'd rather have one long complex expression in a simple function instead of several short expression in a more complex function.


I'm an archaeology student working on a recent project and I'm wondering how to set my arcGIS project. I'm used to work with geographical data in ArcGIS on a large scale, but the current project is different, let me explain.  I want to display and work with dispersion of artefacts on an archaeological site. This site is subdivided in 1 square meter units or parcels in which I want to display a point layer composed of each artefacts having x-y coordinates (from an arbitrary x0-y0 itself on the site). So all my coordinates make sense in the context of the site, but they are not georeferenced in any way on a geographical level.   What projection should I use to work with this kind of data, if I want my square meters units (which will be polygons) to be perfectly square without distortion (kind of a non-earth system if that's a thing).  My guess is that, on this geographical scale, distortion and error will be inexistant in any projection, but I want to make sure before starting the project in ArcGIS.

I don't know so much about coordinate systems...  In my office we use to deal with spatial data coming from archaeological sites. Each site has its own x-y-z coordinate system (GCS). Three simple ortogonal cartesian axis. In the last years we have been managing this spatial data through GIS software (ArcGIS), without using specific coordinate system (just leave it as "undefined")  I'd like to know if there exisits any GCS designed to deal with such datasets using simple cartesian orthogonal axis, without grid distortions of the typical GCS. In addition, I'd like to know if this system is suitable for using it in an online mapping application.  By the way, we manage 2D (ArcMap) and 3D (ArcScene) environments and work with "mm" as length base unit.   If such a thing doesn't exists, maybe someone knows how to create it.


Say I start with:  uint8_t x = 0x12;   For debugging purposes I want to "print" it in binary (using NSLog) so I see: 000010010.   Is there a way to do that in Objective-C? The closest I got is using %o format, which gives 22 and then manually translate that to binary.  Also what about uint16_t y = 0x1234; or uint32_t z = 0x12345678; ?

I can print with printf as a hex or octal number.  Is there a format tag to print as binary, or arbitrary base? I am running gcc. printf("%d %x %o\n", 10, 10, 10); //prints "10 A 12\n" print("%b\n", 10); // prints "%b\n"


I am trying to save a spreadsheet as a CSV file. The file consists of korean characters, and the resulting csv has those characters literally converted to question marks (0x3F).  I am running on an English version of Windows but I (should) have the appropriate charsets installed.  The default encoding for non-unicode programs is English. I have no problems saving the files in other formats (xls or txt, for example).  This issue occurs for Japanese and Chinese characters as well.  The sample strings I used (in separate files) are  안녕하세요 你好 おはよう   None of files are exported correctly. Does Excel support asian characters when saving as CSV?  UPDATE  Decided to do some testing. Instead of trying to export from xls to csv, I instead created a csv manually that contains the following chinese characters: 你好. I am using Notepad++ to save the files. The purpose of this is to test whether excel can actually save CSV files with certain characters properly.  First, I encoded the file in UTF8 without BOM with .csv extension. I opened the file in Excel, and it rendered the characters as ASCII (therefore, incorrectly. Looks something like ä½ å¥½). However, when I saved the file, the characters were preserved when I opened it in notepad++ in UTF8.  Second, I created a new copy of the test file, but this time encoding it in UTF8 (with the BOM). I opened the file in Excel, and it read the file correctly (as 你好). I then re-saved the file, but this time it converted the characters to two question marks.  I found it interesting that while Excel correctly reads the file, it cannot re-save it correctly, but when it reads it as ASCII, it doesn't try to convert them but instead just outputs them as is. Seems like there is an issue when Excel tries to save unicode characters?  Workaround Solution  I saved the the document as Unicode Text which produces a tab-separated text file and it preserved the asian characters. There should be tools available to convert tab-separated files to comma-separated files.  Because the file is unicode encoded, all of the sample strings I've presented at the top (from three different charsets) appear properly.

I am working on a project that uses a CSV file supplied by the client to populate a database. The client is to create the spreadsheet, then save it as a CSV to be uploaded, which is then parsed into a database.  The problem is, whenever the client saves the excel spreadsheet as an MS-DOS .csv file, many of the special characters get converted to question marks "?" (symbols such as ' " / ). However, if we then open the CSV file and manually replace each ? with the right character it works fine.  The problem is that the data file is HUGE, and we can't reasonably do this, so I was hoping there was a way to save it. We have tried exporting as Unicode and ASCII to no avail. We have also tried uploading to google docs, and re-saving, however, it also breaks those characters.


I am trying to connect a HP ENVY 5000 printer/scanner to Ubuntu 16.04 OS, the printer function works but the scanner applications say that SANE cannot detect a scanner. Any help would be appreciated

Let's assume that one has some modern HP printer and/or scanner which is not supported by HPLIP package from official repository. Currently Ubuntu versions have :  trusty (14.04LTS): 3.14.3-0ubuntu3.4 xenial (16.04LTS): 3.16.3+repack0-1 bionic (18.04LTS): 3.17.10+repack0-5 focal (20.04LTS): 3.20.3+dfsg0-2 groovy (20.10): 3.20.5+dfsg0-3build1 hirsute (21.04): 3.21.2+dfsg1-2   What can one do if printer is supported in newer version of HPLIP (checked this in )?


In a view of a MVC app a table is presented to the user. This table doesn't have a head row, only the
 rows. Each row has a column with the name of a document and a button to delete it, as below:

             AD201	                              <button class="excluir" data-id="AD201" title="Delete the document">Delete</button>

             AD504	                              <button class="excluir" data-id="AD504" title="Delete the document">Delete</button>

   Well, to accomplish this I wrote the following jQuery function:  $('.excluir').click(function () {     $('#doc-' + $(this).data('id')).fadeOut(); });   It's not working. Why? I have a similar code to these in another view and it's working perfectly. What am I doing wrong? What am I missing?

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.


Is it correct to write 'browse easier' and 'search easier'? When I use my Word grammar check, it doesn't correct them. Edit: Perhaps I shouldn't have mentioned the grammar checker at all. I was looking for verification that the terms above were incorrect. I didn't want to write the following letter until I was sure. After reading your responses here, I sent it. In case you're curious, here it is: Hello XXXXXXXX, I am a XXXXXXXX customer who just received your letter promoting the new XXXXXXXX. I'm happy to learn about the changes that are coming. I'm writing because your letter says, "Browse easier" and "search for the shows and movies you love easier". 'Browse more easily' and 'search... more easily' are the way to write those sentences. Perhaps this was an honest mistake because no one who read the letter before it got mass-mailed knew better. In that case, please disregard this e-mail; (you may want to hire a better proofreader.) I'm writing in case XXXXXXXXXX knew it was incorrect but thought its customers needed words to be simplified to the point that they are wrong. We are not stupid. Most of us have an elementary level education, and therefore are familiar with adverbs. Wrong is not more attractive, ie. (XXXXXXincorrectly spelled product nameXXXX), it's just wrong. In the case of customers like me, it actually makes the company sending the letter less attractive.  Just a thought, (Signed)

My mom and I are having a dispute on much more easy versus much easier. For example, consider the sentence:     It's [much more easy]/[much easier] to do action X than action Y.   I say that much easier is correct and that much more easy is grammatically incorrect, while she says that both are okay. I understand that both are acceptable colloquially, but which is grammatically correct here? If you could explain why, that would be even better!


Is Transformers anime series or western cartoon? I watched a old Transformers series but it looks like anime and I found that Marvel inc that made Transformers so whats going on?

The original Transformers TV series was created by the American company Hasbro, and was adapted into Japanese as well. At some point, the Japanese franchise split off into its own continuity, launching its own set of sequels and spin offs.  The questions is: What part of the American franchise is considered canon by the Japanese one? Minor details such as name changes are not to be taken into consideration.


this is the first time I open a topic in this forum. So... I bought a dedicated server and i'm still trying to get access via Putty and Remote Desktop Connection (Windows 7) to work inside the server without terminal (i love terminal :P). Following some guides on the internet, I installed  sudo apt-get install ubuntu-desktop  and then I launch "startx" but...  (Pastebin cause I can't insert more than two links :P)

I'm new to Ubuntu - sorry for novice questions. What I have - is Ubuntu server, to which I have access only via ftp and putty. What I would like to do - is to run firefox (or any other browser) from that Ubuntu machine.  I've managed to install firefox , but when I'm trying to run something like this:  x-www-browser http://google.com   It is saying:  Error: no display specified   I don't understand - there is no display at all at Ubuntu sever - it is just computer case on rack, the only display I have - is mine.  Don't know, how to redirect this display output to my machine (if this is possible at all).


One button, when clicked, changes the html in the body tag, in which there is a new button. New button, when clicked, should give an alert message, but it is not.  I think it's probably the document.ready part, which needs to be reinitialized. But i don't know how to do that. Please check the code:  <!DOCTYPE html>         <title>Title For the Website</title>
       <button id="idol">Idol</button>
            This is a cut down version of my code. In the original page, a button generates some html through an ajax call, and that html has a button to do another ajax call.


We have a small company and we have developed our own CMS in PHP/MySQL. The code is stored in local files and in the database.  We'd like to be able to update the code of the CMS on our client's servers. This process should be semi-automatic, once we 'publish' the update, the code gets replaced on the client's server and in the database.  I was thinking about using Bazaar in combination with . This would take care of the files. But what about the database? Is there a standard method already available or should I upload a .sql file that gets installed when a user logs in to the CMS?  Thanks in advance for your suggestions!

At my company we have a group of 8 web developers for our business web site (entirely written in PHP, but that shouldn't matter). Everyone in the group is working on different projects at the same time and whenever they're done with their task, they immediately deploy it (cause business is moving fast these days).   Currently the development happens on one shared server with all developers working on the same code base (using RCS to "lock" files away from others). When deployment is due, the changed files are copied over to a "staging" server and then a sync script uploads the files to our main webserver from where it is distributed over to the other 9 servers.  Quite happily, the web dev team asked us for help in order to improve the process (after us complaining for a while) and now our idea for setting up their dev environment is as follows:   A dev server with virtual directories, so that everybody has their own codebase,  SVN (or any other VCS) to keep track of changes a central server for testing holding the latest checked in code   The question is now: How do we manage to deploy the changed files on to the server without accidentaly uploading bugs from other projects? My first idea was to simply export the latest revision from the repository, but that would not give full control over the files.  How do you manage such a situation? What kind of deployment scripts do you have in action?   (As a special challenge: the website has organically grown over the last 10 years, so the projects are not split up in small chunks, but files for one specific feature are spread all over the directory tree.)


I don't know if its possible to find out how many pieces are the boarder?

I have a puzzle I'm trying to solve and I have all the border pieces set out but I'm pretty sure some are missing. How do I figure out how many pieces are in the border? It's a 1000 piece puzzle and the dimensions are 20" by 27".


I need this, because sometimes the Gnome Shell "forgot" all my extensions configurations after a normal reboot/shutdown. And I'don't want reinstall entire system because this.   So I want a script or a command to enable then all during the my session startup (putting in gnome-session-properties) or even a fix for this problem.  I'm using Ubuntu Gnome 13.04 on Gnome Shell 3.8.3 (downgrade, now on v3.6.3.1)  Output of find ~/ \! -user $USER -print:  /home/mediacenter/.cache/dconf find: `/home/mediacenter/.cache/dconf': Permission denied /home/mediacenter/.gvfs find: `/home/mediacenter/.gvfs': Permission denied

I am running Ubuntu Gnome 13.10 with Gnome 3.10. My problem is that every time I reboot the OS all the shell extensions are turned off. The weird thing is that their settings are kept. They are just turned off and I have to re-enable them every time. How can I make them persistent.  Thanks  Update   Today Ubuntu 13.10 was officially released and after I upgraded, my problem is still there. Here is my system info:  $ uname -a Linux ubuntu-desktop 3.11.0-12-generic #19-Ubuntu SMP Wed Oct 9 16:20:46 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux   Any ideas?   Sidenote - Can someone please tell me at least were the settings of the state of the extensions (on/off) are stored? I have removed all the extensions  rm -r ~/.local/share/gnome-shell/extensions/* rm -r /usr/share/gnome-shell/extensions/*   and I installed the ones I use. So I am thinking of creating a cronjob and enabling all of them everytime the system boots. At least until i find how to fix this.


Show that there exist two disjoint closed sets $A, B \subset \mathbb{R}$ such that there does not exist a positive $ϵ$ with $d(x, y)\ge ϵ$ where $x∈A$ and $y∈B$.   I have already proved that if $A$ is compact and $B$ is closed, then there exist a positive $ϵ$ such that $d(x, y)\geϵ$. So for the question that we need to prove, we need to assume that none of $A$ and $B$ are bounded. But how does the unbounded property help to prove this one?

Are there two closed sets $A,B\subset\mathbb{R}^2$ with the following properties?   $A\cap B=\emptyset$ $\forall \epsilon>0$ there exist $a \in A$ and $b\in B$ such that $\|a-b\| < \epsilon$


I'm trying to figure out why this code is throwing NPE:  @RequestMapping(value = "/share/{id}/store/{typeId}", method = RequestMethod.PUT) public ResponseEntity<Share> updateShareStore(@PathVariable final long id,                                          @PathVariable final String typeId) {     EntityManagerFactory emf = EMF.get();     EntityManager em = emf.createEntityManager();     Share share = null;     logger.debug(User.class.getName());     try {         share = em.find(Share.class, id);         Store store = em.find(Store.class, typeId);         share.getStores().add(store);         em.merge(share);     } finally {         em.close(); // NPE Here!     }      return new ResponseEntity<Share>(share,HttpStatus.OK); }   Error:   java.lang.NullPointerException      at com.google.appengine.datanucleus.StoreFieldManager.processPersistable(StoreFieldManager.java:453)     at com.google.appengine.datanucleus.StoreFieldManager.getDatastoreObjectForCollection(StoreFieldManager.java:987)     at com.google.appengine.datanucleus.StoreFieldManager.storeRelations(StoreFieldManager.java:877)     at com.google.appengine.datanucleus.DatastorePersistenceHandler.updateObject(DatastorePersistenceHandler.java:426)     at org.datanucleus.state.JDOStateManager.flush(JDOStateManager.java:3832)     at org.datanucleus.ObjectManagerImpl.flushInternalWithOrdering(ObjectManagerImpl.java:3884)     at org.datanucleus.ObjectManagerImpl.flushInternal(ObjectManagerImpl.java:3807)     at org.datanucleus.ObjectManagerImpl.flush(ObjectManagerImpl.java:3747)     at org.datanucleus.ObjectManagerImpl.preCommit(ObjectManagerImpl.java:4137)     at org.datanucleus.ObjectManagerImpl.transactionPreCommit(ObjectManagerImpl.java:428)     at org.datanucleus.TransactionImpl.internalPreCommit(TransactionImpl.java:400)     at org.datanucleus.TransactionImpl.commit(TransactionImpl.java:288)     at org.datanucleus.ObjectManagerImpl.close(ObjectManagerImpl.java:1090)     at org.datanucleus.api.jpa.JPAEntityManager.close(JPAEntityManager.java:193)     at org.demo.resources.ShareController.updateShare(ShareController.java:83)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:606)   Could it be because that I use em with two Object types? But it's unlikely that way.

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


How do you turn off adventure mode in Minecraft 1.16.2

This question is regarding the minecraft Beta 1.8 prerelease -- I have a beautiful house in single player survival which I'd like to record while flying.  I want to be able to change the game mode of my survival map to creative to be able to fly through it without installing a mod. I know it is possible if you run the map on a multiplayer server via the command /gamemode <user> 0|1 but I want to achieve this in single player :)  I think this would be possible through editing your level.dat file as I think that's where the game mode for the map is stored.


What I have so far:  Assume $|z|= 1$ and $z\neq-1$, then $z=1$ or $z=i$ or $z=-i$.  If $z=1$, $Re(1-1)= 0$ as needed, but for trying to prove $z=i$ and $z=-i$ I get $Re(1-i) = 1$ and vice versa...  What am I doing wrong?

If $|z|=1$, show that: $$\mathrm{Re}\left(\frac{1 - z}{1 + z}\right) = 0$$   I reasoned that for $z = x + iy$, $\sqrt{x^2 + y^2} = 1\implies x^2 + y ^2 = 1$ and figured the real part would be:  $$\frac{1 - x}{1 + x}$$  I tried a number of manipulations of the equation but couldn't seem to arrive at any point where I could link the two to show that the real part was = 0.


I need to prove the following theorem:  Given $f(x)$ with domain $Df$ and $g(x)$ with domain $Dg$:  With $f$ and $g$ above, let $a$ be in the domain of $f(g(x))$. Then $f(g(x))$ is continuous at $a$ if $g$ is continuous at $a$ and $f$ is continuous at $g(a)$.  I am at a loss of how to approach this problem.  Any help is appreciated.    Proof:   The definition of continuity is $$  \forall \epsilon > 0 : \exists \delta > 0 : 0 < |x − x_0| < \delta \implies |f(x)−f(x_0)| < \epsilon $$

Suppose $f$ and $g$ are functions such that $g$ is continuous at $a$, and $f$ is continuous at $g(a)$. Show the composition $f(g(x))$ is continuous at $a$.  My idea: Can I go straight from definition and take $\delta=\min\{\delta_1,\delta_2\}$, where $\delta_1$ is used for the continuity of $g$ at $a$ and $\delta_2$ is used for f being continuous at $g(a)$. In my proof I just treat $g(a)$ as a point when referring to the composition. So it goes like this:  Proof: Given $\epsilon>0$, take $\delta=\min\{\delta_1,\delta_2\}$. Then $0<|x-g(a)|<\delta$ which implies $|f(g(x))-f(g(a))|<\epsilon$.


I've recently been watching some 3blue1brown videos and I watched one about the Monster set in group theory. Now, I have my questions about that but most I'm curious about something else he mentioned, namely quintic equations. I probably spelled that wrong, but what I mean is, an equation one-step above a quadratic equation. For example, something that looks like this: $$ 6x^{5}+3x^{4}+3x^{3}+5x+6=0 $$ So, my question is, what is the universal formula for solving an equation like this. And, where exactly does it come from?

The question that follows was inspired by  question:  When trying to solve for the roots of a polynomial equation, the quadratic formula is much more simple than the cubic formula and the cubic formula is much more simple than the quartic formula.    That the general solutions to various polynomial equations are so complex and difficult to derive seems to suggest a fundamental limitation in the problem solving capabilities of the mathematical machinery. Does this intuition of mine make any sense? What should I make of it? Why is it that with each successive degree in a polynomial equation, the solution becomes so much more complex? Can I gain some intuition about what makes finding the roots so hard? According to the : "there is no general algebraic solution—that is, solution in radicals— to polynomial equations of degree five or higher." What is so special about the quintic that makes it the cut-off for finding a general algebraic solution?


My question is about the resistor for termination in a CAN network. From an electrical perspective why should we add this resistor (commonly 120 Ohm) between the CAN_H and CAN_L? Thanks in advance.

I know the reasons for using terminating resistors on a  and how important it is.  But why 120 ohm? How did this value come up? Is there any specific reason to use 120 ohm?