How to print the array with this value inserted? I need to show the initial array, the between array and the end array. public class ExercicioVetores {      /*      * Programa que recebe valores do usuário,       * 1 Valor do tamanho do vetor.       * 2 Valor da posiçao onde será inserido um dado       * 3 Valor á ser inserido na posição informada      * 4 Imprimir o vetor com o valor inserido na posição informada      * 5 Inserir todos os valores e mostrar o vetor completo.      */     public static void main(String[] args) {         // TODO Auto-generated method stub         System.out.println("Digite o TAMANHO do vetorBase que deseja criar.");          //Inicia o método que vai buscar as informações imputadas no System.in         Scanner teclado = new Scanner(System.in);          // Criando vetor com parametro recebido.         int vetorBase[] = new int[teclado.nextInt()];         // Iniciando vetor com valores zarados         Arrays.fill(vetorBase, 0);          System.out.println("O vetorBase tem TAMANHO = " + vetorBase.length);          //Mostrando os valores do vetor criado         for (int i : vetorBase) {             System.out.printf(" " + vetorBase[i]);         }         System.out.println("");          System.out.println("Digite a POSIÇÃO que deseja inserir um VALOR.");         int posicaoValor = teclado.nextInt();          System.out.println("Digite o VALOR que deseja inserir na POSIÇÃO.");         int valorInserido = teclado.nextInt();          System.out.println("Será inserido no vetorBase de TAMANHO = " + vetorBase.length + ", na POSIÇÃO = "+ posicaoValor + ", o VALOR = " + valorInserido);         vetorBase[posicaoValor] = valorInserido; //Vetor Base na posicaoValor recebe o valorInserido.  //Imprimir o vetor criado para mostrar a posição que foi inserido o valor na posição correta. //On this point i like to print the array with the value inserted.          for (int i : vetorBase) {             System.out.println("");         }                                             /*          * Arrays.sort(vetorBase); Ordenação do vetor int mostrarPosicao =          * Arrays.binarySearch(num,1); Buscar valor          */      }// main  }// class

In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the  of the array, as defined by Object.toString():  int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray);     // prints something like '[I@3343c8b3'   But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs:  // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5]  // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]


How to determine a 2D-array dimension by input two integers separated by space? My method is  use split function, convert string to integer and determine 2D array. Here is my code, however there is an syntax error.  Thanks  import java.util.Scanner; public class inputtwointeger { private static Scanner input; public static void main(String[] args) { input = new Scanner(System.in); System.out.println("Enter integer separated by spaces: "); String firstInput = input.nextLine(); String [] secondInput = firstInput.split(" "); System.out.println("Numbers"); for(String n: secondInput) {     System.out.print(firstInput+" "+secondInput); } //covert string into integer int row = Integer.parseInt(secondInput[0]); int column = Integer.parseInt(secondInput[1]); // new a 2D array using two integer you input int [][] array = new int[row][column];  }  //generate 2D array element in hand step by step  for (int i = 0; i < row; i++) {          for (int j = 0; j < column; j++) {              array[row][column] = input.nextInt();              System.out.print(Arrays.deepToString(array));              }          System.out.println();         }   }


I installed the latest version of xampp i.e. 1.8.3-2 in ubuntu 12.04.  I found that it include php 5.5.6 and I want the lesser php version to work on my site. How can i install the new version or multiple version in xampp so that my site can work. I am working on magento and it does not support php 5.5 so any idea how can I do this.  Thanks

I'm having trouble installing multiple versions of XAMPP on my machine. I am currently using version 1.7.7 and installed it in /opt/lampp, but I also need to install the previous version which is version 1.7.1. So I downloaded and installed version 1.7.1 in /opt/lampp2.   But when I run /opt/lampp2/lampp startcommand to start 1.7.1 version, why does XAMPP show that the version that is currently running is 1.7.7, when it should be  1.7.1?


I have a dual-boot windows 8 and Ubuntu with a NTFS data partition on my laptop.  After a forced migration to windows 10, my computer restarted on grub rescue mode and i was enable to boot on ubuntu or on windows.  error: no such partition. Entering rescue mode... grub rescue>   So i have tried to reinstall grub with boot-repair on live USB but it didn't work and my computer now boot directly on windows ...  Current partition info (bootInfo):  Disk /dev/sda: 512.1 GB, 512110190592 bytes 255 heads, 63 sectors/track, 62260 cylinders, total 1000215216 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes  Partition  Boot  Start Sector    End Sector  # of Sectors  Id System  /dev/sda1    *          2,048       718,847       716,800   7 NTFS / exFAT / HPFS /dev/sda2             718,848   208,764,927   208,046,080   7 NTFS / exFAT / HPFS /dev/sda3         826,302,464 1,000,214,527   173,912,064   5 Extended Invalid MBR Signature found. /dev/sda5     ? 1,524,864,998 5,236,647,937 3,711,782,940  c0 CTOS /dev/sda6     ? 5,092,567,351 8,619,976,874 3,527,409,524  c5 DRDOS secured Extended /dev/sda4         208,764,928   826,302,463   617,537,536   7 NTFS / exFAT / HPFS  /dev/sda5 ends after the last sector of /dev/sda the logical partition /dev/sda5 is not contained in the extended partition /dev/sda3 /dev/sda5 overlaps with /dev/sda6 /dev/sda6 ends after the last sector of /dev/sda the logical partition /dev/sda6 is not contained in the extended partition /dev/sda3   /dev/sda1 -> MBR (partition correctly reconized)  /dev/sda2 -> OS windows (partition correctly reconized)  /dev/sda3 -> Extended partition  -> /dev/sda5 Logical Ubuntu partition (proably /)  -> /dev/sda6 Logical Ubuntu partition (probably /home)  On gparted, i see /dev/sda3 but logical partition isnt displayed  /dev/sda4 -> NTFS data partition  On gparted, got following error when i try to mount this partition (can't mount this partition on windows too ...) :  Unable to detect file system! Possible reasons are: - The file system is damaged - The file system is unknown to GParted - There is no file system available (unformatted) - The device entry /dev/sda4 is missing   Full BootInfo =>   Current partiton info (fdisk):  Invalid flag 0x3261 of EBR (for partition 5) will be corrected by w(rite). label: dos label-id: 0x8858596d device: /dev/sda unit: sectors  /dev/sda1 : start=        2048, size=      716800, type=7, bootable /dev/sda2 : start=      718848, size=   208046080, type=7 /dev/sda3 : start=   826302464, size=   173912064, type=5 /dev/sda4 : start=   208764928, size=   617537536, type=7 /dev/sda5 : start=  1524864998, size=  3711782940, type=c0   Scan with gpart : =>   What i have to do now to recover my NTFS data and linux partition ?  Thx for help (and sorry for my english).

I installed Ubuntu on a Dell XPS 13 laptop that had Windows 10 preinstalled on it. I installed it from a USB flash drive on a partition. When I boot my computer I can only boot into Windows 10 and Ubuntu is nowhere to be seen.  If I boot into my USB then I can see that Ubuntu is installed, but I can't get to it from the BIOS boot menu.


What happened when I wrote a, b, c = [[],] * 3 in python? It seems that a, b, c are the same object.  a, b, c = [[],] * 3 a.append(1) b.append(2) print(c)   The answer is [1,2] , why?

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


I know that in PHP, the only difference between double quotes and single quotes is the interpretation of variable inside a string and the treatment of escape characters.  In JavaScript, I often see double quotes used in strings. Is there a particular reason for that, or are single quotes exactly the same as double quotes?

console.log("double"); vs. console.log('single'); I see more and more JavaScript libraries out there using single quotes when handling strings. What are the reasons to use one over the other? I thought they're pretty much interchangeable.


I wanted to use the most recent nvidia-319(I think) drivers so that Steam would stop complaining about my drivers.  I selected the 319 drivers in the System Hardware menu and rebooted.  The system hung on reboot for several minutes so I performed a hard-shutdown. After the system came back online, it prompted me for my MySQLServer login (its never done that before). I forgot the credentials so I hard-restarted again and this time it boots to a black screen with a flashing cursor on the top left. NOTHING THAT I TYPE IS SHOWN ON SCREEN.  When I hit the power button, it says various things are shutting down/stopping and then the system turns off.  My question is how can I use a LiveCD to revert this driver change? Or is there another (better) method?   This is the first time that I have broken my Ubuntu in 4 years :(  Thanks in advance.

My problem is that after trying to update my driver through the additional drivers GUI I can't boot Ubuntu with GUI anymore, since Xorg says the kernel module is of version 304.88 (The old version before I updated) but the driver components are of version 319.32 (The new version)  This is the output of dpkg -l | grep nvidia  dkpg -l | grep nvidia ii nvidia-304 : 304.88-0ubuntu0.0.3  NVIDIA binary Xord driver, kernel module and VDPAU library ii nvidia-319 : 319.32-0ubuntu0.0.1  NVIDIA binary Xord driver, kernel module and VDPAU library ii nvidia-common : 1:0.2.44.2  Find obselete NVIDIA drivers ii nvidia-current : 304.88-0ubuntu0.0.3  Transitional package for nvidia-current ii nvidia-settings : 304.88-0ubuntu.0.0.3  Transitional package for nvidia-settings ii nvidia-settings-304 : 304.88-0ubuntu.0.0.3  Tool for configuring the NVIDIA graphics driver ii nvidia-settings-319 : 319.32-0ubuntu.0.0.1  Tool for configuring the NVIDIA graphics driver   That's the output of that file.  The message startx gives me is:  NVIDIA: API mismatch: the NVIDIA kernel module has version 304.88, but this NVIDIA driver component has version 319.32. Please make sure that the kernel module and all NVIDIA driver components have the same version.     Fatal server error:    no screens found   I understand that something went wrong during the update, so I wonder how to fix this so that the remaining parts of 304 are removed and replaced with 319. I don't know hwere to start because I thought that nvidia-current was the one that would update to 319 and so reinstalling that didn't work. And I googled and found that somebody said to try to install/reinstall/uninstall this package: nvidia-current-updates-dev  But I didn't have that package installed so it did not help. Other than that, I am clueless. I hope the information I provided will be enough so I can get an answer soon.  EDIT:  lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 12.04.3 LTS Release: 12.04 Codename: precise  uname -a Linux SQuad 3.2.0-52-generic #78-Ubuntu SMP Fri Jul 26 16:21:44 UTC 2013 x86_64 x86_64 x86_64 GNU/LINUX


I'm trying to filter a string of 2 vectors based on what they have. By that I mean my vector vector1 contains ["01","11","10"] and another vector vector2 which was created recursively using options() function to make binary numbers based on the digit=2 ["00","01","11","10"]. I want to sort through both of them  and the value which is in vector2 but not in vector1 to another string of vectors. So using the above example I want a 3rd vector to contain ["00"] which should be a string. This is my code but on the last for loop where I actually do the filtering it gives me an error #include <iostream> #include <bitset> #include <vector>  std::vector<std::string> options(int width) {     if (width == 1)     {         return {"0", "1"};     }     std::vector<std::string> rest = get_combs(width-1);     std::vector<std::string> appended;     for (const auto& s: rest)     {         appended.push_back(s + '0');         appended.push_back(s + '1');     }     return appended; }  int main() {     std::vector<std::string> vector1 {"01", "11", "10"};     std::vector<std::string> vector2 = get_combs(2);        for (int i = 0; i < vector2.size(); i++){         if ( vector2[i] in  vector1 ){  <-- error             // ...         }     }  }  The error says no viable conversion from       '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char,       std::char_traits<char>, std::allocator<char> > >,       std::__cxx11::basic_string<char, std::char_traits<char>,       std::allocator<char> > >::value_type' (aka       'std::__cxx11::basic_string<char, std::char_traits<char>,       std::allocator<char> >') to 'bool'     if( vector2[i] in  vector1 ){         ^~~~~~~~ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h:816:7: note:        candidate function       operator __sv_type() const noexcept       ^  I'm not sure what to do, can somebody help me?

All I want to do is to check whether an element exists in the vector or not, so I can deal with each case.  if ( item_present )    do_this(); else    do_that();


I'm having some trouble with getting my Ubuntu to work on a VirtualBox VM. I made a clean installation of Ubuntu 12.10 on a VM without any errors. I arrive at the login screen, as soon as I press enter it does it's little loading thingy and then screen goes black, then this is all I get:    I can access the terminal and pretty much all the other features through it, but I would like to have the GUI properly working. I've been looking around the web and looking at various fixes to similar problems, but can't seem to get it to work. I'm thinking this problem might have to do with the graphics?  I'm running Windows 8 Pro as host, if that helps, might be some compatibility issues with VirtualBox in W8...  Thanks in advance!

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


How can i make my python discord bot caps non sensitive. if message.content.startswith('$doge'):         price('dogecoin')          await dembed('Dogecoin', 'https://www.shareicon.net/data/2015/09/14/101012_doge_512x512.png', message.id)          print('Dogecoin:', rprice)

How can I do case insensitive string comparison in Python?  I would like to encapsulate comparison of a regular strings to a repository string using in a very simple and Pythonic way. I also would like to have ability to look up values in a dict hashed by strings using regular python strings.


Im attempting to create a function that when called it will create as many files as the value of a parameter given. For instance, if I call it :  ejercicio_VI file 4   It will create file1 and file2 and file3 and so on...  This obviously works manually but it seems it does not work correctly within a function.  Why is my function not expanding the filenames correctly?  ejercicio_VI() {     if [[ $# -ne 2 ]]     then         echo "Esta funcion solo acepta dos parametros"         return 255;     fi      if [[ ! $1 =~ ^[a-zA-Z]+$ ]]     then         echo "El primer parametro debe ser una string que matchee con esta expresion regular : ^[a-zA-Z]+$"         echo "Asi no creamos archivos basura :P "         return 255;     fi     if [[ ! $2 =~ ^[1-9]([1-9])?+$ ]]     then         echo "El segundo parametro debe ser un numero"         return 255;     fi      touch "$1"{1.."$2"}   }

How do I iterate over a range of numbers in Bash when the range is given by a variable?  I know I can do this (called "sequence expression" in the Bash ):   for i in {1..5}; do echo $i; done   Which gives:     1    2    3    4    5   Yet, how can I replace either of the range endpoints with a variable? This doesn't work:  END=5 for i in {1..$END}; do echo $i; done   Which prints:     {1..5}


I'm trying to block the access to certain websites using the Website Filter section from Dlink DIR-300 Admin (Firmware 2.14, Hardware Bx which is the latest).  It works for any keyword, except for facebook.  I can access www.facebook.com, but I can't access the URLs that contain facebook.com in their URL, but have different domain. (ie www.randomname.com/facebook.com).  What I've tried:   to restart the router after I added the settings ipconfig /flushdns tests from different browsers clear browser cache   So how can I really block facebook using this solution?  Update I could block the access to the mobile version (m.facebook.com), via http. However, when this is accessed via https, then facebook is accessible. The problem is the admin interface doesn't allow me to explicitly set this entry .  I just realized the same problem is with YouTube which is also using the https protocol. I tried with other websites that use both HTTP and HTTPS. The HTTP pages are blocked, but not the HTTPS pages.

I recently got a new router, a DRL-600L Router from D-Link, and was setting up some filters to block out certain websites.  One problem I am having is blocking out addresses that use https instead of http.  For example, I'm trying to block out Facebook, because Facebook.   So far, the filter filters http://www.facebook.com perfectly fine, but for the url https://www.facebook.com, it won't block that.  How can I block those kinds of websites?


Given an xml structure in a String type, I'm looking for a way to replace data with four asterisks, while leaving the tags in their place. That is, starting from this <one> <two> abc </two> <two> def </two> </one>  I want it to become <one> <two> **** </two> <two> **** </two> </one>  I've tried requestBody.replaceAll(">[^<]+?<","> **** <")  but I'm also capturing any blank spaces between two adjacent tags, having therefore <one> **** <two> **** </two> **** <two> **** </two> **** </one>  How could I achieve my goal? Any suggestions?  for some tests. Edit Following Michael Kay suggestions I've found this solution /**  * Anonimyzes an xml structure replacing all data between tags with 4 asterisks.   * Tags won't be replaced.  *   * @param xmlInput the string representing the xml to be anonymized  * @return the anonymized xml structure.  */ private String anonymizeXml(String xmlInput){     String anonimizedXml=null;     try {         TransformerFactory factory = TransformerFactory.newInstance();         Source xslt = new StreamSource(new StringReader("<xsl:transform version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"><xsl:template match=\"*\">  <xsl:copy>   <xsl:apply-templates/>  </xsl:copy></xsl:template><xsl:template match=\"text()[normalize-space()]\"> **** </xsl:template></xsl:transform>"));         Transformer transformer;         transformer = factory.newTransformer(xslt);         Source text = new StreamSource(new StringReader(xmlInput));                  StringWriter writer = new StringWriter();         transformer.transform(text, new StreamResult(writer));         anonimizedXml = writer.toString();              } catch (TransformerConfigurationException e) {         e.printStackTrace();     } catch (TransformerException e) {         e.printStackTrace();     }     return anonimizedXml; }

Given the below XML snippet I need to get a list of name/value pairs for each child under DataElements. XPath or an XML parser cannot be used for reasons beyond my control so I am using regex.  <?xml version="1.0"?> <StandardDataObject xmlns="myns">   <DataElements>     <EmpStatus>2.0</EmpStatus>     <Expenditure>95465.00</Expenditure>     <StaffType>11.A</StaffType>     <Industry>13</Industry>   </DataElements>   <InteractionElements>     <TargetCenter>92f4-MPA</TargetCenter>     <Trace>7.19879</Trace>   </InteractionElements> </StandardDataObject>   The output I need is:      [{EmpStatus:2.0},  {Expenditure:95465.00}, {StaffType:11.A}, {Industry:13}]    The tag names under DataElements are dynamic and so cannot be expressed literally in the regex. The tag names TargetCenter and Trace are static and could be in the regex but if there is a way to avoid hardcoding that would be preferable.   "<([A-Za-z0-9]+?)>([A-Za-z0-9.]*?)</"   This is the regex I have constructed and it has the problem that it erroneously includes {Trace:719879} in the results.  Relying on new-lines within the XML or any other apparent formatting is not an option.  Below is an approximation of the Java code I am using:  private static final Pattern PATTERN_1 = Pattern.compile(..REGEX..); private List<DataElement> listDataElements(CharSequence cs) {     List<DataElement> list = new ArrayList<DataElement>();     Matcher matcher = PATTERN_1.matcher(cs);     while (matcher.find()) {         list.add(new DataElement(matcher.group(1), matcher.group(2)));     }     return list; }   How can I change my regex to only include data elements and ignore the rest?


I wanted to know if 3 3.7 volts 6000 mah hour batteries power 2 9 watt bulbs, and a 12-volt pc case fan? If so for how long?

I would like to know how to calculate battery life when using an LED strip. The LED strip is powered by 8 AA batteries in series. LED Current Draw = 260 mA. LED power consumption: 3.1 W. LED Operating Voltage range: 9-14.8 VDC. Please see attached images for battery datasheet.  This is my calculation, but I'm not sure if it's correct:     Battery Life = (Battery Capacity)/(Load Current) = 2000 mAh /260 mA = 7.7 Hours   This is for one battery, and the lights are powered by 8 batteries, so is the total battery life = (7.7)x(8) = 61.6 hours ?


I am trying to install Minecraft for the first time. I have tried to uninstall Java and reinstall. I have tried shutting off the firewalls. I do not know what else to try. Anyone have any ideas? I am getting the following error...  [20:04:06] [Client thread/INFO]: Setting user: dragondecimator [20:04:06] [Client thread/INFO]: (Session ID is token:f5c4b35f76f643488e5207346aabfbf5:31e215dcad9647e6afbef45d1687ae61) [20:04:09] [Client thread/INFO]: LWJGL Version: 2.9.1 [20:04:09] [Client thread/INFO]: Reloading ResourceManager: Default [20:04:10] [Sound Library Loader/INFO]: Starting up SoundSystem... [20:04:10] [Client thread/WARN]: File minecraft:sounds/mob/ghast/fireball.ogg does not exist, cannot add it to event minecraft:item.fireCharge.use [20:04:10] [Thread-6/INFO]: Initializing LWJGL OpenAL [20:04:10] [Thread-6/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org) [20:04:10] [Thread-6/INFO]: OpenAL initialized. [20:04:11] [Sound Library Loader/INFO]: Sound engine started [20:04:13] [Client thread/INFO]: Created: 512x512 textures-atlas # # A fatal error has been detected by the Java Runtime Environment: # #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x27583e88, pid=4092, tid=3656 # # JRE version: Java(TM) SE Runtime Environment (8.0_25-b18) (build 1.8.0_25-b18) # Java VM: Java HotSpot(TM) Client VM (25.25-b02 mixed mode windows-x86 ) # Problematic frame: # C  [ig4dev32.dll+0x3e88] # # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows # # An error report file with more information is saved as: # C:\Users\Andrea\AppData\Roaming\.minecraft\hs_err_pid4092.log # # If you would like to submit a bug report, please visit: #   http://bugreport.sun.com/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # AL lib: (EE) alc_cleanup: 1 device not closed Java HotSpot(TM) Client VM warning: Using incremental CMS is deprecated and will likely be removed in a future release

When I try to launch Minecraft 1.7.4 or newer, the game crashes on startup, and the game output screen says this:  #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=*, pid=*, tid=* # # JRE version: Java™ SE Runtime Environment (7.0_51-b13) (build 1.7.0_51-b13) # Java VM: Java HotSpot™ Client VM (* mixed mode, sharing windows-* ) # Problematic frame: # C  [ig4dev32.dll+0x3e88] OR # C  [ig4dev64.dll+0x55ec] OR # C  [ig4icd32.dll+0x104a77] OR  # C  [ig4icd64.dll+0x84930a]   This happens with both Java 7 and 8.  What causes this error, and what can I do to fix the issue?


I've been using Ubuntu 20.04 LTS for some time now. However, I've recently noticed that there seem to never be any updates (using the software center, terminal or the updater). I wonder if I mis-clicked something or not. I have no idea why there are never any updates for security. My computer now has said for about two weeks that my computer is up to date. Thank you

Using Ubuntu, I have a habit of running: sudo apt update sudo apt upgrade   on every startup. But for a month, I guess, there have been no updates whatsoever. The message shows: All packages are up to date  Now I am starting to worry. Can there be a fault in my update manager? As far as I know, I've made no changes to the package manager settings. But no updates for almost a month seems kind of weird. Any feedback would be helpful. Thanks.


I have a file of JPEG images of our Agents that need to be reduced to 1MB so my boss can add them into his database. How can I reduce their sizes?

I have a 700Kb JPEG file (white cardboard texture) that I'm using as a background on a website.   A file this large takes too long to load for snappy page hits. I don't need the full resolution, a reduction in image quality is fine, but I do need to keep the JPEG the same size (to fill the entire screen).   What would be a good free PC or web utility that would allow me to modify a JPEG as described? I'd rather not use Photoshop or other professional software.


Let $f:\Bbb C\to \Bbb C$ by $$f(z)=\begin{cases} e^{-1/z^4}\ \text{if}\ z\neq 0\\ 0\ \text{if}\ z=0\end{cases}$$ Show $f$ is not continuous at $0$.  I tired to solve this by finding some appropriate curve so along that curve, its directional derivative is nonzero. Could you help?

The question is as follows (note that $z = x + yi$):     Does $\lim_\limits{z \to 0} e^{-1/z^4}$ exist?   I've shown that      $\lim_\limits{x \to 0} e^{-1/x^4} = 0$   is equal to      $\lim_\limits{y \to 0} e^{-1/(iy)^4} = 0$   To prove both parts, but I'm not sure this is how it is done. I've been away from class for surgery, so all I have to work off of is what I've read online and in the textbook.   The problem is, it seems that with problems such as this one:     $\lim_\limits{z \to 2} \frac{z^2 + 3}{iz} = \frac{-7i}{2}$   All you have to do is substitute in 2 directly. I can't seem to figure out how to approach these problems, so hopefully all I have explained makes sense. Thanks for any explanations!


I have problem here with a button. So I want to clone items from one list to another one. I also want to add a button when passed to the other list. The problem appears when I click the button. Nothing happens. Item does not get removed. Do you have any idea why that's happening?  jQuery:      $( function() {     $( "#sortable1").sortable({         connectWith: ".connectedSortable",         items: "li:not(.ui-state-disabled)",         remove: function(event, ui) {             ui.item.clone().append( "<button class='cancelBut'>Cancel</button>" ).appendTo('#sortable13');             $(this).sortable('cancel');         }     }).disableSelection();      $( "#sortable13").sortable({         connectWith: ".connectedSortable",         items: "li:not(.ui-state-disabled)"     }).disableSelection();         $( ".cancelBut" ).click(function() {         //$(this).parent().remove();         alert("It works");     });     });   HTML:

Items

Item 1

Drag Here

   Im new to jQuery so sorry if the answer is obvious and thanks for help :)

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.


My Issue:  GPG error: http://cdn-fastly.deb.debian.org/debian stretch-backports InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010 W: The repository 'http://http.debian.net/debian stretch-backports InRelease' is not signed.   I am at a loss here. Not sure how I managed this but for some reason my Ubuntu box is trying to use a debian source and is failing. The problem is this is not listed in /etc/apt/sources.list so I cannot remove it.  Can anyone point me in the right direction as my google searches have yielded no results?  Thank you in advance for your time.

I added some extra repositories with the Software Sources program. But when I reload the package database, I get an error like the following:     W: GPG error:  trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8BAF9A6F   I know I can fix it using apt-key in a terminal, according to the official Ubuntu documentation. But I would have liked to do it graphically. Is there a way to do this without using a terminal?


Please explain the main difference between these two sentences:  1) My brother who lives in Christchurch is an electrician. 2) My brother, who lives in Christchurch, is an electrician.  In which case does the author of the sentence have one brother, and in which there can be several?

Sogou is a Chinese search engine, which can search text, images, music and maps.  Is a comma required before "which" in the above sentence?


We know that Githyanki hatch from eggs from . Is there a specific source that says the Githzerai hatch from/lay eggs?

The chapter "Citadel of Gith Reborn" from the 2nd edition adventure book  says that Githyanki lay eggs despite being humanoid.  The 5e  doesn't say much about their methods of reproduction. Is there any 5e material that addresses this issue?


In the end of my presentation, I have a section with open questions in the form of an itemize environment. The \item-s of this environment are just too many to fit in one frame. How can I force the itemize environment to continue to the next frame, or make the frame probably two pages? What is a good solution for this problem? I can always end it and start again in next page. Is there anything more delicate? I tried \pagebreak without success.

I have a question about beamer and enumerations. Which is the best way in beamer to split a long enumeration in such a way that each main point has its own frame?  I already found  but I was wondering about the possibility for a cleaner solution. There's also , but I would like to keep control of frame breaks.


Can someone tell me how can i arrange the table on top of the page. I have used all kinds of floats [t], [th!] and others also but the table is not responding. It stays in the center of the page. my code is: \documentclass[12pt, a4paper]{report} \usepackage{float,array} \begin{document} \setlength{\headheight}{110pt} \setlength{\voffset}{5pt} \setlength{\hoffset}{10pt} \setlength{\footskip}{30pt} \begin{table}[t]     \centering     \setlength\extrarowheight{5pt}    \begin{tabular}{ |p{5cm}||p{2.2cm}|p{2cm}|p{2.2cm}|p{2cm}|  } \hline Operation parameter &Input &Set point &Initialisation data &Simulated data \\  \hline Temperature  & 353.15 & -  & 359.7  & 359  \\ Pressure &74.99      & 80    & 80    & 80 \\ Flow rate  &17.28 & - & 17.28 & -\\ Flow rate & 2.903e-46  & - &2.903e-46 &-\\ Flow rate  &0.3345 & - &0.3345 & -\\ Flow rate  &0.388e-3 &- &0.388e-3 & -\\ Number of stages (-) & 1 & 1 & 1 & 1\\ Electrical power& -  & - & 0.530 & 0.532 \\ \hline \end{tabular}     \caption{XX}     \label{tab:XXX} \end{table} \end{document}

I just got a short algorithm on my page, and it keeps getting aligned at the center of the page. But I want to have it aligned at the top, what do I have to do?


I wish to use the symbol as in the following picture, however, I can not find it. Can someone help me?

I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?


Is this true? 2 does not divide 1? Does a proof exist for this? Is it because the outcome will be a fraction and that is not allowed in discrete mathematics? I am new to this.

I am not a number theorist and I am learning about relations.  I encountered a relation that says      $a \leq b$ if $a$ divides $b$   Can someone clarify what it means to a number to divide another number?  Does it mean what I think? $a$ divides $b$ if $a | b \in \mathbb{Z}$?     So given a set $S = \{a, a^2, a^3, \ldots\}$, with relation $a | b \leftrightarrow a \leq b$, does the relation hold   going from left to right or right to left? i.e. $a|a^2, a^2|a^3, \ldots$


I cant get to use adb with my S3 in Windows 7. I am using CM 10.2, when I run adb devices nothing is shown. I also tired adb kill-server and adb start-server  I tried in Ubuntu and worked perfectly. I would use Ubuntu if I could but the windows pc is the one at the office.  What do I need to do for it to work?

I recently installed  7.1 on my  and I have some problems now to get  on my Windows 7 64-bit computer to recognize the device.  Currently, adb devices returns no entry for my phone and the  shows a device called "Galaxy S" but with a yellow exclamation mark because a driver is missing.  I've tried to install  as well as the Google USB driver for Windows Revision 4 and point the device manager at the directories with those drivers. It doesn't find anything it can use there.  Which drivers do I actually need for the phone now that it is running CyanogenMod 7.1? And where do I get those and how can I install them?


I am using my school's computers and would like to use zsh instead of bash. I'd like to make it the default shell, but I cannot run a command such as $ chsh -s $(which zsh) because I don't have admin privileges.   Is there a way I can put something in my .bashrc or something that automatically calls zsh when it opens as a workaround?   To clarify, zsh is already installed.

I saw the following snippet in this thread:   sleep 2 if (-x /usr/local/bin/bash) then   exec /bin/sh -c '. ~/.profile; exec /usr/local/bin/bash' endif   My understanding is that if you place this snippet in ~/.login it will invoke bash when you login.  I have a similar situation where I would like to use a similar snippet to invoke a  version of zsh that is different from the default one with which I log in. Part of the reason why I am going through this trouble is because I can't choose my desired version of zsh in the options allowed in chsh, and I don't have administrator privileges.  With this:   How would I change the snippet above to do this when switching between different versions of zsh?  Why are two exec commands needed in the snippet above? What do they do? Also, why does the snippet above use sh and bash (the user is supposed to login with csh)


Is it safe to use the hash of the data as the key to encrypt them?  That is, if I give one some encrypted data and tell them that the key that was used to encrypt them was the hash digest of the data before encrypting, will it be easier for them to decrypt them?  Edit as I can not reply to comments: The recipient will have the keys, that is no problem.

Recently a company called  demonstrated a product of cloud storage. they indicated that they would use "Convergent Encryption" to secure your data and de-duplicate, essentially one copy of the same file between users.  From what I can read on a  about Secure Data Duplication which makes mention of "" and assuming this is what this is referring too.  My question is, what security implications of using this technology and is it truly secure that you cannot get the key based on chunk data being used to generate different keys between users.  Reference interview on


So I have 2 processing units, one runs on Python and the other runs of C++. The first one will generate a set of data of around 3 - 5 values, either as a list of ints or a string. I want this value to be passed to C++, what is the best method? Like do I have to create a file in python then load it in C++? or there are an another way? This process would repeat every second， so I wish the transmission to be fast enough.

What would be the quickest way to construct a Python binding to a C or C++ library?  (I am using Windows if this matters.)


I've made a function that will create functions and write them to a file but the problem is they write to the file as the default repr. How can I write them to a file as a normal function?  def make_route(title):     test = 1     def welcome():         return test + 1      welcome.__name__ = title      with open('test2.py', 'a') as f:         f.write('\n%s\n' % (welcome))      return welcome   I need it to write  def welcome():     return test + 1   to the file

Suppose I have a Python function as defined below:  def foo(arg1,arg2):     #do something with args     a = arg1 + arg2     return a   I can get the name of the function using foo.func_name. How can I programmatically get its source code, as I typed above?


Does any one know how to fix this error? I have a Dell note and it is the second time this error shows up.  [   1.761113]   [drm:intel_set_pch_fifo_underrun_reportintel_set_pch_fifo_underrun_reporting   [i915]  *ERROR* uncleared pch fifo underrun on pch transcoder A /dev/sda1 contains a file system with errors, check forced.  Inodes that were part of a corrupted orphan linked list found.   /dev/sda1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.       (i.e., without -a or options)  Fsck exited with status code 4  The root filesystem on /dev/sda1 requires a manual fsck   BusyBox vc. 22.1   (Ubuntu 1:1.22.0-15ubuntu) built-in shell (ash) Enter 'help' for a list of built -in commands.   (Initramfs) help ((i wrote ))  Built-in commands: ------------------------------- . : [alias break cd chdir command continue echo eval exec exit export false getopts hash help history let local printf pwd read readonly return set shift test times trap true type ulimit umask unalias unset wait  [  [[ acpid ash awk basename blockdev cat chmod chroot chvt clear cmp cp cut deallocvt devmem df dnsdomainname du dumpkmap echo egrep env expr false fbset fdflush fgrep find fstrim grep gunzip gzip hostname hwclock ifconfing ip kill ln loadfront loadkmap ls lzop lzopcat mkdir mkfifo mknod mkswap mktemp modinfo more mount mv openvt pidof printf ps pwd readlink reset rm rmdir sed seq setkeycodes sh sleep sort stat static-sh stty switch-root sync tail tee test touch tr true tty umount uname uniq unlzop wc wget which yes zcat

I dual boot Ubuntu and Windows 7. I was browsing on FireFox in Ubuntu and all of a sudden I get some error message, so I rebooted.  Now when I try to boot into Ubuntu I get this message:  fsck from util-linux 2.26.2 /dev/sda6 contains a file system with errors, check forced. /dev/sda6: Inodes that were part of a corrupted orphan linked list found.  /dev/sda6: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.         (i.e., without -a or -p options) fsck exited with status code 4 The root filesystem on /dev/sda6 requires a manual fsck  Busybox v1.22.1 (Ubuntu 1:1.22.0-15ubuntu1) built in shell (ash) Enter 'help' for a list of built-in commands.  (initramfs) _   How can I fix this?


I am trying to keep track of my statistics inside the game Call of Duty Warzone. I want to be able to update an excel sheet with the new stats I have everyday to keep track of how well I am doing at the game. The hard part I am having is how can I make the program update the stats I have every hour. Are there any tips y'all have to help me? #imports from bs4 import BeautifulSoup import requests import time from openpyxl import Workbook  def getWins(URL):     response = requests.get(URL)     soup = BeautifulSoup(response.text,'html.parser')     elems = soup.select('div.giant:nth-child(1) > div:nth-child(1) > div:nth-child(2) > span:nth-child(2)')     return elems[0].text.strip()  def getKDRatio(URL):     response = requests.get(URL)     soup = BeautifulSoup(response.text,'html.parser')     elems = soup.select('div.giant:nth-child(3) > div:nth-child(1) > div:nth-child(1) > span:nth-child(2)')     return elems[0].text.strip()  def getDamagePerGame(URL):     response = requests.get(URL)     soup = BeautifulSoup(response.text,'html.parser')     elems = soup.select('div.giant:nth-child(4) > div:nth-child(1) > div:nth-child(1) > span:nth-child(2)')     return elems[0].text.strip()   URL = 'https://cod.tracker.gg/warzone/profile/battlenet/Anduy%2311113/overview'  for i in range(1,30): #update the excel sheet 30 times     wins = getWins(URL)     kdRatio = getKDRatio(URL)     damagePerGame = getDamagePerGame(URL)      wb = Workbook() #create the book     ws = wb.active      print('Wins: ' + wins)     print('kdRatio: ' + kdRatio)     print('damagePerGame: ' + damagePerGame)      ws['A' + str(i)] = wins #inputs a new cell for every hour     ws['B' + str(i)] = kdRatio     ws['C' + str(i)] = damagePerGame     wb.save('Cod_Tracker.xlsx')     time.sleep(3600) #update every hour

I'm looking for a library in Python which will provide at and cron like functionality.  I'd quite like have a pure Python solution, rather than relying on tools installed on the box; this way I run on machines with no cron.  For those unfamiliar with cron: you can schedule tasks based upon an expression like:    0 2 * * 7 /usr/bin/run-backup # run the backups at 0200 on Every Sunday  0 9-17/2 * * 1-5 /usr/bin/purge-temps # run the purge temps command, every 2 hours between 9am and 5pm on Mondays to Fridays.   The cron time expression syntax is less important, but I would like to have something with this sort of flexibility.   If there isn't something that does this for me out-the-box, any suggestions for the building blocks to make something like this would be gratefully received.  Edit I'm not interested in launching processes, just "jobs" also written in Python - python functions. By necessity I think this would be a different thread, but not in a different process.  To this end, I'm looking for the expressivity of the cron time expression, but in Python.   Cron has been around for years, but I'm trying to be as portable as possible. I cannot rely on its presence.


Listen, Walter, because you shot Jesse James don't make you Jesse James. — Breaking Bad   Why is it don't and not doesn't?

Which one is correct in a sentence?        He don't    He doesn't      I guess "he doesn't" should be correct because he is third person singular but I've seen some people using do with he. Which one is correct?


How is a singleton different from a class filled with only static fields?

What real (i.e. practical) difference exists between a static class and a singleton pattern?  Both can be invoked without instantiation, both provide only one "Instance" and neither of them is thread-safe. Is there any other difference?


so I'm supposed to let $A$ be a square real matrix with the property that every nonzero vector in $\mathbb{R}^n$ is an eigenvector of $A$. And I'm supposed to show that $A=\lambda I$ for a constant $\lambda$ in $\mathbb{R}$.  But I am having a lot of trouble with how to start this proof... Does it have anything to do with $Av=\lambda v$? I'm really confused. Any help would be appreciated.

Let $T: V \rightarrow V$ be a linear operator.  I need to demonstrate that if all nonzero vectors of $V$ are eigenvectors of $T$, then there is one specific $\lambda \in K$ such that $T(v) = \lambda v$, for all $v \in V$.  I understand that, if all nonzero vectors of $V$ are eigenvectors of $T$, then $T$ must be a scaling transformation. It just stretch or shrinks vectors, but doesn't change their  directions.  So, the statement says that if it happens, then, there is a single $\lambda$ such that $T(v) = \lambda v$. In other words, if there is such transformation, then it scales all vectors by the same scalar $\lambda$.  Applying the transformation to our standard basis vectors, we have: $$ T(e_1) = \lambda_1 e_1 \\ T(e_2) = \lambda_2 e_2 \\ \vdots \\ T(e_n) = \lambda_n e_n $$  I understand I need to prove that $\lambda_1 = \lambda_2 = \dots = \lambda_n$, but I can't see how!  EDIT  $$ v = c_1e_1 + c_2e_2 + \dots + c_ne_n \\ T(v) = \mu v = \lambda_1c_1e_1 + \lambda_2c_2e_2 + \dots + \lambda_nc_ne_n \\ $$  Since what's multiplying $v$ coordinates is $\lambda_i$, then all of them must be $\mu$. I'm not sure how to 'mathematize' this. Is this idea correct?  EDIT 2 Extending the left hand side of EDIT 1, we have: $$ \mu v = \lambda_1c_1e_1 + \dots + \lambda_nc_ne_n \\ \mu(c_1e_1 + \dots + c_ne_n) = \lambda_1c_1e_1 + \dots + \lambda_nc_ne_n \\ \mu c_1e_1 + \dots + \mu c_ne_n = \lambda_1c_1e_1 + \dots + \lambda_nc_ne_n \\ $$  And since $e_i$ are linearly independent, $\mu = \lambda_1 = \lambda_2 = \dots = \lambda_n$. Is this proof correct?


I just read about the AES MixColumn step, which can be calculated as: $$b(x)=c(x)a(x) \pmod{X^4 +1}$$ $a(x)$ is the column to encode and $c(x)=3x^3+x^2+x+2$ My question is: how did they calculate $c(x)$?

Section 3.4.3 "The MixColumns Step"(page 39) of , it states     The columns of the state are considered as polynomials over   $\operatorname{GF}(2^8)$ and multiplied modulo $x^4 + 1$ with a fixed polynomial $c(x)$.      The polynomial $c(x)$ is given by   $c(x) = \mathtt{03} \cdot x^3 + \mathtt{01} \cdot x^2 + \mathtt{01} \cdot x + \mathtt{02}$      Let $b(x) \equiv c(x) \cdot a(x) \pmod{x^4 + 1}$. Then         How this polynomial multiplication modulo $x^4+1$ is converted to Matrix Multiplication?


If a living creature that contains a Horcrux is killed by "normal means", i.e. not a way of destroying a Horcrux like basilisk venom, what happens to the Horcrux?  For example, what would have happened to the Horcrux in Nagini if she had been killed in a way that didn't also destroy the Horcrux?

Inspired by trying to answer . Spoilers for book 7.      We know that when Voldemort "killed" Harry Potter, this destroyed the fragment of Voldemort's soul that was connected to Harry making him the 7th Horcrux.    Would the 8th fragment of soul in him be destroyed if he had been killed by some other means (say, a stray Avada spell during the Battle of Hogwarts, or drowned under the ice trying to retrieve the Sword)?  I'm looking for canonically supported answer, not simply speculation.


I used the amsthm-package to define definitions, theorems and lemmas. Besides, I defined examples as follows:  \newtheoremstyle{examplestyle} {2pt} {2pt} {} {} {\bfseries} {:} {3pt} {} \theoremstyle{examplestyle} \newtheorem{example}{Example}[chapter]   Now I would like to make a list of examples (similar to \listoffigures). I tried to use the ntheorem-package, but that is not compatible with amsthm. Does anyone know if it is possible to create a list of examples without having to change the things I defined so far and how to do so?  Thanks!

I've created my own environment example, similar to theorem. Now I want to generate a list of examples, similar to list of tables or list of figures. How can I achieve this?


Which site would be the best site to ask database design questions? I don't mean the architecture like master-slave replication, because that would fit on Server Fault.  For example, if I were building a knowledge exchange like Stack Overflow, should I store the questions and answers in one table or should I have one question table and one answer table?

There seems to be more than a few computer science/programming Stack Exchange networks (is that the correct term?). Stack Overflow, being the first, has by far the most users, questions, and answers.  What is the reasoning for creating the others, and are there clear guidelines for which kinds of questions should be posted? I can see a large amount of potential overflow, many cases of people not getting a good answer to their question, because the person who has the answer isn't browsing that particular network at the moment.  I understand that they were probably created for organizational purposes, but wouldn't it almost make more sense to just have them as categories under Stack Overflow, keep them separated but still connected, instead of making people have to create multiple 'account's, one for each network?  I am sure there was a very good reason to break them up, but as someone that is new to SE, it can be somewhat intimidating to decide which one to post in to ensure you get a good answer. For example, if I am a computer science student, my first instinct might to be to post in the computer science network, until I see that it literally has 1% of the users as the Stack Overflow network, which still seems to be for programming/computer science related questions.  So my second instinct would then to be to post it into the Stack Overflow site on the basis that I have a significantly higher chance of my question being seen and getting a good answer. Then I notice that there is also a 'programmers' network, and I don't even begin to know where that fits in. I, and I am assuming most people, will probably just post on Stack Overflow to be safe.  My question is, other than the short little description blurb of each one, is there a clear cut set of guidelines which what each network is intended for, what kinds of questions should go to each one, and is anything being done to encourage people to post in these newer, smaller (more specialized?) networks as opposed to just posting in big daddy Stack Overflow?  Now again, this is for computer science/programming/"why isn't this code doing what I want?" related questions, I am not saying that if I had a question about Linux or WordPress or something I would have the same confusion.


Can I found a Homeomorphism between open unit disk and complex plane? I already proved "the complex plane is conformal to a simply connected region", but I don't know if this is useful. Can anyone give a hint?

Show that the function  $$\phi (z) = \frac{z}{1 - |z|} $$  defines a homeomorphism between the unit disc $D_{1}(0)$ and $\mathbb{C}$.  Now this is obviously bijective, as   $$ \phi^{-1} (z) = \frac{z}{1 + |z|}$$   gives an inverse function, as  $$ \phi^{-1} \circ \phi (z) = \frac{\frac{z}{1 - |z|}}{1 + \left| \frac{z}{1 - |z|}\right|} = \frac{z}{1 - |z| + |z|} = z$$  Noting that $| \ 1 - |z| \ | = 1 - |z|$ as $|z| < 1 $ always.   Similarly, we have $$ \phi \circ \phi^{-1} = \frac{\frac{z}{1 + |z|}}{1 - \left| \frac{z}{1 + |z|} \right|} = \frac{z}{1 + |z| - |z|} = z$$ Noting that $| \ 1 + |z| \ | = 1 + |z|$ as $1 + |z| > 0$ always.   I am assuming continuity follows from the fact that both $\phi$ and $\phi^{-1}$ are compositions of continuous functions? Furthermore, how do I know that the range of the first is all of the complex plane, and the range of the second is just the unit disc? That is,  $$ \phi (D_{1}(0)) = \mathbb{C} \quad \text{and} \quad \phi^{-1}(\mathbb{C}) = D_{1}(0)$$


I want to create in-app-purchasing duo to control times of using my app with SharedPreferences.  I have  3 activities:   FirstActivity - shows just at the first time MainActivity   MyketActivity-- include SharedPreferences and in-app-purchasing code   FirstActivity shows just at the first time of app running and myket.getLogginTime(1) (loggin_time_SharePrefrence saves 1 time).  next time, app runs from MainActivity and myket.getLogginTime(1) (loggin_time_SharePrefrence saves 2 time).  finally the TIME checks with checkLogginTime.  but as I run my app,it crashed in FirstActivity and showed me:  java.lang.NullPointerException: Attempt to invoke virtual method 'void getLogginTime(int)' on a null object reference                   at myketActivity.java    in FirstActivity.java:    public class FirstActivity extends Activity {          public MyketActivity myketActivity = new MyketActivity(); ...      myketActivity.getLogginTime(1); // this is the first time }   in MyketActivity.class:  public class MyketActivity extends Activity { public static SharedPreferences loggin_time_SharePrefrence; public static SharedPreferences.Editor editor_logginTimer; private int times_of_getting_premium = 2; public static final int loggin_time=0; public BackDialog purchaseDialog;   @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.myket);      //in app purchasing     loggin_time_SharePrefrence = getSharedPreferences("times", Context.MODE_PRIVATE);     editor_logginTimer = loggin_time_SharePrefrence.edit();        //loggin_time=loggin_time_SharePrefrence.getInt("times",loggin_time); ...        }//on create public void getLogginTime (int i){     editor_logginTimer.putInt("times",i).commit(); }  public int checkLogginTime(){    int t= loggin_time_SharePrefrence.getInt("times",loggin_time);     return t; }   How can I solve it? Thanks!

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?


Ignoring the moons gravity, if an object sitting still (relative to the Earth, i.e. not in orbit) was dropped from the moon. How long would it take to hit the Earth?

Suppose an object of mass $m$ starts at rest at a radial distance $ r_0$ from a perfectly spherical mass $M$ (where $m << M$), $r_0 > R =$ radius of $M$.    Can we analytically determine when $m$ will hit the surface of the $M$?  In other words, can we analytically solve this initial value problem:  $$ \frac{d^2r}{dt^2} ~=~ - \frac{GM}{r^2} ,$$ $$ \dot{r}(0) ~=~ 0 ,$$ $$ r(0) ~=~ r_0? $$


Given $A \in \mathbb{R^q}$ and  $B \in \mathbb{R^p}$ two closed sets, then $A \times B$ is a closed set in $\mathbb{R^m} = \mathbb{R^q} \times \mathbb{R^p}$  How do I prove the previous result by using sequences?

If $A$ is closed in $X$ and $B$ is closed in $Y$,   does it follow that $A \times B$ is closed in $X \times Y$ ?


if we have something like this:  var foo=$('.foo'); var boo=$('.boo'); var koo=$('.koo');   Then is there any possibility to put foo,boo and koo in one JQuery object with $ function ?  I Tried these:  $(foo,koo,boo).removeClass('someClass'); // nothing happened $([foo,koo,boo]).removeClass('someClass'); // nothing happened   But nothing happend.  PS. I know I can use direct selector with $('.foo,.boo,.koo') but this is not what I'm looking for

How do you combine two jQuery search results? eg:  var $allFoos = $('.foo'),     $allBars = $('.bar')     $allFoosAndBars = $allFoos + $allBars;   Obviously, I just made up that last line, but I hope it makes it sorta clear what I mean. To be clear, the example is greatly simplified, and it could be any arbitrary sets i'm talking about, so $('.foo, .bar') is not what I'm after.


How would Captain America know anything about any incidents by Bucky when operating as Winter Soldier?  At the end of Captain America: Civil War, after seeing the video of the Winter Soldier killing Howard Stark, Tony confronts Captain and he seems to act like he knew and didn’t want to tell Tony for obvious reasons.   Is there any canon from the comics regarding this? Seems odd that they couldn’t have had a short flashback scene of Cap interacting with Bucky and finding out these things.

In the climax of Captain America: Civil War (2016), Zemo showed Iron Man how his parents really died, and that the Winter Soldier was responsible.  Afterwards, Iron Man asked Captain America whether he knew about it. Captain America admitted that, while he didn't know that Bucky (the Winter Soldier) was responsible, he did know that Howard and Maria's deaths weren't accidental.  But how? How did Captain America know the truth behind Iron Man's parents' death? How did he know that it was not an accident, but murder? This incident happened on 16 December 1991, and Captain America was buried in ice at that time. Did anyone tell him after he awoke? Am I missing something here?


Essentially, I want to know how to run 2 (or more) find commands in one - an "or" search rather than an "and":  find . -name "*.pem" find . -name "*.crt"

How is it possible to use the GNU find command to match several file types at a time (one search command)?  The man page says:  -type c     File is of type c:     b      block (buffered) special     c      character (unbuffered) special     d      directory     p      named pipe (FIFO)     f      regular file     l      symbolic link; this is never true if the -L option or the -follow            option  is in  effect,  unless  the  symbolic link is broken.  If            you want to search for symbolic links when -L is in effect, use            -xtype.     s      socket     D      door (Solaris)   and I want to search for files (f) and symbolic links (l) and pipe it to another process. How can I search for both at the same time?  I have tried  find -type fl | … find -type f -type l | … find -xtype f -type l | …   I know a workaround would be to use a subshell  (find -type f; find -type l) | …   but I just want to know if it is possible.


I am trying to understand how to test for the goodness of fit in GLM regression. I am using an example from the book Davison and Hinkley (1997). In R, they fit the following model:  data(cane) # this dataset is available by default cane.glm <- glm(y ~ block+var,family=binomial,data=cane) summary(cane.glm)   Then they write that "for an adequate fit, the deviance would roughly be distributed according to a $\chi^2_{132}$ (where $132$ is the residual degrees of freedom of the regression); in fact, it is 1142.8; This indicates overdispersion relative to the model." They, however, miss to provide more details on how to proceed.  I think I need to compute the deviance deviance(cane.glm) and use pachisq function to test whether the observed value is far away from the theoretical distribution. I don't understand, however, the exact testing procedure. Any example in R would be much appreciated.  In addition,  suggest that this type of "goodness of fit" test "does not actually work very well." Why not? What else should I use?

I was reading . They are performing a logistic regression (with R). At some point they calculate the probability of getting a residual deviance higher than the one they got on a $\chi^2$ distribution with degrees of freedom equal to the degrees of freedom of the model. Copying-pasting from their website...   > glm( cbind(using,notUsing) ~ age + hiEduc + noMore, family=binomial)  Call:  glm(formula = cbind(using, notUsing) ~ age + hiEduc + noMore,            family = binomial)   Coefficients: (Intercept)     age25-29     age30-39     age40-49       hiEduc       noMore       -1.9662       0.3894       0.9086       1.1892       0.3250       0.8330    Degrees of Freedom: 15 Total (i.e. Null);  10 Residual Null Deviance:      165.8  Residual Deviance: 29.92        AIC: 113.4        The residual deviance of 29.92 on 10 d.f. is highly significant:  > 1-pchisq(29.92,10) [1] 0.0008828339       so we need a better model     Why does it make sense to compute 1-pchisq(29.92,10) and why does a low probability indicate that something is going wrong with their model?


Can someone clarify this piece of gibberish:  lvrename [-A|--autobackup {y|n}] [-d|--debug]  [-h|--help] [-t|--test] [-v|--verbose] [--version] [-f|--force] [--noude vsync] {OldLogicalVolume{Name|Path} NewLogicalVolume{Name|Path} | Vol umeGroupName OldLogicalVolumeName NewLogicalVolumeName}   I've formatted it exactly as I see it in my terminal.  How do you go from the command spec above to  lvrename /dev/vg2/lv2 /dev/vg2/lvm02

I am trying to use the tcpdump command in a project and I have some difficulties understanding the help page.  SYNOPSIS    tcpdump [ -AbdDefhgHIJKlLnNoOpPqRStuUvxX ] [ -B buffer_size ] [ -c    count ]            [ -C file_size ] [ -G rotate_seconds ] [ -F file ]            [ -i interface ] [ -j tstamp_type ] [ -k (metadata_arg) ]            [ -m module ] [ -M secret ]            [ -r file ] [ -s snaplen ] [ -T type ] [ -w file ]            [ -W filecount ]            [ -E spi@ipaddr algo:secret,...  ]            [ -y datalinktype ] [ -z postrotate-command ] [ -Z user ]            [ -Q packet-metadata-filter ]            [ expression ]   First, what is this "[ -AbdDefhgHIJKlLnNoOpPqRStuUvxX ]" at the top ? What is the meaning of that ? I also see a lot of people on the internet doing crazy things with this command, for example tcpdmp -nnvvXSs 1514 ... what is that -nnvvXSs, and how can we know this can be used ?  I see codes examples that according to me does not correspond to the man page, I just don't get how to read, how to understand this help file.  Anybody tell me how to read this and understand it ?


I want to place the n from the \sqrt[n]{\rho} command in a more visible position and make it bigger too.    MWE:  \sqrt[n]{\rho}

When I take the pth root, the bottom of the p comes very close to the \sqrt symbol.  In the New Century Schoolbook font (which I am using), the p actually intersects the \sqrt symbol, which looks even more terrible.  Is there a clean way to fix this?  \documentclass{article} \usepackage{fouriernc} % use the New Century Schoolbook font \begin{document} When I write $a^{(1/p)}$ as $\sqrt[p]{a}$, the bottom of the $p$ touches the top of the root symbol, which looks ugly. Even when the root symbol is larger, such as with $\sqrt[p]{\frac{1}{n}}$, it still looks bad (since the tail of the p almost hits that line). \end{document}


Disclaimer: I searched and I found a lot of questions about the character limit, but none include the comprehensive feature request I make here, so I kindly request to consider this post not a duplicate.    As we all know, there is a 6 character limit imposed on edits. This has been questioned before, for instance:          Yes, often there is more that can be fixed, but as these questions and others show, that is not always the case. People complain about perfectly good edits, that would enhance the value of the Stack, being rejected.  So what can be done about this constraint?

Now, it is easy to workaround this: add 10 characters, plus your one-character change, then remove these 10 characters in the next edit for the same post.  But this can hardly be what the designers intended. Instead, my suggestion is to change it to something like on Wikipedia, where you can mark an edit as "minor". Something like this:     Edits must be at least 6 characters, or select the checkbox "Minor, spelling or punctuational correction."   Edits like that will, of course, not count toward the edit-limit (before it becomes Community Wiki).  The suggestion often seen on Meta Stack Overflow is "just edit more in that post". But sometimes the post is just right, and there aren't any other spelling mistakes to correct. Why force a user to change more than necessary, or use an ugly hack?


I am not sure about the adding of the preposition in the following case:      "I want to tell my friend that I appreciate her."      "I want to tell TO my friend that I apreciate her."   Which one is correct?

I really get confused when to use say and when to use tell. Which is appropriate in the following:   What did he tell? / What did he say? What are you saying? / What are you telling?


I started annotating a pdf on a windows machine but then I wanted to make some changes on my Linux machine later. I have the native Linux acroread 9 installed which can do comments but there's a 50% chance a given document is locked or in some way broken and in File->Properties->Security, Commenting: Not Allowed (for that matter this might happen with the latest versions too, not sure). I also run into huge performance issues when viewing comments (extreme, and I mean extreme, lag on a decent PC).  So I thought I'd try a newer version of Adobe reader under wine. This did not work out at all (as of July 2014) with the installer failing to create any files or crashing at launch when copying from a windows install.  How can I reliably add/edit annotations to PDFs on linux, yet allow all those non-techie people who use the windows and Adobe reader to see and interact with them?

Currently I need to highlight certain sections in PDFs, or add annotations (comments/notes). These modifications would need to be saved.   What tools are out there to do this on Ubuntu?


How to prove Gauss’s Multiplication Formula?  $$\Gamma(nz)=(2\pi)^{(1-n)/2}n^{nz-(1/2)}\prod_{k=0}^{n-1}\Gamma\left(z+\frac{k}{n}\right)$$  ()  Any help like an answer or link would be appreciated. Thanks for all help.

He says:     Prove the formula of Gauss:   $$ (2\pi)^\frac{n-1}{2} \Gamma(z) = n^{z - \frac{1}{2}}\Gamma(z/n)\Gamma(\frac{z+1}{n})\cdots\Gamma(\frac{z+n-1}{n}) $$   This is an exercise out of Ahlfors.  By taking the logarithmic derivative, it's easy to show the left & right hand sides are the the same up to a multiplicative constant.  After that I'm lost. It's easy using another identity when $n$ is even to use induction. But when $n$ is odd I am lost.  It's obvious when $n$ is a power of 2.


I have the following code which minus 0.1 from 0.5 for 5 times, but the result isn't exact 0.0.  I understand why there is an error, and I'm finding a way to deal with it.  The only way I came up with is to check if abs(num - 0.0) < 0.01, but the 0.01 value may not be suitable in all situations (too big or too small).  Is there a more elegant way to deal with it?  #include <stdio.h>  int main() {     double num = 0.5;      for (int i = 0; i < 5; i++) {         num -= 0.1;     }      printf("num=%lf %d", num, num == 0); }

What would be the most efficient way to compare two double or two float values?  Simply doing this is not correct:  bool CompareDoubles1 (double A, double B) {    return A == B; }   But something like:  bool CompareDoubles2 (double A, double B)  {    diff = A - B;    return (diff < EPSILON) && (-diff < EPSILON); }   Seems to waste processing.  Does anyone know a smarter float comparer?


I cannot start Ubuntu 13.10 on my laptop! I burned 2 cds and made a bootable pendrive but when i reboot my pc it start Windows 7, but when i try to boot Ubuntu 13.04 it starts normally.  Sorry for the grammar errors, i'm not a native speaker.  Edit: I'm using the 64bit version

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?


I have read that accelerating or oscillating electron emits photons. But why and how does it so? And why only photons? There are other bosons like gluons, W and Z bosons, so why does electron emit only photons? And what is the mechanism ?

How the electro-magnetic waves are produced by the accelerating charged particle? Graphical explanations are most welcomed. Is the explanation given by the below mentioned article correct regarding the movement of electromagnetic waves?


Hi guys im trying to get back to coding after a long break and im running into some problems. Im building a program which has a library of user uploaded books(not really uploading anything) and im running into an   Exception in thread "main" java.lang.NullPointerException     at Library.beans.User.uploadBook(User.java:107)     at Library.LibraryApplication.main(LibraryApplication.java:22)   when im trying to add a new book via a user.Im using spring btw.  coding snippets  User bean @Entity @Table(name = "Users") public class User {     @Id     @GeneratedValue(strategy = GenerationType.IDENTITY)     private int id;     @Column(nullable = false, unique = true)     private String email;     @Column(nullable = false)     private String password;     @Column(nullable = false, unique = true)     private String userName; //  ** Books added to a user private library **     @ManyToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL)     private List<Book> userLibrary; //  ** Books uploaded by user **     @OneToMany(cascade = CascadeType.ALL)     private List<Book> userBooks;      public User(String email, String password, String name) {         super();         this.email = email;         this.password = password;         this.userName = name;     } public void uploadBook(Book book) {         this.userBooks.add(book);     }   Book bean  @Entity @Table(name = "Books") public class Book {     @Id     @GeneratedValue(strategy = GenerationType.IDENTITY)     private int id;     @Column(nullable = false)     private String name;     @Column(nullable = false)     private String synopsis;     @Column     private String image;     @Column     private double rating;     @Column     private GenreType genre;     @ManyToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL)     private User author;     @OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL)     private List<Review> reviews;   The code in main which causes the exception  User user = new User("admin", "admin", "user1");  user.uploadBook(new Book("book1", "a", "b", GenreType.Action));   Extra notes If i creat a book outside a user by (book new book) and add an author to the ctr it works one way,the book will state its author is the "user" i inputed on creation but the same "user" wont have it listed under his uploaded books list. what am i missing here?

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?


Why do we say "rise in demand" instead of "rise in the demand"? Is this logic also applicable for phrases such as "increase in adoption" and "increase in demand"? Please assist. Are these idioms??

In the following, should there be a "the" in front of "standard of living"?     Assess the extent to which the improvement of standard of living in Japan is dependent on the openness of the economy.


What should I do if I see that a user has posted the exact same problem multiple times? Neither of the questions have answers, so I can't flag the latter one as a duplicate of the first one. Is it okay if I flag it for moderator attention?

I got  question in review. First sentence is:     I know there is a  question, but no answers.   And indeed the two questions are virtually identical. I started to flag as duplicate - but the original question had no answer at the time, so it wouldn't be correct and apparently . (I didn't go so far as to try to submit the flag).  What is the proper action here? How do we want such a question to be handled? Should both (or more) questions stay open indefinitely until either is answered and somebody gets the good idea to do the duplicate linking?   As the new question is essentially a bump to the front page (perhaps with re-tagging), especially in the case where the OP knows that a previous question exist, perhaps something should be done to enable bumping re-emphasizing without writing the new question.  As I wrote this,  actually got an answer. So the old one should now be closed as a duplicate of the new - but my question remains for the case where all known/found duplicate questions have no answer?  Ironically, just before asking this, the "Questions that may already have your answer" gave me ... (Although the suggestion has no answer). So it has been asked before - the comment there even suggest the ability to re-emphasize.


I have multiple entry schengen visa from French Embassy in Nigeria. I am presently in Spain; I came into Spain from France. Can I return to Nigeria (country of origin) from any schengen country, specifically from The Netherlands?

I live in London and  am planning to visit France and Brussels. I'm applying in French embassy, showing hotel booking in France and I will stay there three nights and 4th day morning I will travel to Brussels and will leave Brussels around evening.   Do I need to go back to Paris for coming back to London or can I directly a take train from Brussels to London?  Also do I need to show (to the embassy) a ticket for traveling to Brussels from Paris?


I'm new to Ubuntu 20.04 and trying to install few software through Ubuntu software. But it stuck in this screen and don't know how to pass this. Any help will be really appreciated

I updated Ubuntu last night (sudo apt get update && sudo apt get upgrade) and to  my surprise this morning I didn't find the 'Ubuntu Software' app and there's a new entry called 'Snap Store' which when opened looks just like the old 'Ubuntu Software' app. So has 'Ubunu Software' been renamed to 'Snap Store'? And if yes, why?


So I was digging through some code and I saw something along these lines.  Func<T> @delegate = ...   My question is what is the @ operator used for in this case?  I've seen it used when creating string literals but never when referencing something other than a string.

I discovered that you can start your variable name with a '@' character in C#.  In my C# project I was using a web service (I added a web reference to my project) that was written in Java. One of the interface objects defined in the WSDL had a member variable with the name "params". Obviously this is a reserved word in C# so you can't have a class with a member variable with the name "params". The proxy object that was generated contained a property that looked like this:  public ArrayList @params {     get { return this.paramsField; }     set { this.paramsField = value; } }   I searched through the VS 2008 c# documentation but couldn't find anything about it. Also searching Google didn't give me any useful answers. So what is the exact meaning or use of the '@' character in a variable/property name?


In windows disk mgr I can see this. I have no option to shrink/expand any of the partitions.   Tried to delelete everything by DISKPART, but that's also not working:  DISKPART> list disk    Disk ###  Status         Size     Free     Dyn  Gpt   --------  -------------  -------  -------  ---  ---   Disk 0    Online          111 GB  1024 KB   Disk 1    Online         7535 MB      0 B  DISKPART> SELECT DISK 1  The disk you specified is not valid.  There is no disk selected.  DISKPART>   How can I recover my sd card?


An audio port on a MBP is a combination output. If you plug in 4-conductor 3.5mm connector (TRRS) like the one on Apple earbud with microphone, it appears that that port can be use as an input.  I just bought a bare male TRRS audio jack. (without cable, it is for soldering your own) When I plug just that into the MBP, the MBP did not change the output to "External Microphone" as when I plugged an earbud with microphone to it. So I am wondering how did the hardware detects the mic? Does it communicate with the other end by some means?

I have a circuit and I am trying to integrate it with an iPhone via a TRRS headphone jack's microphone input. I have a generic TRRS cord and am trying to send a signal through it. However, the iPhone does not detect that a mic is even plugged in. However, if I plug it into my Mac via line-in and record, I can record the signal I am sending perfectly.   I have read online that it needs to detect resistance between the ground and mic, which I have. Are there any other things I need to do? It seems like this is an issue that stems from Apple's proprietary technology, as the earbuds are from a Windows Phone before they were spliced.    Thanks so much!


In my professor's notes there's the following example:  $$21x \equiv 15 \pmod{39} \Leftrightarrow 21x - 39y = 15$$  It reads:      Because $\gcd(21,-39) = 3$ and $3\mid15$, this equation has a solution.   This confuses me because just earlier, and on articles I've read on the internet what it always says is that these equations are only possible if gcd(21,39) (in this case) equals 1, or that they are relatively prime. Now I am just confused. Which one is it?

Isn't finding the inverse of $a$, that is, $a'$ in $aa'\equiv1\pmod{m}$ equivalent to solving the diophantine equation $aa'-mb=1$, where the unknowns are $a'$ and $b$? I have seem some answers on this site (where the extended Euclidean Algorithm is mentioned mainly) as well as looked up some books but there is no mention of this. Am I going wrong somewhere or is this a correct method of finding modular inverses? Also can't we find the Bézout's coefficients by solving the corresponding diophantine equation instead of using the extended Euclidean Algorithm?


I am writing a comparison function to check if two objects are identical, including nested arrays.  Note: There is another similar question using angular.equals() but there is no equivalent in Angular 2+. I am using Angular 8.  The purpose is to check if a value has been changed in a form in Angular 8 reactive forms. The  provides an answer on how to compare two objects, however the check function is single-level only. I need to be able to check if two arrays of objects are the same (order does not matter).  Here is a JS Fiddle:   // Check if two objects are the same // TODO: Update to iterate over nested arrays, order of array elements should not matter function checkSame(a, b) {    let isSame = true;    for (let prop in a) {     if (a[prop] !== b[prop]) {       // ISSUE: Returning not the same if value is an array       console.log(`${prop} not the same! ${JSON.stringify(prop)}`);       isSame = false;     }   }    return isSame; }  let a = {   'Title': 'Example title',   'Description': 'Example description',   'Items': [{     'NestedObject1': true   }, {     'NestedObject2': true   }, {     'NestedObject3': true   }] };  let b = {   'Title': 'Example title',   'Description': 'Example description',   'Items': [{     'NestedObject1': true   }, {     'NestedObject2': true   }, {     'NestedObject3': true   }] };  let c = {   'Title': 'Example title',   'Description': 'Example description',   'Items': [{     'NestedObject1': true   }, {     'NestedObject2': false   }, {     'NestedObject3': true   }] };  console.log(checkSame(a, b)); // returns false but should return true, 'Items' array of objects is not the same but it should be the same console.log(checkSame(a, c)); // returns false but should return true

A strict equality operator will tell you if two object types are equal. However, is there a way to tell if two objects are equal, much like the hash code value in Java?  Stack Overflow question  is similar to this question, but requires a more academic answer. The scenario above demonstrates why it would be necessary to have one, and I'm wondering if there is any equivalent solution.


Certain types of preposition-stranding are considered by some linguists to be "ungrammatical" in English, even though they do not seem remotely strange to me (an English speaker). I'm not talking about prescriptive prohibitions on all preposition stranding, but about allegedly ungrammatical subtypes of stranding.  For example, I recall hearing that the following kind of sentence with "of" is seen as ungrammatical:  He knows what country Brazzaville is the capital of.  I have also seen it claimed that you cannot strand prepositions after an indirect object:  What did you talk to John about?  Am I right that many linguists see these types of constructions as questionable? If so, why are they seen as such, when they seem so completely unexceptional to me and (I would venture to say) a great many of my English-speaking peers?  Thanks for any help

Like many others, I commonly find myself ending a sentence with a preposition.  Yes, it makes me cringe.  I usually rewrite the sentence, but sometimes (in emails) I just live with it.  To, with... you know who you are.  Should I keep fighting myself on this one, or is it okay in some circumstances?


After installation of Ubuntu alongside Windows 7 boot menu is showing Ubuntu,memory tester,windows 7 how can i edit it? I would like to see while rebooting the screen menu that would show windows 7 or Ubuntu to boot and I need to know how can I increase the font of boot menu?

I have a dual boot on my computer of Windows 7 and Xubuntu 12.10. The Linux boot is 1st and the Windows 2nd. I would like to reverse the boot order in the GRUB menu. I need to know the steps to go about editing GRUB. I do most of my work on Windows and need it to be 1st so I can boot up and not watch it.


I want to install Ubuntu 14.04 on my laptop and it has amd e2 vision  processor  I don't know know if my machine is 64-bit or 32-bit so I am having confusion downloading the UBUNTU version (64 or 32 bit)  Can anybody help??

I am using Windows as of now and want to install Ubuntu. I want to find out if my system is i386 or x86_64? How do I do that?


Today I created  and I was surprised that NO confirmation was required.  I found  suggesting a confirmation on new tag creation, but it dates from 2 years ago and it is in status-planned.  This confirmation is very important to avoid mistyped tags, which may become a bigger issue in the future...

I have been cleaning up tags on SU today and accidentally created a new tag by hitting return when the tag suggestion drop-down highlighted the tag I wanted. I probably should have pressed tab instead....  Anyway, I would like a confirmation when a new tag is created, both as a way to avoid stupid mistakes and as a place to add a few pointers on tag creation.  For example:     Tag FOO does not exist, are you sure you want to create it.      Please make sure that         there isn't an existing tag or sets of tags that can be used instead.   there isn't an alternative spelling already in use   it's not a meta-tag   isn't comprised of numbers only   it's spelled correctly         before you proceed


I would like to know what are the commands line used to unzip and unrar a file from terminal.

How do I install 7zip through Terminal to extract rar files?


I keep my phone on for hours, even though there are Pokemon nearby they never come over my house so I can never catch them.

I see pictures online of everyone having all these Pokémon to catch being everywhere around them, but it seems like I can only ever see one or two. I live in a rural area, but even walking miles through the farmland, it's rare to find any Pokémon.  Why is this? How can I find more Pokémon?


I am trying to open up firefox in my Red Hat machine. I am doing,  export DISPLAY=:0.0   and typing,  firefox   I am getting  Error: cannot open display: :0.0   Is there any way to know what packages are missing or needs to be installed or any log files I can refer to, to be able to load firefox from terminal.

Following are other questions which I think I need to know:   From a non X Session? (meaning root isn't logged into X) If multiple people were logged in on X, could I auto-detect who was on which screen, and thus programmatically detect which screen I need to launch the app on? Can I launch the app as the user? ( ok I'm 99.999% sure this is a yes ) Can I detect if users of group X are logged in to X?


From a simple table with three rows (id, status, value), I would like to retrieve the id and the value from the row with the maximum value, for each status group.  The simple query I tried is:  SELECT t1.status, t1.id, MAX(t1.value) FROM t1 GROUP BY t1.status;   The problem is that I do get maximum value for each group, but not the correct id. I get the the id of the first row from each status group... Is there a simple way to get the proper id?  There are many questions about getting the maximum value, but aren't many about the id. Couldn't find an answer for that one..

Table:   UserId, Value, Date.   I want to get the UserId, Value for the max(Date) for each UserId. That is, the Value for each UserId that has the latest date. Is there a way to do this simply in SQL? (Preferably Oracle)  Update: Apologies for any ambiguity: I need to get ALL the UserIds. But for each UserId, only that row where that user has the latest date.


First Ubuntu Software app renamed as only "Software" (and also orange logo has gone) and then when I search in all apps list in Ubuntu, I can't find apps that I installed from Ubuntu Software.  I can only find them if I search on Software app, they are installed, and I can only launch from there by clicking launch button.

In Ubuntu 17.10 I installed applications from the software center. At first everything worked fine, but after a few days they kind of disappeared. They are neither found when searching in the dash, nor when the executable name directly in the terminal. However, the software center shows them still as installed and they can be launched from there. Any help to fix this strange behavior is appreciated.


In StackExchange OAuth flow the redirect_uri is not honoring it seems. When logging in (say login with google) once the authentication is successful we are not being redirected to redirect_uri even though the redirect_uri is having the same domain as the domain of the application website.

Repro:  Logout from all Stack Exchange accounts, open:    After login, I got the Stack Exchange home page instead of careers.stackoverflow.com.


From what , when adding two $x$ and $y$ measurements with uncertainties $\delta x$ and $\delta y$, the resulting uncertainty is determined by doing:  $$\delta z = \sqrt{(\delta x)^2 + (\delta y)^2}$$  I am writing a software library to handle measurements and it includes the concept of precision/uncertainty. However, I have no way of knowing the context of the measurements. Is therefor not more correct for me to "assume the worst" and do:  $$\delta z = \delta x + \delta y$$  I know, from what I read, that this overestimates the uncertainty of $z$, and that it is very unlikely for both uncertainties to be their maximum. But on the other hand, it is theoretically possible and it's not up to me to make assumptions.  At least, that's my thinking process for now, but I'm no physics expert. But I would like my software library to be as correct as possible.

I'm in doubt with one thing: let's imagine that we have $n+1$ quantities, $n$ of them being directly measured, and the other one being related to the first $n$ by a function $f : \mathbb{R}^n \to \mathbb{R}$. If the $x_i$ is one of the quantities being directly measured and if $\Delta x_i$ is it's uncertainty, then I've learned that the uncertainty of the quantity $y = f(x_1, \dots x_n)$ is given by:  $$\Delta y=\sum_{i=1}^{n}{\frac{\partial f}{\partial x_i}\Delta x_i}$$  My problem in understanding this is: well, if $f$ is such a function, it's derivative is the linear transformation $df : \mathbb{R}^n \to \mathbb{R}$ given by:  $$df=\sum_{i=1}^{n}\frac{\partial f}{\partial x_i}dx_i$$  Where $dx_i : \mathbb{R}^n \to \mathbb{R}$ is given by $dx_i(a_1 \dots a_n) = a_i$. Hence, what we are saying, is that $\Delta y = df ( \Delta x_1, \dots \Delta x_n)$, in other words, we are saying that the uncertainty of $y$ is given by a linear function of the vector of uncertainties of the quantities $x_i$. Why should that be true? I mean, what's the reasoning behind this? I really didn't get the point, my teacher just gave the equation without justifying or anything like that.  Any help and reference is appreciated.


Recently I faced with the situation that the wrong site pages (with wrong URLs, wrong content) was indexed by Google during the site developing. Should I place robots.txt with  User-agent: * Disallow: /   And delete it after the site developing was finished? Or I shouldn't bother with it at all?

I want to replace all my website files for new ones on the server and to test if they work alright but I don't want to be crawled while this is happening or if I am,  I don't want the crawler to be able to see what's in the new page.  I just want to change it for like 15min but i tested other stuff once for 5min and google for webmasters told me they had a lot of 404's during that period and I don't want that to happen again.   Besides that I don't want to have to write my whole .htaccess file. I considered redirecting all the urls to my main page and apply the changes but I think this isn't probably a good practice, any good ideas?


I have a folder and some files inside the folder. I need to zip the folder along with its content. For example: the folder name is "Help" adn it has around 20 files inside it. Now i need to make it as "Help.zip" which consist of 20 files. And need to delete the "Help" folder. Once Zipped only the zip folder should be available. Can some one help me by passing an example or a link. As i m very new to python.  Note: I have a very old version of Python. Its 2.2.1 :(

Once I have all the files I require in a particular folder, I would like my python script to zip the folder contents.   Is this possible?   And how could I go about doing it?


I've been making a game and when it came to making the code much less messy i came across a null-pointer so i gave up and held Ctrl+z (undo) for a bit until it stopped. The code was back to normal but when i ran it, it comes up with the same null-pointer to do with a class that i didn't change what so ever. The null-pointer is as follows:  Starting programm... Exception in thread "main" java.lang.NullPointerException     at java.io.Reader.<init>(Unknown Source)     at java.io.InputStreamReader.<init>(Unknown Source)     at game.shaders.ShaderProgram.loadShader(ShaderProgram.java:98)     at game.shaders.ShaderProgram.<init>(ShaderProgram.java:25)     at game.shaders.StaticShader.<init>(StaticShader.java:34)     at game.renderEngine.MasterRenderer.<init>(MasterRenderer.java:32)     at game.engineTester.MainLoop.main(MainLoop.java:57)   The ShaderProgram seems to be causing the problem at line 98 were a bufferedreader is created and defined. The ShaderProgram lines that causes the error is as follows:          try{             InputStream in = Class.class.getResourceAsStream(file);             BufferedReader reader = new BufferedReader(new InputStreamReader(in)); // line 98, has nullpointer ???             String line;             while((line = reader.readLine())!=null){                 shaderSource.append(line).append("\n");             }             reader.close();         }catch(IOException e){             e.printStackTrace();             System.exit(-1);         }   i am using lwjgl for this the source for this DOES exist even though some people are complaining that it isnt. it is within the shaders package and it is vertexShader.txt and fragmentShader.txt

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


I have a list which I am trying to call a function on each of this list's elements (which is also a list) given a certain condition is fulfilled (the element length has to be greater than 1):  videos = [self.__process_video(e) if len(e) > 1 else '' for e in videos]   However, I am getting an error  TypeError: object of type 'generator' has no len()

Is there a simple way of testing if the generator has no items, like peek, hasNext, isEmpty, something along those lines?


In addition to its typical usage, "sudden/unexpected reversal of circumstances", can it also be used to mean, more or less, "the moment when you suddenly realize that everything you know is wrong"? If not, is there a word for that? Or a better word for it than peripeteia?

When something blows your mind and changes your understanding of something that you've believed in for years, how do you express it (formally or informally)?


If I have two synchronized (at the station while waiting for me) clocks on a train, one at front and the other one at back, and I start to accelerate the train perpendicular to Earth's gravitational field then do those clocks go out-of-sync? Say, I accelerate at rate 0.1 m/s^2 till the speed equals 20 m/s and the distance between the clocks is 100 m.  Are those clocks out-of-sync when I travel comfortably after the acceleration?  Edit: Using gravitational time dilation for solving the problem sounds odd when I'm not accelerating along a gravitational field.  Edit 2: If I accelerated perpendicularly to a gravitational field I should have, according to the equivalence principle, experienced out-of-sync for my clocks. Does there exist any experimental evidence for the phenomenon? Theory isn't a proof.

The picture shows an accelerating spaceship with two clocks inside it. It is so far away from all other bodys that gravity is of no importance.   Will the bottommost clock be slower than the topmost one? Or will both clocks have the same speed?


I decided to try to connect a java client to a mysql db running on wamp. Can anybody tell me why im getting this runtime problem?  My DBConnect() class  import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement;  public class DbConnect {      private Connection conn;     private Statement statement;     private ResultSet resultset;      public DbConnect(){         try{             Class.forName("com.mysql.jdbc.Driver");             conn=DriverManager.getConnection("jdbc:mysql://xxx.xxx.xxx.xxx:3306/pk","root","");         }       catch (Exception e){             System.out.println("Error: " + e);         }     }      public String getData(){         String result ="";         try {             resultset = statement.executeQuery("select * from data_user");             while(resultset.next())             {                 result+=resultset.getString("userFirstName");             }         } catch (SQLException e) {             // TODO Auto-generated catch block             e.printStackTrace();         }            return result;       }   My main() class  public class Main {      public static void main(String[] args) {         // TODO Auto-generated method stub         DbConnect conn = new DbConnect();         System.out.println(conn.getData());     }   My error at runtime     Error: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:   Communications link failure           The last packet sent successfully to the server was 0 milliseconds     ago. The driver has not received any packets from the server.     Exception in thread "main" java.lang.NullPointerException   at     DbConnect.getData(DbConnect.java:26)    at Main.main(Main.java:8) ERROR:     JDWP Unable to get JNI 1.2 environment, jvm->GetEnv() return code = -2     JDWP exit error AGENT_ERROR_NO_JNI_ENV(183):  [util.c:840]  }       Offending line      resultset = statement.executeQuery("select * from data_user");


I have used the following command      $\displaystyle\bigoplus_{i=1}^n M_i$      to get superscript and subscript form of the lower limit and upper limit. But it  it looks like very bigger. I want to control this size of this displaystyle manually. Is there any way to do this ?

I'm very familiar with how symbols display differently in inline mode (with $ ... $) vs. how display math shows them (with \[ ... \] or $$ ... $$).  Two examples would be with limits  $\lim_{n\rightarrow \infty}f(x)$   vs.  \[ \lim_{n\rightarrow \infty}f(x) \]   and with sums  $\sum_{n=1}^{x} n^2$   vs.  \[ \sum_{n=1}^{x} n^2 \]   My Question is:     How do you display these things in inline mode (with all the nice inline formatting) as if they were in display mode ?   The inverse -- how to display things in display mode as if they were in inline mode -- is also of interest.


I have four points, one in each quadrant. How to prove whether it may be a parallelogram. What formula should I use?

Given four points $(x_1,y_1)$,$(x_2,y_2)$,$(x_3,y_3)$,$(x_4,y_4)$. How can we efficiently test them to make sure whether they are vertices of a parallelogram?  I think evaluating and comparing the distance between two points seems to be inefficient. What do you think? Do you have any better method?