I was learning about the proc filesystem mechanism and I randomly tried to check the file descriptors of bash itself. Can someone explain what the file descriptor number 255 doing here (like I understand what 0,1,2 mean but I have no idea what 255 is in this case) ?  sc@HP-ProBook:~$ ls -l /proc/11783/fd total 0 lrwx------ 1 sc sc 64 Feb 23 15:40 0 -> /dev/pts/2 lrwx------ 1 sc sc 64 Feb 23 15:40 1 -> /dev/pts/2 lrwx------ 1 sc sc 64 Feb 23 15:40 2 -> /dev/pts/2 lrwx------ 1 sc sc 64 Feb 23 15:48 255 -> /dev/pts/2

While poking around /proc/self folder for my mksh shell,  I found a peculiar thing: in /proc/self/fd/* there are all the standard file descriptors (0 for stdin, 1 for stdout, and 2 stderr) some file descriptors, but also some extra ones - 24, 25, 3. And I technically can list them with a glob in the shell:  $ for fd in /proc/self/fd/* ; do echo $fd ; done                                                       /proc/self/fd/0 /proc/self/fd/1 /proc/self/fd/2 /proc/self/fd/24 /proc/self/fd/25 /proc/self/fd/3   But when I try to stat them or use find on them, they are reported as non-existent.  $ find  /proc/self/fd/*                                                                                /proc/self/fd/0 /proc/self/fd/1 /proc/self/fd/2 find: ‘/proc/self/fd/24’: No such file or directory find: ‘/proc/self/fd/25’: No such file or directory /proc/self/fd/3   Same occurs in bash , but just with just one auxiliary file descriptor.  $ for fd in /proc/self/fd/* ; do echo $fd; done /proc/self/fd/0 /proc/self/fd/1 /proc/self/fd/2 /proc/self/fd/255 /proc/self/fd/3  $ find /proc/self/fd/* /proc/self/fd/0 /proc/self/fd/1 /proc/self/fd/2 find: ‘/proc/self/fd/255’: No such file or directory /proc/self/fd/3   Question is: what are those additional file descriptors? What is their purpose?


I am working with a 500 GB SQL Server database. I need to reduce the size of the database data file after removing a large amount (50%) of the data.  I tried re indexing, it's good the database has de-fragmented. But the DB size is not reduced.  I am not prepared to use shrink database. I have already tried compression and DBCC UpdateUsage but no space gain. Please advise me any other ways to reduce the database size.  Our client will not allow us to take the DB Offline. It might take 5 hr to shrink the database and then re indexing will take 3 hrs, so in total we would need 8 hr down time. I am looking for a solution without downtime.

This question is asked in various forms here but the question boils down to:  I know shrinking a database is risky. In this case, I've removed so much data and I'll never use it again.   How can I shrink my database? What files do I shrink?  What should my considerations be while doing this?  Should I do anything after? What if it is a large database? Can I shrink it in smaller increments?


I updated posts in homepage with query load function. It enables me to show actual posts. However, I have a problem. That is: When I updated all posts without refresh whole page, I want to control element which loaded with load jquery function. I loaded all actual post with this:  $( ".all-posts" ).load("/ .all-posts");   .all-posts element consists of .post-edit class name.  I want to find with this function:  $('.post-edit').click(function(){  alert("found element"); });   I fixed the problem with:  I define function outside of load function and I used it normally and in load function's callback function.

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.


Suppose we have the ring $\Bbb Z[x]$. I tried to find that the ring $\Bbb Z[x]/\langle x^2-1\rangle$ is isomorphic to $\Bbb Z\times\Bbb Z$ or not??? I tried to apply the Chinese Remainder theorem. For it I required that ideals $I=\rangle x+1\langle$ and ideal $J$  generated by $x-1$  must be  comaximal. But unable to get anything. Please anyone tell is above two rings are isomorphic or not??

I have to show that the ring $\mathbb{Z}[X]/(X^2-1)$ is not isomorphic with $\mathbb{Z}\times \mathbb{Z}$.    I know that $(\mathbb{Z}\times\mathbb{Z})^*=\{(\pm1,\pm1)\}$, so I thought I should be looking for elements which have inverses in $\mathbb{Z}[X]/(X^2-1)$ and hopefully find more or less than 4. But I didnt succeed, so I need hints. Thanks.


I utilize Chrome and IE as browsers at work and enjoyed being able to select between them.  I recently set a default browser and would like to undo this setting.

I use Internet Explorer for some things and Chrome for others. I'd like to have a choice when I click on a link of which browser to open the link in. Is this possible in Windows? I am currently running Windows 8, although there should be similarities between versions.  To the best of my knowledge this isn't possible.


I am not a Django programmer but trying to look at how I can change the output of number which is supposed to printed to the page as USD. For example: It prints "Price: 3295000" when I would like it to say "Price: $3,295,000". This is the template part:
Price: {{property.price}}
  What code can I put in the template to output this in the way that I'm looking for?

I'm trying to format numbers. Examples:  1     => 1 12    => 12 123   => 123 1234  => 1,234 12345 => 12,345   It strikes as a fairly common thing to do but I can't figure out which filter I'm supposed to use.  Edit: If you've a generic Python way to do this, I'm happy adding a formatted field in my model.


I have a file named con.php. I tried to remove it through the Windows command line but it returns an error:  Syntax for filename, directory name, or volume label is incorrect.

I have a Windows XP box (NTFS filesystem) on which I found a file named NUL. I have not been able to remove this file in any usual way. The file appears to be owned by Administrator in the SYSTEM group, unlike any other file in the same directory (the other files are owned by my user id).  How do I get rid of this file? Where did it come from?


At what point along its journey did a particular YT-1300 freighter become known as the Millenium Falcon?  Was it named by Han or Lando, or someone else?  Wookieepedia offers no help other than "at some point."

I'm particularly interested in how the "Millennium" part pertains to the ship itself. It wouldn't hurt to explain the "Falcon" part either though.


What is done to worn out balls? Are they recycled, reused or do they end up in the landfill?

When umpire change the cricket ball, was the old ball thrown as waste or keep for reuse?


I have residual plots like the following:  Should I be concerned about the large hump for the higher quantiles on the normal Q-Q plot? Would some sort of a transformation on the response variable help? I am unsure where to go to now. My model is significant.

I am trying to fit a model to predict housing prices. My residual plots look like the following:  Should I be concerned about the large hump for the higher quantiles? Would a transformation on the response variable help?


Situation: I am trying to build a custom validation rule via apex that will stop users from saving a charge item to a quote if the   charge item exceeds the available product quantity. The charge item   being saved is a child of (and has a lookup relationship to) a "Rate   Plan", which is the object that carries the available product quantity   field.      Object that triggers apex: zqu__QuoteCharge__c      Relationship field on QuoteCharge: zqu__ProductRatePlanCharge__c     The trigger is currently in the BEFORE INSERT context, to block users from saving new records. I pass Trigger.new as a parameter to my class/method: z_QuoteChargeTriggerHandler.customValidation(Trigger.new);    In my for() loop, I've added a bunch of System debugs since my if statement wasn't being triggered.   When I System.debug(zqu__ProductRatePlanCharge__c) it returns an Id, so I know the relationship is there.   However, when I System.debug(zqu__ProductRatePlanCharge__r.Ascent_Quantity__c) I return null. Expected: 0.     Ultimate Question: Since I cannot SOQL query this record during BEFORE INSERT (At least, I think so, since the record hasn't been   inserted yet?) How can I reference related objects using the __r   relationship before insert of a new record in the context of   Trigger.new?   Code:  public void customValidation(List<zqu__QuoteCharge__c> newList){     if (newList != null && newList.size() > 0){     List<zqu__ProductRatePlanCharge__c> rpc = new List<zqu__ProductRatePlanCharge__c>(); // create a list per other Stack suggestion         for(zqu__QuoteCharge__c quoteCharge: newList){             if(quoteCharge.Name != 'Discount'){                 rpc.add(quoteCharge.zqu__ProductRatePlanCharge__r); // add to that list?                 System.debug('MM++++ rpc: ' +rpc); // rpc returns null but shouldnt?                 System.debug('MM++++ Charge Name: ' +quoteCharge.Name);                 System.debug('MM++++ Charge Quantity: ' +quoteCharge.zqu__Quantity__c);                 System.debug('MM++++ RatePlan Link: ' +quoteCharge.zqu__ProductRatePlanCharge__c); // returns ID (Lookup, expected)                 System.debug('MM++++ RatePlan Name: ' +quoteCharge.zqu__ProductRatePlanCharge__r.Name); // returns null (expect name)                 System.debug('MM++++ Ascent Quantity: ' +quoteCharge.zqu__ProductRatePlanCharge__r.Ascent_Quantity__c); // returns null (expect: 0)                  if(quoteCharge.zqu__ProductRatePlanCharge__r.Ascent_Quantity__c == 0 || quoteCharge.zqu__ProductRatePlanCharge__r.Ascent_Quantity__c < quoteCharge.zqu__Quantity__c){                     quoteCharge.addError('The Product: ' +quoteCharge.Name + ' only has ' +quoteCharge.zqu__ProductRatePlanCharge__r.Ascent_Quantity__c + ' in stock but you are trying to sell ' +quoteCharge.zqu__Quantity__c);                 }             }         }             } }

Since I started coding in Apex, I've gotten used to working with lists of IDs of objects not the objects themselves.  This time around, instead of creating a List<ID> of account ids, I created a List<Account>.  Now, I'm trying to add account records to this list, via a lookup field on a related custom object. However, when I do this, I get an error back telling me I'm trying to add an ID to an sObject list.   So what I'm wondering is, how would I best indicate that it's the sObject record as a whole I want to add, not just the ID indicated by the lookup field? And if it involves a SOQL query, wouldn't that be problematic in terms of hitting governors limits?


I have an assignment that demands I use a copy constructor. So let's say we have the following code:  class Animal   /*abstract class*/ { private:     string name;     int age; public:     Animal();     ~Animal();     virtual int is_bad() = 0; }  class Dog : public Animal { public:     Dog();     ~Dog();     int is_bad() {         return 0;     } }  /*constructors*/  Animal::Animal(int age,string name) {     this->age=age;     this->name=name; }  Dog::Dog(int age, string name) : Animal(age,name) {     cout << "Woof" << endl; }  /*main*/  int main() {     Animal * c;      c = new Dog(10,"rex");      return 0; }   So my question is as follows. If I want to make a copy constructor that makes a duplicate of dog for example Dog(const Dog & d), what do I need to add to my code and how do I call it in my main function? I'm a newbie so I'll need a quite elaborated answer.

As Scott Myers wrote, you can take advantage of a relaxation in C++'s type-system to declare clone() to return a pointer to the actual type being declared:  class Base {     virtual Base* clone() const = 0; };  class Derived : public Base {     virtual Derived* clone() const };   The compiler detects that clone() returns an pointer to the type of the object, and allows Derived to override it to return a pointer to derived.  It would desirable to have clone() return a smart pointer that implies transfer of ownership semantics, like the following:  class Base {    virtual std::auto_ptr<Base> clone() const = 0; };  class Derived : public Base {     virtual std::auto_ptr<Derived> clone() const; };   Unfortunately, the relaxation of the conventions does not apply to templated smart pointers, and the compiler will not allow the override.  So, it seems I am left with two options:   Have clone() return a "dumb" pointer, and document that clients are responsible for disposing of it. Have clone() return a smart base pointer, and have clients use dynamic_cast to save them to a Derived pointer if they need it.   Is one of these approaches preferred?  Or is there a way for me to eat my transfer of ownership semantics and have my strong type safety too?


Quite simply I have many objects (thousands, imported data, I wish outline had a scrollbar in blend file mode) and I would like to set a large selection of them as display-as wire-frame and another large selection of them as display-as bounding box. Changing this value on a single Properties -> Object Properties only effects one object though, and I see no menu item to apply this to a selection. How can I change many object's view-as mode? I am open to scripted options as a last resort

Is it possible to add a modifier to more than one mesh at once?  I have a lot of unique objects,  and I want to set a subdivide modifier to them, would I have to do each one individually?   I have tried selecting all the objects and then adding a modifier, but as I expected, it only added it to the active object.


I started minecraft last week to play with my kids. I built a huge castle in the sky between 2 hills. When I was just finished I find something walking around the courtyard (all door were closed). I rushed it with a pickax, pinned it against the wall and clicked as fast as I could. I spent 2 pickaxes and didn't seem to do any damage. Now I'm dead and it standing over the bed and chests inside the castle courtyard. I look it up and find its a witch, but there are no comments on special tactics on how to kill it. Its supposed to be a simple thing?  How did it get into my fully lit and walled castle? Can they fly or jump? Open doors? Go through walls? Why won't it die? I need to be able to keep monsters out. Castle design:                                                                  __ |_______                        ____________________Witch__|   /         |     castle            |                             |         |            ___________|                             |         |           |                                         |         | respawn   |                                         /         |___________|                                        |        /             \                                      /       /               |                                     | mountain       /                |   P.S.: I found out building a canopy over a valley is a bad idea. Shading that much area brings out a non-stop barrage of creepers and skeletons making going out a death march, not to mention un-passable, unless one brings a full load of dirt to climb out of the sheer number of blast craters.

A long time ago I played an older version of Minecraft. Back then witches didn't spawn naturally, so you couldn't find them unless you found a hut. Now I'm playing again, but sometimes when I go down a cave I find one or two witches, and it's really hard to find them back.   So, what is the best you can do to kill witches, specially when two spawn at the same time and you don't have milk?


I want to know _ you talked to.  (who or whom)  I want to know _ the culprit is.  (who or whom)

I can never figure out whether I should use who and whom. Most people use who for both colloquially, but some people say this is not correct.  What’s the rule for using who and whom correctly?


I have a question about undecidable statements in $\mathsf{ZFC}$.  I know there are true statements like: $$X\text{ is independent of }\mathsf{ZFC}.$$  But is it also possible that such a statement exists?  $$\text{"}X\text{ is independent of }\mathsf{ZFC}\text{" is independent of }\mathsf{ZFC}$$  Or even worse:  $$\text{""}X\text{ is independent of }\mathsf{ZFC}\text{" is independent of }\mathsf{ZFC}\text{" is independent of }\mathsf{ZFC}$$  I think you see what I mean by "nested independence of $\mathsf{ZFC}$". Is it possible that such a true statement exists? If it is possible: What does it mean? And is there an example for such a true statement? Unless such a true statement can exist: Why not?  Another funny case would be is the depth of this nested statement goes to infinity:  $$\begin {align} \mathrm{statement}_0 &= X \\ \mathrm{statement}_{n+1} &= \mathrm{statement}_n\text{ is independent of }\mathsf{ZFC} \\ \mathrm{specialstatement} &= \lim_{n\to\infty}\mathrm{statement}_n \end{align}$$  Does such a $\mathrm{specialstatement}$ exist? And what is the meaning of it?

I was just thinking about unprovability. I just wanted to know if it is possible to make a concrete boundary between provable problems and unprovable problems in a certain axiomatic system.   We know that there is a statement that is true yet unprovable. Then is it possible that a statement is true and unprovable, but the unprovability is unprovable?  We can extend it to a question of "unprovability of unprovability of unprovability", or any finite number of times, or even $\omega$ times....  I have no clue. Has there been any research on this kind of topic?


Suppose $\mathcal{A} = \{a,b\}$ or $\mathcal{A} = \{a \}$. Is it ok to write $\mathcal{A} \setminus b$ to indicate  \begin{cases}    \mathcal{A} \setminus b & \text{if } b \in \mathcal{A} \\   \mathcal{A} & \text{otherwise}  \end{cases} If not, what would be an appropriate notation for that?

The "correct" way to write a set without a specific element is as follows: $S \setminus \{s\}$  But in some contexts this is cumbersome to write/type or read, and it detracts from the flow of the writing. Is it acceptable to just use $S \setminus s$?  Edit: By "cumbersome" i mean they look bad when you're trying to inline formulas in LaTeX.


My cyclocross handlebars are really irritating, please help.

I have a two-and-a-half year old  (with a road-bike-like frame and thin tires; it's somewhere in the loosely-defined "hybrid" range) that I use to commute to work, twenty-five miles round-trip, once or twice a week. The bike has straight handlebars, and having gotten used to the idea of commuting via bike, I'm interested in upgrading to drop handlebars. It looks like I'd need new break/shift levers to go with the handlebars; the whole upgrade looks like it'd run a couple hundred dollars. This is a sizable fraction of the original cost of the bike, which leads me to wonder if I'm better off saving my money for a new bike that's a little better adapted to my use.  Is upgrading my bike's handlebars a reasonable investment?


I'm new to LyX/Latex and this is my first project in which I'm using it, so I don't know if I was specific enough in the title.  To write this project, I was given a template made of multiple files:   outline.lyx; solution.lyx; simulation.lyx.   All these files are included (with input) in a main file, let's call it main.lyx.  In solution.lyx I used the ERT:  \lstinputlisting[caption={Component}]{design/component.blif}   to make a listing that "includes" directly the source of my code, instead of having to copy it manually. The directory "design" (in which there is component.blif) is in the same directory of solution.lyx.  Now comes the problem. If I put main.lyx in the same directory of solution.lyx and generate the PDF with pdflatex, everything seems to work fine. If I put main.lyx one step "higher" in the path (so that includes, for istance, "ex01/solution.lyx"), LyX gives me the following error:     Package Listings Error: File `design/component(.blif)' not found.       *** (cannot \read from terminal in nonstop modes)   Does anybody know how to fix this problem? I would really like to put the main file one step higher, so that I can include multiple files from different sub-directories.

How can I make the \lstinputlisting to search for files in a given directory? I'm thinking of a solution along the lines of the solution to .  I would like to have a solution like  \lstinputpath{/some/path/in/the/system} \lstinputlisting{file.ext}   where file.ext resides in /some/path/in/the/system. I tried to search for such solution without luck. I found that inside of the definition of \lstinputlistings the authors use a \lst@inputpath. However, a naive modification of this macro doesn't yield any results.


I have some code that takes n groups of states and then creates multiple "neighbors" by swapping states between groups randomly.  from random import randint as rand  groups = [['VT', 'TX', 'HI', 'AR', 'PA', 'OK', 'AK', 'MI', 'ND', 'ID', 'NY', 'WV', 'FL', 'UT'],           ['MO', 'MA', 'SD', 'NE', 'GA', 'MN', 'SC', 'CA', 'RI', 'AZ', 'NH', 'MS', 'AL', 'WI', 'GU', 'CT', 'MT', 'TN', 'OH', 'OR', 'IA'],           ['NV', 'KY', 'NM', 'KS', 'IN', 'LA', 'DE', 'MD', 'CO', 'IL', 'VA', 'NC', 'WY', 'NJ', 'WA', 'ME']]  def hill_climb_nbr(groups,nbr_size):     #swap one state in and out of each group      group_list = []      for g in range(0,nbr_size):          temp_val = []          groups_copy = groups          for i in range(0,len(groups)):             rand_num = rand(0,len(groups[i])-1)             temp_val.append(groups[i][rand_num])             groups_copy[i].pop(rand_num)             print(rand_num)          for j in range(0,len(temp_val)):             groups_copy[j].append(temp_val[j-1])          print(groups_copy)         print('group_list')          group_list.append(groups_copy)          print(group_list)      return group_list  hill_climb_nbr(groups,3)   Here is an example of input:  [['VT', 'TX', 'HI', 'AR', 'PA', 'OK', 'AK', 'MI', 'ND', 'ID', 'NY', 'WV', 'FL', 'UT'],  ['MO', 'MA', 'SD', 'NE', 'GA', 'MN', 'SC', 'CA', 'RI', 'AZ', 'NH', 'MS', 'AL', 'WI', 'GU', 'CT', 'MT', 'TN', 'OH', 'OR', 'IA'],  ['NV', 'KY', 'NM', 'KS', 'IN', 'LA', 'DE', 'MD', 'CO', 'IL', 'VA', 'NC', 'WY', 'NJ', 'WA', 'ME']]   The output of hill_climb_nbr(groups,3) where groups is the list of lists shown above is this:  [[['VT', 'TX', 'HI', 'AR', 'PA', 'OK', 'AK', 'MI', 'ND', 'ID', 'NY', 'WV', 'FL', 'UT'],   ['MO', 'MA', 'SD', 'NE', 'GA', 'MN', 'SC', 'CA', 'RI', 'AZ', 'NH', 'MS', 'AL', 'WI', 'GU', 'CT', 'MT', 'TN', 'OH', 'OR', 'IA'],   ['NV', 'KY', 'NM', 'KS', 'IN', 'LA', 'DE', 'MD', 'CO', 'IL', 'VA', 'NC', 'WY', 'NJ', 'WA', 'ME']],  [['VT', 'TX', 'HI', 'AR', 'PA', 'OK', 'AK', 'MI', 'ND', 'ID', 'NY', 'WV', 'FL', 'UT'],   ['MO', 'MA', 'SD', 'NE', 'GA', 'MN', 'SC', 'CA', 'RI', 'AZ', 'NH', 'MS', 'AL', 'WI', 'GU', 'CT', 'MT', 'TN', 'OH', 'OR', 'IA'],   ['NV', 'KY', 'NM', 'KS', 'IN', 'LA', 'DE', 'MD', 'CO', 'IL', 'VA', 'NC', 'WY', 'NJ', 'WA', 'ME']],  [['VT', 'TX', 'HI', 'AR', 'PA', 'OK', 'AK', 'MI', 'ND', 'ID', 'NY', 'WV', 'FL', 'UT'],   ['MO', 'MA', 'SD', 'NE', 'GA', 'MN', 'SC', 'CA', 'RI', 'AZ', 'NH', 'MS', 'AL', 'WI', 'GU', 'CT', 'MT', 'TN', 'OH', 'OR', 'IA'],   ['NV', 'KY', 'NM', 'KS', 'IN', 'LA', 'DE', 'MD', 'CO', 'IL', 'VA', 'NC', 'WY', 'NJ', 'WA', 'ME']]]   It is a strain to see, but it is just the same list of lists repeated three times.    While trying to diagnose the problem, I found that groups_copy looks correct right before the group_list.append(groups_copy).  Somehow the final group_list turns out to be the last groups_copy repeated nbr_size times instead of each iteration of groups_copy.  I've been looking at this for a few hours now and I'm about to loose my mind.  Does anything stand out to you as to where the issue is?

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


I stumbled upon an AES implementation that uses boxes with multiples of 2 and 3 for its MixColumns operation. When inspecting the m2 box, I saw that the first line is : 0x00,0x02,0x04,0x06,0x08,0x0A,0x0C,0x0E,0x10,0x12,0x14,0x16,0x18,0x1A,0x1C,0x1E,  So nothing abnormal, but once we reach 0xFE, the next line is : 0x1B,0x19,0x1F,0x1D,0x13,0x11,0x17,0x15,0x0B,0x09,0x0F,0x0D,0x03,0x01,0x07,0x05,  Why does it become so weird ? How were those boxes computed ?

I'm using the mul2, mul3, mul9, mul11, mul13 and mul14 tables for the MixColumn and InvMixColumn steps in AES-128. However, I got these off some Github repository, and now I'm looking for an actual source explaining how these were calculated and so on.  I cannot find anything proper on Google, can anyone help me out?


Prove $n^2 < n!$.  This is what I have gotten so far  basis step: $p(4)$ is true Inductive Hypothesis assume $p(k)$ true for $k \ge 4$  Inductive Step $p(k+1)$ : $(k+1)^2 < (k+1)!$  $$(k+1)^2 =k^2 + 2k + 1 < k! + 2k +1$$  Can someone please explain the last step this is from text, I need help understanding this, forgive me for the formatting error Im still learning

How can I show that $n^2<n!$ for all $n\geq 4$ Step 1 For $n=1$, the LHS=$4^2=16$ and RHS=$4!=24$. So LHS$<$ RHS. Step 2 Suppose the result be true for $n=k$  i.e., $k^2<k!$ Step 3 For $n=k+1$ $(k+1)^2=k^2+2k+1$ What will be the next step?


I want to have ports 80,8080,443,8443,9990,9993 open, accessible from everywhere. port 8080 seems to be blocked, the browser says: ERR_CONNECTION_REFUSED syslog: [ 6021.847345] iptables denied: IN=eth0 OUT= MAC=12:85:11:63:da:cb:f6:6d:05:71:95:80:08:00 SRC=my.ip.here DST=server.ip.here LEN=60 TOS=0x00 PREC=0x00 TTL=56 ID=51418 DF PROTO=TCP SPT=37536 DPT=8080 WINDOW=65535 RES=0x00 SYN URGP=0 What am I doing wrong here? "iptables -L" result target     prot opt source               destination ACCEPT     all  --  anywhere             anywhere REJECT     all  --  anywhere             127.0.0.0/8          reject-with icmp-port-unreachable ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:http ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:https ACCEPT     tcp  --  anywhere             anywhere             state NEW tcp dpt:ssh ACCEPT     tcp  --  anywhere             anywhere             state NEW tcp dpt:postgresql ACCEPT     tcp  --  anywhere             anywhere             state NEW tcp dpt:9990 ACCEPT     icmp --  anywhere             anywhere             icmp echo-request LOG        all  --  anywhere             anywhere             limit: avg 5/min burst 5 LOG level debug prefix "iptables denied: " REJECT     all  --  anywhere             anywhere             reject-with icmp-port-unreachable ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:9993 ctstate NEW,ESTABLISHED ACCEPT     tcp  --  anywhere             anywhere             multiport dports http,https ctstate NEW,ESTABLISHED ACCEPT     tcp  --  anywhere             anywhere             multiport dports http-alt,8443 ctstate NEW,ESTABLISHED ACCEPT     tcp  --  anywhere             anywhere             multiport dports 8009,8009 ctstate NEW,ESTABLISHED ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:http-alt  Chain FORWARD (policy ACCEPT) target     prot opt source               destination REJECT     all  --  anywhere             anywhere             reject-with icmp-port-unreachable  Chain OUTPUT (policy ACCEPT) target     prot opt source               destination ACCEPT     all  --  anywhere             anywhere ACCEPT     tcp  --  anywhere             anywhere             tcp spt:9993 ctstate ESTABLISHED ACCEPT     tcp  --  anywhere             anywhere             multiport dports http,https ctstate ESTABLISHED ACCEPT     tcp  --  anywhere             anywhere             multiport dports http-alt,8443 ctstate ESTABLISHED ACCEPT     tcp  --  anywhere             anywhere             multiport dports 8009,8009 ctstate ESTABLISHED ACCEPT     all  --  anywhere             anywhere ACCEPT     all  --  anywhere             anywhere```

This is a  about Connection Refused    We see a lot of questions to the effect      When I try to connect to a system I get a message      Connection refused      Why is this ?


There are multiple users out there who don't understand why they haven't been awarded with the "curious" Badge.   who had to recieve an explaination of how the index is calculated.  However, what I don't understand is why the index is not calculated by the system and available for the users without the need to be calculated by hand.  It would be much easier and more transparent for the users to know where they stand. There are so many situations in which you can't tell for certain  what your current question record index is and seeing a direct impact would make people a lot more careful to ask badly formatted questions (question ban) or work for a better record in order to earn the curious badge. I think you should have an index of how well you're doing at any time. Same goes for answers and comments.

I recently got awarded some new badges for different SE sites, however I was a bit surprised at which sites gave me which badges. The badges are :  Asked a well-received question on 5 separate days, and maintained a positive question record.  Asked a well-received question on 30 separate days, and maintained a positive question record.  Asked a well-received question on 100 separate days, and maintained a positive question record. I can find out if I meet the "well-received question on X separate days" criteria with , so know the reason I did/didn't get a badge must be related to the "positive question record" criteria instead. I found  which defines the formula for determining your "positive question record" for the purpose of these badges as  (total questions - negative questions - closed - deleted)/total questions >= 0.5   But without knowing how many questions I've deleted over the years, or having a handy way to view them all at once, I have no idea what what my actual "positive question record" score is, and what I can do to improve it. Is there a way to find out my "positive question record" score for a specific site?  Since the answer to this question seems to be *"You can't right now"*, I am going to change this to a feature-request per the [suggestion][3] of a moderator below. Please implement a way for users to find out what their "positive question record" score is for a specific SE site, so that they can see how close they are to getting these badges and can work towards them.


I want to put cool videos as background on my ubuntu desktop so I wondered that if there is an app or program that can do this, and how I do this, thanks

I want an animated desktop wallpaper on Ubuntu. For example, the animated Enlightenment background.  How does one achieve this?


I have 1 server with OS Windows Server 2012R2 where I need to install Remote Desktop Services role. I know that without RDS CAL I can connect to this server via RDP 2 users but what when I need to connect 10 users? Do I have to buy all 10 CALs or maybe buy only 8 CALs and link them with 2 already exists?

This is a  about Licensing.    Questions on licensing are off-topic on Server Fault.  If your question has been closed as a duplicate of this question, then this is because we want to help you understand why licence questions are off topic rather than just telling you "it just is". In all likelihood, this question will not address your question directly, it was not meant to.    I have a question regarding software licensing. Can the Server Fault community please help with the following:   How many licenses do I need? Is this licensing configuration valid? What CALs do I need to be properly licensed? Can I run this product in a virtual environment? Can I downgrade this product to an earlier version? Am I entitled to feature X with license Y?


So I have two objects, Target and Interceptor. Target's position, direction of movement and movement speed are known, and Interceptor's position and movement speed are also known. Both movement speeds are fixed, and Target will never change course. Both are moving in three dimensions; Interceptor can move in any direction.  I want to figure out which direction Interceptor needs to move in, at its fixed movement speed, to be able to collide with Target as Target moves, as quickly as possible - or, as the case may be, I want to know if it is impossible for Interceptor to collide with Target.  I don't know how to do this, and my Google searches clearly haven't been using the right search terms, because nothing useful comes up. How do I calculate this?

I saw this question: .  My situation is a little different though.   My target moves, and the shooter moves.  Also, the shooter's velocity is added to the bullets' velocities, i.e. bullets fired while sliding to the right will have a greater velocity toward the right.   What I'm trying to do is to get the enemy to be able to determine where they need to shoot in order to hit the player.  Using the linked SO solution, unless the player and enemy are stationary, the velocity difference will cause a miss.  How can I prevent that?      Here is the solution presented from the stack overflow answer.  It boils down to solving a quadratic equation of the form:  a * sqr(x) + b * x + c == 0   Note that by sqr I mean square, as opposed to square root. Use the following values:  a := sqr(target.velocityX) + sqr(target.velocityY) - sqr(projectile_speed) b := 2 * (target.velocityX * (target.startX - cannon.X)       + target.velocityY * (target.startY - cannon.Y)) c := sqr(target.startX - cannon.X) + sqr(target.startY - cannon.Y)   Now we can look at the discriminant to determine if we have a possible solution.  disc := sqr(b) - 4 * a * c   If the discriminant is less than 0, forget about hitting your target -- your projectile can never get there in time. Otherwise, look at two candidate solutions:  t1 := (-b + sqrt(disc)) / (2 * a) t2 := (-b - sqrt(disc)) / (2 * a)   Note that if disc == 0 then t1 and t2 are equal.


I have an Acer Aspire 3682 WXMi laptop, 40gb HD, 512mb ram.  Will this take Ubuntu, or more specifically Ubuntu Studio?

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


I am creating a beamer presentation with main language being greek. When trying to add letters inside a math environment either using $<math>$ or \[<math>\] the letters appear in Greek rather than English. Note that I don't use a \text{} command as this would print letters in the main language.  My code is  \documentclass[slidestop,compress,mathserif,11pt,xcolor=dvipsnames]{beamer}  \usepackage[english,greek]{babel} \usepackage[utf8]{inputenc} \usepackage[T1,LGR]{fontenc} \usepackage{kerkis} \usepackage{pifont} \newcommand{\eng}[1]{\latintext#1\greektext}  \usepackage{amsmath,amssymb}  \usetheme{Ilmenau} \title[\eng{Benchmarking} $^{nat}B(p,p)^{nat}B$]{\smallΈλεγχος Αξιοπιστίας Διαφορικών Ενεργών Διατομών Ελαστικής Σκέδασης Πρωτονίων σε Στόχο Φυσικού Βορίου} \author[Σταματόπουλος Ν. Αθανάσιος]{Σταματόπουλος Ν. Αθανάσιος} \institute[Εθνικό Μετσόβιο Πολυτεχνείο-E.Κ.Ε.Φ.Ε. ((Δημόκριτος))]{Εθνικό Μετσόβιο Πολυτεχνείο-E.Κ.Ε.Φ.Ε. ((Δημόκριτος))} \begin{document} \begin{frame}   \titlepage \end{frame}  \begin{frame} $p+p$ \[p+p\] \end{frame}  \end{document}   My output is    Any idea on how to fix this?

I want to typeset math in different font called Antykwa Torunska, which supports maths. Unfortunately, when using it in beamer the math font is switched to the standard math font of beamer. How can I change this behaviour?  Here is a minimal example:  \documentclass{beamer} % Mathekram: \usepackage{amssymb, amstext, amsmath} % Font: \usepackage[math]{anttor} \usepackage[T1]{fontenc}   \begin{document}  \begin{frame}{Testframe}    This is fine: 1234567890, \textit{x}, \textit{p}, \textit{t}\\    This is not fine: $1234567890$, $x$, $p$, $t$ \end{frame}  \end{document}   When I change beamer to article it works fine.


I'm relearning mathematics by reading through . It begins by explaining the natural numbers, introducing the following property:  $a.0=0$  To make $a$ the subject, I would divide both sides by zero, leaving:  $a=\frac{0}{0}$  I'm aware, but unsure why, that division by zero isn't allowed. I also look at that equation and read it to mean that any natural number $a$ is given by $\frac{0}{0}$, which can't be right. Moreover, cutting a non-existant cake into no pieces makes my head spin.  Is it correct to say that the mistake is the division by zero, or is there more to this than meets the eye?

I came up some definitions I have sort of difficulty to distinguish. In parentheses are my questions.   $\dfrac {x}{0}$ is Impossible (  If it's impossible it can't have neither infinite solutions or even one. Nevertheless, both $1.$ and $2.$ are divided by zero, but only $2. $ has infinite solutions so as $1.$ has none solution, how and why ?) $\dfrac {0}{0}$ is Undefined and has infinite solutions. (How come one be Undefined and yet has infinite solutions ?) $\dfrac {0}{x}$ and $x \ne 0$, it's okay for me, no problem, but if someone else wants to add something about it, feel free to do it.


Where c is the focus of the hyperbola.I came across this problem when I was going through the  derivation of equation of hyperbola. A substitution was made there and difference of squares of c and a were replaced by b but no proof of it was given.

When I teach conics, I give a simple geometric argument for the Pythagorean relation for ellipses. (By "Pythagorean relation" I mean the fact that the square of the focal length $c$ is the difference of the squares of the semimajor and semiminor axes, i.e. $c^2=|a^2-b^2|$ for the ellipse defined by $\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$.) The picture argument goes as follows: just draw the obvious isosceles triangle from the two foci to one of the two points at the end of the minor axis. We see two right triangles; in each, one leg is the focal length $c$ and the other leg is the semiminor axis, while the hypotenuse is the semimajor axis. The result follows from the Pythagorean theorem applied to this right triangle.  But when it comes to the Pythagorean relation for hyperbolas, I can't think of an equally convincing picture to draw. Instead I have to give a rather inelegant algebraic argument for the relation $c^2=a^2+b^2$ (for the hyperbola defined by $\frac{x^2}{a^2}-\frac{y^2}{b^2}=1$, with focal length $c$), directly from the definition of the hyperbola. The messy details are below.*  Now, obviously there is an asymmetry between the argument for the ellipse and the argument for the hyperbola: the ellipse argument is almost trivial and doesn't involve working straight from the locus definition, but the hyperbola argument is tedious and does require working straight from the definition. So, my question:     Is there an equally persuasive picture I could draw to convince high   school students of the Pythagorean relation for hyperbolas -- without having to get technical with points at infinity, say?   The natural triangle to draw is the right triangle with legs from the center to a vertex and from that vertex to an asymptote, which has legs of length $a$ and $b$; but then the problem becomes why the length along the asymptote should be equal to $c$. I doubt there is a purely (Euclidean) geometrical reason because this triangle lies on the asymptote, not on the hyperbola itself; I suspect some sort of limiting procedure will be required.    [*] The tedious algebraic details:     The foci lie at $(\pm c,0)$.   Say $a>b$. Then hyperbola is the locus of points $(x,y)$ such that       $$\left|\sqrt{(x+c)^2+y^2}-\sqrt{(x-c)^2+y^2}\right|=2a$$      Assume for simplicity the expression between the absolute value bars   is positive. (The algebra is even more tedious if we don't make such a   simplifying assumption.) Then moving the right root to the other side   and squaring gives      $$(x+c)^2+y^2=4a^2+(x-c)^2+y^2+4a\sqrt{(x-c)^2+y^2}$$      Simplifying gives      $$xc-a^2=a\sqrt{(x-c)^2+y^2}$$      and upon squaring again we have      $$x^2c^2-2xca^2+a^4=a^2(x^2-2xc+c^2+y^2)=a^2x^2-2xca^2+c^2a^2+a^2y^2$$      which reduces to      $$x^2(c^2-a^2)-y^2a^2=a^2(c^2-a^2)$$      Defining $b^2:=c^2-a^2$ brings the equation into the form   $x^2/a^2+y^2/b^2=1$, and the Pythagorean relation follows from the   definition of $b$.


Mobile version not showing the hat, is this bug or feature?  Only works in full desktop mode.

I was wondering why there is not hats available on the mobile version. No hats on avatar, no hats counts, etc ..    Is it because it seems to be an ajax layer over all websites? or the same reason there is no helpful tag counts?


I am used a command as service --status-all  oot@frank-Jai:~#  service --status-all   [ ? ]  acpi-support  [ ? ]  acpid  [ ? ]  alsa-restore  [ ? ]  alsa-store  [ ? ]  anacron  [ + ]  apache2  [ + ]  apparmor  [ ? ]  apport  [ ? ]  avahi-cups-reload  [ ? ]  avahi-daemon  [ ? ]  binfmt-support  [ ? ]  bluetooth  [ - ]  bootlogd  [ - ]  brltty  [ ? ]  console-font  [ ? ]  console-setup  [ ? ]  cron  [ ? ]  cups  [ ? ]  cups-browsed  [ ? ]  dbus  [ ? ]  dmesg  [ ? ]  dns-clean  [ - ]  dnsmasq  [ ? ]  failsafe-x  [ ? ]  friendly-recovery  [ - ]  grub-common  [ - ]  hostapd  [ ? ]  hostname  [ ? ]  hwclock  [ ? ]  hwclock-save  [ ? ]  irqbalance  [ ? ]  kdm  [ - ]  kerneloops  [ ? ]  killprocs  [ ? ]  kmod  [ ? ]  lightdm  [ ? ]  modemmanager  [ ? ]  mysql  [ ? ]  network-interface  [ ? ]  network-interface-container  [ ? ]  network-interface-security  [ ? ]  network-manager  [ ? ]  networking  [ ? ]  networking.dpkg-new  [ ? ]  ondemand  [ ? ]  plymouth  [ ? ]  plymouth-log  [ ? ]  plymouth-ready  [ ? ]  plymouth-splash  [ ? ]  plymouth-stop  [ ? ]  plymouth-upstart-bridge  [ ? ]  powernap  [ ? ]  pppd-dns  [ ? ]  procps  [ ? ]  pulseaudio  [ ? ]  rc.local  [ ? ]  resolvconf  [ ? ]  rfkill-restore  [ ? ]  rfkill-store  [ - ]  rsync  [ ? ]  rsyslog  [ + ]  saned  [ ? ]  sendsigs  [ ? ]  setvtrgb  [ ? ]  speech-dispatcher  [ - ]  stop-bootlogd  [ - ]  stop-bootlogd-single  [ - ]  sudo  [ ? ]  udev  [ ? ]  udev-fallback-graphics  [ ? ]  udev-finish  [ ? ]  udevmonitor  [ ? ]  udevtrigger  [ ? ]  ufw  [ ? ]  umountfs  [ ? ]  umountnfs.sh  [ ? ]  umountroot  [ - ]  unattended-upgrades  [ - ]  urandom  [ ? ]  vboxautostart-service  [ ? ]  vboxballoonctrl-service  [ ? ]  vboxdrv  [ ? ]  vboxweb-service  [ + ]  vmware  [ ? ]  vmware-USBArbitrator  [ + ]  vmware-workstation-server  [ ? ]  whoopsie  [ - ]  x11-common root@frank-Jai:~#    what's they are exactly trying to convey from those ?,+,- ?

I really miss the graphical "Services" tool from older versions of Ubuntu, but I understand why it had to go. I always have terminals open anyway, so I use (because I have to now, I guess) service --status-all to see what services are running. This would be ok except that the command produces output like the following:   [ + ]  winbind  [ ? ]  wpa-ifupdown  [ - ]  x11-common   I'm guessing that those symbols mean something like listening, blocked, or stopped, but which is which? More importantly, why doesn't the man page say?


I have a loop to parse command line arguments. Everything works fine if -d or -b argument has a parameter. But when I pass -d or -b without a parameter, the script gets into infinite loop.   # Parse command line input while [ "$#" -gt 0 ]; do   case "$1" in     -d) DOMAIN="$2"; shift 2;;     -b) BITS="$2"; shift 2;;      *) die "unrecognized argument: $1"   esac done   How to throw error on empty parameter?

Say, I have a script that gets called with this line: ./myscript -vfd ./foo/bar/someFile -o /fizz/someOtherFile  or this one: ./myscript -v -f -d -o /fizz/someOtherFile ./foo/bar/someFile   What's the accepted way of parsing this such that in each case (or some combination of the two) $v, $f, and  $d will all be set to true and $outFile will be equal to /fizz/someOtherFile?


It's happened quite a few times.  a recent one. So I'm wondering, what is the scenario? Are they scrolling down to the link of sites, clicking meta and posting? Are they googling for some result, that gives them a post on meta and then they ask?

For quite some time, newer users seem to ask a lot of blatantly off-topic questions here on Meta. They are mostly programming questions that should have been closed asked on Stack Overflow, along with some other questions that would fit into Super User or Server Fault, as well as a few others that have totally nothing to do with the Stack Exchange network. I'm curious as this issue seems to be specific to Meta Stack Exchange (and MSO to some extent), and the frequency varies every day. What could be the cause?


I am trying to design the web page with the following document tree (as to avoid the appearance of the scroll as much as possible):  html    head   body     div (flex-box - height 100%)       header (flex-child - fixed height)       main (flex-child - consumes all the remainig space/height)       footer (flex-child - fixed height)   Apparently, flex-box is the best solution, but I am reading this nice guide  and it appears that there are only limited options how to distribute the space (how to distribute the height of elements) - there are some "growth" properties but nothing else. How can I make the structure I am aiming to achieve? I have no code because I don't see the necessary CSS properties for making even a starter example.

I am working on a web application where I want the content to fill the height of the entire screen.  The page has a header, which contains a logo, and account information. This could be an arbitrary height. I want the content div to fill the rest of the page to the bottom.  I have a header div and a content div. At the moment I am using a table for the layout like so:  CSS and HTML    #page {     height: 100%; width: 100% }  #tdcontent {     height: 100%; }  #content {     overflow: auto; /* or overflow: hidden; */ }

...

...

     The entire height of the page is filled, and no scrolling is required.  For anything inside the content div, setting top: 0; will put it right underneath the header. Sometimes the content will be a real table, with its height set to 100%. Putting header inside content will not allow this to work.  Is there a way to achieve the same effect without using the table?  Update:  Elements inside the content div will have heights set to percentages as well. So something at 100% inside the div will fill it to the bottom. As will two elements at 50%.  Update 2:  For instance, if the header takes up 20% of the screen's height, a table specified at 50% inside #content would take up 40% of the screen space. So far, wrapping the entire thing in a table is the only thing that works.


Does angle of minimum deviation depend on angle of prism? I know that angle of deviation does but I  don't feel like  the particular behavior is relevant for the angle of deviation as well? Please help me clarify it

Consider a simple prism with a prism angle $A$, angle of incidence $\theta_1$, angle of emergence $\theta_4$ and the first and second angle of refraction as $\theta_2,\theta_3$. the refractive index for the prism (w.r.t the surroundings) is $n$. The angle of deviation is $\delta$.I wanted to derive an equation that could give the relation between $\theta_1$ and $\delta$, plot of which for a monochromatic light is as in the . Below is my failed attempt (equations 2 and 3 are from the :- $$\theta_4=\sin^{-1}n\sin(\theta_3)$$ $$A+\delta=\theta_1+\theta_4$$ $$A=\theta_2+\theta_3$$ $$\delta=\theta_1+\sin^{-1}n\sin(\theta_3)-A$$ $$\delta=\theta_1+\sin^{-1}n\sin(A-\theta_2)-A$$ $$\delta=\theta_1+\sin^{-1}n\sin(A-\sin^{-1}\frac{\sin(\theta_1)}{n})-A$$ Equation, when I plotted it on  for an equilateral prism with $n$=$1.5$ yielded the required plot in the limit $28.5^\circ<\theta_1<90^\circ$ (to avoid total internal reflection). But then, how do I use this equation, to analytically find the angle of minimum deviation, and the fact that at minimum deviation $\theta_1=\theta_4$. (I tried taking the derivative, but it turned out to be too complex).


NOTE: This question is the complement of this Q&A:     How can we grep for lines that have less than 8 or more than 63 characters, none that contain more than eight and less than 63 characters?  So, some acceptable character counts could be...  7 6 5 4 3 2 1 0   ...and...  64 65 66 67 ...

NOTE: This question is the complement of this Q&A:     I need to get only the lines from a textfile (a wordlist, separated with newline) that has a length range of minimum or equal than 3 characters, but not longer or equal than 10.   Example:   INPUT:   egyezményét megkíván ki alma kevesen meghatározó   OUTPUT:   megkíván alma kevesen   Question: How can I do this in bash?


When I call the fopen function, it simply does nothing, when i open the project the file doesn't exist and it also does nothing within the program. What I'm trying to do in this function is delete something from a file, and I do this by ignoring the part that I want to delete and copying the rest in the "aux.bin" file, then copying that to the initial file  void stergereAngajat (char CNP[14]) {     FILE* fin = fopen("angajati.bin", "rb+");     FILE* fout = fopen("aux.bin", "wb+");     Angajat a;      while (fread(a.CNP, 14 * sizeof(char), 1, fin) == 1)     {         int nr;         fread(&nr, sizeof(int), 1, fin);         a.nume = (char*)malloc(nr * sizeof(char));         fread(a.nume, nr * sizeof(char), 1, fin);         fread(&a.varsta, sizeof(int), 1, fin);         fread(&a.salariu, sizeof(int), 1, fin);         if (strcmp(a.CNP, CNP) != 0)         {             fwrite(a.CNP, 14 * sizeof(char), 1, fout);             fwrite(&nr, sizeof(int), 1, fout);             fwrite(a.nume, nr * sizeof(char), 1, fout);             fwrite(&a.varsta, sizeof(int), 1, fout);             fwrite(&a.salariu, sizeof(int), 1, fout);         }     }     fflush(fout);     char c;     while ((c = fgetc(fout)) != EOF)         fputc(c, fin);     fclose(fin);     fclose(fout);  }

I'm not asking about general syntactic rules for file names. I mean gotchas that jump out of nowhere and bite you. For example, trying to name a file "COM<n>" on Windows?


In , Captain America is able to wield Thor's hammer because he is worthy.  What I don't get is why he was able to use lightning bolts!  In Thor: Ragnarok, Odin tells Thor that Mjolnir was not the source of his powers. It was simply a tool to control his power. That means that Mjolnir doesn't create bolts of lightning, but rather helped Thor (the God of Thunder) control his powers.  So, how was Captain America able to use lightning bolts?

Avengers: Endgame has given us a huge "sigh of relief" when Cap lifted Mjölnir.  But as we know from Thor: Ragnarok Mjölnir was just a way for Thor to channel his power of lightning. I repeat "THOR's" power, because he is the god of lightning.  So how did Captain America generate lightning bolts to fight Thanos in the endgame?     EDIT: I don't know why people are marking this as a duplicate of  These are two   different questions at their core. Here I am not questioning Captain   America's worthiness for lifting Mjölnir, instead, the focus is on the   power of generating bolts of lightning which are shown in the movie.


I was recently informed by the Dutch immigration department that Australian and New Zealand citizens can travel to a large number of countries within Europe for 90 days each, essentially bypassing the 90 day Shengen limit. They said that the bilateral visa waiver agreements () allowed for this in Austria, Belgium, Czech Republic, Denmark, Finland, France, Germany, Greece, Iceland, Italy, Luxembourg, The Netherlands, Norway, Portugal, Spain, Sweden and Switzerland.   Is this information correct? I am skeptical because I can't find any other information about this online, however they were adamant that this was the case and sent me an email with these details to give me proof.    Should I trust this information?  Edit: This is a different question to the "duplicate" linked as that question does not concern Australia, which obviously has different visa agreements to other countries.   Edit 2: I also found this website which seems to essentially confirm the information from the Dutch immigration department

The Schengen rules have certain exemptions for citizens of countries which concluded bilateral visa-free agreements before the Schengen area took effect. For example, a relevant quote from the :     In practice, it means that, for instance, a citizen of the Korean Republic can travel in the Schengen area (including the CR) for a period of 90 days in any 180-day period. If the citizen of the Korean Republic stayed in the Schengen area for the entire period, he/she can move to the CR before the 3 months are up and then stay for a further 90 days in the CR without a visa. During these 90 days in the CR, he/she can no longer travel to other Schengen states without a visa. In the event of departing and returning to the CR during this period, it is necessary to take a direct flight.   The provision above applies to citizens of:     Argentina, Chile, Croatia, Israel, Korea, Costa Rica, Malaysia, Uruguay   What other countries have similar provisions and to citizens of which countries do they apply? And does the Schengen clock "count back" while the tourist is using his rights as part of a bilateral agreement?  Note that since the rule still precludes staying for more than 90 days in any single country, this is on topic for Travel.SE.


I have Ubuntu 16.04 and want to install C++ free compilator what shall I write in terminal?

Is there a need to install a C/C++ compiler in Ubuntu 14.04 LTS? Where to write the program? How to compile the same?


I have a form:  <form id="filess" style="padding-left:30px">     @foreach(Element elem in Model.Elements)     {         @Html.Label(elem.Name + ":  ")          <input type="file" name="@elem.Name"/>
     }
 </form>   And my javascript:  var form = $("#filess"); form.serialize();//returns empty string   Why am I getting empty string? I have names to my input elements so what is wrong here?

I would like to upload a file asynchronously with jQuery.     $(document).ready(function () {     $("#uploadbutton").click(function () {         var filename = $("#file").val();          $.ajax({             type: "POST",             url: "addFile.do",             enctype: 'multipart/form-data',             data: {                 file: filename             },             success: function () {                 alert("Data Uploaded: ");             }         });     }); });  File <input type="file" id="file" name="file" size="10"/> <input id="uploadbutton" type="button" value="Upload"/>     Instead of the file being uploaded, I am only getting the filename. What can I do to fix this problem?


I have a document with some problems in the positions of the last images. I copied the code here and after that, I copy the warnings that I get:      \documentclass[journal]{IEEEtran} %\usepackage{cite} \usepackage{graphicx} %\usepackage{caption} \usepackage{subcaption} \usepackage{epstopdf} \usepackage[cmex10]{amsmath} %\usepackage{footnote} %\usepackage{setspace} %\usepackage[framemethod=tikz]{mdframed} \usepackage{upquote}  \begin{document} \IEEEpeerreviewmaketitle  \section{Introduction}  \IEEEPARstart whatever   whatever  \begin{figure}[ht]     \centering     \includegraphics[width=75mm]{uno.eps} \caption{uno (5 paths, length 31 m-sequence) } \label{fig:uno} \end{figure}   text text text  \begin{figure}[ht] \centering     \includegraphics[width=75mm]{dos.eps} \caption{dos } \label{fig:dos} \end{figure}  text text text:   \begin{figure}[ht] \centering     \includegraphics[width=75mm]{tres.eps} \caption{tres } \label{fig:tres} \end{figure}  text text:  \begin{figure}[ht] \centering     \includegraphics[width=75mm]{cuatro.eps} \caption{cuatro } \label{fig:cuatro} \end{figure}  text text text:  \begin{figure}[ht] \centering     \includegraphics[width=75mm]{cinco.eps} \caption{cinco } \label{fig:cinco} \end{figure}   \end{document}   This is the warning:     LaTeX Warning: 'h' float specifier changed to 'ht'   Please, let me know if you need more details. Thank you!

Is there any package or a method to force LaTeX to keep floating environments like table and figure closer to where they are declared?


My warlock thinks he can use Mask of Many Faces to cast Disguise Self an unlimited number of times each day, and that the effect will last for a whole day.  Is his understanding of this invocation correct?

On page 111 of the 5E hand book the invocations Misty Visions, Mask of Many Faces, Master of Myriad Forms, and Otherworldly Leap all they that you can cast them without expending a spell slot. Does this mean the spells essentially become cantrips and I can cast them as often as I want?


What is the following limit equal to and how do I prove it?     $$ \underset{n\to\infty}{\lim} \frac {{n!}^{1/n}}{n}. $$     I've been trying for a while and I can't seem to get it.

I'm trying to find  $$\lim_{n\to\infty}\frac{n}{\sqrt[n]{n!}} .$$   I tried couple of methods: Stolz, Squeeze, D'Alambert  Thanks!  Edit: I can't use Stirling.


One of my viewports does not show all objects in solid or wireframe modes. Only parts of objects within a narrow range will show. It's as if the beam of a dark flashlight is determining what shows. (The full objects do show in rendered mode.) What is this effect and how do I turn it off?

When looking at my objects in 3d view I'm seeing a gray cone that seems to be hiding other objects.   Can anyone help me turn this off and explain what it is please.  Screenshots attached.


As title, python use virtualenv to isolate pip libraries for each python application. Ruby has gem, how does it prevent library version conflicts without a virtual environment.

Is there something similar to the Python utility ?  Basically it allows you to install Python packages into a sandboxed environment, so easy_install django doesn't go in your system-wide site-packages directory, it would go in the virtualenv-created directory.  For example:  $ virtualenv test New python executable in test/bin/python Installing setuptools...cd .........done. $ cd test/ $ source bin/activate (test)$ easy_install tvnamer Searching for tvnamer Best match: tvnamer 0.5.1 Processing tvnamer-0.5.1-py2.5.egg Adding tvnamer 0.5.1 to easy-install.pth file Installing tvnamer script to /Users/dbr/test/bin  Using /Library/Python/2.5/site-packages/tvnamer-0.5.1-py2.5.egg Processing dependencies for tvnamer Finished processing dependencies for tvnamer (test)$ which tvnamer  /Users/dbr/test/bin/tvnamer   Is there something like this for RubyGems?


2020-09-19 17:48:23.749 5449-5449/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.braintrainer, PID: 5449 java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.braintrainer/com.example.braintrainer.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.pm.ApplicationInfo android.content.Context.getApplicationInfo()' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2843) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.pm.ApplicationInfo android.content.Context.getApplicationInfo()' on a null object reference at android.content.ContextWrapper.getApplicationInfo(ContextWrapper.java:159) at android.view.ContextThemeWrapper.getTheme(ContextThemeWrapper.java:157) at android.content.Context.obtainStyledAttributes(Context.java:675) at androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor(AppCompatDelegateImpl.java:839) at androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:806) at androidx.appcompat.app.AppCompatDelegateImpl.findViewById(AppCompatDelegateImpl.java:630) at androidx.appcompat.app.AppCompatActivity.findViewById(AppCompatActivity.java:223) at com.example.braintrainer.MainActivity.(MainActivity.java:21) at java.lang.Class.newInstance(Native Method) at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:69) at androidx.core.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:45) at android.app.Instrumentation.newActivity(Instrumentation.java:1215) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2831) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)  at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)  at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)  at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)  at android.os.Handler.dispatchMessage(Handler.java:106)  at android.os.Looper.loop(Looper.java:193)  at android.app.ActivityThread.main(ActivityThread.java:6669)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

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


When writing maths equations and I want to write words within the dollar signs, or between when I've written \begin{equation} and \end{equation} it comes out in italics. I have tried \emph{...} but it still come out in italics. Any suggestions? I am using \usepackage{amsmath} and I'm writing my document on Overleaf. Thank you.

Lets say I have something like:   \[ Let x = number of cats \]   (This is a contrived example, but pretend we are actually inside a long align environment block...) "Let" and "number of cats" need to be written like normal text, while x= needs to be math type text.  I've seen this:  \[ \mbox{Let } x = \mbox{ number of cats} \]   and this:  \[ \textrm{Let } x = \textrm{ number of cats} \]   They seem to produce equivalent output, but I'm not sure which is the "correct" one. Also, they are not ideal in that the extra space needs to be placed inside the text mode block, otherwise it is ignored as math mode and butts the text right up against the math.  Ideally there would be some command which allowed embedding text into an equation, which correctly inserted leading and trailing space around the block as required without adding space inside the text block.  How does one do that "correctly"?


My PC does not support UEFI BIOS, but it has Legacy BIOS. The motherboard is "P5LD2-X1333".  I need to install Windows 8 on the 3TB hard drive with GPT scheme, since as we know, the MBR scheme does not support more than 2TB space. Also, you can not boot OS from a GPT hard drive without UEFI BIOS.  So how can I use the hard drive with 3TB space with OS and without UEFI BIOS?

I'd like to know if there's a method to get Windows 7 or Windows 8 Developer Preview to install to a GPT disk on my traditional IBM PC BIOS setup. Windows 7, of course, rejects my GPT partition, because I don't have UEFI. Well, Debian and Grub 2 seem to work fine... So I want to know if there's a way to force Windows to work as well.  I'd seriously prefer avoiding hybrid MBR/GPT, because it's quite fragile and feels hackish, but it does work. I would assume the main blocker is that Microsoft is simply not adding support in their BIOS bootloader for GPT, which is understandable, I suppose. Is there any recourse?  The way I see it, there are a few potential solutions:   Having an alternate bootloader for the Windows kernel. NOT a chainloader. As far as I know, none exist. That's a shame. Storing as little as possible on an alternate MBR-based disk. Not liking this idea, but it's doable. I'm not sure I'd call this a solution to the problem as much as a workaround. Emulating EFI enough to get the EFI bootloader to work... I remember hearing a bit about a UEFI-on-BIOS emulator, but I can't find anything about it now. I assume this is doable, but there's probably not much demand for it yet, and it's probably no fun at all to setup. GRUB 2 seems to be able to boot a hackintosh with necessary EFI emulation, but I guess there's no interest/UEFI 2 is harder to approach (and I would assume other EFI emulators used for hackintosh are on the same boat.) Coreboot with TainoCore. Coreboot does not work on my motherboard (as far as I know,) and I'm quite sure the last effort to do this during GSoC was a failure. I'd absolutely love this solution, if it did work, though.   Am I missing anything?


I've downloaded the .deb version from the website. A tar.gz file. Then I extracted it. It gives me 3 folders: DEBS, Licences, readme.    There are loads of .deb files. So am I installing the one with the largest size called core04, because I did do this:     dpkg -i openoffice-core04_4.1.2-3_amd64.deb   it is not working.

I want to install OpenOffice. What can I do to install it on my computer?


Recent switcher from Mac here.   I use a programming app called Xojo that is downloaded from the authors website, not available on the software store. It comes as a folder with an executable in it. I can run the app by double clicking it but I don't know where to place the containing folder. At the moment, it's just in my downloads folder.   On the Mac, I would just drop the executable into the Applications folder. Is there a Linux equivalent?   Also the executable doesn't show up when I type in the dash and doesn't seem to have an icon (although icons for it are provided for it in the folder). How do I get it to show up in dash searches too?  Thanks.

I just installed Oneiric Ocelot, and I can't figure out how to add an application, which is stored in my home directory, to the dash. I can create a launcher, but I want it in the dash also.


I was reading about the development of the quantum theory when I got to the explanation for spectral lines. It's a topic that I've revisited many times but I came up with a question. I know that in some interactions with matter the amount of energy absorbed or transmitted in the form of photons is quantized but then what processes lead to the wide spectrum of frequencies that we observe in an object's electromagnetic spectrum? For example in a star what is going on in the nucleus that we get radiation in most frequencies?

My teacher spoke about atomic spectra today, and he explained that, unlike the spectrum obtained by analyzing the sunlight, the spectra of atoms are not continuous.     I have a question about this - even the sunlight has the radiations emitted by the atoms of the elements which compose the sun, still spectra is continuous, which is in opposition to the statement that atomic spectra is discontinuous. So, spectrum obtained by sunlight is continuous even though it atomic spectra. In order to account for spectrum obtained by the sunlight to be continuous and atomic spectra to be discontinuous, can we confirm that sun consists of all those elements (sodium, helium, neon, mercury, etc) which emit the colors of frequency belonging to visible region?


I'm struggling to create a compound INDEX MATCH in Excel based on two criteria.  My data set looks like this:  RANGE       SITE    TYPE   2711260     LOB     LBO  2711260     MYP     WAN  2711266     GCT     LBO  2711516     EEP     WAN  2711516     EFC     WAN  2711516     LOB     WAN  2711516     MWP     LBO   I would like to use an INDEX/MATCH as follows:  - Given a RANGE, return SITE, on condition that TYPE ="LBO".  In my instance, a of TYPE "LBO" is unique for every RANGE.  So for example, if my input data is 2711516, I'd like "MWP" returned, not "EEP", "EFC"or "LOB".  I'm not sure if this is a nested INDEX MATCH statement.  Please can someone assist.

I have a workbook with 2 sheets: spg and data  From the data sheet I wish to do a vlookup in the spg sheet, based on the value of multiple columns in spg.  I can do a =VLOOKUP(H5,spg!$D:$I,6,0) but this will filter where D is equal to H5. I need to add an additional filter so that it selects the value where D is equal to H5 AND C is equal to G5  (C = G5 AND D = H5)  But apparently I can not search with multiple criteria in VLOOKUP, so how do I do it?


A book I never finished that I think of several times a year. I recall very little of this book, only that it has tormented me for nearly 30 years. What I do remember is that humans are slaves to an alien race, and at the end of their day, the aliens enjoy inhaling an intoxicating substance. I also seem to recall that either the aliens or the humans have to wear some kind of air breather. And that unfortunately is about it. I know it's not much to go on, but I do not think stoned aliens are a common theme, so I am hopeful it will ring some bells.   It was a novel, in English, in America. It was most definitely not from a magazine or a collection of short stories. I can still recall taking the book off of the shelf several times from our small library of books, in sixth grade English class.

I read this maybe 10-15 years ago.   Aliens have conquered earth. Possibly quite some time before the time then novel is set in. They have built their own cities. They conduct periodic athletic competitions for humans similar to the current olympics. The winners are take into the city to act as servants to the masters. The protagonist is part of a human resistance movement who is competing in the games. The plan is to infiltrate the city, gather intel and escape. He wins, get in, finally has to kill his master and escape down a waste disposal system which ends up outside the city.   Anybody knows which one I am talking about?


I believe I have a problem understanding PCA:  I would like to use this technique to reduce the number of features of my problem. I originally have 10,000 features and 500 samples. However, the use of PCA will limit my number of principal components to the smallest between the number of samples (columns of my data matrix) and the number of features (rows of this matrix). 100% of variance could therefore be explained by 500 components. But 500 components is far smaller than 10,000 features... How can all the variance be explained by less than the number of samples (which has nothing to do with the number of features)?

In PCA, when the number of dimensions $d$ is greater than (or even equal to) the number of samples $N$, why is it that you will have at most $N-1$ non-zero eigenvectors? In other words, the rank of the covariance matrix amongst the $d\ge N$ dimensions is $N-1$.  Example: Your samples are vectorized images, which are of dimension $d = 640\times480 = 307\,200$, but you only have $N=10$ images.


I think it can be helpful to the OP to be able to click on the vote and it shows the up-vote/down-vote.     It would be better if the owner of the question/answer should also see them.

I know once you get a certain amount of reputation, you can see the total up and down votes for questions. Well, my proposal is to always be able to see this on your own questions and answers. You can see it by going to your user page anyway, so why not make it possible to do by simply clicking on the number of votes (like you can when you have the rep)?


If you search for something on "all sites" (using the searchbox at the top of , you'll reach the search results, e.g.  .  If you click directly on a tag on that page, e.g.        You get 404 Page Not Found error, e.g.     Steps to reproduce   Go to  and enter e.g. "keyforge" into the "Search all sites" field. Arrive at  Click on the "keyforge" tag below a search entry. Reach  (404 page not found)   Expected behaviour  Reach   System Info  Happens in both Firefox and Vivaldi browsers on Windows 10.

In the search results of stackexchange.com/search?q=*, allow people to click on a tag and go to that website with the tag page open.   For example,  shows me this:        But clicking on the hovered-on tag takes me to  and the panda.   Instead, it should take me to    The math.SE URL is already there in  /#question-summary-608993 > div.summary > div.started.fr > a #question-summary-608993 > div.hot-question-site-icon > a


Being given $Z^*_{11} = \left\langle 2 \right\rangle$, find all its subgroups.  I know from a theorem that $\left\langle n/k\right\rangle$ is a unique subgroup for all $k|n$, but 2 doesn't fit, yet still generates the entire group. What is a method that I can use to find all subgroups of a certain group?

Given multiplicative group of integers modulo 13, namely $\mathbb{Z}_{13}^*$, find all subgroups of this group. I need to prove that this group is cyclic. Also, as $|\mathbb{Z}_{13}^*| = 12$, I know that, if $H$ is a subgroup of $\mathbb{Z}$, then $|H|$ is one of ${1, 2, 3, 4, 6, 12}$. And I got stuck here. No computing.


I am a newbie and would like to know if there is any way to eliminate the need for space between cd and .. in the change directory command i.e. cd.. instead of  cd ..

On Windows/DOS terminals a cd.. correctly change the directory.  On Linux terminals the dots from the cd command have to be separated. I'd like to know how/why is this necessary for the parser to work. If no space is added then the command is not understood.   This works well   cd ..   This does not work  cd..   Probably the regExp or whatever is parsing the commands is not including the dot as a possible character immediately after the command.


I'm refering to this popular blog post:    Here, the author first demonstrates a simple regular Python mapper  #!/usr/bin/env python  import sys  # input comes from STDIN (standard input) for line in sys.stdin:     # remove leading and trailing whitespace     line = line.strip()     # split the line into words     words = line.split()     # increase counters     for word in words:         # write the results to STDOUT (standard output);         # what we output here will be the input for the         # Reduce step, i.e. the input for reducer.py         #         # tab-delimited; the trivial word count is 1         print '%s\t%s' % (word, 1)   But then he mentions:     In a real-world application however, you might want to optimize your   code by using Python iterators and generators (an even better   introduction in PDF).   #!/usr/bin/env python """A more advanced Mapper, using Python iterators and generators."""  import sys  def read_input(file):     for line in file:         # split the line into words         yield line.split()  def main(separator='\t'):     # input comes from STDIN (standard input)     data = read_input(sys.stdin)     for words in data:         # write the results to STDOUT (standard output);         # what we output here will be the input for the         # Reduce step, i.e. the input for reducer.py         #         # tab-delimited; the trivial word count is 1         for word in words:             print '%s%s%d' % (word, separator, 1)  if __name__ == "__main__":     main()   My question: Why is the second mapper more efficient than the first mapper?   If I understand yield correctly;  it suspends the function before another call. So basically whenever data is called to be iterated upon, read_input comes into action to yield another item.   But even in the first simple mapper, we are doing the same thing right? for line in std.stdin: would basically load whatever stdin is available to the host where the mapper is running; and we operate on it line by line.  What is the benefit of using yield and what sort of gains can I expect over the first one? Speed? Memory?  Thanks a lot.  EDIT: I'm not sure why people think it's duplicate. I'm not asking about how the 'yeild' keywork works, I'm asking about an explanation as to what benefit it provides in the hadoop streaming mapping context.

What is the use of the yield keyword in Python? What does it do? For example, I'm trying to understand this code1: def _get_child_candidates(self, distance, min_dist, max_dist):     if self._leftchild and distance - max_dist < self._median:         yield self._leftchild     if self._rightchild and distance + max_dist >= self._median:         yield self._rightchild    And this is the caller: result, candidates = [], [self] while candidates:     node = candidates.pop()     distance = node._get_dist(obj)     if distance <= max_dist and distance >= min_dist:         result.extend(node._values)     candidates.extend(node._get_child_candidates(distance, min_dist, max_dist)) return result  What happens when the method _get_child_candidates is called? Is a list returned? A single element? Is it called again? When will subsequent calls stop?   1. This piece of code was written by Jochen Schulz (jrschulz), who made a great Python library for metric spaces. This is the link to the complete source: [Module mspace][1].


A real number $x$ is said to be algebraic if there is a nonzero polynomial $p$ with rational coefficients such that $p(x)=0$. Show the set of all algebraic real number is countable.   Let $Z$ be the set of all algebraic real number.  Things I know:  (1)The denumerable union of denumerable sets is denumerable.  (2)A polynomial of degree $n$ has at most $n$ zeros.  (3)$\mathbb{Q}$ is denumerable.  (4)A subset of a denumerable set is denumerable.  Hint, think of the sets:  $A$) set of zeros of a given rational polynomial.  $B$) set of rational polynomials of a given degree.  $C$) set of all rational polynomials.  My thought is that if I can show that $Z\subseteq A\cup B\cup C$ and that $A,B,$ and $C$ are denumerable then I have shown Z is countable.  The set $A$ is clearly finite from (1), therefore denumerable.  Is my logic for the proof sufficient and how can I say $B$ and $C$ are denumerable?

I am trying to prove that algebraic numbers are countably infinite, and I have a hint to use: after fixing the degree of the polynomial, consider summing the absolute values of its integer coefficients, and setting the sum less than or equal to $m$, for each $m \in \mathbb{N}$. I am also allowed to use the fact that every polynomial has a finite number of roots. I am not sure where to begin... Perhaps after fixing the degree of the polynomials, I could try enumerating them, and after proving countability of the set that contains the roots of all polynomials of a certain degree, I could state that the union of infinitely many ($\bigcup_{n=1}^{\infty}$, $n \in \mathbb{N}$) countably infinite sets is countable, and thus the algebraic numbers are countably infinite, too, but I am not sure if this is a good approach/how to enumerate the polynomials. Thanks!


As per 's  (and my indomitable curiosity), here is the question:  What are the differences among \href, \hyperlink and \hyperref?  \documentclass{article} \usepackage[hyphens,spaces,obeyspaces]{url} \usepackage[colorlinks,allcolors=blue]{hyperref}  \begin{document} \url{https://en.m.wikipedia.org/wiki/Spirit_way}  \href{https://en.m.wikipedia.org/wiki/Spirit_way}{Wikipedia page: Spirit Way}  \hyperlink{https://en.m.wikipedia.org/wiki/Spirit_way}{Wikipedia page: Spirit Way}  \end{document}  And, what is the deal with \hypertarget anyway?

I am fiddling around with the hyperref package to build a hypertext structure into my pdf. At first glance, hyperref provides two similar macros to put links between parts of my document: \hyperlink{target}{text} and \hyperref[target]{text}. You might notice their slightly different syntax. What really interests me is their different working mechanics. I will illustrate this by the following example: \documentclass{article}  \usepackage{pdfpages} \usepackage[]{hyperref} \usepackage{mwe}  \begin{document}  \section{Section Heading} \label{sectionheading}  \includepdf[link=true, linkname=pdfpage]{example-image}   Link to section works with \hyperref[sectionheading]{hyperref} and with \hyperlink{sectionheading}{hyperlink} (but with slightly different targets on the page).  Link to pdf works with \hyperlink{pdfpage.1}{hyperlink} but not with \hyperref[pdfpage.1]{hyperref} (and not this way, either: \hyperref[pdfpage]{hyperref}).  \end{document}  To link to the labeled section heading, I may use both commands. While \hyperref directs my pdf viewer directly to the linked section, \hyperlink directs me somewhere slightly different, so I can see more context. To link to the \includepdf of pdfpages however, I may only use \hyperlink. \hyperref does not work at all. I suspect this is because of a subtle difference in their working mechanisms. While checking the aux file, I found a line \newlabel{sectionheading}{{1}{1}{Section Heading}{section.1}{}} which \hyperref seems to use as a target. However, I did not find any similar target for the included pdf. My question: I suspect, I understand the workings of \label and \ref very well. \hyperref seems to work quite similarly with the added clickability. Could you please explain to me how \hyperlink does work differently and how it is implemented? E.g. what mechanics explain the difference when clicked on the link and where and how are the link targets stored in the first place?


i hope you can help, because I'm running out of knowledge. My Problem: i want to change a variable to a new value: def Schwierigkeit1():     x = 1     return x     print(x)  therefore i call this function in my Button function: def button(msg, x, y, w, h, ic, ac, action=None):     mouse = pygame.mouse.get_pos()     click = pygame.mouse.get_pressed()      if x + w > mouse[0] > x and y + h > mouse[1] > y:         pygame.draw.rect(gameDisplay, ac, (x, y, w, h))          if click[0] == 1 and action != None:             if (action == Schwierigkeit1):                 schwierigkeitComputer = Schwierigkeit1()                 print("Gegner auf Schwierigkeit: %d" % schwierigkeitComputer)  When i debug this, it shows me a good looking code and it seems to work. BUT: This button call is set in a loop to build a starting screen for my game. Whenever the program comes back to this while-loop, the value of this variable gets resetted to the "Global" value. schwierigkeitComputer = 0    def game_intro():   while intro:     pygame.display.set_caption('Spieleinstellungen')     clock = pygame.time.Clock()     intro = True     pygame.init()     gameDisplay.fill(white)              for event in pygame.event.get():                 # print(event)                 if event.type == pygame.QUIT:                     pygame.quit()                     quit()              button("1", 100, (ZEILEN + 230), 100, 50, white, LIGHTBLUE, Schwierigkeit1)  Did I mess anything up or do i not understand how a button with pygame works? Thank you for your help.

How can I create or use a global variable in a function?  If I create a global variable in one function, how can I use that global variable in another function? Do I need to store the global variable in a local variable of the function which needs its access?


I have a file that does exist but won't execute. It says : "No such file or directory".  This file is created by a script while creating a "custom toolchain" to compile native libraries for Android using the NDK.  I'm certain that the file exists where I beleive it exists. Also file says : arm-linux-androideabi-g++: ELF 32-bit LSB  executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, stripped  I tried running as root, I also tried applying chmod 777, but nothing helped.  The file is located at : /tmp/my-android-toolchain/bin/arm-linux-androideabi-g++  It won't run even if I specify a full path, even if I copy it somewhere else (like in my home folder).  ldd says it's not a dynamic executable.  Maybe that this file is just a .so and not an actual executable with an entry point ?  I'm using Ubuntu 14, 64 bit, in a virtual machine.

I have currently a strange problem on debian (wheezy/amd64).  I have created a chroot to install a server (i can't give any more detail about it, sorry). Let's call its path /chr_path/. To make things easy, I have initialized this chroot with a debootstrap (also wheezy/amd64).  All seemed to work well inside the chroot but when I started the installer script of my server I got : zsh: Not found /some_path/perl (the installer includes a perl binary for some reasons)  Naturally, I checked the /some_path/ location and I found the "perl" binary. file in chroot environment returns :  /some_path/perl ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped   The file exists, seems ok, has correct rights. I can use file, ls, vim on it but as soon as I try to execute it - ./perl for example - I get : zsh: Not found ./perl.  This situation is quite understandable for me. Moreover :   I can execute other basic binaries (/bin/ls,...) in the chroot without getting errors I have the same problems for other binaries that came with the project When I try to execute the binary from the main root (/chr_path/some_path/perl), it works. I have tried to put one of the binaries with a copy of my ls. I checked that the access rights were the same but this didn't change anything (one was working, and the other wasn't)


I am new here and this is my first post. I have an HP laptop (Pavilion dv6000)  While I was trying to dual boot Ubuntu, I was unable to install it correctly and the setup broke in the middle leaving me unable to boot.  Next I tried to install other Linux OS's but with out any luck. Finally I was able to install Ubuntu 12.10 by following the guides on the internet, but it is extreme slow and not all hardware works.   I was able to install it in a 80GiB ext4 partition where Ubuntu is installed and no other windows partitions and, now if I use the windows 7/8 LiveCD or USB then, through the bios, set it to boot using USB or CD. It still doesn't boot giving a error:   an operating system wasn't found    This maybe because it doesn't have a Windows 8 master boot record.  Please can anybody tell me how to restore windows 8mbr and boot into the Windows installation disc, and get rid of Ubuntu? I already have it on my desktop computer, so it's not needed on my laptop.  Please help as I have to complete some important work.

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


Can a square number be split as the sum of two other squares in two different ways? The Pythagorean numbers help us to identify numbers which can be split as sum of two squares. Is this unique?

I'm looking for some help disproving an answer provided on a  I posted about computing the number of double square combinations for a given integer.    The original question is from the Facebook Hacker Cup       Source: Facebook Hacker Cup   Qualification Round 2011      A double-square number is an integer $X$   which can be expressed as the sum of   two perfect squares. For example, 10   is a double-square because $10 = 3^2 + 1^2$.   Given $X$, how can we determine the   number of ways in which it can be   written as the sum of two squares? For   example, $10$ can only be written as $3^2 + 1^2$   (we don't count $1^2 + 3^2$ as being different). On the other hand,   $25$ can be written as $5^2 + 0^2$ or as   $4^2 + 3^2$.      You need to solve this problem for $0 \leq X \leq 2,147,483,647$.      Examples:      $10 \Rightarrow 1$      $25 \Rightarrow 2$      $3 \Rightarrow 0$      $0 \Rightarrow 1$      $1 \Rightarrow 1$   In response to my original question about optimizing this for F#, I got the following response which I'm unable to confirm solves the given problem correctly.       Source:       Again, the number of integer solutions   of $x^2 + y^2 = k$ is four times the   number of prime divisors of $k$ which   are equal to $1 \bmod 4$.      Knowing this, writing a program which   gives the number of solutions is easy:   compute prime numbers up to $46341$ once   and for all.      Given $k$, compute the prime divisors of   $k$ by using the above list (test up to   $\sqrt{k}$). Count the ones which are   equal to $1 \bmod 4$, and sum. Multiply   answer by $4$.   When I go through this algorithm for $25$, I get $8$ which is not correct.          For each prime factor (pf) of $25$ ($5$, $5$ are prime factors of $25$)         if pf % $4$ = $1$ (true for both $5$'s), add $1$ to count      return $4$ * count (count would be $2$ here).          So for $25$, this would be $8$


Sometimes I like to browse my spam folder, to make sure I'm not passing by something that is important. The problem is that there is so much spam that is even hard browse through it.  I notice some very distinguishable patterns, and I was wondering if there is some way that the emails that meet those patterns could be 100% deleted automatically, to help me browse through the folder with more ease.  For instance:  "Delete all mails that are detected as spam and contain the word 'viagra'"  Is there a way to do this?

I want to auto delete email from the spam folder if they are from a particular domain, is it possible?  For example, if an email message is marked as SPAM and it is from example.com, don't keep it in the SPAM folder  I want to keep my SPAM folder clean so it will be more easy to check if I missed some important mails.


I'm used to taking screenshots in Windows and then editing them before posting them (with MSPaint)  How can I edit a simple image quickly on OSX?    I took a picture of a P.O. and I want to remove any PII information

I need to edit a photo on my Mac. I wish to take two photos and paste them together to create one that's larger, containing both. I couldn't figure out how to do this with iPhoto.   For Windows you have Paint.NET.    For Linux you have Kolourpaint.   What would be the equivalent on OS X?  Please note that it must be of quality both in code and in UI. I wouldn't want to install buggyware on my Mac.


well, this error log is not mine but I got the same a dozen times for the last few days. the last time it happened I was running virtualbox and I suddenly got a error I couldn't run any system then I tried to reboot, nothing has happened and I used ctrl + alt + del (once that my painel power button wasn't working either)... everytime it happens my computer just work good for a quite while without any trouble.  I've seen this problem a lot while I was looking for a way to fix it, and I do really know that's problematic ask the same thing a lot of times. There's rules that I should probably read somewhere but for now I just want to fix that thing... I'm kind of newbie and I can't just reinstall my distro once that I have no way to save my files  /dev/sda6 contains a file system with errors, check forced. /dev/sda6: Inodes that were part of a corrupted orphan linked list found.  /dev/sda6: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.         (i.e., without -a or -p options) fsck exited with status code 4 The root filesystem on /dev/sda6 requires a manual fsck  Busybox v1.22.1 (Ubuntu 1:1.22.0-15ubuntu1) built in shell (ash) Enter 'help' for a list of built-in commands.  edit: gsmartcontrol test is all okay

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


The Stinespring dilation theorem states that any CPTP map $\Lambda$ on a system with Hilbert space $\mathcal{H}$ can be represented as $$\Lambda[\rho]=tr_\mathcal{A}(U^\dagger (\rho\otimes |\phi\rangle\langle \phi|)U)$$ where $\mathcal{A}$ is an , $|\phi\rangle\in\mathcal{A}$ is an arbitrary pure state, and $U$ is a unitary on the joint system $\mathcal{H}\otimes\mathcal{A}$. Importantly, this works for any choice of the state $|\phi\rangle\in\mathcal{A}$ -- that is,  neither does $|\phi\rangle\in\mathcal{A}$ have to depend on $\Lambda$, nor is a specific choice of $|\phi\rangle\in\mathcal{A}$ required. Would this representation still be valid if, instead of attaching an ancilla in the pure state $|\phi\rangle\langle\phi|$, we instead attached an ancilla in some arbitrary mixed state $\sigma$? That is, given  a state $\sigma$ of $\mathcal{A}$, I would like to know whether for every CPTP channel $\Lambda$, there exists a unitary $U$ on $\mathcal{H}\otimes\mathcal{A}$ such that $$\Lambda[\rho]=tr_\mathcal{A}(U^\dagger (\rho\otimes \sigma)U).$$

We know that every CPTP map $\Phi:\mathcal X\to\mathcal Y$ can be represented via an isometry $U:\mathcal X\otimes\mathcal Z\to\mathcal Y\otimes\mathcal Z$, as $$\Phi(X) = \operatorname{Tr}_{\mathcal Z}[U(X\otimes E_{0,0})U^\dagger],\quad\text{where}\quad E_{a,b}\equiv \lvert a\rangle\!\langle b\rvert.\tag1$$ Showing this is quite easy e.g. from the Kraus representation. If $A_a:\mathcal X\to\mathcal Y$ are Kraus operators for $\Phi$, then $$U_{\alpha a,i0} \equiv \langle \alpha,a\rvert U\lvert i,0\rangle = \langle \alpha\rvert A_a\lvert i \rangle \equiv (A_a)_{\alpha,0}.\tag2$$ We can, of course, replace $E_{0,0}$ with any pure state in (1) without affecting the result. This shows that, given any channel $\Phi$ and any pure state $\lvert\psi\rangle\in\mathcal Z$, we can represent $\Phi$ as in (1) (with $E_{0,0}\to\lvert\psi\rangle$). However, what about the more general case of $E_{0,0}\to\sigma$ with $\sigma$ not pure? To analyse this case, consider a channel written as $$\Phi(X)=\operatorname{Tr}_{\mathcal Z}[U(X\otimes \sigma)U^\dagger]\tag3$$ for some state $\sigma=\sum_k p_k E_{k,k}\in\mathrm{Lin}(\mathcal Z)$ (appropriately choosing the computational basis for $\mathcal Z$). The relation with the Kraus operators reads in this case $$\Phi(X)_{\alpha,\beta} = \sum_{\ell k ij} p_\ell U_{\alpha \ell,i k} X_{ij} U^*_{\beta\ell,jk} = \sum_{\ell,k} (A_{\ell,k}XA_{\ell,k}^\dagger)_{\alpha\beta}\tag4$$ with $$(A_{\ell,k})_{\alpha,i} \equiv  \sqrt{p_\ell} U_{\alpha\ell,ik}, \qquad A_{\ell,k} = \sqrt{p_\ell} (I\otimes \langle \ell\rvert)U(I\otimes \lvert k\rangle).\tag5$$ There is now a difference: the number of Kraus operators must be larger than the rank of $\sigma$ (which determines the number elements spanned by the index $k$ in $A_{\ell,k}$). Indeed, a different way to state this same fact is to notice that the $\Phi$ in (3) is a convex combination of several channels: $$\Phi(X) = \sum_k p_k \Phi_k(X), \qquad \Phi_k(X)\equiv \operatorname{Tr}_{\mathcal Z}[U(X\otimes E_{k,k})U^\dagger]. \tag 6$$  This leads me to the question: can any $\Phi$ be written as in (3) for any $\sigma$? More precisely, given $\Phi$ and $\sigma$, can I always find an isometry $U$ such that (3) holds? The question arises from the fact that, because when $\sigma$ is not pure (3) leads to $\Phi$ be a convex combination of other maps as shown in (6), I would think that there should be maps that are "extremal", in the sense that they cannot be written as convex combinations of other maps, and that such maps shouldn't be writable as (3) for $\sigma$ not pure.


I have this question     Let $n \ge 2$ be an integer.  Prove that $$\sum_{k=0}^{n-1}\cos(\frac{2k\pi}{n}) = 0 = \sum_{k=0}^{n-1}\sin(\frac{2k\pi}{n})$$   I was given the hint to     Set $z = \cos(\frac{2\pi}{n}) + i\sin(\frac{2\pi}{n})$, so $z^n=1$.  Now write this as $(z-1)(z^{n-1}+z^{n-2}+...+z^2+z+1)=0$ and go from there...   I get that $(z-1)(z^{n-1}+z^{n-2}+...+z^2+z+1)=0$ is just an expansion and rearrangement of $z^n=1$, but what I don't understand is, why set $z = \cos(\frac{2\pi}n) + i\sin(\frac{2\pi}{n})$ and how do we know that $z^n=1$

How can we sum up $\sin$ and $\cos$ series when the angles are in arithmetic progression? For example here is the sum of $\cos$ series:  $$\sum_{k=0}^{n-1}\cos (a+k \cdot d) =\frac{\sin(n \times \frac{d}{2})}{\sin ( \frac{d}{2} )} \times \cos \biggl( \frac{ 2 a + (n-1)\cdot d}{2}\biggr)$$  There is a slight difference in case of $\sin$, which is: $$\sum_{k=0}^{n-1}\sin (a+k \cdot d) =\frac{\sin(n \times \frac{d}{2})}{\sin ( \frac{d}{2} )} \times \sin\biggl( \frac{2  a + (n-1)\cdot d}{2}\biggr)$$   How do we prove the above two identities?


Suppose a source produces an indefinite sequence of positive integers. How can you check whether the numbers are generated truly randomly?

Is there a reasonable statistic test one can do to standard random number generators (say, one of those that come built in in Python libs) which shows they are not really random?  (By reasonable I mean to exclude silly things like «generate a looong list and see that it is periodic»)  Later: Notice I am looking for a test that fails on standard generators.