I am looking for a BibTex .bst file that references with numbers in the order references appear, and the references themselves include only: -author with initials  -journal  -volume  -start page  -year  with minimal space between references  as this example:  "this database consolidates PPI data available in multiple primary interaction databases, namely BIND [1], BioGRID [2]..."   Alfarano C. et al. Nucleic Acids Res 33: D418 (2005). Stark C. et al. Nucleic Acids Res 39: D698 (2011).   I have looked for one that fits those requirements , but all of them include all the fields.  Does anyone know where I can find a .bst file like that one? Or which would be the best one in the link above to modify, and how to modify it? Many thanks!

When you prepare an article for a journal (in my case, Quantum Information and Computation, Rinton Press), often they ask you to use some format for your references; in my case, the following:     [1] R. Calderbank and P. Shor (1996), Good quantum error          correcting codes exist,  Phys. Rev. A, 54, pp. 1098-1106.      [2] M.A. Nielsen and J. Kempe (2001), Separable states   are  more disordered globally than locally, quant-ph/0105090.      [3] A.W. Marshall and I. Olkin (1979), Inequalities:   theory of majorization and its applications, Academic Press (New   York).   The issue is, sometimes (and this is the case) they do not provide a .bst style file for bibtex users. I (and I guess many other people) prefer not to copy all the references of a bibtex file one by one into a tex document. So here is the question I am trying to answer:     What is the easiest way to create a .bst file? (for Rinton or any other publisher)   At first sight, I thought this would be very easy to do: after all, a .bst file is just a mere script to give format to a list. Strangely to me, after a long search I have been unable to find a simple clean solution to this problem. These are the the options I have been looking at:   I have tried to adapt a previous .bst file: concretely, apsrev4-1.bst, which has a similar format. Other people have tried this solution before , . However, it is an ugly option. First, it requires going through the script of the .bst and understanding it. Second, the script format used in different .bst files differs (quite annoyingly), so it is not easy to modify them unless you do understand what's written. The above solution is quite hideous and you really lose time on it, so I was wondering: isn't there any software tool (hopefully with a GUI) that does this job? It should, after all, pretty easy to program for a .bst script expert some sort of program to generate .bst files. There are some related questions in this site asking for something similar , ; there I have seen a couple of proposed apps, but going through their manuals they seem not so easy to use. Isn't there some software tool available to generate a .bst in less than 1 hour of work?   Remarks: ideally I would like to use/personalize/create .bst styles that support eprint fields (e.g. aps4-1.bst).


I have a specific application that requires a board to be powered by Alkaline batteries and would like to solder direct to the PCB using wave solder vs. hand solder (need to consider a high volume manufacturing method).   The battery will NOT be an SMT to the PCB, but thru-hole leads.   The battery will be be on the top of the PCB with other components, but not resting on any of the electronics.   Please send any issues, problems, or suggestions to push this forward and minimize rework, scrap, or wounded materials. Any consideration to damaging the Alkaline battery?  Example of leads, not the actual Alkaline battery to be used.

Common sense says that you don't wave solder batteries, because the wave would short them for seconds. Yet in  I read       Primary lithium cells may be wave soldered as long as the cell temperature does not exceed +85°C. Cells may be placed in a holder or hand soldered after reflow (tabbed cells).     The first sentence seems to suggest that it's OK to wave solder batteries. Do I read this correctly, and doesn't the battery suffer from the shorting?


I have two devices /dev/sdc1 and /dev/sdc3.  /dev/sdc1 is mounted on / and /dev/sdc3 is mounted on /home.  The problem is that the device sdc1 is full whereas sdc3 has a lot of spare space. I want to determine where all that space on sdc1 gone (I suspect installed packages. a lot of them).  I tried to use du (and ncdu which makes this info more visual) but it calculates size of the whole tree (/home is nested on /) and I want to know only what's filling one of my devices. Is there a way to do that?  To clarify: I need some way to calculate usage of a device, not just exclude some subdirectories (which may be applicable in my situation, but I believe it can be more complex than that)

This is probably something basic but I'm not able to make it work. I'm trying to use DU to get a total size of files minus certain directories. I need to exclude one specific directory called uploads but not every directory called uploads. For example, my file structure looks a bit like this:  /store   /uploads     /junk_to_ignore     /more_junk_to_ignore   /user_one     /uploads   /user_two   I can run the following command:   du -ch --exclude=uploads*    and it gives me the file size minus all the "uploads" directories. However, in trying to exclude certain directories (and all its sub-directories) I fail. I've tried variations of:  du -ch --exclude=./uploads* du -ch --exclude='/full/path/to/uploads/*'   but can't seem to figure it out. How do I exclude a specific directory?


I have a file named MyFile.txt with the following contents:     Username=myusername   EncryptedPassword=9k3S+sS3g\=\=   Each time I need to change the username and password I run a shell script. In the shell script I store the save username and password to two variables namely:     oldusername="myusername"   oldpassword="9k3S+sS3g\=\="      newusername="mynewusername"      newpassword="U8djlk+h\=="      sed -i "s/$oldusername/$newusername/g" MyFile.txt      sed -i "s/$oldpassword/$newpassword/g" MyFile.txt   The first sed works properly and replaces the username, however the second sed command doesn't work and the password is not changed in the file. I think it is because of the "\" character present in the variables.  Could someone help me out with this and let me know how to go about it?  Thanks..

Take the following script:  #!/bin/sh sed 's/(127\.0\.1\.1)\s/\1/' [some file]   If I try to run this in sh (dash here), it'll fail because of the parentheses, which need to be escaped. But I don't need to escape the backslashes themselves (between the octets, or in the \s or \1). What's the rule here? What about when I need to use {...} or [...]? Is there a list of what I do and don't need to escape?


Is it in registry? Is it in some special folder? I basically want to reset my bluetooth and want my computer to "forget" all bluetooth devices. All method here have failed. So I need some more drastic measure  Uninstalling bluetooth driver and reinstalling don't work.

I cannot remove any bluetooth devices from my computer. I tried so many ways. Removing it from device manager, control panel, settings, bluetooth. None work. Why this is a problem? Say I change bluetooth adapter. I can't add the device because the device is still there. I can't connect either because it's not paired correctly with the new adapter. I tried unhide devices remove them. Shows up again in device manager. There are solutions that some programs do some long time ago. The program no longer exist. This is a bug that happens in many windows 10. What should I do? I just want my computer to "forget" all bluetooth device and start a new Where are all those Bluetooth device stored? I can delete them all. Someone told me to paste something in powershell. Something like Keith Miller's answer. This is the result. not only device I really want to remove is not listed, I cannot remove any devices at all      Select a device to remove (0 to Exit): 17     Removing device: Mi Phone mimax 3     Sorry, an error occured.          ******** Bluetooth Devices ********              1 - Generic Attribute Profile         2 - Bluetooth LE Generic Attribute Service         3 - Galaxy A70         4 - Device Information Service         5 - 小米蓝牙手柄         6 - Bluetooth LE Generic Attribute Service         7 - Generic Attribute Profile         8 - Bluetooth LE Generic Attribute Service         9 - Generic Access Profile        10 - Lenovo A6000        11 - Bluetooth LE Generic Attribute Service        12 - MX Master        13 - Generic Attribute Profile        14 - Device Information Service        15 - Device Information Service        16 - BT-163        17 - SMI-M1        18 - Bluetooth LE Generic Attribute Service        19 - Bluetooth LE Generic Attribute Service        20 - Avantree Saturn Pro        21 - Generic Access Profile        22 - Bluetooth LE Generic Attribute Service        23 - MX Master        24 - Generic Access Profile        25 - Bluetooth LE Generic Attribute Service          Select a device to remove (0 to Exit): 24     Removing device: Generic Access Profile     Sorry, an error occured.       I am looking for a more lower level solution. Things like getting rid some registry entry or some directory. Where do all info about these devices stored? I want to just delete them


I am trying to import ArcPy module into spyder and it does not work.     import arcpy Traceback (most recent call last):      File "", line 1, in        import arcpy      ModuleNotFoundError: No module named 'arcpy'   I am using Anaconda 64 bit, Python 3.7, ArcGIS 10.3.1.  I have tried the following, nothing works:   Downloaded Anaconda 32 bit, Python 2.7. I am not sure if have changed everything correctly though. Do I have to change anything else after I installed Anaconda 32-bit with Python 2.7? Change spyder Python interpreter in presettings to C:\Python27\ArcGIS10.3\python.exe. When I restart Spyder the console is broken. Add ";%PYTHON_HOME%" to my environment variables in Windows advanced system settings   What else should I try?    I did not see  before.   My problem is solved now.    The following helped:   Installing Python Anaconda 32-bit with python 2.7 and activating python 2.7 in the Anaconda Prompt () Step 2&3 on the following page:  Adding this to my code: sys.path.append("C:\Python27\ArcGIS10.3\Lib\site-packages") sys.path.append(r'C:\Program Files (x86)\ArcGIS\Desktop10.3\arcpy') sys.path.append(r'C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcToolbox\Scripts') sys.path.append(r'C:\Program Files (x86)\ArcGIS\Desktop10.3\bin') sys.path.append("C:\Python27\ArcGIS10.3\Lib")

This questions has been asked before too and I did go through most of the suggestions. Things I have tried so far: setting up correct  path variable environment, installing anaconda 32 bits, python 2.7, or even switching to python 2.7 in cmd while initially using Anaconda 3 , adding Desktop 10.4.pth file with  following path.  C:\Program Files (x86)\ArcGIS\Desktop10.4\bin C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcToolBox\Scripts   I also added those paths in environment variable   These suggestions help me to reduce the error. But Now I am getting a different error. Looks like python can find arcpy but missing another package.  Getting this error while trying to import arcpy in python 3.6.   File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\__init__.py", line 22, in <module>     from arcpy.geoprocessing import gp    File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\geoprocessing\__init__.py", line 14, in <module>     from _base import *  ModuleNotFoundError: No module named '_base'   Any suggestions?


Consider an $n \times n$ matrix of the form $$ A = \begin{pmatrix} M & P \\ 0 & N \end{pmatrix} $$ with $M \in \Bbb K^{r \times r}$, $P \in \Bbb K^{r \times s}$, and $0 \in \Bbb K^{s \times r}$ is the zero $s \times r$ matrix, $n = s+r$. Show that $$\det(A) = \det(M) \cdot \det(N)$$   I know that I have to approach this question by changing $M$ and $N$ into upper triangular matrix, but how do I do this? I am only allowed to use row operations. Thanks in advance. Similar questions aren't showing the row operations method.

How prove the following equality for a block matrix? $$\det\left[\begin{array}[cc]\\A&C\\ 0&B\end{array}\right]=\det(A)\det(B)$$ I tried to use a proof by induction but I'm stuck. Is there a simpler method? Thanks for help.


I have 2 points in 3d space ,point A= <5,3,6> and B=<8,2,3>   I want to rotate "point B" by 30 degree from point A.  how do I solve this question using quaternion.  Plz, explain the steps....


There's a proverb in Hindi which literally translates to:      (He/she/You/they) doesn't know how to dance and falsely blames the   floor for being crooked/broken/skewed   What is an equivalent English proverb for this? Obviously, it need not be about dancing as long as the point is conveyed, which is:   the target doesn't have the skill/ability/knowledge for the dance. the floor is perfectly fine and it shouldn't be blamed.   EDIT: I've been forced to add this bit to convey that the idiom 'A bad workman blames his tools' doesn't fit in this context.   The workman blaming his tools would be like a dancer blaming his shoes. A dancer blaming the floor would be like the workman blaming the floor or something that disturbed him while working or even the weather. Hope that can convey the difference.

Is there an idiom or phrase associated with a person who can't do some work or something but he or she blames something or somebody else?


var func=function(){console.log(that)} var obj = {     foo(){         var that=this;         var a=func;         a();     } }     obj.foo();   Result :   Uncaught ReferenceError: that is not defined

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


On my Windows 7 32-bit. svchost.exe is using lots of Memory and slowing my PC down big time.  I already have auto update turned off and it is on manual mode.  How can I fix this problem? Thanks

I'm having a problem with Windows 7 64-bit. I thought it was slow and all, but then I saw that the CPU usage was always around 80% and started searching for a solution.  There are two svchost.exe's consuming around 30% each and in the resources monitor there's a system interrupts consuming 45% all the time. I tried closing the applications, but it makes no difference.  I tried some other things that I've found on Google, like disable system updates, but it didn't work.  I don't know if it will help but here's my specifications:  Core 2 Duo 4400 ATI Radeon 4850 4 GB DDR2 RAM     EDIT  I ran the suggested program and got this information; did I get it right?      EDIT  As you asked here it is, did I get it right now? The other TCP/IP there's nothing.    EDIT  I ran msconfig and took the services that one of the svchost.exe processes was using out of the startup and now my CPU is around 50%, but I still would like to improve it further. I can't lose that much CPU power just because of Windows...    EDIT  Yeah, there's nothing I can do here. I am going to reinstall Windows XP soon, it's really weird...


I had Win8 installed on my samsung laptop. But I removed it and the recovery partition too. In fact I nuked my drive. Is there anyway I can get my key back.

I'm a computer technician and we started selling few Windows 8 machine. We saw the new COA label does not show the key and after reading a little bit online, realized those systems came with the key emmebeded in the eUFI BIOS.   My question is : How do I reinstall Windows 8 if the hard drive is crashed? I kind of get that you can install it with a media and the media should activate the licence embedded. What is the media required? Is a retail DVD is able to do the work or do I need a system builder kit? I understand the manufacturer is reponsible to provide media  or replace the failed drive under the warranty but what will happen when warranty expire? I'll have to sell a full windows 8 licence with a key?  Thanks


Currently I use Lighroom and wanted to start using Photoshop for my editing . I am very new to  Photoshop and have no idea what is the latest version, what are plug ins and other terminology used with Photoshop. I also come across something called Photoshop elements. What is that?   I use windows 7 and canon 6d. Kindly suggest which version Photoshop I need. My interest is wedding , portraits, children photography if that helps in deciding.

I'm a bit overwhelmed by the available options in regards to the three major photo editing apps from Adobe.  Does anyone know of an article or site that lists the features of Lightroom, PS Elements, and PS, side by side?  I know that Lightroom revolves around edits and workflow, and that PS is the big kahuna of image editing.  Where does Elements fit in to this understanding?


I'm trying to prove the following inequality,   $$ \rho(AB) + \rho(BC) \le \rho(B) + \rho(ABC) $$  where $A, B, C \in L(V)$, $V$ is a finite-dimensional vector space and $\rho(A)$ means the rank of the linear operator $A$.  I know that $\min(\rho(AB), \rho(BC)) \le \rho(B)$. So I tried to prove that $\max(\rho(AB), \rho(BC)) \le \rho(ABC))$ but couldn't get anywhere.  Any hint is appreciated, thanks.

I was looking for an answer for this problem in terms of matrices, but I really don't know how to prove this result. The proposition says that:  Let $A\in M_{m\times k}(\mathbb{C})$, $B\in M_{k\times p}(\mathbb{C})$ and $C\in M_{p\times n}(\mathbb{C})$, then $\textrm{rank}(AB)+\textrm{rank}(BC)\leq \textrm{rank}(B)+\textrm{rank}(ABC)$


To better understand SVD, I'm trying to recreate the values for U, S, and V using straight numpy, but I can't get the same results.  According to numpy's  for its implementation of SVD, it returns values for U, S, and V such that you can recreate your original dataset in the following way:  (U*S) @ V = original_data   My understanding is that the values for U are derived from the eigenvectors of $ XX^T $, V from the eigenvectors of $X^TX$, and they share the same eigenvalues, and their square root comprise the values for S.    So, to recreate these on my own I'm doing the following:  from sklearn.datasets import load_boston boston = load_boston() X = boston.data u_vals, u_vecs = np.linalg.eig(X.dot(X.T)) v_vals, v_vecs = np.linalg.eig(X.T.dot(X))   My thinking is that u_vecs[:, :13] @ np.diag(v_vals**.5) @ v_vecs.T ought to do the trick.    However, this gives very different results.    Even more, I've checked further, and the only difference between the values I have from numpy's eigensolver and the ones returned from its svd method are the signs involved in the eigenvectors used.    However, my (perhaps naive) understanding is that this shouldn't make a difference.  However, I'm clearly mistaken in something.  Is it simply a case of using a different eigensolver, or is there a deeper misunderstanding that I'm not seeing?

I am trying to do SVD by hand:  m<-matrix(c(1,0,1,2,1,1,1,0,0),byrow=TRUE,nrow=3)  U=eigen(m%*%t(m))$vector V=eigen(t(m)%*%m)$vector D=sqrt(diag(eigen(m%*%t(m))$values))  U1=svd(m)$u V1=svd(m)$v D1=diag(svd(m)$d)  U1%*%D1%*%t(V1) U%*%D%*%t(V)   But the last line does not return m back. Why? It seems to has something to do with signs of these eigenvectors... Or did I misunderstand the procedure?


I've been struggling with this problem, actually I was doing a program in python and did   1j ** 1j(complex numbers) (In python a**b = $a^b$ )   and found out the answer to be a real number with value $0.2079$, How to calculate this value of $i^i$?

How do I calculate the outcome of taking one complex number to the power of another, ie  $\displaystyle {(a + bi)}^{(c + di)}$?


I have the following problem: Let's assume we have a dataset with X and Y values. If we plot them on a scatter plot it would look somehow like the following graph:  If we have a look at this, we see some patterns here: We have 3 axis. I am looking for an algorithm or ML method to find any description for those axis, for example the linear functions, so that I can obtain the following:  If we would have only a single axis, then I would choose a simple linear regression. But the difficulty here is, that we have these multiple axis. Do you have an idea how to achieve this?

I have a set of data that is not ordered in any particular way but when plotted clearly has two distinct trends. A simple linear regression would not really be adequate here because of the clear distinction between the two series. Is there a simple way to get the two independent linear trendlines?  For the record I'm using Python and I am reasonably comfortable with programming and data analysis , including machine learning but am willing to jump over to R if absolutely necessary.


I want to have the query result look like this:  Product Desc     Site 1     Site 2     Site 3     Site 4  Product A        100        200        300        400 Product B         50         60         70         80   My table looks like this  Site ProductCode Amount  1    A            10.00 1    B            20.00 2    B            30.00 3    A            40.00 3    A            50.00 4    B            60.00 4    B            70.00   How will I build my sql query?

My table is like this:  Sitecode    Month  Amount --------    -----  ------ XX          Jan     1000 XX          Jan     3000 XX          Apr     3000 XX          Apr     1000   What I want is, to show the result something like this:  Sitecode    MonthJAN   MonthAPR --------    --------   -------- XX          4000       4000


I currently have four panniers (two front, two rear) on my touring bike and plan to purchase a new touring bike which comes with front suspension forks. Is it possible and if so, safe to add front panniers to a front suspension fork?

I'm going on a bike trip and need the extra storage supplied by front panniers. But my bike has front suspension. I can replace the fork with a solid one but that will increase my costs. Is it  A) possible, B) a good idea,  to attach panniers to forks w suspension?


how can we differenciate present perfect continuous . we use it for the actions which started in the past and still continuing but we start doing the exam in present continuous tense. I am working on the project. I have been working on the project.

how are you?  Well, my biggest doubt at the moment is the difference between these two tenses. Actually, the more I study the more I have doubts with these tenses.      /         These similar threads helped me to clarify and reiterate my previous understanding.   I'm not posting in these threads because the site suggests avoiding asking for clarification (I don't know why because it would avoid new threads with the same content).  My main doubt is as follows:     I've lived in New York for two years.   In my understanding, the sentence above implies (1) that I lived in NY for two years and now I live in another place; or (2) I'm moving to another city after two years living in NY; or (3) I lived in NY for two years, then I moved to another place for some period and, finally, I'm returning. Is that correct?     I've been living in New York for two years.   Whereas the sentence above, in my understanding, implies that I lived in NY for two years and I still living there.  Anyway, many sources that I've already read say that these two sentences have the same meaning and are interchangeable. Therein lies my question. Is that correct? Because if these two sentences are interchangeable, it destroys all my understanding.  Thanks in advance.


If $a^2+b^2=c^2 $ and $a+b+c=1000$ where a,b,c are positive integers, find the product $abc$.  First I tried this: $$(a+b)^2=(1000-c)^2$$ $$a^2+b^2+2ab=c^2+1000^2-2000c$$ $$2ab=1000^2-2000c$$  But I didn't know how to proceed from here so I tried a different method. I tried to solve this by using the formula that generates Pythagorean triples: $m^2+1, m^2-1, 2m$ so I got: $$m^2+1 +m^2-1 +2m = 1000$$ $$2m^2+2m=1000$$ $$m^2+m=500$$  Now if I solve the quadratic equation $$m^2+m-500=0$$  then I'm getting an irrational answer. So how do I solve this?

The "Euler Project" problem 9 () asks to solve:  $a^2$ + $b^2$ = $c^2$ a + b + c = 1000  I find answers solving it with brute-force and programmatically, but is there a way to solve the problem ONLY mathematically? Can someone help, please?  Problem as explained in Project Euler website:  A Pythagorean triplet is a set of three natural numbers, a < b < c, for which,  a^2 + b^2 = c^2 For example, 3^2 + 4^2 = 9 + 16 = 25 = 52.  There exists exactly one Pythagorean triplet for which a + b + c = 1000.  Find the product abc.


within the console.log I am receiving an array{items: Array(1)}  items: Array(1) 0: {id: 4, imageIndex: 3} length: 1 __proto__: Array(0) __proto__: Object   I am trying to print through this array to retrieve the imageIndex and getting an undefined.   for (var image in imageList) {     console.log(image.imageIndex); }   If I use for...of within the loop, I get an 'imageList' is not iterable.

I've been told not to use for...in with arrays in JavaScript. Why not?


Logistic regression seems to be a simple version of Conditional Random field, I am unable to figure out how. Perhaps my fundamentals are shaky.

If you have read  tutorial about CRF, on page 4 under the section Classification, it wants to relate CRF to Logistic Regression (or Maximum Entropy, as it is known by this name in NLP community).   The formulation of Logistic Regression is said to be  $ p(y|x) = \frac{1}{Z(X)}exp \{ \lambda_y + \sum_{j=1}^{K}\lambda_{y,j}x_{j}\} $.  On the other hand, on the Wikipedia  for logistic regression, the formulation is  $ f(t) = \frac{1}{1+e^{-t}} $  and the classifier's formulation is the explanation of this formulation which is derived from Logistic Function.  My question is, first, how Logistic Regression and Maximum Entropy Classifier are related to each other and are identical?   Second, the CRF tutorial says Logistic Regression (or Maximum Entropy Classifier) is simple CRF model, how?


I read this book 15 years ago or so and am trying to find it again. A teen-aged boy transports through time, I think via a fountain, to a world which he doesn't recognize (comes to find out it is earth hundreds, if not thousands, of years in the future) When he is first transported he comes out in a jungle type area. The book goes on to have him captured and then enslaved by a clan.  He eventually wins his freedom by acts of valor in battle. He becomes a major warrior in the clan and falls in love with one of the girls. Once everything falls into place with his life there, he is chasing an enemy in that same jungle and I want to say a beam of light transports him back to his own time without him aging. He appears at that same fountain wearing his battle gear about to throw a spear with everyone in the mall area wondering what he is doing.  I'm pretty sure this is fairly accurate, but it has been a while and I could be misremembering some events.  Thanks for your help!

Trying to remember a book about (I think) a boy who goes through a portal (possibly struck by lightning?).   Ends up in a strange, primitive bush/forest land. Alien but somewhat Earth-like plantation everywhere - I believe the grass was purple. There are very primitive humans (or humanoids?) and the main character was possibly made a slave by a tribe? Thinks is on alien planet. It is revealed they are still on earth when someone has a glass bottle which reads "Coca-cola" on it. There was something to do with quicksand which seemed important to the plot.   Probably read sometime around the late 90s, but could have been written earlier.  Was either a short novel or possibly even a short story.  Would be curious if anyone can remember this.


I have migrated from Windows to Ubuntu very recently. In Windows I had 3 drives and I am using the same here. I have installed my OS in one. I can't read/write or remove files/directories from either of the other two drives.  root@vishnu-desktop:~# sudo fdisk -l Disk /dev/sda: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: dos Disk identifier: 0xa3e0317f Device     Boot      Start        End    Sectors   Size Id Type /dev/sda1  *          2048     206847     204800   100M  7 HPFS/NTFS/exFAT /dev/sda2           206848  314572799  314365952 149.9G 83 Linux /dev/sda3        314572800 1363148799 1048576000   500G  7 HPFS/NTFS/exFAT /dev/sda4       1363148800 3907026943 2543878144   1.2T  7 HPFS/NTFS/exFAT   In the above /dev/sda2 is where I have installed Ubuntu.  In /dev/sda3 and /dev/sda4 I am unable to do anything.

I've been looking at questions like  and  and they all say "Boot into windows" which I am unable to do. Then after much cautioning, the option remove_hiberfile is suggested. I would love that option. I don't care about the programs I had open, or the data in them. The windows partition is on /dev/sda5, so I ran  sudo mount /dev/sda5 /mnt/win   Lots of reading later...  sudo mount -t ntfs-3g -o remove_hiberfile /dev/sda5 /mnt/win sudo mount -t ntfs-3g -o debug,remove_hiberfile /dev/sda5 /mnt/win   Still no luck. It's like the remove_hiberfile option isn't being recognized, because I don't get an error when trying to use the option remove_hiberfile3ejeiofe but rather the same message.  This is the message given as a result of all above commands (adding debug did not change anything):  The disk contains an unclean file system (0, 0). Metadata kept in Windows cache, refused to mount. Failed to mount '/dev/sda5': Operation not permitted The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option.   I am able to mount read-only, but that doesn't help me much.


I used the RakhniDecryptor to decrypt my files, but they keep getting encrypted.  I used multiple scanners to search for the RakhniEncryptor on my PC:  Malwarebytes/SuperantiSpyware/NOD32/Kaspersky Malware Scanner.   But, no luck. I used RakhniDecryptor to decrypt, but don't want to keep doing that.   Any suggestions?  Usefull links:

What should I do if my Windows computer seems to be infected with a virus or malware?  What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware?   This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.


I read in statistic, "a realization of independent copies" from "Elements of copula modelling with R", and do not understand the meaning. I search and found that it means, the two random variables have the same distribution, but they are independent . I also found that the copies themself cannot be independent. That is, they are identical but not independent. So, I still do not understand what does "a realization of independent copies" and why they are not independent?

I am going through the book Introduction to Probability by Joseph Blitzstein, Jessica Hwang, and I found the following problem on mixture of two Normal distributions:  A certain stock has low volatility on some days and high volatility on other days. Suppose that the probability of a low volatility day is $p$ and of a high volatility day is $q = 1 -p$, and that on low volatility days the percent change in the stock price is $\mathcal{N}(0, \sigma_1 ^ 2)$, while on high volatility days the percent change is $\mathcal{N}(0, \sigma_2 ^ 2)$, with $\sigma_1 < \sigma_2$.  Let $X$ be the percent change of the stock on a certain day. The distribution is said tobe a mixture of two Normal distributions, and a convenient way to represent $X$ is as $X = I_1 X_1 + I_2 X_2$, where $I_1$ is the indicator random variable of having a low volatility day, $I_2 = 1 - I_1$, $X_j \sim \mathcal{N}(0, \sigma_j ^ 2)$, and $I_1, X_1, X_2$ are independent.  I was trying to write a sample space and then to define random variables $I_1, X, X_1, X_2$ for the above scenario. Let $L$ denote a low volatility day and $H$ denote a high volatility. We can represent the percentage change in stock price by $x$. Therefore we can write sample space as set of all ordered pairs of the form $(T, x)$, where $T \in \{L, H\}$ and $x \in \mathbb{R}$. In other words, the sample space $\Omega$ is given by $$\Omega = \left\{(T, x) : T \in \{L, H\}, x \in \mathbb{R} \right\}$$ I also defined random variables $I_1: \Omega \to \{0, 1\}$, $X: \Omega \to \mathbb{R}$, $X_2$ as follows: $$ I_1((T, x)) := \begin{cases}               1 & \quad \text{if } T = L \\ 0 & \quad \text{if } T = H                \end{cases} $$ and $$ X((T, x)) := x.$$ I am comfortable until this. But instead of defining $X$ as above, suppose we try to define $X$ as $X := I_1 X_1 + I_2 X_2$. This means that we first need to define $X_1$ and $X_2$, which I am having trouble with. Conditional on $I_1 = 1$, we have $X_1 \sim \mathcal{N}(0, \sigma_1 ^ 2)$. In other words, if we consider a 'new sample space' $\Omega ^ \prime = \{(L, x) : x \in \mathbb{R}\}$, we can define $X_1 : \Omega ^ \prime \to \mathbb{R}$ by $X_1((L, x)) := x$ and say that $X_1 \sim \mathcal{N}(0, \sigma_1 ^ 2)$. But how do we define $X_1$ on the old sample space $\Omega$? If we tried defining $X_1((T, x))$ as $x$ if $T = L$ and $0$ if $T = H$, then it would be disaster since then $P(X_1 = 0) = 1 - p \neq 0$, which contradicts the fact that $P(X_1 = k) = 0$ for all $k \in \mathbb{R}$. So how can we define $X_1$ and $X_2$, which we can further use to define $X$?


I have a rigged body and I want to put some clothes on it. I fit it to the body mesh, then transfer weights from the body to the clothing item. But when I add the armature modifier to it and choose the body skeleton, the mesh changes its position and slightly deforms. Could you please help me with the direction where I should look?

When I parent mesh to an armature (automatic weights), the mesh "jumps" forward a bit. If I select armature and switch to edit mode it "jumps" backward a bit.   Why is it happening and how can I fix it? I already applied location, rotation, and scale to the mesh and armature, but it didn't help.  Thank you in advance!


Is it possible to call functions in python based on string?  Lets say I have a string x="test_A;test_B;test_C"  I have a list sequence that I created based on the delimiter ";".   sequence = x.split(';') print(sequence)   I get the following results  ['test_A', test_B', 'test_C', '']   Now, I want to run the following functions in the order   Test_A() Test_B() Test_C()   Is there any way in python to do that?  Try running this:  # Functions defined  def test_A(param):     print(param)  def test_B(param):     print(param + ' again')  def test_C(param):     print('and ' + param + ' again')   # Dictionary defined  d = dict({     'test_A': test_A,     'test_B': test_B,     'test_C': test_C     })   # Your code  x = "test_A;test_B;test_C"  sequence = x.split(';')  print(sequence)  for func_name in sequence:     d[func_name]('hi')  # Prints this # hi # hi again # and hi again

What is the best way to go about calling a function given a string with the function's name in a Python program.  For example, let's say that I have a module foo, and I have a string whose content is "bar". What is the best way to call foo.bar()?  I need to get the return value of the function, which is why I don't just use eval. I figured out how to do it by using eval to define a temp function that returns the result of that function call, but I'm hoping that there is a more elegant way to do this.


I have a button within a custom DialogFragment that I'm trying to set the OnClickListener of. The DialogFragment uses a custom layout that contains the button. I receive a NullPointerException when I try to set the OnClickListener of the button (saying the button is null).  Here is the layout file:  <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"     android:orientation="vertical" android:layout_width="wrap_content"     android:layout_height="wrap_content">      <EditText         android:id="@+id/task_content"         android:layout_width="fill_parent"         android:layout_height="wrap_content"         android:hint="Enter a task." />      <EditText         android:id="@+id/task_notes"         android:layout_width="fill_parent"         android:layout_height="wrap_content"         android:hint="Enter a note." />      <Button         android:id="@+id/date_picker_button"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:text="Choose a date"/>      <TextView         android:id="@+id/chosen_date"         android:layout_width="fill_parent"         android:layout_height="wrap_content" />      <Button         android:id="@+id/time_picker_button"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:text="Choose a time"/>      <TextView         android:id="@+id/chosen_time"         android:layout_width="fill_parent"         android:layout_height="wrap_content" />  </LinearLayout>   And the custom DialogFragment:  public class AddTaskDialogFragment extends DialogFragment implements DatePickerFragment.setDate{      private static final String TAG = "AddTaskDialogFragment";      @Override     public Dialog onCreateDialog(Bundle savedInstanceState) {         AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());          LayoutInflater inflater = getActivity().getLayoutInflater();          builder.setView(inflater.inflate(R.layout.dialog_add_task, null))                 .setTitle("Create your task.")                 .setPositiveButton("Add", new DialogInterface.OnClickListener() {                     @Override                     public void onClick(DialogInterface dialog, int which) {                         Task task = new Task();                     }                 })                 .setNegativeButton("Cancel", new DialogInterface.OnClickListener() {                     @Override                     public void onClick(DialogInterface dialog, int which) {                         dismiss();                     }                 });          AlertDialog alertDialog = builder.create();          Button datePickerButton = (Button) alertDialog.findViewById(R.id.date_picker_button);         // datePickerButton is null here vvvv, causing NullPointerException         datePickerButton.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                 DatePickerFragment datePickerFragment = new DatePickerFragment();                 datePickerFragment.show(getFragmentManager(), "datePickerFragment");             }         });          return alertDialog;      }  }

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


I'm wondering which statistical test to chose to find out which of my five DV is the difference between Country X and Country Y not statistically significant?   My Variables are:  1 Independent variable: Nation (Divided into two categories, Country X and Country Y)  5 dependent variables sumscores (comprised of different variables I have transformed into 5 different means)   Thanks beforehand!  - And i'm sorry if its hard to understand me, English is not my native language

I have one independent variable with two levels: Gender (Male and Female), and dependent variables will be composed of three test scores: Impulsivity, Assertiveness, and Social Desirability.  My research question is to know the difference between males and females on all three test scores.  I'm confused about the kind of analysis I should use, and whether or not I've actually labelled the dependent and independent variables correctly? Should I be using a MANOVA?


This is probably pretty straight forward. I want to add a new geometycolumn (27700) to my table which is currently in 3857, but i dont want to alter the points to the new geomtery.   How would i go about this?

I'm importing many sets of geodata into PostGIS, and they have different SRID's. (Some have EPSG:3857, some EPSG:4326, some something else).   I'd like to create an additional geometry column, eg. the_geom_mercator with SRID EPSG:3857, and also keep the original geom column in whatever SRID it came in.  How can I do this with a PostGIS function?


There are no options like "Edit Connections" as suggested by many other questions.Does anybody know how to change password?

How do I manage my hotspot connected devices or change the hotspot password? I can only see the Network Name, Security type and the Password but I can't seem to manage users or the network properties.


I tried to find the probability distribution for this problem and then calculate the expectation of $n$. I suppose the total states of our problem would be $52^n$ and our desired states would be $52$ combination of n with permutation $52!$ for distinct cards and our probability function will be $p(n)=\frac{n!}{(n-52)!(52^n)}$ with $n = 52,53, ....$ But the summation over $p(n)$ is not $1$. I don't know what is wrong with this solution. Can anybody help? Thank you so much

What is the average number of times it would it take to roll a fair 6-sided die and get all numbers on the die?  The order in which the numbers appear does not matter.  I had this questions explained to me by a professor (not math professor), but it was not clear in the explanation.  We were given the answer $(1-(\frac56)^n)^6 = .5$ or $n = 12.152$  Can someone please explain this to me, possibly with a link to a general topic?


The 3rd-level spell  states that you have a flying speed of 10 feet. If you cast  beforehand, does this in practice mean that your flying speed is effectively now 20 feet? I can't see why not, but I just wanted to confirm how these two spells interact first. The background is that I can see this making quite a nice escape tactic, especially in a multi-class build with access to Cunning Action. If it works, it would mean, being able to move up to 60 feet upwards in a round.

If a druid casts longstrider, does the speed increase also apply to swimming or burrow speeds?  For example, in badger form, would the character's burrow speed go from 10' to 20', as well as increase standard movement?    Longstrider reads:     You touch a creature. The target's speed increases by 10 feet until the spell ends.


I am using the Modern CV Cover letter  but the hyphenation at the end of the line is not working. Here you have an  of the cover letter with text in English and you can see how the hyphenation does not work and a lot of space is wasted in the document. The problem persists even when adding \usepackage[english]{babel} in the preamble.  I have tried the solutions proposed  and , but they do not seem to work.

I am writing a cover letter and CV using moderncv. Everything works fine so far, but the text in the cover letter is not justified. I think it is good that it is not hyphenated, but it would look much nicer if the text was justified.  Here is a minimal example:  \documentclass{moderncv} \moderncvstyle{classic}  \usepackage{lipsum} % just for dummy text  \firstname{John} \familyname{Doe}  \begin{document} \recipient{Prof.\ Dr.\ Foo Bar}{} \opening{Dear Professor Dr.\ Bar,} \closing{Yours sincerely,} \enclosure[Attached]{curriculum vit\ae}  \makelettertitle \lipsum[1] \makeletterclosing  \clearpage  \makecvtitle  \section{Education} \cventry{2009--present}{PhD Student}{here}{and}{there}{} \end{document}


Luis arrived in the United States in June 2002.   He started school on August 29th.   Why June is used with 'in' and August is used with 'on'?

I've met the following phrase:     Something happened on February 12-25, 2010.    It means that some event started on February 12th and ended on February 25th. Actually the text was about the Olympic Games. Is it correct to use the preposition on here? And how should it be pronounced in oral speach? Thank you in advance.


..$ sudo apt-get install apache2 Reading package lists... Done Building dependency tree        Reading state information... Done The following extra packages will be installed:   apache2-data Suggested packages:   apache2-doc apache2-suexec-pristine apache2-suexec-custom apache2-utils The following NEW packages will be installed:   apache2 apache2-data 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 250 kB of archives. After this operation, 1,194 kB of additional disk space will be used. Do you want to continue? [Y/n] y WARNING: The following packages cannot be authenticated!   apache2-data apache2 Install these packages without verification? [y/N] y Err http://archive.ubuntu.com/ubuntu/ utopic-security/main apache2-data all 2.4.10-1ubuntu1.1   404  Not Found [IP: 91.189.91.13 80] Err http://archive.ubuntu.com/ubuntu/ utopic-security/main apache2 i386 2.4.10-1ubuntu1.1   404  Not Found [IP: 91.189.91.13 80] E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/a/apache2/apache2-data_2.4.10-1ubuntu1.1_all.deb  404  Not Found [IP: 91.189.91.13 80]  E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/a/apache2/apache2_2.4.10-1ubuntu1.1_i386.deb  404  Not Found [IP: 91.189.91.13 80]  E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? chumpen@chumpen-Lenovo-G480:~$

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


I haven't updated in a couple of days and I tried updating today and I get this error I searched around yesterday and could find a lot of issues about google chrome but non solved my issue and I don't think it's related to google chrome. N: Skipping acquisition of configured file 'main/binary-i386/Packages', as repository 'https://download.mono-project.com/repo/ubuntu stable-focal InRelease' doesn't support architecture 'i386'

Getting below error message while issuing :  sudo apt-get update  Get:1 http://us.archive.ubuntu.com/ubuntu xenial InRelease [95.8 kB] Ign:2 http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.2 InRelease                                                                                Ign:3 http://dl.google.com/linux/chrome/deb stable InRelease                                                                                Hit:4 http://ppa.launchpad.net/canonical-x/vulkan/ubuntu xenial InRelease                                                                                Hit:5 http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.2 Release                                                                             Hit:6 http://us.archive.ubuntu.com/ubuntu xenial-security InRelease                                                   Ign:7 http://dl.google.com/linux/talkplugin/deb stable InRelease                                                      Hit:8 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease                                                    Ign:9 http://linux.dropbox.com/ubuntu wily InRelease                                            Hit:10 http://ppa.launchpad.net/numix/ppa/ubuntu xenial InRelease                               Get:12 http://dl.google.com/linux/chrome/deb stable Release [782 B]       Hit:13 http://dl.google.com/linux/talkplugin/deb stable Release                   Ign:14 https://apt.dockerproject.org/repo ubuntu-wily InRelease           Hit:15 https://apt.dockerproject.org/repo ubuntu-wily Release             Get:16 http://dl.google.com/linux/chrome/deb stable Release.gpg [181 B]   Hit:17 http://linux.dropbox.com/ubuntu wily Release                                   Get:20 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1,191 B] Fetched 98.0 kB in 0s (118 kB/s)                                  Reading package lists... Done N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://dl.google.com/linux/chrome/deb stable InRelease' doesn't support architecture 'i386'   This cuts across various releases of ubuntu


I am trying to find flight details regarding flight #1044 through Frontier Airlines that would have taken off 4/28/2020. Frontier's website only goes back 3 days. Is there another free site where I can view those flight details? Thank you!

Where can I find historical data on flights, specifically Delta international flights?  I need to find out about cancellations, diversions and any other flight data pertaining on particular route at a given time.  This source has to be official and stand up to legal scrutiny.


I have a simple class where the constructor creates an array of objects, and obtain the hash code of each object in the array, as following. At run time, the program throws a null pointer exception when System.identityHashCode(Object x) is called. I have already instantiated the Object. Why might the exception have occurred?  public class ArrayOfObjects  {     private Object[] array;     private int[] arrayIdentity;      public ArrayOfObjects(int N)     {         array = new Object[N];         for (int i = 0; i < N; i ++)         {             array[i] = new Object();             **// The line below throws null pointer exception.**             arrayIdentity[i] = System.identityHashCode(array[i]);          }     }      public static void main(String[] args)      {         ArrayOfObjects arrayOfObjects = new ArrayOfObjects(10);            // Do something.     } }

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


I want to create a script to automate some processes with Redshift. Specifically, I want find an attribute of one of my tables with a SELECT and then use it in a INSERT. My script looks like this:  psql -h ... -c "SELECT id_process FROM process WHERE de_process = 'EMR'" psql -h ... -c "INSERT INTO execution (id_process) values (X);"   In the first sentence I get a unique value, the ID I'm looking for, in a format like this:  id_proceso ------------       2 (1 row)   Then I would like to use it as the value to insert in the second sentence, substituting the "X, but I don't know how to save into a variable and then reuse the output of the first sentence.  Any suggestion?  P.D. In other  it shows how to do it in a unique sentence, but I need to save the value for a future use.

I am trying to INSERT INTO a table using the input from another table. Although this is entirely feasible for many database engines, I always seem to struggle to remember the correct syntax for the SQL engine of the day (, , , , and ).  Is there a silver-bullet syntax coming from an SQL standard (for example, ) that would allow me to insert the values without worrying about the underlying database?


Err:15 http://ppa.launchpad.net/ubuntu-audio-dev/ppa/ubuntu bionic Release        404  Not Found [IP: 91.189.95.83 80] Err:16 http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu bionic Release   404  Not Found [IP: 91.189.95.83 80] Reading package lists... Done E: The repository 'http://ppa.launchpad.net/ubuntu-audio-dev/ppa/ubuntu bionic Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu bionic Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.

When updating, I get the following error message:   W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file.   Here, I find another statement on this error:   This recommends removing certain PPAs; and, I'm not sure if I should do that since it might mean not getting the updates that I need.    Is this what I should do?


I am trying to turn off the hotkey for the Charms Bar (Win+C) in Windows 8. Is there a registry entry to do this or some other way? I want to be able to use that hotkey for something else.  Any ideas?  Thanks,  Niels

Can someone please tell me how to disable the annoying effect that pops up when you drag cursor to top- or bottom-right corners?


I was attemping to Insert data into the database in portions and return the results in portions. Attempted this by putting the request in a while loop and appending the results. Didn't know if there was a better way but i thought i'd try this. HTML <button class="id = "start">Start </button>

  JS Couldn't get this to work not sure why i'm not familiar with javascript. $(document).ready(function(){     $("#start").click(function(){         var start = 0;    var stop = 10;    var limit = start + ',' + stop;    while(results == 10){     $.ajax({       url: "embed.php",       type: "get",       datatype : "json",        data:{ limit: limit } ,       success : function(data)     {       $("#results").prepend(data);       start = start + 10;    }, error : function(data)    {       console.log('error');    }    });    }    }); });  Decleared var results = 10; in a script tag in header. PHP Calls the function that performs the query and returns an array of success messages. <?php  $limit = filter_var($_REQUEST["limit"], FILTER_SANITIZE_STRING); $results = $insertData->insertMovies($limit); $i = 1; foreach($result as $item){?>
<?php echo $item; $i++;?>
 <?php }?>

I'm using  to go through JavaScript, and it's returning many suggestions to replace == (two equals signs) with === (three equals signs) when doing things like comparing idSele_UNVEHtype.value.length == 0 inside of an if statement.  Is there a performance benefit to replacing == with ===?   Any performance improvement would be welcomed as many comparison operators exist.  If no type conversion takes place, would there be a performance gain over ==?


I have a set of scripts (bash, ruby, python) and want to put everything into a container like file so I can deploy this container on a lot of servers. This scripts need to protect from accessing other users (root included). So my idea was to create a encrypted container with all the sensitive scripts and mount this into RAM on boottime. But after mounting this container, the files are accessible from the system for everybody which has permission to it.  Is there some technique to deploy interpreted scripts (bash, ruby, ...) onto a system and nobody can see its content at any time? I don't want to run some "obfuscating" scripts.

Is it possible to execute a script if there is no permission to read it? In root mode, I made a script and I want the other user to execute this script but not read it. I did chmod to forbid read and write but allow execute, however in user mode, I saw the message that says: permission denied.


Which order (Panicking internally/ Internally panicking) is correct or more widely accepted and why?

For example:     The word rarely turns up outside of those contexts.      The word turns up rarely outside of those contexts.   Which one is correct and why?


This is what I've begun with: So lets say $x=n,y=nk+1,x,y,n\in\Bbb Z$ Lets say we have a integer, d that divides both x and y. So, $d\vert x$ and $d\vert y$ so if there is a gcd, then d must also divide y-x. $d\vert(y-x)$ but we said $x=n,y=nk+1$. Then, $d\vert(nk+1-n)$=$d\vert (n(k-1)+1)$. But I have no idea if I'm heading in the right direction? Any tips?

Given: $a = qb + r$. Then it holds that $\gcd(a,b)=\gcd(b,r)$. That doesn't sound logical to me. Why is this so?    Addendum by LePressentiment on 11/29/2013: (in the interest of  and averting a duplicate)  What's the intuition behind this result? I only recognise the proof and examples solely due to algebraic properties and formal definitions; I'd like to apprehend the result naturally.


I have a situation where an object has 15+ parameters where some are mandatory/optional/have defaults/don't have defaults. Let's say the class is Foo and the params are Bar1, Bar2, ..., BarN.  I could program the class like:   the traditional, tedious way. Easy to define defaults and verbose. However, code will be long and have lots of repetition.  class Foo(object):     def __init__(self, bar1, bar2,...barN='somedefault' ):         self.bar1 = bar1         self.bar2 = bar2         ...         self.barN = barN  abusing(?) the kwargs. Does not support defaults.  class Foo(object):      fields = [ 'bar1', 'bar2', ...n 'barN']      def __init__(self, **kwargs ):         for key in kwargs:             if key in self.fields:                 setattr(self, key, kwargs[key])             else:                 raise Exception('invalid attribute: {0}'.format(key))    For number 2, I could probably change the fields class attribute into a map { 'attribute_name': 'default_value' } and then assign the default_value if that key was not in kwargs.   The context where I'm working is that I'm creating objects that correspond to servers, firewall rules, storage disks, etc., that have a lot of attributes. In a lot of cases I get the attributes from the API so I can do number 2 (even without the validation). However, sometimes a user will create a firewall rule, attach it to a server and send it to an API (POST with JSON body).  Is there some standard/pythonic way to handle objects with a large amount of attributes? Does the approach in #2 seem good or should I really go with the verbose #1 way?  EDIT: one concrete example is a firewall rule object that has the following parameters:      action     destination_address_end     destination_address_start     destination_port_end     destination_port_start     direction     family     icmp_type     position     protocol     source_address_end     source_address_start     source_port_end     source_port_start   Right now I'm leaning towards something like:  class FirewallRule(object):      attributes = {         'action': 'default_value',         'destination_address_end': 'default_value',         'destination_address_start': 'default_value',                 'destination_port_end': 'default_value',         'destination_port_start': 'default_value',         'direction': 'default_value',         'family': 'default_value',         'icmp_type': 'default_value',         'position': 'default_value',         'protocol': 'default_value',         'source_address_end': 'default_value',         'source_address_start': 'default_value',         'source_port_end': 'default_value',         'source_port_start': 'default_value'     }      def __init__(self, **kwargs ):         for key in kwargs:             valur_or_default = kwargs.get(key, attributes[key])             setattr(self, key, valur_or_default)   (In production code I'd obviously add better error handling and validation)

Occasionally I come across methods with an uncomfortable number of parameters.  More often than not, they seem to be constructors.  It seems like there ought to be a better way, but I can't see what it is.    return new Shniz(foo, bar, baz, quux, fred, wilma, barney, dino, donkey)   I've thought of using structs to represent the list of parameters, but that just seems to shift the problem from one place to another, and create another type in the process.  ShnizArgs args = new ShnizArgs(foo, bar, baz, quux, fred, wilma, barney, dino, donkey) return new Shniz(args);   So that doesn't seem like an improvement.  So what is the best approach?


While developing an application I've found a serious error. But first some details: I've wanted  to display a temperature on a GUI. The temperature is a double value. The user should be able to increase/decrease the temperature. The goal was to emulate a heating/temperature valve for the heating unit. In addition to have random values, the user should be able to increase/decrease this value by using the GUI. Basically the value is intialized on startup with 20.1 (just a random value I setted at the beginning).  I've noticed a strange behaviour when I tried to decrease the temperature. Everything works finde when incrementing. But decreasing the temperature (by stepsize 1) leads to the following: 20.1 , 19.1 , 18.1, 17.1, 16.1, and then 15.100000000000001, 14.100000000000001 etc.  What's the reason? The error does just occur, when using values ending on .1. So it does make no difference when trying with a base value of 22.1 or 31.1.  The error always occurs with the change from 16.1 to 15...  It's reproducable everytime. I've wrote a test application, feel free to try it:  package devices;  import java.awt.EventQueue; import java.awt.Font; import java.awt.event.ActionEvent; import java.awt.event.ActionListener;  import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel;  public class Test extends JFrame {  /**  * the temperature  */ private Double temp = 20.1; private JPanel contentPane;  /**  * Launch the application.  */ public static void main(String[] args) {     EventQueue.invokeLater(new Runnable() {         @Override         public void run() {             try {                 Test frame = new Test();                 frame.setVisible(true);             } catch (Exception e) {                 e.printStackTrace();             }         }     }); }  /**  * Create the frame.  */ public Test() {     setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);     setBounds(100, 100, 271, 152);     contentPane = new JPanel();     setContentPane(contentPane);     contentPane.setLayout(null);      final JLabel lblNewLabel = new JLabel("");     lblNewLabel.setBounds(10, 11, 235, 56);     lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 19));     lblNewLabel.setText(String.valueOf(temp));     contentPane.add(lblNewLabel);      JButton btnNewButton_1 = new JButton("Increase");     btnNewButton_1.addActionListener(new ActionListener() {         @Override         public void actionPerformed(ActionEvent e) {             temp = temp + 1;             lblNewLabel.setText(String.valueOf(temp));         }     });     btnNewButton_1.setBounds(10, 78, 101, 23);     contentPane.add(btnNewButton_1);      JButton btnNewButton = new JButton("Decrease");     btnNewButton.setBounds(137, 78, 108, 23);     btnNewButton.addActionListener(new ActionListener() {         @Override         public void actionPerformed(ActionEvent e) {             temp = temp - 1;             lblNewLabel.setText(String.valueOf(temp));         }     });     contentPane.add(btnNewButton); }  }   Greetings and thanks in advance,  Julian

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


When purchasing a used Macintosh, what does one need to know (i.e. what will adverse outcome) regarding the Hardware (serial #?) being tie to an ID?  Apple Products: Due to Apple removing the old website they had to check for iCloud or Apple ID accounts tied to devices we cannot be certain whether or not a device was tied to an account in the past. There is a possibility that a device may bring down a lock from a previous owner after we have already processed it. If a device does bring down a lock past our standard 30 day return policy it will not be accepted for return.    What can be done and what resources are available to mitigate this risk before buying the used hardware?

If I buy a used Macbook Pro from 2015, how do I check if it is registered to the seller, i.e. linked to his AppleID? I checked through the "Check coverage" Apple support site (), and the first point is a green check mark, the remaining two are yellow exclamation marks saying that it has expired. How is this to be understood?  Also, what other things do I need to check to make sure that I do not end up with a Macbook linked to someone else? I want to be able to link it to my own ID as if it were new. I've read that one of these things is that "Find my mac" is deactivated, how can this be verified?


Is there any way for grep to have an AND feature? I mean something like this:  I have these lines:  I have this one line I don't have this other line I have this new line now I don't have this other new line This line is new   So I want for grep to find lines that contain BOTH the words "new" and "line", not only "new line". I know I can do this like this:  grep new file | grep line   But that's not what I'm looking for. I'm looking to do this with one single grep command. This is because this script will let the user input the two terms, and one of the terms might be null, which then throws a grep error and breaks the script.

Is there a grep-like utility that will enable me to do grep searches with logic operators. I want to be able to nest and combine the logical constructs freely. For example, stuff like this should be possible:  grep (term1 && term2) || (term1 && (term3 xor term4)) *   I realize this can be done with vanilla grep and additional bash scripting, but my goal here is to avoid having to do that.


I'm trying to calculate the following limit:  $$\lim_{n\rightarrow\infty}\frac{n^{\sqrt{n}}}{2^{n}}$$  I assume it's equal to $0$, but can't find a way to prove it.  I don't even know where to start..

The question is rather:      Prove the following:   $$  \lim_{x \to \infty} \frac{x ^ {\sqrt x} }{ 2 ^ x} = 0. $$   I was thinking of using the Squeeze Theorem (might not be the right way to go), but finding an upper-bound function proved to be quite tricky.


I assigned a var like this:  MYCUSTOMTAB='     '   But using it in echo both:  echo $MYCUSTOMTAB"blah blah"   or  echo -e $MYCUSTOMTAB"blah blah"   just returns a single space and the rest of the string:   blah blah   How can I print the full string untouched? I want to use it for have a custom indent because \t is too much wide for my tastes.

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?


let $f(x)=x^2$, then $f(f(x))=x^4$, so $x^4$ is a continuous function from $\Bbb R$ to $\Bbb R$ which can be obtained as $f\circ f$ for a continuous $f\colon \Bbb R\to \Bbb R$. general example: for $f(x)=|x|^{\sqrt{d}}$, $d>0$, we have $(f\circ f)(x)=|x|^d$.  I wonder if it is possible to find for example continuous functions $f\colon \Bbb R\to \Bbb R$ such that  $f(f(x))=x^2+1$  $f(f(x))=x^3$  $f(f(x))=\sin x$  $f(f(x))=\arcsin x$  $f(f(x))=\ln x$  $f(f(x))=e^x$  Is it known?   I don't know which theory can be applied to such problem, I formulated these questions while walking with my dog :-)  Are there any general results or counterexamples?

There are some math quizzes like: find a function $\phi:\mathbb{R}\rightarrow\mathbb{R}$  such that $\phi(\phi(x)) = f(x) \equiv x^2 + 1.$  If such $\phi$ exists (it does in this example), $\phi$ can be viewed as a "square root" of $f$ in the sense of function composition because $\phi\circ\phi = f$.  Is there a general theory on the mathematical properties of this kind of square roots? (For instance, for what $f$ will a real analytic $\phi$ exist?)


I am a regular user of stack overflow... I am not getting my reputation notifications(on cup) when someone upvotes or downvotes me from today morning but can see my reputation goes increasing... Why this is happening?

I  and while on other sites I did not get a 'Reputation Notification' to explain that I was given 2 upvotes for my answer - yet if I manually check my Profile here at meta.SE my total Reputation is in agreement with the amount there.  I'm not knowledgeable about the intercommunication between the servers and sites but I would explain it this way: Super User either failed to send or other sites failed to receive the message the I had a reputation update on Super User.  I should have received either two green star trophies (🏆) of 10 reputation each or one of 20; depending on when I returned to one of the Stack Exchange / Stack Overflow / Super User / etc. sites.  Here's a screenshot showing no reputation change notification for Super User:    Here's a screenshot of my Profile over at Super User showing that I was silently credited:    I'm bringing this up on Meta.SE in case the communication is broken between more sites than just Super User and everywhere else.


I am using Spring (Web MVC - REST) 4.3.3, spring security 3.2.4, Spring security Oauth 1.0.0 and OAuth2 for Authorization.  I am storing user's id as principle of authentication object.   My Question is, I want to know which user called the web service in the Service layer. How can I get that?  I want to use it like this,  Suppose someone creates an user. The creator will be stored in the new user. One way is to pass creator in the user object from client but I want that to be got from token itself because it already has that information.  EDIT  A brief explanation of downvote is welcomed.

I have a Spring MVC web app which uses Spring Security.  I want to know the username of the currently logged in user.  I'm using the code snippet given below .  Is this the accepted way?    I don't like having a call to a static method inside this controller - that defeats the whole purpose of Spring, IMHO.  Is there a way to configure the app to have the current SecurityContext, or current Authentication, injected instead?      @RequestMapping(method = RequestMethod.GET)   public ModelAndView showResults(final HttpServletRequest request...) {     final String currentUser = SecurityContextHolder.getContext().getAuthentication().getName();     ...   }


longtime reader, first-time poster.  I'm currently working in a small shop and I am new to the Sys Admin role. We pay our ISP a lot for our VPN and we are looking for a different provider. We are currently very low on funds and the VPN is one of the hooks I need to reel in before we can jump ship.   We have a Cisco ASA 5520 and I've been researching "rolling our own" VPN since it seems like the hardware should be fully capable. After reading I think what we need is IPsec VPN for users to connect from home offices and it seems like Cisco's AnyConnect answers that need. Looking on the flash memory of the firewall I see an AnyConnect 3.1 pkg in there. It may have been set up at some point, but I don't any tells in ASDM.  The more I research, the more I read about AnyConnect licensing (Essentials package etc). Most questions regarding this topic are 5+ years old so I'm curious if anything has changed. This firewall is EOL and I think even the licensing for AnyConnect 3.x is as well.  My question is, do we need to (or can we even) buy AnyConnect licensing in order to set up a VPN? What will happen if I try to set it up in the Wizard without? We will have less than 5/10 concurrent users at any given time for the foreseeable future. I don't know the cost of this licensing, but Cisco service is typically very expensive and as I said we are not a wealthy shop. What are my options?  Thanks in advance for any help!  Edit: Further research tells me that IPsec VPN is free if I opt to pass on the SSL AnyConnect client thing. Am I correct in assuming this is the way I should go? I'm going to have to find some tutorials on how to set this up if that's the only free angle.

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


I have a lot of data in a format I need to rearrange. Current table: Rows of subjects with values, each column corresponding to a time point  I need each "subject" to be duplicated x times (x being the amount of time points, in this case 12) and then (preferably) the values to inhabit it's own column (just transposed essentially) making each subject look like this: Preferred table outcome, three columns: Subject, time, value  I'm usually ok doing it manually, but this time it's just so many "subjects". Any help is appreciated. :)

I have data that looks like this:  Id | Loc1 | Loc2 | Loc3 | Loc4 ---+------+------+------+----- 1  | NY   | CA   | TX   | IL 2  | WA   | OR   | NH   | RI   And I want to convert it to this:  Id | LocNum | Loc ---+--------+---- 1  |   1    | NY 1  |   2    | CA 1  |   3    | TX 1  |   4    | IL 2  |   1    | WA 2  |   2    | OR 2  |   3    | NH 2  |   4    | RI   What's the easiest way to do this in Excel 2007?


As being new to web site development, I have been able to display map on my website, but I want that I should only zoom to some specific places of India on loading of web pages.  Can somebody please suggest on how to go about it.  <!doctype html>   <meta charset="utf-8"> <title>Web Urban Atlas</title> <link type= text/css rel = stylesheet href="urban_stylesheet.css" /> <link rel="stylesheet" href="http://code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">

Urban Atlas

Bangalore

Bangalore is city of gardens

delhi

Content for Delhi

mumbai

Content for Mumbai

I want to start working on a web map at work to map some of our statistics by city.    I have an idea, but I'm not exactly sure where to start.   Are there any definitive resources that provide step by step guidance on how to do this?


I found a lot of similar question but never really found an answer. I bought an ASUS laptop from BestBuy and I got windows 8 on it without any windows media cd/dvd. I would like to install Ubunutu instead of windows, but I would also like to create some kind of windows media so I can go back to it if I ever want to. Is there any way to do this? Thank you all :)

Long story short, my Ubuntu partition and my Windows 8 partition had a fight, and they both lost. I have a computer booting nothing at the moment. So I'm trying to figure out how to get a clean-install of Windows 8 on my laptop. The usual refresh/reset features are out. There are no backups. Recovery partitions are gone.  Ideally, I need a Windows 8 (not Pro) ISO to install, but despite my searches, I cannot seem to find one. Anyone have any ideas how I can reset my PC and install Windows 8 again?


I have written a shell script named startup.sh which does a lot of things (basically start a lot of things for me after turning on my local machine) - here is an excerpt:  #!/bin/bash gnome-terminal --tab & veracrypt --auto-mount favorites & thunderbird & ~/Application/IDEA/bin/./idea.sh & /usr/bin/slack & echo myuser mypass | skypeforlinux --pipelogin & sh bsync-project-folder.sh & exit   Open a console window and do:  . startup.sh   The shell script is executed and the window is closed afterwards.  Also working:  sh startup.sh   OR  ./startup.sh   The shell script is executed and the terminal window stays open - however it does not return to the console and have to stop script execution with CTRL + C (no matter if I execute with the command line interpreter or with ./).  However I want a clean exit of my script and then return to the same console with a success message. What am I missing?

abhigenie92@ubuntu:~$ (sleep 2; echo $BASH_SUBSHELL ;sleep 2) 1 abhigenie92@ubuntu:~$ (sleep 2; echo $BASH_SUBSHELL ;sleep 2)& [1] 3297 abhigenie92@ubuntu:~$ 1  [1]+  Done                    ( sleep 2; echo $BASH_SUBSHELL; sleep 2 )   What happens when launch it as a background process, why don't I get the prompt back and I have to press Enter? In both cases it launches a child shell.


How can I regain control of a randomly moving cursor which seems to have a mind of its own. It jumps to a new screen position at random resulting in my typing 'inserting' itself where it should not be etc. It will also jump and activate a link. It is not OS specific as it happens on my two computers (Windows 7 and Windows XP). I have cleaned/changed the mouse and also changed the mouse pad to no effect. HELP.

I have noticed for a few months that my mouse will randomly jerk across the screen. I'm super paranoid about security. But this is just silly!  Has anyone else experienced this, and found out what causes it? It happens to me every couple of days. The cursor will jump across the screen about 1000+ pixels. I thought it was my mousepad - changed it, and that's not it.  I imagine it's just a hardware issue.  This is on a PC with a Razer Naga, wired mouse. The mouse worked for about a year before I started noticing these issues. They have persisted even after a reformat / reinstall.


My Overall CPU condition is fine, but one of my processors (the first one) seems to be heavily working (and I can feel that from my fan noise and the heat).    I checked task manager and resource monitor to see which process is taking that much power. Found nothing. I guessed that maybe not all the processes are actually shown in resource monitor so I installed Process Lasso and Process Explorer (both are more or less similar to Windows' resource monitor). Still found nothing. I also set all affinities to 1-7, meaning that all my processes can be start on all my CPUs except the first one. Yet, there is a huge load on my first CPU.    By some research, I found that it may be the case that my first CPU's clock is somehow set to be really high, which I guess, means more power consumption, more fan speed and more heat (I don't have a concrete knowledge about the clock, so not sure if my guess is really correct). Noting that my Maximum Frequency in resource monitor, is actually suggesting that my CPU (don't indicates which one) is working with nearly 130% of maximum frequency (= boost speed/base speed *100 = 3.6/2.6 *100 = 138 %) or my maximum boost speed frequency to be more precise. So I tried to change my maximum processor state to something considerably less than 100% (say 50) to see If there is any difference in heat and noise. Nothing again even after reboot.    My system is dual-boot and I don't have that problem in my other OS (Ubuntu 16.04). No noise or heat.  So here are my questions:   Is my first CPU really working that much? If so, then how it's possible to have such normal average CPU usage (the average is incredibly close tho the mean of all other CPUs)? Why affinity change doesn't made any difference on the CPU usage? The CPU usage of all my processes is less than what is actually is being used. Look at resource monitor picture: I have selected all the processes and now the orange line shows the amount of CPU that is taken by them. I checked the same in safe mode. Orange line, exactly coincides the total usage in safe mode. So I'm suspecting that something is happening in my normal boot. What may be the reason and how I can solve it?   My system is:   Intel core i7 - 4720 HQ  2.6 GHz upto 3.6 Windows 10 (64 bit) NVidia GTX 950 M     PS:   This screenshot, shows the Process Lasso's interface. Those 8 green bars on upper right show my CPU usage. Also the column called Rules, indicates the affinities on the processes.

I've installed Process Lasso and in All processes tab, set all affinities to 1-7, meaning that all the processes can be start on all my CPUs except the first one. Yet, there is a huge load on my first CPU.   I personally have no clue what's happening here and really appreciate any help.  My system is:   Intel core i7 - 4720 HQ  2.6 GHz upto 3.6 Windows 10 (64 bit) NVidia GTX 950 M   This screenshot, shows the software's interface. Those 8 green bars on upper right show my CPU usage. Also the column called Rules, indicates the affinities on the processes.       PS: These are screenshots that show the more familiar Task Manager and Resource Monitor. I've sorted all with respect to their CPU usage. Note that the overall CPU usage is just fine (less than 30% most of the time), but in Resource Monitor, same as the Process Lasso, it's obvious that that most of the load is on CPU0 and the others are almost free.  Also I found out that my total CPU usage, is actually more than all my processes altogether! The orange line in Resource Monitor picture, shows the amount of CPU usage of all my processes. (I did the same in safe mode. Orange line, exactly coincides the total usage in safe mode. So I'm suspecting that something is happening in my normal boot.)


Story  A year ago, I got a new laptop ASUS TUF Gaming FX505, Windows 10 wasn't really easy to use so I switched so I decided to install Ubuntu 18.04 on it with a USB Key alongside of Windows 10. I had some various issues because the BIOS is not well suited for that kind of application, but it worked fine at the time.  This week, I ran into major issues and needed to re-install Ubuntu 18.04 because I'm not able to boot, (anyway, I was planning to re-install it because I had some issues) but now, the USB Key I used to install Ubuntu doesn't work anymore!  Issue  When trying to boot from the USB Key, it gives a terminal-like screen with four option,  Try Ubuntu, Install Ubuntu and some others options I don't remember. When I select one of thoses two options, it tries to boot from the USB Key, at this point, it either freezes like that:  Or if I selected the Try Ubuntu option, I get a frozen desktop, but the mouse is free. Or if I selected the Install Ubuntu option, I get a frozen desktop again but with the download Ubuntu dialog box, empty, there is just the language selection visible, oh and everything is frozen of course! But the mouse is free.  Now, to shut-off Ubuntu, it also doesn't work! I'm forced to do a long push on the power button to turn off Ubuntu.  So, I can't run any command in the Terminal.  Remember that it worked a year ago but not now!  What I tried to do  • I downloaded a new .iso of Ubuntu 18.04 and used Startup Disk Creator (on another PC) on the USB Key that used to work. Unfortunately, it didn't worked. • Then I did it on a better USB Key. And got the same issue. • Eventually, I tried on another computer, and it was working, there was no issues like that. I guess which my computer doesn't like Ubuntu... • I looked on Internet and found some solutions, but some needed to press the Shift key but when I do that, it does absolutely nothing, and pressing Esc just switches between the boot screen or the boot terminal where I can't input any command. So no solution found on any other posts. • I tried to boot with nomodeset but I can't even get the Live session.  Computer Specs  ASUS TUF Gaming FX505, laptop including:   An Intel Core i7 8750H CPU (6 cores for 12 threads at 2200MHz) A NVIDIA GeForce GTX 10-Series GPU 8GiB of memory A 1TB HDD on and a 256GB SSD   Credits: The image above was took from this post: .

This question is asked often in Ask Ubuntu, sometimes with few hints about the situation.   Please provide a list of possible reasons to help troubleshoot the problem.


After running a bash script, my (gnome-)terminal ended up printing each new line where the last one ended (but on the next row). I think it was printf that broke things, since it works if I replace printf with echo. Have you any idea what this could be, and how to fix it without having to close the terminal session?    I can not provide the script, because of security reasons. When I have time I will see if I can create a minimal broken example to show.

I'd tried command cat with an executable file:  cat /bin/ls   Now I can't read any word in this terminal (Linux console). How can I fix it?


Let $(X,d)$ a metric space and $\mu$ an outer measure on $(X,d)$ s.t. every borel set are $\mu-$Caratheodory measurable. Show that $\mu$ is a meatric outer measure on $(X,d)$.   It mean that I have to prove that $\mu^*(A\cup B)=\mu^*(A)+\mu^*(B)$ if $d(A,B)=\inf\{d(x,y)\mid x\in A,y\in B\}>0$, but I don't have any idea on how prove it.   The fact that $\mu^*(A\cup B)\leq \mu^*(A)+\mu^*(B)$ is obvious. But since I don't have a precise definition of $\mu^*$ (like $\mu^*(E)=\inf\{...\}$) I don't know how to proceed... Any help would be appreciated.

Let $(X, \rho)$ be a metric space and $\mu^*$ and outer measure on $X$. Then, if every open subset of $X$ is $\mu^*$-measurable, $\mu^*$ is a metric outer measure.   I'm stuck with this problem. I'm supposed to prove that for every $A$, $B$ subsets of $X$ with $d(A, B) = \inf\{d(a,b) \mid a \in A, b \in B \} > 0$,  $$\mu^*(A \cup B) = \mu^*(A) + \mu^*(B)$$ and the hypothesis says that if $U \subset X$ is open, then  $$\mu^*(E) = \mu^*(E\cap U) + \mu^*(E\cap U^c)$$ for every set $E$ but I don't know how to do it. I thought of letting $E = A \cup B$ and then try to find some choice of $U$. With that choice of $E$, we have that  $$ \begin{align*} \mu^*(A\cup B) &= \mu^*((A\cup B) \cap U)+\mu^*((A\cup B)\cap A^c)\\ & =\mu^*((A\cap U) \cup (B \cap U))+ \mu^*((a \cap U^c)\cap (B\cap U^c)) \end{align*}$$  So at first sight, it looks like the open set $U$ we seek for has to be of one of the following two forms, $U \subset A$ and $B \subset U^c$ or the inverse, $U \subset B$ and $A \subset U^c$. The problem is that, even though the existence of an open set $U \subset A$ is always guaranteed, I don't know why it should also satisfy the property that $B \subset  U^c$ as well. My guess is that there is some property of metric spaces that I'm not aware off (or maybe I am really off the track here). Any help would be appreciated. Thank you!


I have created a Python script. When I run the script as a standalone by make this a hard set path instead of sys.argv, the script really runs fine.   When I import this script as a python tool box then I get the error at output workspace that dataset is already existed. But there is no dataset in the GDB. I have attached the error file and the script file as well. I think i have set up the parameters  right as well.

I am having trouble running a script tool that I just created in Arc 10.1.  The script runs fine in PythonWin, but when I create a script tool with it, the tool seems to not want to accept folders or geodatabases as its output workspace.  I have the output parameter (argument) set as both an output and a workspace in the script tool, but it still keeps giving me an error that the "Dataset.....already exists"    I'm a new user, so I can't post a picture, but the error is 000725  Here is my script, if that helps out.  import arcpy #allow for overwrites arcpy.env.overwriteOutput = True  #set the workspace inWorkspace = arcpy.GetParameterAsText (0)  #set the erase feature eraseFeature = arcpy.GetParameterAsText (1)  #set the output workspace outWorkspace = arcpy.GetParameterAsText (2)   #get a list of all the features in the workspace arcpy.env.workspace = inWorkspace featureClassList = arcpy.ListFeatureClasses()  try:      #loop through all of the features in the workspace     for featureClass in featureClassList:          #construct the output path         outEraseFeature = outWorkspace + "\\erase_" + featureClass          #perform erase         arcpy.Erase_analysis(featureClass, eraseFeature, outEraseFeature)          arcpy.AddMessage("Wrote clipped file " + outEraseFeature + ". ")         print "Wrote clipped file " + outEraseFeature + ". "  except:      # Report if there was an error     arcpy.AddError("Could not erase feature classes")     print "Could not erase feature classes"     print arcpy.GetMessages()


I have a list of elements 1,...,K  with repeats. For example for K=4 :  [4 2 1 1 2 1 1 3 2  ]    I want to find the sequence that 1,...,K is appeared in the list (without sorting). For example for the above sequence, the result would be   [4, 2 ,1 ,3 ]   How can I write this algorithm efficiently in python, with less runtime.  Thank you!

Is there a built-in that removes duplicates from list in Python, whilst preserving order? I know that I can use a set to remove duplicates, but that destroys the original order. I also know that I can roll my own like this:  def uniq(input):   output = []   for x in input:     if x not in output:       output.append(x)   return output   (Thanks to  for that .)  But I'd like to avail myself of a built-in or a more Pythonic idiom if possible.  Related question:


I get this error when I run the above command.  W: GPG error: http://packages.ros.org trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5523BAEEB01FA116 W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release  Unable to find expected entry 'main/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file)  E: Some index files failed to download. They have been ignored, or old ones used instead.   I tried the methods posted in the forums but the problem isn't solved. The details about my laptop are as follows:  kv@kv:~$ uname -a Linux kv 3.19.0-49-generic #55~14.04.1-Ubuntu SMP Fri Jan 22 11:24:31 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

I added some extra repositories with the Software Sources program. But when I reload the package database, I get an error like the following:     W: GPG error:  trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8BAF9A6F   I know I can fix it using apt-key in a terminal, according to the official Ubuntu documentation. But I would have liked to do it graphically. Is there a way to do this without using a terminal?


I do not want to have to interactively select the area I want to take a screenshot of. I would rather do something like --area=x,y,height,width. Is there any screenshot utility that can do this?

I want to configure a global hotkey to take a new screenshot and save it, say, somewhere inside my home folder. I can take a screenshot with ImageMagick with this command:  import screenshot.jpg   However, if I execute this multiple times, screenshot.jpg will be overwritten multiple times. I want the application to write screenshot1.jpg, screenshot2.jpg, etc. automatically. What my command would look like in this case?


This is a variation of question asked on this site before.  Consider a set with $𝑎_1$ 'distinct' 1s, $𝑎_2$ 'distinct' 2s, ... , $𝑎_𝑛$ 'distinct' ns. You have $𝑎_1+1$ choices for the 1s (including the option of none of them being chosen) and similarly for the other elements. The total number of subsets is therefore  $(𝑎_1+1)(𝑎_2+2)...(𝑎_𝑛+1)$  Now how to find the number of subsets with size $\leq $ 'k'.

The problem of counting the solutions $(a_1,a_2,\ldots,a_n)$ with integer $a_i\geq0$ for $i\in\{1,2,\ldots,n\}$ such that $$a_1+a_2+a_3+....a_n=N$$ can be solved with a stars-and-bars argument. What is the solution if one adds the constraint that $a_i\leq r_i$ for certain integers $r_1,\ldots,r_n$?  e.g. for $n=3$, $N=6$ and $(r_1,r_2,r_3)=(3,3,2)$, the tuple $(a_1,a_2,a_3)=(2,3,1)$ is a solution, but $(2,1,3)$ is not a solution because $a_3=3>2=r_3$.


I found pygmentize thanks to , but it would be great if it could be used to highlight text with less or maybe replace the command. Is there a way to do that? Thanks in advance.

I have installed python-pygments and using it for syntax highlighting with less as described by mankoff  I put a function in my .bashrc  cless () {     pygmentize -f terminal "$1" | less -R }   it is enabling syntax highlighting with less. But when I am going to open a file like /etc/fstab or /etc/apt/apt.conf a error saying  Error: no lexer for filename '/etc/apt/apt.conf' found   I found option to show pygmentize the lexer with -l at this . But what will be the appropriate lexer for such files? and how to use it?


When I give ls-a in my root folder I can actually see zshrc. but when I open my root folder in finder using the open . command, It's not visible. Actually many files are missing..As you can see the zshrc file is visible here. I can't find it in the finder.

I noticed that whenever I add files and delete them, their physical space remains on the disk drive. I uninstalled NTFS Tuxera and I still have the same problem.  So I had to insert the disk under my other Windows laptop to locate the ./#### files and delete them. I was surprised that I couldn't locate those files in Finder, but windows allowed me to view them.  Is there a way to have more control over what files are viewed in Finder?  Platform: retina MacBook Pro, Mountain Lion (OS X 10.8)


When I build a template class can I make the class a pure abstract class?  template <class Block> class Filter { public:     Filter();     void add(Frame* frame);     Block* get(); private:     Block* mBlock; };  template <class Block> Filter<Block>::Filter<Block>() { }  template <class Block> void Filter<Block>::add(Frame* frame) {     mBlock = new Block(                 frame->getSampleRate(),                 0xFFFFFFFF,                 frame->getBlockSize(),                 ); }  template <class Block> Block* Filter<Block>::get() { return mBlock; }   the Block class is a pure virtual class and is the base class for what is being passed into the template.  class Block { public:     explicit Block(DWORD dwSampleRate, DWORD dwMicrophoneIndex, DWORD dwBlockSize);     ~Block();      DWORD getSampleRate();     DWORD getMicrophoneIndex();     DWORD getBlockSize();      virtual void process() = 0; private:     DWORD mdwSampleRate;     DWORD mdwMicrophoneIndex;     DWORD mdwBlockSize; };   The implementer will create a derived class from Block.  class FooBlock : public Block { public:     FooBlock(DWORD dwSampleRate, DWORD dwMicrophoneIndex, DWORD dwBlockSize);     void process(); };   implemented as:  FooBlock::FooBlock(DWORD dwSampleRate, DWORD dwMicrophoneIndex, DWORD dwBlockSize) : Block(dwSampleRate, dwMicrophoneIndex, dwBlockSize) { }  void FooBlock::process() { }   To invoke the filter   Filter<FooBlock>* filter = new Filter<FooBlock>();   which yields the message:     LNK2019: unresolved external symbol "public: __cdecl Filter::Filter(void)" (??0?$Filter@VBlock@@@@QEAA@XZ)   referenced in function "public: __cdecl MainWindow::MainWindow(class   QWidget *)" (??0MainWindow@@QEAA@PEAVQWidget@@@Z)   Can I create a template that requires a base class?  Or do I need find a different technique to implement this?

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


If I open my JavaScript console (F12 on Chrome) and define a variable var x = {}; and then type x in the console it shows me an empty object like this: {}. So far so good.  If try to see x.a the console will give me undefined, and if I explicitly test x.a === undefined it gives true. So far so good.  Everything is telling me that the value of x.a is undefined.  So, since its value is undefined, I now execute a command that I was expecting to do absolutely nothing: x.a = undefined;. I thought this shouldn't change anything.  But now if I put x in the console, it shows {a: undefined} instead of {}. This is an evidence that something changed...  1. What is happening here?  2. Is there any situation in which this would make a difference?  3. If yes, how can I make that object go back to its initial state?  Note: of course, for question 3, re-assigning to a new {} is obviously not an option, since it would no longer === to the previous value.

Say I create an object as follows: let myObject = {   "ircEvent": "PRIVMSG",   "method": "newURI",   "regex": "^http://.*" };  How should I remove the property regex to end up with new myObject as follows? let myObject = {   "ircEvent": "PRIVMSG",   "method": "newURI" };


I really dont know how to describe this. Im having a discussion with someone, I was sharing information that I found on a topic. Randomly im called out as being rude when nowhere was there evidence of rudeness exchanged. This person seems to have a history of claiming people have a problem or are being rude out of the random blue.   Is there a word to describe these random accusations that dont connect to anything?

I'm looking for either a single word or phrase that would describe either someone or the action of dismissing someone's opinions as something "socially unpopular", without giving any reasoning why, either just to spite them, because they have a poor counter-argument, have been backed into a corner, or something similar.  For example, someone who supports something politically incorrect (like, say, stronger gun control or help for male domestic abuse) might have their views dismissed as racist or sexist or liberal without actually acknowledging and debating against them, thus labeling the former as something they might not be.  I was talking to a friend earlier about politics, and she complained about Germany's immigration problem. She said one issue was that many politicians that try to support stronger immigration laws would immediately be shot down as racist or a nazi and forced to resign, instead of being presented with counter-arguments. Regardless of whether you agree with them or not, what would describe that?  EDIT: Forgot to specify -- the word or phrase I'm looking for would be used in an informal context. And to address further questions, to be used when the person's opinion has legitimate worth and isn't just "being racist" etc, i.e. the dismisser is incorrect, and is only making these accusations because they can't argue further. (Added emphasis to the last sentence of the first paragraph)