I've a few servers running as ssh proxy, someone started to DDOS me, i've installed ddos deflate and apf. The traffic made by ddos downgrade from 10 MB/s to 1 MB/s but it still make my users kick from my servers. My question is: if I make a rule to monitor all my traffic and lock new connections when someone start ddos will work? I mean, lock new connections and keep the others running!

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


While practicing for the SAT and doing a practice test, I came across a question where what I believed to be a grammatical mistake in the question (it was missing a comma, I thought) caused me to eliminate that option. However, when I looked back to check my answers, the answer I though was grammatically incorrect was the correct answer. So basically my question is whether or not the option is in fact grammatically incorrect, and if so, does this mean in the future I can't rely on a perceived grammatical mistake to eliminate an option for a question like this? Here is the question (if you are unfamiliar with SAT Writing tests like this, the question is asking what the bolded text should be, from the options given):     Although researchers continue to search for the right combination   of factors that will keep fruits fresh and attractive, the   problem may be that consumers are overly concerned   with superficial qualities rather than the actual freshness   of the fruit.         The writer wants a conclusion that conveys how the   shortcomings of 1-MCP presented in the passage   affect the actions of people in the fruit industry.   Which choice best accomplishes this goal?         A) NO CHANGE      B) many of the improvements to fruit quality they   have discovered so far have required trade-offs   in other properties of the fruit.      C) for now many fruit sellers must weigh the   relative values of aroma, color, and freshness   when deciding whether to use 1-MCP.      D) it must be acknowledged that 1-MCP, despite   some inadequacies, has enabled the fruit   industry to ship and store fruit in ways that   were impossible before.   Correct Answer: C (the one I eliminated because I thought it had a mistake)  My Answer: D  source (refer to this if more context is needed):  page 26-26, question 33

I am no native speaker and always confused about the comma in introductory phrases, in particular in prepositional phrases. Is there any hard rule when a comma must be set? If I make a google search for certain phrases, I often find both variants. Typical examples where I am not sure whether a comma must be set are:        First[ly][,] I must phone mother   In this case[,] we must...   For simple problems[,] the algorithm...   From Lemma 1.2[,] we obtain...   For a typical user[,] the algorithm...   In our theory[,] we...   A dark line on the horizon[,] the mountain range we were headed for seemed somehow not as threatening as when we had started out on the trip.   Avidly reading her novel[,] Jane did not notice that her stop was approaching.   To be sure[,] it is not easy to see a solution.   When you get to Rome[,] give me a ring.


How do I find the following:  $$(0.5)!(-0.5)!$$  Can someone help me step by step here?

My TI-83 calculator doesnt allow me to do this, but using Windows calculator, I can compute the factorial of say 5.8. What does this mean and how does it work?


I designed a link button in Illustrator, much like the ask question button here.  Since I am new to all this, I have difficulties creating just the perfect shape every time, so I want to save that button as a symbol or graphic style so that the next time I can just click on it and change the text length.  How do I save as a symbol or graphic style?

I have created multiple objects, while testing I applied a drop shadow style on one object and its looking very good. Now I want to apply the same style to all other objects (around 20). Is there any way like global color to create a style once and apply to other objects with single click automatically?  Or I have to apply that drop shadow effect on each object one by one manually?


Maybe this question has been asked, but I couldn't find it with google and stackoverflow. I have deleted all my cookies and yet after entering stackoverflow.com I'm asked to refresh the page, because I have been logged in.  How does stackoverflow.com authentication data storage works?

SO and SU just told me I've been logged in. I'm guessing because I'm already logged into my Google account... but how does SO know that?


I'm about to start running a homebrew seafaring campaign in which my PC's will spend the vast majority of the narrative travelling on a boat, far from the mainland, on a diplomatic mission to explore a newly discovered archipelago.  While they are geographically distant from their homeland and their country's authorities (initial quest givers), and constantly on the move,  I would nonetheless like there to be some limited channel of communication between the ship and the mainland - basically, a way that they can send progress reports from the ship back to the government and receive fresh commands / periodic updates on what's happening at home.  The way that I've hit on doing this is through something like a , one of which is on the boat and one on the mainland (inspired by Harry Potter). Objects (in this case written documents) which are placed in one cabinet disappear from that cabinet, when it is closed and appear in the other. These cabinets would be small enough to prevent people travelling through them.  I currently plan on homebrewing this but, can such an effect, or something very similar to this, be achieved through any official spells or items?  Solutions should take into account:   The boat will be constantly moving - the mainland will not know the PC's location in advance to send things to them. There will not initially be any high level magic users on the boat - though there may be high level NPCs on the mainland. The PC's will start the game at a low level and I don't want to populate the boat with party-allied NPC's that are more capable than the PC's themselves are. Otherwise why would such an NPC stay on the boat whenever they make landfall, rather than boosting the PC's landing party? my preference would be for a system that transports actual physical objects (such as written documents), rather than provides some form of psychic connection.

In our 5e game, we stole a boat. And a horse carriage. And a lot of other stuff for moving things between cities.   Our DM meant for this to be a way to skip road encounters. We decided to fund a shipping company and hire managers (Knights retainers, etc.) to turn a profit. The DM ruled that these would cover lifestyle expenses, provide us with easy smuggling, etc.   However, we want to keep tabs on the treasure we're moving back and forth.   What can we use for communicating with our managers from anywhere in the world? What about from say, across the city?  We don't need to communicate often or for long - a single round will work. All we need is for the manager to say "we need you back"


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


I'm using the  and I'm trying to set the margins. The guidelines for writing my thesis states this about the margins:        Printed double-sided on white A4 paper within the range 70g/m2 to   100g/m2;   Margins should be set to ‘Mirrored’ The outside margin should be 4cm   (1.5”); all other margins 2cm (0.75”)      The thesis template set the margins with this code:  \setmarginsrb  { 1.5in}  % left margin                         { 0.75in}  % top margin                         { 0.75in}  % right margin                         { 0.75in}  % bottom margin                         {  20pt}  % head height                         {0.25in}  % head sep                         {   9pt}  % foot height                         { 0.3in}  % foot    I need to alter this code so it fit with what my thesis writing guidelines state. I tried the code below, but this failed:  \usepackage[left=0.75in,right=0.75in,top=0.75in,bottom=0.75in,bindingoffset=0.75in,headheight=20pt,headsep=0.25in,footheight=9pt,footsep=0.3in]{geometry}   How can I set my margins to fit with my thesis guidelines?

Quick question to anyone who has used this LaTeX template:    Any ideas on how to change the left margin to get more words onto one page?


My laptop has a Qualcomm Atheros QCA9377.  Output of lspci  03:00.0 Network controller: Qualcomm Atheros Device 0042 (rev 30)   which is not yet supported by Ubuntu (works on Windows). Bug Report   Since I have no idea when it would be patched, I tried ndiswrapper.  Installing from the Software Center, would result in  FATAL: Module ndiswrapper not found.   both via ndisgtk and sudo modprobe ndiswrapper  So I compiled from source, but sudo make gave   /home/bhav/Downloads/ndiswrapper-1.59/driver/crt.c: In function ‘_win_srand’: /home/bhav/Downloads/ndiswrapper-1.59/driver/crt.c:470:2: error: implicit declaration of function ‘net_srandom’ [-Werror=implicit-function-declaration]   net_srandom(seed);   ^ cc1: some warnings being treated as errors scripts/Makefile.build:258: recipe for target '/home/bhav/Downloads/ndiswrapper-1.59/driver/crt.o' failed make[3]: *** [/home/bhav/Downloads/ndiswrapper-1.59/driver/crt.o] Error 1 Makefile:1386: recipe for target '_module_/home/bhav/Downloads/ndiswrapper-1.59/driver' failed make[2]: *** [_module_/home/bhav/Downloads/ndiswrapper-1.59/driver] Error 2 make[2]: Leaving directory '/usr/src/linux-headers-4.2.0-040200rc8-generic' Makefile:183: recipe for target 'modules' failed make[1]: *** [modules] Error 2 make[1]: Leaving directory '/home/bhav/Downloads/ndiswrapper-1.59/driver' Makefile:23: recipe for target 'driver' failed make: *** [driver] Error 2   I tried 1.57, 1.58, 1.59. same error.  Then I found a patched version for the updated linux kernel   But I can't compile that one either  /home/bhav/Downloads/nd/driver/loader.c: In function ‘load_sys_files’: /home/bhav/Downloads/nd/driver/loader.c:157:4: error: implicit declaration of function ‘__vmalloc’ [-Werror=implicit-function-declaration]     __vmalloc(load_driver->sys_files[i].size,     ^ /home/bhav/Downloads/nd/driver/loader.c:156:19: warning: assignment makes pointer from integer without a cast    pe_image->image =                    ^ /home/bhav/Downloads/nd/driver/loader.c:207:5: error: implicit declaration of function ‘vfree’ [-Werror=implicit-function-declaration]      vfree(driver->pe_images[i].image);      ^ /home/bhav/Downloads/nd/driver/loader.c: In function ‘add_bin_file’: /home/bhav/Downloads/nd/driver/loader.c:298:2: error: implicit declaration of function ‘vmalloc’ [-Werror=implicit-function-declaration]   bin_file->data = vmalloc(driver_file->size);   ^ /home/bhav/Downloads/nd/driver/loader.c:298:17: warning: assignment makes pointer from integer without a cast   bin_file->data = vmalloc(driver_file->size);                  ^ /home/bhav/Downloads/nd/driver/loader.c: In function ‘wrapper_ioctl’: /home/bhav/Downloads/nd/driver/loader.c:789:15: warning: assignment makes pointer from integer without a cast    load_driver = vmalloc(sizeof(*load_driver));                ^ /home/bhav/Downloads/nd/driver/loader.c: In function ‘wrapper_ioctl_compat’: /home/bhav/Downloads/nd/driver/loader.c:884:11: warning: assignment makes pointer from integer without a cast    kdriver = vmalloc(sizeof(*kdriver));            ^ cc1: some warnings being treated as errors scripts/Makefile.build:258: recipe for target '/home/bhav/Downloads/nd/driver/loader.o' failed make[3]: *** [/home/bhav/Downloads/nd/driver/loader.o] Error 1 Makefile:1386: recipe for target '_module_/home/bhav/Downloads/nd/driver' failed make[2]: *** [_module_/home/bhav/Downloads/nd/driver] Error 2 make[2]: Leaving directory '/usr/src/linux-headers-4.2.0-040200rc8-generic' Makefile:183: recipe for target 'modules' failed make[1]: *** [modules] Error 2 make[1]: Leaving directory '/home/bhav/Downloads/nd/driver' Makefile:23: recipe for target 'driver' failed make: *** [driver] Error 2   I need help.  P.S.  Recently upgraded to 15.04 from 14.04  bhav@kal-el:~/Downloads/nd$ uname -r 4.2.0-040200rc8-generic   EDIT-1:  Output oflspci -knn | grep Net -A2  03:00.0 Network controller [0280]: Qualcomm Atheros Device [168c:0042] (rev 30)     Subsystem: Foxconn International, Inc. Device [105b:e09a]

I cannot see WiFi option in my Ubuntu 15.04. What should I do? Revert asap  lspci -nnk | grep 0280 -A2 output:-  03:00.0 Network controller [0280]: Qualcomm Atheros Device [168c:0042] (rev 30) Subsystem: Foxconn International, Inc. Device [105b:e09a]   rfkill list output:-  0: hci0: Bluetooth Soft blocked: no Hard blocked: no 1: acer-wireless: Wireless LAN Soft blocked: no Hard blocked: no      dmesg | grep ath [    9.545199] ath10k_pci 0000:03:00.0: pci irq msi-x interrupts 8 irq_mode 0 reset_mode 0 [   10.029684] ath10k_pci 0000:03:00.0: Direct firmware load for ath10k/cal-pci-0000:03:00.0.bin failed with error -2 [   10.029701] ath10k_pci 0000:03:00.0: Direct firmware load for ath10k/QCA9377/hw1.0/firmware-5.bin failed with error -2 [   10.029704] ath10k_pci 0000:03:00.0: could not fetch firmware file 'ath10k/QCA9377/hw1.0/firmware-5.bin': -2 [   10.029711] ath10k_pci 0000:03:00.0: Direct firmware load for ath10k/QCA9377/hw1.0/firmware-4.bin failed with error -2 [   10.029713] ath10k_pci 0000:03:00.0: could not fetch firmware file 'ath10k/QCA9377/hw1.0/firmware-4.bin': -2 [   10.029719] ath10k_pci 0000:03:00.0: Direct firmware load for ath10k/QCA9377/hw1.0/firmware-3.bin failed with error -2 [   10.029721] ath10k_pci 0000:03:00.0: could not fetch firmware file 'ath10k/QCA9377/hw1.0/firmware-3.bin': -2 [   10.029726] ath10k_pci 0000:03:00.0: Direct firmware load for ath10k/QCA9377/hw1.0/firmware-2.bin failed with error -2 [   10.029728] ath10k_pci 0000:03:00.0: could not fetch firmware file 'ath10k/QCA9377/hw1.0/firmware-2.bin': -2 [   10.029733] ath10k_pci 0000:03:00.0: Direct firmware load for ath10k/QCA9377/hw1.0/firmware.bin failed with error -2 [   10.029735] ath10k_pci 0000:03:00.0: could not fetch firmware (-2) [   10.029737] ath10k_pci 0000:03:00.0: could not fetch firmware files (-2) [   10.029739] ath10k_pci 0000:03:00.0: could not probe fw (-2)


Split between this, when talking about hardware, do you need to reference where you got the information from? For example, "this firewall has xyz ports and is capable of IPSec", would I need to reference where I got this information from?

I am writing a scientific article. In the "materials and methods" section I must specify the hardware I used, namely an HP Pavilion dv6 Notebook PC (I also specified the details of its features).  Now my doubt:  Should I use bibliographic citations (such as when mentioning a software, book, or scientific article) when I mention the hardware?  What is standard (if any) for such cases?  Thanks in advance for any help and/or suggestion.  P.S. I use APA standards for bibliographic references, although the question is independent of that subject.


public class working {  public static String str = "123zASdcvb/;[";      public static void main(String[] args){             System.out.println("!!!"+new LetterInventory(str));     }  public static class LetterInventory {     public char[] arr;       public LetterInventory(String str){         //Strips our string  of all non alphabetic garbage          //and assigns it. This regex removes all non a-z         //without regard for case of alphabet (?!).         this.arr = str.replaceAll("[^a-z]", "").toLowerCase().toCharArray();         Arrays.sort(this.arr); //I want to have it sorted to make my life easier.          System.out.printf("Our freshly sorted LI is : %s\n",this.toString());     }       //Simple enough.     public String toString() {         return this.arr.toString();     }     } }   output:  Our freshly sorted LI is : [C@6d69c9a2 !!![C@6d69c9a2   What is going wrong here? I walked through my debugger and my array does exactly what I want, it is created, cleaned, and sorted just fine. But everytime I try to print my char[].toString() it comes out screwey. Why so?

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]


When typing out long equations, I like to split everything up into separate lines and start each one off with an equals sign. How do I hide the first equals sign while keeping the layout exactly the same? I tried wrapping it with \phantom, but that oddly decreases the horizontal offset of the first line:        Here's the source for the above picture:  \documentclass[preview]{standalone}  \usepackage{amsmath}  \begin{document}     \begin{align*}         &\phantom{=} x^2 - 1 \\         &= (x - 1) (x + 1) \\           &= 7     \end{align*} \end{document}   Moving the ampersands to the other side of the equals signs sort of works, but it makes the equals signs too close to the equations:

I want to display a set of inequalities to look like the code below    this is the lower bound ≤ this is the thing to be bounded ≤ this is the upper bound   My attempt to do this is the following:  \documentclass{article}  \usepackage{amsmath}  \begin{document} \begin{align*}   &\phantom{\leq} \text{this is the lower bound} \\   & \leq \text{this is the thing to be bounded} \\   & \leq \text{this is the upper bound} \end{align*} \end{document}   Unfortunately, in the output, the first line is not quite aligned with the second and third lines, it starts a little bit earlier than desired.    I have two questions:   Why doesn't the \phantom command do what I think it is supposed to? How do I get the desired output?


I have some layers in my project and I would like to alter their styles, since ranges of values for underlying columns have changed.  Normally it would require to enter each layer style settings separately and trigger "Remove All", and "Classify" button, however I would like to execute it from the code.   I found such method for graduated symbol:  renderer.updateClasses(layer,0,bins)   ,however I'm having trouble to find corresponding method for categorized symbol class  Is there any way to do this from pyqgis without the need to specify the layer style from the scratch (create category, label etc.) ? Some equivalent of "Classify" button from below screenshot:

I want to apply unique symbol to each feature. I have used following code for doing that from qgis.core import * from PyQt4.QtGui import * # supply path to where is your qgis installed QgsApplication.setPrefixPath("/path/to/qgis/installation", True) # load providers QgsApplication.initQgis()  # Get the active layer (must be a vector layer) layer = qgis.utils.iface.activeLayer(); iter = layer.getFeatures(); for feature in iter:     geom = feature.geometry()     print "Feature ID %d: " % feature.id()     qgis.utils.iface.mapCanvas().setSelectionColor( QColor("yellow") );     layer.setSelectedFeatures([feature.id()])     qgis.utils.iface.mapCanvas().zoomToSelected( layer )     qgis.utils.iface.mapCanvas().refresh()     selected_features = layer.selectedFeatures()     for i in selected_features:        attr =i.attributes()     chaltano= str(attr[layer.fieldNameIndex('test')])     renderer = QgsCategorizedSymbolRendererV2("test")     layer.setRendererV2(renderer)     symbol = QgsSymbolV2.defaultSymbol(layer.geometryType())     symbol.setColor(QColor("red"))     cat = QgsRendererCategoryV2(feature.id(), symbol,str(feature.id()))     renderer.addCategory(cat)  Symbol is applying to only last feature. Here, "test" is attribute.


I need to generate a list of insert statements (for postgresql) from html files, is there a library available for python to help me properly escape and quote the names/values? in PHP i use PDO to do the escaping and quoting, is there any equivalent library for python?  Edit: I need to generate a file with sql statements for execution later

For some reasons, I would like to do an explicit quoting of a string value (becoming a part of constructed SQL query) instead of waiting for implicit quotation performed by cursor.execute method on contents of its second parameter.  By "implicit quotation" I mean:  value = "Unsafe string" query = "SELECT * FROM some_table WHERE some_char_field = %s;" cursor.execute( query, (value,) ) # value will be correctly quoted   I would prefer something like that:  value = "Unsafe string" query = "SELECT * FROM some_table WHERE some_char_field = %s;" % \     READY_TO_USE_QUOTING_FUNCTION(value) cursor.execute( query ) # value will be correctly quoted, too   Is such low level READY_TO_USE_QUOTING_FUNCTION expected by Python DB API specification (I couldn't find such functionality in  document). If not, maybe Psycopg2 provides such function? If not, maybe Django provides such function? I would prefer not to write such function myself...


I voted to close a question for being a duplicate, then edited the automatic comment for clarification in case the OP does not see how it is a duplicate.  Subsequently the question was closed, hiding my comment (and explanation).   I see the point of this behavior but if this is the case what should I do if I feel further explanation is warranted? Edit the comment for it to be lost later, or make two comments in a row? The idea of intentionally double commenting makes me cringe but that doesn't mean it's unacceptable behavior.

When closing a question as duplicate the "Possible duplicate of" comment is automagically added to the question. However when adding such a comment manually: "possible duplicate of random text" that comment is also removed. To me it doesn't make sense that questions which to not point to a SO / SE question or even comments without any links in it are also removed when the question is closed as a dupe. I just found this out by close voting a question as a dupe of another question, but I also added a manual comment which linked to a user profile (because it contains lots of relevant information for OP and possible future reasons): possible duplicate of this [user](http://stackoverflow.com/users/727208/teresko?tab=answers&sort=votes)'s list.  By the looks of it the script simply checks whether the comment starts with "possible duplicate of" and if it matches it will be removed. The  team also did a quick test with a very simple example which also got thrown away: possible duplicate of testing........  I understand that this issue is minor and there might as well be a technical reason for this (i.e. not having to keep track of automatic vs manual comments), but this behavior is kinda odd to me. I can think of two solutions for this:  keep track of manually vs automagically added dupe comments (again you SO people might have a good reason to not want this). Improve the "dupe comment matcher ™" to at least check whether the comment is in the correct format for "auto dupe comments ™" with a proper link to a question page.


I have ubuntu 14.04 and i need to download adobe flash player,but when i go to the main page on the bottom right corner on top of the download button it says "Note: Your antivirus software must allow you to install software." does anyone know how i can download it?

Even though I have the latest Adobe Flash player 11.2 for Linux in Firefox -   - a particular online flash game still requests that I update to the latest flash player.  I've tried this online game on my laptop (Windows 8 with Flash Player 11.8) and it has no problems.  Is there a way to trick Ubuntu or this game into thinking Flash Player 11.8 is "installed"?


I have an issue with my code where if I press q or Q, the program doesn't terminate. The code I put for quitting is near the bottom. Could you please tell me how to fix it? Thank you  Here is my code:  import java.util.*;  public class Stuff     {         static // Hash Map Function         Map<String, String> myMap = new LinkedHashMap<String, String>();  public Stuff()     {         //Functions to split out the code.         fillMapInformation();         drawMap();     }  private void fillMapInformation()     {            // -A0 and -A1 put an indent so to not clash with the numbers indicating the rows.         // myMap is used to draw the table, not using the 2D array.                 // row , column         myMap.put("-A0", " ");         myMap.put("A0", " A");         myMap.put("B0", "B");         myMap.put("C0", "C");         myMap.put("D0", "D");         myMap.put("-A1", "1:");         myMap.put("A1", "-");         myMap.put("B1", "-");         myMap.put("C1", "-");         myMap.put("D1", "-");         myMap.put("-A2", "2:");         myMap.put("A2", "-");         myMap.put("B2", "-");         myMap.put("C2", "-");         myMap.put("D2", "-");         myMap.put("-A3", "3:");         myMap.put("A3", "-");         myMap.put("B3", "-");         myMap.put("C3", "-");         myMap.put("D3", "-");     }  private static void drawMap()     {         for (Map.Entry<String, String> entry : myMap.entrySet())              {                 String key = entry.getKey();    // Function to see what is entered into the myMap row.                 String value = entry.getValue();    // Function to see what is entered into the myMap column.                  if(key.contains("-"))                     {                         TextIO.putln(" ");                     }                 TextIO.put(value + "\t");             }     }  public static void main(String[] args)      {                Stuff stuff = new Stuff();         int userMoves = 1;         boolean quitGame = false;         boolean validMove = false;          TextIO.putln(" ");         // intstructions         TextIO.putln("nmjhju ");                      TextIO.putln(" ");         TextIO.putln("Where do you want to place your knight? ");         String Knight = TextIO.getlnString();         Knight = Knight.toUpperCase();          String KnightMoves = Integer.toString(userMoves);         myMap.put(Knight, KnightMoves);          userMoves ++;            do              {                 drawMap();                 TextIO.putln(" ");                 TextIO.putln("Where do you want to put your next move? Or press 'q' to quit.");                  Knight = TextIO.getlnString();                 Knight = Knight.toUpperCase();                  KnightMoves = Integer.toString(userMoves);                  if (myMap.get(Knight) != "-")                 {                     TextIO.putln("Invalid move!");                 }                 else                 {                     validMove = true;                 }                  if (validMove == true)                 {                     myMap.put(Knight, KnightMoves);                     userMoves ++;                        if (Knight == "Q")                     {                         quitGame = true;                     }                     validMove = false;                  }              }         // Problem, Knight is not recognising Q so it is not quitting, but userMoves != 13 is working.         while (quitGame == false && userMoves != 13);          drawMap();         TextIO.putln("Game over!");          if (userMoves == 13)         {             TextIO.putln("Congratulations you have completed the game!");         }     }   }

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


So, everything I see seems to indicate that "sales price" is the correct way to refer to the price that one pays for a house or similar type of property. However, would it not be better as "sale's price", being that the price "belongs" to the sale of the property thus making the word "sale" possessive? In the same way that you might call any details of the sale (including the price) the "sale's details"

May I ask if the following sentence is grammatical?      Our remit is to conduct research on customer's requirements.   In my understanding, as 'customer' is a countable noun, so the plural form 'customers''' should be used instead for this general reference (without specification of certain customers).   However, I know that we can say 'traveller's cheques' - e.g.,      Traveller's cheques are available at the bank.    In this sense, actually can we say 'customer's requirements' in the first case?


I am facing a small UX obstacle, that is related on how to handle address layouts for different countries. We are building basically a sign up process, that asks the user to enter their country of residence. On the next step the user then has to enter their address details.  The input fields on this page need to adjust to the standard address layout for the users country of residence.   Is there a smart way to design a uniform address layout that feels natural for users basically anywhere on earth? (Street, No., Zip Code, City)

I'm developing a website that displays information about European festivals, including their addresss. Given that different countries use different address formats, I'm wondering what is the best "one size fits all" form that I can use to capture the address data. Obviously I could use something like:  Address Line 1 _____________ Address Line 2 _____________ Address Line 3 _____________ Address Line 4 _____________  Country* <choose from drop down list>   (Fields marked with * are mandatory)  The above is not very satisfactory as it allows the user to enter the address in an almost completely unstructured way. More specifically, it will make it difficult for me to extract the town/city and post code (if applicable), which I will need to do.  I want to make the form as structured as possible, while still accommodating all possible European address formats (within reason). The best I've come up with so far is:  Address Line 1 _____________ Town/City*     _____________ Address Line 3 _____________  Post Code      _____________ Country* <choose from drop down list>   This will force the user to enter the nearest town/city and country, which should allow me to plot the location on a map. I think the concept of town/city is pretty much universal, and if the country uses post codes, I can capture that information too.  However, it seems like this problem must have been considered at least a million times before. Are there any "best practices" that I should be following?


so I just installed Ubuntu 20.04 and I have been having this big problem. The system just freezes randomly, the sound stops completely and the only way to fix it is to restart the pc, but of course it happens again. I have AMD processor and graphics card. Also I tried downloading some drivers but it doesn't seem to be the case, or I didn't do it right, which is possible because I am new to Ubuntu. Does anyone have a fix for this? Thank you.

All operating systems freeze sometimes, and Ubuntu is no exception. What should I do to regain control when...   just one program stops responding? nothing at all responds to mouse clicks or key presses? the mouse stops moving entirely? I have an    In what order should I try various solutions before deciding to pull the power plug?  What should I do when starting up Ubuntu fails?  Is there a diagnostic procedure I can follow?


I've installed Ubuntu along with Windows 8. For that, I had to convert all of my hard drives from dynamic to basic. However, I did not face any problem in installing Ubuntu and it got successfully installed. But when I opened Windows, it was not showing any of the hard-drives apart from C (in which Windows is installed). Now, Ubuntu is showing all of my hard-drives and their data but I am not able to find my data and hard-drives in Windows. What should I do ?

I have two questions on ext4:   Is there currently a way to mount an ext4 partition in Windows (XP/Vista/7) to get basic read support? If not, are there any plans to support this someday?


The following identity : $$\DeclareMathOperator{\k}{\vphantom{\sum}\vcenter{\LARGE K}} \sqrt{\frac{\pi e}{2}}=\frac{1}{1+\k_{n=1}^\infty \frac{n}{1}}+\sum_{n=0}^\infty\frac{1}{(2n+1)!!}$$ or $$\sqrt{\frac{\pi e}{2}}=\frac{1}{1+\frac{1}{1+\frac{2}{1+\frac{3}{\vdots}}}}+1+\frac{1}{1\cdot 3}+\frac{1}{1\cdot 3\cdot 5}+\cdots $$ I'm interested in the proof of this identity, but I couldn't manage to find any reference except for the linked page.

Here is a famous problem posed by Ramanujan     Show that $$\left(1 + \frac{1}{1\cdot 3} + \frac{1}{1\cdot 3\cdot 5} + \cdots\right) + \left(\cfrac{1}{1+}\cfrac{1}{1+}\cfrac{2}{1+}\cfrac{3}{1+}\cfrac{4}{1+\cdots}\right) = \sqrt{\frac{\pi e}{2}}$$   The first series seems vaguely familiar if we consider the function $$f(x) = x + \frac{x^{3}}{1\cdot 3} + \frac{x^{5}}{1\cdot 3\cdot 5} + \cdots$$ and note that $$f'(x) = 1 + xf(x)$$ so that $y = f(x)$ satisfies the differential equation $$\frac{dy}{dx} - xy = 1, y(0) = 0$$ The integrating factor here comes to be $e^{-x^{2}/2}$ so that $$ye^{-x^{2}/2} = \int_{0}^{x}e^{-t^{2}/2}\,dt$$ and hence $$f(x) = e^{x^{2}/2}\int_{0}^{x}e^{-t^{2}/2}\,dt$$ Thus the sum of the first series is $$f(1) = \sqrt{e}\int_{0}^{1}e^{-t^{2}/2}\,dt$$ But I have no idea about the continued fraction and still more I am not able to figure out how it would simplify to $\sqrt{\pi e/2}$ at the end.  Please provide any hints or suggestions.  Update: We have $$\begin{aligned}f(1) &= \sqrt{e}\int_{0}^{1}e^{-t^{2}/2}\,dt = \sqrt{e}\int_{0}^{\infty}e^{-t^{2}/2}\,dt - \sqrt{e}\int_{1}^{\infty}e^{-t^{2}/2}\,dt\\ &= \sqrt{\frac{\pi e}{2}} - \sqrt{e}\int_{1}^{\infty}e^{-t^{2}/2}\,dt\end{aligned}$$ and hence we finally need to establish $$\sqrt{e}\int_{1}^{\infty}e^{-t^{2}/2}\,dt = \cfrac{1}{1+}\cfrac{1}{1+}\cfrac{2}{1+}\cfrac{3}{1+}\cfrac{4}{1+\cdots}$$ On further searching in Ramanujan's Collected Papers I found the following formula $$\int_{0}^{a}e^{-x^{2}}\,dx = \frac{\sqrt{\pi}}{2} - \cfrac{e^{-a^{2}}}{2a+}\cfrac{1}{a+}\cfrac{2}{2a+}\cfrac{3}{a+}\cfrac{4}{2a+\cdots}$$ and it seems helpful here. But unfortunately proving this formula seems to be another big challenge for me.


So I'm trying to append list value to another one by turns. This is my code: lis1 = [1, 2, 3, 4, 5] lis2 = [6, 7, 8, 9, 10] for i, value in enumerate(lis2):   lis1.append(i) print(lis1)  My expected output is [1, 6, 2, 7, 3, 8, 4, 9, 5, 10] But what I got is [1, 2, 3, 4, 5, 0, 1, 2, 3, 4] Any help would be appreciated

What's the difference between the list methods append() and extend()?


If $x$ and $y$ are two irrational numbers and $x + y$ is a rational number, I know one of them has to be the additive inverse with/without some rational term I believe. I know it is not always the case that the sum of two irrational numbers is irrational. for example: $(\sqrt2 -1) + (-\sqrt2 +4) = 3$ But I can only seem to come up with examples that are of this nature and that seems to be the general consensus. But is there a formal definition stating it has to be of this form or is there a counterexample I am ignorantly unaware of. then if $x+y\in\mathbb{Q}$ would it be true that $x-y$ would always just produce a multiple of that irrational plus some rational implying that if $x$ and $y$ are irrational and $x+y\in\mathbb{Q}$ then $x-y\not\in\mathbb{Q}$

I am not sure how to show this. This is what I tried.   Proposition: If x is rational number and y is an irrational number then x+y is an irrational number.  Logically speaking this is  P=x is rational  Q= Y is irrational  R= x+y is irrational  $P\wedge Q \rightarrow R$  Explanation: What I did  $x=\frac{p}{q}$ P and Q integer  Y cannot be written as the a rational by definition  So therefore  $x+y=\frac{p}{q}+y$  Will not be a rational number as there cannot be a common denominator.


As the title suggests, I came up with this code and I'm not sure why it doesn't do what it's supposed to do.  double value = 0; String input;  input = scan.nextLine().toUpperCase();      if (input.substring(0, 1) == "+") {         value = value + Double.parseDouble(input.substring(1));     }   Then, I typed the input "+ 25" (without the quotation marks). Also, .toUpperCase is there for another line of code; and then, printed the values to see if I got anything wrong.  System.out.println( input.substring(0, 1)); System.out.println( Double.parseDouble(input.substring(1)) ); System.out.println( value );   first one printed +  second one printed 25.0  and value printed out 0.0  Everything seems to check, why is value still 0.0?


Basically I want to pass Type which is calculated on run time to List< T>:  Type someType = GetSomeType() List<someType> myList = new List<someType>();   Is that possible?  EDIT:  looks similar however is different since I want Generics with Type and not GenericMethod. As suggested in other comments there is GenericType however that still not answer my question fully

What's the best way to call a generic method when the type parameter isn't known at compile time, but instead is obtained dynamically at runtime?  Consider the following sample code - inside the Example() method, what's the most concise way to invoke GenericMethod<T>() using the Type stored in the myType variable?  public class Sample {     public void Example(string typeName)     {         Type myType = FindType(typeName);          // What goes here to call GenericMethod<T>()?         GenericMethod<myType>(); // This doesn't work          // What changes to call StaticMethod<T>()?         Sample.StaticMethod<myType>(); // This also doesn't work     }      public void GenericMethod<T>()     {         // ...     }      public static void StaticMethod<T>()     {         //...     } }


I usually ride roads with my 700 x 28 tire, but want to do a trail that has a multitude of surfaces.  So can I put a 700 x 35 on this bike?

We often get questions on bicycles.stackexchange about fitting wider or narrower tires to bicycles. We have a large number of these with answers suiting the specific bike or style of bicycle in question, but I have been unable to find one that provides a generic answer covering off all things that need to be considered. For most bicycles, the answer is the same regardless of the specific style and sizes of tires in question.   This is intended as a canonical question that we can point closed questions to.


I am new to LaTeX, and I am using biblatex for my project.  I have created a Reference.bib file which listed all the references regardless of whether they have been cited in the main body or not. And I want the whole references list printed by the command \printbibliography.  Nevertheless, after compiling, it only printed the reference lists which were cited earlier in the main body. I am wondering is there anyone who might give me some advice? Any help is highly appreciated.  The preamble I used in my project is as below:  \usepackage[backend=bibtex,             style=numeric,                isbn=false,                            pagetracker=true,                     maxbibnames=50,                        maxcitenames=3,                        autocite=inline,                     block=space,                            backref=true,                           backrefstyle=three+,                  date=short]{biblatex} \addbibresource{Reference.bib}

Is there any way to have BibTeX or biblatex insert a bibliography without having citations in the body of the document itself? Maybe a way to hide the in-text citations, so that BibTeX still sees them and includes them in the bibliography, but does not print them in the body?


I've been trying for a while (months) to fix my favorite sites list in the Android app. It neither matches my in browser list nor any sensible order I pick.  The usual issue is that while some sites will re-order, others appear to be stuck where the want to be. No matter what order I drag them to they revert to where they were when I close the editor and return to the app.  Today the problem has morphed to a message that simply says it cannot save my preferences. Is this a problem with the app, the backend, my account or my usage?

In the Android app, left sidebar, there is an editable list of "Your Sites". In the editing pane, the sites are re-orderable (although awkwardly), and the order one places the sites in there is preserved, even after quitting the app and returning to this pane. One expects that order to be reflected in the "Your Sites" portion of the left sidebar when the editing pane is closed, but it is not.  I'm not sure what is determining the order of the sites in the left sidebar, it doesn't seem to be by date they were "pinned" into the list one wants to show, either.


I would like to be able to create parallel lines with a defined distance, in the same way that the editor's parallel copy tool does.

I want to create offset/parallel lines for my centre lines (over 12000 polylines) in different distance for each class number(i have numbers in column) and with the same line direction as centre line.   My idea was to create mid point for each line and then move the line at the same angle but i don't know how to do it in Python.  Also i know the way creating line buffer, splitting buffer etc. but then lines are not in the same direction and ArcGIS Pro basic not support polygon to lines tools etc.   The problem is that I am using basic licence in ArcGIS Pro which not support advanced tools.   Is there any way to do it using Python script?     import arcpy  #setup inputs inFC = arcpy.GetParameterAsText(0)  outFC = arcpy.GetParameterAsText(2)   #setup output path fcPath = outFC.rpartition("\\")[0] fcName = outFC.rpartition("\\")[2]  if arcpy.Exists(outFC):     arcpy.Delete_management(outFC) arcpy.CreateFeatureclass_management(fcPath,fcName,"POLYLINE","#","DISABLED","DISABLED",inFC) arcpy.AddField_management(outFC,"inFID","LONG","#","#","#","#","NULLABLE","NON_REQUIRED","#")   def shift_features(inFC):     """     Shifts features by an x and/or y value. The shift values are in     the units of the inFC coordinate system.      Parameters:     inFC: string         An existing feature class or feature layer.  If using a         feature layer with a selection, only the selected features         will be modified.      x_shift: float         The distance the x coordinates will be shifted.      y_shift: float         The distance the y coordinates will be shifted.     """      with arcpy.da.UpdateCursor(inFC, ['SHAPE@XY', 'Shift_X_right', 'Shift_Y_right']) as cursor:         for row in cursor:             cursor.updateRow([[row[0][0] + (row[1] or 0),                                row[0][1] + (row[2] or 0)]])      return  outFC = shift_features(inFC)   I try to shift my lines using attribute stored inside my table. When i put normal x_shift value like 2 meters shift function work correctly. But when i try to call my table it creates error. I don't know if shift function support shifting by attribute table values. Can you help me?  UPDATE If that will help i got script that do the same us feature vertix to points.  # Feature Class to Points #  # Paul Smith (2012) paul@neoncs.com.au  # Imports  import arcpy import numpy  #Inputs from user parameters  InFc  = arcpy.GetParameterAsText(0)  OutFc = arcpy.GetParameterAsText(1)   # Spatial reference of input feature class  SR = arcpy.Describe(InFc).spatialReference  # Create NumPy array from input feature class  array = arcpy.da.FeatureClassToNumPyArray(InFc,["SHAPE@XY"], spatial_reference=SR, explode_to_points=True)  # Check array and Exit if no features found if array.size == 0: arcpy.AddError(InFc + " has no features.")  # Create a new points feature class else: arcpy.da.NumPyArrayToFeatureClass(array, OutFc, ['SHAPE@XY'], SR)


I found a  that I had previously edited (the user had written it both in English and Spanish and I removed the English part).  Today I found that the user added a comment with the code:     I decided to add that comment into the question itself, tapped on the edit link, and found that the text displayed in the box is not the current one, but the original text in English and Spanish:    After a quick check, it doesn’t happen on the mobile or desktop website. It seems it only affects the app. I am using an IPhone 6 with iOS 11.2.6.   I tried to replicate the issue in other questions, but I haven’t been able to do it. The issue only seems to happen on that one. I don’t remember trying to edit that question on mobile before, but maybe that could be the case (could it be caching a previous value?).

I improved (from review) a suggested edit on , and after revisiting the question realised I missed something... no problem, I'll just edit the question again right? Apparently not. This is the current state of the question (the result of my edit improvement):    However when I hit the edit button I get this:    Which is wrong. It took me a minute to figure out that it's actually giving me the body of the edit that I improved (revision 2), when it should of course be giving me the most recent revision (revision 3).     I checked a few other "improved" edits and can't reproduce this on any other post so it's not (at least not only) a result of the improved edit. So, what's going on?


I have an attribute table with three fields: Id, Name, and Id_2 and 18,701 records. I would like to populate Id_2 with consecutive integers for each unique value in the Name field. Prior to running the script, Id_2 is empty. Below is an example of what I would like the final attribute table to look like.     Below is the python script that I have developed. Note that I have built a dictionary using the Name field as the keys and the Id field as the values. I don't need to use the values, however, to accomplish this task, just the key. My code produces consecutive integers, however, the sequence doesn't reset with each unique value in the Name field. Rather, my code populates Id_2 with consecutive integers for the entire table, through record 18,701 (Not what I want!).  # import required python libraries or modules import arcpy import traceback  # settings arcpy.env.workspace = r'D:/test' arcpy.env.overwriteOutput = True  # variables fc = r'D:/test/colors.shp' fields = ['Id', 'Name', 'Id_2'] for f in fields:   print f, f in [field.name for field in arcpy.ListFields(fc)]  # build dictionary rnDict = {} cursor = arcpy.da.SearchCursor(fc, fields) try:     for row in cursor:         id = row[0]         rn = row[1]         rnDict.setdefault(rn, []).append(id)     print 'dictionary successfully built' except:     print 'An error occurred - part 2'     traceback.print_exc() del cursor  # update Id_2 field with sequential integers startNumber = 1 cursor = arcpy.da.UpdateCursor(fc, fields)  # type: object try:     for row in cursor2:         name = row[1]         if name in rnDict:             row[2] = startNumber             startNumber = startNumber + 1             cursor2.updateRow(row)     print 'completed consecutive numbering' except:     print 'An error occurred during calculating field'     traceback.print_exc() del cursor # del rnDict

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


My sister plays Minecraft: Bedrock Edition on a phone, I want to get Java edition but my sister is on Bedrock. Can we still play with each other? Or can I only play with people on Java Edition?

My kids are playing Minecraft on 2 PCs, creative mode.  They are connected by the way of one of them starts a single player game on the other one than joins that game over the LAN.  Can I, using Minecraft PE on my iPad, join their game as well?


Find $$(n,k)$$ ( n,k are positive integers ) pairs that satisfy the following equation: $$n^k-1=(n-1)!$$ I found this question in a discrete math test book in number theory section and tried solving it using Wilson's theorem: $$(p-1)!+1$$ is divisible by n if and only if p is a prime number. Using this theorem we can say that if n is a prime number then the remainder of $n^k-1$ divided by n equals the remainder of $(n-1)!$ divided by n but I don't know how to proceed from here.

Find all natural numbers $n$ and $m$ for which $$n^m=(n-1)!+1.$$  By the Wilson theorem, $n$ is prime. Obviously, $m < n$.  For example, some solutions $(n, m)$ are $(2, 1)$, $(3, 1)$ and $(5, 2)$.


I'm new to app development. I can run my application from Android Studio on a real device. I followed a tutorial. Everything ran until I wrote the code that sums both numbers and I can't seem to fix it.  Here is the error message I get along with the code in Main.   (Click image to enlarge)   I don't understand most of this, and I can't continue without running the app. I don't run it on a virtual machine because it takes forever to load.

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 understand why $1/i$ is supposed to equal $-i$: $$\frac{1}{i}=\frac{1}{\sqrt{-1}}=\frac{\sqrt{-1}}{-1}=-\sqrt{-1}=-i$$ and that $\frac{1}{i}=i$ is definitely wrong, since that would imply $i^2=1$, which is obviously false, however, I don't know what is wrong with the argument: $$\frac{1}{i}=\frac{1}{\sqrt{-1}}=\sqrt{\frac{1}{-1}}=\sqrt{-1}=i$$

I know there must be something unmathematical in the following but I don't know where it is: \begin{align} \sqrt{-1} &= i \\\\\ \frac1{\sqrt{-1}} &= \frac1i \\\\  \frac{\sqrt1}{\sqrt{-1}} &= \frac1i \\\\  \sqrt{\frac1{-1}} &= \frac1i \\\\  \sqrt{\frac{-1}1} &= \frac1i \\\\  \sqrt{-1} &= \frac1i \\\\  i &= \frac1i \\\\  i^2 &= 1 \\\\  -1 &= 1 \quad !!? \end{align}


I am travelling doha to banglore in kuwait airways, there is a short layover of 6 hours. Can I go outside of airport for sometime for my personal work? can I know what is the process?

I am traveling to India from Athens on Aegean Airlines and transiting in Kuwait for the onward flight on Kuwait Airlines. The layover is about 4.5 hours.   Do I need a transit visa? How will I collect my checked luggage from Aegean Airlines. Will the staff provide help if the baggage counter is after immigration?


Is there a way to get more characters in SSB 3DS version? Or is it when you get it, you just have those characters. I'm kind of confused, so if you'd answer this question it would be appreciated!

Here is a list of all the unlockable characters in super smash brothers for the 3DS. How do you unlock them all? Do you have to beat the game a certain number of times like the other super smash games?  Unlockable Characters:   Ness Falco Wario Lucina Dark Pit Dr. Mario R.O.B. Ganondorf Mr. Game & Watch Bowser Jr. Duck Hunt Jigglypuff


i explain better  A supernova remnant  is the structure resulting from the  explosion of a giant star . The supernova remnant is surrounded by an expanding shock wave that is formed from material ejected by the explosion and interstellar material swept  away during the process.  When this material collides with the circumstellar or interstellar gas, forms a shock wave that can heat the gas at high temperatures up to 10 million K, forming a plasma, this is true.   The first question is: exactly what is  the material ejected by the supernova?  other issue is: if we consider for a moment the idea that a "human" might be witnessing the exact moment of the explosion of a supernova, the "superhuman"  would hear the explosion? ie, does  the explosion would  produce some kind of sound?

A  is the structure resulting from the explosion of a giant star. The supernova remnant is surrounded by an expanding shock wave that is formed from material ejected by the explosion and interstellar material swept away during the process.  When this material collides with the circumstellar or interstellar gas, it forms a shock wave that can heat the gas at high temperatures up to 10 million K, forming a plasma.  The first question is: exactly what is the material ejected by the supernova?  The other issue is: if we consider for a moment the idea that a "human" might be witnessing the exact moment of the explosion of a supernova, the "superhuman" would hear the explosion? That is, does the explosion produce some kind of sound?


Is there a Stack Exchange site where I can ask which Stack Exchange site to use? It seems to be very nuanced and my questions are routinely closed.  I just asked a C# algorithm question over at Stack Overflow, but they got angry and closed it because it wasn't Stack Overflowy enough I guess.  I've used Stack Overflow for almost a decade. I have more than 3000 reputation points. But apparently I don't know how to ask questions any more.  Anyway, until I can figure out what Stack Exchange site to go to, I just don't want to ask any questions. It just wastes my time. Frankly, I shouldn't have to read a manual in order to ask a question on the internet. I just should not.

Is there a Stack Exchange site where users post their questions not to get answers or to get up voted or down voted for quality, but to decide on which site to post their questions? If not, does anybody else think that a site like this should be created? Up votes and down votes could be allotted for how obvious the correct site to post to is. For example, a question that obviously asks about why their code is broken would be sent to SO possibly with down votes. However, a question that spans both programming and academia where it is unclear which subject is dominant, could get up votes for its complexity and deserving to be asked.   Is helping to decide where questions go a function of Meta Stack Exchange or should another site be created?  Are there any negatives to creating a site like this?


According to , Gandalf and Saruman are amongst the named Maiar.  Again, a quote from Wiki:     Maiar, like Valar, do not array themselves in a fixed form, but can   freely change their form.   Sauron was also a Maia (named ), which he used his ability to reshape, and called himself Annatar, "the Lord of Gifts".  So, if Gandalf could do the same, why didn't he just transform into a flying creature and escape when he was captured by Saruman and imprisoned on the top of Orthanc?

I understand that the Istari - the only other Maiar besides the Balrog to come into close proximity to the Ring - are constrained within a mortal body and subject to its mortal weaknesses, which renders them vulnerable to the Ring's domination and corruption. However, what is to stop Gandalf from returning to his true form, picking up the Ring, and just walking all the way to Mount Doom? Sauron is too weak at the time; he would have been able to do nothing but watch helplessly and pray his mortal armies can defeat a Ring-bearing Gandalf.  Is Gandalf's decision to abide by the Valar's will to the end the only thing holding him back from this particular option? Are there enchantments in place to disable his ability to revert to Maia form, such that the option was never there to begin with? Or would he, even in Maia form and free of mortal weaknesses, still be vulnerable to domination and corruption by the Ring?  The One Ring is forged with the essence of Sauron to dominate and rule the minds of lesser beings. However, Sauron is only a Maia - albeit the highest-ranking in Morgoth's following. Fellow Maiar would be his equal (at least in rank), while the Valar are certainly superior in power to him. If an Ainu becomes a Ringbearer, will he/she eventually fall to Sauron's will too, or at least succumb to the corruption of the Ring's dark power?


Is it possible to make a partition in my laptop and run Ubuntu and Windows 8 side by side. and if it is then what should i do to make a partition in my laptop

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


I just installed lamp-server^ and wanted to try it I created a php file but I was not able to move it to /var/www because owner of that folder is root I managed it using terminal (I logged in as root). But I dont want to do it everytime. Is there any other way to do it? I dont want to use terminal every time I want to try to access that folder.

Having installed the web server is there a simple way to set a user able to use the graphic interface to copy files and directories to the local web server /var/www  I gave myself administrative privileges in Ubuntu but it still doesn't allow copies.


I don't want my prompt to grow as I change directory. It becomes pretty lengthy on ubuntu terminal and goes into multiple lines. Is there a way I change customize the PS1.

Currently it is:   michael@Castle2012-Ubuntu-laptop01:~/Dropnot/webs/rails_v3/linker/spec/controllers$   Outside of renaming my machine and directory structure...  How could I make it be something more like:  michael:controllers$


When I'm signed in and try to downvote a question having less than 125 reputation, I get this message:     Thanks for the feedback! Votes cast by those with less than 125 reputation are recorded, but do not change the publicly displayed post score.   According to that dialog, the vote doesn't change the publicly viewable score, but its recorded somewhere.  When I'm not signed in and I try to downvote, it says this:     This action requires 125 reputation.      Setting up an account is free and open to everyone. Set up your account today and earn extra privileges like posting, commenting and voting.   It doesn't say anything about whether or not the vote is recorded.   Do votes get recorded (without changing the public score) even without being signed in?

I just read . I found the explanation very clear and interesting, but I don't want to create an account on that site. So, I clicked Yes by "Was this post useful to you?"  Who will get that feedback?


I plan to get Lumix G 25mm f/1.7 ASPH for Olympus OMD10 mark 2.  Should I expect any reduction in performance since I am not using Lumix lens on Lumix camera? I googled but did not find any concrete answer regarding this pair. Some people say stabilization might not work well, but this lens is not stabilized. Some others say about possible purple flare, but only few resources mention this and others say it is not an issue. So I understand it is a very lens dependent question. So I am interested about this pairing specifically! Thanks.

I want to understand what are the advantages of Olympus M. Zuiko 25mm f/1.8 over Panasonic Lumix G 25mm f/1.7 ASPH because Panasonic is twice as cheap.  Looking at specs those are pretty much the same except few differences.  Can someone give a good opinion on whether it is worth buying one over another?


Let $K\subset L$ be number fields. A prime ideal $\mathfrak{p}$ of $\mathcal{O}_K$ is totally ramified in $\mathcal{O}_L$ (or in $L$) iff $\mathfrak{p}\mathcal{O}_L = \mathfrak{P}^n$, $n=[L:K]$.     Suppose $K=\mathbb{Q}$ and $L=\mathbb{Q}(\zeta_m)$ where $\zeta_m =  e^{2\pi i/m}$. Show that $[L:K]=\varphi(m)$ using the following two facts:           if $m=p^k$, then $p\mathcal{O}_L = \langle 1-\zeta_m\rangle^{\varphi(m)}$.    if $\mathfrak{p}$ is totally ramified in $L$ and unramified in another extension $L'$ of $K$ , then $L\cap L'=K$.      My idea:  Firstly, prove that $\langle 1-\zeta_m\rangle$ is a prime ideal of $\mathcal{O}_L$. Then we will have a totally ramified prime, and use this to somehow show that the degree of extension for $m=p^k$ is indeed $\varphi(m)$. Then somehow use the second fact to prove for all $m$.  However, the only way I could prove that $\langle 1-\zeta_m\rangle$ is a prime ideal is by using (1) ; and (2) norm of a principal ideal is equal to the norm of its generator. But this involves computing norm of  $1-\zeta_m$, which requires the knowledge of the degree of extension (number of embeddings or minimal polynomial). Hence it will be a circular argument.   I have spent a full day thinking about this problem and am still clueless. I would be grateful if someone could provide hints/outline of the solution.  Edit: I was able to use the first fact and prove for the special case that $[\mathbb{Q}(\zeta_{p^k}):\mathbb{Q}]=\varphi(p^k)$. However, now I don't know how to extend it to the general case using the second fact.

I am doing exercise 3.24 of Marcus which is the following.           Let $L,K$ be number fields with $L/K$ a finite extension (of degree $[L:K] = n$) with $R = \mathcal{O}_K$ and $S = \mathcal{O}_L$. A  prime $P$ of $R$ is said to be totally ramified in $L$ iff $PS = Q^n$ for some prime $Q$ of $S$.           (a) Show that if $P$ is totally ramified in $L$ then it is totally ramified in $M$ for any intermediate field $M$, $K \subseteq M \subseteq L$.          (b) If $P$ is totally ramified in $L$ and unramified in another extension $L'$ of $K$ then $L \cap L'= K$.           (c) Give a new proof that $\Bbb{Q}(w)$ where $w = e^{2\pi i/m}$ has degree $\varphi(m)$ over $\Bbb{Q}$ (First do it for $m = p^r$ by using the fact that $(p) = (1- w)^{\varphi(m)}$ and then build up to any $m$ by using (b) above.      Now I have done (a) and (b) but when I come to (c) I fail to see how the problem is essentially circular. Even in the case $m = p^r$, I would have to use the fact that the ring of integers of $\Bbb{Q}(w)$ is $\Bbb{Z}[w]$. The proof of this fact already uses knowledge of $[\Bbb{Q}(w) : \Bbb{Q}]$ being equal to $\varphi(m)$. Am I missing something here?  Thanks.


A person who is a jack of all trades; he has done almost everything, knows everything, has gone everywhere, and is quite experienced.   Is there any single word for such a person?

I am looking for a positive, passionate word to describe the all-round capabilities of a person.   Are there any words better than 'all-rounder'?


I have a bountied question . I can no longer test the validity of any answers, because I have moved back to 32 bit Python, and the question deals with 64 bit Python. Anyway, trust me that I am no longer able to test these answers.  I have read , but that does not talk at all about bounties.   My dilemma is the following:  None of the answers I have received help me, and so if I were to just sit and do nothing (as the SO meta post implies), the first poster would get rewarded for giving an unhelpful answer, which in my mind goes against the point of the bounty/points system.  It would be more just for the community to choose (via upvotes) the best answer.  What should I do in the spirit of the points system?  EDIT: Wait a second! My question on SO is still relevant to others, so this is a different question, unlike in the "duplicate" you linked to. Motion to re-open. In the question marked as "duplicate" the OP says that his question is no longer relevant to him, and implies anyone else. My question is about a relevant question which I can no longer test.  EDIT2: I want to clear something up. @James said in the comments You're essentially asking what to do with a bounty when there are no good answers. I do not think so. No, actually I am asking what to do when I cannot test any of the answers, there is a difference. Regardless of whether or not better answers arrive (which would be great), I cannot test if the answers actually work or are better. I am not worried about not getting a solution to my problem, I am worried about being unable to evaluate it in the first place. For all I know the next answers could make the problem worse. So the question is about how I should deal with the points if I don't feel qualified dishing them out. This is why PythonMaster's answer of "choose the one most likely to work" is about as good as it gets. It is also why I am accepting his answer.

I asked a question a couple of days ago. I didn't receive any answers to the question, save for a few comments.  Once the bounty period was up I placed a bounty on the question as the concern at the time was rather urgent.  I got some answers to question eventually -- as I had expected. But requirements have changed since then and the content of the question has no longer become relevant.  What can or should I do with this question? Should I award the bounty anyway, regardless of whether the question still has it's relevance?


I was wondering how to print the contents of a file above the occurrence of a pattern in another file. I know that using  sed -n '/^PATTERN/i\\ INSERTING' filename would insert above the pattern but can i display the contents of a file instead? This command got close  sed '/^Stephen/r siid' addrfile  but i want the file to be displayed before the occurrence of the pattern

File1 contents:  line1-file1      "1"  line2-file1      "2" line3-file1      "3"  line4-file1      "4"    File2 contents:  line1-file2     "25"   line2-file2     "24"   Pointer-file2   "23"   line4-file2     "22"  line5-file2     "21"   After the execution of perl/shell script, File2 content should become:  line1-file2     "25"   line2-file2     "24"  line1-file1      "1"  line2-file1      "2" line3-file1      "3"  line4-file1      "4"  Pointer-file2   "23"  line4-file2     "22"  line5-file2     "21"   i.e  paste the contents of File1 in File2 before the line that contains "Pointer".


LAMP is not installing in Ubuntu 16.04. When I typed localhost/phpmyadmin in Firefox it showed this message:  404 Not Found The requested URL /phpmyadmin was not found on this server.   Apache/2.4.18 (Ubuntu) Server at localhost Port 80

When I was restarting the apche2, I was getting this message..   sudo service apache2 restart  * Restarting web server apache2                                                                                AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message   and when I was typed the localhost/phpmyadmin, it showing the message      -NOT FOUND The requested URL /phpmyadmin was not found on this server. Apache/2.4.7 (Ubuntu) Server at localhost Port 80   Please help me in this.


I am having a hard time trying to convert a String containing the hex string representation to its corresponding hex string byte array.  I tried this code   public static byte[] hexStringToByteArray(String s) {     int len = s.length();     byte[] data = new byte[len / 2];     for (int i = 0; i < len; i += 2) {         data[i / 2] = (byte) (((Character.digit(s.charAt(i), 16) << 4) + Character.digit(s                 .charAt(i + 1), 16)) & 0xFF);     }     return data; }   It's not the exact value what i am looking for above code conveting "FF" --> -1.  Expecting is "FF" --> byte[] { FF }.  Ex : "01FF0A2357F01A" result should be like this byte[] { 01 FF 0A 12 57 F0 1A }.

I am looking for a way to convert a long string (from a dump), that represents hex values into a byte array.  I couldn't have phrased it better than the person that posted .  But to keep it original, I'll phrase it my own way: suppose I have a string "00A0BF" that I would like interpreted as the  byte[] {0x00,0xA0,0xBf}   what should I do?  I am a Java novice and ended up using BigInteger and watching out for leading hex zeros. But I think it is ugly and I am sure I am missing something simple.


This is on an ROG Zephyrus M15. I updated Ubuntu to 21.04 a couple days ago, and since then there's been three times when I try to get it out of sleep mode it won't do it. I have to hold the power button until it turns off then start the computer again. I'm pretty sure it's related to the update since it didn't happen before it, but it's happened three times in just a couple days. If anyone has any advice that could help prevent this I'd appreciate it. Thanks.

My problem is that I cannot suspend my computer properly. Technically I can, but when I come back and try to reopen it, it just doesn't work. My screen remains black with a blinking line, like a typical writing line _. My laptop is a . Here is the output of lspci: 00:00.0 Host bridge: Intel Corporation 8th Gen Core 4-core Processor Host Bridge/DRAM Registers [Coffee Lake H] (rev 07) 00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) (rev 07) 00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 630 (Mobile) 00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 07) 00:12.0 Signal processing controller: Intel Corporation Cannon Lake PCH Thermal Controller (rev 10) 00:14.0 USB controller: Intel Corporation Cannon Lake PCH USB 3.1 xHCI Host Controller (rev 10) 00:14.2 RAM memory: Intel Corporation Cannon Lake PCH Shared SRAM (rev 10) 00:16.0 Communication controller: Intel Corporation Cannon Lake PCH HECI Controller (rev 10) 00:17.0 RAID bus controller: Intel Corporation 82801 Mobile SATA Controller [RAID mode] (rev 10) 00:1d.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #9 (rev f0) 00:1d.5 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #14 (rev f0) 00:1d.6 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #15 (rev f0) 00:1d.7 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #16 (rev f0) 00:1f.0 ISA bridge: Intel Corporation HM470 Chipset LPC/eSPI Controller (rev 10) 00:1f.3 Audio device: Intel Corporation Cannon Lake PCH cAVS (rev 10) 00:1f.4 SMBus: Intel Corporation Cannon Lake PCH SMBus Controller (rev 10) 00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Lake PCH SPI Controller (rev 10) 01:00.0 VGA compatible controller: NVIDIA Corporation GP107M [GeForce GTX 1050 3 GB Max-Q] (rev a1) 01:00.1 Audio device: NVIDIA Corporation GP107GL High Definition Audio Controller (rev ff) 02:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981/PM983 03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15) 04:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8822BE 802.11a/b/g/n/ac WiFi adapter 05:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS522A PCI Express Card Reader (rev 01)  I haven't seen a fix for this anywhere, so I was expecting someone to help me here. Thanks in advance!


$$ a,b \in  \mathbb{Q} $$ $$ \sqrt{a} \notin \mathbb{Q}  ~\text{and}~ \sqrt{b} \notin \mathbb{Q} \implies \sqrt{a} + \sqrt{b} \notin \mathbb{Q}    $$  I'm not really sure on how to solve this, however, I know it's true, it's an implication of a theorem,  how can I prove this directly?

I need to prove this equivalence   Let $a,b \in \mathbb{Q^{+}}$ then $\sqrt{a} + \sqrt{b} \in \mathbb{Q} $ if and only if $\sqrt{a} \in \mathbb{Q}$ and $\sqrt{b} \in \mathbb{Q}$  I have already proved the reciprocal (the obvious part) but I am having difficulties with the other part  Please any hint will be appreciated.  Thanks in advance.


If you have light that is going away from you in exactly the opposite direction then I assume that you are never going to be able to detect it, because you can't catch up to it.   But if you have light that is going in any other direction, could one detect it?

When a laser pointer is pointed at a screen or at a target that spot can be detected because the laser beam falls on the target and bounces back and then is detected by a photosensor.  But, what if it was possible for an electronic eye / photosensor to detect a spot or point of light in just air, without the need of a surface for that spot/point to bounce of.  What would be the practical applications of such an invention?


How is Newtonian Mechanics contradictory to Special Relativity at a certain parameter and what conditions must be met for Newtonian Mechanics to be a suitable model for describing systems?

Books say that special relativity is indistinguishable from Newtonian mechanics when the speed of the primed frame ($v$) is small compared to the speed of light ($c$). This is what I mean by the "Newtonian limit" property of special relativity. (I don't know the correct name for it). But the transformation of the time coordinate  $$t' = \gamma \left(t + \frac{vx}{c^2}\right)$$  involves the spatial quantity $x$ which, if large enough, could balance out the smallness of $v/c^2$. So why doesn't this observation mess up the "Newtonian limit" property?


I'm trying to set environment variable through a shell script. Here is the script with various techniques:  #!/bin/sh echo "export SOMEPATH=/root/some" >> /root/.bash_profile echo "export PATH=$PATH:$SOMEPATH/bin" >> /root/.bash_profile SOMEPATH=/root/some export SOMEPATH source /root/.bash_profile   I run the script a.sh with sh a.sh   Then if I check the env variable it doesn't show up.  echo $SOMEPATH returns nothing. I expected to get SOMEPATH returned

I have multiple Amazon EC2 accounts and want to quickly be able to switch variables, such as $EC2_HOME, using a script.  I have have a shell script set up like this:  #!/bin/sh export EC2_HOME=/home/me/.ec2 echo $EC2_HOME   When I run the script I know that EC2_HOME is set, but I thought that using export would make the variable stick around after the script completed. It does not, as running echo $EC_HOME does not show anything.  I know this must be very rudimentary Linux scripting knowledge, but I don't know it. I tried looking for related questions without luck - so my apologies if this is a duplicate.


Originally this works (file init.cpp):  #include "main.h" #include "api/llemu.h" #include "api/lcd.hpp" template<typename ... Args> void lcd_print(std::int16_t line,std::string fmt,Args ...args){   const char* format = convert(fmt,args...);   if (line >= 1 && line <= 8) {     llemu::editLabel(lines[line - 1], format);   } } void initialize() {     llemu::init();   lcd_print(1,"hey"); }   But when I try to implement the function template in a hpp file, it doesn't work. New code:  //init.cpp #include "main.h" #include "api/llemu.h" #include "api/lcd.hpp" void initialize() {     llemu::init();   lcd_print(1,"hey"); }  //lcd.hpp template<typename ... Args> void lcd_print(std::int16_t line,std::string fmt,Args ...args);  //lcd.cpp template<typename ... Args> void lcd_print(std::int16_t line,std::string fmt,Args ...args){   const char* format = convert(fmt,args...);   if (line >= 1 && line <= 8) {     llemu::editLabel(lines[line - 1], format);   } }   There is a linker error in the new code:  [undefined reference to `void lcd_print<>(short, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)]   What does it mean and what did I do wrong?

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


I am wondering if there is a way to trim the size of the rendered image to the edge of visible pixels for transparent PNGs. In Photoshop, I would go to Image -> Trim. I often render objects with transparent backgrounds that then need to be trimmed to the objects visible edge.  It would save a lot of time if I could skip editing the image in Photoshop.

I know I can set the render border with Ctrl+B and dragging a box.  But is there  a way I can exactly specify the border dimensions?


For proof-reading-purposes I would like Latex to begin every separate paragraph on a new page. Is it possible to redefine \par or issue a command to achieve this?  Example paragraphs:  sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris  nisi ut aliquip ex ea commodo consequat.   Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.  Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.```

Is there a way to force a pagebreak after every sentence or paragraph?  This may seem like an odd thing to do, but for catching typos and just general editing I find it much easier to look at a sentence or paragraph in isolation so that I am not tempted to skip ahead.  Currently, I just zoom in so I can only see a few word at a time, but this is not a perfect solution.


Is anyone aware of a solution to display the week number next to the date and time in the top panel of GNOME Shell?

Time indicator is shown as "%a %H:%M" in the center of the top bar.  How do I move it back to the right where it belongs, and make it include the full date and time ("%Y-%m-%d %s %H:%M")?


I have a Pixel 3, and the back of the phone is frosted glass. I noticed today that if I look at the back from a wide angle it becomes reflective, whereas it is opaque when looking directly on.  What causes this phenomenon?

The mirrors we use everyday have a highly reflective smooth surface, so that we can see a clear image.  But I found the same happens on a rough (not so smooth) surface, though only at shallow angles.  For example    this is the logo of physics stackexchange, reflected from the back of an ipad.  Considering that aluminum may contributed to reflection, I tried a different material:    this time a piece of printer paper.  Though not as clear, there is still some visible pattern resembling the logo.  The same effect can be observed on highways, where distant vehicles have a mirror image off the road; I do not have a picture at hand however.  So, why is this happening, and why only on shallow angles?


I'm trying a simple C program. #include <stdio.h> int main() {     int *ptr;     *ptr = 1;     printf("%d\n", *ptr); }  doesn't work and result in % gcc -o main main.c % ./main [1]    66272 bus error  ./main  while #include <stdio.h> int main() {     int *ptr;     int i = 1;     ptr = &i;     printf("%d\n", *ptr); }  works as expected. Is *ptr = 1 an invalid syntax? Also, what does bus error exactly mean?

What does the "bus error" message mean, and how does it differ from a segfault?


When I compile this code I experience a bus error and I don't understand what I'm doing to cause this. I read up what a bus error entails and I still don't quite see my problem. This code should reproduce the behaviour of the strcpy() function in the string.h library.    #include <unistd.h>  void ft_putstr(char *str) {  while (*str)   write(1, str++, 1); }  char *ft_strcpy(char *dest, char *src) {  int index;   index = 0;  while (src[index] != '\0')  {   dest[index] = src[index];   index++;  }  dest[index] = '\0';  return (dest); }  int main(void) {  char *str1, *str2, *cpy;   str1 = "Cameron";  str2 = "Why you no work?";  cpy = ft_strcpy(str1, str2);  ft_putstr(cpy);  return (0); }

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


I built a gallery system. Everything works I uploaded the site for web hosting. But I have a problem. For example I add at the end of the example pages index.php / ' My site turns white but all the site data is there. I have now protected the site using real_escape_string $page = "index"; $query = $mysqli->con->prepare("SELECT * FROM `pages` where page = ?"); $query->bind_param('s',$page); $query->execute(); $row = $query->get_result(); $result = $row->fetch_assoc();

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


Hi everyone. I want to ask help and advise. My sister got her refusal notice, picture uploaded. She is from Philippines.  My sister is employed and they paid her cash. She submitted her certificate of employment, 6 months payslip and approved leave of absence from her company.  And not having bank account statement is the main ground for refusal, I believe it is, as they mentioned in the 3rd paragraph. We are planning to reapply this month as we want her to come mid of April to join us in our special event. My sister provided evidence of family ties. Her partner for 16 years, family and work are her ties and reasons to return to Philippines.  Questions:  (1) Do you think submitting Certificate of Annual Compensation received for the year 2018 or  Philippine BIR FORM 2316, Certificate of Salary Received for January and February 2019 or the last 6 months, certifying as well that it is cash payment, attached her cash voucher and payslip from her company would be sufficient proof of her income/salary received in lieu of bank account statement?  I found out today that she has savings account in a Rural Bank since 2011 up to now.. there were transactions made, deposits and widrawals, but nothing left there as the moment as she withdraw the last money last month,  could we use it as additional document? Picture uploaded  (2) Can we satistfy and prove to the ECO that my sister is a genuine visitor to the UK by providing again the letter from her partner, stating their relationship history and future plans together, their photos, our family photos, Identification cards of her family in Philippines, and will add letter from father of her partner certifying my sister and her partner live in his property, their relationship, and submit proof of residence under his name like utility bills?  (3) Is the chance of reapplying and submitting additional documents mentioned above would give us higher chance of successful visa application?  THANK YOU in advance. All advises will be appreciated.

Many of the UK visa refusals we see here share a common pattern and the prevailing reasons refer to V 4.2 (a) and (c).    I do understand that, while the applicants may describe very different individual circumstances, there's a consistent pattern and, broadly, fall into specific categories:    Credibility (lifestyle, lack of ties, visit history, lies & omissions) Funding (insufficient funds, provenance of funds, funds parking) Sponsorship (family, friends, employer)   Question: What most commonly triggers a UK visa refusal where V 4.2 (a) and (c) are given as the grounds?  Secondarily: Given that there is a clear pattern, to what extent are these refusals predictable? Does sponsorship make a difference? Is there a set of personal circumstances, however abstract, where a refusal is all but guaranteed? For example, why do those we see here on TSE who sought entry for the PLAB or British Army appear to be refused with a common theme? Is there a uniform shortcoming or is it just discrimination?   PLAB: What is about applications for a visa, for the purpose of sitting the Professional and Linguistic Assessments Board (PLAB) exam, that seem to invite refusals. After all, the test is given so that international medical graduates can show that they qualify to practise medicine in the UK. The first part, PLAB 1, can be taken in centres outside of the UK. However, PLAB 2 can be taken only in the UK. Why can't you can't get a visa just to sit the exam, promising that you'll leave immediately after?    British Army: Since Commonwealth citizens are eligible to apply online to join, even those who don't reside in the UK, why is it so difficult to get a visa just to attend an interview to see whether you are suitable? Even with an invitation from the Army, such visa applications seem to be unsuccessful. Isn't a career in the British Army a valid reason?     Lastly:  After such a refusal, what approaches would increase the chance of a successful application?


I'm trying to describe someone who no longer favor something simply because more people are aware of it/like it now.   Possessive and selfish come pretty close but still not quite what i'm looking for.

Such a person does not hold in high regard the decisions taken by a group (not a team) of people. She believes that groups tend to be anarchic and don't serve their purpose.  An example would be - for outings with friends, this person will not like planning it with the group since they will mess it up.  Therefore, this person has convinced herself that when more people are involved with something, it will be worse. She distrusts crowds instinctively basically.


Is there a way to   \footcite{key}   or  \fullfootcite{key}   such that in the text there are no upper index numbers but numbers enclosed in brackets? Correspondingly, the footnote citation should begin with (e.g.)  [1]   and not with an upper index number.

I use a custom cite command cite which puts the citation on first use in the footer. The problem is that there is no possibility to reference a page or section with this cite command. example: \cite[p. 12]{somebibref} ignores the optional parameter. The citation should be in brackets like this: ...Lorem explains [1, p.12]... This is the code snipped i got but i dont know how to modify it for my purpose.  What do I need to modify to add the additional parameter only in the citation in the text not in the footer?  \makeatletter  \newtoggle{cbx@togcite}  % remove doi, eprint and url from footnote %\renewbibmacro*{doi+eprint+url}{}%  % Citation number superscript in brackets \renewcommand\@makefntext[1]{%   \iftoggle{cbx@togcite}     {\@textsuperscript{\normalfont[\@thefnmark]}\enspace #1}     {\@textsuperscript{\normalfont\@thefnmark}\enspace #1}%   \global\togglefalse{cbx@togcite}}  \renewcommand\@makefntext[1]{%   \iftoggle{cbx@togcite}     {\normalfont[\@thefnmark]\enspace #1}     {\normalfont\@thefnmark\enspace #1}%   \global\togglefalse{cbx@togcite}}  \DeclareCiteCommand{\cite}[\cbx@superscript]%   {\usebibmacro{cite:init}%    \let\multicitedelim=\supercitedelim    \iffieldundef{prenote}      {}      {\BibliographyWarning{Ignoring prenote argument}}%    \iffieldundef{postnote}      {}      {\BibliographyWarning{Ignoring postnote argument}}}   {\usebibmacro{citeindex}%    \usebibmacro{sfcite}%    \usebibmacro{cite:comp}}   {}   {\usebibmacro{cite:dump}}  \newbibmacro*{sfcite}{%   \ifciteseen   {}   {\xappto\cbx@citehook{%    \global\toggletrue{cbx@togcite}%    \noexpand\footnotetextA[\thefield{labelnumber}]{%      \fullcite{\thefield{entrykey}}\addperiod}}}}  \newrobustcmd{\cbx@superscript}[1]{%   %\mkbibsuperscript{\mkbibbrackets{#1}}%   \mkbibbrackets{#1}%   \cbx@citehook%   \global\let\cbx@citehook=\empty}  \let\cbx@citehook=\empty  \endinput


I personally tried to use DeMoivre's Theorem to solve this. Since (1+i)^n can be written in it's polar form as:  z^n = r^n (cos(nθ)+isin(nθ))  = √(2)^n (cos(nπ/4)+isin(nπ/4))   and (1-i)^n as:  z^n = √(2)^n (cos(n(-π/4))+isin(n(-π/4)))  so (1+i)^n + (1-i)^n can be written as  (1+i)^n + (1-i)^n = (√(2)^n (cos(nπ/4)+isin(nπ/4))) + (√(2)^n (cos(n(-π/4))+isin(n(-π/4))))                = √(2)^n (cos(nπ/4)+isin(nπ/4) + cos(n(-π/4))+isin(n(-π/4)))   Although once I got here, I was unsure as to where to go. If DeMoivre's Theorem the right approach here?

I'm wondering if there is a formula for the value of $(1+i)^n+(1-i)^n$?  I calculated the first terms starting with $n=1$ to be, in order, $2$, $0$, $-4$, $-8$, $-8$, $0$, $16$, $\dots$  So it seems to be some sequence of positive and negative powers of $2$ with $0$s thrown in. Is there a more explicit formulation of what $(1+i)^n+(1-i)^n$ is, based on $n$?   With the binomial theorem, I get it equal to $$ \sum_{k=0}^n\binom{n}{k}i^{n-k}(1+(-1)^{n-k}). $$ Can this be made nicer? Thanks.


I bought Lenovo ThinkPad T450 with hope that it would work straight out of the box, most ThinkPads have really great support early on imo. But this laptop isn't really coping with me.   The problem I have is when I switch workspaces or something, the icons and text disapears and I can't see any, I have to hover my mouse over the different objects to see them. Switching workspaces back and forth works. I use I3 window manager but the problem is the same with Gnome 3.   Lets get down with some specs:  00:00.0 Host bridge: Intel Corporation Broadwell-U Host Bridge -OPI (rev 09) 00:02.0 VGA compatible controller: Intel Corporation Broadwell-U Integrated Graphics (rev 09) 00:03.0 Audio device: Intel Corporation Broadwell-U Audio Controller (rev 09) 00:14.0 USB controller: Intel Corporation Wildcat Point-LP USB xHCI Controller (rev 03) 00:16.0 Communication controller: Intel Corporation Wildcat Point-LP MEI Controller #1 (rev 03) 00:19.0 Ethernet controller: Intel Corporation Ethernet Connection (3) I218-LM (rev 03) 00:1b.0 Audio device: Intel Corporation Wildcat Point-LP High Definition Audio Controller (rev 03) 00:1c.0 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #6 (rev e3) 00:1c.1 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #3 (rev e3) 00:1d.0 USB controller: Intel Corporation Wildcat Point-LP USB EHCI Controller (rev 03) 00:1f.0 ISA bridge: Intel Corporation Wildcat Point-LP LPC Controller (rev 03) 00:1f.2 SATA controller: Intel Corporation Wildcat Point-LP SATA Controller [AHCI Mode] (rev 03) 00:1f.3 SMBus: Intel Corporation Wildcat Point-LP SMBus Controller (rev 03) 00:1f.6 Signal processing controller: Intel Corporation Wildcat Point-LP Thermal Management Controller (rev 03) 02:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5227 PCI Express Card Reader (rev 01) 03:00.0 Network controller: Intel Corporation Wireless 7265 (rev 59)   Thanks for any help.

I am running Ubuntu 14.04 on think-pad T450.  When using an external monitor with higher resolution than the in-built laptop screen, the text of dialog boxes are getting messed up.  Looks like I need to replace the Graphic card driver. Anyone found a solution to this?  Updated to add requested information:  lspci -nnk | grep '\[03' -A2   gives the following:  00:02.0 VGA compatible controller [0300]: Intel Corporation Broadwell-U Integrated Graphics [8086:1616] (rev 09)     Subsystem: Lenovo Device [17aa:5034] Kernel driver in use: i915   Below is a screenshot, see how the letters are messed up on the screen.


Could I define a circle as a polygon where the amount of sides approaches infinity? How would I define this mathematically?

How does one prove that a regular $n$-gon with perimeter $1$, approaches (becomes) a circle as $n$ goes to (or if $n$ is) infinity?  It is not enough to prove that all points become equal distance to origin, since this also holds for the limiting object of the graph of largest area drawn on the square graph and enclosed by a circle as we make the squares smaller and smaller.  Is the circle the only possible object with all points distance $r$ from another, and total perimeter $2\pi r$?


While installing Windows 10 from the Repair Tools command prompt, I ran clean command by mistake on the whole disk, so it becomes a single 465GB partition. Previously, it contained four partitions.  How can I recover them with the data intact? I used list partition but is not going show me any dara

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


Objects floating on the surface of calm water seem to be attracted to one another and tend to come together in a drift. Is this attraction like gravity?

Why does a cork ball float to the side of a glass as illustrated in the following GIF? What is the physical phenomenon behind this observation and why does it happen?


I was in a bike shop recently asking for dry lube, and the sales guy told me that the wet/dry distinction is just one that Finishline uses for their product lines, not an actual distinction between chain lubes in general.  However, other bike store folks have told me that there is a difference, and that wet lube can be applied less frequently, but will tend to collect grit and sand more, while dry lube is less adhesive to that stuff, but must be reapplied more often.  Are any of these right or close to right?

In the past, I personally have only used WD-40.   However, I have occasionally had my bicycle looked over at the locally run, free service sessions and most of the mechanics there use a hand applied type of greasy gel (I forget the name).  Questions:   Is WD-40 suitable for bicycle chains? Would alternatives provide better chain longevity? When shopping around for lubricant, what are the most important things to look for? What do you use and why?  (optional added extra) Any tips for reducing chain wear?


I have a file containing the following text:  we are going to write something 1 2 3   wc tells me I have 1 line 9 words and 38 characters.  I'm looking to count the 26 letters only (a-z, no numbers or white spaces etc).  Here's my current solution:  grep -o [[:alpha:]] filename | wc -l   I really want to know if there is a "better" way to do this at the command line.

I have a file with a number of lines in a file filename.  I want to count how many lines start with character 'a', with 'b' and so on in one go.  What command i should execute.?


I have set my image as you see in the attached figure, is it possible to do so in Latex? and how ?

Recently I have learned how to draw simple stuff with TikZ. I really like it. Now I wonder if it is possible to draw with TikZ on a image. Instead of pasting a image in Illustrator and adding some vectors to point something in the picture I would like to do it using TikZ. Is it possible?   For example, on a picture of a computer (PNG,etc) I would like to draw some arrows and labels saying "Keyboard", "Monitor", etc.


if $f$ is differentiable on $(a,b)$ can we say that $f'$ is continuous on $(a,b)$?  I tried some functions and it seems that we can say so but I'm not sure.

Could someone give an example of a ‘very’ discontinuous derivative? I myself can only come up with examples where the derivative is discontinuous at only one point. I am assuming the function is real-valued and defined on a bounded interval.


While trying to create a new  file in php I granted ownership permission to www-data. There onwards I can't login to the superuser session but I can login to the guest session. The login screen asks for password and on typing password thereafter it redisplays the screen. What to do?

My Ubuntu is stuck in a login loop when trying to enter my desktop. When I login, the screen gets black and soon after that the login screen comes back.   I've read that the problem might be caused by an error depending on the graphics, here's my graphics card: ATI Radeon 7670M


As you can tell I am having some issues. I am a gamer, and not having write privileges would be a death sentence to any gamer. With this guest account when I log. I have tried 2-3-4 fixes, Even did another fsck, another issue, not this one. My point is. there is something wrong with either admin, GUI, or something in between. Cause I can log in terminal or shell whatever it is called. But not with GUI.