Is there any evidence that suggests that the health problems related with the chronic daily over consumption of alcoholic beverages can be mitigated by drinking more water?

If someone who is otherwise healthy decided to drink fairly heavily and consistently over a long period of time, what is the healthiest way to do so?  Example: Stay extra hydrated by drinking more water, take a multivitamin, get more sleep, etc.  Obviously the best solution would be to cease drinking, but IF that person is stubborn and won't quit - what's the best way to go about it?


Currently my imported image (900x900), when zoomed into it very close, has the pixels blurry (like when you zoom into images in a photo viewer), but is it possible to have them stay square like when editing a image in ms paint?

I have a problem. I am going to make a minecraft animation in blender. But when I put a minecraft texture on a 3d cube that is 16x16x16 it is very low resolution is there a way to get the texture in a better resolution or is there a way to make blender make the texture better?  I hope you have an answer. Thanks in advance


I have some monitors left that I want to use. However my GTX980 is fully occupied. Can I throw in an old AMD card I have laying around to drive some secondarily, aka non important displays? Or do I need to stick with NVidia cards? The main monitors would be connected to the 980 for gaming etc, the others would just be used for reading Does anyone run a setup like this? If so, any problems you've encountered? Thanks for the feedback!

As the title says, can I put an AMD APU Procesor and an Nvidia GPU in the same PC?  These kinda bugs me because the APU I’ll be buying has the power of an AMD R9 240 I think. And I know that Nvidia and AMD GPU’s can’t mix, so it’s a bit complicated for me.


We are using SFDX in a CI/CD process with good results, however we need sometimes to refresh our integration sandbox. When the Connected App we used to authorize SFDX cli and store the public key used for private-key authentication is copied over from production, the Connected App Consumer Key is changed, and we need to update the secrets in our CI/CD to work around this problem.  Are there better strategies to work with SFDX and integration sandboxes?

We are using the classical machine-to-machine approach to connect to our DevHub to create scratch org, but in pre-release we need to connect to sandbox environments, which we would like to refresh nightly. Although the key associated to the connect app we use to sign the jwt is  not changed during sandbox refresh, the consumer id is changed every time we refresh the sandbox How can we get access to the sandbox after we have refreshed it, in CI/CD? If we have access to production, is there a way we can use it to get login access to sandbox?


I am attempting to reference labels in an external LyX document. I have found how to do this using the xr package in .tex files. However, I see no way of doing this in LyX without having to export to .tex first. Has anyone figured out how to refernece external documents in LyX without having to export to .tex first?

Question: What steps are required to use the xr package in LyX in order to reference items in other, independent LyX documents?  Steps already taken:   The tools package (that contains the xr package) has been installed in MikTeX. The xr package has been used in the referencing document (by adding \usepackage{xr} to the referencing document's preamble). A pointer to the referenced document has been set in the referencing document (by adding \externaldocument{referenced.lyx} to the referencing document's preamble). A label in the referenced document has been cross-referenced in the the referencing document using the \ref tag.   Observed (undesired) behavior: The reference appears as "BROKEN" in the LyX editor. The PDF output shows "??" where the reference number is expected.  Relevant links:       Software used: LyX + MiKTeX + BibTeX on Windows 7  My level of Lyx/LaTeX proficiency: Beginner+


Given a sequence of $[1,\dots,n]$ in random order:   Let $P_k$ be the probability that exactly $k$ numbers are in the correct position Let $Q_k$ be the probability that at least $k$ numbers are in the correct position   How can we calculate $P_k$ and $Q_k$?  These are the facts that I've managed to establish so far:   $P_n=\frac{1}{n!}$ $P_{n-1}=0$ $P_k=Q_k-Q_{k+1}$ $Q_n=P_n$ $Q_{n-1}=Q_n$ $Q_k=\sum\limits_{i=k}^{n}P_i$   Partial answers (for example: $P_0,P_1,Q_1$) or any other insights will also be appreciated...  Thanks

I'm looking for the method by which the partial derangement formula $D_{n,k}$ was derived. I can determine the values for small values of N empirically, but how the general case formula arose still alludes me.  Any links/books or an explanation will be appreciated.  The formula is:  $D_{n,k} = {n \choose k}!(n-k)$  Links:


I am trying to solve the following question:      Define a function sum() and a function multiply() that sums    and multiplies(respectively) all the numbers in a list of numbers.    For example, sum([1, 2, 3, 4]) should return 10, and multiply   ([1, 2, 3, 4]) should return 24.   So far I have the following:  def sums(listofnums):     total=0     for i in (listofnums):         total=total+i     return total  def multiply(listofnums):      total =1      for i in (listofnums):          total = total*i      return total   listofnums=[]  nums=input("Enter a list of numbers seperated by commas: ").split(",")  nums2=[float(i) for i in nums]  listofnums.append(nums2)   print(listofnums)  print (sums(listofnums))  print (multiply(listofnums))   This returns the following:   *Enter a list of numbers seperated by commas: 1,2,3  [[1.0, 2.0, 3.0]]  Traceback (most recent call last):  File "C:\Python34\46 simple python ex\sum() and mult() v2.py", line 19, in <module> print (sums(listofnums))    File "C:\Python34\46 simple python ex\sum() and mult() v2.py", line 4, in sums total=total+i  TypeError: unsupported operand type(s) for +: 'int' and 'list'*   I suspect the issue is that my functions sums and multiply only work with a list of the form(x,x,x,x) or [x,x,x,x] and what values I am returning are [[x,x,x]].   How can I fix this?  (Note I think that the rest of the code is fine b/c when I manually input a set of numbers of the form [x,x,x] directly in the code it works fine.)

What's the difference between the list methods append() and extend()?


2GB is the recommended size of an usb stick for a live image. On my 4GB stick there is space to add some other packages which I frequently use (e.g. programs to make backups).  Is it possible to easily add such packages to the stick such that they are available on my live system?  -->yes  Is it mandatory to use the persistent method for this purpose?  Is it possible to this such that those added packages on the stick will all automatically be installed when I install from this augmented live image stick?  What are the necessary steps for these tasks? -->see .  Edits: I already created an usb stick from the file xubuntu-18.04.1-desktop-amd64.iso using usb-creator-gtk. There are 695 objects in 1.4GB on this 4GB stick, so there should be plenty of free space.   Exploring this stick with GParted shows strange things:    sdb1 with 4kB, then 5,67MB unassigned, then sdb2 with 2,28 MB, the rest is unassigned.   I don't believe that! I can boot from this stick and try out Xubuntu 18.04 but I have seen that some packages which I always need are missing on the stick and I would like to add them.  From the comments to this post I learned the keyword persitent and in the German Wiki  I found an explanation for it (however this article is old and an archieved one, apparently from Jan. 2014, so it might be outdated for current versions of Ubuntu): On such an installation there is a second partition which is marked as something special to hold all modified settings of the live system including the files added to it. According to the cited article, this second partition is created this way: sudo mkfs.ext2 -b 4096 -L casper-rw /dev/sdXY  where XY has to be modified such that it specifies the usb stick to be used. But before this step, some other steps have to be done as described in that article.  In the comments there is a reference to mkusb. Looking at  I also found a reference to persistent usb drives.

I'm trying to make a Ubuntu live USB, but I have run into some problems:   Used LiveUSB install on my Lubuntu laptop. Breaks USB drive until reformatted, does not boot. Used Startup Disk Creator on Lubuntu. Makes bootable drive, but not persistant storage Used UNetBootin on Lubuntu, puts Ubuntu on USB stick but does not make it bootable Tried to use Universal USB Installer with WINE, but it didn't work. The first time it could only see the floppy disk drive not the USB, the next time it threw an NSIS error. Tried to use Universal USB Installer on Windows, but it needed admin permissions   I have a laptop with Lubuntu installed* (that I have the sudo password for), a Windows 8 desktop without administrator permissions and a 32GB sandisk USB stick. Is there anything else I can do to get it to work?  *IBM T-42 Thinkpad with 1GB ram and an intel Centrio mobile processor that I had to force PAE to get Lubuntu to install if it is relevant.  As requested:     sudo lsblk -f  NAME   FSTYPE  LABEL                    MOUNTPOINT sdb    iso9660 Ubuntu 16.04.2 LTS amd64 2017-02-15-21-44-13-00                ├─sdb2 vfat    Ubuntu 16.04.2 LTS amd64 E561-C446                             └─sdb1 iso9660 Ubuntu 16.04.2 LTS amd64 2017-02-15-21-44-13-00                sr0                                                                    fd0                                                                    sda                                                                    ├─sda5 swap                             d571c534-8cb6-4e61-889c-6289f5a33421 [SWAP] ├─sda1 ntfs                             F8E0DED8E0DE9BE6                      └─sda6 ext4                             b14a062d-7884-494c-99fe-ddfe5bd5f4b4 /   sudo lsblk -m  NAME    SIZE OWNER GROUP MODE sdb    28.7G root  disk  brw-rw---- ├─sdb2  2.4M root  disk  brw-rw---- └─sdb1  1.5G root  disk  brw-rw---- sr0    1024M root  cdrom brw-rw---- fd0       4K root  disk  brw-rw---- sda    37.3G root  disk  brw-rw---- ├─sda5 1022M root  disk  brw-rw---- ├─sda1   14G root  disk  brw-rw---- └─sda6 22.3G root  disk  brw-rw----


Massively refactoring my question after @user2974951 feedback below.  I have a set of measurements (time, temperature) that correspond to a certain physical process. Both time and temperature measurements have some error.  The model of the process I'm going to use is  $f(t) = a + e^{bt}$  where $f(t)$ is the temperature, $t$ is the time, and $a$ and $b$ are some unknown coefficients.  What would be the best approach to find these unknowns?  My brute-force approach would be to iteratively bisect both $a$ and $b$ by going over the dataset multiple times, but perhaps there is a more efficient solution.  EDIT:  An example dataset would be [(3.7,15.1), (5.5,14.3), (7.1,13.6), (8.9,13.0), (9.7,12.8), ...] and the output of the algorithm would be something like a=10, b=-0.1. The actual output values would be similar, but not exactly what I specified.  EDIT 2:  There are typically more points in the dataset than just the 5 that I initially suggested. I would guess that we can afford at least 10 measurements, maybe more, but not arbitrarily more - PSNR drops, and we eventually measure only noise.  The error in the time variable $t$ is small, only a few milliseconds, while the whole timespan is many seconds. The error in the temperature variable is significantly larger, say 5% of the whole observed range.  EDIT 3:  It seems that I forgot about horizontal alignment and to address that I need the third unknown. Therefore the approximating formula becomes  $f(t) = a + e^{bt + c}$  which adds another level of complication to my naive brute-force approach.  EDIT 4:  My question was marked as a duplicate, but it's not the same topic as referred questions. I can't use a well-established software where I just say "make a fit" and the curve is automagically fitted for me. I have to actually implement the fit myself.  Answering a question below - if implemented on an embedded platform, then this would be C and no external libraries. If implemented server-side - then Java or Kotlin and a wide choice of what to link against.  EDIT 5:  I can't answer my own question, perhaps because it's marked as a duplicate. This is the last update.  I have settled on my bisect algorithm (first $b$, then $c$, then $a$) that gives me $O(N (logN)^2)$ complexity. It feels fast on a mac, but I have doubts if it is suitable for an embedded solution on a low-power ARM processor.

I have the following data and would like to fit a negative exponential growth model to it:  Days <- c( 1,5,12,16,22,27,36,43) Emissions <- c( 936.76, 1458.68, 1787.23, 1840.04, 1928.97, 1963.63, 1965.37, 1985.71) plot(Days, Emissions) fit <- nls(Emissions ~ a* (1-exp(-b*Days)), start = list(a = 2000, b = 0.55)) curve((y = 1882 * (1 - exp(-0.5108*x))), from = 0, to =45, add = T, col = "green", lwd = 4)   The code is working and a fitting line is plotted. However, the fit is visually not ideal, and the residual sum of squares seems to be quite huge (147073).   How can we improve our fit? Does the data allow a better fit at all?  We could not find a solution to this challenge on the net. Any direct help or linkage to other websites/posts is greatly appreciated.


I want to upgrade from Ubuntu 12.10 to Ubuntu 13.04 but I cant.  I downloaded the iso of Ubuntu 13.04 but it's only allowing a clean install.  The "software updater" (update manager as it was called in 12.04) only offers an upgrade to Xubuntu.  Is there a way to upgrade to what I want?

I am using Ubuntu 12.10.  Please outline the different ways I can upgrade to 13.04.


Towards the end of the movie Checkov claims there's no way to beam Khan aboard ship after Spock asks him to because "there is too much damage" and he "can't get a signal"... But after Spock and Khan fight he is not only able to beam Khan, but Spock and Uhura back aboard the ship... Like, huh? I thought there was too much damage. Made zero sense to me how all of a sudden he was able to beam them when he just claimed there was too much damage to retrieve a signal.

When Spock was chasing, and beating, Khan over a transport in San Francisco, Uhura orders them beamed both back  to the Enterprise, while Chekov says something like:     Its impossible, they are moving!                                   But in the first movie, it was Chekov that transported back to Kirk and Sulu, avoiding hitting the Vulcan planet when trying to disable the Romulan drilling platform.


Give some Lagrangian we use the principle of stationary action to find the desired euqations of motion for something (e.g. a field).  A lot of modern physics seems to be based on the principle of stationary action. I read it works for classical mechanics, general relativity, Quantum chromodynamics, quantum electrodynamics, weak interactions and more stuff.  However, is there a field where the principle of stationary action does not yield the desired result or where it fails (contradicts some experimental result)?

It is an usual practice that any quantum field theory starts with a suitable Lagrangian density. It has been proved enormously successful. I understand, it automatically ensures valuable symmetries of physics to be preserved. But nevertheless the question about the generality of this approach keeps coming to my mind. My question is how one can be sure that this approach has to be always right and fruitful. Isn't it possible, at least from the mathematical point of view that a future theory of physics does not subscribe to this approach?


I'm getting an error   Attempt to invoke virtual method on a null object reference 'int com.android.server.job.controllers.JobStatus.getUid()'   there is a similar question   but I don't know what to do.  this is not simple nullpointerexception,see this：   my question is how to provent this.  this is my error log.  #1 main java.lang.NullPointerException Attempt to invoke virtual method 'int    com.android.server.job.controllers.JobStatus.getUid()' on a null object reference 1 android.os.Parcel.readException(Parcel.java:1580) 2 android.os.Parcel.readException(Parcel.java:1527) 3 android.app.job.IJobCallback$Stub$Proxy.jobFinished(IJobCallback.java:167) 4 android.app.job.JobService$JobHandler.handleMessage(JobService.java:147) 5 android.os.Handler.dispatchMessage(Handler.java:102) 6 android.os.Looper.loop(Looper.java:135) 7 android.app.ActivityThread.main(ActivityThread.java:5413) 8 java.lang.reflect.Method.invoke(Native Method) 9 java.lang.reflect.Method.invoke(Method.java:372) 10 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1037) 11 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)

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


I have the following statement to prove but not sure how to get started :  Let f: A → B and g: B → A be arbitrary functions. Show that there are subsets A1, A2 ⊆ A and B1, B2 ⊆ B such that : A1 ∪ A2 = A, A1 ∩ A2 = ∅ and B1 ∪ B2 = B, B1 ∩ B2 = ∅ and f(A1) = B1, g(B2) = A2.  I believe we need to use the notion of partial order here.  Thanks for your help.

Hi I have been stuck on the following problem for quite some time now I don't find the trick to solve it. Any help would be much appreciated.      Let $f:A\to B$ and $g:B\to A$ be arbitrary functions. Show that there are subsets $A_1,A_2\subseteq A$ and $B_1,B_2\subseteq B$ such that $A_1\cup A_2=A$, $A_1\cap A_2=\varnothing$, $B_1\cup B_2=B$, $B_1\cap B_2=\varnothing$, and $$f(A_1)=B_1,\qquad g(B_2)=A_2\;.$$ Use this to give an alternative proof of the Cantor-Schröder-Bernstein theorem.


I have been looking at a friends java code and this came up. But im not sure what it is. Can anyone help quickly. The code is like this: for(Customers cust: customerArrayList) { //  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-- fragment which I don't understand

Consider:  List<String> someList = new ArrayList<String>(); // add "monkey", "donkey", "skeleton key" to someList     for (String item : someList) {     System.out.println(item); }   What would the equivalent for loop look like without using the for each syntax?


I am working on a nodejs application that requires access to some network resources (such as cache services, DB, and so forth). In order to access these resources, I have written a module (imported via require that the nodejs app uses to access these network resources.  The dilemma I am facing is the following: should this modules be implemented using a constructor patter, or an object literal pattern?  Using Constructor  By constructor, I mean something like this:  function databaseHelper = function(){     *//public properties go here* } databaseHelper.prototype.methodA = function methodA() {} ...   so that nodejs modules that require this module will consume it like this:  var db = require ('dbhelper.js'); var dbhelper = new db(); dbhelper.methodA();   Using object literal  The other alternative is to implement the module as this:  function databaseHelper = function databaseHelper(){     return {         propertyA: '',         propertyB: 100,         methodA: function methodA(){}     } }   so that modules that utilize this database helper will only instatiate a variable with require' and will not use the 'new' keyword anywhere.  What's the best practice for node modules in this regards, particularly for modules that will be frequently utilized by other modules for network operations? Is the constructor/prototyping approach recommended (and why), or should we refrain from using the pattern and instead build functions that return object literals with properties and functions?

What's the difference between  var A = function () {     this.x = function () {         //do something     }; };   and  var A = function () { }; A.prototype.x = function () {     //do something };


Why is "duh" the word chosen to represent ignorance? Merriam Webster defines "duh" as "used derisively to indicate that something just stated is all too obvious or self-evident." But a derivation isn't given. Why "duh"?     I've checked out the answers to the previous duh question, and I get no satisfaction. The Wikipedia entry on the universality of "mama" and "papa" provides an analogy.  Why do babies first say "mama" and "papa?"  "These terms are built up from speech sounds that are easiest to produce (bilabials like m, p, and b and the open vowel a."   The babies, of course, initially have no idea that these sounds mean mother and father, but the reaction of the mother and father will attach the meaning to those sounds. Is "duh" a variation on "uh?" Is "uh" a sound that a human might first utter when in need? Open-mouthed. Simply formed. A grunt really. Food! Food! But someone who has to beg for food may be flawed. Too stupid to find their own food.

What is the origin of the word  as in the interjection:     — It's hot in the desert.   — Well, duh!   If it is of onomatopoeic origin and only appears in modern English as some sites suggest, I would be interested to know when it started appearing in English writing.


Can $(\Bbb R^2 , \|\cdot\|_1)$ and $(\Bbb R^2, \|\cdot\|_2)$ be isometric?  I think that these two spaces can't be isometric. But I can't able to show that. Would anybody please help me in this regard? Thanks in advance.

Does there exist an isometry from a Manhattan plane $A$ to a Euclidean plane $B$? I.e. a function $\varphi:A \to B$ that suffices $\|\varphi(a)\|_B = \|a\|_A$ for all $a \in A$, where  $\| \cdot \|_A$ is the Manhattan norm and $\| \cdot \|_B$ the Euclidean norm.


Do bisexuals have  any evolutionary advantage over straights and gays? Bonobos exhibit bisexuality extensively. Why so?

I would imagine that the answer to this question would be population control, especially since even if one sibling is homosexual this does not necessarily mean that the other siblings will be too.


Just to clarify, I am  not trying to change the size of the launcher icons but the icons on the desktop. I realize there is bunch of posts related to smaller desktop icons but the suggested solutions didn't work for the version that I am currently using.

How to change the size of desktop icons? I tried gconf-editor as given at  .  I am not getting the option for changing size at app > nautilus > icon_view.  I am using Ubuntu 11.10. Kindly help me in changing default icon size.   I want to make them small.


Does there exist a Stack Exchange site on which I can ask for help regarding whether I can use an audio clip? Basically, an SE for copyright law. This can be really confusing sometimes, and I don't want to accidentally steal from anyone.

On which of the Stack Exchange site should I ask a question regarding copyrights? Example question:  Do I have the permission to include the content of a document in my website? The copyright in question is from the SWEBOK and the licence says:  This document may be copied, in whole or in part, in any form or by any means, as is, or with alterations, provided that (1) alterations are clearly marked as alterations and (2) this copyright notice is included unmodified in any copy.  SWEBOK book copyright:


I had trouble installing virtualbox for ubuntu 17.10. To run it properly I needed to configure dpkg and when I restarted the system it showed some lines of code like "failed to load resource and the platform". I know how to install ubuntu again, because the first time I did with an USB and this time I'll do the same, but the problem is: How can I recover my files? Thanks!

For some reason I can't boot my system. I get an error akin to Operating System Not Found.   I tried bootrepair, and that didn't work. So then I decided I would just save my personal files, wipe everything, and reinstall.   But in the live session, when I go to the /home directory, my username folder isn't there, instead it goes to the Live CD's desktop and other directories. Is there some other error occurring? Is there a way to recover the files?


I'm on 14.04. I have my launcher on full transparency and I've , and to complete the picture and have the icons completely hovering, it'd be nice to hide the border line or change the colour. Is that possible?

I found a way to make the icon backgrounds transparent for the Unity Launcher by changing the files under /usr/share/unity/4.  Does anyone know how to make the background transparent for the launcher itself? I already made it transparent under Compiz, but I want to remove the line that separates the launcher from the desktop. If anything, I just want to make it look like the icons are floating.


We have installed Centos 6.4 in System X3750 M4 IBM Server. But the server is not showing the performance of at-least a normal Desktop Configuration. We haven't done any performance tuning in the Server.   Soon after completing the installation we checked the system monitor in the system, and there it shows total 32 CPUs and only about 3 CPUs have load, others are in idle mode.  Our System Configuration is:  IBM System x3750 M4 Server  300GB * 4 HDD  32GB RAM  2 Quad Core * 4 ProcessorsNos = 32 CPUs  Intel Xeon Processor  Partition:  RAID 1  2 HDDs in one RAID.  MANUAL PARTITION  /dev/sda6              58G  629M   55G   2% / tmpfs                  16G  664K   16G   1% /dev/shm /dev/sda2             485M   37M  424M   8% /boot /dev/sda1             200M  260K  200M   1% /boot/efi /dev/sda5              68G  878M   64G   2% /home /dev/sda7              29G  172M   28G   1% /opt /dev/sda8              29G  188M   28G   1% /tmp /dev/sda9              29G  3.9G   24G  15% /usr /dev/sdb1             274G  773M  260G   1% /var   Centos 6.4 Server  java version "1.7.0_25"  Database : mysql  Ver 14.14 Distrib 5.1.66, for redhat-linux-gnu (x86_64) using readline 5.1  JBOSS 6 Application Server  Apache Tomcat 7.14  What all Basic configuration must be done in the Centos 6.4 to achieve a good performance?  We are newbies in this field , i.e in server configuration and all. So please help us.  Thanks in advance.  Nevin Alex.

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


My computer crashed while I was upgrading from Ubuntu 14.04 to 16.04. In order to resume the upgrade, I followed the steps in the tutorial , which seems quite useful. Everything worked fine when I ran the command: dpkg --configure -a  But when I ran the command sudo apt-get update && sudo apt-get upgrade  , I get the following error message (I could only take a picture of it as in that computer only the terminal is working)  Basically it is saying that it failed to resolve a few packages (e.g. temporary failure to resolve 'gb.archive.ubuntu.com') I have then found something at , which I believe is pretty much what I have been experiencing (failure DURING dist upgrade). However, I noticed that ALL the entries from my sources.list have the name "xenial" after it, therefore I'm afraid closing all the entries from my source.list is not the best option. A picture of my sources.list file can be found below:  Or do anyone of you believe it can be a temporary DNS issue? Or any other thoughts (I have a feeling it has something to do with my sources.list)?

Err http://archive.canonical.com natty InRelease     Err http://security.ubuntu.com oneiric-security InRelease                Err http://extras.ubuntu.com natty InRelease                             Err http://security.ubuntu.com oneiric-security Release.gpg   Temporary failure resolving ‘security.ubuntu.com’ Err http://archive.canonical.com natty Release.gpg   Temporary failure resolving ‘archive.canonical.com’ Err http://extras.ubuntu.com natty Release.gpg   Temporary failure resolving ‘extras.ubuntu.com’ Err http://gb.archive.ubuntu.com oneiric InRelease Err http://gb.archive.ubuntu.com oneiric-updates InRelease Err http://gb.archive.ubuntu.com natty-backports InRelease Err http://gb.archive.ubuntu.com oneiric Release.gpg   Temporary failure resolving ‘gb.archive.ubuntu.com’ Err http://gb.archive.ubuntu.com oneiric-updates Release.gpg   Temporary failure resolving ‘gb.archive.ubuntu.com’ Err http://gb.archive.ubuntu.com natty-backports Release.gpg   Temporary failure resolving ‘gb.archive.ubuntu.com’  Reading package lists... Done W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/InRelease       W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/InRelease   W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/InRelease   W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/InRelease   W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/InRelease   W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/InRelease   W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/Release.gpg  Temporary failure resolving ‘archive.canonical.com’ W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/Release.gpg  Temporary failure resolving ‘security.ubuntu.com’ W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/Release.gpg  Temporary failure resolving ‘extras.ubuntu.com’ W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’ W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’ W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’ W: Some index files failed to download. They have been ignored, or old ones used instead.   This is what I'm seeing when I try to run sudo apt-get update. I did an update on my instance yesterday and am now experiencing this.


I've been searching and googling and I'm not the first one, it seems to me it is an common thing, but I can't find the (right) solution. It is Joomla, but I don't think it is specific joomla issue. My Ajax call, which is working: jQuery.ajax({ type: "POST", dataType: "json", url: getUrl, data: {task: "Filter", view: "viewname", format: "json", arfilter: arfilter}, success: function(result, status, xhr) {displayFilterResults(result); }, error: function() { console.log('ajax call failed'); }, })  Next is a part of the function 'displayFilterResults', which is building the table after AJAX call again: .... var strhtml     = '
'; strhtml    +=   '
'; strhtml += '
'; strhtml += '<input type="checkbox" class="select" id="select_' + result.data[i].cmid + '" name="select_' + result.data[i].cmid + '" value="' + result.data[i].cmid + '"' + checked + '/>	'; strhtml += '<input type="text" id="rownr_' + result.data[i].cmid + '" ... />	'; strhtml += '<input type="text" id="fnam_' + result.data[i].cmid + '" ...  />	'; strhtml += '<input type="text" id="bnam_'   + result.data[i].cmid + '" ... />	'; strhtml += '<input type="text" id="lnam_' + result.data[i].cmid + '" ... />	'; strhtml += '<input type="text" id="catc_' + result.data[i].cmid + '" ... />	'; strhtml += '<input type="text" class="update" id="shnr_' + result.data[i].cmid + '" name="shnr_'   + result.data[i].cmid + '" value="' + shirtnr  + '" />	'; strhtml += '' + result.data[i].posc + '	'; strhtml += '
'; strhtml += '
' strhtml += '
';  jQuery('#result').html(strhtml).text(); //This line is writing the result to inner HTML of #result ....  Initial opened the table is created server sided by <?php echo $this->form->getInput('fieldname');, and recreated by last line which writing the filter result in the inner HTML of #result:
<?php echo $this->form->getInput('fieldname'); ?>
  Also the event selector 'update' is fired, if change the value. jQuery('.update').bind('change',function () {     console.log('update fired'); });  -- Here comes my problem: I have created filter bar, which is doing the the AJAX call and there is raising the issue. After the AJAX call the table is build again, but than the event selector for 'update' is not fired anymore!!?? I start a bit to understand the issue, DOM has been changed - the table is completely build again and assigned to the inner HTML of #result, which means the change event is not yet bind to the input text element with the class="update". But how do I solve this? I have tried to add this to the done of the AJAX call, just to bind the 'change' event selector to the class="update": .done(function() {     jQuery('.update').each(function () {         jQuery('.update').bind('change', function () {             console.log('bind the change to the fields with player update class')         });     });  But if change the value of the input field than this one is fired and not 'change' event selector  earlier mentioned. What is the right way, after an AJAX call to get the event selector is working again, what means if I change the value, than this executed. Remarkable thing is, I have also for the checkbox an click event, which is still working after the AJAX call!! I hope that someone can help me out with this how to solve this.

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


The drive in red. I don't remember when I saw it first time. I thought it was a backup drive back then. Can I remove this partition? I can provide any further details if needed

I started getting warnings about running out of space on my E: drive.  I've read many articles, threads and posts online about how to clean the drive but none of them resolved my issue.  My machine specs:  OS: Win 10 Pro  Version: 1803  OS build: 17134.1  I disabled hiding of protected/system files to see what's on the E: drive but I don't see any clutter. I ran the disk clean up several time as an admin to no avail. Any tips and suggestions how to clean up the E: drive would be much appreciated! Thanks.


I am using the aps journal template and appendices are added by using  \appendix \section{bla bla}   So the result I get is:  "Appendix A: bla bla"  However I would like to know how to change the "Appendix A" for "App A" for example.  Thanks

I am trying to change the name of the Appendices. This is what I've done:  \begin{appendices} \input{muonSF} \input{Wmass} \input{BDTCrossCheck} \end{appendices}   using the package appendices. My problem is that I need to change the name of appendix to Anexo (spanish for appendix), and also I need a page before all appendices with only the word Anexo.  How can I do that?


I have a valid work permit in the Netherlands. And I was just asked to visit Spain to help out a client of the company.  Am I allowed to travel to Spain with my Netherlands work permit?

I’m going to Germany for a semester exchange and I have a long-stay visa from Germany. Can I travel to the other Schengen states during this period with this visa or do I have to apply for a separate short stay Schengen visa?  My visa is German national visa type D. It is for a duration of 4 months, i.e., longer than 90 days. It says on the visa that the long stay visa is valid in Deutschland, which is different from my earlier visa, which I had when I visited Germany earlier; that one was a short stay visa and said it was valid in Schengen Staten.  Perhaps my current visa means that I can stay in Germany for a period of longer that 90 days can visit the other Schengen states if I don’t exceed the 90 day period.


Is it ok that LaTeX doesn't have a wordcounter?  texcount is a very valuable external esource to determine how many words you have in your document, but it relies . But instead of using a console to figure this out it could be a good option to a have a visual input on how long a document's pdf gets while running one compilation after another.    One possible way to have wordcount done in a visual manner would to have the number of words signaled and printed to the resulting pdf on a certain amount of periods. One could have this wordcount set for each paragraph, page, chapter, and/or full text. How could this be done?   How do get wordcount on our working file pdf?  Options could be the total number in the 1st page, or as draft options, or as a separate page. The possibilities are endless. This SE site is full of places where it's stated that LaTeX can do anything. A comment ot this question explains quite well that tex is not optimal for word count so an external source is a good thing. But maybe there's some way to connect the external tool to tex?      if using luatex it might be more reasonable as you could count in lua without disturbing the tex macros so much   I'd prefer LaTeX but if luatex is a chance ... how would it work?    The other chance would have the result printed to the beginning of the preamble of the document in the master document where our main.tex file is. This has been suggested before and is not the main question here:

Often assignments (or even papers) have a word count limit. That is not a big deal when using Word, but I don't know how to do that using LaTeX. My solution has been so far to compile the document and then do a rough word count of my pdf file, sometimes even copying the contents of the pdf file and pasting in Word to get a mostly correct Word count.  Is there any tool (maybe even an online tool), package, script or software to do that directly from my .tex document and still get the right word count (i.e., ignore commands, equations, etc)?


My Macbook Pro Late 2013's battery puffed up (getting bigger and bigger by day) and I asked the Apple authorized service store to remove it completely so that I can use the laptop as a PC (table computer). After the battery was removed, I noticed that it run very slow. I went to many suggestions on google and found this  but I could not find the MacBookPro11_3.plist file (my model id MacBookPro11,3) to remove, other files could not be removed because of Operation not permitted. I also tried to run SMC and PRAM reset but they didn't help.  Can anyone help me? I really appreciate all your help!

I have a MBP late 2011 running El Capitan, recently my battery died (x over the icon and "no battery available" in the dropdown.) I've noticed since then that CPU intensive tasks are very slow, and I read that without a battery macs will throttle the CPU to half capacity.  So now I'm looking for one of two solutions:  1) Either somehow disable the throttling, or  2) Trick the computer into thinking it has a battery.  In regard to the first one I've tried a few things such as described , removing a plist file that supposedly controlled it, but that hasn't helped. Any help would be greatly appreciated, TIA.  Edit: I've looked over the question about a 2006 MacBook, it's similar but I've tried everything outlined there and nothing has worked. I'm curious if there are any new ideas. I think the difference may be El Capitan.


I just stated tensor product, and I have problem to see how it works. So, why $$\mathbb Z_2\otimes_{\mathbb Z}\mathbb Z_3\cong \{0\}\ \ ?$$

I've just started to learn about the tensor product and I want to show: $$(\mathbb{Z}/m\mathbb{Z}) \otimes_\mathbb{Z} (\mathbb{Z} / n \mathbb{Z}) \cong \mathbb{Z}/ \gcd(m,n)\mathbb{Z}.$$  Can you tell me if my proof is right:  $\mathbb{Z}/m\mathbb{Z}$ and $\mathbb{Z} / n \mathbb{Z}$ are both finite free $\mathbb{Z}$-modules with the basis consisting of one single element $\{ 1 \}$. So $(\mathbb{Z}/m\mathbb{Z}) \otimes_\mathbb{Z} (\mathbb{Z} / n \mathbb{Z})$ has the basis $\{ 1 \otimes 1 \}$.  Therefore, any element in $(\mathbb{Z}/m\mathbb{Z}) \otimes_\mathbb{Z} (\mathbb{Z} / n \mathbb{Z})$  is of the form $(ab) 1 \otimes 1$ and any element in $\mathbb{Z}/ \gcd(m,n)\mathbb{Z}$ is of the form $k 1 = k$ where $k \in \{ 0, \dots , \gcd(n,m) \}$.  I would like to construct an isomorphism that maps $ab$ to some $k$. Let this map be $ab (1 \otimes 1) \mapsto ab \bmod \gcd(n,m)$.  This is a homomorphism between modules: it maps $0$ to $0$ because it maps the empty sum to the empty sum. It also fulfills $f(a + b) = f(a) + f(b)$ because there is only one element, $a = 1$.   It is surjective. So all I need to show is that it is injective. But that is clear too because if $ab \equiv 0 \bmod \gcd(m,n)$  then both $a \equiv 0 \bmod n$ and $b \equiv 0 \bmod m$ so the kernel is trivial.  Many thanks for your help!!


I want to allow 'guest' user to only read files in my harddrive (mounted during startup at '/mnt/blahblahblah' ) . However I don't want them to write anything into it.I'm on Xubuntu 16.04. How can i do it?

I have stuff stored in an external partition (ext4) that is mounted through /etc/fstab to the location /vms. Inside that directory, I have a folder shared which should be accessible (currently read-only, later maybe read-write) by all local users, including guest sessions.  However, chmod -R a+r /vms/shared makes the files world-readable to all standard users, but not for guest sessions, which AFAIK have another layer of restrictions through AppArmor or something like that which denies access to everything outside their home.  I already have a separate account guest-config which serves as default profile for new guest sessions (/etc/guest-session/skel is a symlink to /home/guest-config) to be able to tweak guest profile settings, just in case this will help.  How can I unlock this specific directory (and all its files and subdirectories) to grant guest accounts read-only or read-write access? Using Ubuntu 16.04 btw.


Kind of an objective question which could possibly go into one of the other sites but Im not sure so Im asking here!  What are the advantages and disadvantages of using lambda notation as opposed to the more "sql like" notation? personally I prefer the "sql like" method due to readablility but do they both compile to the same IL? is there any performance difference? are the treated any differently by the compiler?  eg.  Foo.Where(Bar => Bar.Stuff == "SomeString")   VS  from Foo in Bar where Bar.Stuff == "SomeString" select Foo

LINQ is one of the greatest improvements to .NET since generics and it saves me tons of time, and lines of code.  However, the fluent syntax seems to come much more natural to me than the query expression syntax.  var title = entries.Where(e => e.Approved)     .OrderBy(e => e.Rating).Select(e => e.Title)     .FirstOrDefault();  var query = (from e in entries              where e.Approved              orderby e.Rating              select e.Title).FirstOrDefault();   Is there any difference between the two or is there any particular benefit of one over other?


I read in a lot of questions about this topic that cmd + `  should switch the windows, but it simply does not switch the windows, is there some other shortcut in Chrome that prevents this one from working?

I opened two Google Chrome windows (because I am using multiple Gmails) and when I do the Cmd ⌘ Tab ⇥ shortcut it just shows me other applications that I opened but does not show me the other Chrome windows that are already opened.  How to switch to the other Google Chrome window that I opened using keyboard shortcut?


I've created two neural networks for a prediction purposes, the first is a network with one hidden layer and the second is two hidden layers, I use the cross validation techniques,  the training error for both networks is around 2E-4 but at the test step, for the two topologies, the prediction values do not change over the time, (just a small change in a fraction of 5).  I've tried different functions for the hidden layers (between tangh and sigmoid) and a sigmoid for the output layer.  So, where is the problem?  Thanks.

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


I just came across this  where the questioner is basically asking how to improve his cheat application so that it can't be detected later on; probably when some admin detects wrongdoing and inspects a system.  Although not exactly a great question content wise; I am not sure what to do about it.

How should we treat questions that are, or have seeds of, evil or malicious purposes and actions, such as writing spambots and malware?    Should they be answered like regular "everybody keeps their pants on" questions? Or should there be some other type of response to this bad behaviour lot?


Suppose $X$ is a scheme, suppose $f$ is a function on $X$, and let $X_f$ denote the locus of points where $f$ doesn't vanish. Now suppose $V=\operatorname{Spec}A$ is an open affine subset of $X$. Is it true that $X_f\cap V = D_A(f|V)$, where $D_A(f|V)$ is the distinguished open set of $\operatorname{Spec}A$ of $f$ restricted to $V$? I know that $p\in X_f\cap V$ means that $\not\in m_p$, where $m_p$ is the maximal ideal of $\mathcal{O}_{X,p}$, and since $p\in V$ we also have $p=[P]$ for some prime ideal $P$ of $A$. But I'm not sure where to go from here. Edit: I see there is an answer to the same question here: , but I am still confused about one point. Namely, why do we have $U\cap X_f=\{x\in \operatorname{Spec}B\mid \overline{f}_x\not\in xB_x\}=\{x\in\operatorname{Spec}B\mid f\not\in x\}=D(f)$? (Specically, the middle equality)

For part a) of this exercise we need to show that for a scheme $X$ and an open affine subset $U=$ Spec $B$ that $U \cap X_f = D(\bar{f})$ where $\bar{f}$ is the restriction of $f \in \mathcal O_X(X)$ to $\mathcal O_X(U)$ and $X_f= \{x \in X :$ the stalk of $f$ at $x$ $(f_x)$ is not contained in the maximal ideal $(m_x)$  of $\mathcal O_x \}$.  Now I believe the proof goes something along the lines of using the fact that this maximal ideal in the affine scheme is just $xB_x$ but I can't see how $f_x \not\in m_x$ implies $\bar{f}_x \not\in xB_x$. Like how can we go from the local ring $\mathcal O_x$ to $B_x$?


Why have I not received the Curious badge, even though I have asked 11 positive voted questions?  That's what the badge tracker indicates:      These are my question list.

As you can see in the picture, I have 13 out of 5. But it's been like this for about two months! What's the reason for that?


It is a well known fact that $\displaystyle\sum_{k=1}^{\infty}\frac1{k^2}=\frac{\pi^2}6$. I wanted to prove this using elementary techniques. By doing some easy algebra, I found it was sufficient to prove that $$\int_0^1\frac{\log (1-x)}{x}\mathrm dx=-\frac{\pi^2}6.$$ (By defining a function $f(x)=\displaystyle\sum_{k=1}^{\infty}\frac{x^k}{k^2}$ and doing some integration.)  I have been trying to evaluate this integral using secondary school techniques (i.e., substitution or partial integration) but I didn't achieve much.  Some approaches:  1. It's not hard to see that $$\int_0^1\frac{\log (1-x)}{x}\mathrm dx=\int_0^1\frac{\log x}{1-x}\mathrm dx$$ It's not much, but the logarithm looks nicer now.  2. Also, since we want $\pi$ to appear, a trigonometric substitution might be helpful. I tried subsituting $x=\sin^2t$ which gives $$\int_0^{\frac\pi2}4\log(\cos t)\cdot \cot t\;\mathrm dt$$ or, using the second form, $$\int_0^{\frac\pi2}4\log(\sin t)\cdot \tan t\;\mathrm dt$$ Another remark: $\int\tan a=-\log|\cos a|$ might help, because $\log|\cos a|$ appeared in the integral. But I dont's see immediately how to use this. (Absolute values within the logarithm are unnecessary because $\sin t,\cos t\geq0$ in this case.)  3. Setting $x=\cos 2t$ gives $$-2\int_0^{\frac\pi2}(\log2+2\log(\sin t))\tan 2t\;\mathrm dt$$ by using the identity $\frac{1-\cos2a}{2}=\sin^2a$. And since, by symmetry, $$\int_0^{\frac\pi2}\tan 2t\;\mathrm dt=0$$ the integral is just $$-4\int_0^{\frac\pi2}\log(\sin t)\tan 2t\;\mathrm dt$$ which looks quite nice.

As I have heard people did not trust Euler when he first discovered the formula (solution of the ) $$\zeta(2)=\sum_{k=1}^\infty \frac{1}{k^2}=\frac{\pi^2}{6}.$$ However, Euler was Euler and he gave other proofs.   I believe many of you know some nice proofs of this, can you please share it with us?


I have a cone and I want to cut of top piece of it. How can I make cut face flat?

So I just started working with Blender 2.6 and the two books I have don't really discuss how to modify objects other than "here's edit mode..."    What I have is two cylinders with one slightly smaller than the other and protruding out of the larger one.  I need to "fillet" from the larger cylinder to the smaller one.  I decided to create a cone with the same diameter as the larger cylinder which then protrudes through the smaller one giving the illusion that the larger cylinder is reducing to the size of the smaller one.  Of course the problem is that the cone continues through and extends beyond the smaller cylinder.  My thought was to just cut a section off of the cone that lies inside the smaller cylinder.  Unfortunately my two books don't really cover doing anything like that.  So any suggestions would be greatly appreciated!


Need some help in fixing simple bash script below. What it does is to compare dates in epoch format using if else. The script does not work as I intended because it always goes to the first condition DEPLOY all the time.   Even if I set the deploymentDate variable to be greater than currentDate it still goes to the first condition.   Can anyone suggest on how to fix it?  #!/bin/bash  currentDate=$(date +s% )  deploymentDate=1513516201   if [ "$currentDate" > "$deploymentDate" ]  then      XSL="DEPLOY"  else      XSL="DO NOT DEPLOY"  fi  echo $XSL    Output   DEPLOY

How can two dates be compared in a shell?  Here is an example of how I would like to use this, though it does not work as-is:  todate=2013-07-18 cond=2013-07-15  if [ $todate -ge $cond ]; then     break fi                              How can I achieve the desired result?


I saw a lot oft tutorials about the mvc pattern, but always it was only a small example/Situation explained. There was always only one model, one controller and one view. But what if I have a lot oft models with complex logic, I cant put all the rendering code in one view and all the logic code in one controller. How I split all in smaller pieces, because the models logic depends in each other(for example collision). Know someone a good tutorial, or example game that explains this pattern in advanced games?

I was contemplating the design of a game (translating a boardgame to the computer, specifically, which I suppose is relevant in this case) and it occurred to me that it might make sense to build the 'game' separate from the 'display.'  It would allow me to prototype something quickly with a simple text interface, and then go pretty it up later. It would also let me port the game to other media more easily.  Is this sort of compartmentalization common in games? Should I try to break things down further? Are there complications I might be missing?


Which tool can I use to get or keep the rest of the output feature when I use the Clip (Analysis) tool in ArcMap?   For instance I need to calculate Blue minus Green.    Erase (Analysis) from Overlay will do.  That's what I was looking for.

I am working on a project doing spatial analysis at a statewide level. I am looking at a form of transportation coverage in a state, and part of my analysis involves buffers and drive time polygons. I am using a geodatabase (therefore ArcGIS) for all my work, so new features will be exported as feature classes in feature datasets. To visualize: I have said state border, and some dissolved buffer rings around some points, and they cover parts of the state. I want to create a feature class for the parts of the state these buffer rings don't cover, AKA gap areas. Is there a tool I can use or create to do this? I know I could draw them in manually in editor, but I am unsure if that's the most precise way to generate these feature classes. To me, I am thinking this operation would be like an inverted "Clip" in that I take the two layers, and instead of pulling out the clipped area, it would take everything not in the clipped area. I am using a Desktop Basic license.


What is the ≠ sign Alt code to type in a plain text editor, for example a textarea? I've already tried Alt+2260 to no avail. Is it possible without touching the Registry settings?

This is in Windows, but answers for other operating systems can be handy to others.  Most guides say something to the effect of "hold down the Alt key and type in the code on the keypad".  This works fine for decimal codes (like 65 for 'A'), but not for  codes (like  for 'A').  Some applicatons provide other facilities that will allow hexadecimal Unicode character codes to be typed and then transformed.  Word allows you to type the code (such as 200f) and then convert it to Unicode by typing Alt-X.  I'm looking for a general method of doing this that will work with the standard input.


I frequently find I want/need to map a list of SObjects by a value other than it's own Id.  So, I'd like to abstract this process to make it reusable.  For example, I might want to map Contacts by Account Id.  So I've created a method mapBySpecifiedIdField:      public static Map<Id, Set<SObject>> mapBySpecifiedIdField (List<SObject> homogeneousSObjectList, SObjectField idField) {     if (homogeneousSObjectList == null || homogeneousSObjectList.isEmpty()) {         return null;     }      Map<Id, Set<SObject>> sObjectSetBySpecifiedIdMap = new Map<Id, Set<SObject>>();     for (SObject sObj : homogeneousSObjectList) {         Id specifiedId = (Id) sObj.get(idField);         if (!String.isBlank(specifiedId)) {             if (!sObjectSetBySpecifiedIdMap.containsKey(sObj.Id)) {                 sObjectSetBySpecifiedIdMap.put(sObj.Id, new Set<SObject>());             }             sObjectSetBySpecifiedIdMap.get(sObj.id).add(sObj);          }     }      String mapType = 'Map<Id, Set<' + homogeneousSObjectList[0].getSObjectType() + '>>';     Map<Id, Set<SObject>> concreteSObjectSetByIdMap = (Map<Id, Set<SObject>>)Type.forName(mapType).newInstance();     concreteSObjectSetByIdMap.putAll(sObjectSetBySpecifiedIdMap);      return concreteSObjectSetByIdMap; }   I'd prefer to invoke it with:  Map<Id, Set<Contact>> mapContactSetByAccountId = (Map<Id, Set<Contact>>) MapHelper.mapBySpecifiedIdField(contactList, Contact.AccountId);   But first, I'll get a compile error:     Incompatible types since an instance of Map<Id,Set<SObject>> is never an instance of Map<Id,Set<Contact>>   If I change my invocation to:  Map<Id, Set<Object>> mapContactSetByAccountId = MapHelper.mapBySpecifiedIdField(contactList, Contact.AccountId);   But this results in a runtime error:     System.TypeException: Invalid conversion from runtime type Map<Id,Set<Contact>> to Map<Id,Set<SObject>>   Is there any way I can make this work?

I have a List of records of type abc__c. abc__c is a custom object. The record has a field called code__c. What I am trying to accompolish is to group the records in the list based on the code__c.  For example the list might have :  Code__c     abc__c record 30       (Record 1) 40       (Record 2) 40       (Record 3) 50       (Record 4) 30       (Record 5)   I want to group these records based on Code__c in a Map. There could be any number of code__c which is populated dynamically. It is not static. how can I loop through the list and store the records as a list for a particular code__c(Id) in Map?


I am trying to surround div with position: absolute by text. Always text going under div.  CSS which I am using:  .all {     display: block;     width: 250px;     min-height: 180px;     height: auto;     position: relative;     background: #fa65fc; } .abs {     position: absolute;     top:  80px;     left: 200px;     float: right;     width: 50px;     height: 100px;     background: #4542df; }   Two divs:

ABS
 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
   Here is link to:   I would like to do something like this:    Thanks in advance.

Every time I try to do something seemingly-simple in CSS, it doesn't work.  I have a content div that contains a 460x160 image. All I want to do is position the image at the bottom-right corner and wrap my text around it.
          text text text text text text ...
   So I want it to look like:  ------------------ | text text text | | text text text | | text text -----| | text text |    | ------------------   Doing it with a top-left or top-right image is cake:  #contents img { float:right; }  ------------------ | text text |    | | text text -----| | text text text | | text text text | ------------------   Now how do I push that to the bottom? The best I've come up with so far are:  #contents img { float:right; margin-top: 90%} // really needs to be 100%-160px  ------------------ | text text      | | text text      | | text text -----| | text text |    | ------------------   In this case the text does not print in the margin, so there is white space above the image.  #contents { position:relative; } #contents img { position:absolute; right:0; bottom:0; }  -or-  // move the img tag under the text in the html and: #contents img { float:right; margin-top:-160; }  ------------------ | text text text | | text text text | | text text -----| | text text | te | ------------------   In this case the text prints over or under the image.  So... how can I accomplish this?


I just want to clarify something. Why is person1 and person2 still referring to the same object?  class Person{ private String name; Person(String newName) { name = newName; } public String getName() { return name; } public void setName(String val) { name = val; } }  class Test { public static void swap(Person p1, Person p2) { Person temp = p1; p1 = p2; p2 = temp; } public static void main(String args[]) { Person person1 = new Person("John"); Person person2 = new Person("Paul"); System.out.println(person1.getName()+ ":" + person2.getName());  swap(person1, person2);  System.out.println(person1.getName()+ ":" + person2.getName());  } }   Output would be:  John:Paul John:Paul   I was wondering why John and Paul didn't swap?

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 just installed ubuntu 16.04 LTS. When I choose try before installing, wifi was not working. So I activated wifi driver by Software & Updates >> Additional Drivers and It was working while installing (and try before installing).   But after installing, I am not able to activate by same procedure. When I enable and input my password, it does nothing.  Output of lspci --vvnn | grep -A 9 Network  07:00.0 Network controller [0280]: Broadcom Corporation BCM43142 802.11b/g/n [14e4:4365] (rev 01)     Subsystem: Dell Wireless 1704 802.11n + BT 4.0 [1028:0016]     Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-     Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-     Latency: 0, Cache Line Size: 32 bytes     Interrupt: pin A routed to IRQ 19     Region 0: Memory at f7c00000 (64-bit, non-prefetchable) [size=32K]     Capabilities: <access denied>     Kernel driver in use: bcma-pci-bridge     Kernel modules: bcma   output of iwconfig  lo        no wireless extensions. enp9s0    no wireless extensions.   My problem is I just installed Ubuntu 16.04 and not able to enable wireless driver.  -- Software & Updates >> Additional Drivers  -- Select Using Broadcom 802.11 Linux STA Wireless driver source from ....  -- When I insert password, nothing happen, It still selected Do not use this device

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


How can I make to accept only numbers inputs in my code: -->>     ?  Thank you !

Is there a quick way to set an HTML text input (<input type=text />) to only allow numeric keystrokes (plus '.')?


Here :    an upper bound for the integral values on an elliptic curve is given.  But this bound is so large that it is of no use in practice, if all integral points have to be found.      How can I find all integral points in practice ?    In the above article, it is mentioned that a "sum" of solutions is again a solution. But I do not think that all solutions can be found this way in general, or is this actually the case ? Moreover, it can be difficult to find one solution or to prove that none exists. Who can help ?  The given answer contains a lot of links, but I would prefer to have either at least the main ideas or how I can determine the solutions with PARI/GP, my favorite calculator-program. Moreover, I noticed that most implemented methods rely on unproved conjectures, if I did not misinterprete it. This would be not really satisfying.

This is an attempt to get someone to write a canonical answer, as discussed in this . We often have people come to us asking for solutions to a diophantine equation which, after some clever manipulation, can be turned into finding rational or integer points on an elliptic curve. See , , , , . (This list is biased towards questions I have answered because I remember them best; other people have answered such questions as well.) I would like an answer to which, after one of us has explained the cleverness, we could direct the OP.  An ideal answer would address    How to find both rational and integer solutions Good software solutions. Ideally, it would nice to have a walkthrough for doing these things with , so that people could find solutions without even installing anything. References for how to transform some standard presentations of elliptic curves into Weierstrass form, so that we don't have to write out the algebra every time. I'm thinking of  a cubic in $\mathbb{P}^2$ with a rational point that is not a flex,  $y^2 = \mbox{degree 4 polynomial}$, a $(1,1)$ curve on $\mathbb{P}^1 \times \mathbb{P}^1$, or an intersection of two quadrics in $\mathbb{P}^3$.


The way I see it, the square root of a number is +/-. For example, the square root of 9 is +3 or -3 since squaring either number gives 9. So why is the range of radical functions restricted to positive numbers or 0, only?   E.g. $y = \sqrt{x-2}$   Domain is clearly = 2 or larger.  But for range-- say x was 3, we'd then get $ y = \sqrt{3-2} = \sqrt1 = \pm 1.$ Every possible number we can put for x results in either 0 or a +/- number. Thus, if anyone could explain why our range is only non-negative numbers (as opposed to all real numbers), I would greatly appreciate it. Surprisingly I haven't found any online source that explains it.

Consider the function $f(x)=\sqrt x$.  Pretty much every resource I can find gives its domain as $\{x\in \mathbb{R} \mid x \ge 0\}$ and its range as $\{y\in \mathbb{R} \mid y \ge 0\}$  I don't see why the domain needs to be restricted to positive numbers. Isn't the square root of a negative number defined? That is, the square root of a negative number is a complex number of the form $a + bi$.  So why isn't the domain of $f(x)=\sqrt x$ instead $\{x\in \mathbb{R}\}$ and its range $\{y\in \mathbb{C} \mid y \ge 0\}$?  What am I missing?


I know that Wubi is buggy, dead, etc. However, I do not have a spare partition space lying around, ready to use on the computer (running Windows 7, using BIOS not UEFI, was bought way before Win8 was announced), I have installed Wubi on that computer in the past, but that was back when 12.04 was current. I was wondering if it was possible to update from Ubuntu 14.04 installed using Wubi to 14.10 without having to go through a reinstall without Wubi?

I want to upgrade my current Wubi installation (Ubuntu 11.04) to Ubuntu 11.10. Is this possible to do inside Wubi? Or do I have delete Wubi from Windows, therefore deleting my current Ubuntu installation; and then install 11.10 via the Wubi installer?  Thanks


First thing first, my code,  \documentclass{article} \usepackage{ragged2e} \usepackage[utf8]{inputenc} \usepackage[letterpaper, top=0.5in, bottom=0.5in, left=1.55in, right=1.55in]{geometry} \usepackage{multirow,array,varwidth,spreadtab,caption} \usepackage[norule]{footmisc} \usepackage{pythontex} \usepackage{siunitx,booktabs,caption} \usepackage{ragged2e} \usepackage{layout} \usepackage{xtab} \usepackage{float} \usepackage{gensymb} \usepackage{hyperref} \usepackage[some,bottom]{background} \usepackage{enumerate} \usepackage{fancyhdr} \usepackage{color, colortbl} \usepackage{xcolor} \usepackage{multicol} \usepackage{indentfirst} \newcommand{\mc}[2]{\multicolumn{#1}{c}{#2}} \definecolor{Gray}{gray}{0.85} \definecolor{LightCyan}{rgb}{0.88,1,1}  \begin{document}  \begin{table}[ht] \begin{center} \begin{tabular}{|c|c|c|c|c|}     \multicolumn{5}{c}{\textbf{NET ENTITLEMENT FISH OIL MARKETS}}\\     \multicolumn{5}{c}{\textbf{AS OF DECEMBER 31, 2019}}\\\hline     \rowcolor{LightCyan}     \multicolumn{1}{|c|}{\multirow{2}{*}{Country}}&\multicolumn{1}{c|}{\multirow{2}{*}{Company}}&Proved Cooked&Proved Uncooked&Total Proved\\     \rowcolor{LightCyan}     \multicolumn{1}{|c|}{}&\multicolumn{1}{c|}{}&(T)&(T)&(T)\\\hline     ChUAN& \pyc{print("{}".format(row[0]))} &51,574&31,202&82,776\\\hline     IraW-West POINT &  & 9,656 &57,981&67,637\\\hline      \multicolumn{1}{|c|}{\multirow{3}{*}{KAZSLSKDE}}& PKKR& 32,129 &5,174& 37,304 \\\cline{2-5}      \multicolumn{1}{|c|}{}&KOLKOL&9,718&3,447&13,165\\\cline{2-5}      \multicolumn{1}{|c|}{}&PKPK&424&0&424\\\hline      TOTAL CNNNO & & 103,501 & 97,804 & 201,306\\\hline \end{tabular} \end{center} \label{tab:multicol} \end{table}  \end{document}   And what I got is like below,   The second row coloring obviously block not only the "Country" and "Company" but also the "|" in the first two rows.  How could I get rid off this problem? Appreciated on any comments and help.  Regards, Cheng

I am trying to produce a basic color table as shown below  \documentclass{article}  \usepackage{booktabs}  \usepackage[dvipsnames*,svgnames]{xcolor}  \usepackage{colortbl}  \usepackage{array}  \begin{document}  \begin{table} \centering \setlength{\aboverulesep}{0pt} \setlength{\belowrulesep}{0pt} \setlength{\extrarowheight}{.75ex} \begin{tabular}{|>{\columncolor{LightSteelBlue}}c| c | c | c|} \toprule  \rowcolor{LightSteelBlue}  & {Mann} & {Kvinne} & {Totalt} \\   \rowcolor{LightSteelBlue}  &        &          &        \\ \midrule  \O nsker        &      &        &        \\   Ballbinge       &      &        &        \\ \midrule  \O nsker ikke   &      &        &        \\   Ballbinge       &      &        &        \\ \midrule  Totalt          &      &        &        \\                   &      &        &        \\   \bottomrule \end{tabular} \end{table} \end{document}   Now I wanted to center the text in the first row, and column, inside their boxes. My first thought was to use \multirows, alas this produces some very ugly results. The text is hidden behind the colors.  What is the proper way to create the table above, with centered text?  (Any other comments about how to improve the looks of the table are also welcome)


I have a ticket from Larnaca Cyprus, via London to Houston. I no longer want to start my journey in Larnaca as I will be in London. Can I just get on the plane in London after the 10 hour layover at Heathrow. It's also a change of airline but on one ticket.

I've a friend that booked a round-trip journey. He booked A-to-B and B-to-A. Somehow he needed to be earlier at location B, so he took a train and did not take the flight from A to B.  When he went to the airport to take the "back home" flight (B-to-A), he was informed that his ticket was canceled because he did not take the A-to-B flight. They canceled the ticket and sold it to someone else.  Is this normal? The company said it was their right to do so, and he could not get the flight back. The company was Iberia.


I just installed Ubuntu onto my hard drive from a USB drive. When I reached the partitions screen, I noticed it listed the full hard drive as "free space" even though I already had Windows 7 installed.   I knew I had about 50 GB of free space on the hard drive, so I partitioned sda1 for 35 GB and installed Ubuntu onto it, and partitioned sda2 for 4 GB of swap space.   The installation went fine, but when I reach the GRUB boot menu, there is no option for Windows 7 -- only Ubuntu. It seems as though my Windows 7 installation has completely disappeared. This would be very unfortunate, as I had aplenty of files on Windows, so your help is much appreciated.

I recently got a computer from school. It came with Windows 8.1 installed. I then installed another copy of Windows 8.1 (so it would use the built-in Windows Pro license) and upgraded it to Windows 10. I then installed Ubuntu alongside both Windows 8 and 10. Note that I made a separate 255MB ext2 partition for /boot. Now, when I boot the computer, I first see a GRUB prompt (I already un-hid the grub prompt 'cuz I like it that way) with Windows 8 and Ubuntu options. However, there is no Windows 10 option. If I select Ubuntu, the computer boots into Ubuntu. However, if I select the Windows 8 option, I then get sent to the Windows bootloader, where it then gives me options to boot either Windows 8 or Windows 10. (However, by this point, the computer has already loaded the kernel and all. Apparently Microsoft misunderstood the concept of a bootloader and decided that that meant "boot practically the entire system before actually showing the bootloader". Typical Microsoft.) How can I disable the Windows bootloader and add a Windows 10 option to GRUB? EDIT: Someone has answered telling me to disable the Windows bootloader. However, I still do not know how to add Windows to the GRUB OS list. Can anyone help with this? EDIT 2: After removing Windows 10 from the Windows bootloader with EasyBCD, it seemed that, after a few reboots, it would continually unhide itself and Windows 10 would reappear. However, I then later deleted Windows 10 from the list of OSes in msconfig, and it seems to have stayed deleted. However, I STILL have not managed to get Windows 10 to appear in GRUB. It's as if GRUB simply doesn't detect it. Also, I'll put this in the question so that people see it - I have tried using boot-repair, however, it has NOT helped any.


Starfleet has the three uniforms - blue, gold and red in TNG onwards.  I know that these each represent different areas, but is there a canon reason for why these colors were used for each area? e.g. why science is given blue?  Please note - I am not asking about the change of uniform, but instead am asking about the canon significance of these colour in the ST universe.

In the original Star Trek engineers and security officers wore red shirts but in ST:TNG engineers and security officers wore yellow shirts and command officers wore red shirts.  Was it ever explained why there was a uniform color change?


How to create a double arrow line with a variable on its top. Something like this.

When using the command \Rightarrow is there any way to put text above it? I have tried \overbrace but is there a way to do it without this?


Given constants $\alpha, \beta > 0$ define $$ f_{\alpha, \beta}(x) = x^{\alpha} \sin(x^{\beta})$$ for $x > 0$.  For which pairs $\alpha, \beta$ is $f_{\alpha, \beta}$ uniformly continuous?

Consider a function $f_{\alpha, \beta}\colon (0, \infty) \longrightarrow \mathbb{R}$ defined in the following way:  $$f_{\alpha, \beta} = x^{\alpha}\sin(x^{\beta}) \quad \alpha, \beta > 0$$  Then we can pose the questions:    For which pairs $\alpha, \beta$ is this function uniformly continuous? For which sets $(\alpha, \beta)$ in $(0, \infty)^2$ is the family equicontinuous?   I am baffled as to how to go about answering these questions in a clear and concise way. I think that it is possible to produce an answer by considering many cases and lots of tedious estimates. Is there a better way to approach the problem?  Any help will be appreciated.


I have file input.txt with below data in TAB delimited format-  23776112        Inactive        Active 23415312        Inactive        Active   As per requirement, Inside the while loop, I want to use cut 1st column's data and print it -  Below is the part of code-  ...... ......     while read line     do           SN=`echo ${line}|cut -d '       ' -f1`         echo $SN     done < input.txt .... ....   To use the tab as delimiter above, I am using Ctrl V Tab  But the output is not as expected.I am getting O/P-  23776112 Inactive Active 23415312 Inactive Active   Whereas I want O/P like -   23776112  23415312

Here is an example of using cut to break input into fields using a space delimiter, and obtaining the second field:  cut -f2 -d' '   How can the delimiter be defined as a tab, instead of a space?


I have some data in a 400 GB nfts partition that I seed from, but if I try to open qbittorrent before opening the partition in nautilus I get errors, so I have been manually opening it on each boot. What is this process and how can I do it from command line (and therefore make it happen automatically from startup?). Is this Quora thread () talking about my question? It seems to be, but I'm not entirely sure...

I have two NTFS partitions, and I don't want to mount them manually every-time I start Ubuntu.   How can I do this?  Is there a tool or a code to use?   If so, is it safe to automount? specially when they are being used by another OS?


I'm using jQuery plugin with $.ajax() functions. There is some way to upload a file with POST and do some function when is it done? here my code.... what i do wrong?  $.ajax({                 url: "../index.php?rqst=upload",                 type: 'POST',                 data:{                     'fileToUpload': $("#fileToUpload").val()                  },                 success: function(data) {                     alert("file upload");                 }});    and this is the file input:  <input class="form-control" type="text" name="fileToUpload" id="fileToUpload">   and there is a way to display a gif during the load??? thanks in advance

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


For the hundredth time I am re-watching Star Trek: Voyager now, and I just wondered about the following:  In Endgame future Janeway travels back in time to lead Voyager home through a Borg transwarp-hub, which turned out to be a pretty dangerous undertaking. Years earlier though, during the war between Species 8472 and the Borg shown in Scorpion I&II, Janeway traded the modified borg-nanoprobes in form of a weapon for save passage through borg-controlled space. It seems to me, had she known about the transwarp-hubs, she could have just requested save travel directly to Federation space. It would have gone way faster and requires only knowledge of those hubs: Get a sphere to Voyager, let them open a conduit to a hub, go through and transmit the blueprints after. Seems to me everyone would've benefitted from this. Well, except Species 8472.   So why take the difficult approach of upgrading Voyager with tech from the future (by the way, where the heck was the timetravel-police we've seen in one of the other episodes?) and sending them through a hub, instead of just making past-Janeway trade the nanoprobes for a route to earth?

In the series finale, Admiral Janeway travels back to 2378 to take Voyager back to Earth. Out-of-universe, of course, this point in time was chosen to fit in with the continuity of the rest of the series. In-universe, however, it seems that Janeway could have chosen any point in time, since she had the ability to travel to and from the Delta Quadrant at will. Is there a reason given, in-universe, for why she chose that particular incident to travel back to?


I am a new player creating a rogue character and I'm struggling to understand how the skill system works. I've spent about an hour searching through the  and can't find anything. I'm specifically wondering what to put for skills that I'm not proficient in.  I picked the skills acrobatics, sleight of hand, perception, and insight to be proficient in. My criminal background gives me proficiency in deception and stealth. So what does "proficiency" mean in terms of skills as opposed to items? How do I fill these in?

I'm trying to fill out the skills section on my first character, but when I look at the character sheets in the Starter Set as examples of how to make a character, the skills that are circled have higher modifiers than their Dexterity or Strength or whatever should make them.  I've filled out all skills but those. What do I add to the ability modifier to get those numbers?   My abilities are Strength 13, Dexterity 14, Constitution 11, Intelligence 15, Wisdom 8, and Charisma 8. Proficiencies are Arcana, Athletics, History, Investigation and Stealth. My saving throws are Strength and Dexterity.   I just started D&D and have the Player's Handbook, DM's Guide, Monster Manual, and the Starter Set.


I have a direct mapped cache of size S with the line size L. The cache is physically indexed and tagged. The physical address is 50 bits, numbered from 0 to 49 (with 0 being the least significant bit). The machine has a word size of 4 bits and the memory is byte-addressable. Which bits of the 50 bits are used to select a word from the line? Is it as many bits as it takes to point of a word in the line size L e.g. if line size is 8 byte then 2 bits are needed? Is it some logarithm again that must be used?

I have a direct mapped cache of size S with the line size L. The cache is physically indexed and tagged. The physical address is 50 bits, numbered from 0 to 49 (with 0 being the least significant bit). The machine has a word size of 4 bits and the memory is byte-addressable. Which bits of the 50 bits are compared with the address tag?


I am trying to get data from my sqlite database. It gives me the error of Attempt to invoke method on null reference. I am trying to store the values using Hashmap.  Here's my code:    class MyAdapter extends BaseAdapter {         private ArrayList<HashMap<String, String>> mData;          public MyAdapter() {             mData = helper.getAllDataLV();         }          @Override         public View getView(int i, View view, ViewGroup viewGroup) {              return view;           }         private class ViewHolder {             TextView tx_row;         }     }   public ArrayList<HashMap<String,String>> getAllDataLV(){ ArrayList<HashMap<String, String>> data = new ArrayList<>(); SQLiteDatabase db = myhelper.getWritableDatabase();  Cursor cs = db.rawQuery("SELECT * FROM bets;",null);  if(cs != null && cs.moveToFirst()){     do{         HashMap<String, String> q = new HashMap<>();         q.put("betnumber",  cs.getString(cs.getColumnIndex("betnumber")));         data.add(q);     }while(cs.moveToNext()); } System.out.println(data);  return data; }   The error is in the getAllDataLV() function.      Attempt to invoke virtual method 'java.util.ArrayList com.example.zian.myDbAdapter.getAllDataLV()' on a null object reference

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?


Please someone can fix this error :     java.lang.IllegalArgumentException: You cannot start a load on a null Context   public class CompteAdapter extends RecyclerView.Adapter<CompteAdapter.MyViewHolder> {      private Context mContext;     private List<CompteWrapper> compteList;     private AdapterView.OnItemClickListener onItemClickListener;      public CompteAdapter(Context mContext, AdapterView.OnItemClickListener onItemClickListener, List<CompteWrapper> compteList) {         this.mContext = mContext;         this.compteList = compteList;         this.onItemClickListener = onItemClickListener;     }      @Override     public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {         View itemView = LayoutInflater.from(parent.getContext())             .inflate(R.layout.compte_carte, parent, false);          return new MyViewHolder(itemView);     }      @Override     public void onBindViewHolder(final MyViewHolder holder, int position) {         CompteWrapper compte = compteList.get(position);         holder.title.setText(compte.getName());          Picasso.with(this.mContext).load(compte.getIcon()).into(holder.icon);     } }


In British English, the standard is 'write to me'. In American English the standard is 'write me'. Similar variants exist with 'out of the window' and 'out the window'. When did the dropping of prepositions start happening?  Are there any historical or regional influences? If so, do you know of any research that has been done on these? Finally, which version do other forms of English (eg Australian) use?

When I call the buzzer outside my girlfriend's flat, she sometimes says *"I'll open you the door". I correct this to "I'll open the door for you".  I've never heard a native speaker say it the first way, which is why I think it's wrong. But I can't explain why.  There is a pattern in lots of English phrases that would suggest both are correct. A few common examples:   Give the keys to me before you go — Give me the keys before you go I'll buy a coffee for you at the cafe — I'll buy you a coffee at the cafe We sent a text to Martin on his birthday — We sent Martin a text on his birthday   The left-hand side is more formal, and the right-hand side is more common in everyday speech.  What do you call this pattern?  What makes the 'open-the-door' sentence an exception?


In my recent physics lab I constructed and examined the diode bridge (see ).  In particular I was interested in the smoothing properties of the capacitor. However when adding the capacitor ($300 \mu F$) and measuring the voltage (continously, using voltage probes over the resistor) I noticed that the resultant voltage curve was only smoothed by certain resistors.   This might be a basic question concerning the behaviour of current, but why will certain low-ohm resistors (I believe I used a 100 $\Omega$ resistor) result in a (unchanged) pulsating voltage while other high level resistor (for instance 10000 $\Omega$ resistor) creates the intended smoothing?

In my school textbook it is written that the capacitor acts as a filter, that is, it decreases the fluctuations in the potential difference across the load.    But since all the components are connected to each other in parallel the potential difference across them should be same. So there should be no change in potential difference across the load even if a capacitor is connected in parallel.   Can anyone explain this to me?


Is it possible to set a section counter in beamer? For example, when using the Frankfurt theme it displays a counter in each section you are in.  This is problematic if you have multiple sections or long titles. Is it possible to just have a counter at the bottom of the slide?

I created a presentation with Beamer, and I used Darmstadt theme.  But, this theme doesn't have the page number.  I know that I can insert the page number in Footline with:  \setbeamertemplate{footline}[frame number]   But, how can I insert the page number in "Navigation symbols", like this picture?


Before leaving the States our company IT person installed Ubuntu on one of our Lenovo 500 laptops. This laptop had a new hard drive installed. All worked fine until arriving in the UK. Suddenly it would stop loading the OS so it is impossible to access the website. Our tech person just told me to buy a new laptop here. I am cheap and would like to fix this (I am writing on my other Asus, which doesn't have a CD/DVD drive like the Lenovo does).   Our IT person does not normally use an open source operating system like Ubuntu. Since the Ubuntu OS is on the Lenovo and something got corrupted, is it possible to roll back to an earlier point? There is nothing critical on this laptop.

I would like to see a full how-to guide on how to install Ubuntu.


Since backticks invoke the code style, how do I type backticks within a code snippet without ending the code style?

I tried before to post a shell script that contained a ` character as an answer on Stack Overflow. The parser insisted on treating the backtick as formatting instead of part of code.  How can I include it?


Newtonian mechanics seems to allow for both positive and negative gravitational mass as long as the inertial mass is always positive.  The situation is analogous to electrostatics but with the opposite sign. Two positive masses or two negative masses are attracted to each other whereas one positive and one negative mass repel each other.  General relativity says gravitational and inertial mass are the same thing through the equivalence principle. This has been confirmed experimentally to a very high degree of accuracy, though not for very small masses and only for normal matter.  Antimatter is known to have positive inertial mass from observing the trajectories of particles in electric or magnetic fields. Presumably it is also known that the $m$ in the famous $E=mc^2$ is positive. The gravitational mass of elementary particles is currently too small to measure, but is it possible that antimatter could have negative gravitational mass - or is this absolutely precluded in general relativity?

I know that the gravitational interaction of antimatter is expected to be the same as normal matter.  But my question is, has it ever been experimentally validated?  I think it would not be a trivial experiment, because electromagnetic effects have to be eliminated, so neutral particles would be needed. Maybe diamagnetically trapped antihidrogen atoms could be examined as to which direction they fall?


I frequently work with extremely unbalanced data where I care most about the edge cases. For example, right now, I'm looking at some data with almost 30,000 cases where Score is between 0 and .3 and 5,000 where Score ranges from .05 - over 8.  If my data was normally distributed (or even close), I'd run a histogram to get a feel for what the distribution is like, or maybe a summary, so I can see the quantiles, median and mean. But as it is, the histogram is unreadable since the y scale goes up to 30,000 and I'm mostly interested in the bins that are less than 100 and the minimum through the 3rd quantile are all zero.  Is there a standard technique for high-level exploration of this sort of highly skewed data in the same way that a histogram works? To be clear, I'm most interested in working around the skewness (which sabotages my standard techniques), rather than identifying/quantifying it.

The data I'm working with are highly skewed, with the vast majority of data concentrated at 0. It seems really hard to highlight the differences between these kind of distributions:  gamma1 <- rgamma(10000, shape=0.05, rate=1) gamma2 <- rgamma(10000, shape=0.055, rate=0.98) gamma3 <- rgamma(10000, shape=0.06, rate=0.95)  c(mean(gamma1), mean(gamma2), mean(gamma3))  [1] 0.04845668 0.05253655 0.05797983  ks.test(gamma1, gamma2)   Two-sample Kolmogorov-Smirnov test    data:  gamma1 and gamma2     D = 0.0433, p-value = 1.44e-08     alternative hypothesis: two-sided  ks.test(gamma2, gamma3)   Two-sample Kolmogorov-Smirnov test   data:  gamma2 and gamma3    D = 0.0456, p-value = 1.864e-09    alternative hypothesis: two-sided    ks.test(gamma1, gamma3)  Two-sample Kolmogorov-Smirnov test   data:  gamma1 and gamma3    D = 0.0798, p-value < 2.2e-16    alternative hypothesis: two-sided   As most of the data is at 0, histograms are not very helpful for seeing the differences between the distributions (not to mention the fact there doesn't seem to be a convenient way to plot a histogram with multiple distributions in R, see ):    Violin plots seem to misrepresent the shape of the distributions (they look a lot more normal-like than they really are) and since the means are very low, the boxes are almost invisible:    Since these plot aren't really showing anything useful, I was wondering if there is a better way to visualise skewed distributions?


Given is a linear model $y_i=x_i^T+e_i$ where $e_i \sim N(0, \sigma^2)$. The precision is defined as $\tau = \frac{1}{\sigma^2}$. I am asked to derive the posterior $\pi(\beta|x,\tau)$.  Would I compute the posterior by doing the following: $\pi(\beta|x,\tau) \propto p(x, \tau | \beta) p(\beta)$ or $\pi(\beta|x,\tau) \propto p(x,|\tau, \beta) p(\tau |\beta) p(\beta)$?  I would assume the above relations to be equivalent; How do the mathematical expressions of the pdfs of $p(x, \tau | \beta)$ and $p(x,|\tau, \beta$) differ?

Suppose that in a Bayesian framework we have observed data $D$, using independent prior distributions on the parameters of the model, denoted by $\theta_1, \theta_2$. Then, the joint posterior distribution of $\theta_1, \theta_2$ can be written as: $$ P(\theta_1, \theta_2 \mid D) \propto P(D \mid \theta_1, \theta_2)p(\theta_1)p(\theta_2) $$  One way to obtain estimates from the posterior is use . This sampler requires simulating from the full conditional distributions for both $\theta_1$, $\theta_2$. One relation for the full conditional that caught my eye in a book is the following: $$ P(\theta_1\mid D, \theta_2) \propto P(D \mid \theta_1, \theta_2)p(\theta_1) $$  I am wondering how exactly this proportional relation is derived. Would anyone have any ideas? It seems that there are extra assumptions here that are implicit.


I want to get random rows from a table in SQL. I'm trying to do this in C# but i see i will have a problem with IDs and I would need to make another column called row number to order IDs.   protected void ibtnPrintInventory_Click(object sender, ImageClickEventArgs e) {     Random rng = new Random((int)DateTime.Now.Ticks);     var inv = Inventario.GetDefaultConfigs();    int filtro = inv.Filtro;    int localizacoes_max = inv.LocalizacoesMax;     int userID = Utilizador.GetUserID();      int armazemID = Armazem.GetArmazemByUserID(userID);     // Total rows to apply random    int localizacoes_armazem = Inventario.GetInventarioCount(armazemID);     // Loop Flag    int etiquetas_soma = 0;     int[] localizacoes_array = new int[localizacoes_max];     while(etiquetas_soma <= filtro)    {        for (int i = 0; i < localizacoes_max; i++)        {            localizacoes_array[i] = rng.Next(1, localizacoes_armazem);        }    }  }   I was wondering if this is possible to do directly in SQL, a query that returns a number of rows based on a variable from a table and selects random rows.  EDIT.  The objective is to get random rows from a table and sum those rows column values and if the sum is higher than the filter it will break the loop.  Also I have to use a parameter to how many rows i want to get

How can I request a random row (or as close to truly random as is possible) in pure SQL?


I am under the impression that you have to set your alpha value before the experiment, and once the experiment is done, your p value, based on the alpha value, is either significant or not.  It's dichotomous.  There is no "almost significant" or anything like that.  So if I set my alpha at 0.04, but my p value is 0.05 then my results are insignificant.    I do not understand why.  Imagine a beginner researcher who really wants to get significant result, setting alpha at 0.2 and gets 0.19 p so its significant.  Or imagine a researcher so sure that a treatment works that sets alpha at 0.001 but his p value is 0.002 so its insignificant. Why has the significance of the result have anything to do with the researcher's guess about alpha levels?    Why can't we treat p value as a continuous variable, instead of randomly picking some alpha significance level before we start?

I've been reading a lot lately about the differences between Fisher's method of hypothesis testing and the Neyman-Pearson school of thought.  My question is, ignoring philosophical objections for a moment; when should we use the Fisher's approach of statistical modelling and when should be use the Neyman-Pearson method of significance levels et cetera? Is there a practical way of deciding which viewpoint to endorse in any given practical problem?


I have been thinking about one problem, which is not understandable to me. Consider the following: I have a deck of cards (52 cards). I pick card after card (no replacement), but I stop when the current card belongs to the same family (Aces, Kings, etc.) as the card picked before. The number of observations is an event, so we can say in our sample space there are 50 events (2-52), BUT we should add another, which is that nothing happens at all. This last part gives me a huge headache and I don't know how to consider even start thinking about a problem and create a formula for this problem, such as find probability for the formula for an event. I would really really appreciate it if someone could help me understand this problem. Thank you. edit: the current card must match the card picked before, not any card picked before.

What is the probability that a shuffled standard deck of 52 cards has no two cards of the same rank together ?  I am unable to get a handle on this problem, and wonder whether there is an analytical solution ?


I'm running Ubuntu 14.04, I just downloaded steam and I'm getting   Steam needs to install these additional packages:      libgl1-mesa-dri:i386, libgl1-mesa-glx:i386 [sudo] password for usernamehere:    Once I put in my password I get  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  libgl1-mesa-glx:i386 : Depends: libglapi-mesa:i386 (= 10.1.3-0ubuntu0.4)  unity-control-center : Depends: libcheese-gtk23 (>= 3.4.0) but it is not going to be installed                         Depends: libcheese7 (>= 3.0.1) but it is not going to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages. Press return to continue:    I press enter and it closes and opens up steam but it asks me this every.single.time.  Is there any way to fix/bypass this nuisance?  Any help is appreciated thank you for your time.

I have tried some of the solutions posted elsewhere in the support forum, one seemed like it worked but after a steam update i found myself back at square one  I am a new Linux user and am already at a learning curve :)  Thanks for any help  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  libgl1-mesa-glx:i386 : Depends: libglapi-mesa:i386 (= 10.1.3-0ubuntu0.3)  unity-control-center : Depends: libcheese-gtk23 (>= 3.4.0) but it is not going to be installed                         Depends: libcheese7 (>= 3.0.1) but it is not going to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages. Press return to continue: