One of my friends' side tab disappeared. Does anyone know how to get it back?

I opened a blend file and the far right properties panel is completely gone.  The only way I an access it is to change either the top or bottom info bar to the properties but I want it to the generic way, where I have all three panels on my screen. There's no other option to add a side panel that I can find and I'm getting extremely frustrated because when I open a new file, all my windows are there, but this one file just won't open with the freaking side panel!


I'm using Ubuntu Studio - Xenial Xerus 16.04.3 LTS and want to install Skype for Linux.  When I drag the Skype installer to the terminal I get the following message:  serafims@SATELLITE-C50-B:~$ '/home/serafims/Downloads/skypeforlinux-64.deb'  /home/serafims/Downloads/skypeforlinux-64.deb: line 1: syntax error near unexpected token `newline' /home/serafims/Downloads/skypeforlinux-64.deb: line 1: '!arch'   What can I do to resolve this issue?

I want to install Skype, but I can't locate it in Software Center or by using Synaptic Package Manager. Can anyone help me?


In salesforce community builder how can I get the properties and attributes menu for custom lightning components as we have for standard lightning components as shown in the picture that I have for search?

I want to expose some properties in the Lightning App Builder that can be set and passed to my component.  At present I don't have the proper code and so I am getting this screen.    Say I wanted to have a property called PostalCode how would I set this up within my component to provide a text box within the App Builder to set this value for the component?  Right now I have a standard Attribute for Postal Code and its not displaying a property.      <aura:attribute name="PostalCode" type="String"/>   Is there an additional attribute or completely different tag I should be using to set this up?


So, I have this question (as seen in the picture) and I am curious how would I go about approaching it. Initially, I thought to use convolution but I don't think this is a valid approach because after finding the marginals, I found that they didn't satisfy a condition of independence. What are other things I could do? I read about change of variables, but I don't really have a great understanding of it... if someone could provide an example or something on how to do the question, it would be great]

So, I have this question:    And, what I have tried so far is I let $z_1 = \frac{X + Y}{2}$ and let $z_2 = \frac{X - Y}{2}$ to use change of variables for this question. However, when I work this out and plug it into my joint distribution of $X$ and $Y$ above, I end up with the $z_2$ disappearing and only having $z_1$ left in my joint distribution of $z_1$ and $z_2$. So, then when I go to find the marginal for just $z_1$ (which is $\frac{X + Y}{2}$ <- what I am looking for), there is no $z_2$ therefore, integrating wrt to $z_2$, I get $z_2$ just come up (integral of 1). This is an issue because the bounds are from 0 to $\inf$. Obviously, I can't have infinite in my marginal density so what am I doing wrong?   Also, for question 5, I work it out similarly except I let $z_2 = X$ but I just end up with the exact same density as $f_{x,y}$ as seen in question 4 - is that normal? Please help, I been doing this question for a long time trying various dummy transformations.  Also, for question 4, I found the marginals of $x$ and $y$ and realized that the independence consequence (of the product being equal to the joint) is satisfied but using convolution, I get the same issue of my integral coming out to infinite! Thank you for all the help!   EDIT: Am I doing my bounds wrong? the bound for z_2 is from 0 to inf or 0 to z_1?


I am traveling to Ireland later this month and I had the following questions:   I am looking to enter Ireland from Belfast (taking a train from Belfast to Dublin on during end of May). I will be spending half a day in Dublin, a few days in Galway and the last day in Cork after which I will return to London. Since most of the places on the internet say that there is no immigration check between Northern Ireland and Ireland while traveling by train or bus, I am worried that I will not have an entry stamp on my passport. I hope this will not be a problem when I am exiting the country through Cork, or on subsequent return. What should I do in order to get my passport stamped? I will be spending a week in England after that and returning to visit Dublin with my husband on in June once again. Will this be okay? I have a multiple entry BIVS visa with a validity of 6 months.

I am an Indian citizen and have applied for the Standard Visitor visa to the UK, and wish to travel to Ireland by using the BIVS scheme.    Do I need to fill up a separate application for BIVS endorsement or is it handed out automatically?  Also, If I enter the UK, and then travel to Ireland, can I re-enter the UK again?


As you may know, one of the reasons athletes's foot and jock itch fungus are so hard to kill with OTC medicines like Lotrimin and Lamisil is because after you treat it, it is extremely difficult not to reinfect yourself with the fungal spores by re-wearing the same clothes and sleeping in the same bed sheets.  Doing laundry properly is of paramount importance.  I've read on certain sites that in order to kill athlete's foot fungus spores on clothes, you need to wash your laundry with ultra-hot water (140 degrees Fahrenheit).  I have some clothes and a fleece blanket so washing them with hot is not an option because I don't want them to shrink.  So assuming I can't use hot water, what is the best combination to kill the fungus?   Bleach (?) - I've read that bleach will kill fungus such as athlete's foot on hard surfaces, but when used on fabrics it doesn't always penetrate deep enough into the material to completely kill the fungus roots.  I've also read a post where the guy made the following comment:      Bleach removes fungus and mold but also promotes it’s later development... Fungus thrives in high PH environments caused by Bases like bleach... If you must use bleach you should neutralize it with a post acid rinse like vinegar or lemon juice.     Borax Laundry Booster (?) - Some people have said that adding 20 Mule Team Borax to your wash cycle can kill athlete's foot on fabric.  But I've looked at the Borax product packaging and there wasn't any mention of this benefit so I'm a little skeptical. Oxygen bleach (OxiClean ?) -This has also been mentioned, yet I see nothing on the product packaging that says it kills fungus. Vinegar (?) - Vinegar has long been touted as a natural cure for athlete's foot on skin.  Will it work on fabric?  (Note to others: Do NOT mix bleach with vinegar as that can give off toxic gases!) Something else?

Clothing can probably spread fungal infections (e.g. athlete's foot) from person to person. There's  that clothing can spread bacterial infections. But  quote Gebel et al., who write: "Absence of definite evidence for a health hazard is not equivalent to evidence of absence of risk." So, indeed, as Bloomfield et al. write, you might want to sanitize your laundry in certain situations. For example:  if it's full of feces, vomit, or blood, or if someone in the house has a fungal infection (e.g. athlete's foot), or if you encounter .  How can you disinfect your laundry? COVID addendum We're not yet sure how long the pandemic coronavirus (SARS-CoV-2) can survive on clothing.  discusses some theories. In April, a Texas biomedical scientist  that the chances of getting COVID-19 via contaminated clothing were likely quite low. Even today, researchers think that COVID is spread mainly by , not by contaminated clothing. If you're washing the laundry of a likely COVID patient, though, extra precautions are wise; please see my answer below.


Is there any command or any way to know what file system is there on a medium like hard disk or CD/DVD or flash drive etc. From GUI gparted one can know the type on hard disks/pen drive but not of CD/DVD.  I ran the below command to mount my DVD.  ravbholua@ravbholua-Aspire-5315:~/Documents/Other$ sudo mount -t iso9660  /dev/cdrom ~/Downloads mount: block device /dev/sr0 is write-protected, mounting read-only mount: wrong fs type, bad option, bad superblock on /dev/sr0,        missing codepage or helper program, or other error        In some cases useful info is found in syslog - try        dmesg | tail  or so  ravbholua@ravbholua-Aspire-5315:~/Documents/Other$   From the error thrown by mount, I feel that the file system that I had given in the command i.e. 'iso9660' may not be right. From this it strikes my mind to 1st know the f.s. present on the DVD. I'm working on Ubuntu 13.04.

I'm writing a custom automated install using AIF (Arch Installation Framework), and I need to find the filesystem on a partition given a partition.  So far I have this:  grok_partitions () {     local partitions=     for label in `ls /dev/disk/by-label | grep "Arch"`     do         if [ $label == "Arch" ]         then             mount_point="/"         else             IFS="-" read base mount <<< "${label}"             mount_point="/${mount}"         fi          local partition=$(readlink -f /dev/disk/by-label/${label})         local part_no=$(echo ${partition} | grep -Po '\d+')         local fs=$(parted -mls | grep "^${part_no}" | cut -d: -f5)         partitions+="${partition} raw ${label} ${fs};yes;${mount_point};target;no_opts;${label};no_params\n"     done      # do the swap     if [ -e /dev/disk/by-label/swap ]     then         local partition=$(readlink -f /dev/disk/by-label/swap)         partitions+="$partition raw swap swap;yes;no_mountpoint;target;no_opts;swap;no_params"     else         # if there's no labeled swap, use the first one we find         local partition=$(fdisk -l | grep -m1 swap | awk '{ print $1 }')         if [ ! -e $partition ]         then             echo "No swap detected. Giving up."             exit 1         fi         partitions+="$partition raw no_label swap;yes;no_mountpoint;target;no_opts;no_label;no_params"     fi      echo -n ${partitions} }   This worked fine on my machine with only one hard drive, but it failed (obviously) when running in my VM running on a LiveCD (the LiveCD was being picked up as another drive, /dev/sr0).  I've thought of a couple of hacks I could try:   mount $partition; grep $partition /etc/mtab | awk ... use parted -mls, but pull out the partition I care about with clever scripting, then parse as I already do in the scriptt   Is there a better, simpler way of doing this? I already have the partitions I'm interested in, and I only need to find their filesystems (as well as find available swap).


Family debate - one says that uniqueness is relative, others say something either is or is not unique. Does uniqueness mean that there is only one of a certain thing/person, so that it would mean more unusual than rare?

A common grammar lesson that was taught to me in the US and that I've had to teach abroad in EFL classrooms is that we're not to use adverbs of emphasis with absolute modifiers, just as we're not supposed to use them as comparatives or superlatives.  Classic egregious examples of this mistake include very unique and more perfect, which seem obviously flawed to me. Other instances of further modified absolute modifiers are similarly meaningless or contradictory in nature.  I wonder, though, if the rule that I learned isn't overly broad, and whether it's taught similarly in the UK and elsewhere. I find myself modifying absolute modifiers quite regularly, and in some circumstances I think it's not only logical and correct, but quite meaningful. Phrases like almost exactly or virtually all or practically infinite possess a specific meaning that can't really be replicated using nonabsolutes like very nearly or most or quite long.  In my own speech and writing, I use such phrases exactly as I see fit, so this isn't a request for permission, per se. I'm more curious about whether there's a more appropriate rule regarding absolutes that you rely on (and might be used in a classroom).


If our product uses an airplane icon like this one, do we mirror it for our RTL UI?

I am working on a website that has both an English and Arabic version, and the site has a lot of icons. Can I flip all images in right to left direction for the Arabic version as shown below?


If $a$, $a+2$ and $a+4$ are prime numbers then, how can one prove that there is only one solution for $a$?  when, $a=3$  we have, $a+2=5$ and $a+4=7$

Intuitively it's true, but I just can't think of how to say it "properly".  Take for example, my answer to the following question:     Let $p$ denote an odd prime. It is conjectured that there are infinitely many twin primes $p$, $p+2$. Prove that the only prime triple $p$, $p+2$, $p+4$ is the triple $3,\ 5,\ 7$.   And my solution:     Given an odd integer $n$, between the three integers $n$, $n+2$ and $n+4$, one of them must be divisible by $3$... Three possible cases are $n=3k$, $n+2=3k$, and $n+4=3k$. The only such possible $k$ that makes $n$ prime is $k=1$. In this case, given an odd prime $p$, either $p=3$, $p+2=3$, or $p+4=3$. This would imply that $p=3$, $p=1$, or $p=-1$. The only of these three that is prime is $p=3$, therefore the only three evenly distributed primes are $3$, $5$, and $7$.   Is there a "better" way that I can assert that one of the integers is divisible by 3? This feels too weak.


Could there be 3 particles (instead of only 2 particles) that could be connected by same quantum entanglement (like minus, plus and "some third position")?

So I know that two particles can be entangled in a quantum way, but is it possible that more than two particles be entangled in a quantum way? Most descriptions provide with two-particles cases, so I wonder. (It's hard to think of three particles entangled in spin, or so.)


I am sure, this is going to be a duplicate thread, but believe me, I tried out all the original ones In fact. Whenever my system starts up, I am welcomed with this message below:    I searched all the forums, reinstalled, restarted, uninstalled an installed again, rebooted, completely removed including folder and cache. Tried everything that' literally found in the forms, I tried rebooting after I done all these works arounds. Yet no hope, this annoying thing pops up and makes my day worse. Any help largely appreciated. Almost 20+ solutions I tried one after another btw.

When I install "Installer for Microsoft TrueType core fonts" (ttf-mscorefonts-installer) from the Software Center on 14.04, it gives a positive response--but after this I get a download error. It seems that the files actually providing the fonts are never retrieved. Is there any way to resolve this?


As the title states above, I am trying to show that if $T : U \rightarrow V $ is a linear bijection, then $T^{-1} : V \rightarrow U$ is also a linear bijection where U and V are vector spaces.   Representing $U = \lbrace u_1, u_2, u_3...,u_n \rbrace $ and $V = \lbrace v_1, v_2, v_3,....,v_n\rbrace$ for some $n \in \mathbb N$, I understand that the bijectivity of T means that each vector in $U$ will map onto only one vector of $V$ (as the assumption suggests). However I do not how I can translate this knowledge to $T^{-1}$.   Thank you in advance (I am new to proofs).

So I've got a bijection. It clearly has an inverse, but how exactly do I prove that the inverse is a linear map as well?     Suppose that the linear map $T:U\to V$ is a bijection. So $T$ has an inverse map $T^{-1}:V\to U$. Prove that $T^{-1}$ is a linear map.


What is the best way to detect memory leaks in c# .net ?  We are trying to find the cause of memory leaks on an application thats already installed and runing on a server  So visual studio profiler is not an option.  I worked with valgrind on linux, its a tool that actualy showed me, for example, the file names and line numbers in the code where i initialized the variables that are never disposed of..  however, valgrind only works on linux,  Are there good tools like that for .net ?

I wrote C++ for 10 years. I encountered memory problems, but they could be fixed with a reasonable amount of effort.  For the last couple of years I've been writing C#. I find I still get lots of memory problems. They're difficult to diagnose and fix due to the non-determinancy, and because the C# philosophy is that you shouldn't have to worry about such things when you very definitely do.  One particular problem I find is that I have to explicitly dispose and cleanup everything in code. If I don't, then the memory profilers don't really help because there is so much chaff floating about you can't find a leak within all the data they're trying to show you. I wonder if I've got the wrong idea, or if the tool I've got isn't the best.  What kind of strategies and tools are useful for tackling memory leaks in .NET?


I have 3 times as much in total score, but my GNP is much lower than that of two other civs. How is it possible to make that much money without having the largest population? I am in the renaissance era btw and one of the civs is aiming for a diplomatic victory. This is just ridiculous...

I've watched some of  and he was dealing with Egyptians and Incas that had incredible 700 gold income per turn. Meanwhile, 100-ish was what I was able to ever see as a player. Is AI cheating in some way (handicap?) or I just cannot see the way they do that?


There's next code:  TITLE="Some value with spaces" DIALOG="${DIALOG=dialog} --clear --no-tags --tab-correct --backtitle $TITLE " ... $DIALOG --title "Some title --menu "Menu" 15 60 5 "1" "menu1" "2" "menu2"  ...   When TITLE contains string with no spaces DIALOG works OK. With spaces - no correct substitution is done.  Tried to use variants like (with no luck):  $TITLE "$TITLE" \"$TITLE\" ${TITLE} "${TITLE}" \"${TITLE}\" TITLE='Some value with spaces' TITLE="Some\ value\ with\ spaces"   How has correct substitution to be done?

Or, an introductory guide to robust filename handling and other string passing in shell scripts.  I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names).  I encountered a problem such as the following:   I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators).   What is going on and how do I fix it?


I saw many times at SO, and finally decided to ask, why questions deleted by owners are not marked as "deleted by owner"? One :    In fact, I don't know how to consider my question. I believe there might be a reason for such behaviour, however I didn't find any clear explanation on Meta (if it exists, just close the question by duplication).  Nevertheless, I'd prefer to see "deleted by owner" instead of name repetition.

I've stumbled across an inconstancy in the display of who deleted an answer.  In  on Programmers.SE there are currently two deleted answers.      The display of these two questions - one has the name of the owner, the poster, the other has the string "deleted by owner".  The differences that I can see are:   that one is a 10k+ user and the other is not and maybe the code for how it handles deletes of answers for these two is different. the dates are about a day apart, there might be different versions of the software (yet, its still rather short of a timeframe)   So... it just looks like a minor cosmetic bug that most never see, though may be hinting at duplicated code that could lead to a different bug some time down the road.  Or it could just be that two different releases of SE software put two different strings in the delete message and thats it, never mind, and everything is working as intended.    Of note, there was some tinkering of the self deleted code and display name back on July 17th - .  This isn't the discrepancy seen (neither of these are deleted users), but it might help those with access to the code to look in the area of the code.


Is there any benefit from declaring the type of var to be assigned  List<myType> example1 = methodToGetMyTypeList();   over using var for the same efect  var example2 = methodToGetMyTypeList();   besides the fact that if by some mistake i'm assigning the wrong type i'll get an error and it's best suited for readability and maintenance? In terms of performance.

After discussion with colleagues regarding the use of the 'var' keyword in C# 3 I wondered what people's opinions were on the appropriate uses of type inference via var?  For example I rather lazily used var in questionable circumstances, e.g.:-  foreach(var item in someList) { // ... } // Type of 'item' not clear. var something = someObject.SomeProperty; // Type of 'something' not clear. var something = someMethod(); // Type of 'something' not clear.   More legitimate uses of var are as follows:-  var l = new List<string>(); // Obvious what l will be. var s = new SomeClass(); // Obvious what s will be.   Interestingly LINQ seems to be a bit of a grey area, e.g.:-  var results = from r in dataContext.SomeTable               select r; // Not *entirely clear* what results will be here.   It's clear what results will be in that it will be a type which implements IEnumerable, however it isn't entirely obvious in the same way a var declaring a new object is.  It's even worse when it comes to LINQ to objects, e.g.:-  var results = from item in someList               where item != 3               select item;   This is no better than the equivilent foreach(var item in someList) { // ... } equivilent.  There is a real concern about type safety here - for example if we were to place the results of that query into an overloaded method that accepted IEnumerable<int> and IEnumerable<double> the caller might inadvertently pass in the wrong type.  var does maintain strong typing but the question is really whether it's dangerous for the type to not be immediately apparent on definition, something which is magnified when overloads mean compiler errors might not be issued when you unintentionally pass the wrong type to a method.


True or false for each of the following statements? Justify by giving a full proof or a counter example.  (a) $g : (0,∞) → \mathbb R$ defined by $g(x) = \sin(x)$ is open.  (b) $g : (0,∞) → \mathbb R$ defined by $g(x) = \sin(\frac1x)$ is open.  (c) $g : (0,∞) → [−1, 1]$ defined by $g(x) = \sin(x)$ is open.  (d) $g : (0,∞) → [−1, 1]$ defined by $g(x) = \sin(\frac1x)$ is open.  (e) $g : (0,∞) → [−1, 1]$ defined by $g(x) = \sin(x)$ is closed.  I know (a) to (d) are just straight forward but in the part (e) I started by taking closed set containing a sequence that converges to infinity, since if the limit of a sequence in $A$ goes to infinity, $A$ is closed, and I try to see if $g(A)$ closed or not.  Can you help me in finding such a sequence inside a set that $g(A)$ will be  easy to see? Thank you

I came across a question:      Suppose that $f(x) = \sin x$ is a function from $\mathbb R$ to $[-1,1]$. How do I prove the function $f(x) = \sin x$ is not a closed function?     By "closed function", I mean a function such that the image of any closed set is closed.


Tried searching but couldn't find how to curve this in  the way I show with red lines (ms paint, sry XD)

I'd like to curve my object, but I'm considering two options.  The first one is to make the object up with lots of vertices, like a sphere can be. The second is to apply some kind of modifier curve to a straight mesh, as I've understood there is such a possibility.  Here's an awesome pen drawing of what I'd like to achieve:    and here's my current even more awesome result:    Rather non-awesomely, they don't quite match. So if someone would kindly point me to the correct method to achieving a nice-looking solution with relatively low polygons, I'd be much enlightened


I was using this spray meant to hasten recovery from the common cold. A study [1], sponsored by the pharmaceutical company that produces the spray, stated it reduced virus by 92% (this value only appear on the promotional material), and so shortens the duration of the common cold.  Meanwhile a doctor told me that these kinds of things don't work.  I found some "similar" studies [2,3, 4, 5 ,6] but I lack the competence to assert their value.  Does someone have some perspective on this? Are these believable studies? Was it well designed, and has it been duplicated?  If so, why wouldn't the pharmaceutical produced a certified and expensive drug instead of a no-prescription drug? I would think anything that would hasten common cold would get an enormous buzz (and profit...).  [1]  [2]  [3]  [4]  [5]  [6]

I was using this spray meant to hasten recovery from the common cold. , sponsored by the pharmaceutical company that produces the spray, stated it reduced virus by 92%, and so shortens the duration of the common cold.  Meanwhile a doctor told me that these kinds of things don't work.  Does someone have some perspective on this? Is this a believable study? Was it well designed, and has it been duplicated?   If so, why wouldn't the pharmaceutical produced a certified and expensive drug instead of a no-prescription drug?


Correct me if I am wrong:  If I remember correctly, a command in terminal is linked to a specific executable(or maybe a script is also allowed?) in filesystem/disk.  For example, python runs python2.7 and python3 runs python3.   Now the problem is that I install 2 packages with same terminal command.  pip install packageA pip3 install packageA   They both has the command packageACommand run. So I want to check the current packageACommand command infomation to see which python/what environments it's using.  And generally, I am wondering how can I view a command's (meta) information? Like checking what it acutally does/linked behind the scene?

For example, I have git installed on my system. But I don't remember where I installed it, so which command is fit to find this out?


I have to merge these two lists. This is my uncompleted coding program so far. I cannot make any further progress. I need to help to finish this assignment. The merged list should contain all of the provided number. Also, if you wish, can you leave a detail solving process for my studying?  public class Lab18bvst {     public static void main(String[] args)     {         int[] jsaList1 = {101, 105, 115, 125, 145, 165, 175, 185, 195, 225, 235, 275, 305, 315, 325, 335, 345, 355, 375, 385};         int[] jsaList2 = {110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 270, 280, 320, 350, 400};          Array list1 = new Array(jsaList1,"List #1");         Array list2 = new Array(jsaList2,"List #2");         Array list3 = new Array("Merged List");          list3.merge(list1,list2);          list1.display();         list2.display();         list3.display();      }  } class Array {     private ArrayList<Integer> list;     private int size;     private String listName;      public Array(String ln)     {         list = new ArrayList<Integer>();         size = 0;         listName = ln;     }      public Array(int[] jsArray, String ln)     {         list = new ArrayList<Integer>();         size = jsArray.length;         listName = ln;         for (int j = 0; j < size; j++)             list.add( new Integer( jsArray[j] ));     }      public void display()     {         System.out.println("\n" + listName + ":\n");         System.out.println(list + "\n");     }      public void merge(Array that, Array theOther)    {       int thatIndex, theOtherIndex;       thatIndex = theOtherIndex = 0;        for (int j = 1; j <= that.size + theOther.size; j++)       {          if (thatIndex >= that.size)          {             while(theOtherIndex < theOther.size)             {                this.list.add(theOther.list.get(theOtherIndex));                theOtherIndex++;             }          }          else if (theOtherIndex >= theOther.size)          {             while(thatIndex < that.size)             {                this.list.add(theOther.list.get(thatIndex));                thatIndex++;             }          }          else if           else        }     } }

Conditions: do not modify the original lists; JDK only, no external libraries. Bonus points for a one-liner or a JDK 1.3 version. Is there a simpler way than: List<String> newList = new ArrayList<String>(); newList.addAll(listOne); newList.addAll(listTwo);


I am working on a little project that involves working with and transforming coordinates and my code behaves in a way that I can't explain. Example code: koord = [[60,10],[70,18],[61,21],[69,11]] min_X = [255,255]  for i in range(len(koord)):     if koord[i][0]<min_X[0]:         min_X=koord[i] print(min_X)  for i in range(len(koord)):     for j in range(2):         koord[i][j]=koord[i][j] - min_X[j]     print(min_X)  I expect it to always print [60, 10], but instead I get [60, 10] [0, 0] [0, 0] [0, 0] [0, 0]  Why does the min_X value change? It seams to redo the first for-loop but why? Can someone explain why this happens and how I can fix it?

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


It has been a month since my paper was accepted and published. The paper is not yet assigned to any issue in the journal, but it is published and available via springer.com. The paper is in the Google Scholar list of papers for the corresponding author, but it is not yet shown in my list of papers. When I search for it, no result is returned  What is the problem?

I have a paper that I uploaded to arXiv and google scholar listed it as a publication.  Since then the paper has been published in a nature journal several months ago.  The nature publication still hasn't showed up on my scholar profile, which still lists the arXiv version.  Is there any way to resolve this conflict?


If you look to the right of the photo are the girl's arm it has black dots on it.

I know that this question is a bit old or maybe overdone, but I'm running the latest edition of Blender and when I use the Cycles engine I get really fuzzy results and I can't find a simple, non-compromising solution to the quality.  I don't know exactly what I'm doing wrong here, but I'm sure others share my frustration.  Leaving everything in default settings, I started a new project and switched to the Cycles render.  I duplicated the cube and set colors for two Diffuse BSDF shaders, then went ahead and made walls and a floor all sharing the same diffuse shader.  I made two windows to emit blue light.  The screenshot has gaps between the walls because of the setup:  I'm aware that it's considered very incomplete and many have come to terms with some amount of noise, but is this normal?  Furthermore, with default settings or not, I can't change the amount of noise produced.  Supposedly, using "progressively refine" in the rendering tab should make it refine itself indefinitely, however Cycles only counts to 10 refines and then stops, creating a render which is a pixel-perfect match of the ordinary rendering method when it's completed.  I understand that there are tricks that can be used to reduce noise, but at the cost of extra processing time and usually small quality conflicts, like blurring.  My question essentially boils down to is this Cycles' current limit?


One thing I really often struggle with when writing a latex document (and I belive a lot of people are in the same case) is float placement.   In particular, I often find myself with a figure or table located several pages away from the place where ther were referenced.   As I understand it, the way latex choses where to put a float is by trying to minimize the "badness", which is a numeric value used to characterize how bad a certain placement would be.   And in this regard, I think we can agree that placing a figure several pages away from the place where it is needed is pretty bad.   Therefore, is there a way to increase the badness of this when I need to do so ?   To be more specific, I see two possible kinds of badness :    the vertical distance between the paragraph where it is referenced and the float The presence of page breaks between these two.    Alternatively, how could it be implemented, or even, would this be the right way to approach this problem ?

How to influence the position of float environments like figure and table in LaTeX?   This is a general question and should collect useful answers for all users. I hope we can use this as a reference


is there any way to display or check bluetooth battery level for a2dp non BLE devices such as my JBL earphones.  model JBL E25BT.  when connected to android is shows me the accurate battery levels.  how to get this on ubuntu 19.10 as well. or is this planned in future updates?

Is it possible to get the battery status of Bluetooth headphones connected to Linux? Android shows it so I was wondering if it was possible.


i have asked this question today already, but i couldnot find the answer to my second question (which is this)which came after the answer to the first question. First of all, sorry duplicate question, and please dont redirect me to another question.   i cannot follow the thought that the sequence $\frac{1}{n+1}(a_0+a_1+\cdots+a_n)$ converges to $a$. my idea is this:   $$\frac{1}{n+1}(a_0+a_1+\cdots+a_n)=\frac{a_0}{n+1}+\frac{a_1}{n+1}+\cdots+\frac{a_n}{n+1}$$ and each term goes to $0$ as $n$ grows, but how can the sum of $0+0+0+0+0$ can converge to $a$ ?

Prove that if $\lim_{n \to \infty}z_{n}=A$ then:  $$\lim_{n \to \infty}\frac{z_{1}+z_{2}+\cdots + z_{n}}{n}=A$$ I was thinking spliting it in: $$(z_{1}+z_{2}+\cdots+z_{N-1})+(z_{N}+z_{N+1}+\cdots+z_{n})$$ where $N$ is value of $n$ for which $|A-z_{n}|<\epsilon$ then taking the limit of this sum devided by $n$ , and noting that the second sum is as close as you wish to $nA$ while the first is as close as you wish to $0$. Not sure if this helps....


I'd like to have a conditional macro that emboldens symbols, using different commands depending on whether the argument is a math symbol or text.     Specifically, I'd like to use \bm for math symbols and \mathbf for alphanumeric characters.   Thus it would look something like  \def\vec#1{\ifthenelse{\ismathsymbol{#1}}{\bm{#1}}{\mathbf{#1}}   Problem is I don't know of a test such as \ismathsymbol.  Obviously, it would be just fine if there were a test for alphanumeric characters.  Thanks for any advice!

This is a follow-up to .  Suppose you want to denote vectors by upright bold letters; then \mathbf{u} works fine, except that if it's a Greek letter you have to use \boldsymbol{\omega} instead.  Question: Is it possible to define a generic vector command in LaTeX which automatically chooses between \mathbf and \boldsymbol, so that one can write just \vect{u} and \vect{\omega} without having to treat the Greek symbols specially by hand?  (Just to be clear: \newcommand{\vect}[1]{\boldsymbol{#1}} is no good in this situation, since \boldsymbol{u} gives bold italic instead of roman.)


I run my python scripts and Scrapy framework for web scraping project on my Ubuntu 12.04 precise server. These scripts run whole day.  This project is under developing/testing stage. So i dont know what will be the system requirement of this project.  I started it with 512MB RAM and 30GB Hard Disk. The system crashed because of less hard disk space. so once again i have to setup the server and restarted my project with 512MB RAM and 100GB Hard Disk.  Again the system crashed because of less RAM/SWAP size.  Is there a way to apply checks on RAM, Hard Disk ? So that beforeserver crash it will kill all the programs and send me mail that all programs are killed because of less space increase your RAM/HARD DISK size.    I am looking for a shell script which is handled by cronjob running in every minute to check whether disk is full.

This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?


#include<iostream> #include<string> #include<algorithm> using namespace std; int main() {   string str;   cin>>str;   str.erase(remove_if(str.begin(), str.end(), isspace),str.end());   cout<<str;   return 0; }   ERROR MSG:     /home/satish/Desktop/CPP/Remove_Spaces/main.cpp|9|error: no matching function for call to ‘remove_if(std::basic_string::iterator, std::basic_string::iterator, )’|

What is the preferred way to remove spaces from a string in C++? I could loop through all the characters and build a new string, but is there a better way?


Their relation is V=E-Ir. But while charging of secondary cell  It become V=E+It.Why is there a change in sign of the equation?

Now, I know that emf is measured using an ammeter, while potential difference is measured using a voltmeter. But why is that so? What do we mean when we say the emf of the battery is say, 3V, and the potential difference is 2V or anything? How do we define these terms? What is emf and the current supplied by the battery? Are they the same thing?


In my document I use some tabularx tables. Now I found out, that every time I use it the table counter in the caption increases by two.    \begin{table}[ht]   \centering   \begin{tabularx}{\linewidth}{X X X X}     A & B & C & D   \end{tabularx}   \caption{A table.} \end{table}   With this code, the caption reads Table 2: ... but when I use \begin{tabular} the caption reads Table 1: ....  Can somebody explain me this behaviour?  I found out, that if I disable the ltablex package the numbering starts with 1 again.  MWE:  \documentclass{article}  \usepackage{tabularx} \usepackage{ltablex}  \begin{document}  \section{Some section}  \begin{table}[ht]   \centering   \begin{tabularx}{\linewidth}{X X X X}     A & B & C & D   \end{tabularx}   \caption{A table.} \end{table}  \end{document}

The below example presents two tables with an tabularx environment (taken from package ltablex) and a caption. After each tabularx-table, the table counter skips one, as if both the caption and the tabularx environment increase it, while the latter shouldn't.  \documentclass{report} \usepackage{ltablex} \begin{document}  \begin{table} \caption{Caption 1.} % "Table 1" \begin{tabularx}{\linewidth}{|c|} empty table \end{tabularx} \end{table}  \begin{table} \caption{Caption 2.} % "Table 3" \begin{tabularx}{\linewidth}{|c|} empty table \end{tabularx} \end{table}  \end{document}   My reputation doesn't allow me to upload a picture, but the captions are Table 1 and Table 3 respectively.


Corollary C is derived from $E_(x) = \frac{f''(x)}{2} \cdot (x-a)^2$  I'm having serious issues understanding this problem and I'm just not getting it right. I'm preparing for a test so this isn't really 'homework' so you can give as hard hints as you want. Thanks!

Question: Can anyone shed some light on this formula? I can't find any information on it.  It has three corollaries that I also need to understand:


I want to show alert box only for 3 seconds (Means it show & hide automatically). I have search lot of in google but doesn't get answer. Any suggestion really appreciated.  I have done with new window but still finding solution with alert box.  Chk My code :  function fn() {     var w = window.open('', '', 'width=300,height=2px')     w.document.write('Product has been added to your Order List !')     w.focus()     setTimeout(function () { w.close(); }, 2000); }

I want to be able to close an alert box automatically using Javascript after a certain amount of time or on a specific event (i.e. onkeypress).  From my research, it doesn't look like that's possible with the built-in alert() function.  Is there a way to override it and have control over the dialog box that it opens?  Also, I don't want an override that shows a hidden div as the alert.  I need an actual dialog box.


For having some fun with infinite series, I am having a go at some of the exercises in Problems in Mathematical Analysis by Kaczor and Nowak. I would like to ask, if my approach is in the correct direction or if there's another clever way of algebraically manipulating this. Please don't post the solution - but rather a hint/tip. Problem 3.1.4(a)  \begin{align*} \sum_{n=1}^{\infty}\frac{1}{n(n+1)(n+2)\ldots(n+m)}, \quad m \in \mathbf{N} \end{align*}  Solution. My approach would be to somehow, express this infinite sum as a telescopic series. Let's start with a simpler case $n=3$. We would like to determine coefficients $A,B,C,D$ such that: $$\frac{1}{n(n+1)(n+2)(n+3)}= \frac{A}{n} + \frac{B}{n+1} + \frac{C}{n+2} + \frac{D}{n+3}$$ So, \begin{align*} 1 = A(n+1)(n+2)(n+3) + Bn(n+2)(n+3) + Cn(n+1)(n+3) + Dn(n+1)(n+2) \end{align*} Substituting the values $n=0,-1,-2,-3$, we find that, $A=\frac{1}{6},B=-\frac{1}{2}, C=\frac{1}{2}, D=-\frac{1}{6}$. Thus, $$\frac{1}{n(n+1)(n+2)(n+3)}= \frac{1}{3!}\left(\frac{1}{n} - \frac{3}{n+1} + \frac{3}{n+2} - \frac{1}{n+3}\right)$$ Similarly, $$\frac{1}{n(n+1)(n+2)(n+3)(n+4)}= \frac{1}{4!}\left(\frac{1}{n} - {4 \choose 1} \frac{1}{n+1} + {4 \choose 2}\frac{1}{n+2} - {4 \choose 3}\frac{1}{n+3} + \frac{1}{n+4}\right)$$ In general, $$\frac{1}{n(n+1)(n+2)(n+3)\ldots(n+m)}= \frac{1}{m!}\left(\frac{1}{n} - {m \choose 1} \frac{1}{n+1} + {m \choose 2}\frac{1}{n+2} - {m \choose 3}\frac{1}{n+3} + \ldots+ \frac{1}{n+m}\right)$$ (This should be proved rigorously using mathematical induction.) But, if now look at the partial sum $s_n$ and write it for simplicity as - \begin{align*} s_n &= \frac{1}{m!} \left[1 - {m \choose 1} \frac{1}{2} + {m \choose 2}\frac{1}{3} - {m \choose 3 }\ \frac{1}{4} + \ldots + (-1)^m\frac{1}{1+m}\right]\\ &+ \frac{1}{m!} \left[\frac{1}{2} - {m \choose 1} \frac{1}{3} + {m \choose 2}\frac{1}{4} - {m \choose 3 }\ \frac{1}{5} + \ldots + (-1)^m\frac{1}{2+m}\right]\\ &+ \vdots \\ &+ \frac{1}{m!} \left[\frac{1}{n} - {m \choose 1} \frac{1}{n+1} + {m \choose 2}\frac{1}{n+2} - {m \choose 3 }\ \frac{1}{n+3} + \ldots + (-1)^m\frac{1}{n+m}\right]\\ \end{align*} This doesn't really yield anything familiar, even if collect the terms for each fraction $\frac{1}{2},\frac{1}{3},\ldots$.

I know that this sum $$\sum_{n=1}^{\infty} \frac{1}{n(n+1)\cdots(n+p)}$$ ($p$ fixed) converges which can be easily proved using the ratio criterion, but I couldn't calculate it.  I need help in this part.  Thanks a lot.


Pinocchio has driven two nails into the board to secure them, so that if one of them falls, the other nail will prevent him from falling.(Maybe he wanted to stand on the board)The fox claims that he can pass the rope through these two nails so that if either of them falls, the rope will be released and Pinocchio will fall to the ground; Do you think such a thing is possible?

A friend of mine told me that it's possible to hang a picture on the wall from a string using two nails in such a way that removing either of the two nails will make both the string and picture fall down. My friend also told me that I need to be acquainted with the concept of fundamental groups to understand the solution. The problem is that I'm not. Is there really no solution to this straightforward problem that doesn't require acquaintance with fundamental groups?


$$\lim_{n\to\ \infty}\frac{1}{1+n^2} +\frac{2}{2+n^2}+\cdots+\frac{n}{n+n^2}$$ For using Sandwich theorem I need two functions such that $g(x)<f(x)<h(x)$ $$\frac{1}{n+n^2} +\frac{2}{n+n^2}+\cdots+\frac{n}{n+n^2} \leq \frac{1}{1+n^2} +\frac{2}{2+n^2}+\cdots+\frac{n}{n+n^2} $$ But I can't find function greater than the given which will help me evaluate the limit.

Evaluate the limit   $$\lim_{n \to \infty} \dfrac{1}{1+n^2} +\dfrac{2}{2+n^2}+ \ldots+\dfrac{n}{n+n^2}$$   My approach :   If I divide numerator and denominator by $n^2$ I get :   $$\lim_{ n \to \infty} \dfrac{\frac{1}{n^2}}{\frac{1}{n^2} +1} +\dfrac{\frac{2}{n^2}}{\frac{2}{n^2} +1} + \ldots+ \dfrac{\frac{1}{n}}{\frac{1}{n} + 1}=0$$   but the answer is $\dfrac{1}{2}$ please suggest how to solve this.. thanks.


When I look at my profile, I see this area with a highlighted background color in most browsers (Internet Explorer, Firefox, and Chrome). Does this convey any specific information?

On the users tab page there is a gray box in the mid upper right. A long time ago i believe it was used to show user statistics change over time. Now i see noting. Is this common among other SO, SF, MSO, and SU users? I have tried viewing the page in IE and Firefox with the same results.


I need help with this proof. If x $\in$ A ; y $\in$ B and x$\leq$y prove that sup(A)$\leq$inf(B) My attempt was using this: 0 $\lt$ $\epsilon$ sup(A) - $\epsilon$ $\lt$ x $\leq$ sup(A) ; inf(b)  $\leq$ y $\lt$ inf(B) + $\epsilon$ But i end with nothing and i don´t know how to solve this.

Let $A$ and $B$ be bounded sets of real numbers such that $a\le b$ for all $a \in A$ and for all $b \in B$. Show that $\sup(A) \le \inf(B)$  Pf: Assume A and B are bounded sets. This means they have a least upper bound and a greatest lower bound.   let $x \le \sup(A)$ for some $x \in A$ and $\inf(B) \le y $ for some $y \in B$  Since we know that $a \le b $ for $\forall a\in A $ and for $\forall b \in B$, $x \le y$  Therefore, $x \le \sup(A) \le \inf(B) \le y$  Thus proving that $\sup(A) \le \inf(B)$


I am unable to move a div (.searchblock).  I would like it to be centered in the header.  Side question: Is there an easy way to get the contents of the header and the body aligned to the same width?  On the div in question, I have tried position: fixed, absolute, relative.  I have tried centering the div with margin: auto, and various other values.  I have tried moving the div in all directions (position: absolute, top: 50px, right 100-1000px, etc.) as well.  Nothing seems to have an effect on it's positioning.      html {   background-color: #e9ebee; }  body {   margin: 0; }  .header {   background-color: #4267B2;   #4267b width: 100%;   height: 42px; }  #search {   color: gray;   height: 24; }  input[type=image] {   height: 24;   padding: 0px; }  .searchblock {   position: absolute;   left: 1000px; }  #profile {   border-radius: 10px; }  ul, .bttn {   color: white;   list-style-type: none;   display: inline-block; }  li {   float: right;   font-family: Arial, Helvetica, sans-serif;   font-size: 12pt;   padding: 0 10px 1px;   border-right: solid 1px gray; }  button {   border: none;   padding: 0;   margin: 0; }  .footer {   position: fixed;   width: 100%;   height: 50px;   bottom: 0;   background-color: #2851A3;   margin: 0; }

       <input id="search" type="text" name="search" value="search">   <input type="image" name="submit" src="maglass.png">

Create

Find Friends

Home

Anthony

     <button type="button">      </button>     <button type="button">      </button>     <button type="button">      </button>     <button type="button"></button>     <button type="button"></button>     <button type="button">      </button>

     I would like the DIV to be centered in the header.

How can I horizontally center a
 within another
 using CSS?

Foo foo


Do you have any tips? Especially for the second part? IS it enough to say since $f(x)$ is continuous at $x=0$ and $f$ is differentiable at $x=0$. Is $f$ continuously differentiable? Here is the question.     Let   $$ f(x)= \begin{cases} x^2\sin\big(\frac{1}{x}\big) & \text{ if }x\neq 0\\ 0 & \text{ if }x= 0 \end{cases} $$   Show that $f$ is differentiable at $x=0$ and compute $f^\prime(0)$. Is $F$ continuously differentiable at $x=0$?   Edit: For the second part, I used the fundamental theorem of calculus part 2. f is continuous and according to that theorem, so F is continuously differentiable.   P.S: I don't think this question is a duplicate of another question. In that question, it is asking for the derivative of f. But, in this question, it is asking for the integral of f as the capital F is a symbol for the integral of f. I don't understand why you keep insisting that this question is a duplicate.

Given $f: \mathbb{R} \rightarrow \mathbb{R}$ defined as $$f(x)=\left\{\begin{array}{cc}x^2\sin\left(\frac{1}{x}\right)&,x\neq 0\\ 0&,x=0\end{array}\right\}.$$ I am trying to prove $f$ is differentiable at $x=0$ but not continuously differentiable there.


I have thought about an example of Cauchy sequence for which every subsequence has no limit in $B$, but I wasn't able to find one.

Definition of compact in Real Analysis, Carothers, 1ed said that:   In Example 8.1 (c), he claimed that closed ball $\{x: \|x\| \leq 1\}$ in $l^{\infty}$ is not compact. Why?


I am quite new with R and while i am able to perform the basics i am not yet able to understand the output results. For example:  summary(lmodel) generates the following:  Call: lm(formula = temperature ~ altitude + sea.distance, data = meteodata)  Residuals:      Min       1Q   Median       3Q      Max  -1.40156 -0.46083 -0.04078  0.50961  1.49844   Coefficients:               Estimate Std. Error t value Pr(>|t|)     (Intercept)  19.736000   0.257222  76.728  < 2e-16 *** altitude     -0.016509   0.004006  -4.121 0.000714 *** sea.distance  0.531111   0.414166   1.282 0.216927     --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  Residual standard error: 0.7425 on 17 degrees of freedom Multiple R-squared:  0.864, Adjusted R-squared:  0.848  F-statistic:    54 on 2 and 17 DF,  p-value: 4.317e-08   I know about the ?summary, help(summary) and i am familiar with the basic concepts, but i would kindly ask for some thorough explanation of the summary in regards to my model (residuals, coefficients, F-statistic, Residual standard error, etc.).  It seems that there are several similar answered questions in this forum, however none of them macthes exactly my case.  Any help is welcome. Thanks in advance

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


Is it possible to script Eclipse IDE (from say BASH, python, Java), to execute a Run or Debug Configuration for a given project in my workspace?   These are saved in .launch files at project root, but how can I execute one such launch configuration automatically?  Given a working project, I'd like to automatically achieve what is done in GUI by Run -> Run Configurations -> (pick a named config) -> Run button.  A named run configuration could be "C/C++ Application" or "GDB segger J-link Debugging"->"stm32f4", or any other run configuration imaginable.  Specifically I'm using gnuarmeclipse and like to automatically flash and run tests on my embedded target (stm32f4, but my question is generic). It would be great if I didn't have to make two project setups for running the same code on same target -- one for automatic test, and one for Eclipse IDE.

I'm finding it difficult to phrase this question well, as there are quite a few generic terms (run, configuration, launch, etc.). Here goes:  You can . (in the Run Configuration Dialog, under the Common tab, Save as a shared file.  We check these in to SVN. The developers can pass them around, and it helps getting new devs running a working application quicker.  I'd like to check these out as part of our build and use them to programatically run the application, the tests, etc, without spinning up the whole IDE.  What would be the best way to run a .launch file outside of the UI?   Edit: I am trying to unify the tests run on the build server and the IDE. I do not  particularly want to give up integrated debugging, which would be the case with an ant script to run the tests .  This is probably more a problem for integration testing with multiple bundles, or unit testing a whole bundle, where you'd like to mock up extensions.


I know what does yield do when we write say  while True:     yield i     i += 1   But what does it mean when we say  def foo():     A = yield B   ? What would be the value of A then?  The reason why I asked this question is because this is how things are done in tornado:    In Tornado, I see a lot of examples saying  document = yield http_client.fetch('...')   I know document should be the content fetched by the client. By for now I'm trying to understand how it is implemented - I searched for many examples about but couldn't find any one explaining how does "A = yield B" work. By looking Tornado's source code I couldn't understand it myself. Can someone explain it to me?

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


I'm trying to write some substances with dopants in them, e. g. ”InO2:Sn.“ Although I could split up the formula every time it contained a dopant, this wasn't really smart to do and I'd also get in trouble with line endings/non-breaking spaces at some point. How to bring a colon (:) into \ce{}? MWE \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{siunitx} \usepackage[version=4]{mhchem} \begin{document}     \ce{InO2}:\ce{Sn}     %\ce{InO2:Sn} \end{document}

Usually I use the package mhchem for writing chemical formulas, but until now I was not able to find a solution for writing crystals such as Nd^{3+}:YAG properly with this package. When simply writing   \ce{Nd^{3+}:YAG}   it results in an error. My current alternative solution is to write it as   \ce{Nd^{3+}}:\ce{YAG}   Is there a more elegant way to do that?


I need earlier references (books, articles, etc) on lattice-based cryptography, and any advice will be helpful to me. I am reading Stinson & Paterson's . Thanks in advance.

I'm interested in some sort of "compendium" on lattice-based crypto. There are a bunch of maths behind FALCON and other stuff. A lot of articles are devoted to lattice crypto, but not of them are of paramount importance. The other problem is that there are papers that are obviously influential, but they are hard to understand "from scratch".  To start with something I may notice some of them:  GPV framework:    "How to Use a Short Basis: Trapdoors for Hard Lattices and New Cryptographic Constructions".   Cryptanalysis:    "Learning  a  Parallelepiped:  Cryptanalysis  of  GGH and NTRU Signatures"   Basic courses :   winter school on lattice-based crypto () Regev course on lattices in CS () Vinod's course ()   Surveys:   "Lattice-based Cryptography" part from the book "Post-Quantum Cryptography". "A Decade of Lattice Cryptography", Peikert.   Unfortunately, I didn't find anything on discrete Gaussian distributions and properties of continuous Gaussians (why is it "not far from" uniform over any "small" parallelopiped), how to generate them; on smoothing parameter and its "intuitive" meaning. Also, reductions from average to worst-case are somewhat tricky and uneasy to understand form Ajtai papers. And there is a direction of research on ideal lattices, which somehow related to integer rings of number fields ($\mathbb{Z}_K$), this is completely obscure.


I noticed the different vertical spacing of \circ used for degree within \frac command.  MWE:  \documentclass{article}  \begin{document} \[ \frac{180^\circ}{180^\circ} \] \end{document}   Output:   Using {180}^\circ resolves the "issue", though.   Isn't \circ in MWE applied to a box containing only 0, which should be as equal as high as box containing 180? Why does 180^\circ get rendered differently in numerator and denominator?

This is a weird phenomenon.  Consider the following code:  \documentclass{article} \begin{document}   $$Z^* \frac{Z^*}{Z^*}$$ \end{document}   It produces the following picture:    The asterisks appear in various places in comparison to the Z. This looks particularly bad in the denominator. Any idea what's behind this?


I enabled the TRIM for my SSD on my MacbookPro using Chameleon SSD, and now the Mac doesn't boot any longer. I have tried to follow guides to reverse the TRIM but none of them actually work because my disk appears to be not mounted and does not appear in /Volumes/  When I open the Disk utility, the disk is greyed. If I try to mount it, I get an error : Try repairing the disk. And of course, when I run a repair, it fails too.   Sadly I have no recent backup (of course, would be too easy).  How can I mount this volume and reverse the TRIM enable?

I installed Yosemite yesterday and it was working fine.  Now whenever it tries to boot it runs Safe Mode and fails 1/3 of the way through.  From what I can remember I went to enable FileVault and backed out of it as I didn't enter my correct iCloud information, and didn't want to go down the key generation route.  I also tried to enable TRIM.  This morning I restarted my machine after installing Kies and it wouldn't boot. The error I'm getting is this:  Oct 26 11:01:33 localhost Unknown[358]: Keyboard Layouts: duplicate keyboard layout identifier -16899. Oct 26 11:01:33 localhost Unknown[358]: Keyboard Layouts: keyboard layout identifier -16899 has been replaced with -28673. Oct 26 11:01:33 localhost Unknown[358]: Keyboard Layouts: duplicate keyboard layout identifier -16900. Oct 26 11:01:33 localhost Unknown[358]: Keyboard Layouts: keyboard layout identifier -16900 has been replaced with -28674. Oct 26 11:01:34 localhost Unknown[358]: Setting boot completed. Oct 26 11:01:34 localhost Language Chooser[357]: Could not write to /var/log/CDIS.custom Oct 26 11:01:34 localhost OSIESpringboard[372]: Can not connect to /var/run/systemkeychaincheck.socket: No such file or directory Oct 26 11:01:34 localhost OSIESpringboard[372]: Failed to unlock login keychain. Oct 26 11:01:34 localhost Unknown[358]: 2014-10-26 11:01:34.864 OS X  Utilities[372:303] *** WARNING: -[NSImage compositeToPoint:fromRect:operation:] is deprecated in MacOSX 10.8 and later. Please use -[NSImage drawAtPoint:fromRect:operation:fraction:] instead. Oct 26 11:01:35 localhost Unknown[358]: Keyboard Layouts: duplicate keyboard layout identifier -16899. Oct 26 11:01:35 localhost Unknown[358]: Keyboard Layouts: keyboard layout identifier -16899 has been replaced with -28673. Oct 26 11:01:35 localhost Unknown[358]: Keyboard Layouts: duplicate keyboard layout identifier -16900. Oct 26 11:01:35 localhost Unknown[358]: Keyboard Layouts: keyboard layout identifier -16900 has been replaced with -28674. Oct 26 11:01:40 localhost Unknown[358]: 2014-10-26 11:01:40.167 OS X Utilities[372:303] *** WARNING: Method userSpaceScaleFactor in class NSWindow is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.   What could be causing this error?  I've tried two things:   Installing mavericks from the recovery drive - this fails. Disabling trim from the command line.   Neither of these work, is there something else causing this issue?  Edit: verbose mode stops at "still waiting for root device"


Java has List.toArray() to convert a list to Object[]. I want to convert a list of A to an array of A rather than Object. This is my code:  public static <A> A[] toArray(List<A> list) {     A[] rtn = null;     if (list != null) {         int mi = list.size();         rtn = new A[mi];//Error: Cannot create a generic array of A         for (int i = 0; i < mi; i++) {             rtn[i] = list.get(i);         }     }     return rtn; }   However the line with note causes an error: Cannot create a generic array of A.  How can I bypass this?

Due to the implementation of Java generics, you can't have code like this:   public class GenSet<E> {     private E a[];      public GenSet() {         a = new E[INITIAL_ARRAY_LENGTH]; // error: generic array creation     } }   How can I implement this while maintaining type safety?  I saw a solution on the Java forums that goes like this:  import java.lang.reflect.Array;  class Stack<T> {     public Stack(Class<T> clazz, int capacity) {         array = (T[])Array.newInstance(clazz, capacity);     }      private final T[] array; }   But I really don't get what's going on.


While exploring some interesting sums involving the harmonic numbers, I stumbled onto a useful identity for the Dilogarithm. $$\operatorname{Li}_2(x)+\operatorname{Li}_2(1-x)=\frac{\pi^2}{6}-\ln(x)\ln(1-x)$$  I tried using the sum formula for the Dilogarithm and combining $\operatorname{Li}_2(x)$ and $\operatorname{Li}_2(1-x)$ but had no success. I would be very grateful if anybody could show me how this reflection formula is derived.

How to prove  $$\zeta(2)-\log(x)\log(1-x)=\operatorname{Li}_2(x)+\operatorname{Li}_2(1-x)$$ I havent started, any hints?


I just received an "Enthusiast" badge on Code Review.   As much as I'd like to keep the badge, I'm certain that I did not visit Code Review every day, for 30 days straight.   Is this a bug?   I don't have the "consecutive days" stat:        But I still got the badge:        And it happened again. Reported .     Update: I just received a third badge in error; this time a fanatic badge for Software Engineering. This is even stranger, since I use that site less than I do CR, and I don't recall getting the 30 days badge.

So, the people on SuperUser are really awesome and I'm glad you guys are keeping that place full of information.   However, I visited SuperUser today after my little plugin told me that I had visited SuperUser for 30 consecutive days. The thing is, I almost never visit SuperUser. So obviously I was surprised to learn that I got a badge for visiting a site I never go to.  I'm guessing this is not a program issue. So, my theory is that it has to do with this plugin I have on Google Chrome. Everyday, multiple times a day, it goes to my recent activity page on all 4 sites and finds out my rep.   Would this be how I got my badge?


My current code to delete all files in a folder older then 2 days is :  forfiles /p "C:\Test" /s /m *.* /c "cmd /c Del /F /Q @path" /d 2   There is one .idf file among all other files. I want to delete all files except the one .idf file. What do I change to get the current code to ignore the file? If it is not possible, any new command will be helpful.

Is there an MS-DOS command that allows me to delete all files except one?  Consider as an example the following files:  a.001   a.002   a.003   a.exe   a.c     Is there a command to delete all files except a.c?


I have a simple point feature class and line feature class. Each point has an ID. The Line feature class has a "Start Point ID" and "End Point ID" field, both of which are currently empty. The line start/end points are snapped to points.  I'd like to do some sort of spatial join to populate the Start Point ID and End Point ID fields of the line based on what points the line is touching.   Each line feature is a simple two-vertex line, no polylines.  Any ideas on how to accomplish this without just copying and pasting ids?

I have two shapefiles, Point and Polyline. I'm trying to populate my polyline layer with the point data ID (systemID) where the lines start to where they end; eg. create two columns (from and to). The lines already have flow direction assigned to them. I am using ArcHydro tools but Arcpy is also fine.  In ArcHydro I have tried using Attribute Tools > Generate From/To Nodes for lines but it creates values for To and From that are not from my point data. My other alternative was using Feature to Vertices and joining the result to my point data table to get the systemID. But then I would have to update the polyline layer as well. I am sure there is a easier way of doing it.  Note: not all the lines have points at the vertices, blank values are fine for them.


I want to write a solution manual for a maths book which is about 900 pages.  I want it to include detailed solutions to all exercises as as well summaries for every chapter.  The file will obviously be quite large. I'd love to hear any tips on handling such large files, such as breaking it into several files etc...

I see that there a number of questions (, , , , ) on best practices, none of them answer the issue I am going to talk about.  We all need to prepare large documents (or slides) from time-to-time. And once you have reached a certain number of pages, you find that compiling the whole document takes a substantial time, which you need to do to check that the part you have written is error free, specially if it contains a number of images.   To circumvent the situation, I have used the following practices over years to keep compile time at minimum.   Divide the document in to many chapters: The chapters are put in separate files. Only the one I am working one is uncommented.  \documentclass{book}  \begin{document}  %\input {chapterone.tex} \input {chaptertwo.tex} %\input {chapterthree.tex} %\input {chapterfour.tex}  \end{document}    The above technique can also be used for \include.   Keep a preamble replica of the main file in a temporary file (build file): I use this technique when I am preparing a presentation with many slides, say a hundred. Prepare a main file, copy it to another build file. Delete everything between  \begin{document} and \end{document} in the build file. Prepare a slide (or a group of slides) in the build file. Cut and paste the contents between \begin{document} and \end{document} in the build file to relevant location in the main file only when satisfied with the output (image locations, overfull boxes etc.)     We can hear your inputs about the best practices you practice when a you are preparing a document or presentation from scratch.    Now, I have failed to find a good answer in the case when you have finished the whole document or presentation and now you need tweaking the small things, may be edit a text here, add an image there. What will be your best practice?  Perhaps, again keeping only one chapter uncommented will be usable here. But what about large presentations? May be adding a \end{document} just after the point-of-change will be beneficial, but only if you can put that before midpoint of the file.  Commenting a part of the file will also work, but that is error-prone, at least for me.


If I run this bash command and prefix the statement, so that the variable fruit should exist, but only for the duration of this command:  $ fruit=apple echo $fruit  $   The result is an empty line. why?  To quote a comment from wildcard on :     parameter expansion is done by the shell, and the "fruit" variable is   not a shell variable; it's only an environment variable within the   environment of the "echo" command   An environment variable is still a variable, so surely this should still be available to the echo command?

One of my coworkers has provided me with a Bash syntax that I am unfamiliar with.  My Google foo has failed me on figuring out what it does and why/when I should use it.    The command that he sent me was of this form:  someVariable=something command   Initially, I thought that this was equivalent to the following:   someVariable=something ; command   Or  someVariable=something  command   But this doesn't appear to the be case.  Examples:   [Jan-03 11:26][~]$ # Look at the environment variable BAZ. It is currently empty [Jan-03 11:26][~]$ echo $BAZ  [Jan-03 11:27][~]$ # Try running a command of the same format     [Jan-03 11:27][~]$ BAZ=jake echo $BAZ  [Jan-03 11:27][~]$     [Jan-03 11:27][~]$ # Now, echo BAZ again. It is still empty:     [Jan-03 11:27][~]$ echo $BAZ  [Jan-03 11:27][~]$     [Jan-03 11:28][~]$     [Jan-03 11:28][~]$ # If we add a semi-colon to the command, we get dramatically different results: [Jan-03 11:28][~]$ BAZ=jake ; echo $BAZ jake [Jan-03 11:28][~]$ [Jan-03 11:28][~]$ # And we can see that the variable is actually set: [Jan-03 11:29][~]$ echo $BAZ jake [Jan-03 11:29][~]$   What does this syntax do?  What happens to the variable that has been set?  Why does this work?


I'm trying to create a bootable USB for Ubuntu for installing Ubuntu on my Mac with Dual Boot. I have 2 questions. I am a complete noob. I'm sorry if these questions sound too basic or downright stupid.  First question is: when erasing my USB to filesystem format FAT32 (MS-DOS) and partition scheme GUID Partition Map (which can be done using Disk Utility GUI or on terminal with commands: diskutil eraseDisk FAT32 UBUNTU GPT disk4), and after erasing so, when viewing the disks using diskutil list, I see that the volume (for me, disk4s2) with name UBUNTU has Microsoft Basic Data as Type. But I saw on Wiki that Microsoft Basic Data is basically equivalent to MBR, which I don't want (I want GPT). Why is this, since I made sure to specify scheme to be GPT? Does it matter? For disk identifier disk4, the Type is Guid Partition scheme. How can the volume have a different scheme from its parent disk?  The second question is: if I am not interested in booting from USB but only interested in downloading the Ubuntu to my Mac, do I need a bootable Ubuntu USB? Can I not just have ISO file on it?

If you select "USB" and "Mac" on , it gives a series of command line instructions to make a USB key which the MacBook will boot into Ubuntu from.  I've followed them to the letter two or three times on different USB keys, and it doesn't work. There's a very great deal of technical discussion about EFI etc. but this set of instructions seems to suggest it should just work, but it doesn't.  Help? I'm increasingly unhappy with the more locked-down approach Apple is taking, and I'd quite like to start using Linux with a view to transitioning over to using it as my main operating system, but booting from the CD takes forever, runs slowly and I'm really hoping to get it moving off USB.  Can anybody help me?


On Japan, most trains have at least one car for unreserved seats but not always. Is there a way to know if a train has such seats? Unless I missed it the JR machines to book tickets and check time schedules don't give you that information.

The vast majority of Japanese trains have so-called non-reserved (or unreserved) seats (自由席, literally "free seats"), which do not allow reservation and are available on a first-come, first-served basis. However, some trains have only reserved seats (指定席), which require prior reservation. What are the most prominent ones, and how to find out whether a given train has non-reserved seats?


Is it possible to customize Slack new message notification banners so Reply button is displayed automatically (without having to click 'Options' > 'Reply'). I have searched already within System Preferences > Notifications without luck. Note: Slack Notifications were working this way prior the Big Sur update. I know this might sound trivial but it's currently driving me crazy. Any help appreciated!

Is it possible to customize the alerts or badges (either will be okay) for the Mail application so that it displays Delete upon a mouse-over instead of Options --> Delete? I receive a lot of mails daily which I need to delete etc and it will be very handy to have such a simple feature. I am using MacOS Big Sur on MacBook Air M1. .


def hbond(system, donors, acceptors):     for frame in system.frames:         result = len(frame.molecules)*[[0]*len(frame.molecules)]         for i, mol1 in enumerate(frame.molecules):             for j, mol2 in enumerate(frame.molecules):                 if i != j:                      result[i][j] = isDonor(                           mol1, mol2, donors, acceptors, frame.cell[0]                     ) #Problem with this assignment            yield result   Hello I am having difficulties with this fragment of code. isDonor() is a function which returns either 0 or 1 The problem is that this function always returns result as a list with every element equal to 0 whatever the initialized list is. Its like all the elements of the list are assigned to the last return value of isDonor function. If however change the code to this:                      result[i][j] += isDonor(                           mol1, mol2, donors, acceptors, frame.cell[0]                     )    I will get the correct results since the initialized list elements are 0.  Am I missing something about scope in Python ?

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


I think there should be a common website for asking questions and similarly user info should be visible from every website for every Stack Overflow / Stack Exchange website.   The problem is the difficulty to remember all Stack Exchange websites. Stack OverFlow became a very good Q & A site and it is always Stack Overflow only in mind.   Yesterday, I have asked one question on a Stack Exchange site and I forgot where did I asked. Now waiting for an email about that question. I asked that question on Stack Overflow but it got downvotes with suggestion about particular website and I posted in that website after deleting the question from Stack Overflow .   I think these solution, which should be helpful for Stack Overflow:   Question Form should be one shared by all websites. There we need to enter Category and that category will be Stack Exchange sub-domain which is required to choose.  User menu should be shared so that wherever we are, we can see our status. Aggregated website will help user remember website and it will help SEO as well when sites will be structured like this: Stack Overflow/Category/questions.... where Category is sub-domain name currently used. Sub-Domain can be retained with Canonical URLs. To make suggestions about the question being asked, Category can be made first field to help collect suggestions for users. Better User Experience as user no need to remember where a question should be posted and where he has posted his last question.

As I see it, the only effect of having three sites instead of one is that questions in Server Fault and Super User are seen less and answered less.   This just causes audience fragmentation and dissipation for no reason.   In addition it causes useless friction and waste regarding the endless issue, where does this question belong? Belongs-there, belongs-here...  The site comes with a powerful tag filtering feature anyway.  Those three sites have very similar audiences, questions, and expertise fields.  Take for example:   Where is the limit between writing macros and programming (Super User or Stack Overflow)? Is configuring rewrite rules for Apache programming or administration (Super User or Server Fault)? Is advanced registry configuration administration or power-user tasks (Super User or Server Fault)? Is writing Bash scripts programming or server administration (Stack Overflow or Server Fault)?   Feel free to add your examples in the comments...  I think the answer is that most questions fit in at least two sites and what matters is not the issue itself but what was the bigger issue the asker was trying to solve.


The  user on Code Review meta has had a strange behaviour recently:   First of all, it has 5 reputation instead of 1. Thirty minutes ago, it felt that it was a good idea to update 91 questions at once. Right now, the "active questions" page is totally meaningless since there are only old questions in a somewhat random order. It removed some inline tags in some answers (, "" -> "teaching") while it did not removed them in the questions.   Has it gone crazy?  EDIT:  Including screenshots:

Recently the  bot was ran on Ask Ubuntu Meta to migrate all the MSO links to MSE links. But in the process, the bot converted all the posts written in markdown to HTML. An example preview:    This bot doesn't like markdown and I want it to be handed a time-bound suspension. It has vandalized all the posts that were written in markdown to convert to a different language. Moreover, the bot has edited 289 posts on our Meta in a span of less than a second.  In addition to the suspension, it would be better if all the posts can be re-converted to markdown.


sorry for reposting.  I dont get why it is such a good idea to plot the logarithm of the form factor vs $Q^2$ in Guinier plots. It seems arbitrary to me.

Why is it such a good idea to plot the logarithm of the form factor vs $Q^2$ in . It seems arbitrary to me.


I have an imbalanced data set and I want to balance them with  with cross-validation. In order to determine the performance of the classifier on the original data, I will cross-validation as follows: Here, feature X is divided into X_train and X_val. scoring = {'accuracy' : make_scorer(accuracy_score),             'precision' : make_scorer(precision_score),            'recall' : make_scorer(recall_score),             'f1_score' : make_scorer(f1_score)}  model=RandomForestClassifier(n_estimators=50,random_state=10)   results = cross_validate(estimator=model, X=X, y=Y, cv=10, scoring=scoring)  Based on this code, I can find the performance of random forest on the original data. However, I am a bit confused about how I should compare the oversampled data with the original data. I want to determine the best proportion of data and I use the following code. Should I split the original data to train and val and oversample train data and find the performance on val data? I am wondering if the results of these codes are comparable? percentage = np.arange(0.20,0.5,0.02) Measurements = np.zeros( (np.size(percentage),4) )   skf = StratifiedKFold(n_splits=10)  for train_index, test_index in skf.split(X, y):     X_train, X_val = X[train_index], X[test_index]     y_train, y_val = y[train_index], y[test_index]        counter = 0     for per in percentage:          smote_nc = SMOTENC(sampling_strategy = per, categorical_features=[0,1,2,3,4,6,8,9], random_state=0)         X_resampled, y_resampled = smote_nc.fit_resample(X_train, y_train)          X_resampled = pd.DataFrame(X_resampled, columns=X_val_train.columns)           after_X_resampled = encoding(X_resampled)                  RF = RandomForestClassifier(n_estimators=50,random_state=10)          RF.fit(after_X_resampled, y_resampled)                  prediction = RF.predict(X_val)                   Measurements[counter,0] += accuracy_score(y_val, prediction)         Measurements[counter,1] += precision_score(y_val, prediction)         Measurements[counter,2] += recall_score(y_val, prediction)         Measurements[counter,3] += f1_score(y_val, prediction)          counter+=1

I have an imbalanced dataset and I am trying different methods to address the data imbalance. I found this  that explains the correct way to cross validate when oversampling data using SMOTE technique. I have created a model using AdaBoost algorithm and set the following parametres to be used in Grid Search:     ada = AdaBoostClassifier(n_estimators=100, random_state=42)     params = {         'n_estimators': [50, 100, 200],         'random_state': [42]     }  According to the article, this is the wrong way to oversample:     X_train_upsample, y_train_upsample = SMOTE(random_state=42).fit_sample(X_train, y_train)          # cross-validate using grid search          grid_naive_up = GridSearchCV(ada, param_grid=params, cv=kf,                                   scoring='recall').fit(X_train_upsample,                                                         y_train_upsample)     grid_naive_up.best_score_  0.6715940782827282     # test set     recall_score(y_test, grid_naive_up.predict(X_test))  0.2824858757062147 Whereas the correct way to oversample is like so:     from imblearn.pipeline import Pipeline, make_pipeline          imba_pipeline = make_pipeline(SMOTE(random_state=42),                                    AdaBoostClassifier(n_estimators=100, random_state=42))     cross_val_score(imba_pipeline, X_train, y_train, scoring='recall', cv=kf)     new_params = {'adaboostclassifier__' + key: params[key] for key in params}     grid_imba = GridSearchCV(imba_pipeline, param_grid=new_params, cv=kf, scoring='recall',                             return_train_score=True)     grid_imba.fit(X_train, y_train);       # How well do we do on our validation set?     grid_imba.best_score_  0.29015614186873506     # compare this to the test set:     y_test_predict = grid_imba.predict(X_test)  0.2824858757062147 So, according to the article, the first method is wrong because when upsampling before cross validation, the validation recall isn't a good measure of the test recall (28.2%). However when using the imblearn pipeline for upsampling as part of the cross validation, the validation set recall (29%) was a good estimate of the test set recall (28.3%). According to the article, the reason for this is:  When upsampling before cross validation, you will be picking the most oversampled model, because the oversampling is allowing data to leak from the validation folds into the training folds.  Can anyone explain to me simply how the oversampling allows data to leak into the validation and causes the overfitting? And why does this problem not occur in the imblearn pipeline?


"Something can either be in state A or in state B; it cannot be in both of these states simultaneously, and it cannot be in neither of them. It has to be in one of those two states". What would those two states be called with respect to each other? For example, something can either be living or dead, it cannot be both or neither at the same time. So the property of being living or dead would be called _________ of each other. It can be called the opposites of each other but that doesn't convey the full meaning. Because "black" and "white" are "opposites", but something can be other than black and white e.g., red. So it fulfills the second condition of not being in both of the states simultaneously but doesn't suffice the first condition of being in either of those states. For reference, it is called نقیض(Naqeed) in Arabic. There is a separate word for opposite i.e., ضد (zidd).

For example:     1) In statistics, this attribute will always either be 0% or 100%, never in-between.      2) The boundary is either safe or destroyed, because there is never a state where it is only 'slightly leaking'.      3) The rash either itches or does not. It can't itch a little. That would still be an itch.   What word can we use to describe this attribute?


It's very convenient using inline sugar like that: obj?.func(); and obj ?? anotherObj  But I'm trying to find an alternative to the same approach in case I want to pull data from a dictionary without knowing whether the dictionary has the key I'm looking for or not.  Specifically I'd like to do something equivalent to:  someDictionary[someKey] ?? anotherValue such that, if key exists it would use the corresponding value in the dictionary and if not, it will use anotherValue. Obviously it's not possible to use as I wrote it here since it makes no sense, but the idea behind it is sound.  Is there a way to simplify it to be used inline, without making a separate check with if?

The indexer into Dictionary throws an exception if the key is missing.  Is there an implementation of IDictionary that instead will return default(T)? I know about the TryGetValue() method, but that's impossible to use with LINQ. Would this efficiently do what I need?: myDict.FirstOrDefault(a => a.Key == someKeyKalue);  I don't think it will as I think it will iterate the keys instead of using a Hash lookup.


Is there a CSS Framework that tries to provide for business applications, specifically?  I've looked at the Mocha UI which is based on MooTools. Honestly, though, I'd like to avoid dealing with Javascript and Moo (or jQuery / jQuery UI). I tend to believe that most of what you need for a simple web app can be handled in CSS without the Javascript mods to it.  Many of the polished CSS is aimed at blogging or web publishing needs that are different from the UI needs of a business app. It seems like this must be a problem that someone has solved, but I can't seem to find a solution.  My hope would be that proposed solutions would be language agnostic (work with PHP, ASP, CF, etc.). However, if there is a framework rooted in a language that handles the UI in a very "finished" sense, then I'd be interested in looking at that, even if it meant adopting a framework that forced the use of a particular server-side language.  My goal is not to go MVC, just have some nice looking CSS that would fit an application.  BOUNTY: I decided to start a bounty on this question because I think there must be some useful "starting points" (stated minimally) of CSS which are geared toward web apps, with my preference being that they're hopefully:   platform independent or accomodating various dev platforms, and free or nearly free (as in, not $1000 for a collection of controls)   "Inspirational" Example: (play on words intentional, sorry) I did find a church website development company that published a  which is very enticing, but it seems like it's usable only to those who develop church sites using their software as a service (?). Regardless, the CSS and complementary graphics are not out there for public consumption.

This is a general, community wiki  question to address non-specific "I need a CMS or Wiki that does x, y, and z..." questions.  If your question was closed as a duplicate of this question and you feel that the information provided here does not provide a sufficient answer, please open a discussion on .    I have a list of features that I want for my website's Content Management System (CMS) - where can I find a [free] script that includes all of them?


Let $n \in \mathbb{N}$ and $A = (a_{ij}) \in \mathbb{R}^{n \times n}$ where $a_{ij} := i +j \quad \forall 1 \leq i, j \leq n$. Find the rank of matrix $A$ and prove its value of every $n \in \mathbb{N}$.   $\begin{align} \operatorname{rank}( \begin{pmatrix}2   \end{pmatrix})&=1\\ \operatorname{rank}( \begin{pmatrix} 2 & 3 \\ 3 & 4 \\ \end{pmatrix})&=2\\ \operatorname{rank}( \begin{pmatrix} 2 & 3 & 4\\ 3 & 4 & 5\\ 4 & 5 & 6\\ \end{pmatrix})&=2\\ \operatorname{rank}( \begin{pmatrix} 2 & 3 & 4 & 5\\ 3 & 4 & 5 & 6\\ 4 & 5 & 6 & 7\\ 5 & 6 & 7 & 8\\ \end{pmatrix})&=2 \\ \operatorname{rank}( \begin{pmatrix} 2 & 3 & 4 & 5 & 6\\ 3 & 4 & 5 & 6 & 7\\ 4 & 5 & 6 & 7 & 8\\ 5 & 6 & 7 & 8 & 9\\ 6 & 7 & 8 & 9 & 10\\ \end{pmatrix})&=2 \\ \end{align}$  I have no idea how to start that task.  Thank you in advance for your help.

Let $A$ be a $n\times n$ matrix with entries $a_{ij}=i+j $ . Calculate rank of $A$.  My work : I noticed that A is symmetric . Hence all of its eigen vectors are real .. That is all i have got .   Your help will be highly appreciated .Thank you .


My objective is to actually get to the Standard Error for every point estimate of a linear regression.  I originally thought that the Standard Error of a linear regression model was constant.  And, that it was simply equal to the square root of the Mean Squared Deviation of the residual.  That's why the model's Standard Error is also referred to as the RMSE.    I now understand that when you construct a Confidence Interval around the trendline of estimates... at each point estimate, the applicable Standard Error is different from the overall model's Standard Error or RMSE as described above.    The first part of my question, is how do you calculate this specific Standard Error at a specific point estimate?  Could one provide a link to a numerical example to facilitate my interpretation of the formula?   I understand that such Standard Errors have a predictable pattern.  They are much lower than the model's overall Standard Error for values fairly close to the Mean value.  And, they are larger from the same model's Standard Error as you go further away from the Mean value.  As a result, Confidence Intervals are not parallel to the regression trendline.  Instead, they curve like an hourglass shape.    My second part to this overall question is: How come the resulting hourglass shape of the resulting Confidence Interval as depicted does not break the linear regression assumption that the variance of residuals remain constant across observations (the heteroskedasticity thing)?

Let's take the following example:  set.seed(342) x1 <- runif(100) x2 <- runif(100) y <- x1+x2 + 2*x1*x2 + rnorm(100) fit <- lm(y~x1*x2)   This creates a model of y based on x1 and x2, using a OLS regression.  If we wish to predict y for a given x_vec we could simply use the formula we get from the summary(fit).  However, what if we want to predict the lower and upper predictions of y? (for a given confidence level).  How then would we build the formula?


What are the things one can expect to understand after studying the representation of a group? I have seen many answers on pages regarding the importance and philosophy of representation theory but I am unable to understand what good it will do as a short term goal (meaning I'm not interesting in things it will enable me to study later).   Suppose I have studied the representation of $SO(n)$ or $SU(n)$. What are the questions I will be able to answer about it that I can't (or not easily) without the knowledge of representation theory?  Edit: I don't understand why even after explaining that what I'm looking for is not available on that page, this question is marked as duplicate.   To quote, it says now that "This question was marked as an exact duplicate of an existing question." which according to me is rather absurd. I'd argue that this is much more specific and will benefit a lot of people getting introduced to the subject.

Representation theory is a subject I want to like (it can be fun finding the representations of a group), but it's hard for me to see it as a subject that arises naturally or why it is important. I can think of two mathematical reasons for studying it:   The character table of a group is packs a lot of information about the group and is concise. It is practically/computationally nice to have explicit matrices that model a group.   But there must certainly be deeper things that I am missing. I can understand why one would want to study group actions (the axioms for a group beg you to think of elements as operators), but why look at group actions on vector spaces? Is it because linear algebra is so easy/well-known (when compared to just modules, say)?  I am also told that representation theory is important in quantum mechanics. For example, physics should be $\mathrm{SO}(3)$ invariant and when we represent this on a Hilbert space of wave-functions, we are led to information about angular momentum. But this seems to only trivially invoke representation theory since we already start with a subgroup of $\mathrm{GL}(n)$ and then extend it to act on wave functions by $\psi(x,t) \mapsto \psi(Ax,t)$ for $A$ in $\mathrm{SO}(n)$.   claims that if our physical system has $G$ as a symmetry group, then there is a correspondence between particles and representations of $G$. I'm not sure if I understand this correspondence since it seems to be saying that if we act an element of G on a state that corresponds to some particle, then this new state also corresponds to the same particle. So a particle is an orbit of the $G$ action? Anyone know of good sources that talk about this?


There are some guys who seem to be flooding or spamming me. Is there a way to ignore or block a user, like what can be done in Facebook, for example?

Stack Overflow has successfully borrowed at least one XBox feature (Achievements).  I'd like to see another feature borrowed as well. Let's say I'm playing Halo online and another player is being a bigot.  I have the option to add him to a list of ignored users.  After doing that, all the racist things he says will never be heard through my headphones anymore. Now, on Stack Overflow, I'd like the ability to add a user to a list of ignored users.  This would hide all of that user's comments, and maybe his questions and answers as well (not sure if hiding questions/answers is necessary). This serves multiple purposes:  It would make it easy for users to avoid other users' flamebait. It would give users a more appropriate response to flamebait. The ability to start flame wars would be reduced, since fewer users would see those comments. Users would now have an incentive to be more diplomatic, as there is now a negative consequence to the behavior (the silent treatment). Administrators could review which users are the most often ignored, which would be a strong indication that someone should be  or even locked out of their account. Administrators wouldn't have to spend as much time dealing with complaints about abusive users, since users would have a better way to respond.    makes a good point in a comment to an answer, that I thought should get more visibility:  I had a problem, reported it and got the response "not bad enough to do anything about, sorry". Which is kind of true, because the only options available to the mods are the nuclear one (penalty box) and the zero-effect one (do nothing). We need a middle ground option where abuse can be handled for you without also being handled for everyone.


How to integrate $\int_{-\infty}^\infty e^{\large \frac{-x^2}{a^2}} dx$ using substitution?   I know that $\int_0^\infty e^{-x^2}dx = \frac12\sqrt{\pi}$.

I am having trouble understanding where the following integral form comes from: $$\int_{-\infty}^{\infty} e^{-a x^2 }e^{-bx}=\sqrt{\frac{\pi}{a}}e^{\frac{b^2}{a}}$$ I see and understand that the value of the improper Gaussian integral is there, and I surmise that a change of variables is necessary when integrating, but I cannot figure out exactly how to prove this answer.