Since a couple of years, I have the dark desktop theme by default. Since I upgraded to Ubuntu Gnome 16.04 a week ago, firefox upgraded with it, and it now uses a dark theme as well. That's okay with me, except for the fact that a fair number of web forms now have become unreadable: the text is white, but the form fields are white as well, so you can't see what you're typing.  Workaround: select the text after you've typed it, then it becomes visible and you can inspect it.  Other workaround: type everything in gedit and copy-paste it from there.  Sure, there are workarounds, but this is very annoying. I like the dark theme so I prefer to keep using it, but for web forms it's just not a good idea.  Is it possible to keep the dark theme but fix its behavior in web forms such that they are always readable?

I switched to a dark theme (Dolorean Dark). I like it and I think--it is better for eyes. However I have problems in some web pages. Most pages are intended to be shown on white background. On dark theme form controls have black background and mostly the font is also black, so the content of forms are invisible. I would like to use white theme on web pages in Firefox.


I cannot sign up to Area 51. The error is  Unable to log in with your OpenID provider:  An unexpected error occurred while logging in. It's not you, it's us. This is our fault. Detailed information about this error has automatically been recorded and we have been notified.   Is there a fix? I am signing up with my StackExchange account. I selected sign up from the menu.  Related:  (not a duplicate because of the request is completed and the error happened again.)  I am getting a 404 when I try to sign up on the Area 51 meta. (url that shows 404: )

Is Area51 login broken? I tried to sign up today and this happened:    Unable to log in with your OpenID provider:  An unexpected error occurred while logging in. It's not you, it's us. This is our fault. Detailed information about this error has automatically been recorded and we have been notified.   To clarify, this is happening as soon as I click either the sign up or the log in buttons. I never get asked if I want to log in with OpenID (I don't; I don't even have an OpenID), nor do I have any other way of influencing the outcome.


My task is to change URL of internal site collection in SharePoint Online.  The situation is such: it was configured with one domain (DomainA), and now all site collections are:  http://domainA.sharepoint.com http://domainA.sharepoint.com/search http://domainA-my.sharepoint.com   But now the client desided to use different domain. New domain is added and configured in Office365 - DomainB.  Now it is not possible to simple change the url of created site collection. But client wants to have addresses like http://domainB.sharepoint.com .  The site collections are empty for now and never used. Is it possible to delete all site collections starts with domainA and create a new ones with domainB?   Any suggestions? Thanks a lot!

I try to change the URL address from  - I using SharePoint Online (Office 365). Can Microsoft change this address? Or can I create address/record in my private domain, let's says sharepoint.mydomain.com that will be direct to ?   I have make a mistake in  this address and want to change for something different.  Did one way to do something like that is buy a SSL certificate?


I suggested an edit to a question but that revision was reject. Where can I find the particular suggested edit, or better yet the question itself? I would like to try and reword the question again.

Where can I find my pending/approved/rejected suggested edits? (a bit like the Flagging Summary page)


I have a problem with my installation of Ubuntu. I installed it fresh using a live USB stick to another USB stick with fast boot and secure boot disabled.  I'm using an Asus Zenbook UX562F with an integrated GTX 1050 Max-Q. After the installation, I installed Nvidia-390 and updated the kernel with ukuu to 4.20.17 to fix no sound issue.  After the reboot, everything went well and I did:  apt-get update apt-get upgrade + J   All was done well, so I restarted and on the next boot after selecting Ubuntu in GRUB it gave me a long black screen (violet screen) where nothing changes after so much time.  I tried to add nomodeset and noveau.modeset=0 single and together but didn't help so I don't know what to do.  Edit:  I had a random lucky boot but was not able to repeat it. (Just to add this Information.)  Trying the solutions on  didn't work for me.  I tried purging nvidia and install old driver nvidia-375 but still no boot.  I also installed Ubuntu on my internal SSD where I ran into the same issue: -booting after installation - works -booting after upgrading the kernel to 5.1.4 - works -booting after dist-upgrade - get stuck after grub  Lucky boots were reproducable but rare so TTY solutions are possible to apply  Starting with nomodeset and noveaus.modeset=0 is also not possible what makes me think it's not an nvidia issue  Edit:    When I got a lucky boot some error messages I have taken a picture of them:

in my earlier question you can find at:   i describe my error:     I'm using an Asus Zenbook UX562F with an integrated GTX 1050 Max-Q.   After the installation, I installed Nvidia-390 and updated the kernel   with ukuu to 4.20.17 to fix no sound issue.      After the reboot, everything went well and I did:      apt-get update apt-get upgrade + J      All was done well, so I restarted and on the next boot after selecting   Ubuntu in GRUB it gave me a long black screen (violet screen) where   nothing changes after so much time.      I tried to add nomodeset and noveau.modeset=0 single and together but   didn't help so I don't know what to do.   After investigating deeper by installing packages and try to boot i found out that the package which is causing the error is:  intel-microcode   when i purge and block this package with:  sudo apt-get purge intel-microcode sudo apt-mark hold intel-microcode   before upgrading wuth  sudo apt-get upgrade   my system is able to boot normal.  The problem i see is that as i understand it the package protects my intel cpu  Intel® Core™ i7 8565U 1.8 GHz   is vulnearable to meltdown attacks which get fixed by the package.  What can i do to fix the vulnearbility and also get my system to a bootable state?  Thanks for your help Vimu  Edit: I used the manual update technique mentioned at (in german):    and i used the files from the intel github repo:    with the following code mentioned in the tutorial to update the firmware microcode files  sudo cp intel-ucode/06-8e-09 /lib/firmware/intel-ucode/ echo 1 | sudo tee /sys/devices/system/cpu/microcode/reload   i overwrote the old microcode firmware with the newest available on the intel repo  it leada to a bootable system  will this be the best possible fix without upgrading the intel-microcode package provided by apt?


I am interested in the equivalent of US Census Bureau open data and its relevant Tigerline spatial data, albeit for China. In Canada, we also have data released by Statistics Canada along with cartographic reference boundaries.  I should make it clear that I am having trouble navigating the Chinese National Bureau of Statistics website, . It may be in fact that this website does not offer any free data, but it is located elsewhere?  Most importantly, I am looking for free/open data!

I'm looking for good free online sources of vector (shapefiles of cities, provinces, terrain etc) and raster data on China.   Are there any open repositories of this type of data?


Below you can find a basic C++ exercise with a for loop, the question is: what is the value of i after the loop runs. (Apparently, the value is 5.)  My question, on the 5th run (i=5), the value of a is 100, shouldn't the loop stop since the condition is a<100? Isn't the condition checked after a is multiplied with 10? (so after a is already 100)  If I check the value of a after the loop exit, it will be 1000. I am confused. Why does the loop not stop at 100?  #include <iostream> using namespace std; int main(void) {     float a;     int i = 0;     for(a = 0.01; a < 1e2; a *= 1e1)         ++i;      return 0; }

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


If you google for sprites sheets, you'll find a lot of sprites sheets. As far as I can remember, industrial patents (the terms may not be the right ones I'm sorry), after 20 years, fall into public domain. For music it's 100 years. How about sprites sheets?  I'd like to know if I can use some of them directly? If I spend a lot of time to take them, rework them as SVG and they will look modern but exactly the same as the original ones?  What is the general rule of thumb to follow to know if I can use a sprite sheet?

Possible Duplicate:          I was thinking about making a pacman clone, I know there is a similar question here  , but I know i can't use the original art from the game because it belongs to Namco, so if I design a character that has the shape of the slice circle it will look exactly like pacman, maybe if I use green instead of yellow? Also if the game plays like the original pacman, it is wrong?  I just want to make the game as a personal project and and publish it in my site without getting in trouble


Today, I typed augur.stackexchange.com wrongly and landed in a 404 page. However, the logo is weird and misaligned. I tried a few more times with a different url name and the result is the same.   OS: macOS High Sierra, browser: Chrome, Safari  OS: iOS, browser: Safari  OS: Windows 10, browser: Chrome, Firefox, Edge

A picture with freehand circle says more than 6-8 hundred words:    This happens for me on Safari, Firefox and Chrome on macOS 10.13.1 (latest browser versions, caches have been cleaned) but not on Chrome 62 on Windows 10:      Other users (see comments) report mixed results on similar browsers, and it looks like only devices with a high pixel density (e.g. Mac Retina screens) are affected, because the CSS rule below is applied only for devices with min--moz-device-pixel-ratio: 1.5:  header h1 {     background: transparent url('img/se-logo@2x.png?v=5663d7dbb7ab') no-repeat left top;     background-size: 223px 52px; }


When I transfer a folder FROM my Mac To a Windows machine by a flash memory, on the Windows system there are hidden files with the same names as the original files inside the folder. If I choose that Windows not to show the hidden files then they become invisible. When the folder contains a huge number of files then the scene is awkward and confusing and sometimes people think that there are malwares on my flash memory.  How can I get rid of these hidden files when I transfer folders from Mac to Windows?

When plugging a USB stick into a Mac, OS X creates a number of hidden files on the stick, including a Spotlight index and Trash folder.  Example from the terminal for a USB stick "Untitled":  $ ls -a /Volumes/Untitled .Spotlight-V100 .Trashes ._.Trashes .disk .fseventsd   It even does this on the xD memory card for my camera, so after having copied my pictures and deleted them from the card, the card is still full.  Is it possible to turn this off for USB and memory cards, so OS X either writes these files to the primary disk or doesn't write them at all?


addressStandardisationResponse.getStandardisedUKaddress().getAddressLine1()  addressStandardisationResponse : this is the response object i am getting after calling a service  which has the Standardised Uk address object filled . This works fine in my eclipse but when i exported it as runnable jar and running on another machine its giving null pointer exception at the same line

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 a data set that contains the following columns:  STUDY   NSUB   MEAN   MEDIAN   SD 1       10     1.5    1.7      0.4 2       20     1.5    1.55     0.3 3       7      2.6    3        0.5 4       15     3      3.01     0.1    And so on.  I want to judge whether the mean and median are significantly different at significance level (alpha=0.05). This is so I can make a decision whether the data from each study were come from a normal or log-normal distribution. I thought of doing a two sided t-test. My hypothesis would be:  NULL: H0: MEAN=MEDIAN  Alternative: HA: MEAN doesn't equal MEDIAN  The standard error of the mean (SEM) can be calculated as SD/NSUB where NSUB is the number of subjects. The degree of freedom would be NSUB-1. The scenario I am presenting here is as if I am comparing two means that have the same standard deviation (SD).  Is there a way where I can do this automatically in R for the set of data that I have and have the result added to the data as t.test.result being TRUE/FALSE (significantly different/insignificantly different). Something close to this:      STUDY   NSUB   MEAN   MEDIAN   SD     t.test.result     1       10     1.5    1.7      0.4    RESULT1?     2       20     1.5    1.55     0.3    RESULT2?     3       7      2.6    3        0.5    RESULT3?     4       15     3      3.01     0.1    RESULT4?

I have MEAN, MEDIAN, NSUB (number of subjects) and SD data coming from different studies and different populations. These are the only available information in the studies. My data set contains the following columns:  STUDY   NSUB   MEAN   MEDIAN   SD 1       10     1.5    1.7      0.4 2       20     1.5    1.55     0.3 3       7      2.6    3        0.5 4       15     3      3.01     0.1    And so on.  I want to judge whether the mean and median are significantly different at significance level (alpha=0.05). This is so I can make a decision whether the data from each study were come from a normal or log-normal distribution.   I thought of doing a two sided t-test. My hypothesis would be:  NULL: H0: MEAN=MEDIAN  Alternative: HA: MEAN doesn't equal MEDIAN  The standard error of the mean (SEM) can be calculated as SD/NSUB where NSUB is the number of subjects. The degree of freedom would be NSUB-1. The scenario I am presenting here is as if I am comparing two means that have the same standard deviation (SD).  Is there a way where I can apply this automatically in R for the set of data that I have and have the result added to the data as t.test.result being TRUE/FALSE (significantly different/insignificantly different). Something close to this:  STUDY   NSUB   MEAN   MEDIAN   SD     t.test.result 1       10     1.5    1.7      0.4    RESULT1? 2       20     1.5    1.55     0.3    RESULT2? 3       7      2.6    3        0.5    RESULT3? 4       15     3      3.01     0.1    RESULT4?   Also, is there a better way to test whether each study population was come from a normal or log-normal distribution?


ConverterFragment code: I am working on image to pdf converter app, And I am facing this problem. How to fix this? This code is not working in android 10 devices But working well in other android devices.     @Override     public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {         super.onActivityResult(requestCode, resultCode, data);         if (requestCode == 120 && resultCode ==RESULT_OK&&data!=null){             Uri slectImgUri = data.getData();              String [] filePath = {MediaStore.Images.Media.DATA};                          Cursor cursor = getActivity().getApplicationContext().getContentResolver().query(slectImgUri,filePath, null,null, null);             cursor.moveToFirst();              int columIndex = cursor.getColumnIndex(filePath[0]);             String myPath = cursor.getString(columIndex);              Bitmap bitmap = BitmapFactory.decodeFile(myPath);             imageView.setImageBitmap(bitmap);             PdfDocument pdfDocument = new PdfDocument();             PdfDocument.PageInfo pi = new PdfDocument.PageInfo.Builder(720, 1270,1).create();             PdfDocument.Page page = pdfDocument.startPage(pi);              Canvas canvas = page.getCanvas();             Paint paint = new Paint();             paint.setColor(Color.parseColor("#ffffff"));             canvas.drawPaint(paint);                bitmap = Bitmap.createScaledBitmap(bitmap, 720,1270, true);             paint.setColor(Color.BLUE);            canvas.drawBitmap(bitmap, 0, 0, new Paint());             pdfDocument.finishPage(page);              File root = new File(Environment.getExternalStorageDirectory(), "Pdf Converter");             if (!root.exists()){                 root.mkdir();             }                                   File file = new File(root, "my.pdf");                 try {                 FileOutputStream fileOutputStream = new FileOutputStream(file);                 pdfDocument.writeTo(fileOutputStream);             }catch (IOException e){                 e.printStackTrace();             }             pdfDocument.close();         }     } }


I've heard it so many times:     "At 0 K Fermi energy and Fermi level are the same."      "The Fermi level for an intrinsic semiconductor lies at the middle of   the band gap."   And the definition of the Fermi energy is      The highest level of energy up to which electrons are filled.   Now my confusion is if Fermi energy is an energy state filled by electron how can it (Fermi energy=Fermi level at 0K) lie in the band gap (gap means there is no energy state that can be occupied by electron)?

I have read and used the concept of  previously and this is simply an attempt on my side to better my understanding of it by asking myself various questions. I understand that the fermi distribution is defined as  $$f(E)=\frac{1}{1+e^{\frac{E-E_F}{kT}}},$$ hence the Fermi Energy is defined as $f(E_F)=0.5$.  However, this definition does not define the fermi level to be a constant value and I understand that it's a material property. For example in crystals, due to covalent or ionic bonds that constitute the monocrystalline material, the atomic wavefunctions which make up the atoms within the crystals, face degeneracy, and this leads to the formation of bands (very closely spaced states) within the crystal. Here the Fermi level is defined as the brim or the edge to which the electrons fill up these states at zero kelvin.   Obviously, since they are continuous bands (or a continuum of energy states with very little energy gaps between consecutive states), defining the Fermi level up to the last state within the band or the next unfilled state at zero kelvin would yield very little error, but what about semiconductors where the entire valence band is filled up until zero kelvin and then starts a considerable gap where the Fermi level resides, or individual atoms (for example an Si atom, where the difference between the 3p state and 4s states are considerable)?   How do we pin out a defined value of $E_F$ in those circumstances? Or even molecules like $C_{60}$ where we have discrete states. The difference between the HOMO and the LUMO levels is much more conspicuous in this case. How do we etch out a Fermi level value in these cases?


I am currently a student in a European university in the fourth year (first year of which is called "master").  On the Internet, it is said undergraduate students to refer to students in a bachelor.   But, what is the exact terminology? Do we say that a student involved in a master is a graduate student? Then how do we call someone who does have a master's degree (and involved or not in a Ph.D)?  My question may seem unclear but I try to understand the correct use of undergraduate, graduate,... in order to be able to introduce myself correctly and to understand at which level are my interlocutors.

Trying to figure out the difference between these. I've lost completely as different source/answers interpret it differently. Does anyone have clear understanding about what does undergraduate/graduate/post-graduate student mean in USA?  I've seen this nice timeline in  however answers are still controversial.  As well, trying to figure out who the hell am I - I have a Bachelor in Computer Science, Master in Computer Science and another Master in Business Information Systems. Is that graduate or post-graduate? Also, I'm not a student anymore.


How can I prove that if A has eigenvalues then determinant of A is the product of its eigenvalues?

Show that the determinant of a matrix $A$ is equal to the product of its eigenvalues $\lambda_i$.   So I'm having a tough time figuring this one out. I know that I have to work with the characteristic polynomial of the matrix $\det(A-\lambda I)$. But, when considering an $n \times n$ matrix, I do not know how to work out the proof. Should I just use the determinant formula for any $n \times n$ matrix? I'm guessing not, because that is quite complicated. Any insights would be great.


I have an array of objects. I am trying to filter some objects from the array and get a new array using the following.  [   {     "userId": 1,     "title": "title 1",     "body": "Body for user 1",     "address": {       "country": "Germany",       "state": "State1"     },     "phone": 1234   },   {     "userId": 2,     "title": "title 2",     "body": "Body for user 2",     "address": {       "country": "Canada",       "state": "State2"     },     "phone": 4321   } ]   How can i filter the array and get the new array without address and phone. Any help is appreciated. Thank you

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


Situation:  On her turn, Alice uses the  action.  She specifies the condition "a creature attacks me," and an action that would take her out of melee range (like teleporting away with ).  On Bob's next turn, he  Alice.  The attack he would take at the end of his charge meets the trigger conditions for Alice's readied action, so she teleports away.  What exactly happens?   Does Bob get to make his melee attack before Alice teleports? Does it matter whether Alice teleports somewhere that would have been within Bob's original charge range, versus somewhere he could not have charged in the first place? If Bob doesn't get to attack, does he still lose his entire full round action for charging?  Or has he only spent a move action if he never gets to attack?  What if he's already moved farther than he could have with a single move action (since you can charge twice your speed)? Would it matter if Alice had chosen a different trigger condition for her readied action, like "a creature comes within 20 feet of me?"

Can an  or a  interfere with another creature's action so that the creature, essentially, loses that action?  Example 1: Nadir the rogue and Peake the bugbear are engaged in battle. Peake takes a standard action to ready, picking the action Attack the potion and the trigger when Nadir drinks the potion. Nadir takes a standard action to drink the potion. Peake's trigger is pulled, and Peake provokes an attack of opportunity from Nadir (that misses) and attacks the potion, destroying it. However, Nadir didn't drink the potion. It was destroyed before he could drink it. Does Nadir lose his standard action trying to drink the nonexistent potion? Or can Nadir now take a different standard action?  Example 2: Peake takes a standard action to make a sunder attempt against Nadir's rapier. Peake doesn't have anything special to help with sunder attempts, so Peake provokes an attack of opportunity from Nadir by making a Sunder attempt. Nadir makes the attack of opportunity and opts to make a disarm attempt against Peake. Nadir doesn't have anything special to help with disarm attempts, so Nadir provokes an attack of opportunity from Peake by making a disarm attempt. Peake makes a normal attack of opportunity against Nadir, dealing damage to the rogue. Nadir's attack of opportunity disarm attempt succeeds, and Peake's weapon clatters to the floor. Does Peake make the sunder attempt as if he still wielded his weapon, everything happening simultaneously? Or does Peake's sunder attempt just not happen? Or must Peake continue with the sunder attempt despite the loss of his weapon? If so, can Peake opt to abort his sunder attempt now that he's disarmed? Or can Peake, upon losing his weapon, change his action?   NOTE:  Please indicate whether your answer is based on RAW rules or more RAI definition since I am looking for the RAW ruling here.  Thanks everyone Interesting thread.


I've installed bash on Ubuntu on Windows feature on Windows 10 and I want to change directory this path on my C:\ drive:  C:/wamp64/www    What should I do ?

I am a super newbie for Ubuntu and basically need Ubuntu for a Python package.  I would like to run a Python file in say e:/username/folder1/folder2/python.py. I tried every method online and the only reply is bash: cd./e: No such file or directory. I am not sure whether it is because of the bash windows or virtualenv.  When I use bash on Ubuntu on Windows, ls, it says VIRTUALENV_DIR. cd, it says /home/username. The cd .. etc changes the directory a little, but not another drive, nor the folder I would like it to find.


The objective function of Lasso is often presented by: $ f(\boldsymbol{b}) = \color{red}{\frac{1}{2}} (\boldsymbol{y} - \boldsymbol{Xb})^T (\boldsymbol{y} - \boldsymbol{Xb}) + \lambda ||\boldsymbol{b}||_1$  I understand that scaling the residual sum of squares by half doesn't affect the LASSO estimate. But why to write it like this? In "The Elements of Statistical Learning" (p. 93) , it's explained that scaling was done out of "convenience" without any further explanation.

I have a question about the elastic net penalty as implemented in glmnet in R compared to the original paper by Zou and Hastie (2005). In glmnet the penalty is listed as   $$ (1-\alpha)/2||\beta||_2^2+α||\beta||_1. $$  but in the paper it is  $$(1-\alpha)||\beta||_1 + \alpha||\beta||_2^2.  $$  Does anyone know where the factor $\frac12$ some from? (Never mind the fact that the $\alpha$'s were swapped between the two parameterisations.) In both cases the penalties are multiplied by $\lambda$, but what are the mathematical/technical arguments for not using a simple convex combination of the lasso and ridge penalties?


I'm using biblatex with biber backend and verbose-icomp preset. When citing in the text, I need the ibid-features, but mustn't use the compact features in the bibliography at the end.   Can I somehow remove this and let biblatex simply repeat itself for more books with the same author? This is especially a problem with internet sources, where no author is given. I have to use "k.A.", which is german short-form for "no author".  Here's what I've got:  \documentclass[a4paper,12pt]{scrreprt}  \usepackage[utf8]{inputenc} \usepackage[ngerman]{babel} \usepackage[T1]{fontenc} \usepackage[includefoot, footskip=6mm]{geometry} \usepackage[style=verbose-ibid,backend=biber]{biblatex} \usepackage{hyperref} \usepackage[autostyle=true,german=quotes]{csquotes} \usepackage{xpatch} \usepackage[onehalfspacing]{setspace} \usepackage{scrpage2} \usepackage{sectsty} \usepackage{titlesec}  \bibliography{literature} \begin{document}  Text-Sample1.\autocite{History:PGW} Text-Sample2.\autocite{AF:PGW} Text-Sample3.\autocite{Balt:Refugees}  \printbibliography  \end{document}   (I included all packages, because maybe something else is causing it and I'm just stupid and didn't noticed)  And the .bib-file:  @MISC{AF:PGW,   AUTHOR       = {{k.A.}},   TITLE        = "Activity 18. The Incubator Baby Incident. Reading18H-J",   NOTE         = "<\url{http://www.globaled.org/curriculum/cm18h.html}> (abgerufen 29.10.2014)" }  @MISC{MedienGleichschritt,   AUTHOR       = {{k.A.}},   TITLE        = "Der Zweite Golfkrieg. Medien im Gleichschritt",   NOTE         = "<\url{http://medien04.uni-trier.de/buwiki/index.php/Der_Zweite_Golfkrieg:_Medien_im_Gleichschritt}> (abgerufen 31.10.2014)" }  @MISC{Generation:ShieldStorm,   AUTHOR       = {{k.A.}},   TITLE        = "Desert Shield und Desert Storm",   NOTE         = "<\url{http://www.generationenprojekt.de/1991/Golfkrieg.html}> (abgerufen 30.10.2014)" }  @MISC{FAZ:HintergrundFlug,   AUTHOR       = {{k.A.}},   TITLE        = "Hintergrund. Flugverbotszonen",   NOTE         = "<\url{http://www.faz.net/aktuell/politik/irak-hintergrund-flugverbotszonen-114559.html}> (abgerufen 30.10.2014)" }  @MISC{Balt:Refugees,   AUTHOR       = {{k.A.}},   TITLE        = "Straggling refugees report electricity, water virtually gone in Iraq, Kuwait",   NOTE         = "<\url{http://articles.baltimoresun.com/1991-02-18/news/1991049028_1_kuwait-baghdad-refugees}> (abgerufen 29.10.2014)" }   So, with my code, it looks like this:    What I need is that it's not summed up, so "k.A." isn't written out one time, and the rest is ordered with these bulletpoints.  So that it looks like this:  k.A.: Activity 18. The Incubator Baby Incident. Reading18H-J. <http://www.globaled.org/curriculum/cm18h.html> (abgerufen 29.10.2014).  k.A.: Der Zweite Golfkrieg. Medien im Gleichschritt. <http://medien04.uni-trier.de/buwiki/index.php/Der_Zweite_Golfkrieg:_Medien_im_Gleichschritt (abgerufen 31.10.2014).  k.A.: Desert Shield und Desert Storm. <http://www.generationenprojekt.de/1991/Golfkrieg.html> (abgerufen 30.10.2014).  k.A.: Hintergrund. Flugverbotszonen. <http://www.faz.net/aktuell/politik/irak-hintergrund-flugverbotszonen-114559.html> (abgerufen 30.10.2014).  k.A.: Straggling refugees report electricity, water virtually gone in Iraq, Kuwait. <http://articles.baltimoresun.com/1991-02-18/news/1991049028_1_kuwait-baghdad-refugees> (abgerufen 29.10.2014).

I use biblatex with style=authoryear and when there are two references of the same author in the bibliography there is just a dash. How can I get the full name in the second entry too?


I'm trying to iterate through this json array :   [{     "date": "2018-02-21T12:53:00",     "name": "System date",     "ID_BBData": "none",     "TOKEN_BBData": "none",     "rawValue": 540916682 }, {     "date": "2018-02-21T12:53:00",     "name": "Temperature sensor 1",     "ID_BBData": "none",     "TOKEN_BBData": "none",     "rawValue": 11 }, {     "date": "2018-02-21T12:53:00",     "name": "Value week",     "ID_BBData": "none",     "TOKEN_BBData": "none",     "rawValue": 1810 }]   With this loop :  # print the keys and values for key in jsonObject:     value = jsonObject[key]     print("The key and value are ({}) = ({})".format(key, value))   Where jsonObject is the json above. The problem is that the json is enclosed by [] but there isn't any name to this array.  Any clue to iterate through this one ?  Thanks a lot !

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


Im curious, why does it not equals True in one python version and False in another and vise versa.    big_num_1   = 1000 big_num_2   = 1000 small_num_1 = 1 small_num_2 = 1  print(big_num_1 is big_num_2) # python2 output True; python3 output False print(small_num_1 is small_num_2) # python2 output False; python3 output True   funny thing is my sublime text editor in Python3 does output both as True, where in Terminal it outputs as stated above

Why does the following behave unexpectedly in Python?  >>> a = 256 >>> b = 256 >>> a is b True           # This is an expected result >>> a = 257 >>> b = 257 >>> a is b False          # What happened here? Why is this False? >>> 257 is 257 True           # Yet the literal numbers compare properly   I am using Python 2.5.2. Trying some different versions of Python, it appears that Python 2.3.3 shows the above behaviour between 99 and 100.  Based on the above, I can hypothesize that Python is internally implemented such that "small" integers are stored in a different way than larger integers and the is operator can tell the difference. Why the leaky abstraction? What is a better way of comparing two arbitrary objects to see whether they are the same when I don't know in advance whether they are numbers or not?


I got an account from my professor for our universities CUDA server for running some tests.  I am connecting via ssh over terminal. The thing is, as I close the terminal the server also seems to kill the running script. As I reconnect it has stopped.   No it is not possible that the script already terminated since those test runs should take a few hours even on those machine..  Can anybody help me here?  OS: Linux cuda01 3.13-1-amd64 #1 SMP Debian 3.13.7-1 (2014-03-25) x86_64 GNU/Linux

XBMC occasionally crashes on my media server.  It's a pain to bring down the media server because I have to manually restart a number of services each time.  I'd like to be ablle to start XBMC from an SSH session and have it continue to run after I disconnect.  How can this be achieved?


In Python IDLE, is there a way to delete variables with names starting with certain character(s) from memory, equivalent to Matlab's clear t* that removes all variables with names starting with t from the memory?

A friend asked me last week how to enumerate or list all variables within a program/function/etc. for the purposes of debugging (essentially getting a snapshot of everything so you can see what variables are set to, or if they are set at all). I looked around a bit and found a relatively good way for Python:   #!/usr/bin/python                                                                                foo1 = "Hello world" foo2 = "bar" foo3 = {"1":"a",         "2":"b"} foo4 = "1+1"  for name in dir():     myvalue = eval(name)     print name, "is", type(name), "and is equal to ", myvalue   which will output something like:   __builtins__ is <type 'str'> and is equal to  <module '__builtin__' (built-in)> __doc__ is <type 'str'> and is equal to  None __file__ is <type 'str'> and is equal to  ./foo.py __name__ is <type 'str'> and is equal to  __main__ foo1 is <type 'str'> and is equal to  Hello world foo2 is <type 'str'> and is equal to  bar foo3 is <type 'str'> and is equal to  {'1': 'a', '2': 'b'} foo4 is <type 'str'> and is equal to  1+1   I have so far found a partial way in PHP (courtesy of ) but it only lists all variables and their types, not the contents:   <?php // create a few variables $bar = 'foo'; $foo ='bar'; // create a new array object $arrayObj = new ArrayObject(get_defined_vars()); // loop over the array object and echo variables and values for($iterator = $arrayObj->getIterator(); $iterator->valid(); $iterator->next())         {         echo $iterator->key() . ' => ' . $iterator->current() . '<br />';         } ?>   So I put it to you: how do you list all variables and their contents in your favorite language?    Edit by : I propose this question follows the spirit of a little "". If you do not agree, just edit and remove the tag and the link.


I want to implement robust line fitting over a set of $n$ points $(x_i,y_i)$ by means of the Least Absolute Deviation method, which minimizes the sum  $$\sum_{i=1}^n |y_i-a-bx_i|.$$  As described for instance in Numerical Recipes, you can find the optimal slope, by canceling the function  $$s(b):=\sum_{i=1}^n x_i\text{ sign}(y_i-bx_i-\text{med}_k(y_k-bx_k))$$  where $b$ is the unknown. To find the change of sign, a dichotomic search is - appropriately - recommended. Anyway, the starting search interval as well as the termination accuracy are based on purely statistical arguments (using a $\chi^2$ test).  I was wondering if there is an analytical way to derive safe bounds for the slopes (i.e. values such that $s(b)$ is guaranteed positive or negative), as well as the termination criterion (minimum of $|s(b)|$). (In fact, I don't even know if the function is monotonic.)  Note that my question is not related to the simplex approach for this problem.

Here is the least absolute deviation problem under concerned: $ \underset{\textbf{w}}{\arg\min} L(w)=\sum_{i=1}^{n}|y_{i}-\textbf{w}^T\textbf{x}|$. I know it can be rearranged as LP problem in following way:  $\min \sum_{i=1}^{n}u_{i}$  $u_i \geq \textbf{x}^T\textbf{w}- y_{i} \; i = 1,\ldots,n$  $u_i \geq -\left(\textbf{x}^T\textbf{w}-y_{i}\right) \; i = 1,\ldots,n$  But I have no idea to solve it step by step, as I am a newbie to LP. Do you have any idea? Thanks in advance!  EDIT:  Here is the latest stage I have reached at this problem. I am trying to solve the problem following this :  Step 1: Formulating it to a standard form  $\min Z=\sum_{i=1}^{n}u_{i}$  $ \textbf{x}^T\textbf{w} -u_i+s_1=y_{i} \; i = 1,\ldots,n$  $ \textbf{x}^T\textbf{w} +u_i+s_2=-y_{i} \; i = 1,\ldots,n$  subject to $s_1 \ge 0; s_2\ge 0; u_i \ge 0 \ i=1,...,n$  Step 2: Construct a initial tableau             |      |    0      |    1   |  0  |   0   |   0      basic var | coef |  $p_0$    |  $u_i$ |  W  | $s_1$ | $s_2$        $s_1$| 0    |  $y_i$    |   -1   |  x  |   1   |   0       $s_2 | 0    |  $-y_i$   |    1   |  x  |   0   |   1       z    |      |    0      |    -1  |  0  |   0   |   0   Step 3: Choose basic variables  $u_i$ is chosen as input base variable. Here comes a problem. When choosing the output base variable, it is obvious $y_i/-1=-y_i/1=-y_i$. According to the note, if $y_i\ge0$, the problem has unbounded solution.   I am totally lost here. I wonder if there is anything wrong and how should I continue the following steps.


I have encountered this error today that when I run sudo apt update in 18.04, It gives this output:  Get:1 http://pk.archive.ubuntu.com/ubuntu bionic InRelease [253 B] Err:1 http://pk.archive.ubuntu.com/ubuntu bionic InRelease                                          Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?) Get:2 http://pk.archive.ubuntu.com/ubuntu bionic-updates InRelease [261 B]                        Err:2 http://pk.archive.ubuntu.com/ubuntu bionic-updates InRelease                                  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?) Get:3 http://pk.archive.ubuntu.com/ubuntu bionic-backports InRelease [263 B]                      Err:3 http://pk.archive.ubuntu.com/ubuntu bionic-backports InRelease                                Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?) Hit:4 http://security.ubuntu.com/ubuntu bionic-security InRelease                                 Ign:5 http://repo.vivaldi.com/stable/deb stable InRelease                                         Hit:6 http://repo.vivaldi.com/stable/deb stable Release Reading package lists... Done N: See apt-secure(8) manpage for repository creation and user configuration details. N: Updating from such a repository can't be done securely, and is therefore disabled by default. E: The repository 'http://pk.archive.ubuntu.com/ubuntu bionic InRelease' is not signed. E: Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/bionic/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?) E: Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?) E: The repository 'http://pk.archive.ubuntu.com/ubuntu bionic-updates InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: Failed to fetch http://pk.archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?) E: The repository 'http://pk.archive.ubuntu.com/ubuntu bionic-backports InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.   How to fix this?

So I am on my college network which requires me to sign in to the browser before I start using the internet. I do so succesfully but on a clean install of Ubuntu, when I try to do sudo apt update, I get the following output:  $ sudo apt update Get:1 http://in.archive.ubuntu.com/ubuntu xenial InRelease [2,847 B] Err:1 http://in.archive.ubuntu.com/ubuntu xenial InRelease                     Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?) Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [2,854 B]     Err:2 http://security.ubuntu.com/ubuntu xenial-security InRelease              ... Get:3 http://in.archive.ubuntu.com/ubuntu xenial-updates InRelease [2,855 B]    Err:3 http://in.archive.ubuntu.com/ubuntu xenial-updates InRelease ... Get:4 http://in.archive.ubuntu.com/ubuntu xenial-backports InRelease [2,857 B] Err:4 http://in.archive.ubuntu.com/ubuntu xenial-backports InRelease Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?) Fetched 11.4 kB in 0s (18.3 kB/s) Reading package lists... Done E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/xenial/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?) ... E: Some index files failed to download. They have been ignored, or old ones used instead.   But when I do wget http://in.archive.ubuntu.com/ubuntu/dists/xenial/InRelease, I get this output success:  2017-04-01 05:34:57  http://in.archive.ubuntu.com/ubuntu/dists/xenial/InRelease Resolving in.archive.ubuntu.com (in.archive.ubuntu.com)... 91.189.88.162, 91.189.88.149, 91.189.88.152, ... Connecting to in.archive.ubuntu.com (in.archive.ubuntu.com)|91.189.88.162|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 246846 (241K) Saving to: ‘InRelease.3’  InRelease.3         100%[===================>] 241.06K   110KB/s    in 2.2s      2017-04-01 05:35:00 (110 KB/s) - ‘InRelease.3’ saved [246846/246846]   Clearly I have internet access from my browser and on wget but when I do sudo apt (or apt-get) update I get this error.  PS: This question is not similar to other threads as their solutions do not seem to work on mine        As I have found out, this problem is happening only to me, not others on the college network. Despite setting up the network according to instructions, this still happens. Any more help would be appreciated  EDIT: So as it turns out, 50% of us in the college are facing this issue, while 50% aren't despite having no issues with the hardware and sudo apt update before the last week. Thanks to @David Foerster for helping me throughout all this time.  As it stands, the issue has been raised to our college's networking department :)


I have come across this question and I am just not able to find a good answer to it.  In Java, I can create a thread in 2 ways:  1.Implementing Runnable Interface  public class RunnableInstance implements Runnable {     public void run() {         // functionality goes here     } }   A new thread created as follows :   public class Client {     public static void main(String[] args) {         RunnableInstance runnableInstance = new RunnableInstance();         Thread thread1 = new Thread(runnableInstance);         thread1.start();     } }   Advantages of using this method :   The Client class can inherit any other class. The Client class can implement any other interface. Creating a thread this way actually separated the job(RunnableInstance) and  the runner(Client). If the functionality written in run() is not required to be run as a separate thread, I can directly use it without creating a thread.   2.Extending the Thread class :  public class ThreadInstance extends Thread {     ThreadInstance() {         super("myThread");     }     public static void main(String[] args) {         new ThreadInstance().start();     } }   As evident from advantages of using Runnable :   This class cannot inherit any more classes, as it already extends Thread. It mixes job and runner in one class. For these reasons a programmer may prefer to use Runnable.    The Thread class itself implements Runnable interface and provide an empty implementation of run().   ## Questions ##   Why is it done inside Thread class, when we already have a cleaner way to define a job(functionality of a thread)?   I found some answers like  a. When we are sure about a thing only being executed asynchronously, we can follow this approach in that case.  b. We can define the job in RunnableInstance's run() and then execute asynchronously by attaching the Runnable instance to a thread.   OR  We can execute the code inside run() normally by calling run() method wherever needed.  In this case, if I know I have to execute a method normally, why would I implement Runnable and then define my functionality inside run() ? I can do it anywhere.  What actually is the reason behind providing these 2 ways of creating threads in Java?  People might find it duplicate, but I did not find a convincing answer. Why 2 ways, when Runnable is the cleaner way? And why would I implement Runnable and write my code in run() ,if I don't have to use it with a thread. What apart from the stuff described above actually let them provide these 2 ways.

From what time I've spent with threads in Java, I've found these two ways to write threads:  With implements Runnable:  public class MyRunnable implements Runnable {     public void run() {         //Code     } } //Started with a "new Thread(new MyRunnable()).start()" call   Or, with extends Thread:  public class MyThread extends Thread {     public MyThread() {         super("MyThread");     }     public void run() {         //Code     } } //Started with a "new MyThread().start()" call   Is there any significant difference in these two blocks of code ?


I need to find the number of non negative solutions of equation  $\underbrace{a+b+c+ \dotsb }_{n \text{ variables}}=N$ where $a\le b \le c \le d \le \dotsb $.  What I have tried is:     Suppose $S(n)$ gives us the required solution.      For $n=1$, only one solution $(a=N)$, $S(1)=1$      for $n=2$, $a+b=N$. $a$ can take either $0$ or non zero.        if a takes 0 then total solutions = $S(1)=1$;        otherwise, a can take values from 1 to N/2 so total floor(N/2) possible solutions.        Hence $S(2)=S(1)+N/2 = 1 + N/2$      for $n=3, a+b+c=N$, a can take either 0 or non zero        if a takes 0 then total solutions = $S(2)$        otherwise , a can take values from 1 to N/3 so total floor(N/3) possible solutions.        Hence $S(3)= S(2) + N/3 = 1 + N/2 + N/3$      Similarly for $n=n$,        $S(n)=1+ N/2 + N/3 + N/4 + ....... + N/n$   Can anyone tell whether the above formula is right or wrong?

I'm taking a course on Analytics Combinatorics (based on Flajolet's and Sedwick's book), and i'm trying to solve note I.16 of the book, that is, verify:  $$ P^{(\leq l, \{1,\ldots,k\})}(z) = \frac{(1-z)\ldots(1-z^{k+l})}{((1-z)\ldots(1-z^{k}))\cdot((1-z)\ldots(1-z^{l}))} $$ Where the left hand means the generating function of the class of partitions with at most k parts, each $ \leq l $ Truth is I already tried by multiple ways, but with no success:  First, looking at the formula I guessed that: $$ P^{(\leq l, \{1,\ldots,k\})} \times P^{(\{1,\ldots,k +l\})} \tilde = P^{(<l)} \times P^{(\{1,\ldots,k\})} $$ but i couldn't understand why.  Secondly, using the same reasoning as to find that p(k,l,n) = p(l,k-1,n) + p(l-1,k,n -k), I thought that:  $$ P^{(\leq l, \{1,\ldots,k\})}  \tilde = P^{(\leq l, \{1,\ldots,k-1\})} +\mathcal Z^k \times P^{(\leq l - 1, \{1,\ldots,k\})}  $$  but i could't solve the recurrence.  and so on...  As you can see, I'm quite confused... can someone give a tip that put me in my way?  thank you in advanced!


Please consider the following four sentences.  1 - He finished school  2 - He has finished school  3 - He had finished school  4 - He did finish school  Do all of these sentences mean the same or not? If there are any differences, could you explain?  I'm not asking which one is more appropriate to express that someone completed his last school year. Instead, I'm just using these sentences as examples in order to understand the correct usage of each past tense form in English. Thank you.  Edit: Not a duplicate. My question considers specific past tense forms, while the suggested question deals with other unrelated tenses and aspects.

Non-native speakers often get confused about what the various tenses  and aspects mean in English. With input from some of the folk here I've put together a diagram that I hope will provide some clarity on the matter.  I offer it as the first answer to this question. Consider it a living document. Input is welcome, and good suggestions will be  incorporated into the diagram.    Nota bene: What this is not is a discussion of whether there are  more than two tenses in English. , to which this question is not intended to supply arguments one way or the other.  Here, the aim is to provide an overview of what constructions English-speaking people use for conveying information about actions referring to past, present, and future, and to provide it first and foremost to precisely the people who are likely to use "tense" as a catch-all term in their search, rather than to linguists who know better.  Breaking News There is now an excellent ELU blog article titled  . It is highly recommended reading.


It's quite annoying when I need to add a screenshot of a bug on the mobile site. I first post my question and leave placeholders for the images. Then I have to go to the full site, tap edit, remove the placeholder text, upload the image in its place, then save.  Can we add this feature? iOS natively supports uploading images now since iOS 5. I don't know about Android, but I'm pretty sure it does.

With the release of iOS 6, the most commonly used mobile browser now supports standard generic image upload buttons. This is actually really handy.  I can take screenshots on my phone or iPad, and use them to answer questions about apps made to run on those devices (or ) to answer questions. Until the release of iOS 6 however, the only way to use these images in my answer was to either sync them over to my computer, and then answer from a desktop, or use a specialized app to upload the images, such as PicUp or DropBox, and then manually write out the markdown code.  After iOS 6, the Image Upload button works just fine, if I switch to viewing the full site from my iDevice, rather than the mobile view. I can upload images directly, and the markdown is handled for me. It's awesome, except for the fact that the non-mobile site is decidedly non-awesome on the small screen of my phone.  Which brings me to my feature request: Add the Image Upload button (and other markdown shortcuts, as deemed worthwhile) to the ask/answer editors on the mobile version of SE sites.


I am making a new custom module. and i have 1 content type called city management(city-management). I want to override theme node.tpl.php file with node--city-management.tpl.php in my custom module.  Is it possible?

Basically it was  but I'll reword it, as I don't want to define a new theme (reason was already given).  What I want to do: in my module I have a file node--attach.tpl.php which is a modifed version of node.tpl.php. Now I want that, if view_mode = 'attach' then this file is used. Also, theme should be allowed to override it with its own node--attach.tpl.php in theme folder.


I'd like to create a picture like the one with TikZ:    I've already created the electrical part using circuitikz. I'd like to add the part on the right (the motor's shaft with arrows), but don't know how to start, actually. Is there a way to draw 3D shapes, maybe? Or should I draw circles and rotate them?  \documentclass{article} \usepackage{tikz} \usetikzlibrary{intersections} \usepackage{circuitikz} \usepackage{siunitx}  \begin{document}  \begin{figure} \centering \begin{circuitikz} \draw (0,0) to [V, v=$v(t)$, *-*] (0,2)      to [R, l=$R_d$] (2,2)     to [L, l=$L_d$] (4,2)     to [V, v<=$e(t)$] (4,0) to [generic] (4,2) -- (4,0) -- (0,0); \end{circuitikz} \end{figure}  \end{document}   What I have now:   What I'm still missing:


Let R be a ring. Prove that if $x^2=x$ for each $x \in R$, then R is a commutative ring.   Ok, so I'm just looking for some confirmation that I'm doing this correctly.  If we suppose $x,y \in R$ Let's consider $(x+y)^2$,  Then $(x+y)^2 = x^2+xy+yx+y^2$ but $x^2=x$ and $y^2=y$   We can also see that for all $x \in R, x=-x$  So, $(x+y)^2= x+xy+yx+y$  Also, by our given  $(x+y)^2=(x+y)$ so   $x+y =x+xy+yx+y$, Solving this algebraicly gives us $-yx=xy$ but since $(-yx)^2=(yx)$,   We have, $yx=xy$, Therefore R is commutative. Does that about wrap it up?

Let $R$ be a ring and for $x,y\!\in\!R$, define the commutator as $[x,y]:=xy-yx$. An $r\!\in\!R$ is idempotent iff $r^2=r$.  How can one prove, that if every commutator is idempotent, then the whole ring is commutative, i.e. all commutators are zero?


Before answering, please see  on   resource recommendation questions. Please try to give substantial answers that detail the   style, content, and prerequisites of the book or paper (or other resource). Explain what the   resource is like as much as you can; that way the reader can decide which one is most suited   for them rather than blindly relying on the suggestions of others. Answers which just suggest a book   or paper will be deleted.        And please, note that any answers to this are community-owned, which means that they are subject to  heavy editing, especially to make them comply with the book policy, to avoid deletion.         I am really getting confused. This term, I am sitting for a QFT 1 lecture and it is what I consider really hard for a physics student! But this is not my problem. My problem is that other than Weinberg, there is absolutely no QFT literature for a modern course.  Our literature recommendation for our course is first of all, Peskin and Schroeder. That is good, but not very detailed. The the other is Itzykson Zuber.  Another problem is that while our course is very excellent which also means that  the script is really good (you would  have to have listened to  very good lecture series on Quantum Mechanics (for the math).), to understand read "between the lines",  like representation theory, what is spin, etc., one needs to read Weinberg.   But the style of writing is very strenuous for me.  And thanks to a bad theoretical quantum mechanics lecture, I still really don't know what a spin is! I only know so far that this has something to do with a representation of the Lorentz algebra.    So, do you know some good resources or books which find a good way between the physics and the mathematics?

There's a fairly standard two or three-semester curriculum for introductory quantum field theory, which covers topics such as:   classical field theory background canonical quantization, path integrals the Dirac field quantum electrodynamics computing $S$-matrix elements in perturbation theory, decay rates, cross sections renormalization at one loop Yang-Mills theory spontaneous symmetry breaking the Standard Model   What is a good, complete and comprehensive book that covers topics such as these?


I have the following tex file :  \documentclass[12pt,a4paper,twoside]{report} \usepackage{mathtools} \usepackage{amsmath} \usepackage{amsthm} \usepackage{listings} \usepackage{color} \definecolor{dkgreen}{rgb}{0,0.6,0} \definecolor{gray}{rgb}{0.5,0.5,0.5} \definecolor{mauve}{rgb}{0.58,0,0.82} \lstset{   language=Java,   aboveskip=3mm,   belowskip=3mm,   showstringspaces=false,   columns=flexible,   ={\small\ttfamily},   numbers=none,   numberstyle=\tiny\color{gray},   =\color{blue},   commentstyle=\color{dkgreen},   stringstyle=\color{mauve},   breaklines=true,   breakatwhitespace=true,   tabsize=3 } \begin{document} \begin{lstlisting}[caption={Third median in terms of $\theta$ and $\phi$},label={lst:f4}] p, t= var('p t')  a=(-2*p*t^2-p^2*t)+(2*t*p-p^2)+t+1  b=(p*t^2+2*p^2*t)+(2*t*p-t^2)-p+1  c=(p*t^2-p^2*t)+(t^2+2*t*p+p^2)+t-p #3 sides (a,b,c) in terms of theta and phi expand(2*a^2+2*b^2-c^2) #third median equation, m=1/2*sqrt(2*a^2+2*b^2-c^2)         9*p^4*t^2 + 18*p^3*t^3 + 9*p^2*t^4 + 6*p^4*t + 18*p^3*t^2 - 18*p^2*t^3 -          6*p*t^4 + p^4 - 22*p^3*t + 6*p^2*t^2 - 22*p*t^3 + t^4 + 2*p^3 - 6*p^2*t          + 6*p*t^2 - 2*t^3 - 3*p^2 + 18*p*t - 3*t^2 - 4*p + 4*t + 4 \end{lstlisting}  \end{document}   I want to change the font of the listings to be smaller, probably \tiny. Can anyone guide me how to do it.

I have a java lstlisting and it is too big and does not mach a single page.  Is there any way to specify font for specific listing, not all listings in document?


I need to connect  using jsoup library, Am recieving java.net.SocketException: Connection reset exception Here is my code =============================================================================     public static String webServiceCall(String hostUrl, Map<String, String> header, String payload, Method method) {     int retries = 1;     String htmlContent = "";     Response responses = null;     do {         try {             Thread.sleep(1000);         } catch (InterruptedException e) {             LoggerUtil.severe(logger, e.getMessage());         }         try {             Connection conn = Jsoup.connect(hostUrl).header("Accept-Encoding", "gzip, deflate");             if (!(header == null || header.isEmpty())) {                 for (Object key : header.keySet()) {                     conn.header((String) key, header.get(key));                 }             }             if (!Strings.isNullOrEmpty(payload)) {                 conn.requestBody(payload);             }             if (method == null) {                 method = Method.GET;             }             conn.ignoreContentType(true).followRedirects(true).maxBodySize(0).timeout(0)                     .userAgent("Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 "                             + "(KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36")                     .method(method);             responses = conn.execute();         } catch (IOException e) {             LoggerUtil.severe(logger, e.getMessage());         }         retries++;     } while ((responses == null || responses.statusCode() != SUCCESS_HTTP_STATUS) && retries <= TOTAL_RETRY);      if (responses != null && responses.statusCode() == SUCCESS_HTTP_STATUS) {         htmlContent = responses.body();     }     return htmlContent; }

I am getting the following error trying to read from a socket. I'm doing a readInt() on that InputStream, and I am getting this error. Perusing the documentation this suggests that the client part of the connection closed the connection. In this scenario, I am the server.  I have access to the client log files and it is not closing the connection, and in fact its log files suggest I am closing the connection. So does anybody have an idea why this is happening? What else to check for? Does this arise when there are local resources that are perhaps reaching thresholds?    I do note that I have the following line:  socket.setSoTimeout(10000);   just prior to the readInt(). There is a reason for this (long story), but just curious, are there circumstances under which this might lead to the indicated error? I have the server running in my IDE, and I happened to leave my IDE stuck on a breakpoint, and I then noticed the exact same errors begin appearing in my own logs in my IDE.  Anyway, just mentioning it, hopefully not a red herring. :-(


I am a non-EU citizen with Czech residence permit (pink card).  I am applying for a visa (UK) and the visa center (in Czech Republic) will hold my passport during the process, so I won't have my passport for some time. At the same time, I have travel to Switzerland for business purposes. My Czech permit allows to do it, since Switzerland is in the Schengen area, but I won't have my passport with me.  What will happen if I am caught by border security (or Swiss police) without my passport (but with a valid permit card)? I will also have my internal national passport (but it is not officially recognized, afaik) and a scan of my international passport with me.  In my experience, nobody have ever checked my passport on Prague -> Switzerland flights, but I want to know what are the consequences if a random check happens.

I have some travel plans to go from Netherlands to France by car. I possess Dutch residence permit, but I am non-EU citizen. The problem is that I might need to submit my passport to get visa to another country I plan to go to later. So I have: residence permit and photocopy of my passport. Is it    legal to cross borders by car with this set of documents what are possible fines and other repercussions if police or other authorities ask for my documents in France or Belgium?


$f$ is continuous in $I$  Show that if $f$ satisfies the condition   $f(\frac{x+y}{2})<\frac{1}{2}(f(x)+f(y))$ so it's convex    What I have to show here is $f(k_1y_1+k_2y_2+..k_ny_n)<k_1f(y_1)+k_2f(y_2)+...k_nf(y_n)$ such that $k_1+k_2+...+k_n=1$  The problem  is I don't know how to find  those coefficients $k$.

Given that $$f\left(\frac{x+y}{2}\right)\leqslant \frac{f(x)+f(y)}{2}~,$$ how can I show that $f$ is convex. Thanks.      Edit: I'm sorry for all the confusion. $f$ is assumed to be continuous on an interval $(a,b)$.


I want to get an array length,  I try to use by function, But in the function, I get array length is worry, the operation result is 2, Who can help me do this.  #include <stdio.h> #define GET_ARRAY_LEN(array,len){len = (sizeof(array) / sizeof(array[0]));}  void print_arry(int *nums){         int i;         int len;          GET_ARRAY_LEN(nums, len);         printf("%d\n",len);          for (i=0; i<len; i++)                 printf ("%d ", nums[i]); }  int main() {         int nums[]={ 2,7,3,11,15 };         int target = 9;          print_arry(nums);         return 0; }   But this is right, I don't where it is wrong.  #include <stdio.h>  #define GET_ARRAY_LEN(array,len){len = (sizeof(array) / sizeof(array[0]));}   int main() {         int nums[]={ 2,7,3,11,15 };         int target = 9;         int len;          GET_ARRAY_LEN(nums, len);         printf("%d\n",len);          return 0; }

First off, here is some code:  int main()  {     int days[] = {1,2,3,4,5};     int *ptr = days;     printf("%u\n", sizeof(days));     printf("%u\n", sizeof(ptr));      return 0; }   Is there a way to find out the size of the array that ptr is pointing to (instead of just giving its size, which is four bytes on a 32-bit system)?


Error while moving old database out of the way. App stream cache update failed

I have created a USB stick with a persistent Ubuntu 16.04 (release version). I tried a couple of ways, using Startup Disk Creator and MultiSystem, but I get the same end result.  When I boot into the USB and do 'apt-get update', all is well.  When I try 'apt-get dist-upgrade' I get:     ** (appstreamcli:2761): CRITICAL **: Error while moving old database out of the way. AppStream cache update failed.   The only reference to this error message I can find is  but would appear to be fixed, at least fixed by the time the release version of Ubuntu 16.04.  Aside: I want to test Unity8, which includes installing software.  I don't have a spare computer, so I thought a persistent USB would do the trick.  Any takers?


Could someone write the proof of this thing with a reference?

Let $A$ be an $n\times n$ positive definite matrix. Show that there exists a unique positive definite matrix $B$ such that $B^2=A$.  I do know the existence. But what about the uniqueness? Would you help me out? Thank you.


Let's say we have an object with this format:  var thisIsObject= {    'Cow' : 'Moo',    'Cat' : 'Meow',    'Dog' : 'Bark' };   I wanted to do a function that removes by key:  removeFromObjectByKey('Cow');

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


When I run PATH=abc:$PATH echo $PATH, I get the old value for PATH, not abc:PATH  Why is this? How can I get abc:$PATH?  Edit: How about for PATH=/mybin:$PATH which python if /mybin has a python executable?

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


What are the popular theories regarding how our blood divided into 4 groups. Particularly I'm interested in whether this was originally linked to disease.  Thanks for your answers, useful articles and further reading would also appreciated.

What is the explanation of people having blood types from an evolutionary perspective?


MADEUP, but with a real account. I'm making a Mini game for my friends realm called IceBoat,which is pretty self explanatory, but there is an essential command that I can't find anywhere! I tried modifying a command to do what I want, and here is my modified command:   testfor @e {type!=RootVehicle:{Entity:{id:Boat}}}    and it gives me this error:      The entered UUID provided is in an invalid format.   With slight variations of this command, (I mean changing location of type and brackets) I get the same error. So, how can I create a testfor to see if anyone is NOT in a boat?

I know that you can use exclamation marks in Minecraft commands to check for an entity that does not have a specific tag. For example, you can use /kill @e[type=!Player] to kill all entities except for the player. I have, however, encountered two problems with using exclamation marks that I can't find a solution for.  For my first problem, I've set up a series of command blocks to summon shootable fireballs above the player’s head when a certain item is being held;  /scoreboard players add @a Fireball 1 {SelectedItem:{tag:{display:{Name:"Summon Fireball"}}}} /execute @a[score_Fireball_min=1,score_Fireball=1] ~ ~ ~ /summon Fireball ~ ~2.5 ~ {direction:[0.0,0.0,0.0]} /scoreboard players set @a Fireball 0   I used a comparator and a redstone torch so that the last command would activate when the first command would deactivate, that is, when the player is not holding the item.  The problem is, that when I move far away from the setup, the redstone stops working, leaving me unable to summon any new fireballs. Instead, I'm trying to use a command block to check when anything except for item is being held;  /scoreboard players set @a Fireball 0 {SelectedItem:{tag:{display:{Name:!"Summon Fireball"}}}}   I’ve either put it at the wrong place, or you simply can’t use exclamation marks in NBT tags. Could someone tell me where I should put the exclamation mark, or in the latter case, how I can check for anything except for a specific item?  Further, I’ve tried using exclamation marks to set the score of all entities, including the ones with a blank score, but except for the ones with a score of 2 or higher, to 0;  /scoreboard players set @e[score_arrows_min!=2] Arrows 0 /scoreboard players set @a Arrows 1 {SelectedItem:{tag:{display:{Name:"Rain of Arrows"}}}} /scoreboard players set @e[type=Arrow] Arrows 2 {inGround:1b}   The code does change the scores of entities without scores to 0, but it doesn’t exclude the arrows with a score of 2. Could anyone tell me what I’m doing wrong here?


The War Magic feature of the Eldritch Knight states (PHB p. 75):     when you use your action to cast a cantrip [or at level 18+ a spell], you can make one weapon attack as a bonus action.   I'm quite confused: if I take that bonus action will the extra attack apply to it?

What exactly is the difference between Attack action and attack?  It seems each time a question regarding this pops up, there's always somebody arguing they are not different. I feel there should be a concise and indisputable answer that shows how they are, in fact, different.


I want to show the Fibonacci numbers are cyclic in mod n. I have tried some small values for n and I can see this is the same. In terms of a proof, I'm thinking of using the pigeonhole principle of pair of adjacent Fibonacci numbers but I think I'm going in the wrong direction.....any help will be appreciated.  Many Thanks.

About this Fibonacci sequence, is it true that the remainders when divided by three repeat along with the sequence like this:  Fibonacci sequence:  $1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946\cdots$  Remainder when divided by $3$ sequence:  $1, 1, 2, 0, 2, 2, 01, 00, 01, 01, 02, 000, 002, 002, 001, 000, 0001, 0001, 0002, 0000, 00002\cdots$  I made each one the same number of digits to align them to avoid confusion.  Is it true that it happens every eight numbers?  If so, how and why does this happen?


I want an app that displays browser inside an app, but I get this error:     FATAL EXCEPTION: main                                                      Process: com.example.name.app, PID: 11672                                                      java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.name.app/com.example.name.app.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.Window$Callback android.view.Window.getCallback()' on a null object reference   Manifest.xml  <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"     package="com.example.name.app">     <uses-permission android:name="android.permission.INTERNET"/>     <application         android:allowBackup="true"         android:icon="@drawable/icon"         android:label="@string/app_name"         android:roundIcon="@drawable/icon"         android:supportsRtl="true"         android:theme="@style/AppTheme">         <activity android:name=".MainActivity">             <intent-filter>                 <action android:name="android.intent.action.MAIN" />                  <category android:name="android.intent.category.LAUNCHER" />             </intent-filter>         </activity>     </application>    </manifest>   activity_main.xml  <?xml version="1.0" encoding="utf-8"?>  <LinearLayout     xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:orientation="vertical">      <Button         android:id="@+id/button"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_gravity="center_horizontal"         android:text="Click"/>      <WebView         xmlns:android="http://schemas.android.com/apk/res/android"         android:id="@+id/webView"         android:layout_width="fill_parent"         android:layout_height="match_parent" />  </LinearLayout>   MainActivity.java  package com.example.name.app;  import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.Button;  public class MainActivity extends AppCompatActivity {      Button button = (Button) findViewById(R.id.button);     WebView browser = (WebView) findViewById(R.id.webView);     String url = "http://www.google.com";      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);          button.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                  browser.setWebViewClient(new WebViewClient());                 browser.getSettings().setLoadsImagesAutomatically(true);                 browser.getSettings().setJavaScriptEnabled(true);                 browser.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);                 browser.loadUrl(url);             }         });     } }   What is wrong? Thanks!

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 seen many instances were athletes have taken a free-kick inside the penalty area. Its like a usual free-kick with the wall trying to block the shot however taken inside the penalty area. In what situation does a referee decide to give this decision?

If a player commits a direct free kick offence in their own penalty area, this results in a penalty kick instead of a direct free kick. However, if the offence is an indirect free kick offence, it remains as an indirect free kick .  What offences result in an indirect free kick?


I personally received a 1099-Misc for a settlement income with a creditor that was incorrectly reporting information on my credit report.  The settlement read in part:     Bank agrees to pay Customer $xxx in full and final settlement of the parties' differences that have arisen in connection with account number yyy and the suit.   The settlement check shall be made payable to the Customer's attorney of record, zzz.  No representations regarding the tax consequences of this settlement have been made by either party.   All of the settlement funds went to my attorney.  Where/how do I show this reported income and the fact that I got none of it on my personal tax return?  Should I have issued a 1099 to my attorney for the same amount?  Do 1099 requirements apply to individuals paying their attorney for a personal matter?    This is not a dup of  because that question is for a business receiving the 1099 and this one is for an indiviual.  Also, that question does not address where to report the income and where to report the deduction.

I am getting a settlement from a business over a suit but most of the settlement will go to the attorney to cover their fees incurred on contingency.  If the 1099 reports the full settlement, will I have to pay taxes on the full amount or if not, how do I tell the IRS it is not all taxable. Otherwise, I could easily end up owing more in taxes than I get for my small portion.


This is MSSQL Server 2008 R2 running on Windows Server 2008 Enterprise. Service Instance is running as 'Network Service'.  I have two logins, UserA and UserB. UserA is a sysadmin. UserB is a db_owner for database 'Demo'.  I login as UserA and can take a backup of Demo, no questions asked.   I login as UserB and try to take a backup of Demo. When clicking the 'Add' button to add a destination, and then the 'browse' button, I get the following error message:    G:\Backups  Cannot access the specified path or file on the server. Verify that you have the necessary security privileges and that the path or file exists.    If you know that the service account can access a specific file, type in the full path for the file in the File Name control in the Locate dialog box.    My question is:  After reading that folder access is based on the User Account that the SQL instance is running under (Network Service), why can the db_owner not browse to the specified folder?   Is there something I am missing?   Thanks

I am using SSMS. I have about 5 logins. For a particular login I have all server roles other than sysadmin. It is a sql login (not windows authentication). In user roles it has all permission for almost all databases. For some database it has only datareader. Now when I try to take backup of database using SSMS and when try to select backup destination by clicking button I get the following error:  "C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\Backup Cannot access the specified path or file on the server. Verify that you have the necessary security privileges and that the path or file exists. If you know that the service account can access a specific file, type in the full path for the file in the File Name control in the Locate dialog box."  Even though I have db_owner and all permissions I am getting this error. But if I select the path manually in the file name field then it allows to take backup without any error. So why does it happen? I want this user to take backup without these error messages. (But I can't give sysadmin for the user). How can I solve it? I already some article stating that use SQL query and sqlcmd to take backup. But I want it to work using SSMS.


I heard people say meet her as  [miːdər] in an American movie.  Is it ok to pronounce it like that, or am I mishearing?

Are "traitor" and "trader" distinguishable when spoken with any English accent?  My English-speaking friends seem to pronounce them exactly the same way.


I'm new in blender. I want to know if anyone has the same problem and can tell me how to fix it, if it's possible. (I'm using fedora as OS)

How do I put a backdrop behind the model that I am creating so that I can compare the picture to the model while editing?


I seem to be unable to write a tilde in a \lstinline in a footnote.  If you uncomment the only commented line in my minimal working example, you'll see what I mean:  \documentclass{article}  \usepackage{listings}  \begin{document} This works: \begin{lstlisting} ~/path/to/file \end{lstlisting}  And this works: \lstinline{~/path/to/file}  And this works:\footnote{\lstinline{/path/to/file}}  %But this does \emph{not} work:\footnote{\lstinline{~/path/to/file}} \end{document}   edit: I'm not sure if the answer to this was quite covered in the linked post (listings in footnotes) because that question related to the listings environment, not the lstinline macro.

This code won't compile:  \documentclass{article} \usepackage{listings} \lstset{     language=C,     basicstyle=\small }  \begin{document} lorem ipsum\footnote{% \begin{lstlisting} // some C code or whatever... printf("Blah blah\n"); \end{lstlisting}} \end{document}   It says Illegal parameter number in definition of \lst@insertargs. I know listings is really picky about where it goes, but there must be a way to cram a listing into a footnote, right?  (This is a MWE and my tex files are a bit more complex; my actual error is Paragraph ended before \lst@next was complete. but they are hopefully related; I couldn't get this error with the MWE.)


I've been stuck with problem for quite a while: Prove that: $$ \sum_{i = 0}^k {n \choose i} = \sum_{i = 0}^k {n - 1 - i \choose k - i}2^i $$ for $k$ in $\{0,\dots,n-1\}$. I would love to get a hint how to solve it using combinatorial interpretation.

Give a combinatorial proof for this identity for non-negative integer $k$ and $n$ such that $0 \leq k < n$   $$\sum_{j=0}^{k} \binom{n}{j} = \sum_{j=0}^k \binom{n-1-j}{k-j}2^j$$   My attempt: I tried to reduce this identity. Since $k,n$ are nonnegative integer and $k<n$ then I can change the upper limit into  $$\sum_{j=0}^{n-1} \binom{n}{j} =2^n-1 \quad \text{and} \quad \sum_{j=0}^{n-1} \binom{n-1-j}{n-1-j}2^j = \sum_{j=0}^{n-1} 2^j ~.$$  So, I just need to show $$\sum_{j=0}^{n-1} 2^j =2^n-1 $$ using combinatorial proof. Am I right? I really need helps


how do I create programs for ubuntu, with the same ease that I have with visual studio express on windows?

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. See  for more information.   This is a community wiki for IDEs available on Ubuntu. Please post one IDE per answer (including more than just a screenshot or a link, please at least put a short description).  In your answer, tell us what the IDE is for (which language(s) or if it is RAD capable).


On my MacBook Pro, the Storage section on about my Mac shows that I have 730.21GB free out of 999.7GB, but it also says that my apps take up 545.33GB.    Why is this happening? How much storage do I actually have available?

On my MacBook Pro Retina late 2014 running OS X Yosemite, there's something weird going on.  If i look at the storage tab in the "About my Mac" menu, I use only 67 gigabytes of storage but it says 151 gigabytes are used on apps alone.   Maybe this screenshot is a better explanation:    Is someone else experiencing this problem?


Let $X_1, \ldots, X_n$ iid from a $Unif(0,\theta)$ distribution, and let $X_{(n)}$ be the $n$th order statistic, that is, the maximum of $X_1, \ldots, X_n$. I would like to find $E(X_1|X_{(n)})$. I have that when $X_{(n)}=t$, $X_1=t$ with probability $\frac{1}{n}$, and that with probability $\frac{n-1}{n}$, $X_1$ appears to be uniform on $(0,t)$ (not sure why). I am unable to translate these into a functional form. It seems like:  \begin{align} E(X_1|X_{(n)}=t) &= E(X_1=t|X_{(n)}=t)P(X_1=t)+E(X_1\in (0,t)|X_{(n)}=t)P(X_1\in (0,t))\\ &= t\cdot\frac{1}{n}+ \int_0^{t}x\ f(x|X_{(n)}=t)dx \end{align}  But I am unsure why it is that with probability $\frac{n-1}{n}$, $X_1$ appears to be uniform on $(0,t)$ and if the integral approach even makes sense?

Suppose $X_1,\ldots,X_n$ are a random sample of $U(-\theta,\theta)$ with $\theta>0$. How can find $$ E\left(|X_1|\ \big|\max |X_i| \right) $$ that $1\leq i\leq n$?


Please read entirely the question.  I've decided to write this here because I've seen about 15 questions of the same issue:      Ubuntu not showing up screen, all is black.   Well, let's start in the beggining and finish in the end. The Utopic Unicorn update has caused a lot of issues until now, and more is to come. The black screen is caused by, in real, graphics issues. It has nothing to do with X11, nor X Server, nor GRUB2. And why? Here is the answer.  The Utopic update has changed the way how things work, mainly graphical and performance. And as well, the update has changed the package channels. You don't use anymore the word trusty in sources.list, you use utopic. And updating packages consume time. So, as AMD and Intel have specific dependencies, some of them have not been released for 14.10, for example the linux-headers-3.13.0-37 package. And fglrx, for example, needs it for running well. And as there is no version of it for Utopic, catalyst starts to tumble itself down taking with it the whole system.  But luckily, there is an escape:  You need to purge your driver's package from the system and restore X.Org's original settings.  So, to do that, open the tty1 terminal ( Ctrl+Alt+F1 ) and do the following:  If you are using nvidia:  sudo apt-get purge NVidia-*  If you are using Intel:  sudo apt-get install --reinstall xserver-xorg-video-intel  And, if you are using AMD:  sudo apt-get purge fglrx-*  The system itself will feel something is missing, and so will fix itself. Then, go on and type:  reboot  Hope that it helped. And sorry if I made any mistake, if this was the case, be sure to hit the Edit button and fix it.

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


What is deadlock in programming Object Oriented ?  I had knew deadlock in transaction of Database Systems. But in programming I'm not clear.  I want to know when deadlock occur and how to resolve it.  Thanks!

When writing multi-threaded applications, one of the most common problems experienced are deadlocks.    My questions to the community are:   What is a deadlock?  How do you detect them?  Do you handle them?   And finally, how do you prevent them from occurring?


We know that wands choose their owners as we saw Harry buy his wand at Ollivander's in HP1.  We also know that wands can be made for their owners as we saw in HP7: Ollivander makes a wand for Voldemort as-well as Wormtail having a new one created for him.  But if the wand chooses the owner, how can you guarantee that the new wand will choose you, if you ask someone to create it for you?    As a clarification, this is not the same as  since that question is asking specifically about the Elder Wand, which is known to behave differently to other wands. Also, that's asking about the whole "winning over" scenario, whereas this question asks about a wand being built for the intended owner.

We know that wands choose their owners, more so than the other way around. We also know that to master the Elder Wand, you need to win it, or defeat the current owner.  From the Harry Potter books so far, pretty much everyone who has defeated the previous owner has become the new master.  My question is:  If someone defeats the owner of the Elder Wand, could the Elder Wand still not choose its new owner?  Could it have seen Voldemort as somehow not worthy or something?


I'm thinking this is easy, but I'm having a hard time manifesting. I have a list of values, e.g. @bob @sarah @kelly;john @denver_colorado @james12;kellybelly I want the list to be: @bob @sarah @kelly @john @denver_colorado @james12 @kellybelly essentially, splitting a line after ";" and add @ as a prefix to all values

I wrote a Table Valued Function in Microsoft SQL Server 2008 to take a comma delimited column in a database to spit out separate rows for each value.  Ex: "one,two,three,four" would return a new table with only one column containing the following values:  one two three four   Does this code look error prone to you guys? When I test it with   SELECT * FROM utvf_Split('one,two,three,four',',')    it just runs forever and never returns anything. This is getting really disheartening especially since there are no built in split functions on MSSQL server (WHY WHY WHY?!) and all the similar functions I've found on the web are absolute trash or simply irrelevant to what I'm trying to do.  Here is the function:  USE *myDBname* GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER FUNCTION [dbo].[utvf_SPlit] (@String VARCHAR(MAX), @delimiter CHAR)  RETURNS @SplitValues TABLE (     Asset_ID VARCHAR(MAX) NOT NULL )  AS BEGIN             DECLARE @FoundIndex INT             DECLARE @ReturnValue VARCHAR(MAX)              SET @FoundIndex = CHARINDEX(@delimiter, @String)              WHILE (@FoundIndex <> 0)             BEGIN                   DECLARE @NextFoundIndex INT                   SET @NextFoundIndex = CHARINDEX(@delimiter, @String, @FoundIndex+1)                   SET @ReturnValue = SUBSTRING(@String, @FoundIndex,@NextFoundIndex-@FoundIndex)                   SET @FoundIndex = CHARINDEX(@delimiter, @String)                   INSERT @SplitValues (Asset_ID) VALUES (@ReturnValue)             END              RETURN END


Problem  I came across  that must have been asked before. While searching for the same question on SO, I stumbled upon , which asks essentially the same thing. So far, so good.  I couldn't bring it over me to flag a well-formulated and high quality question as a duplicate of a question that is clearly inferior in terms of clarity, even though the core of the question is equivalent.   Options  Now there are three options, in my opinion:   Not flagging and ignoring the dupe Flagging the new question as a dupe Thinking of the quality of SO, it may even make sense to flag the initial question as a duplicate of the new question!    All three options seem unfitting and wrong for different reasons. Please note that this question is not about whether the two questions in my example are actually regarded as dupes or not.   My question is: What would be the appropriate behaviour to handle a situation like this?  Edit  This question does not focus on how to handle dupes, that arise as a result of the original question being outdated and/or requires new, updated answers (this was dealt with in this ). The issue here is purely about the quality of the original post.

I have seen this many times, a question is being asked because a previous, duplicate question was asked and answered a few years ago and has no longer relevant answers.  The  is to edit the old question, or add new answers to it, but it is not always happening.  I was wondering, should I still mark it as duplicate and vote to close it? Or just leave it as is?


I buy an app source code where every thing is ok but when I uploading any video I am getting NullPointerException. Normally My app is a social media app where user upload short videos for entertainment. Stack trace:   java.lang.NullPointerException: Attempt to invoke virtual method 'byte[] java.lang.String.getBytes(java.nio.charset.Charset)' on a null object reference     at com.squareup.okhttp.RequestBody.create(RequestBody.java:55)     at com.squareup.okhttp.MultipartBuilder.addFormDataPart(MultipartBuilder.java:169)     at com.deshbhakt.app.ApiClasses.MultiPartRequest.addString(MultiPartRequest.java:44)     at com.deshbhakt.app.Services.Upload_Service$1.run(Upload_Service.java:146)     at java.lang.Thread.run(Thread.java:764)  this is RequestBody.java from 46-58 public static RequestBody create(MediaType contentType, String content) {     Charset charset = Util.UTF_8;     if (contentType != null) {       charset = contentType.charset();       if (charset == null) {         charset = Util.UTF_8;         contentType = MediaType.parse(contentType + "; charset=utf-8");       }     }     byte[] bytes = content.getBytes(charset);     return create(contentType, bytes);   }  this is MultipartBuilder.java from 166-170   /** Add a form data part to the body. */   public MultipartBuilder addFormDataPart(String name, String value) {     return addFormDataPart(name, null, RequestBody.create(null, value));   }  this is MultiPartRequest.java from 43-45   public void addString(String name, String value) {         this.builder.addFormDataPart(name, value);     }  this is Upload_Service.java from 146-153  request.addString("user_id", Variables.user_id);                         request.addString("sound_id", Variables.Selected_sound_id);                         request.addString("description", description);                         request.addString("privacy_type", privacy_type);                         request.addString("allow_comments", allow_comment);                         request.addString("allow_duet", allow_duet);                         request.addString("hashtags_json", hashtags_json);                         request.addString("users_json", users_json);

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?


This edit was approved:  .  However, bolding a few occurences of "github" and "SELinux", and changing "I have to" to "I've to"  seems like a very poor edit indeed.  The editor has had 131 edit suggestions approved, and 56 edit suggestions rejected, and it seems to me a good number of those approved should probably have been rejected  (  )  I could roll this edit back, but I don't know if the edit review link will still work at this point, and I'm not yet sure of the guidelines around that.  My question is this:  Is it possible to flag individual reviews for attention so that our bored and underworked moderators can send the reviewers a helpful message about editing, and possibly give them a temporary break from suggested edit reviews?  Of course, I'm new to hitting the suggested edit reviews (I generally stay in the close vote list) - I may be wrong about the validity of the edit.  If that's the case please let me know in no uncertain terms.

Obviously, this suggested edit should never have been approved. Because it's very, very minor.  Is it acceptable for me to "rollback" this edit? Does the suggested editor lose the +2 rep when I roll it back? Should I comment on one of his questions, explaining not to make too minor edits like this?  Is there anything I should do to notify the reviewers that approved  too minor suggested edit?


At the moment I am storing some data into an output stream like so  std::ostringstream oss; std::string fileData;  for(int i = 0; i < 4; i++) {     oss << i;     fileData += oss.str(); }   now the output is this  1 1 2 1 2 3 1 2 3 4   How can I clear all the data inside my oss variable so this doesn't happen?   P.S. I know I could just declare a new outputstream every time but that seems quite extreme.

I've tried several things already,  std::stringstream m; m.empty(); m.clear();   both of which don't work.


Currently, we are provided with a PNG image, 208x58 pixels.    That's pretty small. Please can you make it higher quality? I'm thinking double the size in each direction - so it's similar in height to a banner advertisement. This would make it around 4x as valuable.  Unlike the , I request to keep the PNG flair, just improve its quality. This is because I believe it's much harder for the team to implement (I mean they've had nearly 7 years) and a bigger PNG is enough - if not perfect.

A few weeks ago, Flairs were sent to the client as HTML data (in one way or another). Now they are simpler to use—a single PNG is generated and sent to the client. This is a good improvement, except for one tiny detail: Flairs contain a lot of text and straight lines, and these elements aren't appropriate to store as a bitmapped image. Particularly text looks bad without the subpixel antialiasing appropriate for the output screen. In addition, whereas the old flairs looked good when you zoomed the web page, the new ones, being bitmapped images, do not scale at all. Hence, the flairs looked and worked much better before, but are easier to use now.  Now, I am not an expert on web design, but I think I have found a solution: generate SVG (vector) images instead of PNG (bitmap) images! These can be embedded on a web page like any PNG image:     instead of     Hence, the simplicity is conserved. But SVG images are vector images, so text is sent as text, and rendered using the subpixel antialiasing appropriate at the client (and you can select and copy it as normal text). Also, being a vector image, it scales perfectly.  Of course I am aware that many browsers still doesn't support SVG images, but as far as I know, the latest versions of all major browsers do (or will very shortly (IE9)) support SVG. Another problem is that it might not be entirely trivial to embed the bitmap "Gravatar" in a SVG image, but to the best of my knowledge, it is possible (and not even too difficult).  I suggest that you start to support both PNG and SVG flairs. This way, webmasters may choose to support old browers at the cost of quality, or they may not. They may even check the browser name and version (either server-side or using JavaScript) and choose SVG if possible, and use PNG only as fallback for old browsers.


I have a Windows 10 PC with 8GB of RAM that frequently generates "low memory" warnings, even when barely any applications are open. Example:    Can anyone explain what is going on, and what can be done to fix this?  , but how would you fix this?

I have been having an issue where, if my system is up for a few days without being rebooted I will start getting warnings saying "Close programs to prevent information loss" and then a dialogue suggesting I close programs, which I can either cancel or hit "close programs" and Windows will force close some or all of the applications listed in the dialog.  I open task manager, and see that only around 30% of my memory is currently being used:    When I open resource monitor to see how much committed memory is being used by specific applications, I still see relatively low memory usage:    I've had this problem for awhile and have struggled to find a solution. I've investigated causes like a driver leak by using poolmon, but never saw anything in poolmon that matched what others have described as red flags for a driver memory leak. What makes me particularly confused is why Win10 is telling me to close applications when I only have 33% of system memory being used.


I was watching a TV show, and this girl said:       I just wish that once, I'd bring a guy home that they actually liked.     Shouldn't it be like this? :     I just wish that once, I'd bring a guy home that they actually like.     Didn't she mean 'I wish they'd like my future boyfriends'?  I think this is OK:     I just wish that once, I brought a guy home that they actually liked.     But the way she said it sounds strange to me.

I'm describing a situation that happened in the past. To explain it, I want to use a description that is both true now and true when the situation happened.  Specifically, I want something like:     She touched me where my neck met my collarbone.   Since my neck is still attached to my collarbone (thankfully), I'm wondering if I shouldn't use the present tense here instead:     She touched me where my neck meets my collarbone.   Which is preferable, and why?