I installed elementary os onto a usb using legacy settings, and I can boot it using legacy bios options. However, I would like to switch the boot to UEFI so that I dont have to change my PC's firmware setting everytime I want to boot windows from my hard drive, or switch it again when I want to boot elementary off the USB. Is this possible, and how would I go about doing it?

Accidental BIOS mode install  I have Intel 64-bit hardware with UEFI setup utility. Ubuntu 14.04.1 LTS was  installed as the only operating system on the only drive attached. Accidentally Ubuntu was installed in BIOS/CSM/legacy mode.  Convert to UEFI  While later on learning about UEFI, the goal is to change this existing Ubuntu installation to (quicker) boot via EFI/UEFI. I do still want to have some kind of - 2 seconds displayed - boot menu that allows me to enter the UEFI setup utility. Therefore I think I do need use Grub (can't use an EFI boot stub) and . I have already re-partitioned the drive using a Live CD and inserted a 200 MiB EFI partition in the beginning of the drive and marked that fat16 formatted partition as type id 0xEF.  Before:  # fdisk -l /dev/sda ...    Device Boot      Start         End      Blocks   Id  System /dev/sda1   *        2048   108478463    54238208   83  Linux /dev/sda2       108480510   125044735     8282113    5  Extended /dev/sda5       108480512   125044735     8282112   82  Linux swap / Solaris   After:     Device Boot      Start         End      Blocks   Id  System /dev/sda1   *      411648   108478463    54033408   83  Linux /dev/sda2       108480510   125044735     8282113    5  Extended /dev/sda3            2048      411647      204800   ef  EFI (FAT-12/16/32) /dev/sda5       108480512   125044735     8282112   82  Linux swap / Solaris  Partition table entries are not in disk order   No boot-repair please  The Ubuntu community wiki suggests to use boot-repair to . I don't want to use a GUI, or install any extra packages, and I don't want any data being accidentally sent to pastebin.com and because I do want to know what will be changed exactly, I don't want to use .  Under the hood  Trying to figure out what boot-repair actually does, I found this snippet:     Boot-Repair will convert a BIOS install to UEFI by uninstalling grub-pc, and installing grub-efi, if gpt partitioned.   source:   UEFI mode install comparison  A clean Ubuntu 14.04.1 installation in UEFI mode creates a 512 MiB Fat32 formatted EFI partition. That partition contains one directory /EFI/ubuntu, containing 4 files: grub.cfg, grubx64.efi, MokManager.efi and shimx64.efi. The grub.cfg contains:  search.fs_uuid 7d843e47-3917-4114-8725-55dfa1fbe002 root hd0,gpt2 set prefix=($root)'/boot/grub' configfile $prefix/grub.cfg   Search.fs_uuid points to the UUID of the Linux installation partition, in this comparison UEFI installation Linux is installed partition /dev/sda2 (versus sda1 in BIOS mode installation).   No potential Asrock firmware issues found  Having CSM still disabled in firmware and using the clean UEFI mode Ubuntu installation. Resizing the 512 MiB EFI partition to 200 MiB using a Live CD and gparted results in that its formatting changes from FAT32 to FAT16. The Asrock firmware P1.50 (incorrectly called BIOS by AMI in boot message "BIOS date") is still able to boot into UEFI mode Ubuntu: UEFI+FAT16 = ok. (msdos) using the same Live CD terminal command gdisk and its commands r g p w also results in a UEFI bootable Ubuntu on an MBR partitioned drive: UEFI+MBR = ok.   Question  Does this mean that the only commands I do need to execute - from the legacy Ubuntu install and in this order - are:  # apt-get install grub-efi # apt-get remove grub-pc   ? Or is more needed to be done?


I recently moved to Linux from OSx and in there I had mapped Caps lock to Ctrl+b. This was mostly done because of tmux.   How can I do this in Ubuntu 14?  There is a very comprehensive answer here how to remap keys:   But this doesn't cover a key combination like Ctrl+b. It only covers remaping a single key to another key.

I'm trying to achieve the following mapping keycode 135 = <Ctrl-C>  Is it possible to achieve this in some way?


find the lim of the sequance when n $\to \infty  $          $\sqrt{2} ,\sqrt{2\sqrt{2}} , \sqrt{2\sqrt{2\sqrt{2}}} ,.....$

Ok, so I've been playing around with radical graphs and such lately, and I discovered that if the   nth x = √(1st x √ 2nd x ... √nth x);   Then  $$\text{the "infinith" } x = x$$  Example:   $$\sqrt{4\sqrt{4\sqrt{4\sqrt{4\ldots}}}}=4$$ Try it yourself, type calc in Google search, hit  then a number, such as $4$, and repeat, ending with $4$, (or press the buttons instead).  I'm a math-head, not big enough though, I think this sequence is divergent or convergent or whatever, too lazy to search up the difference.  However, can this be explained to me? Like how the Pythagorean Theorem can be explained visually.


Wall of Force states      Nothing can physically pass through the wall.   Is thermal energy, heat, a "thing" that can pass through a wall? Could you use wall of force to insulate yourself from a very cold, or very warm, environment, assuming you don't suffocate?

Is there any text stating that walls or objects made of force can or cannot conduct thermal energy?  For example: Wizard is pushed off edge of volcano into magma. Let's surmise he is able to cast  or some other means that allow him to be inside a sphere of force.   Sphere hits lava, starts to sink. He's protected from the lava by the force wall, but does the thermal energy from the lava "heat" up the force wall which then heats the air inside and eventually traps him inside a death oven where he cooks inside his own wall of force?


I am looking to upgrade RAM on a MacBook mid-2010, Model A1342. According to apple, I can only upgrade up to 4GB of RAM (currently only has 2GB). I don't want to blow up the computer if I add 8GB of RAM. Any help is appreciated. Thank you!

I’ve got a MBP 13′ (mid-2010) 2.4 Core 2 Duo (full specs below) that I’m now operating solely under Win7 64Bit. It formerly run as well under OS X 10.6.8, relatively to which the firmware seems up to date (MBP71.0039.B0B).  Would my system recognize 16 GB RAM if operated under Win7 64 Bit? Or would it require the latest firmware (MBP71.0039.B0E) of OS-X 10.7.5 (which was never installed on my MBP) anyway?   As far as I have read elsewhere, using 16 GB RAM under OS X seems to definitely require this later version of OS X (including the respective firmware update); so I'd like to know whether this is an issue of OS X or (as I suspect) the firmware.    Modellname: MacBook Pro Modell-Identifizierung: MacBookPro7,1 Prozessortyp: Intel Core 2 Duo Prozessorgeschwindigkeit: 2,4 GHz Anzahl der Prozessoren: 1 Gesamtzahl der Kerne: 2 L2-Cache: 3 MB Speicher: 4 GB Busgeschwindigkeit: 1,07 GHz Boot-ROM-Version: MBP71.0039.B0B SMC-Version (System): 1.62f6


I use my smartphone to access this site through the Stack Exchange Android app. As the title of question suggests, I am unable to see mathematical expressions in comments and the title of questions rendered in .

As you can see above, It does not appear to be enabled in the comments. Android app version: 1.0.57  Android version: 4.1.2


In general we know $A^{bc} = A^{cb}$ for integer $A$.  I want to extend this to the case $A=-1$.   For integers $a,b$ I guess the above relation holds,  \begin{align} (-1)^{2\cdot3} = ((-1)^2)^3 = 1 = ((-1)^3)^2 .\end{align}  But if we include the fraction  \begin{align} (-1)^{-\frac{1}{2}} &= ((-1)^{-1})^{\frac{1}{2}} = (-1)^{\frac{1}{2}} = i \\ &= ((-1)^{\frac{1}{2}})^{-1}=\frac{1}{i} = -i \end{align} this does not hold any more.   Is something wrong with my computation?

This is a silly question but under what conditions is $a^{xy}=(a^x)^y$ true, given all are complex numbers?


I recently won a '' badge for having 10 comments with a score of +5 or more. I then proceeded to waste more time than I'm comfortable admitting to trying to find which comments were well liked enough to bolster my ego.  There is no way that I can see to sort comments by number of upvotes on the profile page. Is there any way to do this? I know there is an API somewhere, but I don't know how to use it yet.  I found , but it doesn't seem to have made it into the shiny new profile revamp either.

I have a simple query about Pundit budge (left 10 comments with score of 5 or more).  How close am I for the Pundit badge?


So I wanted to create a fake 2TB USB flash drive (for comedic purposes only), and came across . Apparently someone bought a fake hard drive from China, and inside was a few nuts to give it some weight, and a (probably very low capacity) USB flash drive that had some sort of "looped mode".  Essentially what would happen was whenever you would write a large file (larger then the real capacity of the actual flash drive inside) it would "re-write" itself, AKA erasing itself and starting over, and continuing to do that until the file transfer was complete.   I was already able to make my USB flash drive appear as 2TB (made a Linux SH script, will provide if requested), but I'd really like to know how they are set to "re-write" themselves.  Thanks in advance! Leo   This question is different from the one  because I was requesting more detailed information on how these faked USB devices were set into "loop" mode. The other question was general information about fake USB devices.

I was reading about . How would this be done? The post talks about a 'looped mode' and comments suggest having a different controller to lie to the OS.  I went and bought one of these devices, tried it and it worked as advertized (overwriting data when it was full), although when I formatted it, it started showing its 'true' capacity.  How is this achieved?


They show up super far apart for some reason, I have 3 here but can only see one at a time because of this. Sorry if this isn't the right place for this, I didn't really know where else to report it.   Screenshot:        EDIT: Actually I think a video would explain this better:

There is some unwanted extra spaces in between each site in the Your Sites section.  Steps to reproduce:   Touch the Nav Icon in the left top corner Touch the EDIT link in YOUR SITES Scroll the screen; there is unwanted spaces in between the each site   For reference I recorded the same:    Configurations:   App Version: 1.0.85 Device Manufacturer: Motorola Device Model: XT1033 OS Version: 5.1 (2)


Solution Expanding $(1+x)^{\frac{1}{x}}$ at $x=0$ by Taylor's Formula，we obtain \begin{align*} (1+x)^{\frac{1}{x}}&=\exp\left[\frac{\ln(1+x)}{x}\right]=\exp \left(\frac{x-\frac{x^2}{2}+\frac{x^3}{3}+\cdots }{x}\right)\\ &=\exp \left(1-\frac{x}{2}+\frac{x^2}{3}+\cdots \right)=e\cdot\exp \left(-\frac{x}{2}+\frac{x^2}{3}+\cdots \right) \\ &=e\left[1+\left(-\dfrac{x}{2}+\dfrac{x^2}{3}+\cdots \right)+\frac{1}{2!}\left(-\dfrac{x}{2}+\dfrac{x^2}{3}+\cdots \right)^2+\cdots\right]\\ &=e\left(1-\frac{x}{2}+\frac{11}{24}x^2+\cdots\right)\\ &=e-\frac{ex}{2}+\frac{11}{24}ex^2+\cdots \end{align*} Likewise, expanding $e^{(1+x)^{\frac{1}{x}}}$ at $x=0$, we obtain \begin{align*} e^{(1+x)^{\frac{1}{x}}}&=(e^e)^{1-\frac{x}{2}+\frac{11}{24}x^2-\cdots}=e^e\cdot (e^e)^{-\frac{x}{2}+\frac{11}{24}x^2+\cdots}\\ &=e^e\cdot\left[1+\left(-\frac{x}{2}+\frac{11}{24}x^2+\cdots\right)\ln e^e+\frac{1}{2!}\left(-\frac{x}{2}+\frac{11}{24}x^2+\cdots\right)^2\ln^2 e^e+\cdots\right]\\ &=e^e \cdot\left[1-\frac{ex}{2}+\frac{1}{24}(11e+3e^2)x^2+\cdots\right] \end{align*} Expanding $(1+x)^{\frac{e}{x}}$ at $x=0$, it follows that \begin{align*} (1+x)^{\frac{e}{x}}&=\exp\left[\frac{e\ln(1+x)}{x}\right]=\exp \left(e\cdot\frac{x-\frac{x^2}{2}+\frac{x^3}{3}+\cdots }{x}\right)\\ &=\exp \left(e-\frac{ex}{2}+\frac{ex^2}{3}+\cdots \right)=e^e\cdot\exp \left(-\frac{ex}{2}+\frac{ex^2}{3}+\cdots \right) \\ &=e^e\left[1+\left(-\frac{ex}{2}+\frac{ex^2}{3}+\cdots \right)+\frac{1}{2!}\left(-\frac{ex}{2}+\frac{ex^2}{3}+\cdots \right)^2+\cdots\right]\\ &=e^e\left[1-\frac{ex}{2}+\frac{1}{24}e(8+3e)x^2+\cdots\right] \end{align*} Therefore \begin{align*} &\lim_{x \to 0}\frac{e^{(1+x)^{\frac{1}{x}}}-(1+x)^{\frac{e}{x}}}{x^2}\\ =&\lim_{x \to 0}\frac{e^e\cdot\left[1-\dfrac{ex}{2}+\dfrac{1}{24}e(11+3e)x^2+\cdots\right]-e^e\cdot\left[1-\dfrac{ex}{2}+\dfrac{1}{24}e(8+3e)x^2+\cdots\right]}{x^2}\\ =&e^e\cdot\frac{1}{8}e\\ =&\frac{1}{8}e^{e+1} \end{align*} Please check. Is there any more simpler solution?

By L'Hôpital's rule, it gets $$\lim_{x\to 0}-\frac{\left(e^{(x+1)^{1/x}} (x+1)^{1/x}-e (x+1)^{e/x}\right) ((x+1) \log (x+1)-x)}{2x^3(1+x)},$$which becomes more complicated.  What could I do then?


With respect to the countries about which I am familiar, income tax is partitioned into tax "brackets", meaning that the rate of taxation varies discretely. Different tax rates are therefore applied to different "blocks" of an individual's annual income. The UK, for example, also has a personal allowance - a pot of money an individual can earn tax-free.  This system seems counter-intuitive to me - it complicates annual tax calculation, as income needs to first be partitioned. Why not apply a continuous and smooth (but obviously non-linear) scale to taxation. The rate would approach a limit and start slow, forming a kind of sigmoid-shaped distribution. The tax rate could then be applied in one motion and could be arguably more "fair."  I'm editing this because it seems to have received many responses - which I didn't anticipate, so I'll offer some of my reasoning behind the question.  In my eyes, and from going through some of the comments & answers which skewed my opinion slightly, I see the following pros and cons:  Pros   The commonly held perspective of "There's no point in taking that job for $N/annum because I'd be taxed through the roof." at some salary thresholds would be partially diminished. There's no two ways about it - it would give finer-grained control over income taxation at the expense of  ease-of-understanding. It could offer a fairer tax system, in spite of public impression of complexity. Tax is digital in many countries - we shouldn't have to be narrow-minded about the possibilities for tax any more. Tax tables are (or at least should be) a thing of the past.   Cons   Personal finance has hitherto been blessed with ease of calculation, even with pen and paper. This would throw a spanner in the works. Would there be a limit to how complex the function could become? Could governments exploit the system by making the function so convoluted or employ devious mathematical techniques (e.g. around the rounding of pennies) as to extort certain parts of the populous? The system cannot be changed to accommodate one group without affecting all, however marginally. (Actually, this isn't completely true if a piecewise function is adopted, but that's going even further down the rabbit hole.) This would seriously impact political campaigns for example, as intention can not be so easily conveyed. The fragile tax legal framework would be seriously threatened by such a major change.

In Canada (and many other countries), high-earners pay a greater percentage of their income in taxes than low-earners. Here is our Schedule 1 form:    The marginal utility of money decreases smoothly with increased income: If I earn $91,830, an additional dollar would be slightly less useful to me than the last one. The same is true if I earn $91,831 and earn an extra dollar, but the difference between the two cases is minuscule.  However, my marginal tax rate jumps up by 5.5%, which is not minuscule. Why is that? It seems there is nothing special about the value 91,831. Couldn't the marginal tax rate increase smoothly with income? Here is a made up example where the marginal tax rate increases linearly from 13% at $0 to 33% at $200,000 and then stays constant. The actual function used could be different, but the point is that it would reflect the "smooth" nature of the decrease in the utility of money. The blue line represents the actual function used in Canada.    Are brackets are easier to use than a smooth curve? Is it just a "good enough" approximation to make the calculation simpler? The Schedule 1 form would probably look something like this, which is not that bad: you could do this with a 4-function calculator.


There is an estate tax of 40% on US situs assets of non-resident aliens. Is there any way to minimize this tax using, for example, trusts? Can someone elaborate on this?

I am a non-resident alien holding a brokerage account in the USA but residing outside the USA. My country does not have an estate tax treaty with the USA. So my estate is liable for a significant estate tax up to 40%. Is there any way to avoid or to cover this tax? I thought of buying term insurance for myself, but I am not sure whether US companies will sell term insurance to a non-resident. I want to buy insurance from a US company because I want the death benefit to be in USD. Can someone suggest as to what the best way to approach this issue is?


How do I prove that if $(a_{n})$ is bounded and $\sum(b_{n})$ is absolutely convergent, then $\sum(a_{n}b_{n})$ is absolutely convergent?  I tried to consider the sequence of partial sums of $\sum |a_nb_n|$  $S_n=|a_1b_1|+|a_2b_2|+......+|a_nb_n|$

a) Prove that if $\sum a_n$ converges absolutely and $b_n$ is a bounded sequence, then also $\sum a_nb_n$ converges absolutely.  I wanted to use the comparison test to show it's true, but I think I got something mixed up. Here's what I have so far.  $b_n$ is bounded $\Rightarrow \exists c > 0: |b_k| < c, \forall k \in \mathbb N$  $\sum a_nb_n < \sum a_nc < c\sum a_n$. I'm very tempted to use the comparison test here and say, as $\sum a_n$ converges absolutetly, then so does $c\sum a_n$, but for that I needed the inverted relation, right? I would need $\sum a_n > c\sum a_n$, which is not true. However isn't it obvious that something absolutely convergent multiplied by a constant is also absolutetly convergent? Is there a mathematical way to write this? Thanks a lot in advance.  b) Refute with a counter example: if $\sum a_n$ converges and $b_n$ is a bounded sequence, then also $\sum a_nb_n$ converges.  Is this even possible? I mean, it has to be, but it doesn't make sense to me. If something converges, it means it's bounded, right? And I thought, well, since bounded + bounded = bounded, then bounded*bounded would also get me something bounded again.  Anyway, my idea would be to use for $a_n$ an alternating series that ist only convergent, for example $(-1)^n \frac 1 {n^2}$. But something tells me I'm trying to prove $a_n b_n$ is not absolutely convergent.  Thanks a lot in advance guys!


How can I disable the page "sign in to wifi network" that appears when connected to a wifi network that requires login?  I dont want to disable wifi. I just dont want this page to appear. Is it possible?

When connected to the Internet, the system checks if it's in a walled garden, which is simply trying to connect to Google. If it fails, in Android 5, there'll be an exclamation mark on the WiFi icon or signal icon.   In some situations, this is annoying. Say, in China, Google is blocked, the exclamation mark will always be there, which is meaningless.  How can I disable this check, and make the system assume, connected WiFi/mobile data is connected Internet?


I was just wonder if it would be possible to have a "Copy to Clipboard Button" next to each listing which would just copy the verbatim content of the lstlistings environment to the clipboard.  An acroread-only solution would suffice for my purposes.

I need to include a couple of Python code listings, where the indentation of the lines (using some number of spaces) is significant. I would like for the code listings to be copyable, so the spaces at the beginning of the line need to be be copied along with the text.  This question has been asked in various ways before (e.g. , or ). Those questions focus on making line numbers uncopyable, though.  Making the spaces at the beginning of a line copyable seems to be harder: "I am not sure it is possible to specify in the PDF (at least in a viewer-independent way) that the indentation should be copied too" (). At , Philippe Goutet suggests a solution (turning the spaces into visible spaces, and coloring them in the background color so that they appear invisible) that works using Acrobat Reader, but not all readers. He says "It works under Acrobat Reader and it's extremely pleasant to be able to quickly copy/paste code without problem (perhaps the problem can be circumvented by writing direct PDF code to tell that it's a space, I've never had the time to try)".  Is it possible to produce a PDF with a code listing with copyable real spaces at the beginning of a line?  Minimal example: The line return x should start with four spaces.  \documentclass{article}  \begin{document} \begin{verbatim} def myfunction(x):     return x \end{verbatim} \end{document}   I know that I could attach the code to the PDF as a file, but that's not what I want.


When I trained a backpropagation neural network in MATLAB, I normalized the dataset with the z-score. When I use the trained neural network in Simulink I always normalize the new inputs with the same mean and standard deviation and it gives me good performance, I want to know if what I did is good?

Appreciate your wisdom on this,  My understanding is most of the tutorials recommend normalizing / scaling the data prior feeding the tensorflow models. Doesn't normalization require that data conforms to the normal parametric distribution?  What good is a non-linear model if scaling / normalizing is a pre-requisite prior using the non-linear model such as tensorflow?   So back to the question, should I always normalize / scale my data prior feeding my tensorflow models?  thanks


Is there an easy to solve this problem? The method I used is extremely complicated.  A square with side length s is inscribed as shown in an equilateral triangle with side length t. What is the ratio t:s? Express your answer as a decimal to the nearest thousandth.

What is the maximum area of a square inscribed in an equilateral triangle?   Please post the approach to solve the above question.


I had a USA B1/B2 visa on my cancelled passport which is valid until 2020. I had made a new passport with my husband's name and new address after marriage. Do I need to apply for the visa again to visit the USA ?

My old passport is in my maiden name and has already expired. My B1/B2 visa to travel to United States is still valid but is stamped in my old passport with my maiden name.   My new passport has my new name (old name got changed after marriage) but has details (like old passport number, father and mother's name) related to my old passport.    Will I be allowed to travel to US as long as I carry the my old as well as new passport?  Or Do I need to again get the visa stamped on my new passport?


I'm using Ubuntu 14.04 with Gnome Flashback (Compiz)  I'm currently working abroad - it would be useful to see my employers time in the top panel in addition to my local time.  I've already added the time zones to the clock, so can see them if I click the time. But it would be nice if I could see both clocks next to each other.  Any ideas?

I looked everywhere but I couldn't find a way to display multiple clocks in GNOME 3. In classic GNOME and Unity, it is possible. Also, for some strange reason, additional timezones cannot be added to the clock using the time-date applet in classic GNOME. Any solutions?


I have an HP Pavilion dv6 Notebook with an AMD AE-35200M APU with Radeon HD Graphics 1.60 GHz. I has 8 gigs of ram and a 64-bit operating system.   I have only one storage device and I already have windows 7 installed. I am attempting to run Ubuntu on my computer without having to uninstall windows. The steps I took so far are as follows: I went to the official Ubuntu downloader and burned an installation disk. I then ran the disk to begin installation. A prompt window came up asking for a name and password along with a few other things that I left at default. It began installing and made it to the part mentioned above and then stopped.  Everything goes well until the install got to the "expanding" section. It has been on this screen for five hours, and the progress bar has not moved.  I have retried this twice with no success. So, can I assume something is wrong? How can I fix this?

I need my pre-installed version of Windows 7 (or any other version of Windows), how could I install Ubuntu without erasing it?


Is it possible to create a windowed identity column that automatically initializes and increments in SQL Server 2017 or later?    I would like the conceptual functionality of SelectedSubsetId below.  CREATE TABLE dbo.SelectedSubset (     ItemSetId INT NOT NULL FOREIGN KEY REFERENCES dbo.ItemSet(ItemSetId),     SelectedSubsetId INT NOT NULL IDENTITY(1,1) OVER(PARTITION BY ItemSetId),     PRIMARY KEY CLUSTERED (ItemSetId, SelectedSubsetId ) )   Where SelectedSubsetId would start at 1 and increment by 1 for each ItemSetId entered.  Another table would would foreign key this primary key and add the item ids of the set  CREATE TABLE dbo.SubsetItems (     ItemSetId INT NOT NULL,     SelectedSubsetId INT NOT NULL,     ItemId INT NOT NULL,     FOREIGN KEY (ItemSetId, SelectedSubsetId) REFERENCES dbo.SelectedSubset(ItemSetId, SelectedSubsetId),     FOREIGN KEY (ItemSetId, ItemId) REFERENCES dbo.ItemSetItems(ItemSetId, ItemId),     PRIMARY KEY CLUSTERED (ItemSetId, SelectedSubsetId, ItemId) )   In this concept SelectedSubsetId is only defined by its ItemIds. It has no attributes of its own that warrant creating a table to hold additional information.

I need to create a table like the following one:  +----+---------+---------+ | Id | Product | Version | +----+---------+---------+ |  1 |       1 |       1 | |  2 |       1 |       2 | |  3 |       2 |       1 | |  4 |       1 |       3 | |  5 |       2 |       2 | +----+---------+---------+   Where ID is an Identity(1,1) and I need the Version to be auto-populated depending on being inserted Product.  A similar effect could be achieved upon SELECT by using ROW_NUMBER() with PARTITION like this:  SELECT ID, Product, ROW_NUMBER() OVER(PARTITION BY Product ORDER BY ID) AS Version FROM Products   What are my options?


If $x+y+z=xyz$, prove $\frac{2x}{1-x^2}+\frac{2y}{1-y^2}+\frac{2z}{1-z^2}=\frac{2x}{1-x^2}\times\frac{2y}{1-y^2}\times\frac{2z}{1-z^2}$ given that $x^2~,~y^2~,~z^2\ne1$  I came across this question in an ancient ($19$th century) Trigonometry book, and this is the method they use to prove the result (please note: I understand this method fully): Let $x=\tan A$ ,$~y=\tan B$ and $z=\tan C$ which is acceptable without any loss of generality. This means that we are saying that $$\tan A+\tan B+\tan C=\tan A\tan B\tan C$$ Consider $\tan (A+B+C)$: $$\tan (A+B+C)=\frac{\tan A+\tan B+\tan C-\tan A\tan B\tan C}{1- \tan A \tan B- \tan C \tan A - \tan B \tan C}$$ So if $~\tan A+\tan B+\tan C=\tan A\tan B\tan C~~$ then $~~\tan (A+B+C)=0$. Hence, let $~A+B+C=\pi$. Now consider $\tan (2A+2B+2C)$: $$\tan (2A+2B+2C)=\frac{\tan 2A+\tan 2B+\tan 2C-\tan 2A\tan 2B\tan 2C}{1- \tan 2A \tan 2B- \tan 2C \tan 2A - \tan 2B \tan 2C}=0$$ $$\implies \tan 2A+\tan 2B+\tan 2C=\tan 2A\tan 2B\tan 2C$$ $$\implies \frac{2\tan A}{1-\tan^2 A}+\frac{2\tan B}{1-\tan^2 B}+\frac{2\tan C}{1-\tan^2 C}=\frac{2\tan A}{1-\tan^2 A}\times\frac{2\tan B}{1-\tan^2 B}\times\frac{2\tan C}{1-\tan^2 C}$$ $$\therefore\frac{2x}{1-x^2}+\frac{2y}{1-y^2}+\frac{2z}{1-z^2}=\frac{2x}{1-x^2}\times\frac{2y}{1-y^2}\times\frac{2z}{1-z^2}$$ as required.  My question is, is there any other way of proving this without this rather heavy use of trigonometry? I also would prefer not to work through heaps of algabraic manipulation and expansion to obtain the required result, although if that's necessary I will put up with it ;) Thank you for your help.

If $\log (a +b +c) =\log a+\log b+\log c$ then show that $$\log \left(\frac{2a}{1-a^2}+\frac{2b}{1-b^2}+\frac{2c}{1-c^2}\right)= \log\frac{2a}{1-a^2}+ \log \frac{2b}{1-b^2}+ \log \frac{2c}{1-c^2}$$  Trial: If put $a=\frac{2a}{1-a^2}$ and the similar we are done. Can we do this in this way? Otherwise how to do. Please help.


I cannot download magnetic links from any site. I have downloaded multiple torrent clients such as , and  which was already downloaded when I got the computer.   When I click the magnetic link it brings up a small tab asking me to open it with other software, the problem is my software which I downloaded is not there and it only shows my documents that I saved such as word documents or my music collection.  What should I do?

I can't find out how to make Firefox open magnet-links in Transmission.   There is no option to make it the standard program for magnet-links in its properties, and as I am not experienced with the filesystem so I can't add it as the standard program in Firefox either.


I am working on a design with a big picture header.  This picture displays the subject of the website and on it is an accompanying text and a "conversion area" a form that starts a process.  Now I have fiddled around a bit with several options. But I tend not to get the result desired.    I am worried that if I place the text "here" that if I add a black translucent panel I will lose the attention grabbing effect of the conversion area. The "text here" will become readable but won't have the effect desired.  Keeping the "text here" white does work but is pretty much unreadable.  Now what are my options? Is there anyone with an idea how to solve this?  *edit : except for the fact that my Question has been answered. I would still like to explain why my question is different. At first, my question is about web-design. Not graphical editing in an image. Second it is about selling point promotion. Leaving the conversion factor in tact. The two examples below gave me a pretty good indication of what to try.  The solution in the given question as duplicate are very different to what suited my needs.

I'm trying to add text to a photo of a city but the colors in the background make it difficult to read light and dark text. I've tried several light and dark colors but they all looked overpowered by the colors in the image. What colors could I use or what can I do to the text to make it show but also make it so you can still see the background?  Here is the image I'm trying to use:


I have downloaded and burned the .iso on a MAC for installation on a Windows XP laptop that won't do much more than boot up. I am able to open the folder (from the DVD) on the XP laptop and it looks good (many folders and files). When I try to boot from the DVD, it gets caught up in repeating errors that say:  [###.###].[drm] nouveau 0000:01.00.0: Failed to idle channel 1   It will follow with the same message to channel 2. This is repeating until I power off the computer.  The computer on which I'm trying to boot the Ubuntu DVD is a Dell Inspiron E1705. The graphics card is not known. When I go into the display properties and look at the adapter type is says "VgaSave", manufacturer: Unknown. I do have obvious display issues but also can't connect to the Internet from this device either to attempt to load new drivers.  Is it possible that I have burned the wrong .iso file? Has anybody seen this?  It is a Dell Inspiron E1705. The graphics card is not known. When I go into the display properties and look at the adapter type is says "VgaSave", manufacturer: Unknown. I do have obvious display issues but also can't connect to the Internet from this device either to attempt to load new drivers.

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


I flagged these two questions as being offensive:       You'll need to look at the edit history to see why. Both questions were edited by a diamond mod to remove the offensive language.  But my two flags were resolved as disputed. Could somebody explain why they were resolved and disputed rather than helpful? Should I refrain from flagging such posts?

In my flagging summary under the statistics, there is 1 flag listed as "disputed".  This is the first time I've ever seen a disputed flag in my summary, so I'm just curious, what is a disputed flag? How would you even dispute a flag? Is this the same as voting a flag as invalid?


I was reading about the field of real numbers $\mathbb{R},$ and a basic question arose in my mind.  How one should prove that, for any numbers $a, b,$ and $c,$ $a + b = a + c$ if and only if $b = c?$  In order to prove this statement, we have to prove two things. I will start with the part usually known as the cancellation rule.  $\implies.$ Let $a, b,$ and $c$ be any numbers. Suppose that $a + b = a + c.$ Since $a$ is any number, we know from the filed axioms, that exists a number $-a$ such that $a + (-a) = (-a) + a= 0.$ Hence, adding $(-a)$ to both sides, we have $(-a) + (a + b) = (-a) + (a + c).$ By the Associative Law, we deduce that $((-a) + a) + b = ((-a) + a) + c.$ Since $(-a) + a = 0,$ we get $0 + b = 0 + c.$ Since $0$ is the additive identity, it follows that $b = c.$ $\square$  This part is really straightforward. Although, I have no idea what to do about the $\Longleftarrow$ part. I think of this last part as the statement that $+$ is well-defined in $\mathbb{R},$ which means that for all $x, y, z, w \in \mathbb{R},$ if $x = y$ and $z = w,$ then  $x + z = y + w,$ but I’m not sure if these two things are related to each other. Another thing that “bores” me is the fact that I use this fact to prove the $\implies$ part when I added $(-a)$ to both sides and stated that they still equal. In short: How can I prove that if $b = c,$ then $a + b = a + c?$ Is this related to the fact that $+$ is well-defined? Do we assume that $+$ is well-defined (i.e., is it an axiom), or can it be proved?

I understand that the expressions on both sides of an equal sign are the same entity, and I know that when you modify one side, the other must be changed because it is referring to the same thing. What I do not understand is why making a new equation (adding or taking away from an expression) allows one to know what an unknown represents. What about equations lets us do this?


I added this to ~/.bashrc to provide colorized tail:  tailc () {   tail $@ | ccze }   And I can run it as so: tailc -f -n 10 foo/log.txt  But I can't use it on a privileged file:  sudo tailc -f -n 10 /var/log/syslog   Error:     bash: tailc: command not found   I know I can do it like this: sudo bash -i -c '...' but I want to know if I can run it without that more complicated syntax. What can I do to be able to just type sudo tailc ...?  BTW, I added that function to /root/.bashrc as well, but that didn't help either.

I have a script that does a number of different things, most of which do not require any special privileges. However, one specific section, which I have contained within a function, needs root privileges.  I don't wish to require the entire script to run as root, and I want to be able to call this function, with root privileges, from within the script. Prompting for a password if necessary isn't an issue since it is mostly interactive anyway. However, when I try to use sudo functionx, I get:  sudo: functionx: command not found   As I expected, export didn't make a difference. I'd like to be able to execute the function directly in the script rather than breaking it out and executing it as a separate script for a number of reasons.  Is there some way I can make my function "visible" to sudo without extracting it, finding the appropriate directory, and then executing it as a stand-alone script?  The function is about a page long itself and contains multiple strings, some double-quoted and some single-quoted. It is also dependent upon a menu function defined elsewhere in the main script.  I would only expect someone with sudo ANY to be able to run the function, as one of the things it does is change passwords.


This question might be rude or inappropriate, but I am very beginner of studying mathematics.  Today I had learned the concept of Axiom of Choice, which states that $ \forall$ nonempty indexed set $S_i$, there $\exists$ indexed family of element $x_i$ where $\forall x_i \in Si$.   To me, at first it reached out to me as a just mere fact, but can't understand why this axiom must have been accepted as an axiom.   It's little confusing to me.  To wrap up the notion of this OP, it could be summarized as below:   Why does the concept of axiom of choice must be accepted as axiom? What makes a statement to be valued to be designated as an axiom?

I'm having trouble understanding the necessity of the Axiom of Choice. Given a set of non-empty subsets, what is the necessity of a function that picks out one element from each of those subsets? For instance, take a look at following paragraph from Wikipedia:     A sketch of the proof of Zorn's lemma follows, assuming the axiom of   choice. Suppose the lemma is false. Then there exists a partially   ordered set, or poset, P such that every totally ordered subset has an   upper bound, and every element has a bigger one. For every totally   ordered subset T we may then define a bigger element b(T), because T   has an upper bound, and that upper bound has a bigger element. To   actually define the function b, we need to employ the axiom of choice.   Using the function b, we are going to define elements a0 < a1 < a2 <   a3 < ... in P. [...]   To me it is clear that the ai's exist so why do we need singling them out? Sure enough, the binary relation representing b may not exist as a set, but what do we need it for?  Finally... if we actually need the Axiom of Choice to single out the ai's in the above paragraph, since the axiom only postulates the existence of choice functions, how do we single out the choice function itself so that we can select the ai's with it? Certainly not with another choice function, since we would need to choose this function by a third choice function.  So when and why do we really need the Axiom of Choice?


I'm new to C++ I have been attempting to write a linked list below you can see I have linkedList header and implement and a main file I'm using MinGW-W64 as compiler in my linkedList.h I have template struct Node and a template class Vector2 // linkedList.h template <class T> struct Node {     T value;     Node *next; };  template <class T> class Vector2 { private:     Node<T> root;  public:     void add(T value);     ~Vector2(); };  in my linkedList.cpp I implemented void Vector2<T>::add(T value); and Vector2<T>::~Vector2(); // linkedList.cpp #include <iostream> #include "linkedList.h"  using namespace std;  template <class T> void Vector2<T>::add(T value) {     Node<T> *newNode = new Node<T>;     newNode->value = value;      if (root == nullptr)     {         newNode->value = nullptr;         root = newNode;         return;     }      newNode->next = root;     root = newNode; }  template <class T> Vector2<T>::~Vector2() { }  in main I created a Vector2 vec; // main.cpp #include <iostream> #include "linkedList.h"  using namespace std;  int main() {     Vector2<int> vec;     vec.add(12);     return 0; }  when I compile my code I get this errors $> make g++ -g -Wall -o build\main main.cpp linkedList.cpp && echo Executing build\main && build\main.exe \AppData\Local\Temp\ccb8gQgf.o: In function `main': \Desktop\github\c\templates/main.cpp:9: undefined reference to `Vector2<int>::add(int)' \Desktop\github\c\templates/main.cpp:10: undefined reference to `Vector2<int>::add(int)' \Desktop\github\c\templates/main.cpp:11: undefined reference to `Vector2<int>::add(int)' \Desktop\github\c\templates/main.cpp:8: undefined reference to `Vector2<int>::~Vector2()' \Desktop\github\c\templates/main.cpp:8: undefined reference to `Vector2<int>::~Vector2()' collect2.exe: error: ld returned 1 exit status make: *** [makefile:13: main] Error 1

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


It seems when your clicking the reputation bar for single days, you get the reputation for the previous day. Also the x axis ticks do not seem to be alligned with the tool-tips.   E.g. in the screenshot below:   The Tooltip says June 6. The tick is labelled June 7. The list of reputation changes is incorrect.

So when we view reputation, there is graph view. However, it seems to be off by a day. Here's what I mean:   I'm sure 70 + 20 + 15 is not 15. Its 105, which is what we see below:   And 40 + 10 is NOT 105, unless you did  :)     Anyways 40 + 10 is 50:   So yeah. Did you do what that post on codegolf says? Devs better fix that :)


Could anybody explain how can I use variable names in bash for loop to generate a sequence of numbers?   for year in {1990..1997} do   echo ${year} done   Results:  1990 1991 1992 1993 1994 1995 1996 1997  However  year_start=1990 year_end=1997 for year in {${year_start}..${year_end}} do   echo ${year} done   Results:  {1990..1997}  How can I make the second case work? otherwise I have to write tedious while loops. Thanks very much.

How do I iterate over a range of numbers in Bash when the range is given by a variable?  I know I can do this (called "sequence expression" in the Bash ):   for i in {1..5}; do echo $i; done   Which gives:     1    2    3    4    5   Yet, how can I replace either of the range endpoints with a variable? This doesn't work:  END=5 for i in {1..$END}; do echo $i; done   Which prints:     {1..5}


I'm trying to pin multiple shortcuts to the same program (exe) but different arguments to the start menu and Windows refuses to show more than 1 item.  Is there a way to trick windows into showing my shortcuts?  using windows 10.

Problem  If you create two shortcuts with the same target then only one of them is displayed in the Start Menu. This is true for:   search results within the Start menu manually browsing program folders within the Start menu pinned shortcuts within the Start menu   This is important because:   the shortcuts might have different settings defined in the Properties dialog, such as different compatibility settings, or be set to start in different directories. some programs install a shortcut to a command prompt which is set to open in the program's installation folder. This enables easy access to the program from the command line without having to modify %PATH%, but it means that users who are unaware of this "lose access" to CMD. Programs that do this:           Things I've tried   Renaming shortcuts   Only the shortcut that comes first alphabetically is displayed  Using folders doesn't help   Only the shortcut in the folder that comes first alphabetically is displayed  Pinning shortcuts doesn't help   the pinned shortcut updates to point to the displayed shortcut      Steps to reproduce  Fully up-to-date Windows 10 Home.   Start → search for "Command Prompt" (or "cmd"). (Optional) Right-click on Command Prompt → Pin to Start.   This makes Command Prompt available when you open the Start menu without searching for anything.  Right-click on Command Prompt → Open file location   This opens a File Explorer window in %APPDATA%\Microsoft\Windows\Start Menu\Programs\System Tools  Copy the Command Prompt shortcut and rename the copy "AAA Command Prompt"   This ensures it appears before Command Prompt when files are listed alphabetically.  (Optional) Right-click on the new AAA Command Prompt shortcut → Properties   Change something. (E.g. set the "Start in" directory to a different location, such as C:\)    Notice that it is now not possible to access Command Prompt from the Start menu - it has been replaced with AAA Command Prompt everywhere. If you rename AAA Command Prompt to ZZZ Command Prompt then you get back the ordinary version and lose the customised version. Moving the shortcuts to different folders within %APPDATA%\Microsoft\Windows\Start Menu\Programs\ doesn't help.    Any ideas?


I have a friend who really likes the Minecraft PC version , but I want to play with on 2 computers, CAN I DO IT?

I just bought Minecraft. Now, my brother wants to play with me but my Mom doesn't want to buy another. We use the same Wifi network. Can we do this?


I'm looking for the title of the movie I've seen on a bad quality pirate vhs in Hungary, in 1986 or 87. It was in color, and probably recent stuff then, but not sure.  It's about a man who gets invincible. Any wound he gets heals completely in seconds.  In the beginning there is some scene with the space shuttle. Later there's a helicopter following a train. The train enters a tunnel, but doesn't exit the other end. The helicopter descends at the tunnel entrance, and the tunnel is empty, the train has disappeared. At the end the main character drives a truck off a high cliff, into water, but reemerges unharmed.

What is the name of an 80s TV movie where a man acquires endurance powers and quick self-healing ability after a crash with a vehicle containing radioactive material?


When using a fully-connected network (FCN), I have problem understanding how fully-connected (FC) layer to convolutional layer conversion actually works, even after reading .   In their explanation, it's said that:   In this example, as far as I understood, the converted CONV layer should have the shape (7,7,512), meaning (width, height, feature dimension). And we have 4096 filters. And the output of each filter's spatial size can be calculated as (7-7+0)/1 + 1 = 1. Therefore we have a 1x1x4096 vector as output.    Although the converted layer can give us output with same size, how can we make sure they are indeed functionally equivalent? It's mentioned in the later part of the post that we need to reshape the weight matrix of FC layer to CONV layer filters. But I am still confusing about how to actually implement it.   Any explanation or link to other learning resource would be welcome.

When reading about the transforming the fully connected layer into convolutional layer, posted in .  I just feel confused about the following two comments:      It turns out that this conversion allows us to "slide" the original ConvNet very efficiently across many spatial positions in a larger image, in a single forward pass.   A standard ConvNet should be able to work on any size image. The convolutional filter can slide across the image grid, so why do we need to slide the original ConvNet in any spatial positions in a larger image?  And      Evaluating the original ConvNet (with FC layers) independently across 224x224 crops of the 384x384 image in strides of 32 pixels gives an identical result to forwarding the converted ConvNet one time.   What does "strides of 32 pixels" mean here? Does that refer to the filter size? When talking about 224*224 crops of the 384*384 image, does that mean we use a receptive field of 224*224?  I marked these two comments as red in the original context.


Here is what I have:   a Windows 7 AIO DVD that is already bootable no CD rom a flash drive empty DVDs   I only get computers with cd-roms a few times a week.  Here is what I want to do:   make a bootable iso file out of the dvd copy the iso file onto my computer and make a live usb for windows using winusb using the same iso, create a new dvd with windows on it so that if i lose one of them, I will have a spare one   So I need help with creating the iso from the DVD and I can do the rest easily. but i want the iso to be bootable and installable to a flash drive.

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


A pure water ice cube with sides $2\,\mathrm{cm}$ long floats in a liquid in a glass beaker. What volume will be below the liquid surface if the liquid is  a) pure water and b) brine?  What happens to the level of the water in the beaker if the ice cube melts and why? The density of pure water is $1000\,\mathrm{kgm^{-3}}$ The density of brine is $1150\,\mathrm{kgm^{-3}}$ (Both given to me from my question sheet). I'm doing AS physics and I don't know even how to answer this question, all help will be greatly appreciated. (I would also be very grateful if you try to make it as uncomplicated as possible). My attempt to answer the first question was by finding the volume of the ice cube which is $8 \times 10^{-6}$ but I wasn't sure what to do with that. Or if I even needed that! For the second question, I believe the answer goes along the lines of "there is no increase to the level of water in the beaker as the ice cube already displaced an amount of fluid once it was placed in it." Is there anything I should add to that?

I have read the explanation for this in several textbooks, but I am struggling to understand it via Archimedes' principle. If someone can clarify with a diagram or something so I can understand or a clear equation explanation that would be great.


user@greeneyes:~$ sudo apt-get install xdotool user is not in the sudoers file.  This incident will be reported. user@greeneyes:~$ su verelse Password:  verelse@greeneyes:/home/user$ su user Password:  user@greeneyes:~$ sudo apt-get install xdotool Reading package lists... Done Building dependency tree        Reading state information... Done The following additional packages will be installed:   libxdo3 The following NEW packages will be installed:   libxdo3 xdotool 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 61.5 kB of archives. After this operation, 204 kB of additional disk space will be used. Do you want to continue? [Y/n]  Get:1 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 libxdo3 amd64 1:3.20160805.1-3 [20.5 kB] Get:2 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 xdotool amd64 1:3.20160805.1-3 [41.0 kB] Fetched 61.5 kB in 0s (136 kB/s)   Selecting previously unselected package libxdo3:amd64. (Reading database ... 168281 files and directories currently installed.) Preparing to unpack .../libxdo3_1%3a3.20160805.1-3_amd64.deb ... Unpacking libxdo3:amd64 (1:3.20160805.1-3) ... Selecting previously unselected package xdotool. Preparing to unpack .../xdotool_1%3a3.20160805.1-3_amd64.deb ... Unpacking xdotool (1:3.20160805.1-3) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... Processing triggers for man-db (2.8.3-2) ... Setting up libxdo3:amd64 (1:3.20160805.1-3) ... Setting up xdotool (1:3.20160805.1-3) ... Processing triggers for libc-bin (2.27-3ubuntu1) ...   this is odd  user@greeneyes:~$ whoami user user@greeneyes:~$ sudo su user is not in the sudoers file.  This incident will be reported. user@greeneyes:~$ su user Password:  user@greeneyes:~$ whoami user user@greeneyes:~$ sudo su root@greeneyes:/home/user#

After I add a user using adduser, I can't see it via System > Administration > Users and Groups unless I log out and then log in again. Is that normal?  Also, can I set a newly added user as a sudoer or do I have to change that only after adding it? How can I do that via the shell?  Finally, can I delete the original user that was created upon initial installation of Ubuntu, or is this user somehow 'special'?


I got one error I just can't find the problem, can someone help me or explain whats wrong? Still tried to comment out the problem or search just can't find any clues it just goes with this error:   1>Compiling... 1>option.cpp 1>Linking... 1>fatal error C1900: Il mismatch between 'P1' version '20060201' and 'P2' version '20050411' 1>LINK : fatal error LNK1257: code generation failed 1>Build log was saved at "file://c:\Users\modestas\Desktop\ybtx\code\game\gas\GameGas\Release\BuildLog.htm" 1>GameGas - 1 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 12 up-to-date, 0 skipped ==========   There is no code because can't understand where this occur happened.

I compile my project with VIsual Studio 2005 Express Edition, and get this linking error. Can anyone suggest how to solve that?


I'm wondering if there is any possibility to make a clickable logo like in html  code, it would be like this   \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{hyperref}  \begin{document} \href{link_adress}{\includegraphics[scale=0.5]{logo}}    \end{document}    Is it possible to do something like that but which works?

Can an image be included in TeX so that the resulting PDF is clickable leading to a reference?


why typeof(t).GetProperties() does not find all the public properties of t when t is a derived interface? Is this the expected behavior or I am missing something?  public interface IBaseOne     {        int Id { get; }    }  public interface IDerivedOne : IBaseOne     {        string Name { get; }    }  public class ImplementsIDerivedOne : IDerivedOne     {         public int Id { get; private set; }         public string Name { get; private set; }     }  public static class TypeOfTests     {         public static Type Testing<T>() where T : class,IBaseOne         {             return typeof(T);         }     }  class Program {     static void Main(string[] args)     {         Type typeFromIBaseOne = TypeOfTests.Testing<IBaseOne  >() ;         Type typeFromIDerivedOne = TypeOfTests.Testing<IDerivedOne>();         Type typeFromImplementsIDerivedOne = TypeOfTests.Testing<ImplementsIDerivedOne>();          PropertyInfo[] propsFromIBaseOne = typeFromIBaseOne.GetProperties();         PropertyInfo[] propsFromIDerivedOne = typeFromIDerivedOne.GetProperties();         PropertyInfo[] propsFromImplementsIDerivedOne =TypeFromImplementsIDerivedOne.GetProperties();          Debug.Print("From IBaseOne: {0} properties", propsFromIBaseOne.Length);         Debug.Print("From IDerivedOne: {0} properties", propsFromIDerivedOne.Length);         Debug.Print("From ImplementsIDerivedOne: {0} properties", propsFromImplementsIDerivedOne .Length );     } }   Result: From IBaseOne: 1 properties From IDerivedOne: 1 properties From ImplementsIDerivedOne: 2 properties  Why IDerivedOne only shows 1 property?  thank you  Enrique

Assuming the following hypothetical inheritance hierarchy:  public interface IA {   int ID { get; set; } }  public interface IB : IA {   string Name { get; set; } }   Using reflection and making the following call:   typeof(IB).GetProperties(BindingFlags.Public | BindingFlags.Instance)    will only yield the properties of interface IB, which is "Name".   If we were to do a similar test on the following code,  public abstract class A {   public int ID { get; set; } }  public class B : A {   public string Name { get; set; } }   the call typeof(B).GetProperties(BindingFlags.Public | BindingFlags.Instance) will return an array of PropertyInfo objects for "ID" and "Name".  Is there an easy way to find all the properties in the inheritance hierarchy for interfaces as in the first example?


A worker carries two bags. Each of the bags initially contains N nails. Whenever the worker needs a nail, he takes it from a bag picked at random. At some point the worker picks an empty bag. Find the probability that the other bag contains exactly m nails.  My reasoning:  The desired probability: $C_2^1 \cdot P(|A| = 0\ and\ |B| = m)$, where A, B - sets of nails in each bag. Then we can "divide" this probability (I suppose that I deal with independent events):  $P(|A| = 0\ and\ |B| = m) = P(|A| = 0) \cdot P(|B| = m);$  $P(|A| = 0) = (\frac{1}{2})^N$, where $|A| = |B| = N$ (initial condition).  $P(|B| = m) = (\frac{1}{2})^{N - m}$  Result: $C_2^1 \cdot P(|A| = 0\ and\ |B| = m)$ = $C_2^1 \cdot (\frac{1}{2})^{2N - m}$  Am I wrong or it is correct?


I've seen many posts about call by value and reference, but can barely find solutions for reference data types such as int[ ], or char[ ]. For example:  char b[] = new char[2]; b[0] = 'h'; b[1] = 'i'; char c[] = new char[2];  c = b;     //   copy by reference? copy(c,b); //   copy by value?  b[0] = 'b'; b[1] = 'y';  System.out.print(b[0]); System.out.println(b[1]);  System.out.print(c[0]); System.out.println(c[1]);       public static void copy(char[] dst, char[] src) { dst[0] = src[0]; dst[1] = src[1]; }   c = b; changes value because c gets b's address?  copy(c,b); can't change value because it is copy by value? But I thought char[ ] is one of reference data types which can change the value. For example int[ ] is reference data type so it can change the value like below:  int[] d = new int[1]; d[0] = 1;         function(d); System.out.println(d[0]);   public static void function(int[] a) {     a[0] = 4; }     Does anyone know about this?

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


I have two input type time. 1. time of entry 2. time of exit  Example 1:  Start: 00:00 end: 01:30 result: 1.5  Example 2 :  Start: 14:00 end: 00:00 result: 10  How to create an algorithm that calculates how many employees were at work? This number will be multiplied by the rate he earns. e.g. hours * rate (1.5 * 15)

I'm creating an application which lets you define events with a time frame.  I want to automatically fill in the end date when the user selects or changes the start date.  I can't quite figure out, however, how to get the difference between the two times, and then how to create a new end Date using that difference.


Recently I changed my default file manager to Krusader and it seems that my computer crashes constantly; How does I change it back to Nautilus?

A while back, I set my default file manager to Nemo. I like it a lot, but it constantly crashes. I remember editing a text file to set it as default, but I forgot which file it was. How do I switch back to the Nautilus file manager?


Why this error is being thrown for below code.  Error: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘=’ token   struct node_s *next=NULL;   Code:  #include<stdio.h> #include<stdlib.h>  typedef struct node_s {     int data;     struct node_s *next=NULL; } node;

Why can't we initialize members inside a structure ?  example:  struct s {    int i = 10; };


I have a flash drive which is given as a freebie. I don't know who manufactured it. It got infected by a virus. I am trying to reformat it but I am always receiving a "Windows was unable to complete the format" message. When I checked its properties, the used space and free space is 0 bytes. On disk management, it says that the flash drive has raw file system with 8mb capacity. The status of the flash drive is "Healthy (Primary Partition)". However, the real capacity of the flash disk is 1gb.  How can I recover the missing space? I tried using diskpart to clean and delete the 8gb partition, then create a new partition hoping that it will fix the problem but to no avail. Until now, I also can't reformat the flash disk. I also tried using BootIce and Active KillDisk, but it also didn't fix the problem. On the other hand, SpaceSniper claims that the location of my flash drive is not a valid path. I also tried using Lexar but the drive letter of my usb won't even appear on its list. Meanwhile, HDD Low Level Format Tool says that my device cannot be accessed because it is smaller than 65535 sectors.  I am already out of options. How can I fix my flash disk? How can I format it and reclaim the missing space? (I am using Windows 7.)  The following are displayed when I used KillDisk:  Name: Generic Flash Disk 2.0  Version: 2.10  Mode LBA: Yes  Cylinders: 1  Tracks per Cylinder: 255  Sectors per Track: 63  Total Sectors: 16384  Bytes per Sector: 512  Total Size: 8.000 MB (8388608 bytes)  (What happened to the other space? Why only 8 bytes can be seen?)

My USB drive used to be originally 8GB when I bought it.  I'm trying to reformatted in Windows 7 by right clicking on the drive and selecting Format.... But the capacity only shows 250MB.  Is there something I can do to get the original size back? Maybe it got partitioned in a weird way?   The  flash drive is a SanDisk Cruzer Micro 8GB. I got it from Wal-Mart but this is the same drive.


Well, I saw this integral :  $$\int^\infty_0 \frac{dx}{x^n + 1}$$  on some questions (like this one :  )  But it has always been for $n$ even. Is there something wrong with $n$ odd ? Is not, how do you compute this ? by the same argument ?  thank you and sorry if this is easy. I can't figure out how to do it since it's neither odd nor even.

I've been looking at  $$\int\limits_0^\infty  {\frac{{{x^n}}}{{1 + {x^m}}}dx }$$  It seems that it always evaluates in terms of $\sin X$ and $\pi$, where $X$ is to be determined. For example:  $$\displaystyle \int\limits_0^\infty  {\frac{{{x^1}}}{{1 + {x^3}}}dx = } \frac{\pi }{3}\frac{1}{{\sin \frac{\pi }{3}}} = \frac{{2\pi }}{{3\sqrt 3 }}$$  $$\int\limits_0^\infty  {\frac{{{x^1}}}{{1 + {x^4}}}dx = } \frac{\pi }{4}$$  $$\int\limits_0^\infty  {\frac{{{x^2}}}{{1 + {x^5}}}dx = } \frac{\pi }{5}\frac{1}{{\sin \frac{{2\pi }}{5}}}$$  So I guess there must be a closed form - the use of $\Gamma(x)\Gamma(1-x)$ first comess to my mind because of the $\dfrac{{\pi x}}{{\sin \pi x}}$ appearing. Note that the arguments are always the ratio of the exponents, like $\dfrac{1}{4}$, $\dfrac{1}{3}$ and $\dfrac{2}{5}$. Is there any way of finding it? I'll work on it and update with any ideas.    UPDATE:  The integral reduces to finding   $$\int\limits_{ - \infty }^\infty  {\frac{{{e^{a t}}}}{{{e^t} + 1}}dt} $$  With $a =\dfrac{n+1}{m}$ which converges only if   $$0 < a < 1$$  Using series I find the solution is     $$\sum\limits_{k =  - \infty }^\infty  {\frac{{{{\left( { - 1} \right)}^k}}}{{a + k}}} $$


First, I ran:  sudo chmod -R -777 /usr    Now, my /usr dir permissions looks like this:  d---------   So nobody has permissions I can't even get in the dir or run bash commands.

I accidently ran  sudo chmod 755 -R /   instead of  sudo chmod 755 -R ./   I stopped it after few seconds, but now there is some problems such as  sudo: must be setuid root   How can I revert permissions back?


I have 2 toString methods. They all work fine.  //This toString is the attendant toString.The parameter assign is of type car     public String toString() {         return "Attendant [staffNum=" + staffNum + ", id=" + id + ", available=" + available + ", name=" + name                 + ", assign=" + assign + "]";     }   The toString below is from the car class  public String toString() {             return "Car:" + plateNum + " ID:" + carID + " Position:" + position + " Assigned to:" + assignedTo.getId()              + "(" + assignedTo.getName() + ")" + " Parked at:" + convert(currTime);         }   My problem is that if I print with the toString attendant it prints fine then for the assign variable since it is type car it calls the car toString. I can't change the car toString cause I use it as it is.  I tried some getmethods calling the car ID and position but it calls for all attendants.  I tried a null check. It would check that if assign is not null it would call the getmethods. This one crash my java.  public String strAssignAttCar(Cars assign){         String result = null;         if(!(assign.equals(null))){             result = Cars.getCarID();         }   and I get this:  Exception in thread "main" java.lang.NullPointerException     at Attendant.strAssignAttCar(Attendant.java:201)     at Attendant.toString(Attendant.java:217)     at java.lang.String.valueOf(Unknown Source)     at java.io.PrintStream.println(Unknown Source)     at Attendant.createAtt(Attendant.java:64)     at Main.main(Main.java:15)   PS:at first and most of the time the attendant parameter assign is null  please help me I dont know what else to try.

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?


$$\sum_{n=1}^\infty \frac{3n^2-4n+2}{n!}$$  I have tried rewriting: $$\frac{3n^2-4n+2}{n!} = \frac{2}{n!} - \frac{1}{(n-1)!} + \frac{3}{(n-2)!}$$  And using: $$\sum_{n=0}^\infty \frac{1}{n!} = e$$ I am also aware of the , but I'm not sure how to apply it here where $N$ is a negative number. I can't seem to put these all together since all my calculations get me nowhere.  Will appreciate any help/hints calculating the second and third term of the sum!  Edit: I've also tried index shifting on the second and third sums, but I end up with the sum starting at $-1$ and I'm unsure how to proceed with a factorial.

For some series, it is easy to say whether it is convergent or not by the "convergence test", e.g., ratio test. However, it is nontrivial to calculate the value of the sum when the series converges. The question is motivated from the simple exercise to determining whether the series $\sum\limits_{k=1}^{\infty}\frac{k^2}{k!}$ is convergent. One may immediately get that it is convergent by the ratio test. So here is my question:     What's the value of $$\sum_{k=1}^{\infty}\frac{k^2}{k!}?$$


Is there a reason Access rounds Round(19.5,0) and Round(20.5,0) both to 20?  Shouldnt the first return 20 and the second return 21?

Whats the best way to round in VBA Access?  My current method utilizes the Excel method  Excel.WorksheetFunction.Round(...   But I am looking for a means that does not rely on Excel.


As part of an assignment, I've been asked to report Cox & Snell and Nagelkerke values for my (logistical) regression analyses. I have been asked to interpret them as well as discuss what they suggest for the data.  I am a bit confused to what they show, and how I should report them. Also, how do I know if they're important? I am really stuck on how to answer this question.   Many Thanks

I have SPSS output for a logistic regression model. The output reports two measures for the model fit, Cox & Snell and Nagelkerke.  So as a rule of thumb, which of these $R^²$ measures would you report as the model fit?  Or, which of these fit indices is the one that is usually reported in journals?    Some Background: The regression tries to predict the presence or absence of a bird (capercaillie) from some environmental variables (e.g., steepness, vegetation cover, ...). Unfortunately, the bird did not appear very often (35 hits to 468 misses) so the regression performs rather poorly. Cox & Snell is .09, Nagelkerke, .23.    The subject is environmental sciences or ecology.


Windows 10 lock screen requires that I press 'enter' or some other key before I can enter my password. If, as soon as I turn on the computer, I start typing my password the first character activates the password box rather than being the first character.   So... My question is: does anyone know how I can change this behavior? I want to just be able to type my password in, without having to press a key before doing so.  Thanks!

The Windows 10 "anniversary update" is coming out tomorrow and according to some  the group policy to disable the lock screen is no longer effective on anything below the Enterprise edition. I'd like to know what options/workarounds are left to disable this nonsense on Pro editions.  Regards.


I was multiplying a floating point number by hundred, only to see it round it off. The same does not happen when multiplying by 10 or 1000.  546.55 * 100 = 54654.99999999999  546.55 * 10 * 10 = 54655.0  546.55 * 1000 = 546550.0 (this is something I tried just to see how it behaves on powers of 10 greater than 100)  Shouldn't multiplication by 100 and multiplication by 10*10 have the same result? Will an interpreter understand 100 and 10*10 as different?

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


Let $R$ be a ring with at least two elements and suppose that for any non-zero $a\in R$ there exists a unique $b\in R$ such that $aba = a$. Prove that $R$ is a division ring.  Given the assumptions and $a\in R$ we have $aba = a$, then $aba - a = 0 = a(ba - 1) = (ab-1)a$. If $ab-1$ and $ba-1$ are both not zero divisors, then $ab - 1 = 0$ and $ba - 1 = 0$ so that $ab = ba = 1$ and $b = a^{-1}$. I'm not sure what to do in the case when there are zero divisors. I've seen that in general, division rings don't have zero divisors, but I don't know a priori that $R$ is a division ring (as that's what I'm trying to prove haha).

Let $\left(A,+, \cdot\right)$ be a ring with $1$  that satisfies the following condition:  For any nonzero $a\in A$, there exists a unique $b\in A$ such that $aba = a$.  Show that $b$ also satisfies $bab = b$, and that all nonzero elements of $A$ are invertible.


My Debian machine is running DirectAdmin and we have build our own CMS. By now, when we create a new website a new folder and user will created down the /home/ directory.  As an developer to setup templates for each customer we need to be in the user directory. For now It's way to complicated cause for each customer you need to take that ftp account. Way to complicated if there are more than 100 customers.  To make things easier, I've created one ftp account 'developer' this account should be able to access /home/ directory. For Now I have a permission denied to access the directory maps. Of course, the /home/ directory is owned by 'root'  My question is, what is the best way to make a permission / group change for the directory /home/ so the ftp account 'developer' has access to all the websites in this directory.  Thanks Nick

This is a  about File Permissions on a Linux web server.   I have a Linux web server running Apache2 that hosts several websites. Each website has its own folder in /var/www/.  /var/www/contoso.com/ /var/www/contoso.net/ /var/www/fabrikam.com/   The base directory /var/www/ is owned by root:root. Apache is running as www-data:www-data. The Fabrikam website is maintained by two developers, Alice and Bob. Both Contoso websites are maintained by one developer, Eve. All websites allow users to upload images. If a website is compromised, the impact should be as limited as possible.  I want to know the best way to set up permissions so that Apache can serve the content, the website is secure from attacks, and the developers can still make changes. One of the websites is structured like this:  /var/www/fabrikam.com     /cache     /modules     /styles     /uploads     /index.php   How should the permissions be set on these directories and files? I read somewhere that you should never use 777 permissions on a website, but I don't understand what problems that could cause. During busy periods, the website automatically caches some pages and stores the results in the cache folder. All of the content submitted by website visitors is saved to the uploads folder.


I know there are some other old topics similar to this but I couldn't find any solution from them. I was trying to install the Nvidia drivers and when I ran sudo apt update I got this error: E: The repository 'http://ppa.launchpad.net/chronitis/jupyter/ubuntu focal 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.  I also can't reboot and get this error: System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down Failed to talk to init daemon.  I am using Ubuntu 20.04.2 LTS and WSL2

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 would like to close some view windows that I opened accidentally.  See the image below:    Edit: another note: I tried searching for the solution, but only found things like "Join Area", which don't seem to work in this situation.

I can't find a way to close a view panel, in particular the horizontal at the bottom, is pretty useless to me at this moment.


I tried deleting a post from my Stack Exchange account. But I could not find any place to delete it. Can't I delete any post when I am using the Stack Exchange mobile app?

Currently, the only way to vote to delete (and undelete, since you can't see deleted posts) in the Android app is to open the post in a browser, and then vote to delete from there.  Can we get delete vote functionality within the app, as well as the ability to delete our own posts?  Worth to mention: users , so it's possible in the API.  Related:


I am trying to install python3-venv and get below error. I have looked at similar threads, esp this one:  I am on Ubuntu 20.04 LTS, using it through Windows 10 (WSL). The following packages have unmet dependencies:  python3.8-venv : Depends: python3.8 (= 3.8.2-1ubuntu1) but 3.8.2-1ubuntu1.2 is to be installed E: Unable to correct problems, you have held broken packages.

After upgrading from 10.04 to 12.04 I am trying to install different packages.  For instance ia32-libs and skype (4.0).  When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message.   Output of commands:  sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   After running this:  sudo dpkg --configure -a foo@foo:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


I am trying to move one a bunch of files at once, one directory up.  This is what I tried, but did not work:     mv ./*/__test__/index.js ./*/data.js   . ├── alpha │   ├── __test__ │   │   └── index.js │   ├── index.js │   └── test.js └── beta     ├── __test__     │   └── index.js     ├── index.js     └── test.js   To this:  . ├── alpha │   ├── data.js │   ├── index.js │   └── test.js └── beta     ├── data.js     ├── index.js     └── test.js   How can I do this in unix?

I am trying to copy multiple files named "F3.bam" two level of directories to up and then rename these files with the name of the sub-directory after copy.  For example:  /samples/mydata1/RUN1/ID_date/PCR2/TIME1/F3.bam /samples/mydata2/RUN1/ID2_date4/PCR2/TIME7/F3.bam /samples/mydataxxx/RUN1/IDxxx_datexxx/PCR2/TIMExxx/F3.bam   Expected results:  1. The files are first copied two directories level up:  /samples/mydata1/RUN1/ID_date/F3.bam /samples/mydata2/RUN1/ID2_date4/F3.bam /samples/mydataxxx/RUN1/IDxxx_datexxx/F3.bam   2. The files are renamed according to the name of the current sub-directory:  /samples/mydata1/RUN1/ID_date/ID_date_F3.bam /samples/mydata2/RUN1/ID2_date4/ID2_date4_F3.bam /samples/mydataxxx/RUN1/IDxxx_datexxx/IDxxx_datexxx_F3.bam   Ideally a bash loop would be great (working on a Mac).


I always wanted a shiny Kartana, so I soft reset Kartana all the time. I've been doing this for about four days now at 5000 light years. But I never find one, what is the chance?

In the new Pokémon ultra sun and ultra moon game, they added the ultra wormhole shiny hunting method. They say that your shiny chance increases after 3000 light years, but how much does it increase for every 1000 light year?


On this answer, I deleted some comments, and I have noticed that, in the deleted comments, my name appears with the same background used for the user who asked the question.    It doesn't happens for other users.    The problem is the CSS class associated with the  markup, since that is kiamlaluno♦.  It doesn't happen for the question itself, though.

As they say, a picture is worth a thousand words:    The moderator here is not the original poster, but on the comments by the aforementioned OP, his name has the OP background. On the other comments, he (correctly) doesn't.


I'm trying to figure out a way to automatically select an option, based on a passed variable, that matches only the value of that option.         Font Type     <select id="options>         <option value="one">One</option>         <option value="two" selected>Two</option>         <option value="three">Three</option>     </select>   function loadSelect(userFont){     $('#options').find('option[value='+userFont+']').attr('selected', 'selected'); }  loadSelect(three);

I have a drop-down list with known values. What I'm trying to do is set the drop down list to a particular value that I know exists using jQuery.  Using regular JavaScript, I would do something like:  ddl = document.getElementById("ID of element goes here"); ddl.value = 2; // 2 being the value I want to set it too.   However, I need to do this with jQuery, because I'm using a CSS class for my selector (stupid  client ids...).  Here are a few things I've tried:  $("._statusDDL").val(2); // Doesn't find 2 as a value. $("._statusDDL").children("option").val(2) // Also failed.      How can I do it with jQuery?     Update  So as it turns out, I had it right the first time with:  $("._statusDDL").val(2);   When I put an alert just above it works fine, but when I remove the alert and let it run at full speed, I get the error     Could not set the selected property. Invalid Index   I'm not sure if it's a bug with jQuery or Internet Explorer 6 (I'm guessing Internet Explorer 6), but it's terribly annoying.


The cross product of two sets is A and B is $\{ (a,b): a \in A \text{ and } b \in B \}$  $A \times \varnothing = \{ (a,b): a \in A \text{ and } b \in \varnothing \}$  Let $A = \{ x, y, z \}$  Then $A \times \varnothing = \{ (x,\varnothing), (y,\varnothing), (z,\varnothing) \}$  But $A \times \varnothing = \varnothing$  Where I am going wrong ?

Given two sets $A$ and $\varnothing$, where $\varnothing$ is the empty set. The Cartesian product is defined by  $$A \times \varnothing = \{ (x,y) \mid x \in A, y \in \varnothing \}$$  Why is $ A \times \varnothing = \varnothing$?


technically works when utilizing command blocks, but isn't possible when working with datapacks. I do have the same limitations as the linked question, in that I can't use cauldrons, soil, and so on to detect it. What I'm attempting to do is make it rain infinitely, but I don't want it to continuously run the command. Yes, I can set up commands so that load.json runs it on server (re)load, but the maximum time I can set that to is roughly 11 days. Since I'm making a datapack that is intended for survival world use, I need this to be continuous and run again if it's no longer raining.

The arrival of Minecraft Beta 1.5 brought weather conditions. However, it can at times be inconvenient when you're trying to screenshot something and show it off (as it reduces lighting and obstructs your view slightly). Is there anyway to turn weather off?  Alternatively, is there a way to speed up the duration of weather or "skip" it?


Every C++ programmer knows that, virtual destructor is used to ensure the proper destruction order of objects in inheritance hierarchy.  Where else "Virtual Destructors" are used/can be used in realtime scenarios?

I have a solid understanding of most OOP theory but the one thing that confuses me a lot is virtual destructors. I thought that the destructor always gets called no matter what and for every object in the chain. When are you meant to make them virtual and why?


I try to give a more constructive proof of  the following lemma  $\qquad$ Let $S$ be countably infinite and $A$ an infinite subset of $S.$ Then $A$ is countable.  Here the "constructive proof" means that to prove that $A$ is countable is to construct a proper bijection  from the set of positive integers onto $A.$ And I prefer to a proof of without using Zorn's Lemma.     I have tried  and already got something.   Since $S$ is countably infinite, there exists a bijection $ f: \mathbb{N} \to S.$ Here we denote the set of positive integers by $\mathbb{N}.$ Then I constructed the following mapping by the method given in Apostol's book Mathematical Analysis, Page 39:   $k(1)=\inf\{i\in\mathbb{N}\mid f(i)\in A\}$. Assume $k(1), k(2), \dots,k(n-1)$ has been constructed, let $k(n)=\inf\{i\in\mathbb{N}\mid f(i)\in A, i>k(n-1)\}, n=2,3,\dots.$ Continue  this process on. Then let $h(n)=f(k(n)).$ I have proved that $h: \mathbb{N}\to A$ is injective.   Because I have only used the continuity axiom of real numbers and the principle of induction, I think this proof is constructive.    But  at present I do not know how to prove $h$ is surjective.  Can anyone help me to prove that the above $h$ is a surjection from $\mathbb{N} $ to $A?$

In my book, it proves that an infinite subset of a coutnable set is countable. But not all the details are filled in, and I've tried to fill in all the details below. Could someone tell me if what I wrote below is valid?  Let $S$ be an infinite subset of a countable set $T$. Since $T$ is countable, there exists a bijection $f: \mathbb{N} \rightarrow T$. And $S \subseteq T = \{ f(n) \ | \ n \in \mathbb{N} \}$. Let $n_{1}$ be the smallest positive integer such that $f(n_{1}) \in S$. And continue where $n_{k}$ is the smallest positive integer greater than $n_{k-1}$ such that $f(n_{k}) \in S$. And because $S$ is infinite, we continue forever. Now consider the function $\beta : \mathbb{N} \rightarrow S$ which sends $k \rightarrow f(n_{k})$.   So in order for $S$ to be countable, $\beta$ would have to be a bijection. $\beta$ is injective since if $f(n_{k}) = f(n_{j})$, then $n_{k} = n_{j}$ because $f$ is injective. We also can conclude $k = j$ because the various $n_{i}$ chosen were strictly increasing.   Edit: $\beta$ also needs to be surjective. So for every $r \in S$ there exists a $q \in \mathbb{N}$ such that $\beta(q) = f(n_{q}) = r$. We know that $f^{-1}(r) \in \{n_{1}, n_{2}, ..., n_{k} ... \}$, so we can let $f^{-1}(r) = n_{d}$. Thus $\beta(d) = f(n_{d}) = r$.


I unlocked the bootloader in my OnePlus 5 right after it was delivered, so there was nothing to erase. Then I flashed TWRP and SuperSU. It comes with DM-Verity (and /data force encrypted). I tried re-locking, but later I have to erase all data again before unlocking bootloader. So the questions are:   Why is it required to erase all data when unlocking bootloader? Even with device encryption on? Can I avoid the erase?

I understand that unlocking the bootloader will wipe my Android phone, but have been looking around for why.  Seems to be by design, but what is the reasoning for that design?  Is it some security concern, some obscure technical reason, or just for lulz?  I'm looking for something solid to chew on here, something more than because "that's how it is".


I successfully mapped my www.mydomain.com to my Google site (as described ).  However I would like to forward also my naked domain (mydomain.com) to end up in www.mydomain.com.  I assume I should modify 'A' DNS record in my provider but what IP should I point it to?

Right now my site runs on http://www.example.com but I need to run that without www also i.e example.com  Can some body tell me here that how can i do that?


This line for i,k in (p[0].__dict__).items():     print (i,type(k))  prints code_event <class 'str'> code_event_system <class 'str'> event_no <class 'int'> group_no <class 'int'>  My desired output(for collections.nametuple0 code_event str code_event str  How to fix this?

How do I find out a name of class that created an instance of an object in Python if the function I am doing this from is the base class of which the class of the instance has been derived?  Was thinking maybe  might have helped me out here, but it doesn't seem to give me what I want. And short of parsing the __class__ member, I'm not sure how to get at this information.


I know that we can use very + noun to indicate the precision, particularity.  Once I wrote this sentence:     I felt like I was with my very family.   My teacher said this sound very colloquial, not written language. I'm not a native speaker, so is my teacher. Please help me to judge this case!

Are these correct ways to use very with a noun?  She is the very girl I want. On the very year of 2012, comes the end of the world. This is the very company everyone wants to work for.  What I understand is that very can be used to emphasize the importance of a noun.


I was trying to do following operation on a list 2 times: -> for each index i: arr[i] = d - arr[i] where d is maximum element in list -> append the resultant list to another list   My code: arr = [5, -1, 4, 2, 0] n = len(arr) res = [] for _ in range(2):     d = max(arr)     for i in range(n):         arr[i] = d-arr[i]     res.append(arr) print(res)  Output: [[6, 0, 5, 3, 1], [6, 0, 5, 3, 1]]  Expected Output: [[0, 6, 1, 3, 5], [6, 0, 5, 3, 1]]  Please help!

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


I have to populate a new field using a formula containing the smallest value of an existing field.   As this is a small part of a larger model I am wondering which is the most efficient method.   My thoughts are as follows:   Sort the field ascending and somehow use the top value or Use a formula to search for the smallest integer greater than zero and use this value as a variable?   Which method would be most viable with ModelBuilder from ArcGIS 10.3.1 for Desktop?

I am trying to use a SQL expression in order to select values that are >= 25% of its max value in that column. For instance, VALUE >= MAX(VALUE)*0.25, and those will ultimately be the selected points it pulls out.   Is there syntax to make that happen, or am I going to need to create a new column and use field calculator on it?   Biggest issue with that is I will have to do this for about 250 files. I am also trying to create this in ModelBuilder.  When I try it as above it just returns that there is an error with the expression.


Is there a greatest prime number? My intuition is that prime number series is a never ending. Can somebody explain whether or not greatest prime number exist?

Prime numbers are numbers with no factors other than one and itself.  Factors of a number are always lower or equal to than a given number; so, the larger the number is, the larger the pool of "possible factors" that number might have.  So the larger the number, it seems like the less likely the number is to be a prime.  Surely there must be a number where, simply, every number above it has some other factors.  A "critical point" where every number larger than it simply will always have some factors other than one and itself.  Has there been any research as to finding this critical point, or has it been proven not to exist?  That for any $n$ there is always guaranteed to be a number higher than $n$ that has no factors other than one and itself?


My adaptor:  public class Adaptor extends RecyclerView.Adapter<Adaptor.Holder>{  private ArrayList<Winkel> winkels; private LayoutInflater inflater; private ImageView icon; private ItemCLickCallback itemCLickCallback;  public interface ItemCLickCallback {     void onItemClick(int p);     void onSecItemClick(int p);  }  public void setItemCLickCallback(final ItemCLickCallback itemCLickCallback1){     this.itemCLickCallback = itemCLickCallback; }  public Adaptor (ArrayList<Winkel> winkels,Context c){     this.inflater = LayoutInflater.from(c);     this.winkels = winkels; }   @Override public Holder onCreateViewHolder(ViewGroup parent, int viewType) {     View view = inflater.inflate(R.layout.card_item, parent, false);     return new Holder(view); }  @Override public void onBindViewHolder(Holder holder, int position) {     Winkel winkel = winkels.get(position);     holder.title.setText(winkel.getNaam());     if (winkel.isFavourtite()){         holder.icon.setImageResource(R.drawable.ic_star_black_18dp);     }     else{         holder.icon.setImageResource(R.drawable.ic_star_border_black_18dp);     }  }  @Override public int getItemCount() {      return winkels.size(); }  class Holder extends RecyclerView.ViewHolder implements View.OnClickListener{      private TextView title;     private View container;     private ImageView icon;      public Holder(View itemView) {         super(itemView);          title = (TextView)itemView.findViewById(R.id.lbl_item_text);         container = itemView.findViewById(R.id.cont_item_root);         icon = (ImageView) itemView.findViewById(R.id.im_item_icon_secondary);         icon.setOnClickListener(this);         container.setOnClickListener(this);     }      @Override     public void onClick(View v) {         if(v.getId()==R.id.cont_item_root){             Log.d("lol",Integer.toString(getAdapterPosition()));             itemCLickCallback.onItemClick(getAdapterPosition());          }         else{             itemCLickCallback.onSecItemClick(getAdapterPosition());         }     } } }   My overview fragment:  @Override public void onItemClick(int p) {     Log.d("lol",(Integer.toString(p)));     Winkel winkel = (Winkel) mijnwinkels.get(p);      Bundle detailsBundle = new Bundle();     detailsBundle.putString(DETAILS_NAAM,winkel.getNaam());     detailsBundle.putString(DETAILS_ADRES,winkel.getAdres());     detailsBundle.putString(DETAILS_DEELGEMEENTE,winkel.getDeelGemeente());     detailsBundle.putString(DETAILS_GEMEENTE,winkel.getGemeente());     detailsBundle.putString(DETAILS_POSTCODE,winkel.getPostcode());      Details detail= new Details();     detail.setArguments(detailsBundle);     this.getFragmentManager().beginTransaction()             .replace(R.id.details,detail,null)             .addToBackStack(null)             .commit(); }   Error message:  java.lang.NullPointerException: Attempt to invoke interface method 'void com.example.hoofdgebruiker.winkelskortrijk.Utill.Adaptor$ItemCLickCallback.onItemClick(int)' on a null object reference.   My code is working up to the point where I get me recyclerview, the items are in it, but I can't click any of them without getting this error and I don't understand why. What am I doing wrong that it is a null object reference? Neither of my logs are showing up.  Edit: my method onItemCLickCallback is used here:  @Override public void onSuccess(ArrayList<Winkel> winkels) {     mijnwinkels = winkels;     Adaptor adaptor = new Adaptor(mijnwinkels, this.getActivity());     mRecyclerView.setLayoutManager(new LinearLayoutManager(this.getActivity()));     mRecyclerView.addItemDecoration(new VerticalSpace(30));     mRecyclerView.setAdapter(adaptor);     adaptor.setItemCLickCallback(this); }

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?


@Singleton @Path("broadcast") public class UserCreatedEventsResource { private Sse sse; private SseBroadcaster broadcaster;  @Inject public UserCreatedEventsResource(@Context final Sse sse) {     this.sse = sse;     this.broadcaster = sse.newBroadcaster(); }  @POST @Produces(MediaType.TEXT_PLAIN) @Consumes(MediaType.TEXT_PLAIN) public String broadcastMessage(String message) {     final OutboundSseEvent event = sse.newEventBuilder()             .name("message")             .mediaType(MediaType.TEXT_PLAIN_TYPE)             .data(String.class, message)             .build();      broadcaster.broadcast(event);      return "Message '" + message + "' has been broadcast."; }  @GET @Produces(MediaType.SERVER_SENT_EVENTS) public void listenToBroadcast(@Context SseEventSink eventSink) {     this.broadcaster.register(eventSink); } }   I had a nullpointer exception, but after reimporting the projekt with maven it dissappeared.  I think I did the rebuild once before but it did not work, and now I did it again and its working fine.


I was using df -h to print out human readable disk usage. I would like to figure out what is taking up so much space. For instance, is there a way to pipe this command so that it prints out files that are larger than 1GB in size? Other ideas?  Thanks

The drive is constantly filling up. You've hunted down all the spare and random files you can. grep'd for coredump files and even removed some of the un-needed backups...  What would be your next move.  The actual server in question has 10GB of website files and the OS shouldn't take any more than 10GB so how do you track down what's filling a 50GB (virtual) drive?


I have been banned from asking question because of, among other things, too many deleted questions.  states that "the only way to end a posting block is to positively contribute to the site; automatic bans never expire or "time out". Begin by fixing your existing posts".   But  states "as of 23/Apr/2013: You can now view your own deleted questions if you already have a link to them (...) You have to have thought to bookmark your question, or you have to go digging for it in your browser history."  How can I improve my deleted questions if I can't find them?  UPDATE: And how can I improve a deleted question if I can't edit it?

I have a question ban on Stack Overflow. I read that I must improve my posts if I want to be unlocked, but I deleted 2 of my questions. How can I see the full list of my removed posts and undelete my questions? I would like to improve them.


Find a formula for  (1 / (1 · 2)) + (1 / (2 · 3)) + (1 / (3 · 4)) + . . . + (1 /(n(n + 1) ) by examining the values of this expression for small values of n, where n is a positive integer. Use mathematical induction to prove your result.  I know there is a similar problem solved, but I am looking for all positive integers, rather than just integers greater than 2.

Prove that for every integer n>=2:  We have the summation of   $$ \frac{1}{i(i-1)}=1-\frac{1}{n} $$  I tried the algebra with this proof, but couldn't get it. I know that you split the i-1 and the i up but I am stuck from there.


I am running following query -  SELECT 'SELECT *  FROM LIFE'   I want the expected output as -  SELECT * FROM LIFE   However, when I copy the result set in new window, it is  SELECT * FROM LIFE   As per the below answer, when I use following   SELECT 'SELECT * ' + char(13) + char(10) + 'FROM LIFE'   The output is still returned in one line with a wide space as follows -  SELECT *   FROM LIFE   Can I not get newline in the result-set? Sorry if I am missing something but I am not having strong SQL skills.

I didn't see any similar questions asked on this topic, and I had to research this for something I'm working on right now. Thought I would post the answer for it in case anyone else had the same question.


I'm thinking of installing an application to edit TeX code on my smartphone with the Android operating system.  Does anyone know any?  I thought I'd ask in another app recommendation site, but I do not think they know the TeX language.

I used  app in my Android phone. But this app does not support XeLaTeX and requires an internet connection to be used.  Is there any distribution of TeX for Android? How I can install TeX on my Android phone?


I have a compiler error that exhibits itself when I use a template on a static class function.  Why does this happen and how can I fix it?  Error:     Error 1   error LNK2019: unresolved external symbol "public: static class CStatus const __cdecl CustomWindowComponent::setHWNDComponent(struct HWND__ *,class WindowComponent *)" (??$setHWNDComponent@VWindowComponent@@@CustomWindowComponent@@SA?BVCStatus@@PAUHWND__@@PAVWindowComponent@@@Z) referenced in function _wWinMain@16   D:\Demo_Project\main.obj    Demo_Project   The following code causes the compiler error and the next sample does not:  // Causes error WHEN the function is used class CustomWindowComponent : public Component { public:      template <typename T>     static void setHWNDComponent(HWND hwnd, T* cmp)     {      }     ...  // No error class CustomWindowComponent : public Component { public:      static void setHWNDComponent(HWND hwnd, Component* cmp)     {      }     ...  // in main compile error occurs here CustomWindowComponent::setHWNDComponent<WindowComponent>(myHwnd, cmp.get());   *Note: In my project the static function is defined in the header file and implemented in its .cpp file. I've merged them for brevity in this post.

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


I have just run across a question on Stack Overflow that was asked and answered last year.    The answer to this question is time-sensitive in the fact that if the same question was posed today, it may receive a different answer.  It would be interesting to see a feature that allowed you to fire a request (probably with a limit of one request per 6-12 months per question) to have each answerer of a question indicate whether or not they still stand by the answer they provided.  Is there an already established etiquette for re-asking a question?

If I asked a question a long time ago that has yet to be answered, has stopped getting views, and has all activity has come to a stop, is it ever appropriate to re-ask the question with whatever new info you may have gathered elsewhere?