I shuffle my standard deck of 52 cards really, really well - a completely random shuffle.  This generates some configuration of cards: 9Clubs, 4Spades, KHearts, etc...  What are the odds that this exact same configuration has been generated before?  By before - I mean anytime before and anywhere - including all the poker games in all the world and all the magic tricks and all the kids just practicing and all their intermediate shuffles as well.

I just came back from a class on Probability in Game Theory, and was musing over something in my head.  Assuming, for the sake of the question:   Playing cards in their current state have been around for approximately eight centuries A deck of playing cards is shuffled to a random configuration one billion times per day Every shuffle ever is completely (theoretically) random and unaffected by biases caused by human shuffling and the games the cards are used for By "deck of cards", I refer to a stack of unordered $52$ unique cards, with a composition that is identical from deck to deck.   This would, approximately, be on the order of $3 \cdot 10^{14}$ random shuffles in the history of playing cards.  If I were to shuffle a new deck today, completely randomly, what are the probabilistic odds (out of $1$) that you create a new unique permutation of the playing cards that has never before been achieved in the history of $3 \cdot 10^{14}$ similarly random shuffles?  My first thought was to think that it was a simple matter of $\frac{1}{52!} \cdot 3 \cdot 10^{14}$, but then I ran into things like .  While it is not analogous (I would have to be asking about the odds that any two shuffled decks in the history of shuffled decks ever matched), it has caused me to question my intuitive notions of Probability.  What is wrong in my initial approach, if it is wrong?  What is the true probability?  And, if the probability is less than $0.5$, if we how many more years (centuries?) must we wait, assuming the current rate of one billion shuffles per day, until we reach a state where the probability is $0.5$+?   $0.9$+?  (Out of curiosity, it would be neat to know the analogous birthday paradox answer, as well)


In my controller I have a List of string. This list contains The Object Name, and the Field Name. So, I need to get the "Label" Name of this fields.  I need to make a query where the conditions is the object name and the fieldname.  Please take consideration that this is Dynamic, So, I cant just simply create a list of the object because in this list of string I may have any object of the whole solution.   So, I dont know how to make this query to the metadata, in order to know the labels name of my list string of fields. Example:  I have "Student__c" in a variable, I need to get "Student" in another variable. but it gotta be the "real" label of the respective object.   and it can be a plenty of fields, so cant not be hardcore. It have to be consulting in somewhere the correct label, but I dont know where to consult. I'll really appreciate your help!

Im working in a site, And I need to present many fields to be filled and the page, so accoding to a selecction before, I have all the field but I have the Api Name, and the object name, but, With this api object field name, how can I get the label????  Example. I have "Student__c", I need to present "Student" to the user.  Thanks a lot for ur help!    Ok, thanks for ur answuers but I think I did not explain well this situation.   I have a list of string, where I have the information but in Api's name.  I present this fields in a table, so the user is filling the fields but with an inputText and not with an inputfield!.. So, in this moment, I dont know what is the label of each field.  My question basically, if by means of a query I could know the label of a field, if I know the api field name and the object name.. My question is if there is a way to consult this info!...  I know if I have the object is enough using an inputfield, But I cant do that. Neither set the label with HTML directly 'cause this is something dynamic.   Anyone knows how can I know, or consult, I guess by means of a query, how to get this label names???


Can someone please help me write some code to calculate age at a particular date based on date of birth in years.  I'm capturing date of Birth and Date of Diagnosis in database and would like to calculate age in years by Diagnosis date.   partial void AgeAtDiagnosis_Compute(ref string result)     {         // Set result to the desired field value      }

Given a DateTime representing a person's birthday, how do I calculate their age in years?


I have a string '201502190759'. This represents 2015/02/19 at 7:59.  Is there a method within the python library that can convert '201502190759' into a datetime object or timestamp?

I've got a huge list of date-times like this as strings:  Jun 1 2005  1:33PM Aug 28 1999 12:00AM   I'm going to be shoving these back into proper datetime fields in a database so I need to magic them into real datetime objects.   This is going through Django's ORM so I can't use SQL to do the conversion on insert.


Below is my salesforce lightning code, I am passing an image url to a function 'imagecheck' which in turns return if my image is valid or not. However, it is taking some time to check and my 'for' loop gets iterated to next count and thus variable 'j' value doesn't get updated and it exit out of loop. I want my 'for' loop to wait so that 'imagecheck' function can return value then it go to next iteration so that variable 'J' will also be updated. Any help will be much appreciated.  imagecheck: function(url) {     return new Promise(function(resolve, reject){         var img = new Image();         img.onload = function(){             resolve('success');         }         img.onerror = function(){             reject('failure');         }         img.src = url;     }); }, getcheck: function(component, callback) {     var j=0;     var myId = component.get("v.currentversionobj").Id;     var myimages = [];     for(var i=0;i<=j;i++)    {          var imageUrl = 'someprefix='+component.get("v.currentversionobj").Id+'&page='+j;            this.imagecheck(imageUrl).then(function(successUrl){             j++;             myimages.push({url:imageUrl});             component.set("v.fileShares",myimages);         }).catch(function(errorUrl){              });    }  }

I am using a loop in my function which is calling another function I wanted it to wait till I get the result then go to next iteration.I am using promise but it is not working as well. Marked ** in that portion.    function imagecheck(url) {     return new Promise(function(resolve, reject){         var img = new Image();         img.onload = function(){             resolve('success');         }         img.onerror = function(){             reject('failure');         }         img.src = url;     }); }  function getcheck(Id) {     var j=0;     var myId = Id;     var myimages = [];     **for(var i=0;i<=j;i++)    {         var imageUrl = 'someprexixurl'+myId+'&page='+j;            this.imagecheck(imageUrl).then(function(successUrl){             myimages.push({url:imageUrl});             j++;         }).catch(function(errorUrl){              });    }** }


A reference image is attached. I want to make the color thread roll and want that coil effect to the inner cylinder. I dont want to use the texture. i want that thread to be coil and look similar to the reference image. Any idea  A reference video of 3dmax

I want to create this:  Note that wire lay chaotically, so spiral object not the same thing.  There is a cool way to do this task in 3ds max:  Basically he deform straight spline/curve and then bend it couple iterations (over 9000 degrees angle in max).   Blender can't bend that way with simple deform as I know, only up to 360 degree. Is there any other way to make wire wrapping similar to photo?


I need to build a switching box, which switch between 4 pairs of the contacts, and give one of the pairs to the output (to read one of the 4 signals).  I am going to do that as follows: For each pair of contacts I would have a DPST relay. Each of the relay I would connect to the output pins of the microcontroller (if the relay needs 5V, and microcontroller has 5V operating voltage, it should be possible directly. Otherwise, if operating voltage is lower, I would use operational amplifier or transistor-based one). A 4-buttons keyboard array would be connected to the input of the microcontroller, so that only signal between respective contacts go to the output of my circuit, since only circuit with this contacts would be closed by relay.  However, I don't have so much experience so far, and need advice/comments if this plan should work or something looks wrong, bad (if I miss or overcomplicate something).   I also consider possibility of using circuit without any microcontroller, but just mechanic switch, operating DPST relays. My understanding of the 2 options illustrated at the images below. Only 1 pair of contacts shown, because the others would look the same.    I also would appreciate comments if choice of such  would be ok. It has DPST modification which I need, and also provided already with protecting diode.   Voltage and currents through the contacts will be low (less than 10V voltage, less than 1mA current), and the main requirement is that my switching box shouldn't affect those currents, which I am going to measure at the "out" contacts.

I want to switch ON and OFF an incandescent bulb using MCU. Please suggest an electric switch (like relay or something) for 220V 50Hz AC line which can be used here. I would prefer something very cheap to keep the total project cost minimum.  EDIT: Don't limit this to incandescent bulb. The solution should be applicable to every daily life electrical appliances.


I am attempting to install the lxdm package for debian (wheezy). Running apt-get update does not yield any errors, and my sources.list file is as follows:  deb http://ftp.us.debian.org/debian/ wheezy main deb-src http://ftp.us.debian.org/debian/ wheezy main  deb http://security.debian.org/ wheezy/updates main deb-src http://security.debian.org/ wheezy/updates  deb http://ftp.us.debian.org/debian wheezy-updates deb-src http://ftp.us.debian.org/debian/

I'm running Debian Wheezy and my default Display Manager is GDM3, and I would like to replace it with LXDM. The problem is that I'm trying to run # apt-get install lxde and it's not working, what am I doing wrong?  My /etc/apt/sources.list is:  deb cdrom:[Debian GNU/Linux testing _Wheezy_ - Official Snapshot i386 DVD Binar$  deb http://ftp.br.debian.org/debian wheezy main deb-src http://ftp.br.debian.org/debian/ wheezy main  deb http://security.debian.org/ wheezy/updates main contrib deb-src http://security.debian.org/ wheezy/updates main contrib


I have a table with a jsonb column, and I wanted to select from this table with the contents of that column extracted into columns:  CREATE TEMPORARY TABLE stuff (     name text,     contents jsonb );  INSERT INTO stuff (name, contents)     VALUES ('hello', '{"x": "hello", "y": "postgres", "z": "rdbms"}'::jsonb);  INSERT INTO stuff (name, contents)     VALUES ('hello', '{"x": "hello2", "y": "postgres2", "z": "rdbms2"}'::jsonb);  CREATE OR REPLACE FUNCTION pg_temp.extract_stuff (s jsonb, out x text, out y text, out z text)     RETURNS record AS $$ BEGIN     x = s ->> 'x';     y = s ->> 'y';     z = s ->> 'z'; END; $$ LANGUAGE plpgsql;   I was screwing around and somehow landed on this statement, which works perfectly and looks very intuitive:  SELECT     name,     foobar.x,     foobar.y,     foobar.z FROM     stuff,     pg_temp.extract_stuff (contents) foobar;   name  |   x    |     y     |   z     -------+--------+-----------+--------  hello | hello  | postgres  | rdbms  hello | hello2 | postgres2 | rdbms2   However, I'm not sure I understand how this works. Is it shorthand for an implicit inner join of some sort? What is the limitation of this type of syntax (can there be multiple physical tables, etc)?

I'm just getting started with Postgres. Reading  I came across this query:  SELECT title, ts_rank_cd(textsearch, query) AS rank FROM apod, to_tsquery('neutrino|(dark & matter)') query WHERE query @@ textsearch ORDER BY rank DESC LIMIT 10;   I can understand everything in this query, except for this: FROM apod, ....  What does this , mean? I'm used to joins but not to multiple FROM statements separated by a comma.  I searched the net for no avail. After looking at it and thinking, it seems to me that it's declaring a variable called query so it can use it multiple times. But if this is true, what does it have to do with FROM?


I have followed the instructions given here:  Currently using version 4.13.0-36-generic kernel    However the problem is when i get to make command i get the error   In function ‘memcpy’,     inlined from ‘rt_ioctl_iwaplist’ at /home/dev/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/sta_ioctl.c:696:2: ./include/linux/string.h:305:4: error: call to ‘__read_overflow2’ declared with attribute error: detected read beyond size of object passed as 2nd parameter     __read_overflow2();   I found  as a potential solution:     [...] I guess that Arch (and maybe other distros too) use different (more pedantic) options to build the kernel and its modules, helping us to find programming mistakes. I am not sure whether this is correct, but you can try this (and please report back whether it worked):      In os/linux/sta_ioctl.c:549, replace addr[0] with struct sockaddr so the line looks like this  memcpy(extra, addr, i*sizeof(struct sockaddr));       instead of  memcpy(extra, addr, i*sizeof(addr[0]));    I applied this solution (changed the lines) but the problem still remains.  Anyone know how to fix this?

I tried to install the driver for my new wifi usb stick with MT7610U Chipset from 7Links but had no luck. I tried to install it via github and from the original sources but always had some compiling errors. I also tried it with wpa supplicant and the wext driver but could not get it running. lsusb tells Bus 003 Device 006: ID 0e8d:7610 MediaTek Inc. and iwconfig only shows my old wifi stick and two other ethernet cards.   I'm trying to install the driver on ubuntu 17.10.  Is there any way to get it running and can someone tell me how?  Thanks in advance


Pretty new to drupal. I will have roughly seven themes and looking for the best way to change themes by url...  xxxx.com/parents = one theme  xxxxx.com/edu be another theme xxxx.com/daily  will be another theme. There will be about 7 different themes all together. What is the best way to way to make this happen.  Thank you

I have a Drupal instance running on example.org. Which has a theme X installed and activated. Now for a limited period an event is supposed to be held on the site for which a special section has been "carved out." All the things related to that event will go to example.org/event2011.   I want to have a different theme to be shown whenever a page under this section is viewed (e.g. , ). How do I do that?  I have gone through many modules, but none of them is supporting Drupal 7. Preferably, I would like it to be done using modules and don't want to change anything my self at the code level.


G'day chaps, so I'm beginning to learn some python and am trying to understand why the following happens:  def g():     for i in [1,2]:         yield i     print('a')  x=g() next(x) #output=1 next(x) #output=2 next(x) #output='a', StopIteration exception thrown   On the final next(x) call, why is 'a' printed before the StopIteration exception? I would expect since the for loop has ended, it would throw a StopIteration exception and 'a' wouldn't have a chance to be printed. Is it just the case that generator functions are designed so that, on the iteration that produces a StopIteration exception, the code continues to the end of the function, at which point the StopIteration exception is thrown right at the end? I'm just wanting to check this is indeed the case and I am not missing something!  Edit: I think it is a little unfair to mark this question as a duplicate. Yes there are lots of detailed answers on yield, I myself am reading a 1500page book on python, but when you have a mistaken concept in your mind, it can be hard to wrap your head around explanations without someone pointing out where your conception is faulty. Now that I have the right answer, I can see that the issue is with the fact that I thought the StopIteration exception was being thrown when the for loop is exhausted. I now realise it is thrown when no further yield expessions are encountered. Thanks for all the replies, they've helped me iron out my thinking.

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].


The  spell description says:     When the spell ends, the creature knows it was charmed by you.   There is an ambiguity here — does this happen only if the target failed on the saving throw, or the result of the saving throw is irrelevant?  For the sake of simplicity, let's say the target didn't see the spellcasting act itself. According to the rules, it still "knows it was charmed". Does this happen if the target succeed on the saving trow?  On the one hand, the spell ends, so the target should "know it was charmed". On the other hand, one might argue the spell never took effect, so literally nothing happens when the saving throw is succeeded.

In 5th Edition which spells, like Suggestion, are not noticable, and which are noticeable by the target and/or nearby onlookers? Are there differences if a target fails or succeeds on a save roll? I noticed only a few Enchantment spells mention a comment on it, like 'Charm Person' or 'Friends'.     Currently playing a Knowledge Domain Cleric with a different GM; please expand the answer to include Channel Divinity: Read Thoughts/Suggestion ability & spell combination. (The cleric ability which allows Suggestion to succeed automatically).    I'm Hungarian and very new to 5th edition.


I tried to edit my question with more details and I also think that lot of people can benefit from this question!  I was recording a track with my Android and later I found out that I end up having incorrect altitudes. To be precise I was recording a terrain of an island situated in Croatia.  First I started asking myself why is that, and I got answer right here:  as well on some other pages, including one also mentioned in the linked above: stackoverflow.com/questions/11168306/. So it turns out that I recorded ellipsoidal height(h) and in order to get Orthometric height(H) (real height that I need), I need to calculate first Geoid Height(N), which can be seen here:   [source:   So I have manually calculated Geoid Height from this page:  and as alternative for not transforming decimal to degrees from third party there is also this page: .  Now I am wondering how to calculate geoid height automatically in QGIS? People were mentioning that there is some sort of documentation for calculating geoid height on earth-info.nga but it is given in Fortran/C/?. In addition to that Google Earth have option that pops up on opening a file: Adjust altitudes to the ground level, which I assume it might be a possible solution for Google. So if Google Earth has it I guess there is some sort of plugin from QGIS too.   Mobile phone that I have: Sony Xperia m4 aqua and I had High accuracy mode turned on. Specification for my phone can be found here: imei.info/phonedatabase/16958-sony-xperia-m4-aqua-e2303 (GPS: A-GPS/Glonass, GLONASS: No).    EDIT  My question was marked as duplicate, if it refers to my old question, I dont see it to be the same. My last question was about "why", this question is about "how".

I've been recording tracks with GeoTracker on my Android. In places I have points that have altitudes higher than the peaks of a mountain. Like one altitude difference is 46 m.   How is it possible to get that big difference?  Is GPS on my Andorid that bad when it comes to accuracy or is it app itself, and why is this happening?   Edit  My device is:Sony xperia m4 aqua, I had High accuracy mode turn on. Specification for my phone: imei.info/phonedatabase/16958-sony-xperia-m4-aqua-e2303 (GPS: A-GPS/Glonass, GLONASS: No). I am also interested, based on this, how will I be able to figure out what is the accuracy of my measured position and altitude?


I would like to set a default input to be always the internal microphone. Sometimes when I connect my AirPods to the MacBook the input changes to the AirPods' microphones which results in much worse audio quality. The same thing happens with my second pair of BT headphones.

when pairing airpods with a mac, the sound quality is poor due to the fact it also uses them for microphone by default...  when I switch the audio input (microphone to internal), then quality of the airpods sound is excellent.  I don't want to do this step each time I pair airpods, is there a way to make the default microphone for mac is the internal one.


I have a requirement to replace every occurrence of LEN() to length() using ant script in a file. Below is the code I am using.  <replaceregexp file="G:/config.txt" match="LEN(\\*)" replace="length(*)" flags="g,i"/>   It is replacing to length(*)(*). Looks like it is only considering LEN. Can anyone provide me the solution?

I am tired of always trying to guess, if I should escape special characters like '()[]{}|' etc. when using many implementations of regexps.  It is different with, for example, Python, sed, grep, awk, Perl, rename, Apache, find and so on. Is there any rule set which tells when I should, and when I should not, escape special characters? Does it depend on the regexp type, like PCRE, POSIX or extended regexps?


I created a normal block and configured it using the following settings.         I don't want to show the block on node/2 and node/3, for example. I want to get the block render, but verify first the block can be shown on the current page.  // 1 is the block ID. $block = block_load('block', 1); // I want to verify if the block can be shown on the current page before getting the renderable array. $renderable_block = _block_get_renderable_array(_block_render_blocks(array($block)));   I can verify $block->pages contains the path for the current page, but I think there is a proper way to do that. I am sure there is a core function to which I can pass the block object and the current path.    What core function should I use to verify the block is visible in the current page?

I've found plenty of posts about changing the visibility of a block programatically.  My problem is the opposite. Given a block's ID/delta, how do I find out if it should be displayed at the current path?  I have a field collection that allows you to append a block using the Block Reference module (I preprocess the field collection and use my own template, so the logic has been taken away from the Block Reference module). It works, but I only want it to kick in if the "Show block on specific pages" rule says that block should be displayed.


I have a problem that's kind of weird. The numpad operation keys (+, -, *, /) dont work as expected. I cant do the math when transforming objects.   For example hitting G while object is selected, then X then 2 + 2 doesn't move the object 4 units on the X axis, instead - it moves it 22 units, like if that + hit was ignored.   I've noticed it when moving from Blender 2.68 to later versions. (actually after installing 2.68 after the installation of 2.75, the 2.68 also works that way)  Is there anyway to get back the old functionality?

Whenever I move an object in blender in unit mode(Imperial), it always make it in feet. For example, if I type G Y 12, it will move 12 feet. How can I make it move 12 inches instead?


EDIT:thanks for pointing me in the right direction of circular dependency. I tried removing #include "datastructure.h" from Mathfg.h, and I added a "Class ArithmeticTree" in "Matfg.h" to forward declare it, but I get another error inside the CleanExpression function:  cannot convert 'std::__cxx11::basic_string::iterator {aka __gnu_cxx::__normal_iterator >}' to 'const char*' for argument '1' to 'int remove(const char*)'. When I hover over the word "remove", Qt tells me I have "too many arguments". This is on the one line of code that Calculator::CleanExpression comprises.  I am writing a math parser and I have created a header file Mathfg which includes a Calculator class that handles inputs. So far I have a static function called CleanExpression which simply removes whitespace from the input string.  I saw a somewhat similar problem here: , but I could not apply the answers there to my own problem.  (I left out irrelevant sections such as the implementation of the Node struct, but it all works, except for the CleanExpression call.)  Mathfg.h  #ifndef MATHFG_H #define MATHFG_H  #include <string> #include "datastructure.h" using namespace std;  class Mathfg { private:     Mathfg(); };  class Calculator { private:     Calculator(); public:     static void CleanExpression(string& expression)     {         expression.erase(remove(expression.begin(), expression.end(), ' '), expression.end());     } };  #endif // MATHFG_H   Note: I do not use a source file for Mathfg.h.  Datastructure.h  In another header, "Datastructure.h", I fix the input and produce an output. I wanted to call the static function CleanExpression from "Mathfg.h", but I get the error: 'Calculator' has not been declared.   #ifndef DATASTRUCTURE_H #define DATASTRUCTURE_H  #include <iostream> #include <string> #include "mfg\mathfg.h" using namespace std;  struct ArithmeticTree { private:     struct Node     {         // Doing some unrelated stuff here     };  public:     ArithmeticTree()     {      }     ArithmeticTree(string expression_in)     {         Calculator::CleanExpression(expression_in);     // <- Here's the problem!         // Doing some unrelated stuff here     }      // Doing some unrelated stuff here };  #endif // DATASTRUCTURE_H   Note: I do not use a source file for Datastructure.h.  What does work:  In my game loop, I can successfully run this code:   std::string str = "2 +3-4 /      5"; cout << "Cleaning string:\t'" << str << "'\n"; Calculator::CleanExpression(str); cout << "Cleaned:\t\t'" << str << "'\n";   ...which outputs:  Cleaning string:    '2 +3-4 /      5' Cleaned:            '2+3-4/5'   ...but when I try to call Calculator::CleanExpression from within "Datastructure.h" - or more specifically, from within ArithmeticTree's constructor - I get the aforementioned error. I never created a Calculator or Mathfg object anywhere in my code; I just call its static function like I would normally expect it to behave. I am sure I have misunderstood how static functions work in C++, which probably also is the cause of my error.  I would really like some tips on how to go about fixing this problem!  I am using Qt Creator 4.2.1 and MinGW 5.3.0 32bit2.

I often find myself in a situation where I am facing multiple compilation/linker errors in a C++ project due to some bad design decisions (made by someone else :) ) which lead to circular dependencies between C++ classes in different header files (can happen also in the same file). But fortunately(?) this doesn't happen often enough for me to remember the solution to this problem for the next time it happens again.  So for the purposes of easy recall in the future I am going to post a representative problem and a solution along with it. Better solutions are of-course welcome.     A.h  class B; class A {     int _val;     B *_b; public:      A(int val)         :_val(val)     {     }      void SetB(B *b)     {         _b = b;         _b->Print(); // COMPILER ERROR: C2027: use of undefined type 'B'     }      void Print()     {         cout<<"Type:A val="<<_val<<endl;     } };       B.h  #include "A.h" class B {     double _val;     A* _a; public:      B(double val)         :_val(val)     {     }      void SetA(A *a)     {         _a = a;         _a->Print();     }      void Print()     {         cout<<"Type:B val="<<_val<<endl;     } };       main.cpp  #include "B.h" #include <iostream>  int main(int argc, char* argv[]) {     A a(10);     B b(3.14);     a.Print();     a.SetB(&b);     b.Print();     b.SetA(&a);     return 0; }


Recently, to future-proof my computer, I've added on top of my original 4GB of memory. I brought the total memory to 8GB, and I've got no noticeable change in speed-- even when it should. I went to look into Task Manager and saw that my computer would NOT go over 4GB of memory being used, even with both Chrome and Firefox open with 20 tabs each.  After researching, everything that everyone had suggested to do was to check on how much memory was usable. Oddly enough, it says that I have 8GB of memory, and 7.74GB is usable.   It is a notebook PC with Windows 7 Home Premium 64-bit with AMD Phenom II.   My main question is: with my 64-bit computer, why is my computer not using more than 4GB of memory, even when more than 7 is usable?  EDIT: if it helps, Resource Monitor describes all the other RAM as "Standby"

I'm running a Dell Studio XPS, with quad core processor, two threads per core, with 12GB of installed RAM. According to Windows, only 7.99GB of that RAM is usable.  The really weird part is, up until two weeks ago I only had 8GB of RAM and then only 3.99GB was usable. So 4GB of RAM is consistently being taken.  I've checked in every screen, under every option in my BIOS and there doesn't seem to be a memory option there at all (that's a damn Dell for you). I've read that a lot of times this can occur because of the video card stealing some RAM for itself.   Is there some way I can check this, other than the BIOS? I have onboard graphics, not a separate card.  I'm running Windows 7 64-bit.


I get disconnected from the internet whenever the speed reaches 2.5 Mbps  Is there any app to limit the internet speed below that. I am not talking per application based.  Using MacBook Pro (mid 2013) Yosemite

What's a good software solution to slow down internet connections on the mac for testing and simulations?  My primary need is when testing code in the iPhone / iOS simulator, so slowing down the connection for specific applications or processes would be great.


I have a network in my College which is connected to the internet. How can I access a system inside this network from the internet (WAN)? I don't have access to the gateway of the system, so port forwarding is not an option. Is there any program that could run inside my computer (which is in the network) that could then connect to a static IP address on the Internet, reverse the connection, and make me able to use ssh/telnet to access the computer?  Edit: I checked the duplicate question but still I am little bit confused. Actually in my college I have ssh non root access to a system (192.168.1.5) from within the network    Is there anyway I can access that machine through ssh from the internet?    If ssh tunneling is an option how to setup that?    Can anybody explain step by step?

I live in a student dorm (off-campus) and all students of the dorm share the same WAN IP (Internet or public IP), which is fortunately static. I am not an admin and have no control over the router that assigns private IPs to all of the students, so I can't really forward port 22 to my computer.  Is it still possible to establish an SSH connection to my dorm computer from a computer on campus?


I use advanced task killer pro and also hold down the home key until a list of apps open shows up and choose "close all". Someone was telling me this is bad for the device. Is this true? How else can I speed up the device when it is running slowly?  I forgot to mention what I find strange is when I hold down the home key to display running apps, its list is different than the list of running apps advanced task killer has.

Does one really need to install a task manager? My phone does slowdown on rare occasions but it's not something that hampers regular usage.


I am given two finitely generated infinite groups G and H What can I say about their product  $G\times H$  I need to prove that $G\times H$  is one-ended graph

I am not sure how to show the second part. Isn’t it obvious from the fact that    G and H are infinite?


How to show that massless particles do not carry charges from QFT's point of view?

Are there any massless (zero invariant mass) particles carrying electric charge?  If not, why not? Do we expect to see any or are they a theoretical impossibility?


Suppose there are ANOTHER time-like dimension with another speed of light $$C>>c$$  Would we notice that huge speed of light?  How to test the existence of such a huge constant or speed of light?  Would it violate causality? QFT? QM?

We know that space-time dimensions are 3+1 macroscopically, but what if 2+2?  Obviously it is tough to imagine two time dimensions, but mathematically we can always imagine as either having two parameters $t_1$ and $t_2$ or else in Lorentz matrix $$\eta_{00} = \eta_{11} = -1$$ and, $$\eta_{22} = \eta_{33} = 1.$$  Is there any physical reason for not taking this, like the norms become negative or something else?


When the achievements button is clicked, the overlay view title bar is still clickable and propagates the click event through to the view underneath, e.g. the question type selector shown in the screenshot above.  App version: 1.0.47

If I click to open achievements from a question when I click the X to close the achievements view I end up on the answers tab of the question, I assume because the X is over the tab and it's tapping through.    It appears if I hit the X it's ok, but if I tap anywhere else in the top row (where the X is) then I can switch to the question or answer tab.


In most dynamics books I've read they refer to conservation laws and their associated symmetries, cf. . I know that   the conservation of momentum is a result of the homogenity of space angular momentum is the result of isotropic space  and the conservation of energy is the result of the homogenity of time.   Is there a fourth conservation law that would result from time-reversal symmetry?

states that, for every continuous symmetry of an action, there exists a conserved quantity, e.g. energy conservation for time invariance, charge conservation for $U(1)$. Is there any similar statement for discrete symmetries?


Use of isinstance() changed the class type of dict Why is this happening? I know using builtins would prevent but I want to understand better why this is happening.   250     def printPretty(records,num,title='Summary:'): 251         import pdb; pdb.set_trace() 252         if isinstance(records, list): 253             print ("\n{}\n{}".format(title.center(120),"="*120)) 254             table = list() 255             for i in records: ... 263         elif isinstance(records, dict): 264  ->         for key in records: 265                 if isinstance(records[key], Param): 266                     for i in records[key]: 267                         print (i) 268                 print ("") 269      (Pdb) type(records) <class 'dict'> (Pdb) type(dict) <class 'type'><b>

In Python, what are metaclasses and what do we use them for?


I understand the  made to filter certain Unicode characters due to a large influx of spam. But, is it possible for the validation to allow exceptions for usernames containing Asian characters when @-replying to a comment?  On , I tried to reply to a comment from someone with a username comprised of three Unicode characters, , but it was denied with a "Comments cannot contain that content" error.  I selected the name using the tab autocompleter, which these   seem to suggest should work.        I found this other , but the answer was to use only the Latin characters in the name.  The user I was trying to ping has no Latin characters in his username though.  Another  that seems to be very similar has a workaround for characters in the body of questions or answers, but I don't think this would work for pinging users in comments though.

asked in July explains why it is not possible for the time being to submit content in posts or comments that contains Unihan characters. It’s a spammer thing, fair enough.  As  makes clear, the workaround for posts is to convert your Unihan text to HTML entities: these are parsed and appear correctly.  However, HTML entities are still HTML and as such are not parsed at all in comments, as . In other words, since Unihan glyphs are banned from both posts and comments and HTML entities are not parsed in comments, it seems to be completely impossible to post text containing Unihan glyphs in comments at all, except on sites where the ban has been manually removed, like Japanese.SE.  This seems like a rather substantial limitation. And in any case, the blanket ban on Unihan is unduly heavy-handed and inflexible (not to mention perplexing to the user, when the only feedback you get is “Body/comments cannot contain that content”).  In , tchrist suggested that the ability to post Unihan glyphs could be made a rep-based privilege; that is, a certain amount of reputation is required to include these glyphs, otherwise it fails. A requirement of, say, 125 rep points would presumably cut off at least 99.99% of spammers, and it would have the added benefit of being able to maintain—and broaden—the restriction indefinitely to mitigate spam, while still allowing legitimate users to post relevant content.  (The feedback message would have to be improved as well, though; something like, “Due to large volumes of spam written in certain non-Latin scripts, you need at least 125 reputation points to be able to include non-Latin text in your post” or words to that effect.)  Can this be implemented?  Alternatively, as pointed out in Normal Human’s reply, since comments already require a certain amount of rep meant to deter absolute newcomers (and, by extension, also spammers), can the ban just be removed from comments and applied only to posts?  (Editing this just to bump it on the front page, to hopefully have some kind of discussion or feedback on the matter.)


The question is to evaluate $$\sum_{n=1}^\infty \frac1{n(2n-1)}$$   I have done this:   $$\sum_1^\infty\frac1{n(2n-1)}=\sum_{n=1}^\infty\frac2{2n-1}-\frac1n=\frac21-\frac11+\frac23-\frac12+\cdots\\=1-\frac12+\frac13-\frac14+\cdots=\log 2$$ But Wolfram alpha says the initial sum is $2\log 2$. I think the wrong step is when I started a new line above - the sum needs to be re-ordered to get it into the form I have got. But the series is not absolutely convergent (I think), so this shouldn't be allowed. Am I right? How can I correct this argument? If it is not possible to correct is, can someone provide an alternative method I could use instead?

How to prove that   $$ -2\log(2) = -2 + \sum_{n=1}^{\infty}\frac{1}{n(2n+1)} $$  I know that this sum is equal to $\phi(1/2)+\gamma$ where $\phi(x)$ is the digamma function and $\gamma$ is the Euler-Mascheroni constant, but I want to evaluate the sum without knowing it.


At first glance it seems like "Did they stole the bike?" doesn't sound right.  I was going to correct that user and tell him it's steal.  However, when I look up the word stole, it's labeled as .  It sounds funny to say "Did they stole the bike?", but what really is the difference between steal and stole?   Because when saying "Did they", that's inferring the past, right? So would stole actually work as it's past tense, but just sound funny?

Should I use the past tense with did? For example, I was to say:     The important question is: Did they knew what it means or not?   Or should I say:     The important question is: Did they know what it means or not?   In other words: Should I use past tense with did?  I looked at this:    but it didn't really answer my question.


I have multiple points and I need to create polygons that consist specific amount of points.   How could i do this?

I need to group 400 points in 10 groups with 40 points each. The goal is to get the 40 points geographicly together like this:        Any idea how to do this with QGIS?


If I've got a page that originally has a node (ie node/20) for the URL and then if I've assigned its own custom URL (ie website.com/landingpage) I'm finding that I can still access the page by using its node number.  Ideally I'd like to have it so a user can only access the page via the custom URL and never the node so is there a way I can configure a node so it cant be used in the URL to reach the page?

Problem: I want to restrict direct node access using node number www.example.com/node/12 and allow access using pathauto alias www.example.com/content/sometitle to anonymous user. This user should be allowed to see all content of node using only  title path but not with node number to snoof.  Mostly I want to target anonymous users. Admin always has access to everything.   In simple terms, I want to redirect all node/Number paths (not node/add/ContentType) to say the Home page or No Access page.


im just getting into python for my discrete structures and algorithms class > and for some reason, im getting an error with my syntax and I don't   understand why can you assist this is the error:       line 10      i = i + 1      IndentationError: unindent does not match any outer indentation level   also for some reason my code isn't printing   #linear search algorithm  def search(list1, n):     i = 0      while i < len(list1):          if list1[i] == n:             print("found now")             return True         i = i + 1      return False   list1 = [1,5,9,3,4,6] n = 6  if search(list1, n):     print("found") else:     print("not found")

When I compile the Python code below, I get      IndentationError: unindent does not match any outer indentation level     import sys  def Factorial(n): # Return factorial     result = 1     for i in range (1,n):         result = result * i     print "factorial is ",result     return result   Why?


I am using Keras to make a "set" identifier for the card game "set":   Here is my script (some code may be unnecessary but was used during experimentation):  from keras.models import Sequential from keras.layers import Conv2D from keras.layers import MaxPooling2D from keras.layers import Activation from keras.layers import Flatten from keras.layers import Dense from keras.layers import Dropout from keras.callbacks import EarlyStopping from keras.optimizers import SGD from keras.utils import to_categorical from keras.layers.advanced_activations import LeakyReLU from keras.regularizers import l2  import os import glob import shutil  import numpy as np from keras.preprocessing.image import load_img, img_to_array from keras.applications.imagenet_utils import preprocess_input  earlystop = EarlyStopping(monitor='val_acc', min_delta=0.001, patience=5,                           verbose=1, mode='auto')  callbacks_list = [earlystop]  # opt = SGD(lr=0.01)  setIdentifier = Sequential()  setIdentifier.add(Conv2D(32, (3, 3), input_shape = (64, 64, 3), activation = 'relu'))  setIdentifier.add(MaxPooling2D(pool_size = (2, 2)))  setIdentifier.add(Conv2D(64, (3, 3), input_shape = (64, 64, 3), activation = 'relu'))  # setIdentifier.add(Conv2D(64, (3, 3), input_shape = (64, 64, 3), activation = 'relu'))  setIdentifier.add(MaxPooling2D(pool_size = (2, 2)))  setIdentifier.add(Flatten())  setIdentifier.add(Dense(units=256, activation = 'relu'))  setIdentifier.add(Dropout(rate=0.5))  setIdentifier.add(Dense(units = 2, activation = "softmax"))  setIdentifier.compile(optimizer = "adam", loss='categorical_crossentropy', metrics = ['accuracy'])  from keras.preprocessing.image import ImageDataGenerator  train_datagen = ImageDataGenerator(rescale=1./255,                 shear_range = 0.2,                  zoom_range = 0.2,                  horizontal_flip = True)  test_datagen = ImageDataGenerator(rescale=1./255)  training_set = train_datagen.flow_from_directory('Data_Training',                                                  target_size = (64, 64),                                                 batch_size = 32,                                                 class_mode = 'categorical')  test_set = test_datagen.flow_from_directory('Data_Testing',                                             target_size = (64, 64),                                             batch_size = 32,                                             class_mode = 'categorical')  setIdentifier.fit_generator(training_set,                                  steps_per_epoch = 486,                                 epochs = 50,                                  validation_data = test_set,                                 validation_steps = 60,                                 callbacks = callbacks_list)  setIdentifier.save("setIdentifier.h5")   The file 'Data_Training' has a folder "notSet" and a folder "Set", and the file 'Data_Testing' likewise. There are two times as many "notSets" than "Sets" in each category.  No matter what I do, in both training and testing phases, the output is always notSet. I am not sure what is the cause for this.  I have tried a binary_classifier with the sigmoid activation function and final density layer with 1 node. I have tried changing activation functions and using leakyRelus.  I have double checked my training steps and test steps. I have 5184 sets + 2 * 5184 notSet = 15552 train images, which when divided by a batch size of 32 gets me 486 steps. I have 648 sets + 2 * 648 notSet = 60.75 >> rounded to 60 validation steps.  I am confused by what is going on with the neural network - why isn't anything approving and why is it labelling everything with one class?  For more info, here is the Github repo which includes the training images:   Any help is appreciated!

I'm training a neural network but the training loss doesn't decrease. How can I fix this?  I'm not asking about overfitting or regularization. I'm asking about how to solve the problem where my network's performance doesn't improve on the training set.    This question is intentionally general so that other questions about how to train a neural network can be closed as a duplicate of this one, with the attitude that "if you give a man a fish you feed him for a day, but if you teach a man to fish, you can feed him for the rest of his life." See this Meta thread for a discussion:   If your neural network does not generalize well, see:


Can somebody please explain to me how to create a desktop shortcut to an application like Chrome or Blender as if I'm an idiot? I really don't get it. I have the gnome panel program thing and can run it (see image) but after that I'm lost.

In older versions it was easy to create a launcher on my desktop. All I had to do is right click on my desktop and select the "create launcher" option.  How can I create such launchers now?


I've found by the ratio test that the following series is convergent, however I am struggling to find the value of the sum. Could anyone suggest where to go from here to find the sum?  $\sum_{i=0}^\infty \frac{i}{4^i} = $  Thanks in advance.  PS - This is the answer via

How can I evaluate $$\sum_{n=1}^\infty\frac{2n}{3^{n+1}}$$? I know the answer thanks to , but I'm more concerned with how I can derive that answer. It cites tests to prove that it is convergent, but my class has never learned these before. So I feel that there must be a simpler method.  In general, how can I evaluate $$\sum_{n=0}^\infty (n+1)x^n?$$


Got a new Asus laptop with Windows 10 is always getting pounded by Disk usage = 100% when starting, booting, and then at various points of the day.  I reformatted my windows 10 machine to try to fix it. It was much faster for a few days then got slow again. I have scanned the machine, no viruses or malware that I know of.  I see all sorts of Disk pounders like:   Microsoft Compatibility Telemetry Cortana Superfetch Search indexer WMI Other Service Hosts like Windows Event Log Antimalware executable    There may be more to this list, and I only see Windows-system executables and services. Once again, no reason to believe I have malware. Fresh system here.   This being a vanilla system with only Starcraft 2 installed is totally killing me how it's so slow upon startup/standby. My mac and linux machines do not suffer this affliction.   Is anyone else dealing with this on the regular? How can I get my windows PC so that it comes back from standby without having disk usage shoot up to 100% for several minutes? I'm about to leave Windows forever. Could it somehow be my laptop hard drive in the Asus N550JX?  I have read each of the following and verified that I am not afflicted by any of the things listed in these other posts:     This post talks about windows 8 and is about a system that was used for a while getting worse over time. Mine is a vanilla system.      I do not have ACHI devices      I already have an SSD that came with this laptop.

I've a windows 10 copy running in my core i5 second gen laptop. Now there is this issue where the hard disk usage goes to 100% and the system doesn't respond for a few seconds to even few minutes. I've run process monitor, resource monitor and found that the system uses the disk so much. This doesn't happen when the pc is on idle rather, if I open a folder or any other window, the hard disk usage spikes to 100% and be there for a long time! which is unusual.   I looked at the event log and there I saw a lot of events with the following message.  The start type of the Windows Modules Installer service was changed from demand start to auto start   I couldn't find what is wrong with the system. I use bitdefender 2015 antivirus and tried switching it off. Then again I disabled windows search, indexing service and all possible solutions I could find over the internet. Installed Ccleaner and did a registry clean and a system cleanup. Nothing worked and now the system is unusable! I cannot re - install windows since I don't have most of the software I've already installed.   If it helps the laptop is a Dell Inspiron n5110. Please help me..


I want to capture the exit status of a command that takes place somewhere in a pipeline before the last position.  For example, if the pipeline is something like  command_1 ... | command_2 ... | command_3 ... | ... | command_n   ...I would like to know how to capture the exit status of command_1, or of command_2, or of command_3, etc.  (Capturing the exit status of command_n is trivial, of course.)  Also, in case it matters, this pipeline is occurring inside a zsh shell function.    I tried to capture the exit status of command_1 with something like  function_with_pipeline () {      local command_1_status=-999999  # sentinel value      { command_1 ...; command_1_status=$? } | command_2 ... | ... | command_n     ...  }   ...but after running the pipeline, the value of the command_1_status variable was still the sentinel value.    FWIW, here's a working example, where the pipeline has only two commands:  foo ... | grep ...   foo is a function defined for the sake of this example, like so:  foo () {      (( $1 & 1 )) && echo "a non-neglible message"     (( $1 & 2 )) && echo "a negligible message"     (( $1 & 4 )) && echo "error message" >&2      return $(( ( $1 & 4 ) >> 2 )) }   The goal is to capture the exit status of the call to foo in the pipeline.  The function function_with_pipeline implements the (ultimately ineffective) strategy I described above to do this:  function_with_pipeline () {      local foo_status=-999999  # sentinel value      { foo $1; foo_status=$? } | grep -v "a negligible message"      printf '%d\ndesired: %d; actual: %d\n\n' $1 $(( ( $1 & 4 ) >> 2 )) $foo_status  }   The loop below exercises the function_with_pipeline function.  The output shows that the value of the local variable foo_status ends up no different from how it started.  for i in $(seq 0 7) do     function_with_pipeline $i done # 0 # desired: 0; actual: -999999 #  # a non-neglible message # 1 # desired: 0; actual: -999999 #  # 2 # desired: 0; actual: -999999 #  # a non-neglible message # 3 # desired: 0; actual: -999999 #  # error message # 4 # desired: 1; actual: -999999 #  # error message # a non-neglible message # 5 # desired: 1; actual: -999999 #  # error message # 6 # desired: 1; actual: -999999 #  # error message # a non-neglible message # 7 # desired: 1; actual: -999999 #   I get the same results if I omit the local declaration in the definition of foo_status.

I have two processes foo and bar, connected with a pipe:  $ foo | bar   bar always exits 0; I'm interested in the exit code of foo. Is there any way to get at it?


I am seeing a weird issue with my laptop installed with Ubuntu. When I log in and enter a terminal, I am missing groups:  ~$ groups ant   If I explicitly specify the username, I see all the groups:  ~$ groups ant ant : ant adm cdrom sudo dip plugdev lpadmin sambashare docker   The effect this has is that (e.g.) I cannot run docker commands in the shell. However, if I su into a new session, I do get the groups and docker commands run fine:  ~$ su ant Password:  ~$ groups ant adm cdrom sudo dip plugdev lpadmin sambashare docker   This only started happening this morning after a fresh reboot, and I'm not sure what I could have done to have broken things. Only thing that stands out is that I installed openvpn prior to the reboot.  Any ideas on how to solve this would be gratefully recieved!

Ubuntu 16.04.5  Very weird situation - after Xorg crash, now every time when I login into Unity, my user account doesn't have it's system groups like adm, sudo, plugdev, fuse etc. But when I login on virtual console (Alt+F1) or over SSH - all my additional groups are there, as reported by id command.  Neither of /etc/group* or /etc/gshadow* files have changed, my user is still listed there in many system groups.  It looks like some systemd session parameters for GUI logins or lightdm cache files got screwed. But I have no idea where to start looking..  A lightdm log:  $ journalctl -au lightdm  -- Reboot -- systemd[1]: Starting Light Display Manager... systemd[1]: Started Light Display Manager. lightdm[3223]: pam_kwallet5(lightdm-greeter:setcred): (null): pam_sm_setcred lightdm[3223]: pam_unix(lightdm-greeter:session): session opened for user lightdm by (uid=0) lightdm[3345]: pam_succeed_if(lightdm:auth): requirement "user ingroup nopasswdlogin" not met by user "chm" lightdm[4867]: pam_ecryptfs: Passphrase file wrapped lightdm[3345]: pam_kwallet5(lightdm:auth): (null): pam_sm_authenticate lightdm[3345]: pam_kwallet5(lightdm:setcred): pam_kwallet5: pam_sm_setcred lightdm[3345]: pam_unix(lightdm:session): session opened for user chm by (uid=0) lightdm[3046]: Error writing to daemon: Bad file descriptor lightdm[3046]: Error writing to daemon: Bad file descriptor lightdm[3046]: Error writing to daemon: Bad file descriptor lightdm[3046]: Failed to write utmpx: Permission denied


My current cumulative GPA is 3.875. When filling in my information on an online job-site, I can only choose between entering 3.9 or 3.8. In this case, should I round up to 3.9 or round down to 3.8?

I am applying for a master's program in the US and am not sure how I should present my GPA ethically when discussing it. I have an undergrad total GPA of 3.394 and when asked to put in my undergrad GPA it only gives room for 2 digits and nothing more. EX: 3.0. Can I round up my GPA since it's so close to 3.4, or would this be unethical and I should round down to 3.3?  To make this as general as possible: How should one round their GPA when only 2 digits are accepted, and they're less than .05 away from the next digit?


I have Ubuntu 17.10 and I have . I need to check it with older driver (v375), but there are only version 384, 387 and 390 in Ubuntu repositories. I can download the driver directly from NVidia site, but how to install it without breaking my system? And with possibility to revert to drivers from Ubuntu repository in the future?  And, I need to check some older kernel version as well.

I just ordered the Nvidia GTX card. I have a dilemma, though. Should I keep using the driver which is available in "additional drivers" in Ubuntu, or should I install the driver from the Nvidia site?  So which driver is the best for me?


I am getting the following error message from the Ubuntu software centre when trying to install Skype for Linux on my Ubuntu 13.04 64 but system:  Requires installation of untrusted package : gcc-4.7-base:i386 libavahi-client3:i386 libavahi-common-data:i386 libavahi-common3:i386 libcomerr2:i386 libcups2:i386 libexpat1:i386 libffi6:i386 libfontconfig1:i386 libfreetype6:i386 libgcc1:i386 libglib2.0-0:i386 libgpg-error0:i386 libgssapi-krb5-2:i386 libgstreamer-plugins-base0.10-0:i386 libgstreamer0.10-0:i386 libice6:i386 libjbig0:i386 libjpeg8:i386 libk5crypto3:i386 libkeyutils1:i386 libkrb5-3:i386 libkrb5support0:i386 liblcms1:i386 libllvm3.2:i386 liblzma5:i386 libmng1:i386 liborc-0.4-0:i386 libp11-kit0:i386 libpciaccess0:i386 libpcre3:i386 libpng12-0:i386 libqtwebkit4:i386 libselinux1:i386 libsm6:i386 libsqlite3-0:i386 libstdc++6:i386 libtasn1-3:i386 libtxc-dxtn-s2tc0:i386 libuuid1:i386 libxau6:i386 libxdamage1:i386 libxdmcp6:i386 libxslt1.1:i386 libxss1:i386 zlib1g:i386  can anybody help?  Dear all - many thanks for your rapid responses. The answer provided by Qasim did the trick. Probably the other solutions were good too, but I may not have pressed the right buttons when trying them; Copy-pasting Qasim's commands into the terminal worked like a miracle - I had stuff scrolling down the screen for about 5 minutes but then Skype installed and I have already had my first conversation. Long live the AskUbuntu community. Cheers

I tried installing VLC Player yesterday, and I got the Requires installation of untrusted packages error.  I searched for hours for a solution to this problem, and finally came upon a suggestion that said to change servers for downloading updates from.  I did this, and it gave me a 404 error when I clicked on "Check" in the Update Manager.  I tried switching my server back to the main one (and after that, several other ones), but I am now still getting a 404 error:   And the other error I get when downloading or updating:   Edit: Output of cat /etc/apt/sources.list:  deb-src http://us.archive.ubuntu.com/ubuntu/ precise main restricted #Added by software-properties  # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. deb http://us.archive.ubuntu.com/ubuntu/ precise main restricted multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ precise multiverse universe #Added by software-properties  ## Major bug fix updates produced after the final release of the ## distribution. deb http://us.archive.ubuntu.com/ubuntu/ precise-updates main restricted multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ precise-updates restricted main multiverse universe #Added by software-properties  ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team. Also, please note that software in universe WILL NOT receive any ## review or updates from the Ubuntu security team. deb http://us.archive.ubuntu.com/ubuntu/ precise universe deb http://us.archive.ubuntu.com/ubuntu/ precise-updates universe  ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu  ## team, and may not be under a free licence. Please satisfy yourself as to  ## your rights to use the software. Also, please note that software in  ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team.  ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. deb http://us.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse #Added by software-properties  deb http://us.archive.ubuntu.com/ubuntu/ precise-security main restricted multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ precise-security restricted main multiverse universe #Added by software-properties deb http://us.archive.ubuntu.com/ubuntu/ precise-security universe  ## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. ## This software is not part of Ubuntu, but is offered by Canonical and the ## respective vendors as a service to Ubuntu users. deb http://archive.canonical.com/ubuntu precise partner deb-src http://archive.canonical.com/ubuntu precise partner  ## This software is not part of Ubuntu, but is offered by third-party ## developers who want to ship their latest software.


The Enlightened Magic feature of the  (DMG, p. 222) allows for 10th-level spell slots per .  Nothing seems to disallow level 10 spell slots, but would the spells cast with these slots assume level 10? There are two relevant rules as far as I'm aware. The section on  says:     When a spellcaster casts a spell using a slot that is of a higher level than the spell, the spell assumes the higher level for that casting.    However, the section  says:     Every spell has a level from 0 to 9.    These seem to contradict if the case of a 10th-level spell slot with Enlightened Magic would allow for level 10 spells considering the definition of spell level.  Since Spell Level is defined between 0 and 9, what happens to a spell's level if you cast a spell with a 10th-level spell slot?

The artifact Book of Exalted Deeds, DMG p. 222, has the following attribute:     Enlightened Magic. Once you've read and studied   the book, any spell slot you expend to cast a cleric or   paladin spell counts as a spell slot of one level higher.    Therefore, if a level 17+ cleric were to read this book and subsequently cast a spell that scales with slot level, such as Cure Wounds - would he be able to cast the spell at "10th level"?  Cure Wounds:     [...] When you cast this spell using a spell slot of 2nd level or higher, the healing increases by 1d8 for each slot level above 1st.   9th-level slot: 1d8 + 8*1d8 = 9d8 9th-level slot with the Book of Exalted Deeds: 1d8 + 9d8 = 10d8?    Clarification: stating that there currently is no explicit mention of 10th-level slots or spells is not helpful, I'm fully aware of that - it's the whole point of this question.  Therefore, unless you can provide a reference to an official source that explicitly disallows 10th-level spell slots, please refrain from answering. Note that, while they're generally not considered official, a quote from any designer (not just Crawford), will suffice.


I have read that many times that a compiler translate a high level code into machine language and whenever I google "machine language" it tells me it is the assembly language. On the other hand when I opened a hello world app written in c++ with notepad it showed me something which was anything but assembly. What actually is the secret behind this stuff and also where did the binary and bits come in? Please solve my confusion.

What is the difference between object code, machine code and assembly code?  Can you give a visual example of their difference?


I found a site which is working exactly like Stack Overflow. Should I report that to Stack Exchange? If so, how?

of Stack Overflow, all content posted on Stack Exchange sites by their users (i.e. you wonderful people) has been provided to the whole universe under . For my fellow non-lawyers, that license basically means:   Anyone can use any Stack Exchange posts at any time without having to ask for permission Making money off of the copied content is permitted You don't even have to copy stuff from here verbatim; you can just use it as a starting point and make whatever edits you want There are just two rules you have to follow:   You have to provide . Simple links to the original post and author info are just fine. You have to  and allow other people to use your content, as long as they follow these very same rules. How meta!    (If you ever forget any of that, and want to refresh your memory, the license info is linked to in the footer of every page.)  There are, in fact, a lot of people who republish varying amounts of our content for assorted reasons. Unfortunately, there are some Stack Content Republishers Attributing Poorly and/or Excelling at Ranking (SCRAPERs, for short).  In this context, "attributing poorly" means any use that doesn't follow our attribution rules or make any other reasonable attempt at give credit. This can get pretty egregious; I've seen SCRAPERs that not only don't link back to SE originals, but also use fake author info and post dates to make it harder to find originals. By "excelling at ranking," I'm referring to copycat sites that end up higher in Google results than the original SE sites do for the same content. That's not necessarily wrong, but in some cases, it indicates inappropriate SEO hackery.  So, the question is: what can you do if you spot a SCRAPER?


Looking for a word that describes a person who disliked other humans.A misogynist hates women, what do we call someone who dislikes people in general?

What do you call a person who hates everyone but himself? I'm looking for a single word for this.


I am using Ubuntu 14.04 as a virtual machine. During installation of a previously installed library in the terminal, I found I have 274 packages not upgraded.  How do I upgrade them?  Do I have to upgrade them one by one?

I wanted to update Ubuntu manually, because I used CDMA USB modem and connected using wvdial, but it won't able to update Ubuntu via Update Manager, because my Ubuntu won't showing "Connected" message via network-manager.  Can I update Ubuntu manually? Am I should download separate files, or use terminal instead?


I have following elements: $A$, $B$, $C$, $D$, $E$ and I want to find all permutations, including the ones where some elements from the set are not included in the permutation (For example $(C, D)$ or $(E, A, C)$). When all elements are respected in the permutations, then the answer would be simply $5!$. But how can I find the 'true' number of permutations?

We can see subsets as combinations of unspecified length of a set's elements, and there are, of course,   $$\sum_{k=0}^n {n \choose k}=2^n$$   subsets of a set with $n$ elements.  I was wondering whether there is a neat expression (analogous to $2^n$) for  the number of permutations of unspecified length of the elements of a set.    For example, if we have five distinct items, the number of permutations for each possible length is given below; the total number of permutations (i.e., of unspecified length) would simply be the sum of these numbers.        Length of permutation | Number of permutations       ----------------------------------------------           0                 |    1           1                 |    5           2                 |    5⋅4           3                 |    5⋅4⋅3           4                 |    5⋅4⋅3⋅2           5                 |    5⋅4⋅3⋅2⋅1   Of course we can express the total number of permutations of unspecified length of $n$ items as $\displaystyle\sum_{k=0}^n {}_n\text P_k$ but is there is a neater expression that this sum evaluates to, or at least a conventional notation for this number?


What are these points as shown in the pictures

Whenever you type ls -a into the command prompt, you usually get all of your folders, files, and then you see that the first two entries are . and ..  Just curious, but what is the significance of these two entries?


I am new to the field and learned about scaling (by z score transformation) of data. While it seems a super useful and universal technique, I have learned that no technique is applicable to each and every problem.  In what cases would scaling do more harm than good?

My understanding is that when some features have different ranges in their values (for example, imagine one feature being the age of a person and another one being their salary in USD) will affect negatively algorithms because the feature with bigger values will take more influence, is it a good practice to simply ALWAYS scale/normalize the data?  It looks to me that if the values are already similar among then, then normalizing them will have little effect, but if the values are very different normalization will help, however it feels too simple to be true :)  Am I missing something? Are there situations/algorithms were actually it is desirable to let some features to deliberately outweigh others?


Linear algebra studies mapping between vector spaces. But, when these mappings are non-linear, what is the branch of mathematics that studies them? The term linear algebra somehow implies that it is a special case of a more general algebra, but I've never come across a such thing.  To give a particular example, the problem I'm mostly interested in is:  Given a matrix $A$ with size $3 \times 2$ and some input coordinates $[x, y]^T$, linear algebra tells us that   the coordinates are mapped to a $3$-dimensional space the mapping looks something like $[2x, 3y+x, y+1]$ the set of all possible $(x, y)$ pairs produces a $2$-dimensional plane in the $3$-dimensional space   But, what if my mapping was not linear? Let's say I map $(x, y)$ to $[x^2 + y, \sin(x/y), \exp(y)]$. What does that produce in the new $3$-dimensional space and what does it look like? (it seems to produce a $2$-dimensional manifold of unpredictable shape). What branch of mathematics do I need to study to better understand the geometry of non-linear mappings/spaces/operators?  In case it's relevant: I mostly motivated by machine learning, where this kind of mapping comes up in various cases, from linear regression in "feature spaces" to support vector machines.

Linear algebra studies vector spaces and linear mappings between those spaces.  What tools do we use for NON-linear mappings between vector spaces?


This is 's defense of competition:     It is best for the race, because it insures the survival of the fittest in every department.   What is the function of the prepositional phrase "in every department" here?   It modifies "the fittest". (the fittest in every department) It modifies the verb "insures". (to insure X in every department)

I am having a debate with someone about possible interpretations of a sentence and we have come to a stalemate. The sentence is as follows:      "I'm at home eating vegan cheese in my underpants and singing Bushes   of Love."   The other party argues that my sentence technically says that I am eating vegan cheese which is inside my underpants, when the intended meaning was that I am eating vegan cheese while wearing underpants.   My argument is that his interpretation of the sentence makes no sense, but I can't quite find an actual rule to refer to. I could see it making more sense if I had an article in front of vegan cheese, like "I'm at home eating the vegan cheese in my underpants and singing Bushes of Love".   But as it is without an article if I did intend to say that the vegan cheese was in my underpants, the way I said it would sound very wrong. It seems to me that without an article in front of vegan cheese it was used as a mass noun, uncountable and therefore interpreting it as being a countable chunk of vegan cheese that could be in anything in any subsequent part of the sentence seems wrong.   His argument is that the problem is in the ordering - that while with some common sense my actual meaning might be clear, the sentence was grammatically incorrect and I technically said that the vegan cheese was in my underpants because I should have said "I am in my underpants eating vegan cheese".  Is there a rule I can refer to when it comes to accurate ways to interpret this sentence? Which one of us is correct? Could the vegan cheese really be in my underpants?     Research I have done:  My attempts to find a concrete rule that might be relevant to this scenario led me to the following resources. To me none of these resources suggested that my sentence was technically incorrect. However, because I still was not sure what specific rule I could reference for him or if I was missing a specific rule proving me wrong our debate continued. This is why I decided to ask the question here.   Cambridge Dictionary on adverb positioning in sentences:  Grammar Quick and Dirty Tips on when to use articles in front of nouns, and mass nouns:  Linguapress on word order and sentence structure in English:  Transparent Language on word order in Russian (Russian is my first language and the other party suggested in passing that what he considered my mistake might be related to different word order conventions in non-English languages):


I want to spawn a pre-tamed black cat and name it "Suki I" and have a black baby cat named "Suki II". How do you do said action without spawn eggs?

Is it possible to spawn already tamed ocelots a.k.a cats/kittens? Or spawn ocelots that are already in 'begging mode'?


$\newcommand{\d}{\mathrm{d}}$My friend give me an integral exercise, which says that:  Give area $D$ which is edged by line $x+y=1$ and $x$ axis and $y$ axis. Now calculate $$\iint_{D}\exp({\frac{y}{x+y}})\,\d x\,\d y.$$  I find that when $(x=0) \land (y=0)$, $\exp(\frac{y}{x+y})$ is not defined, and I don't know if it is integrable. Additionally, I notice that $\iint_{D}\exp({\frac{y}{x+y}})\,\d x\,\d y = \iint_{D}\exp({\frac{x}{x+y}})\,\d x\,\d y$, and assume the result is $S$, we can know that \begin{align} S &= \frac{1}{2}\Bigg(\iint_{D}\exp({\frac{y}{x+y}})\,\d x\,\d y + \iint_{D}\exp({\frac{x}{x+y}})\,\d x \,\d y\Bigg) \\ &= \frac{1}{2}\iint_{D}\exp({\frac{y}{x+y}}) + \exp(\frac{x}{x+y})\,\d x\,\d y, \end{align} I try to use Green Theorem, and I try to calculate $Q=\int \exp(\frac{x}{x+y})\,\d x$ and $P=\int \exp(\frac{y}{x+y})\,\d x$, I try to construct the $\iint_{D} (\frac{\partial Q}{\partial x} -\frac{\partial P}{\partial y} )\,\d x\,\d y$. But I find that I can't calculate $P$ and $Q$. Now, I have two question:  Is this exercise integrable?  How to calculate it? or how to modify my try on calculating?   ps：Thanks @StubburnAtom for your reminders. However, I find the answer of @Quanto in my question is different from all of other answers under those similar questions. So, if anyone find this question of mine, you can try to find all of other questions and find the answers there, and you can also look at the answer under this question, it is also a very good answer.

Using the transformation $x+y = u$, $y = uv$, show that $$\displaystyle \int_{0}^{1}\int_{0}^{1-x} e^{\frac{y}{x+y}} \, dydx = \frac{e-1}{2}.$$  In above question. I am stuck in finding limits after transformation. My approach : $u = x + y$, $v = \frac{y} {x+y}$ I have calculated Jacobian of transformation which is $u$. Please help me in finding limits of integration.


In the context of a list of items, the process of creating copies of something can be called duplication, but is there a single word for the process of removing duplicates to create a list of unique items?  I'm open to any other ways of expressing this eg:  (Adjective + list) - expressing the state of the list before and after removing duplicates. (for the after state, I feel like I could use unique list, but what would I call it in the before-removal-of-duplicates stage?)  Note that I'm not talking about duplication of the entire list i.e. "duplicated list", I'm talking about a list that has duplicated elements that should be removed

I'm working on a program that essentially removes all duplicates from a list, i.e. reducing the list to its unique components. Is there a single word or small compound word that conveys this transformation?


I used the information here  to install gcc/g++ 10 on Ubuntu 20 and when I try to do it again: sudo apt install g++-10  Reading package lists... Done Building dependency tree        Reading state information... Done g++-10 is already the newest version (10.2.0-5ubuntu1~20.04). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.  but when I ask for the version: g++ --version  g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions.  There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  Why is that and how can I fix it? Update However when I try: g++-10 --version  g++-10 (Ubuntu 10.2.0-5ubuntu1~20.04) 10.2.0 Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions.  There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  It seems like g++10 is installed and usable under the name g++-10 but how can I make it the default g++ compiler?

g++ --version on my home machine reads 7.4.0, but a server I frequently do work on shows 4.8.5. Their servers don't support -std=c++11 compiler flags yet my home machine does. The most recent flag it does support is -std=c++0x.  However, sometimes when I write code on my home machine, compile with -std=c++0x flag without error, I will get errors if I brought it over to the server's local computers. Interestingly, SSHing to their servers does not show issues.  I'm not entirely sure what to make of this, I'm thinking my local machine may be ignoring the -std=c++0x flag because I have a newer version. Is there a way to force a specific version?  If it makes any difference, I am using Windows 10 with LXSS (Ubuntu) and the server I am connecting to is using Redhat.


I have come across  which may answer the question, but why on Earth would the answerer provide their solution in French? Meanwhile, the question is in English and I see no request for a French answer, there is an accepted answer with 7 upvotes and a duplicate one. I mean, if all of us start providing answers in different languages, SO would become a mess. Shouldn't some language guidelines be followed?  I went to investigate other answers of  and it seems that his other answers are a bit irrelevant to the questions. I am not a C# expert so I shouldn't really judge, but those answers are low-quality (can't bear the truth).  I have flagged  for moderator's attention, giving a custom reason, but I'm not sure that's the right thing to do.   It's a bit of a strange case, so I would appreciate any advice on what to do in such cases?   Related:   Related 2:

Otherwise known as  必须用英语吗？(is English required?) ¿Necesito hablar en inglés? ?האם אני חייב לכתוב באנגלית Muss ich auf Englisch schreiben?  Do I have to use English when posting a question, an answer or a comment on a Stack Exchange site?


I'm working on a project, and inside of the project I've separated my own classes and functions into a directory called base_lib. When compiling the project, I keep getting an undefined reference error for one of the classes in this library. I have been trying to find the answer on many different forums and ultimately just decided to ask it myself. The code:  stack.h  #ifndef __STACK_H #define __STACK_H   namespace stacker { /******* My code here  *******/ }   #endif   stack.cpp  #include "stack.h" #include <iostream>  using namespace std;  template <typename var> stacker::Stack<var>::Stack() {     head = nullptr;     tail = nullptr; }   fix.h  #ifndef __FIX_H #define __FIX_H  #include <iostream> #include <string>   namespace fixes { /******* My code here  *******/ }  #endif   fix.cpp  #include "fix.h" #include "base_lib/stack.h" #include <iostream> #include <string>   using namespace std; using namespace stacker;   main.cpp  #include <iostream> #include "fix.h" #include "base_lib/functions.h"  using namespace fixes; using namespace mine; using namespace std;   The compiler error  C:\...:fix.cpp:(.text+0xa2): undefined reference to `stacker::Stack<char>::Stack()' ...   Does anyone have any tips or tricks?

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


Okay am I going crazy? Run the code below, instead of being 3480 it says 3479, is this a bug? every other number works fine def validate_dollar(dollar):     return dollar * 100 % 1 == 0  def safe_dollar_to_cent(dollar):     if validate_dollar(dollar):         return {'success': True, 'cents': int(dollar*100)}     else:         return {'success': False, 'msg': 'Malformed input'}  print(safe_dollar_to_cent(34.8))  print(int(34.8 * 100))

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


I have already install windows 7 and ubuntu in my pc, but now I want to install windows server 2012 in same computer. Is it possible?

How many operating systems are allowed in a single computer. Is any extra RAM is need for each extra operating system?


The Graviturgy Wizard's Gravity Well feature lets the caster move creatures when casting spells:  You’ve learned how to manipulate gravity around a living being: whenever you cast a spell on a creature, you can move the target 5 feet to an unoccupied space of your choice if the target is willing to move, the spell hits it with an attack, or it fails a saving throw against the spell.  Can this ability be combined with the Web spell? I'm unclear when and how exactly Gravity Triggers.  Web: Each creature that starts its turn in the webs or that enters them during its turn must make a Dexterity saving throw. On a failed save, the creature is Restrained as long as it remains in the webs or until it breaks free.  The main issue is that the saving throw happens on the creature's turn, so it might not trigger Gravity Well. Additionally, if a friendly creature is in the area where Web is cast and willing to move, can it do so? It's not clear to me whether Web is considered cast "on the creature" or not.

The  feature from the  (EGtW, p. 185) triggers "whenever you cast a spell on a creature", and has an effect "if the target is willing to move, the spell hits it with an attack, or it fails a saving throw against the spell." It's not clear to me what kinds of spells can actually trigger this feature. Based on the singular phrasing of "on a creature" and the later use of the word "target", I would normally read this as only applying to spells that explicitly target creatures (and perhaps only those with a single target, in contrast to the phrasing of the  feature of the  wizard, for example). However, spells that target a location can use the word target in a different sense (see ). What's actually going on here? Does this feature only work on targeted spells? Or does it function for area of effect spells as well? Or is this just an ambiguous phrasing that will rely on the DM's ruling?


Often I read questions asking how to remove the gap between two \hlines in a table, but I like the gap and want to create it in the \hline as well, to have an equal effect for the column and row titles.  The code below makes a standard table  \documentclass{article} \begin{document} \begin{center} \begin{tabular}{|c||c|c|c|}\hline & A & B & C\\\hline\hline A & 1 & 2 & 3\\\hline B & 4 & 5 & 6\\\hline C & 7 & 8 & 9\\\hline \end{tabular} \end{center} \end{document}   The image shows what I am trying to accomplish.     Does a simple way to create this table exsist?

I want my table to have separated cells. Basically double lines but I can't figure how to have horizontal lines disconnected. I tried \hline and \cline but those connect too.  This is best I can do:    This is how I want my table to look:   \begin{tabular}{|c||c||c||c|}   \hline   \multicolumn{2}{|c||}{First Cell}&   Second Cell&   Third Cell\\   \hline   \hline   \begin{tabular}{@{}l@{}} Data\\ Data\\ Data\\   \end{tabular}&   \begin{tabular}{@{}l@{}}     Data\\     Data\\     Data\\   \end{tabular}&   \begin{tabular}{@{}l@{}}     Data\\     Data\\     Data\\   \end{tabular}&   \begin{tabular}{@{}l@{}}     Data\\     Data\\     Data\\   \end{tabular}\\    \hline  \end{tabular}


In S07 E04 Littlefinger presents Brandon Stark with a dagger used by the assassin. Brandon asks "Do you know who this belongs to?" and Littlefinger says "No, that very question is what started the War of the Five Kings".  In the first season Littlefinger admits that it was his dagger but won from him by Tyrion Lannister, thereby implicating Tyrion as trying to murder a Stark.  Does this mean Littlefinger lied to Catelyn Stark in order to start a civil war?

Up until near the end of season four we're led to believe Cersei or Jaime had Jon Arryn — previous Hand of the King — murdered to cover up Cersei's offspring being the product of incest, yet in the episode First of His Name      Lysa Arryn admits to poisoning Jon (her then husband) after being prodded to do so by Petyr Baelish, aka Littlefinger.   The prodder always has a reason for doing something even if it's rarely obvious. What purpose was served by killing Jon Arryn?


Trying to learn how to deploy server apps on Google App Engine using their conference example.  In the example code, I see following line      # create Conference & return (modified) ConferenceForm     Conference(**data).put()   where  1. Conference is a class derived from ndb.Model with a list of members (see end of the question for its definition)   data is a dictionary in which some keys are identical to the names of the members of Conference   So, basically it looks like above code is creating an instance of the Conference class with values set to the values associated with the keys in the dictionary data.  Is this a general Python code (i.e creating an instance of a class whose values are initialized with values from a dictionary) or is there something in the ndb.Model init function that uses gettattr/setattr to accomplish above?  definition of Conference class  class Conference(ndb.Model):     """Conference -- Conference object"""     name            = ndb.StringProperty(required=True)     description     = ndb.StringProperty()     organizerUserId = ndb.StringProperty()     topics          = ndb.StringProperty(repeated=True)     city            = ndb.StringProperty()     startDate       = ndb.DateProperty()     month           = ndb.IntegerProperty()     endDate         = ndb.DateProperty()

In the following method definitions, what does the * and ** do for param2?  def foo(param1, *param2): def bar(param1, **param2):


What is the meaning of $\lor$ and $\land$ in the following function:$$\phi(x):= (x\land1)\lor(-1)$$ To give a little context, this should be a bounded transformation to bound a correlation estimator to $-1$ and $1$. I know of their use in logic but I've never seen them used like this.

I have a simple question, but it is hard to google it. I have this equation here:  $$y(t, x) = \sum_{i=1}^{d}(|x_i| \wedge t)^{2} $$  Here $x$ is a size $d$ signal and $t$ is just a scalar. I am not sure how to read that equation in english... I understand everything except for how they use the $\wedge$ here...  If context helps, this is part of a cost function, based on a threshold $t$ that is selected, for your vector $x$.


One of my players' characters has a habit of taming random wild animals for use in combat in all the games I've hosted with him in them, and so far I've just had him make a series of Animal Handling checks, with varying DCs depending on the animal. I'm hosting another game with him in it, and I wanted to find out beforehand if I'm doing it right.  Are there any official rules for taming wild animals? Or should I continue what I'm doing already?  For anyone wondering, he is not a , nor is there one in the party.

I'm fairly new to DMing and so is my group, so we are all on a learning curve together. We're playing D&D 5e.  Last week a fighter in our group tamed a wolf with Animal Handling and then requested that he keep the wolf. I allowed this, but now I'm not sure about how to play the wolf.  Specifically, how can he train the wolf to perform certain actions such as attacking?  What other things might I need to be aware of with a PC owning a "pet"?


I tried searching on the web but could not get a clear formula which relates maximum spectral radiancy and temperature of the body ( to which power of temperature it depends). Please tell me , I wasn't able to find it.

As I understand it, Stars emit visible light, OBAFGKMRNS, in the range of $10^3 - 10^4 K$. Yet materials such as steel emit similar frequencies at much lower temps; red is around 800K. Why the difference? I thought black body radiation applies to all materials and environments. I am an interested amateur.


which of the following usage are right ?   1) The life of the rich is as peaceful as that of the poor. 2) the life of the rich is as peaceful as that of the poor's.    3) Your bicycle is as beautiful as that of his. 4) your bicycle is as beautiful as that of him.    now if second sentence is wrong then third sentence should also be wrong.  please explain. I have seen many a time a possessive case followed by "as that of" . so when can we use a possessive case after " as that of"

I came across this sentence:  "His memory was like that of a baby."   I was wondering why the possessive "baby's" wasn't used and why "baby" is acceptable whereas the possessive form is required in this sentence:   "Ian's car was like that of his."


Using an inclusion-exclusion argument prove that   $\sum_{k=0}^{m}(-1)^{k}\binom{m}{k}\binom{n-k}{r} = \binom{n-m}{r-m}$   Assuming $m \leq r \leq n$.  I'm not sure how to begin this, can anyone help me get started?

Use the Inclusion-Exclusion Principle to show that for any non-negative integers $m, r, n$ such that $m≤r≤n$,  $${n-m\choose{r-m}} = \sum_{i=0}^m(-1)^i {m\choose{i}} {n-i\choose{r}} $$   We have had one lecture on the Inclusion-Exclusion Principle and I am really unsure as how to approach this problem.We have done several permutation related exercises from this section but none that have been presented as a proof. Any help is appreciated.


I have a dictionary like this.  d = {'"mn': '800"', '"kl': '700"', '"ng': '1100"'}   How to sort this into descending order. like below  ng,1100  mn,800  kl,700

I have a dictionary of values read from two fields in a database: a string field and a numeric field. The string field is unique, so that is the key of the dictionary.  I can sort on the keys, but how can I sort based on the values?  Note: I have read Stack Overflow question here  and probably could change my code to have a list of dictionaries, but since I do not really need a list of dictionaries I wanted to know if there is a simpler solution to sort either in ascending or descending order.


why do my .exe run on 32bit while windows is on 64bit? is it possible to switch them to 64bits? thanks! If i go to the task manager is have the .exe name followed with (32 bit).

basically I have a windows 8.1 64 bit but when i download a software (e.g. firefox) it´s installed automatically in 32 bit, why and how can i change it ?


$ df -H Filesystem      Size   Used  Avail Capacity iused      ifree %iused  Mounted on /dev/disk1s5    251G    11G    39G    23%  488329 2447612991    0%   / and yet "you have no space to install xcode" 39 gig is no longer enough?

I am trying to update Xcode to 8.0. My OS is 10.11.6 El Capitan. However I am getting:     We could not complete your update   There is not enough disk space available to install the product.   I have got 14.22 GB free space. How much do I need?  UPDATE: I do not know the exact figure, though I did manage to update with 17.21 GB free space later on.


How can I save a command output to a file in real-time?  For example, if my command is python log.py where log.py contains:  import time print('testing') time.sleep(100) # sleeping for 100 seconds   and if I save the output with python log.py | tee command.log or python log.py > command.log, the command.log file typically won't contain the output of python log.py, namely testing, until it finishes executing. Instead, I don't want to have to wait ~100 seconds to be able to view testing in command.log.

I have a script which calls two commands:  long_running_command | print_progress   The long_running_command prints progress but I'm unhappy with it. I'm using print_progress to make it nicer (namely, I print the progress in a single line).  The problem: Connection a pipe to stdout also activates a 4K buffer, so the nice print program gets nothing ... nothing ... nothing ... a whole lot ... :)  How can I disable the 4K buffer for the long_running_command (no, I do not have the source)?


I want to code a personal modloader for minecraft (create files , download files, sort files, etc) and the first window which is created is a JOptionPane which asks for a Version (i do not code in java really long, i don´t use spinner, just a "msg dialog" asking for a version). The code is:  public JOptionPane version = new JOptionPane(); public String modversion;  public Version() {     showVersion(); }  public static void main(String[] args) {  }  public void showVersion() {     //input = version     String vers = version.showInputDialog("Welche Version soll modifiziert werden?");      if (vers.equals(null)) {             return;     } else {          if(vers.equals("1.5.2") || vers.equals("1.6.2") || vers.equals("1.6.4") || vers.equals("1.7.2") || vers.equals("1.7.10") || vers.equals("1.8") || vers.equals("1.8.9") || vers.equals("1.9") || vers.equals("1.10.2") || vers.equals("1.11.2"))         {            //mod version is saved as String (title for the config list)              modversion = vers;             return;         } else  {            // with incompatible input the method will be repeated             JOptionPane.showMessageDialog(null, "Diese Version wird leider nicht supportet");             showVersion();         }     } }   If you just press "Ok", the input would equal "null":  if (vers.equals(null)) {             return;     }   but it don´t quit the method, it says NullPointerException. Why doesn´t it just quit the method?

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?


Is there a way to nicely place a  graphic on a separate new line and  centering it there, without using a \begin{center} environment, which wraps around the graphic ?   I don't want to use that environment, as it produces an indentation in the line after the graphic - see  question of mine for an MWE (attention, graphic is missing as I can't link to a picture on the net, so it won't directly compile).     Alternatively I'd also be happy if someone could provide me with a command that does the same as placing \noindents after each of the \begin{center} environments (an no, a placing a million of those isn't the solution :)).  Thanks.

Is there any way to automatically remove any indentation of text right after \includegraphics or a \begin{center} environment is used ? Consider the following MWE pertaining to the use of \begin{center}:  \documentclass[12pt,a4paper]{article} \usepackage[latin1]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{graphicx} \begin{document} Some text... \includegraphics{some_graphic.png} Moar text...  \begin{center} Some centered text... \par\end{center}  Moar text...  \end{document}   I don't want any of the "moar text" to be automatically indented. Using each time a \noindent is not an option.  ( answered question of mine might be of relevance, since there it is explained how to remove indentation of those lines start star with a specific object - in contrast here indentation has to be removed from those lines which are after some specific objects.)  Thanks a lot for any help!


Recently I installed Ubuntu 16.04 LTS on PC machine alongside with latest Windows 10 OS . Once installation of the Ubuntu is successfully and completed then I need to re-boot the PC machine due to complete installation process . However once the PC machine is switched on the machine is booting up straight into  the Windows 10 OS and will not give me any chance to pick up the OS which I wish to use currently . Fast Boot disabled  , Secure boot disabled , Legacy is Enabled .  Long time ago I was play with oldest Ubuntu versions on my previously PC machine with Windows Vista and there were always a GRUB pre-installed which allowed me to choose different OS .  In recent machine there all is  messed up and I can't figure out what I should to do in order to get the GRUB and have ability to choice demanded OS during booting process .  I'm not good enough with a Linux but I keep trying with it as I feel it is really great thing to play with . Would be any one of you guys patient enough to explain me what to do in order to get things right .Please .  My PC Machine is HP Envy 700 , with one HDD (Windows 10 alongside with Ubuntu 16.04 LTS )  Thank you so much for any suggestion . Thank you !

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