I have drafted a game that uses a  with 52 cards, 4 suites (diamonds, clubs, hearts, spades), and no jokers.  I'm interested in profiling game play along a few axes:   How many turns are there in a typical game with different play strategies? If I change the winning condition from, say, getting all four queens to getting all four jacks, how much longer or shorter is play. This would make an actual difference in my game, but I'd like to quantify that difference. How frequently will players have matching ranks for the cards they play if I force them to play a random card from their deck versus selecting which card to play?   Besides those, I could think of other ways to tweak the game, and I want to know what effect that has without manually playing the game several times in real life.  It would be possible to get this information by using some ad-hoc scripting on my computer to calculate values for the specific cases I mention above. However, adding more measurements, could require changing or improving my model of the game which takes more work. What would be better is a suite of computer programs that would allow me to change rules and gather new statistics without, in general, needing to add additional instrumentation to the game engine. Does such a suite of programs already exist?  I have seen  which is similar to my own, but the poster requests statistics for a much more specific condition. I am looking for a general tool. I am hoping that the situation has changed since the original negative answer.

I am developing a card game that involves building out sequences of matching symbol pairs and also has a lose state for a (different set) of symbols that is hidden to the player. Trying to create an atmosphere of paranoia.  I want to be sure I'm balancing the deck to create probably winning and losing sequences and can code a bit - but I was wondering if any of you used a specific application to run probabilities? Mac OSX would be great.


Estou com uma grande lista de exercícios de PROPRIEDADES DO MDC (MÁXIMO DIVISOR COMUM), e não estou conseguindo entender quais os passos que tenho que seguir nas demonstrações, e gostaria muito de aprender este conteúdo, alguém me ajuda em uma questão para ver se eu consigo entender as outras?  Questão: Mostre que, se (a, b) = 1, a|c e b|c, então a · b|c  Added Translation from Portuguese  I have a large list of exercises PROPERTIES MDC (greatest common divisor), and I am not able to understand what steps you have to follow in the statements, and would love to learn this content, someone help me on a question to see if I I can understand the other?  question: Show that if $(a, b) = 1,  a | c$ and $b | c$, then $a · b | c$

Let $a\mid c$ and $b\mid c$ such that greatest common divisor (gcd) $\gcd(a,b)=1$, Show that $ab\mid c$.


I'm not able to open my Samsung T5 500GB disk on Ubuntu 18.04. I was able to open it before without problem. The device is shown on dmesg and lsusb command, but is not recognized by the Device Manager. It is also not accessible in Dolphin file manager. I can see the SSD in GParted.  The device is not encrypted as it is opening on Windows without any problem. Is there any way to make this disk readable again on Linux?

How could I mount my BitLocker encrypted drive on Ubuntu?  I have checked the  website, and it had no BitLocker support, and I have no idea how to install Dislocker on my computer.   I can not remove the encryption because my school computers use Windows OS instead of Linux OS. Also because I installed Ubuntu because my Windows OS was not working.


Animals spend a good portion of every day doing nothing, and it seems like that time could be better spent hunting, searching for mates, etc. Also, animals are not aware during sleep, so it would be easier for a predator to attack them. Why is sleep required for animals?

The process of sleep seems to be very disadvantageous to an organism as it is extremely vulnerable to predation for several hours at a time. Why is sleep necessary in so many animals? What advantage did it give the individuals that evolved to have it as an adaptation? When and how did it likely occur in the evolutionary path of animals?


So i really new to this kind of stuff when i tried installing ubuntu via wubi the firts half minute the instalation goes fine but until i get to this black console its just stuck it say completing the ubuntu installation for more installation boot option,  press 'ESC now but it do not work i tried pressing everything and get nothing i download the 20.04 version in github and the os from the ubuntu official website

A couple of months ago Ubuntu had an ubuntu.exe file inside the ISO, so I was able to run Ubuntu in my Windows by clicking ubuntu.exe after installing it with wubi.exe. Now in Ubuntu 16.04 it seems ubuntu.exe is not there anymore. My computer failed to install Ubuntu 16.04 even though I followed the steps from Ubuntu on how to create a bootable USB. Why doesn't Ubuntu 16.04 in Windows have an ubuntu.exe file like in older versions of Ubuntu?


I am wondering if this is a standard that calling [] without assignment will initialize the value of this key-value pair to be 0, if value is of type int?      // the way I did before, can I skip the if() checking?     std::unordered_map<std::string, size_t>  word_map;     for (const auto &w : { "this", "sentence", "is", "not", "a", "sentence",                            "this", "sentence", "is", "a", "hoax"}) {         if (!word_map.count(w)) {             word_map[w] = 0;         } else {             ++word_map[w];         }     }   Can i do the following instead:      std::unordered_map<std::string, size_t>  word_map;     for (const auto &w : { "this", "sentence", "is", "not", "a", "sentence",                            "this", "sentence", "is", "a", "hoax"}) {         ++word_map[w];     }   Thanks.  /*------------- --------------- -------------*/   UPDATES:  I just checked out this page about en.cppreference.com/w/cpp/language/default_initialization it seems that if we reply on the default initialization int x; the value of x will be indeterminate. So I guess word_map[w] does not necessarily == 0 when first called?

I have a std::map like this:  map<wstring,int> Scores;   It stores names of players and scores. When someone gets a score I would simply do:  Scores[wstrPlayerName]++;   When there is no element in the map with the key wstrPlayerName it will create one, but does it initialize to zero or null before the increment or is it left undefined?  Should I test if the element exists every time before increment?  I just wondered because I thought primitive-type things are always undefined when created.  If I write something like:  int i; i++;   The compiler warns me that i is undefined and when I run the program it is usually not zero.


I came across such a problem. It asked me to construct a function $f$ on $\mathbb{R}$ with the property that, for all $p \in (1, \infty)$,  $$\int^{\infty}_{-\infty}|f(x)|^pdx<\infty \iff p=4.$$  I have no clue where to start. I've tried something like $\frac{1}{x^{1/4} lnx^{1/4}}$, but it doesn't seem right. Does this problem involving functional analysis? Can anyone enlighten me? Thanks in advance.

I'm having trouble with this problem from an old analysis qual:  Find a function $f$ such that for $p\in (1,\infty)$, $f$ is in $L^p(\mathbb{R})$ only when $p=4$.


I created a project wich contains a simple window with graphic contents using scene builder (FXML), I got this error: here a capture of the code:  java.lang.IllegalStateException: Location is not set. at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2434) at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2409) at application.Main.start(Main.java:16) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863) at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326) at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191) at java.lang.Thread.run(Thread.java:745)

I know the file needs to be where the getClass().getResource(filename) can find it, but I don't know where that is.  I'm interested both in where to put the files on the filesystem itself, and how to go about using Eclipse's functionality to set up the resources.


I am trying to install Oracle 11g R2 on Ubuntu 14.04 64-bit using the "silent" installer. I am using an .rsp file with the process but getting this error:   [FATAL] [INS-30501] Automatic Storage Management software is not configured on this system  CAUSE: Prior to configuring a database to use Automatic Storage Management (ASM), you must install and configure Grid Infrastructure, which includes ASM software.  ACTION: Grid Infrastructure can be installed from the separate installation media included in your media pack. Alternatively, it can be downloaded separately from Electronic Product Delivery (EPD) or the Oracle Technology Network (OTN)   Should I install Automatic Storage Management (ASM) and how? Or should I avoid ASM, also how?

Please provide me with the guidance to install oracle 11gr2 on Ubuntu 14.04.


We consider $R=\mathbb{R}[x^2-1]\subset \mathbb{R}[x]=R'$ a ring extension, which is easy to see that is integral. Now we consider the ideal $P'=(x-1)$ of $R'$, and $P=P'\cap R$. We claim that $R_P\subset R'_{P'}$ is not an integral extension.   My attempt: I consider the element $\frac{1}{x+1}\in R'_{P'}$. Suppose that this element is integral, then there exists a relation $$ \frac{1}{(x+1)^n}+\sum_{i=0}^{n-1}\frac{1}{(x+1)^i}\frac{a_i}{b_i}=0$$ for $n\in \mathbb{N}$, $\frac{a_i}{b_i}\in R'_{P'}$. Making common denominator and calling $c_n=b_1\cdots b_{n-1}$, $c_i=\prod_{j\ne i}b_j\notin P$, we get $$c_n+\sum_{i=0}^{n-1}(x+1)^{n-i}a_ic_i=0.$$ I think that from here I can deduce an absurd, but I am stucked on this point...

I was having some trouble with the following exercise from Atiyah-Macdonald.     Let $A$ be a subring of $B$ such that $B$ is integral over $A$. Let $\mathfrak{n}$ be a maximal ideal of $B$ and let $\mathfrak{m}=\mathfrak{n} \cap A$ be the corresponding maximal ideal of $A$. Is $B_{\mathfrak{n}}$ integral over $A_{\mathfrak{m}}$?   The book gives a hint which serves as a counter-example. Consider the subring $k[x^{2}-1]$ of $k[x]$ where $k$ is a field, and let $\mathfrak{n}=(x-1)$. I am trying to show that $1/(x+1)$ could not be integral over $k[x^{2}-1]_{\mathfrak{n}^{c}}$.  I have understood why this situation serves as a counterexample. But I am essentially stuck at trying to draw a contradiction. A hint or any help would be great.


I'm travelling from Canada to San Diego, and then returning from there to Canada. Can I bring protein powder in my carry-on?   Does it have to be packaged in the original packaging (both ways/one way)? Is there a limit on volume?   Thanks!

I will be soon visiting the US, and I was wondering if I am allowed to buy a n=brand new Whey protein tub (5lb) and put in my carry on. It is a small trip and I usually just travel with my carry on only, so putting it in the hold baggage is not an option.  The protein tub costs $50 in the US and usually around $80-85 in Canada. Will I have problems or am I safe?


I have not put the MWE because I don't know where to start and check for packages to do the job.

What packages do you use and recommend for creating graphics in your LaTeX documents?     As this is a community wiki post, please add your package to the accepted answer (or add a comment, and someone with >100 rep will add it to the CW answer), and include a brief description of what differentiates it from others and how it can be used (GUI drawing tool which generates code, type in raw text, or generates image for inclusion in document).   We'll eventually sort these answers under headings.


When I pass an Object to another Class in Java - is this memory consuming or not? Does the object function as some kind of pointer, such as c-language?  Or when passing it to another class's constructor - I am making a copy of the object?  for instance in Android   Context context   Class Foo = new Foo(this.context);

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


Not sure if this is where I should be posting something like this, but here goes. I wrote a small program today that maps 512 evenly-spaced points on the edge of a circle, and then, iterating over each point, draws a line from the center to that point on the edge. Also this image is drawn on a canvas that is 500x500 pixels in size. The result is the image below, and where my question arises  What's curious about this image to me is that there are these little diamonds that are appearing at various points in the circle. Is there an explanation as to why these shapes are being produced?

I am not entirely sure this is an appropriate question for PSE, however since many of you have such diverse backgrounds, I'll give it a shot.  I have noticed that when one takes a picture of a computer, TV screen with a phone, you can "see" what looks like a saddle phase portrait.     Why does this happen? Does it have any relevance to differential equations or other areas of math?


I haven't ever read "Here is the potatoes." but I have read/heard sentences like "Here's the potatoes." and "Here are the potatoes."  Look at the following sentences:        Here's the details.   Here’s all the ways you can look at this problem.   Here’s some things you should know.      I found the following, but it's difficult to find more than plain opinions.     Actually, though, there’s no prohibition against using “here’s” before a plural. As with “there’s,” you could make the case that putting “here’s” before a plural is standard in common speech -- idiomatic. So I’m not critical of people who make that choice unless they happen to be members of the media writing for publication. News organizations strive to avoid sloppy, informal, ungrammatical forms. They hold themselves to a higher standard, which seems like a good idea to me.   ()  I acknowledge it is not convention or purist to do so, but rather how English is used by a dominant percentage of English speakers around the world (arguable).  QUESTION: Can you provide some literature that explains the phenomenon, and provide some insight on whether the use of "Here's" is legitimate before plurals while expressing colloquial English?

Here is the documents needed.     Here are the documents needed.       Which is grammatically correct and why? My guess would be the second one because of the plural form.


Could you help me please? I need to compare two dates to generate an if condition when it expires. My idea is to send an email to the person involved when today's date is greater than the date in the elements [16]. I broke my head and I couldn't compare with each other, it only works with the same because it is comparing text. An example below: function sendmailAtualizarFollowup(){ var app = SpreadsheetApp; var gmail = GmailApp; var spreadsheet = app.getActiveSpreadsheet(); var sheet = spreadsheet.getSheetByName('Cópia de Dados'); var values = sheet.getRange("B2:AR").getValues(); var now = new Date();    // var now = new Date();    // var nowString = Utilities.formatDate(now, 'TimeZone', 'dd/MM/yyyy');    // Logger.log(now);   values.map(function(elem,ind,obj){ if(elem[0] != ""){ var vencimento = new Date(elem[16]);{    // var vencString = Utilities.formatDate(vencimento, 'timeZone', 'dd/MM/yyy');    // Logger.log(vencString);   if(elem[11] != ""){  if(now.toDateString() == vencimento.toDateString()){   //Here's my trouble  gmail.sendEmail(elem[38], "Subject -> "+elem[0], "Example:  "+elem[5]+"  "+elem[7]+", sob responsabilidade do(a) "+elem[10]+". A data de emissão do relatório contendo este evento é "+elem[3].toDateString()+", e o vencimento original proposto pela área é "+elem[11].toDateString()+". A situação do ponto é: Controle "+elem[22]+". Os detalhes do apontamento estão disponíveis no link: "+elem[20]+". Esta é uma mensagem automática."); } } }})};

Can someone suggest a way to compare the values of two dates greater than, less than, and not in the past using JavaScript? The values will be coming from text boxes.


I'm traveling with my wife and 5 years old daughter to Sweden, and I bougth flight tickets (one way) for each one of us, from Chicago ORD to London Gatwick LGW, and then another tickets from London Gatwick LGW to Gothemburg GOT. These are the same airport, the same airline and the same day, but I was told that still I need a transit visa to check out and check in our bags because I need to go throught UK border control. My question is, do I need to apply for a Transit Visa for each one of us? how does my daughter's visa must be applied? Thank you.

Is there a website or some other way to find out if I need a transit visa for a short stop in the UK on my way somewhere else? Ideally this should give me the answer for all nationalities, and take into account any other visas I may have.


I have created form nodes with template string but i need to work them on change. I have tried .on('DOMNodeInserted') but i haven't managed to catch the event. I also tried to work with promises, but i dont know if its possible to work on html nodes with promisses. Is there a way to trigger a event listener on a html object that have been appended later?  here is one of my many tries   $('.body').on('DOMNodeInserted', function(e) { if($(e.target).children()[0] !== undefined){     let tema = $(e.target).children()[0].id;     tema.onchange = () => {         let el = manage(tema);         console.log(el);     } }});   I

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


So, I am having some trouble rewriting a C++ class I made in C. The C++ class has some private attributes: int grid_width; int grid_height; const int group_width = 2; const int group_height = 4; std::vector<int> buffer;  It is initialized like so: grid::grid(int width, int height) {             this->grid_width = width;             this->grid_height = height;             buffer.resize(this->grid_width / this->group_width * this->grid_height / this->group_height, 0);      }  It also comes with a clear function like so: void grid::clear() {     // get_buffer_size returns elements in the buffer vector     for (int i = 0; i < get_buffer_size(); ++i) {         buffer[i] = 0x00;     } }  Now, my attempt to rewrite this in C looks somewhat like this: typedef struct {     int width;     int height;     int *buffer; } grid;  grid *grid_new(int grid_width, int grid_height) {     if ((grid_width % 2 != 0) || (grid_height % 4 != 0))         return NULL;      int group_height = 4;     int group_width = 2;      grid *p_grid = calloc(grid_width / group_width * grid_height / group_height, sizeof(int));     p_grid->width = grid_width;     p_grid->height = grid_height;      return p_grid; }  void grid_free(grid *p_grid) {     free(p_grid->buffer);     free(p_grid); }  void grid_clear(grid *g) {     // ToDo: Iterate over all elements in the buffer     int elements = sizeof(g->buffer) / sizeof(int);     printf("Elements: %i", elements); }  But for some reason, the amount of elements in my C code is always 2? Does anyone know where I am messing up? If the grid is initialized with 4 and 8, the expected buffer size should be 4, not 2. If it would be initialized with 10 and 24, the expected size would be 30, but it still remains 2 in my C example.

First off, here is some code:  int main()  {     int days[] = {1,2,3,4,5};     int *ptr = days;     printf("%u\n", sizeof(days));     printf("%u\n", sizeof(ptr));      return 0; }   Is there a way to find out the size of the array that ptr is pointing to (instead of just giving its size, which is four bytes on a 32-bit system)?


I have a table already set as a PDF, and I need to include it, so the question is: how do I include it as a figure, but call it a table? I'd also like to move it from the list of figures to the list of tables.

I have a question regarding LaTeX .. I have a table from an excel file which I print screened and posted as a figure in LaTeX. However, I want to make it a table. Problem is, the particular table has a lot of values in it so making it into a table manually is pretty tedious.  Is there a way to be able to reference an image as a table instead?


I ran a quick benchmark and the overhead from calling methods is not small, especially if you have to do so hundreds of times per second.  I have been making several applications that need to run often more than a hundred times per second, so instead of making different methods when code is repeated, I just copy paste the code everywhere to avoid the overhead.  Is there a way to make the compiler do this for certain methods without me having to copy paste code everywhere? Is this even a smart thing to do and what alternatives are there to avoid branching to methods?

How do you do "inline functions" in C#? I don't think I understand the concept. Are they like anonymous methods? Like lambda functions?  Note: The answers almost entirely deal with the ability to , i.e. "a manual or compiler optimization that replaces a function call site with the body of the callee." If you are interested in , see  or .


I would like to print out the output of me entering a command into CMD using C# to a textbox while the window is hidden. Here is my code so far: double bytes = double.Parse(textBox2.Text); string domain = url.Replace("https://", ""); string commands = "ping" + domain + "-t -l " + bytes;  var proc = new Process(); proc.StartInfo.FileName = "CMD.exe"; proc.StartInfo.Arguments = commands; proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; proc.Start();

How do I execute a command-line program from C# and get back the STD OUT results? Specifically, I want to execute DIFF on two files that are programmatically selected and write the results to a text box.


I am making a program which will calculate likely profitability of running a flight between UK airport and overseas airport. In one part of my code, I want to compare user input to String, if user input is not valid then the program should return user to menu and the user should be able to input How do I do it? I will highlight the code that I have wrote for this but I am not sure what is going wrong. Code: import java.io.IOException; import java.io.FileWriter; import java.io.BufferedReader; import java.io.FileReader; import java.util.ArrayList; import java.util.Scanner;  class Main {  // menu method static void menu() {   System.out.println("------------------------------------------------------");   System.out.println("| Enter 1 to input airport details                   |");   System.out.println("| Enter 2 to input flight details                    |");   System.out.println("| Enter 3 to enter price plan and calculate profit   |");   System.out.println("| Enter 4 to clear data                              |");   System.out.println("| Enter 5 to quit                                    |");   System.out.println("------------------------------------------------------");    }    // text file   public static void main(String[] argv) throws Exception {     BufferedReader myFile = new BufferedReader(new FileReader("Airports.txt"));     ArrayList<String> listOfLines = new ArrayList<>();      String line = myFile.readLine();     while (line != null) {       listOfLines.add(line);       line = myFile.readLine();      }     myFile.close();       // main code     Scanner scanner = new Scanner(System.in);      System.out.println("\n" + "Welcome");     menu();      int menuChoice = scanner.nextInt();      if (menuChoice == 5) {      System.out.println("\n" + "You have selected quit");      System.out.println("Program ending.");      } else if (menuChoice == 1) {       System.out.println("\n" + "You have selected input airport details");       System.out.println("\n" + "Enter 3 letter airport code for UK airport");       String ukCode = scanner.next();              // need help here below       **if (ukCode != "LPL" || ukCode != "BOH") {       menu();       menuChoice = scanner.nextInt();**        // above bold, I want program to keep displaying menu and making user enter data again if they have not inputted the correct 3 digit code such as "LPL" or "BOH".                }   } }  } Output of my code: If user inputs 3 digit code incorrectly:  Welcome  ------------------------------------------------------ | Enter 1 to input airport details                   | | Enter 2 to input flight details                    | | Enter 3 to enter price plan and calculate profit   | | Enter 4 to clear data                              | | Enter 5 to quit                                    | ------------------------------------------------------ 1  You have selected input airport details  Enter 3 letter airport code for UK airport  rfrw  ------------------------------------------------------ | Enter 1 to input airport details                   | | Enter 2 to input flight details                    | | Enter 3 to enter price plan and calculate profit   | | Enter 4 to clear data                              | | Enter 5 to quit                                    | ------------------------------------------------------  1  // doesn't do anything after 1 is inputted for the 2nd time.

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?


I am using an Intel board made in 2009, model  P5KPLAM-IN series but today I've upgraded it to a DDR4 supported Mother manufactured by ASUS with Intel I3 7th generation and I deployed the same hard disk and I don't have old motherboard for some reason.  Nnow whenever I boot up the old HDD in the new motherboard Windows 7 booting logo starts loading but before fully loaded on screen  Windows 7 reboots automatically.  I tried booting with Windows7 bootable DVD but mouse doesn't works at Windows 7 installation GUI, I also tried loading driver from USB and rescan drivers but nothing happens, Windows don't find drivers in it.  I connected the hard disk to another running pc with Windows7 it shows a single 470GB c: drive .  If somehow I load ASUS motherboard drivers in the attached HDD then I hope everything starts work normal.

I have HP computer and it came with Windows Vista. It also had an option to upgrade to Windows 7 via upgrade disc. I have upgraded to Windows 7 via the special upgrade disc (It is special because it will only allow to install Windows 7 if Vista is already installed.  My motherboard recently died. I just replaced it and Windows 7 will not start up. It reboots and sometimes gives a blue screen of death. Very similar problem as described in this post: . Windows will not boot into normal or safe mode. Start up repair from system repair disc does not fix the problem. However, "" post on superuser describes that it should be possible to run Windows 7 on a new motherboard.  Is it hopeless to find a way to repair Windows 7 and I need to do a clean install? Is there a difference for repair options between OEM and retail versions of Windows 7? I remember doing this type of repair just fine in Windows XP days, so why am I unable to do so with Windows 7 - is it Microsoft or HP's fault? Should I stop buying HP computers or should I switch to Ubuntu?


I have recently installed centos 7 and was trying to create a new file through right click and selecting create a new file option as I have done in centos 6 but there is no option of create new file in Centos 7.I know I can use terminal for that but is there any way I can do it with the GUI.

I use  3.10.1 on  7.0 GNU/Linux. In context menu, there is no such option like create new file/document. So, I want to add such an option (which may work like that of existing option: New folder).   Is there any nautilus plug-in available? or I have  installed. So, what command/script I can use for this purpose?   Further I am also interested in featuring options like: New  Document, New  Document, etc.


So recently I tried answering back and to somebody's post on SO. However, he replied back to me with my real name, which is not public. I am just wondering, from where did he get the name, since my username is no way telling my complete name, then how did he get the same?  Am I missing out some settings or something here?

A user on SO, Abhijit, referred to the OP of a question, acpigeon, as "he" (and then Aaron) .  I didn't see the name on the question page, nor on . Is there a way to look this up that I missed? Alternatives are Abhijit knows acpigeon, or maybe Abhijit was just making things up.  I'm still relatively new to these sites, so I'm still learning my way around. Is there a way short of the two alternatives above to know the OP's name? If so, how?


I'm on my first playthrough and just got to Concordia.  I was surprised to find that when I approached the golden chest, I had no keys to open it!  I was expecting to have the three keys which were given by Gearbox for having the previous games installed.    What happened to my golden keys?

I've been dutifully entering Shift codes since the Pre-Sequel launched, and I should have over 20 saved up by now.   When I finally got around to visiting the golden key chest, I saw that I had only 9 keys. I redeemed a new code from today that should have added one key, but upon visiting the chest again I still had only 9. When I opened the chest, my count went down to 8 as expected.  Is there a cap on golden keys? Or is something else going on here?


I was under the impression that upgrading to Ubuntu 14.04 was supported from all version between and including the previous LTS release (12.04). Why is it then, that update-manager (with and without -d option) will only offer to upgrade to version 13.10 from my Ubuntu 12.10 system? Even that only works when I change the updater settings from "For long-term support versions" to "For any new version."  Is it only possible to upgrade to 14.04 via 13.10?

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


This comes from Calculus by Michael Spivak, 3rd ed., chapter 14, Problem 11.   Find $F'(x)$ if $F(x) = \int_0^x xf(t)dt$. The answer is not $xf(x)$; you should perform an obvious manipulation on the integral before trying to find $F'$.)   Here, Spivak fails to include the assumption that $f$ is continuous. With this assumption, the answer is $\int_0^xf(t)dt + xf(x)$, and is solved , , and . I understand the solution. I was able to do it myself. It makes sense to me. I also solved it using the $\lim_{h\to 0}$ approach, and that worked too. Yet, naively, it seems like the answer should be $xf(x)$. It seems like since $x$ "behaves like a constant" in that integration, and because $f$ is continuous, then $xf$ must also be continuous, and so $F'(c) = cf(c)$. I'm hoping to build better intuition about why this is wrong. I was thinking perhaps one way of looking at it is that $xf$ cannot be assumed to be continuous because we are free to change the value of $x$ somewhat arbitrarily. In fact, at any fixed point $c$, $xf(c)$ varies with $x$, so certainly we cannot guarantee anything about the value of $xf(t)$ simply by restricting $t$ to certain values. Does this make any sense? I'm sorry to use such sloppy reasoning/language/arguments. There's a good chance I just don't yet have the tools to fully "get it" yet, but I appreciate any insight you might be able to share. Edit Ian's answer helps explain something that confused me in Spivak's solution to a later problem. The next two problems are:   Prove that if $f$ is continuous, then $$\int_0^xf(u)(x-u)du = \int_0^x\left(\int_0^uf(t)dt\right)du.$$ Hint: Differentiate both sides, making use of Problem 11.     Use Problem 12 to prove that $$\int_0^xf(u)(x-u)^2du = 2\int_0^x\left(\int_0^{u_2}\left(\int_0^{u_1}f(t)dt\right)du_1\right)du_2.$$   These each require fairly straightforward calculations, the details of which we can skip here. However, in the published Answer Book solution for the latter, problem 13, Spivak does something that initially I found baffling. He begins:  Applying Problem 12 to $g(u) = f(u)(x-u)$, we obtain $$\int_0^xf(u)(x-u)^2du =\int_0^x[f(u)(x-u)](x-u)du$$ $$=\int_0^x\left(\int_0^uf(t)(x-t)dt\right)du$$  This substitution is misleading. The result he's using from problem 12. applies only to functions that do not depend on $x$, while Spivak's $g$ here clearly does depend on $x$. I think he gets away with it here only because $\frac{\partial}{\partial x}[f(u)(x-u)] = f(u).$

Find $F'(x)$ if $F(x) = \displaystyle \int_{0}^x xf(t)dt$.  I tried performing integration by parts to get $\displaystyle F(x) = xtf(t)-\int f'(t)f(x)xt dt$, but I am not sure how that helps. Also, are we assuming $x(f(t))$ to be integrable because otherwise the integral doesn't exist? (This problem appears in Calculus by Michael Spivak, 3rd Ed., Chapter 14, Problem 11.)


I am trying to contribute in open projects . But the procedure given for installing the projects in local machine is for Ubuntu and I am using Windows.  Also I tried Ubuntu shell  But in that I could not understand how to go to a specific folder (specific drive).  How can I do that?

I've installed bash on Ubuntu on Windows feature on Windows 10 and I want to change directory this path on my C:\ drive:  C:/wamp64/www    What should I do ?


I am playing a level 11 wizard and I have a  familiar. It has the  type, which grants 6 + INT_MOD skill points per hit dice.   Familiars have hit dice equal to their master's hit dice.   Familiars get the best of the master's skills and their own skills:      Skills: For each skill in which either the master or the familiar has ranks, use either the normal skill ranks for an animal of that type or the master’s skill ranks, whichever is better. In either case, the familiar uses its own ability modifiers. Regardless of a familiar’s total skill modifiers, some skills may remain beyond the familiar’s ability to use. Familiars treat Acrobatics, Climb, Fly, Perception, Stealth, and Swim as class skills.   Based on their , (as well as  and ), it seems to me that the Pseudodragons have the following skill points already assigned to their base kit:   Diplomacy: 2  Fly: 2 10 Perception: 2 Sense Motive: 2 Stealth: 5 13 Survival: 2   If that's accurate, then it seems that I should have 51 additional skill points to assign for the familiar's skills. Is that right, or am I completely misunderstanding how skills work for familiars?

Nowhere in the wizard class page does it say that a familiar gets its 1 skillPoint/HD. However as was concluded in this thread about , a sage familiar would have to base its skills off of the base creature's which if you do the math used a sp/HD.     Sage’s Knowledge (Ex)    - A sage stores information on every topic and is happy to lecture its master on the finer points. A sage can attempt all Knowledge checks untrained and receives a bonus on all Knowledge checks equal to 1/2 its level. Additionally, a sage gains 2 skill ranks at each level.   So,   does a sage familiar get 2 or 3 sp/(hd or wizard level) does a regular old familiar actually get a sp/level, like a druids animal companion?   I kind of think its actually 2 to 1. and no to 2. With the sage archetype a familiar gives up a decent amount, alertness and the wizard's 8 skill point fed perception etc, to be able to put skill points in whatever it wants. Oh say.. Use Magic Device for instance. However if my planned Nosoi familiar can pop a point into UMD and use my score for the skill.... well, whoo hoo.


Please tell me what time on April 17 14.04 becomes available.  I want to postpone buying a new laptop to the day before I can install 14.04 (at 09:00 UTC) in the hope that my old one is found.  Rob

Every six months a new Ubuntu version will be released. Does anyone know at which time this will be?


I have been trying for a while to incorporate a bibliographic entry () to a text that I am working on. However i cannot compile because of the symobls º and ' in the title. Here is a minimal verifaible example (see it also in ):  \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{hyperref} \usepackage{csquotes} \usepackage[     natbib=true,     style=numeric,     hyperref=true,     backend=biber,     maxcitenames=99,     maxbibnames=99,     giveninits=false,     sorting=none,     abbreviate=false,     uniquename=init,     parentracker=true,     url=false,     doi=true,     isbn=false,     eprint=false,     backref=true,     sortcites=true, ]{biblatex}   \begin{filecontents}{bibliography_file.bib} @article{Escartin2008, author = {Escart{\'{i}}n, J. and Garc{\'{i}}a, R. and Delaunoy, O. and Ferrer, J. and Gracias, N. and Elibol, A. and Cufi, X. and Neumann, L. and Fornari, D. J. and Humphris, S. E. and Renard, J.}, doi = {10.1029/2008GC002204}, isbn = {1525-2027}, issn = {15252027}, journal = {Geochemistry, Geophysics, Geosystems}, keywords = {Hydrothermal field,Lucky strike,Mid-ocean ridge,MoMAR,Photomosaic}, number = {12}, pages = {1--17}, title = {{Globally aligned photomosaic of the Lucky Strike hydrothermal vent field (Mid-Atlantic Ridge, 37°18.5′N): Release of georeferenced data, mosaic construction, and viewing software}}, volume = {9}, year = {2008} } \end{filecontents}  \addbibresource{bibliography_file.bib} %Imports bibliography file  \begin{document} \section{First section}  In \cite{Escartin2008} the title produces an error.  \medskip  \printbibliography \end{document}   which produces this output:    You can see how the title has an error. Can somebody tell me how can I solve this so I can provide a proper citation?  Thank you very much.

Solution found  Use of \usepackage{textcomp} allows for \textdegree macro, thanks to @Mico.    I use TeXmaker as an editor and I use Mendeley to generate my .bib file. One entry has a degree symbol in the title. Mendeley encodes into UTF-8 and I therefore use   \usepackage[utf8]{inputenc}   however the degree symbols do not seem to work. I have also tried including  \usepackage[T1]{fontenc}   as per some suggestions on the stackexchange and the error changes from OT1 to T1.  How can I get the degree symbol to work? Thanks.    Edit - MWE (which causes the error):  \documentclass[a4paper,12pt]{article}  % Text and Maths \usepackage[utf8]{inputenc}                                 % Input accented characters from keyboard input   %References and page interlinking  \usepackage[numbers,sort&compress,super]{natbib}        % References - [numbers,sort&compress,super] \bibliographystyle{unsrt}                                   % BibStyle - unsrt keeps 1,2,3 instead of 2,1,3 (?)  \usepackage[final]{hyperref}                                    % adds hyper links inside the generated pdf file \hypersetup{ colorlinks=true,                                                    % false: boxed links; true: colored links linkcolor=blue,                                                     % color of internal links citecolor=blue,                                                     % color of links to bibliography filecolor=magenta,                                              % color of file links urlcolor=blue                                                       % colour of url link } \usepackage{cleveref}                                               % Clever ref - loaded AFTER hyperref!  \begin{document}  test \citep{Zimmermann2009}  \bibliography{/Users/me/Documents/library.bib} \end{document}   .bib entry, error caused by degree symbol in title, I believe.  @article{Zimmermann2009, abstract = {An unusual variety of magnetic, magnetoelectric and ferrotoroidic properties was observed in the lithium-orthophosphates LiMPO(4) with M = Fe, Co, Ni by optical second harmonic generation. In spite of a largely similar magnetic and crystallographic structure the compounds exhibit pronounced differences in the topology of antiferromagnetic 180A degrees domains. In LiCoPO(4) the antiferromagnetic domains coexist with ferrotoroidic, i.e., magnetic vortex domains. For LiNiPO(4) it was shown that the weak ferrimagnetic moment of the LiMPO(4) compounds along the spin direction is rigidly coupled to the AFM order parameter so that the sign of the magnetoelectric effect is reversed by a magnetic field only. Further effects of a static magnetic field on the system are discussed.}, author = {Zimmermann, A. S. and {Van Aken}, B. B. and Schmid, H. and Rivera, J. P. and Li, J. and Vaknin, D. and Fiebig, M.}, doi = {10.1140/epjb/e2009-00223-3}, file = {:Users/matt/Documents/Mendeley Desktop/Zimmermann et al. - 2009 - Anisotropy of antiferromagnetic 180° domains in magnetoelectric LiMPO 4 (M = Fe, Co, Ni).pdf:pdf}, isbn = {1434-6028}, issn = {14346028}, journal = {European Physical Journal B}, number = {3}, pages = {355--360}, title = {{Anisotropy of antiferromagnetic 180° domains in magnetoelectric LiMPO 4 (M = Fe, Co, Ni)}}, volume = {71}, year = {2009} }


Given I would like create environment variables from files containing newlines and special characters. The clue is that this content can have references to other environment variables which have to be intepreted. Maybe I need more complex tools than just plain bash?  A testfile "testfile.txt" could look like:  * foo \/-!~  FOO=${FOOBAR}   What I have managed myself so far is the following:  #!/bin/bash FOOBAR="SUCCESS" file="testfile.txt" var_name="TEST" name="$file" content="$(<$file)" echo "$content"   Which gives me a context variable as output (so, exactly the contents of the file):  * foo \/-!~ FOO=${FOOBAR}   But, how can I:   Let ${FOOBAR} be set to "SUCCESS" as defined above but do not touch the rest? Set an environment variable TEST  which would have content as (1)?

Is there an easy way to substitute/evaluate environment variables in a file? Like let's say I have a file config.xml that contains:  <property>     <name>instanceId</name>     <value>$INSTANCE_ID</value> </property> <property>     <name>rootPath</name>     <value>/services/$SERVICE_NAME</value> </property>   ...etc. I want to replace $INSTANCE_ID in the file with the value of the INSTANCE_ID environment variable, $SERVICE_NAME with the value of the SERVICE_NAME env var. I won't know a priori which environment vars are needed (or rather, I don't want to have to update the script if someone adds a new environment variable to the config file). Thanks!


Let I, J, K be three ideals in a commutative ring R with unity.    If R is ring of integers then above equation holds.    I know the equation do not hold for arbitrary ring.  Can you give me an example of a Ring R where the equation does not hold?   Note that There is famous modular law.  I am not  saying that.  In modular law there is a condition I contains J or K.  Here I omit that condition  Thanks....

Can anyone provide a simple concrete example of a non-arithmetic commutative and unitary ring (i.e., a commutative and unitary ring in which the lattice of ideals is non-distributive)?


I just signed up with a travel credit card that has a benefit of an annual $100 voucher for Global Entry or TSA Precheck application fees.  My question is, should both myself and my spouse apply?  Or is it effective if the person who travels singly for work more often applies, can the other join them when traveling together?

If I have  (i.e. I have a KTN from TSA and the "pre-check" logo gets printed on my boarding pass) and a travel companion does not, can they go with me through the PreCheck security lines? This is assuming that the travel companion is booked in the same reservation on the same flights and is also a U.S. citizen and not on any no-fly or otherwise increased scrutiny lists.  I'm guessing the answer is no, but I haven't seen anything from TSA specifically addressing this.


By 2013 the theoretical and practical courses are organized   Is it already organized or is it about to get organized? I mean, is it past or future?

In news papers we see headings like this  "India signs a pact with Russia" "Sachin hits another century" "Obama wins presidential election"  These are completed events, aren't they? Then, why are these sentences not mentioned in past tense?


I have a php script that connects to an external API returns some data and updates a database table. I can run this directly via my command line / SSH terminal and it works fine (takes about 5 minutes to complete).  Using crontab I have 'cronned' this script so it runs every three hours using the command below:  0 */3 * * * /usr/bin/php /var/acme/cron/api_update_db.php   Using the syslog I can see that this cron has run, but it would appear that the cron is actually running every three hours as expected however the database doesn't appear to have been updated? But when I run the exact same script manually myself by navigating to that directory & entering the following it runs (and updates the DB)  php api_update_db.php   Would there be a reason for this executing differently when running from the cron job then when run manually from the terminal (which appears to work).

This is a  about using cron & crontab.   You have been directed here because the community is fairly sure that the answer to your question can be found below. If your question is not answered below then the answers will help you gather information that will help the community help you. This information should be edited into your original question.  The answer for 'Why is my crontab not working, and how can I troubleshoot it?' can be seen below.  This addresses the cron system with the crontab highlighted.


Introduction:  I have been creating a simple wrapper classes. I randomly found out that (or it appears to be) an inline function still compiled into a function call. I created an example class to test things out and this is what I found:  Consider the following class:   //compile with MSVC class InlineTestClass { public:     int InternalInt;      int         GetInt()        {return InternalInt;}     inline int  GetInt_Inl()    {return InternalInt;}                     //__forceinline -Forces the compiler to implement the function as inline     __forceinline int  GetInt_ForceInl()  {return InternalInt;}  };   This class has 3 functions for reference.    The GetInt function is a standard function.  The GetInt_Inl function is an inline function. The GetInt_ForceInl function is an ensured inline function in case of the  compiler deciding not to implement GetInt_Inl as inline function   Implemented like so:  InlineTestClass itc; itc.InternalInt = 3; int myInt;  myInt = itc.InternalInt;       //No function myInt = itc.GetInt();          //Normal function myInt = itc.GetInt_Inl();      //Inline function myInt = itc.GetInt_ForceInl(); //Forced inline function   The resulting assembler code of the setting of myInt (taken from dissassembler):         451        myInt = itc.InternalInt; 0x7ff6fe0d4cae  <+0x003e>         mov     eax,dword ptr [rsp+20h] 0x7ff6fe0d4cb2  <+0x0042>         mov     dword ptr [rsp+38h],eax         452        myInt = itc.GetInt(); 0x7ff6fe0d4cb6  <+0x0046>         lea     rcx,[rsp+20h] 0x7ff6fe0d4cbb  <+0x004b>         call    nD_Render!ILT+2125(?GetIntInlineTestClassQEAAHXZ) (00007ff6`fe0d1852) 0x7ff6fe0d4cc0  <+0x0050>         mov     dword ptr [rsp+38h],eax         453        myInt = itc.GetInt_Inl(); 0x7ff6fe0d4cc4  <+0x0054>         lea     rcx,[rsp+20h] 0x7ff6fe0d4cc9  <+0x0059>         call    nD_Render!ILT+1885(?GetInt_InlInlineTestClassQEAAHXZ) (00007ff6`fe0d1762) 0x7ff6fe0d4cce  <+0x005e>         mov     dword ptr [rsp+38h],eax         454        myInt = itc.GetInt_ForceInl(); 0x7ff6fe0d4cd2  <+0x0062>         lea     rcx,[rsp+20h] 0x7ff6fe0d4cd7  <+0x0067>         call    nD_Render!ILT+715(?GetInt_ForceInlInlineTestClassQEAAHXZ) (00007ff6`fe0d12d0) 0x7ff6fe0d4cdc  <+0x006c>         mov     dword ptr [rsp+38h],eax   As shown above the setting (of myInt) from the member of InlineTestClass directly is (as expected) 2 mov instructions long.  Setting from the GetInt function results in a function call (as expected), however both of the  GetInt_Inl and GetInt_ForceInl (inline functions) also result in a function call.   It appears as if the inline function has been compiled as a normal function ignoring the inlining completely (correct me if I am wrong).  This is strange cause according to :     The inline and __inline specifiers instruct the compiler to insert a   copy of the function body into each place the function is called.   Which (I think) would result in:  inline int  GetInt_Inl() {return InternalInt; //Is the function body} myInt = itc.GetInt_Inl(); //Call site   //Should result in myInt = itc.InternalInt; //Identical to setting from the member directly   Which means that the assembler code should be also identical to the one of setting from the class member directly but it isn't.  Questions:   Am I missing something or implementing the functions incorrectly? Am I interpreting the function of the inline keyword? What is it? Why do these inline functions result in a function call?

While it would be very convenient to use inline functions at some situations,  Are there any drawbacks with inline functions?  Conclusion:  Apparently, There is nothing wrong with using inline functions.  But it is worth noting the following points!   Overuse of inlining can actually make programs slower. Depending on a function's size, inlining it can cause the code size to increase or decrease. Inlining a very small accessor function will usually decrease code size while inlining a very large function can dramatically increase code size. On modern processors smaller code usually runs faster due to better use of the instruction cache.  The speed benefits of inline functions tend to diminish as the function grows in size. At some point the overhead of the function call becomes small compared to the execution of the function body, and the benefit is lost  There are few situations where an inline function may not work:   For a function returning values; if a return statement exists. For a function not returning any values; if a loop, switch or goto statement exists.  If a function is recursive.   The __inline keyword causes a function to be inlined only if you specify the optimize option. If optimize is specified, whether or not __inline is honored depends on the setting of the inline optimizer option. By default, the inline option is in effect whenever the optimizer is run. If you specify optimize , you must also specify the noinline option if you want the __inline keyword to be ignored.


As far as I have seen, there are only field-specific SE's for questions regarding research methods.  I agree, that it makes sense to ask question about research design and methodology in context of the field of study.  But when studying research methods and research design in preparation for future studies, I am facing a domain of it's own. The literature about research methods is mostly not bound to any field (with some exceptions of really field-specific methods).  This concerns many questions regarding (among others):   Interview design and interview practice, survey design, coding practices, instruments and instrument design, item design Adequate sample sizes, anonymizing data and sensitive data, proper Evaluation Validity, reliability, economy of testing Research ethics and unethical research design   Where would those questions be asked, if not bound to any specific field of study? If there is none, would it make sense to have one like "Research Methods"?  Update:  As I can see there are two pages close to the described above -  and .  While as I can see, Academia is related a lot regarding every day questions of an academic - ranging from juridical and administrative to professional career related questions.  Open science looks very focused on strategies and QA to make Science more accessible in general, like open journals, licensing, publishing and documentation/transparency of research.  Both sites focus in my opinion on other content than research methodology. If nobody has an interest against a proposal, I would tend create one at Area51.

I have an idea or subject that should have a Q&A, and want to propose a new site. How can I do this?  Related:


When replacing a light switch and fixture, I noticed there were only 2 wires...red/black connected to the switch. The new fixture has a black/white/ground. What is the proper way of connecting? The wires are the original red/black that went to the single pole switch. The fixture is a new light attaching to wall.

I'm installing a brand new motion activated security light to an existing box on my garage. After removing the old light, I notice it only has white/black wiring while the new light fixture has of course white/black/green (ground) wires to attach. What do I do if no ground wire is available with the old box?


My goal is to search a multi-tree structure to see which item matches the name I am looking for. I am doing this by implementing an interface I made named SearchByName in every class I need to search in.  The way my data is contained is that I have an ArrayList called parties comprised of Party objects that each have a name in an object called the cave, each Party has an ArrayList called members comprised of Creature objects that each have a name, and each creature has an ArrayList called artifacts comprised of Artifact objects that each posses a name;   Every time I search the search returns null even when there should be a match.  This is my code for performing the search:  for ( Party p : SorcerersCave.theCave.parties ){                 SearchableByName foundItem = p.searchByName( name );                 if ( foundItem != null ) {                     GenerateInterface.theGame.printOutput( "\t" + foundItem );                 } else {                     GenerateInterface.theGame.printOutput( "Item NOT FOUND" );                 }                 break;             }   This is the interface I am implementing:  interface SearchableByName { public SearchableByName searchByName (String name ); public String getName();   }  this is the interface being implemented in Party:  public SearchableByName searchByName ( String n ) {     if ( getName() == n ) {         return this;     } else {         for ( Creature c : members ) {             SearchableByName found = c.searchByName( n );             if ( found != null ) {                 return found;             }         }     }     return null; }   This is the interface being implemented in Creature:  public SearchableByName searchByName ( String n ) {     if ( getName() == n ) {         return this;     } else {         for ( Artifact a : artifacts ) {             SearchableByName found = a.searchByName( n );             if ( found !=null ) {                 return found;             }         }     }     return null; }   And finally I implement the interface in Artifact:  public SearchableByName searchByName ( String n ) {     return ( getName() == n ) ? this : null; }   This is my first time trying to searching into the classes rather than do everything at the top level.

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?


Let's suppose there exists a standard that documents fruits. This standard has already accepted apple and peach. Banana has just been accepted as a standard. When I say:  The proposal of banana has just been accepted as a standard.  How should banana be written? In quotes ("banana") or in italic (banana)? Because it is not the fruit banana that entered the standard, but the word.

If I want to mention the word "furlong", for example, should I use furlong, "furlong", or 'furlong'? Also, am I correct in putting the punctuation outside the quotes?


What is the difference between these two?  From my understanding:  I hope I will not regret this - this means he has hope that in the future he will not regret something he has done (or will do).  I hope I do not regret this - because of using "hope" before "don't" it seems he is referring to future as well (if I understand that correctly). I can't see a difference in meaning from the first one.  So do they actually mean the same or there is a difference?

What is the difference between "Hope you don't mind" and "Hope you won't mind"? What could be a contextual difference between the two? In a situation like the following, which one seems more appropriate?        Expect me to knock on your door sometimes. Hope you don't mind -or- Hope you won't mind (my knocking on your door)


I have a list of dictionaries in python. I want to update one key:value pair for all the dicts with unique values but instead all of them are getting the same value.  Here's my code:  num_cntxts=4 pkt_eop   =[{'type' : 'eop', 'number':1}] pkt_eop_pattern = pkt_eop*num_cntxts  #I want to add a 'cntxt' key to each of the 4 dicts #which should have the value as the list position  for i,pkt_eop_inst in enumerate(pkt_eop_pattern):    print i,pkt_eop_inst    pkt_eop_inst['cntxt']=i  >0 {'cntxt': 0, 'type': 'eop', 'number': 1} 1 {'cntxt': 2, 'type': 'eop', 'number': 1} 2 {'cntxt': 4, 'type': 'eop', 'number': 1} 3 {'cntxt': 6, 'type': 'eop', 'number': 1}  The print statement shows the individual dict elements but the result is:   >pkt_eop_pattern '[{'cntxt': 6, 'type': 'eop', 'number': 1}, {'cntxt': 6, 'type': 'eop', 'number': 1}, {'cntxt': 6, 'type': 'eop', 'number': 1}, {'cntxt': 6, 'type': 'eop', 'number': 1}]   What I wanted was the pkt_eop_pattern to match the print output:  >pkt_eop_pattern '[{'cntxt': 0, 'type': 'eop', 'number': 1}, {'cntxt': 2, 'type': 'eop', 'number': 1}, {'cntxt': 4, 'type': 'eop', 'number': 1}, {'cntxt': 6, 'type': 'eop', 'number': 1}]   When I iterate over the list, I expected to get a pointer to each dict. However, that is not the case since all elements are taking the value of the last iteration.

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


Let $K$ be an algebraically closed field and $I \subseteq K[X_1, \ldots, X_n]$ be a zero-dimensional ideal, i.e. the set $V(I)$ is finite. This is equivalent to $\text{dim}_K (K[X_1, \ldots, X_n]/I)<\infty$. But the proof I know for this equivalence does not highlight any relation between $V(I)$ and $\text{dim}_K (K[X_1, \ldots, X_n]/I)$. I found recently that, in fact, one has the following inequality: $$\# V(I) \le \text{dim}_K (K[X_1, \ldots, X_n]/I)$$ Here $\# V(I)$ denotes the number of points in $V(I)$. I am trying to prove this result. I know that the dimension of $K[X_1, \ldots, X_n]/I$ over $K$ is precisely the number of monomials from $K[X_1, \ldots, X_n]$ which do not belong to the initial ideal of $I$ (the classes of these monomials modulo $I$ form a $K$-basis of the vector space $K[X_1, \ldots, X_n]/I$). How can I relate these monomials with the number of solutions $(x_1, \ldots, x_n)$ of the set of equations $\{f(x_1, \ldots, x_n) = 0 \ | \ f\in I \}$?

Let $K$ be a field and let $R$ be a $K$-algebra with unity which is finite dimensional as a $K$-vector space. Prove that $R$ has only finitely many prime ideals all of which are maximal. (Hint: Chinese remainder theorem)   My attempt: We have $R \simeq K^n$, for some $n$, as vector spaces. I claim that there are finitely many ideals of $K^n$. Let $I$ be an ideal of $K^n$ and $(a_1, a_2,...,a_n) \in I$. For every entry $a_i$, we have two choices, either $a_i=0$ or not.  So we get $2^n$ many cases, and any case give a particular ideal of $K^n$ which are distinct from others.  Is my proof correct or am I missing some point? If it is true, how can we give a proof by using the Chinese remainder theorem? Thanks!


In the pgfplots groupplot below, I have three sets of data represented by data1, data2 and data3. Each of the data have three subtypes. And I need to plot a graph for each of the subtype. The file data1.dat has data for all the three subtypes. So I manually strip the file into three files as data1-1.dat, data1-2.dat and data1-3.dat.   Is it possible to avoid manually splitting the file and refer to parts of the file. For example to access type1 of data1, I can refer to the first n lines of data1.dat file and to access type2 of data1, I can refer to the next n lines of the same file. The # of lines for each subtype is constant.  \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.10} \usetikzlibrary{matrix,pgfplots.groupplots}  \begin{document} \begin{figure*} \centering \begin{tikzpicture}[scale=1.0, transform shape]     \begin{groupplot}[group style={group size= 1 by 3},height=5.9cm,width=8cm,xmode=log,log basis x={2}]         \nextgroupplot[ylabel={Type 1},xtick=data]                 \addplot[red,semithick,mark=triangle]   table{Data/data1-1.dat};    \label{plots:data1}                 \addplot[blue,semithick,mark=asterisk]  table{Data/data2-1.dat};    \label{plots:data2}                 \addplot[green, semithick,mark=o]           table{Data/data3-1.dat};  \label{plots:data3}                 \coordinate (top) at (rel axis cs:0,1);% coordinate at top of the first plot         \nextgroupplot[ylabel={Type 2},xtick=data]                 \addplot[red,semithick,mark=triangle]   table{Data/data1-2.dat};                 \addplot[blue,semithick,mark=asterisk]  table{Data/data2-2.dat};                 \addplot[green, semithick,mark=o]           table{Data/data3-2.dat};         \nextgroupplot[xlabel={Input in powers of 2},ylabel={Type 3},xtick=data]                 \addplot[red,semithick,mark=triangle]   table{Data/data1-3.dat};                 \addplot[blue,semithick,mark=asterisk]  table{Data/data2-3.dat};                 \addplot[green, semithick,mark=o]           table{Data/data3-3.dat};                                 \coordinate (bot) at (rel axis cs:1,0);% coordinate at bottom of the last plot     \end{groupplot}     \path (top-|current bounding box.west)-- node[anchor=south,rotate=90] {\small Throughput} (bot-|current bounding box.west);     \path (top|-current bounding box.north)-- coordinate(legendpos) (bot|-current bounding box.north);     \matrix[matrix of nodes, anchor=south, draw, inner sep=0.2em, draw] at ([yshift=1ex]legendpos)     {         \ref{plots:data1}& data1&[5pt]         \ref{plots:data2}& data2&[5pt]         \ref{plots:data3}& data3\\     }; \end{tikzpicture} \label{fig:throughput} \end{figure*} \end{document}   Output:

When using pgfplots, is there a way to plot only the first n rows of a given table ?  Considering the following MWE file:  \documentclass[tikz]{standalone}  \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=newest} \usepackage{amsmath}  \begin{document}      \begin{tikzpicture}         \begin{axis}[%             width=16cm,height=8cm,             view={-45}{65},             scale only axis,             xmin=200,xmax=500,             xlabel={data1},             ymin=0,ymax=100,             ylabel={data2},             zmin=0,zmax=1,             zlabel={data3},         ]         \addplot3 [             thick,smooth,             color= darkgray,             solid]             table[row sep=crcr] {                 250 0 0\\                 250 25 0.2\\                 250 50 0.3\\                 250 75 0.2\\                 250 100 0\\             };          \addplot3 [             thick,smooth,             color= darkgray,             solid]             table[row sep=crcr] {                 450 0 0.5\\                 450 25 0.1\\                 450 50 0\\                 450 75 0.1\\                 450 100 0.5\\             };         \end{axis}     \end{tikzpicture}% \end{document}   How can I plot only the first n=4 rows of each table and ask pgfplots to stop reading the table once this row is reached ?  Of course, for the above example, this seems useless, but when huge data tables are used, this could be extremely usefull, in particular to use the same data and focus on different parts of the table in different figures.


This question is an attempt to resuscitate , which was recently deleted by its author for reasons unknown to Yours Truly. The question runs as follows:  given the polynomial $X^3 + 3X^2 + cX + 3 \in \Bbb F_5[X], \tag 1$ find all $c \in \Bbb F_5 \tag 2$ such that $F_5[X]/(X^3 + 3X^2 + cX + 3)$ is a field. Various approaches to this problem have been made in the linked citing; my own solution is presented below in my answer. Note Added in Edit, Monday 15 June 2020 6:53 PM PST:  In light of some of the comments, I would like to address the issue of differences/similarities between this question and the one linked in the above. End of Note.

I am stuck with the problem :  Find all values of 'c' in $F_{5}=\frac{\mathbb{Z}}{5\mathbb{Z}}$  such that the quotient ring $\frac{F_{5}}{⟨X^3 + 3X^2 + cX + 3⟩}$ is a field. Justify your answer.  My approach was, we've got a theorem for commutative ring R that if I is a maximal ideal in R then R/⟨I⟩ is a field. Now to prove $⟨X^3 + 3X^2 + cX + 3⟩$ is a maximal ideal in the given field we need to show that this is irreducible. So, I think for the set of values of 'c' for which this polynomial is irreducible, will be the set for which the above quotient ring is a field. But I don't know how to find all the values of 'c' for which $⟨X^3 + 3X^2 + cX + 3⟩$ is irreducible except to try each value of 'c' individually and then use some irreducibility test. Is there a proper and simpler way to find such 'c'. Please help me in finding such values.


Is it legal to copy stats and abilities of characters from another game?.Please note that my game does have a similar gameplay to the game I am copying. My characters will look different of course.

Most games build on other games' successes and many are downright clones. Where is the limit of imitation before legal issues come into play? Is it down to literary or graphic work like characters and storyline that cause legal problems, or can someone actually claim to own gameplay mechanics?  There are so many similar clone games out there that the rules are probably very slack or nonexistent, but I'd like to hear the views of more experienced developers / designers.


I want to classify the slope of the DEM data, by dividing the slope by 4 classes: flat, ramps, steep, very steep.  How to do this with QGIS?

I'm using QGIS. I want a raster layer with 6 different colors each color representing a certain value range (e.g. -1 to 0 red, 0 to 0.2 orange).  In the layer style menu I can only approximate colors.


Currently, I have 2 Seagate HDDs that are bad and I want to know how the Seatools, or another application, deal with these bad sectors. As far as I know, bad sectors are some tiny sectors of the disk itself that are not possible to be accessed anymore. But when I "fix" these sectors, what really happens? The tool "says" to the Windows (or another system) that these sectors could not be used anymore and skip them? Or this information about the sectors to be skipped is stored in the firmware/HDD itself? If I format an HDD with bad sectors and then run the application that "fix" bad sectors and after I format again, this information about sectors to skip will be lost? A full format with 0/1 erases this information? If I "fix" an HDD and then move it to another OS, or even to a PS3/PS4, this new OS will try to use these sectors?

My old laptop has become utterly slow and unresponsive to the extent that after loading it takes a good 30-40 mins before I can even use it. It's mostly in an unresponsive state and doesn't change even if I do a hard restart. I did a SMART test and it shows my hard disk is 58% healthy.   I read somewhere on a forum that the OS or the NTFS disk itself will mark bad sectors and wouldn't write to them. So my question is, my disk is 750 GB, 58% of which is 435GB. My total data on the disk is roughly 300 GB. But I think the hard disk may still be reading/writing to those bad sectors and thus my system is not responsive. So my question is, can I do something in order to block all those bad sectors and use the left over good sectors only ? Most importantly, will it be a good idea in first place or should I just replace the old hard drive?   Note: This is an old computer and I only use it occasionally to stream movies on my tv via hdmi.


If a single SQL file contains 2 SQL statements below each other (as below) for millions of records  Query 1 : select Id into MyTempTable from TableB b join abc a on a.Id = t.Id   Query 2 :  Update TableB set Completed =1  Is there any chance that query 2 will execute first for some of the records or do we have a guarantee of sequential execution of those statements?  In another words, will Query 2 execution be started only after Query1 finishes?

If I have a batch of two different SELECT statements, is it possible for them to be executed in parallel (if the SQL Optimizer deems it to be the most efficient execution method)?  If the first SELECT statement is selecting into a temp table and the second SELECT statement is then inserting into that same temp table, does that prevent it from being possible for the two statements to be ran in parallel?  (I'm guessing the answers are yes and yes :).


I need to know how to detect when a player dies in vanilla Minecraft, because I want to make blood using commands. Thanks for answering if you do. NOTE: I need the COMMAND for detecting a player death. I'm experienced with /scoreboard.

As seen in this video: (Skip to 5:53)  When a player is slain, they drop an Enchanting Table on top of their inventory.  How was this achieved and how can I build a system (using command blocks) that does that? Come to think of it, what happens to a player's location when he/she dies? Does it reset to the spawnpoint? Stay the same (where they died) until they respawn? Or becomes a null value until they respawn?


I want to use my PC broad band Internet in my android device using USB cable because my pc has not any Fifi or blue-tooth so I want to connect with standard USB cable and Used my pc Internet. if any suggestion then let me know.

I'm using Android 4.4.2 (on ). I've a Windows PC at home which has highspeed broadband internet connection. I don't have wireless router or access point. I just want to use PC's internet connection on my phone. I've tried multiple methods but none seems to work.  Method 1: Using native Android 4.4.2 option  In my phone when I connect my phone, in Settings > Wireless & networks > USB Internet (sharing Windows PC internet via USB cable) checkbox, which I checked then it asked me to choose my Windows version (which is Windows 8.1 but since it didn't show that option) I chose Windows 8.  It gives me further instructions as showing in the following picture:    Here is the problem, there is no sharing tab (see the following screen shot)   Method 2: As described in   I learned on this site that it is called Reverse tethering. I read and followed the procedure mentioned in    I followed all the steps described in that answer, until executing the command.   Install USB drivers from Android SDK [DONE] Connect USB cable and activate USB Tethering (You should see on a new network interface.) [DONE] Bridge the 2 network interfaces [DONE] On your computer execute adb shell netcfg usb0 dhcp [PROBLEM]   When I execute adb shell netcfg usb0 dhcp it says: error: device not found. I tried the same thing with USB Debugging in Developer settings, ON & OFF. The error remains the same.  Method 3: Rooting the device and using an app  I read here and there that there is another method, in which we can directly use an app but it requires rooting the device. My phone is a new phone and warranty becomes void if I root it.   EDIT: I've tried the method suggested in answer, at the 4th step of method 2, I'm facing this problem:


int main() {      unsigned int nr, mask;      printf("nr = ");   //for eg. if i use number 11111111 or 00111111 it prints 0.      scanf("%hu", &nr);      if ((nr & 0b00001000) == 0)         printf("0\n\n");     else         printf("1\n\n");  mask = 0b00001000;      if (nr & mask)         printf("1\n");     else         printf("0\n");      printf("%x", nr);      return 0; }  I can set a reset a bit using a mask like this 00001000 & nr(10101010) with the "1" placed so the 4th bit will be rest, but again it doesn't work ( I don't know why). But I have no idea how to print the number after.

How do you set, clear, and toggle a bit?


how do we interpret this regression coefficient of mastitis (1.1) as an effect on Milk yield

The help pages in R assume I know what those numbers mean, but I don't. I'm trying to really intuitively understand every number here. I will just post the output and comment on what I found out. There might (will) be mistakes, as I'll just write what I assume. Mainly I'd like to know what the t-value in the coefficients mean, and why they print the residual standard error.   Call: lm(formula = iris$Sepal.Width ~ iris$Petal.Width)  Residuals:      Min       1Q   Median       3Q      Max  -1.09907 -0.23626 -0.01064  0.23345  1.17532    This is a 5-point-summary of the residuals (their mean is always 0, right?). The numbers can be used (I'm guessing here) to quickly see if there are any big outliers. Also you can already see it here if the residuals are far from normally distributed (they should be normally distributed).  Coefficients:                  Estimate Std. Error t value Pr(>|t|)     (Intercept)       3.30843    0.06210  53.278  < 2e-16 *** iris$Petal.Width -0.20936    0.04374  -4.786 4.07e-06 *** --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1    Estimates $\hat{\beta_i}$, computed by least squares regression. Also, the standard error is $\sigma_{\beta_i}$. I'd like to know how this is calculated.  I have no idea where the t-value and the corresponding p-value come from. I know $\hat{\beta}$ should be normal distributed, but how is the t-value calculated?  Residual standard error: 0.407 on 148 degrees of freedom   $\sqrt{ \frac{1}{n-p} \epsilon^T\epsilon }$, I guess. But why do we calculate that, and what does it tell us?  Multiple R-squared: 0.134,  Adjusted R-squared: 0.1282    $ R^2 = \frac{s_\hat{y}^2}{s_y^2} $, which is $ \frac{\sum_{i=1}^n (\hat{y_i}-\bar{y})^2}{\sum_{i=1}^n (y_i-\bar{y})^2} $. The ratio is close to 1 if the points lie on a straight line, and 0 if they are random.  What is the adjusted R-squared?  F-statistic: 22.91 on 1 and 148 DF,  p-value: 4.073e-06    F and p for the whole model, not only for single $\beta_i$s as previous. The F value is $ \frac{s^2_{\hat{y}}}{\sum\epsilon_i} $. The bigger it grows, the more unlikely it is that the $\beta$'s do not have any effect at all.


I am using Perl for the first time and I need to do the following:   Parse two separate timestamp strings which are in the format YYYY/mm/dd HH:MM:SS:NNNNNN. The timezone of both strings is assumed to be EST. For example, both strings are:  "2018/03/24 12:11:57:123456" "2018/03/26 13:10:57:123456"  Convert the timezone of the above two into a different timezone, say GMT, then print them out. Find the differences, in hours, of the above two timestamps.   Is it possible to achieve the above with the Time::Piece module? I have looked through this web site:    It shows me how to achieve my first objective, the parsing. But so far I am not able to find out how to convert from one timezone to another, and also the difference in hours between two timestamps.  Thanks.

I've used the  function in Perl to get the current date and time but need to parse in existing dates. I have a GMT date in the following format: "20090103 12:00" I'd like to parse it into a date object I can work with and then convert the GMT time/date into my current time zone which is currently Eastern Standard Time. So I'd like to convert "20090103 12:00" to "20090103 7:00" any info on how to do this would be greatly appreciated.


I'm wondering if tree based methods are capable of making predictions that are larger in magnitude than the largest training observations? Given my understanding of decision trees and partitioning feature space, I would guess it's not possible for predictions from GBMs or Random Forests to exceed the largest values found in training data. Assuming the above is true, how do modelers deal with these tree-based limitations. If tree based algorithm predictions are bounded by what's observed in training data, I would imagine this would result in prediction problems for applications where unprecedented values are feasible. Other than employ a different algorithm, is there a different way to handle this boundedness of predictions?

I've noticed that when building random forest regression models, at least in R, the predicted value never exceeds the maximum value of the target variable seen in the training data. As an example, see the code below. I'm building a regression model to predict mpg based on the mtcars data. I build OLS and random forest models, and use them to predict mpg for a hypothetical car that should have very good fuel economy. The OLS predicts a high mpg, as expected, but random forest does not. I've noticed this in more complex models too. Why is this?   > library(datasets) > library(randomForest) >  > data(mtcars) > max(mtcars$mpg) [1] 33.9 >  > set.seed(2) > fit1 <- lm(mpg~., data=mtcars) #OLS fit > fit2 <- randomForest(mpg~., data=mtcars) #random forest fit >  > #Hypothetical car that should have very high mpg > hypCar <- data.frame(cyl=4, disp=50, hp=40, drat=5.5, wt=1, qsec=24, vs=1, am=1, gear=4, carb=1) >  > predict(fit1, hypCar) #OLS predicts higher mpg than max(mtcars$mpg)       1  37.2441  > predict(fit2, hypCar) #RF does not predict higher mpg than max(mtcars$mpg)        1  30.78899


I recently read The Elegant Universe by Brian Greene to understand more about relativity, quantum mechanics, and the conflict between them. What it says is that "the notion of a smooth spatial geometry, the central principle of general relativity, is destroyed by the violent fluctuations of the quantum world on short distance scales". I still don't understand why this is. Why can't small scales be random and with quantum foam, but when you zoom out, space curves smoothly like relativity predicts?

I see a lot of questions in various sites about why the 2 theories are or aren't  incompatible, I'm satisfied as to why that's the case.  However it has been mentioned that both theories make predictions about phenomena that contradict or are incompatible, and I've been unable to find any examples.  What are the conflicting/contrary/incompatible predictions made by General Relativity versus Quantum Mechanics? Or are the claims false?


I searched for ki with * as per the example below and it should have returned the first three lines. I am not sure why it returns the last line when there is no ki matching it.  $ grep "ki*" trial_file.txt kartik,27,Bangalore,Karnataka pulkit,25,Bangalore,Karnataka kit,28,Bangalore,Karnataka kush,24,Pennsylvania,Philadelphia

If I grep a document that contains the following:  ThisExampleString  ...for the expression This*String or *String, nothing is returned. However, This* returns the above line as expected.  Whether the expression is enclosed in quotes makes no difference.  I thought the asterisk indicated any number of unknown characters? Why does it only work if it's at the start of the expression? If this is intended behavior, what do I use instead of the expressions This*String and *String?


I have a player who want to play a shaman. He really wants to keep the bard classes but he is much more interested in the druid lore. He doesn't want to be charismatic and handle social interaction, he wants to focus it's music around nature and worship nature-related deities. Therefore he was asking if he can have a bard with wisdom as the incantation  characteristic.   I'm about to say yes, but I'm new and I don't know if there is major balance issues that will come up and that I didn't foresee.

With the exception of multiclassing, is there any big reason that if you were to change the spellcasting ability of a (spellcasting) class it would be a bad idea?  As a specific example: Let's say I was switching Sorcerers from Cha to Wis, what unexpected effects could this have on that class's balance? Additionally let's assume all places in spellcasting where you added your charisma modifier instead you now add wisdom (and vice-versa).


In a relatively short time period I will finally embark on all-grain brewing. I would rather purchase grains online as it is cheaper than the LHBS, but the LHBS won't let me use their crushing equipment unless I bought the grains from them.  I was hoping that there was some hard and fast rules regarding this, like "after 3 days, crushed grains start to lose potency; after 10 days, throw them out."  Does this time frame depend on the type of grain, or are they all about the same?  Is there any (relatively) non-anecdotal evidence in this regard? I.e. did anyone ever purchase 10 pounds of one grain, crush 5 pounds, and brewed n many days later? (Double blind taste tests preferred)

What's the shelf life on crushed specialty grains?


I want the opposite of , i.e., a proof that the equilateral triangle has the least perimeter of all the triangles with a given area. If possible I'd prefer an answer without Lagrange multipliers. I tried to differentiate Heron's formula with respect to $a$ and $b$ mantaining the area constant, but didn't get anything good. Any help would be appreciated. Thanks.

Prove that of all triangles on the same base with same area, the isosceles triangle has the least perimeter (without trigonometry).   I could prove this with trigonometry but couldn't do the same with elementary geometry. I can see that if AB is the common base, then the locus of the third point must be parallel to AB. I cannot understand anything more hence couldn't provide anything more. Just trying to solve a trigonometric problem with geometry. Thanks, in advance, for your solutions.


I am trying to install MS Office 2013 on my ubuntu 16.04 laptop. I have been searching all over the web and haven't found anything useful. Please help!

Can .exe and .msi files (Windows software) be installed in Ubuntu?


Im using a Samsung galaxy s3 mini and my problem is that my phone uses the memory when I have got a sd card which still has got space

I keep getting the "Low on Space: Application data space is low. To free up" [the rest is cut off] message.  I've moved every app I can over to the SD card, cleared the cache, compacted my K9 mail cache.  Advanced Task Killer (ouch!) says I have 98M Available Memory  File Manager says I have 223M/748M (29%) free.  That's not so bad -- but I'm stuck in the no-updates scenario. The market downloads won't really start, gmail won't update, etc. I've rebooted several times, and nothing changes. Aaaargh.  What can be done, other than uninstalling everything ?


As of now I use Windows 10 Pro, and it is "ok". Recently, I used Ubuntu, because I crosscompiled Kernel for my Raspberry Pi. And although it was installed on a SPINNING hard disk, it felt more responsive and snappier than my Windows 10 Pro installation on an SSD. So now I want to make my now exclusively Windows 10 SSD a Dual-Boot system. I have enough space, but what I want to know if there is anything that could go wrong, and if I should mirror my SSD just to have a backup, in case something fails. TL;DR: I want to convert a Windows 10 Pro installation into a Ubuntu/Windows Dual-Boot system. What could go wrong? How high is the risk of failure? Is mirroring the drive before installation recommend?

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'm using ubuntu 13.10 but i want to install windows so, i downloaded a windows iso  but how to Make bootable disk/usb in ubuntu 13.10 of windows iso

I'd like to create a Windows bootable USB stick, but I don't have a Windows machine with me at the moment to do so. How could I achieve the same using Ubuntu?


I've been upgrading my ssh keys on all my machines, and came across a bit of weirdness with ssh-add.  If I create an ed25519 key and then try to ssh-add it fails. If I take the original rsa key, and convert it with ssh-keygen then ssh-add it works.  reproduce the problem  # ssh-keygen -t ed25519 -a 256 Generating public/private ed25519 key pair. Enter file in which to save the key (/home/trevor/.ssh/id_ed25519):  Enter passphrase (empty for no passphrase):  Enter same passphrase again:  Your identification has been saved in /home/trevor/.ssh/id_ed25519. Your public key has been saved in /home/trevor/.ssh/id_ed25519.pub.   Now lets try to add it.  $ ssh-add Enter passphrase for /home/trevor/.ssh/id_ed25519:  Could not add identity "/home/trevor/.ssh/id_ed25519": communication with agent failed   If I try to add a normal rsa key it works  # ssh-add Enter passphrase for /home/trevor/.ssh/id_rsa:  Identity added: /home/trevor/.ssh/id_rsa (/home/trevor/.ssh/id_rsa)   Have I found a bug with ssh-add or is it a problem with Ubuntu.  Running all the above on Ubuntu 16.04LTS  apt list --installed | grep ssh libssh-4/xenial,now 0.6.3-4.3 amd64 [installed,automatic] libssh-gcrypt-4/xenial,now 0.6.3-4.3 amd64 [installed,automatic] libssh2-1/xenial-updates,xenial-security,now 1.5.0-2ubuntu0.1 amd64 [installed,automatic] openssh-client/xenial-security,now 1:7.2p2-4ubuntu2.1 amd64 [installed,upgradable to: 1:7.2p2-4ubuntu2.2] openssh-server/xenial-security,now 1:7.2p2-4ubuntu2.1 amd64 [installed,upgradable to: 1:7.2p2-4ubuntu2.2] openssh-sftp-server/xenial-security,now 1:7.2p2-4ubuntu2.1 amd64 [installed,upgradable to: 1:7.2p2-4ubuntu2.2] ssh-askpass/xenial,now 1:1.2.4.1-9 amd64 [installed] ssh-import-id/xenial,xenial,now 5.5-0ubuntu1 all [installed,automatic] sshpass/xenial,now 1.05-1 amd64 [installed,automatic]   Doing this on RHEL v7 has no issues.

I just updated my ssh key and added a passphrase, however it constantly nags me for it now, such as when I do a git (or mercurial hg) push.  ssh-agent is running:  xxx  1303  1118  0 09:16 ?  00:00:00 /usr/bin/ssh-agent    /usr/bin/dbus-launch --exit-with-session     /usr/bin/im-launch mate-session   I tried ssh-add:  > ssh-add Identity added: /home/…/.ssh/id_rsa (/home/…/.ssh/id_rsa) Enter passphrase for /home/…/.ssh/id_ed25519:  Could not add identity "/home/…/.ssh/id_ed25519":      communication with agent failed   What is missing?  16.04 Ubuntu Mate, in case it matters.


Ubuntu 20.04, I wanted to use Ubuntu Studio file icons, so I installed some packages, (so I can change file icons in Gnome Tweak Tool)but the boot flash screen now displays Ubuntu Studio, what is the package to remove so it goes back to Ubuntu?

With regards to Plymouth --  Are there alternative boot screens available?  What's the easiest way to change the boot screen?


My server is constantly being flooded and I am looking to limit the connections. I want to do this at the server level (because I have multiple websites) but every now and then I run a cache warm script from a particular IP.   limit_req_zone $binary_remote_addr zone=one:10m rate=30r/m; limit_conn_zone $binary_remote_addr zone=addr:10m; limit_req zone=one; limit_conn addr 10;   How I can do rate limiting but exclude this particular IP (or set of IPs)

I'm able to use limit_req to rate-limit all requests to my server.  However I'd like to remove the rate restriction for certain IP addresses (i.e. whitelist) and use a different rate restriction for certain others (i.e. certain IPs I'd like as low as 1r/s).  I tried using conditionals (e.g. if ( $remote_addr = "1.2.3.4" ) {}) but that seems to work only with rewrite rules, not for rate-limit rules.


Yesterday, I watched an episode of Good Eats, where Alton Brown made broth by pressure-cooking mirpoix and beef for about 50 minutes.  At the end of that time, he discarded the vegetables, stated that they had "given their all," and citing (as proof) the significantly higher level of liquid post-cooking.  This seems to me like a waste. Do these vegetables have any value left (texture, nutrition, something)?  On the other hand, he also stated that the difference between soup and broth can be the addition of chunks of the ingredients.

Having made stock and strained it, can the meat and vegetables boiled up in the stock be used for anything, or should they go in the bin?


Something like  Click here.
Button
 /* when pressed, "href" link changes */   And when the button is pressed. the "www.somewhere.com" gets changed to a differend URL?  Thanks.

How can you change the href for a hyperlink using jQuery?


I took the following photographs of sunset at beach. I know that photographing sun could damage the camera or even eyes, but the intensity of the sun light at the time I captured it was so weak that I could directly look at the sun and somehow knew it wont be harmful. So my question is: How can we tell if the intensity of the light is low enough so that we can directly point the camera at sun?

I want to experiment taking photos in which the sun appears. I'm afraid of what might happen if I take one with a narrower angle (where sun would be bigger). Can the lens act as a magnifying glass and burn the CCD or CMOS sensor?  Under which circumstances (zoom, exposure, aperture, etc...), can the sensor be damaged by the sun?


I read few responses close to the question and was suggested in using t-test or chi-sq test. However, the pattern between variables can also involve more than 2 variables (e.g. data at x tend to be missing when data at y and z equals to "yes"). Is there any comprehensive package in Python/R to check the type of missingness in a tabular dataset?

I have a large proteomics dataset. In the rows I have the proteins , and in the rows I have the samples.The dataset contains a lot of missing values.  I would like to know I can find out whether missing values are MAR, MCAR, or MNAR, and how I can decide the best imputation technique. Kind regards.


You can use the syntax [tag:navigation] to typeset something that looks like a tag on a post, e.g. . However, certain tags render differently, e.g. the 'compulsory' tags discussion, feature-request, bug, etc., and the 'status' tags, e.g. status-completed. When using the [tag:XXX] syntax these display just the same as usual tags. Could we fix this?

I am wondering because I was editing my profile and I though it would be nice to put the languages I know and stuff like tags.  Is it possible to post a tag? If it's not, do you think it's possible to implement on the profile?  For example:  [c#]   Would generate    With tag formatting and link...


I´ve created a template class an initialized it. Now I wanna call a method from this class but I get a compiler error.  (With the Function TemporaryFunctionForSimulator I successfully split the template class in *.h and *.cpp. So that is NOT THE PROBLEM!)  Error: request for member ‘addEvent’ in ‘simulator’, which is of non-class type ‘Simulator*()’  Simulator.h  #ifndef SIMULATOR_H #define SIMULATOR_H  #include<queue> #include<Event.h>  template<class T> class Simulator {     public:         void addEvent(T t);          Simulator();         virtual ~Simulator();     protected:     private:  };  #endif // SIMULATOR_H   Simulator.cpp  #include "Simulator.h"  #include <functional> #include <queue> #include <vector> #include <iostream>  using namespace std;  template<class T> Simulator<T>::Simulator() { } template<class T> Simulator<T>::~Simulator() {     //dtor } template<class T> void Simulator<T>::addEvent(T t) {     //do something }  // No need to call this TemporaryFunction() function, // it's just to avoid link error. void TemporaryFunctionForSimulator() {     Simulator<int> TempObj(); }   main.cpp      Simulator<int> *simulator();     int t = 5;     simulator->addEvent(t); //error: request for member ‘addEvent’ in ‘simulator’, which is of non-class type ‘Simulator<int>*()’

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 think this is a canonical problem with capacitors, but I'm having difficulty understanding the paradox.  In Purcell's Electricity And Magnetism, problem 3.16 reads:     Calculate the electrical force which acts on one plate of a   parallel-plate capacitor.  The potential difference between the plates   is 10 statvolts, and the plates are squares 20 cm on a side with a   separation of 3 cm.  If the plates are insulated so the charge cannot   change, how much external work could be done by letting the plates   come together?  Does this equal the energy that was initially stored   in the electric field?   I ignored what the original question was asking, and tried calculating the energy stored in the capacitor by letting the distance between the plates slowly decrease to zero and finding the energy released.  To do this, the electric field between the plates in SI units is $E=\frac{\sigma}{\epsilon_0}$.  The electric potential between the plates is $\phi=Ed=\frac{\sigma}{\epsilon_0}d$, where d is the distance between the plates.  Therefore, the energy released by allowing the distance between the plates to slowly decrease to zero is $U=\phi Q$, where $Q=\sigma A$ is the charge on the plate of area $A$.  Altogether, we get   $$U=\frac{1}{\epsilon_o}\sigma^2 A \, d.$$  The result of this calculation is twice as large as the energy stored in the capacitor by summing up differential amounts of charge being displaced from one conductor of the capacitor to the other.  This second calculation is usually done as follows:  $$ U=\int_0^Q\phi\,dq=\int_0^Q\frac{q}{C}\,dq=\frac{1}{2C}Q^2. $$  For a parallel-plate capacitor, $Q=\sigma A$ and $C=\frac{Q}{\phi}=\sigma A\,E\,d=\sigma A\frac{\epsilon_0}{\sigma d}=\frac{A \epsilon_0}{d}$.  Substituting into the above, we get:  $$ U=\frac{1}{2C}Q^2=\frac{1}{2\epsilon_0}\sigma^2 A \, d $$ I'm not sure why the two results contradict each other.  Other websites such as  as well as a post on stack-exchange  seem to indicate that in similar scenarios the energy is dissipated in the form of electromagnetic radiation.  However, in the above example, all of the charges can be moved slowly, meaning that the current can be made infinitesimally small.  Wouldn't this negate the explanation using radiation?  If not, where is the radiation being produced, and can the energy supplied to it be quantified?  Alfred Centauri's answer below points out the mistake that I made in not discounting the electric field of the moving plate when calculating the force on the plate.  As mentioned in some of the comments, a related post  addresses the same system of a parallel plate capacitor with variable separation distance between the plates, but does not mention that only the electric field from the second plate should be used when calculating the energy released by the system.  After reading Centauri's answer, I realized that Purcell derives a formula for the electric field exerted on a layer of charge on page 30 of his book.  Although that layer of charge is part of a spherical charge distribution rather than that of a parallel plate capacitor, he still reaches a similar conclusion to that of Alfred Centauri.  Namely, he finds that the electric field which acts on the layer of charge is the average value of the fields (total electric field) both inside and outside of the layer of charge.  In this case, it ends up being one half of the magnitude of the field inside of the capacitor, since there is no electric field outside of the capacitor.  This was also not mentioned in the other .

In my physics textbook there is an example of using capacitor switches in computer keyboard:     Pressing the key pushes two capacitor plates closer together, increasing their capacitance. A larger capacitor can hold more charge, so a momentary current carries charge from the battery (or power supply) to the capacitor. This current is sensed, and the keystroke is then recorded.   That makes perfect sense, and is kind of neat. What I am curious about, is what happens to that extra charge afterwards. Is there some sort of discharge mechanism? I suppose, that would be also necessary to differentiate between single keystrokes and continuous depression (register stroke current, then register the discharge). What would happen to the capacitor if there was no such discharge mechanism, but its capacitance was suddenly reduced?  If capacitance is reduced, and the charge stays the same, then, according to $Q = C  \Delta V_C$, the difference of potentials on plates of capacitor should increase and exceed that of a power supply thus reversing the current. Is that what is happening, and the keystrokes are recorded by sensing not only the existence of the current, but also its direction?