I was trying to install Ubuntu 13.04 alongside with my Windows 8.1. But after the completion of installation, I logged in 1 time only. When I was logged in again to Ubuntu, the display was only blinking.  So I tried to install Ubuntu again from CD but the problem remains. Then I tried to install it through Windows but the same. Then I tried to delete Ubuntu partition through Windows, now my Windows as well as Ubuntu is not working. How can I fix this with Ubuntu live booting?  EDIT: Now I can access Windows but Ubuntu is just blinking as before. Can I uninstall Ubuntu?

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


So the description of  states:     Enchant non land permanent. Enchanted permanent can't attack or block,   and it's activated abilities can't be activated.   The card doesn't use the word target so basically I was confused on whether or not I could use it on a creature with shroud. Any clarification is welcome and appreciated.   P.S. If it can enchant a creature with shroud using this method, could I also use other cards that do not specifically target a creature with shroud?

Note: this is intended to be a canonical question about whether or not a spell or ability targets so there are multiple sub-questions.   Can Hexproof or Shroud save my creature from ? What about a  that was cast for it's Overload cost? Does shroud prevent me from using the Monstrosity ability of a creature, or from giving it more counters with Proliferate? Can I cast an Aura Enchantment on one of my creatures with Shroud, or an opponent's creature with Hexproof? Or can I use the Equip ability to attach an equipment to one of my creatures with Shroud? Will 's ability trigger when my opponent plays ? And will I have to sacrifice my  if my opponent casts ? Will Shroud or Hexproof prevent an opponent from choosing me with 's ability? Will Hexproof keep one of my creatures from being affected by ? If an Aura or Equipment is attached to a creature with Hexproof, does the Hexproof protect the attached permanent?


Find $17^{341}\mod 5$.  I know this has to be solved using the Chinese Theorem or Fermat's Little Theorem, $341$ is a Poulet number, and the result equals $2$. But how can I prove this? I'm fairly new to modular arithmetic.

I've read about Fermat's little theorem and generally how congruence works. But I can't figure out how to work out these two:   $13^{100} \bmod 7$ $7^{100} \bmod 13$   I've also heard of this formula:  $$a \equiv b\pmod n \Rightarrow a^k \equiv b^k \pmod n $$  But I don't see how exactly to use that here, because from $13^1 \bmod 7$ I get 6, and $13^2 \bmod 7$ is 1. I'm unclear as to which one to raise to the kth power here (I'm assuming k = 100?)  Any hints or pointers in the right direction would be great.


How should I do this proof? should induction be used?  So far I have thought about using:  $\sum_{k=0}^n {n \choose k} = 2^n$ and $\sum_{k=0}^n k^2 = \frac{1}{6}n(n+1)(2n+1)$   but I cant break up that summation so I'm not sure how to proceed.

I found crazy (for me at least) induction example, in fact it just would be nice to prove. (Even have problems with starting) Any hints are highly valued: $$0^2\binom{n}{0}+1^2\binom{n}{1}+2^2\binom{n}{2}+\cdots+n^2\binom{n}{n}=n(1+n)2^{n-2} $$


Why isn't there a number before the section name?  \documentclass[a4paper,10pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[english]{babel} \usepackage{csquotes}  \usepackage{titlesec} \titleformat{\section}{\large\scshape}{\thesection}{1em}{}  \begin{document}  \renewcommand\abstractname{\normalfont\large\textsc{Abstract}} \begin{abstract} Some abstract \end{abstract}  \renewcommand\contentsname{\centering\normalfont\large\textsc{Contents}} \tableofcontents  \section{Some section}  \end{document}

After reinstalling TeXLive distribution (install-tl-20160318, Ubuntu 14.04), a issue occurs with the updated version of the titlesec package: the section numbering is lost.  What could it be missing? Is there a modification I have not seen?  Below is a MWE comparison of the two versions. The prevtitlesec package is a reinstall of the previous version (2011/12/15).  \documentclass{book} \usepackage[margin=2cm,a4paper]{geometry} %\usepackage{prevtitlesec}% 2011/12/15 version \usepackage{titlesec}% 2016/03/15 version \usepackage{lipsum}  \begin{document}  \chapter{Title of the first chapter} \lipsum[1] \section{A test section} \lipsum[4] \subsection{A test subsection} \lipsum[4] \subsection{A test subsection} \lipsum[4]  \end{document}   titlesec package 2011/12/15:    titlesec package 2016/03/15:


I'm making a program that consists of a bunch of placable/moveable items in space, and each item has an invisible circle encompassing its size. The items can be parented to other items, so for each parent item I also want the smallest possible outer circle that encompasses the extent of all its children. For example, if I had a parent item at (0,0) with size 1, and a child at (4, 0) also size 1, the outermost points would be (-1, 0) and (5, 0) therefore the outer circle would be at (2, 0) with radius 6.  My question is: what's the most efficient way for the program get this circle if it has several arbitrarily placed/sized circles to look at, most of which are probably irrelevant? So essentially how do I get the 2 or 3 outermost points and circumscribe them?  Also, this project is actually in a 3D world so really it would all be spheres... I just figure it'd be easier to start with circles and add a dimension once I understand the simpler version

I have a set of circles on a plane, each defined by their X, Y and R parameters. I need to find the smallest enclosing circle over all of them. Essentially, this is a variation of , except my circles can have different radii. What would be a fast (linear time) algorithm of doing that?  I'm posting it here instead of StackOverflow/programmers.se because I think this is a predominantly math problem, rather than programming. Please correct me if I'm wrong.  My math is OK-ish, but I'm struggling to come up with a good solution. The best I've come up with is to replace each circle with 8 points, and then calculate the SEC for those with the help of . It will not be exact, but should be an acceptable approximation for my purposes. However I wonder if there is a better and more precise algorithm?


In the images I'm trying to add a loop cut vertically through the rectangles, however, it only allows me to add a horizontal loop cut.  The mesh is only a plane and I am using the mirror modifier.  I'm not sure if the mirror modifier is somehow messing it up or if it's something else.  Also, the mesh is part of a larger mesh that I have hidden, not sure if that helps or not either.  I've already tried removing any duplicate vertices and such but to no avail. Can someone tell me what I'm doing wrong?

Alright so I've seen some postings about loop cuts and done some research. I am very new to blender and modeling overall. I am trying to loop cut this concrete barrier. Now I'm following a tutorial and kind of did my own thing in some areas. I cleaned it up following some instructions in another answer here on stack exchange.  I can't for the life of me figure out why I can loop cut around the whole bottom:   ...but not the whole middle:   I see this marked as answered by another question. That question refers to ngons and inside faces. Now once again I'm totally new to this. I looked on the inside. I don't believe I have inside faces or any ngons by the terms I've read online in my research.  Here is a wireframe picture and the inside view:     Maybe I'm missing something the answers on other posts are saying. If so and you know what it is I'd be very appreciative of what it is.


I have NVIDIA GTX 970 GPU, which is pretty new chip and it is not recognized by nouveau driver shipped with Ubuntu 14.10, hence I am stuck on 1024x768 resolution on Full HD monitor - not so good. There is no proprietary driver in Additional Drivers setting, so I decided to download and install driver directly from NVIDIA web site.  I tried to install NVIDIA driver exactly like I did ten years ago on Slackware:  $ sudo ./NVIDIA-Linux-x86_64-343.36.run  but it says, that it must be run without X Server running. Ctrl+Alt+F1 (or combination with any other F? key) takes me to the black screen and only thing I can do then is to return back to X by Alt+F7.  My next step was to tune GRUB to boot into pure text mode. I edited /etc/default/grub to have:  GRUB_CMDLINE_LINUX_DEFAULT="text"  After  $ sudo update-grub  and reboot, system hangs during boot on some video mode stuff.  My question is: how to run a pure VGA text mode? No famebuffer, no fancy splash, just pure ASCII 80x24 text? I need it only once, just to install NVIDIA driver and have 1920x1080 screen resolution.  PS  I also tried to install NVIDIA driver from Ubuntu repository:  $ sudo apt-get install nvidia-331  No success, it made my system unusable with graphics totally messed up.

I just ordered the Nvidia GTX card. I have a dilemma, though. Should I keep using the driver which is available in "additional drivers" in Ubuntu, or should I install the driver from the Nvidia site?  So which driver is the best for me?


I know there are some questions like this but mine is different. I know how to get the favicon to show up but it only shows up on the home page not the other pages. How do I get it to show up on every page I create. I have tried putting another Favicon (same one) just a copy of it into the folder that holds the html pages but that did not work.  Using:  Html  apache  bravenet  Website:

What is currently the best way to get a favicon to display in all browsers that currently support it?  Please include:   Which image formats are supported by which browsers. Which lines are needed in what places for the various browsers.


I’m a foreign student and I lost my passport. I’d like to travel from Chicago to New York by plane. Can I use a copy of my passport or my student card as an ID?  I checked the TSA website already.

I'm travelling within the US and am a British citizen. Can I travel without my passport and just show my UK driver's license instead?


Answers are not ordered by 1) accepted 2) upvotes anymore. Why not? It is a pain to have to scroll through 0 upvote answers only to find one with 40 upvotes at the bottom of the page.

Today, each question has answers in an unsorted way. Before this I saw the answers of each question in sorted order by their upvotes. Is this a setting? If so, how do I change it? And if not, are you seeing same as me?


So when I type: grep --recTab I get: grep --recursive but (and that's a big but) I have defined a few aliases: alias grep-blue='GREP_COLOR='\''1;34'\'' grep --color=always' alias grep-red='GREP_COLOR='\''1;31'\'' grep --color=always' alias grep-yellow='GREP_COLOR='\''1;33'\'' grep --color=always'  which allow me to do funky stuff like this: gsettings list-recursively | grep-yellow settings | grep-blue power | grep-red true  which gives me:  However in my aliases, there is no prediction for the command-line parameters, so typing: grep-blue --recTab doesn't do anything! and I had a look at:   but those seem to be a bit outdated and I can't seem to figure it out, because I did find that /usr/share/bash-completion contains: # makeinfo and texi2dvi are defined elsewhere. complete -F _longopt a2ps awk base64 bash bc bison cat colordiff cp csplit \     cut date df diff dir du enscript env expand fmt fold gperf \     grep grub head indent irb ld ldd less ln ls m4 md5sum mkdir mkfifo mknod \  so I added grep-blue grep-cyan grep-green grep-grey grep-magenta grep-red grep-white grep-yellow \ next to grep but that doesn't seem to help neither! What am I missing here?

When I open up the command line and type in git, I get a bunch of completions for arguments of git, like add, commit, merge, and so on.  How do I add this kind of completion to my own apps?  So far, I've been able to specify the first level of completion like this:  $ complete -W "asd asdf" ./test.py  $ ./test.py asd asd asdf   But it tries to keep going after that:  $ ./test.py asdf asd asd asdf   I've tried setting a completion for the second level by running complete -W "lol" "./test.py asd", but that doesn't work.  What's the proper way to set these up? And once I've figured out all of the commands, where do I have to put them? Running a big list of these commands in .bashrc, every time a terminal is opened, doesn't seem too efficient (plus I don't want to mess with users' files if I don't have to).


I have read that controlling FDR is less stringent than controlling FWER, such as in :     FDR controlling procedures exert a less stringent control over false discovery compared to familywise error rate (FWER) procedures (such as the Bonferroni correction). This increases power at the cost of increasing the rate of type I errors, i.e., rejecting the null hypothesis of no effect when it should be accepted.   But I was wondering how it is shown to be true mathematically?  Is there some relation between FDR and FWER?

Regarding multiple comparisons, could someone please explain me why the power of false discovery rate (FDR) is greater than the power of family-wise error rate (FWER)?


Hope my question is clear enough. I’m just curious.

Suppose, random moves are made to solve Rubik's cube. A move consists of a $90$-degree-rotation of some side. The starting position is also random.   What is $E(X)$, where $X$ is the number of moves until the cube is solved ? How many moves must be made, that the probability that the cube is solved, exceeds $99$% ?


I have just read  as follows:     One of the biggest reasons for the confusion between the two [principal component analysis (PCA) and factor analysis (FA)] has to do with the fact that one of the factor extraction methods in Factor Analysis is called "method of principal components". However, it's one thing to use PCA and another thing to use the method of principal components in FA. The names may be similar, but there are significant differences. The former is an independent analytical method while the latter is merely a tool for factor extraction"   Can anybody explain a little more about this, especially about PCA and method of principal components in FA?

SPSS offers several methods of factor extraction:   Principal components (which isn't factor analysis at all) Unweighted least squares Generalized least squares Maximum Likelihood Principal Axis Alpha factoring Image factoring   Ignoring the first method, which isn't factor analysis (but  principal component analysis, PCA), which of these methods is "the best"? What are the relative advantages of the different methods? And basically, how would I choose which one to use?  Additional question: should one obtain similar results from all 6 methods?


From Feeblemind's spell description,     On a failed save, the creature’s Intelligence and Charisma scores become 1.   The spell's effects are listed as "Instantaneous", which leads me to my question:  Does this prevent the effects of items like Ioun Stones which add to the score, or Headbands of Intellect which set the score to 19, from going into effect, or does the spell have an ongoing magic that keeps the stats at 1 until the save is made or the Feeblemind is removed through on of the listed spells?  If it does not prevent the intelligence/charisma stats from being raised through items, are the listed effects (being unable to speak/cast spells) caused by the low scores or a separate part of the spell's effects?

The description of the  says:     Your Intelligence score is 19 while you wear this headband. It has no   effect on you if your Intelligence is already 19 or higher.   The  spell description says that my Intelligence score becomes 1 on a failed save:     [...] On a failed save, the creature's Intelligence and Charisma   scores become 1. The creature can't cast spells, activate magic items,   understand language, or communicate in any intelligible way. [...]   If I am affected by Feeblemind and I am wearing the Headband of Intellect, would I have an Intelligence score of 19 or 1?   Also, what about the other effects like not being able to cast, activate magic items, understand languages or communicate in any way? Those seem Intelligence-related, but are mentioned additionally to the reduction.   If the Intelligence score becomes 19, are the other effects still active?


I do not make sense of the following argument. We want to determine the ring of integers of $\mathbb{Q}(\sqrt{d})$. An element $\alpha = a + b \sqrt{d}$ is an algebraic integer iff its minimal polynomial over $\mathbb{Q}$  has coefficients in $\mathbb  Z$. Expanding the minimal polynomial, this translates into the two conditions $$2a \in \mathbb Z \quad \text{and} \quad a^2 - b^2 d \in \mathbb Z.$$ How do we get the usual conditions depending on $q \equiv 1$ mod $4$ or not?

I'm currently reading Marcus' "Number Fields," and I'm having difficulty proving the following result:  Corollary 2.2: Let $m$ be a squarefree integer. The set of algebraic integers in the quadratic field $\mathbb{Q}(\sqrt{m})$ is $$ \left\{ a + b \sqrt{m} : a,b \in \mathbb{Z} \right\} $$ if $m \equiv 2,3 \pmod{4}$; and$$ \left\{ \frac{a+b\sqrt{m}}{2} : a,b \in \mathbb{Z} ~,~ a \equiv b \pmod{2} \right\}$$ when $m \equiv 1 \pmod{4}$. $\square$  It is easy enough to see that the claimed sets do, indeed, consist of algebraic integers. The other half of the proof proceeds something like this: suppose that $\alpha = r + s \sqrt{m}$ is an element of $\mathbb{Q}(\sqrt{m})$. Then $\alpha$ is a root of the polynomial $$ x^2 - 2rx + r^2 - s^2m $$ In particular, this means that $\alpha$ is an algebraic integer if and only if both $2r$ and $r^2 - s^2 m$ are integers. At this point, the proof stops, and says that this implies the result. And therein lies the problem: I don't see how to make the connection. I do know, for example, that if one of $r,s$ is an integer, then the other one must be, too, i.e., either both are integers, or both are not. However, I cannot get any further than that. Can anyone give me a gentle nudge in the right direction? Thank you very much!


I answered this question-  and earned 300 rep points for it as an "accepted" answer, but serious doubts have arisen about its correctness.   Doubt is also thereby cast on the legitimacy of the rep I earned.   For this reason I am hereby re-asking the question and will place those 300 rep points in play as a bounty for whoever can settle the question with an experiment.  In your answer, please include enough procedural details so others can replicate your experimental results, and discuss those results in light of known physics.

Just like , the color of my stove's flames were affected by the humidifier as well.  Why does this happen? Is it a good thing or a bad thing ?


I have a 17" Macbook Pro from late 2011 and recently it's been shutting down randomly, but almost always when I try to move the machine. Nowadays it's happening once every few hours and it makes it very hard to use the machine.   Model Name: MacBook Pro  Model Identifier: MacBookPro8,3  Processor Name: Intel Core i7  Processor Speed: 2.4 GHz  Number of Processors: 1  Total Number of Cores: 4  L2 Cache (per Core): 256 KB  L3 Cache: 6 MB  Memory: 4 GB   I'm hoping people can tell me what to do. I have AppleCare till March 19th, 2015

My mid 2009 MacBook Pro has been repeatedly shutting down shortly after turning it on. It won't stay on. Where do I go for help? I haven't tried anything since it won't stay on.


How to do this?  There are six packages listed for my 32bit system   Not sure how to go about patching...  Ok I have not done yum clean all and yum update "openssl*"  but am stuck on following command lsof -n | grep ssl | grep DEL  it doesn't work so is it safe to say just restart mysql and then regenerate keys and certificates?

a.k.a.  is a vulnerability in OpenSSL. It looks scary.  How do I determine whether I am affected?  If I'm affected, what do I need to do? Apparently upgrading isn't enough.


In Monopoly, when you roll doubles a third time, you go to Jail.  But do you get to interact with the space first?  More specifically, do you get to do any of the following first?   Pass go  Draw a Chance or Community Chest card Pay Luxury Tax or Income Tax  Pay Rent

Do you have to serve two jail sentences? For example, you go to jail the first time and use your "Get out of jail free" card, and then go right back to jail for another sentence without rolling the dice.


So I think this is the last problem I have and I'm not thinking I'm doing it properly.     Let $a,b$ be real numbers and suppose for all $\varepsilon \gt 0, a \le b+\varepsilon$.  Show that $a \le b$.   Assume $b\lt a$.  Then $b+\varepsilon \lt a + \varepsilon$ and  $$a \le b+\varepsilon \lt a+\varepsilon$$ If I can show that there is a contradiction I can prove it, but I'm having trouble with the contradiction.

I am reading Tom Apostol's Analysis and come across this theorem.   Should $a \leq b$ if $a\leq b+\epsilon$ for all $\epsilon >0$?   I don't doubt the proof in the book but I don't understand the intuition or geometric explanation behind this. Could somebody shed some light on this equation? I just started studying analysis on my own.$\ \ $


Let $\displaystyle  f(x) = \begin{cases}e^{- \frac{1}{x^2}} &\text{for } x \neq 0     \\ 0 & \text{when } x=0 \end{cases}.$      Prove that $f$ has derivatives of all orders at $x=0$, and that $f^n(0)=0$ for $n=1,2,3,...$   I found this problem from Rudin's principles of Mathematical Analysis book (p.196). My problem is, can I use the formula $e^x=1+x+\frac{1}{2!}x^2+...$ and use directly Theorem 8.1 and Corollary on page 173 in the same book? If not can anyone please explain me the reason?

Define that $f(x) = e^{-1/x^2}$ when $x$ is not $0$, and $f(x) = 0$ when $x=0$.  Prove that $f$ has derivatives of all orders at $x=0$, and that $f^{(n)}(0)=0$ for $n=1,2,3,\ldots$


I have a line in a log that looks like this:  Customer-1234567', Site '001', TransferId: '123456789', Authenticated User: 'Customer-1234567|001'   I need to remove all the trailing garbage and leave only the customer name and customer number (as above, 'Customer-1234567') so I can paste those in a spreadsheet.  I tried doing a search and replace using the following string:  '+'$   or   '*'$   ...because I thought that this means, 'Start the string with ', match an unlimited number of characters, then end the line with '.'  But it can't find any matches.

I am trying to use notepad++ and regular expressions to edit a document. I have text in this format  123.45607894.165@abcd;aba 23.456@av1;084 9871.001@fab:9782581afa   And I need to get only the first part of the line , the one before the @ sign. How would I do that to get this:  123.45607894.165 23.456 9871.001


This evening the strangest thing just happened to me. I got notified of a +4 rep change, but when I opened the tab, I saw only an unread +5 from (presumably) a question upvote. See the screenshot:    How did that happen? Is this a bug?

Is there a reason for this? Or is it an actual bug? I haven't received any downvotes recently, so that's not the issue.  Edit to include some questions from the comments below:  Re duplicate of : I haven't deleted any posts recently, nor have any posts of mine been deleted, as far as I can tell.     IIRC, I have downvoted an answer (or question) before (at some point in time), but I'm pretty sure it's been at least 6 months :D.  @Shadow Wizard said that maybe the answer I downvoted (-1) got deleted (+1), and then undeleted (-1).  That's possible, I guess (I had thought that they expire after a while and only mods can undelete, but I guess that's not the case).    Aannd it just happened again.  (Although as @Cai pointed out, I might have already gotten the +5 from this post so this might be a false positive (aha- see what I did there))


How do I show that for $T: X \rightarrow X$ where X is complete and $T^m$ is a contraction that T has a unique fixed point $x_0 \in X$.   I know there exists $\lambda_1 \in (0,1)$ for $x, y \in X$ such that $d(T^mx, T^my) \leq \lambda_1 d(x, y)$ and I need to show that T is a contraction and then apply the fixed point theorem but how do I do that?

Consider a complete metric space $(X,d)$ and $T\colon X\to X$. Suppose there exists $n\in\mathbb{N}$ such that the n-th power of $T$ is $q$-contractive. Show that then $T$ has exactly one fixed point $\overline{x}\in X$.      The n-th power is defined inductively: $$ T^{n+1}(x):=T(T^{n}(x)), n\in\mathbb{N}. $$ And for a function $T\colon X\to X$, $q$-contractive means  $$ \exists 0\leq q<1~\forall~x,y\in X: d(T(x),T(y))\leq q d(x,y). $$    Now to the proof.  I think I have to show, that $T$ is q-contractive, because then it follows with Banach, that $T$ does have exactly one fixed point. So I have to show, that there exists a $0\leq q<1$ so that for all $x,y\in X$ it is $$ d(T(x),T(y))\leq q\cdot d(x,y). $$ And most likely I have to use the q-contractivity of $T^n$, i.e. that there exists a $0\leq q <1$ so that for all $x,y\in X$ it is $$ d(T^n(x),T^n(y))\leq q\cdot d(x,y). $$  Can you help me?


@isTest public class LeadConversionAutomation_Test {      public static testmethod void TestLeadconvert (){                           Lead testLead = new Lead(LastName = 'TestLName',FirstName = 'testFName',Status='Open - Not Contacted',Company = 'testCompany', Email = 'xxxxx@xxxxx.com');         test.startTest();         insert testLead;                  System.assertEquals(testLead.FirstName, 'testFName');         Id leadOwner = testUser.Id;         database.LeadConvert leadConvertTest = new database.LeadConvert();         leadConvertTest.setLeadId(testLead.Id);         leadConvertTest.setDoNotCreateOpportunity(False);         leadStatus convertStatus = [SELECT Id, MasterLabel FROM LeadStatus WHERE IsConverted=true Limit 1];         leadConvertTest.setConvertedStatus(convertStatus.MasterLabel);         //leadConvertTest.setConvertedStatus('Closed - Converted');         Database.LeadConvertResult leadConvertResultTest = Database.convertLead(leadConvertTest);         System.assert(leadConvertResultTest.isSuccess());                  leadConvertTest.setOpportunityName('testFName TestLName');         test.stopTest();                List<Account> accQuery = [SELECT ID, Name,OwnerId from Account where name= 'testFName TestLName'];         for(Account acc : accQuery){             system.assertEquals(acc.OwnerId, leadOwner);         }                          List< Opportunity> oppQuery = [SELECT ID, Name,OwnerId from Opportunity where name= 'testFName TestLName'];         for(Opportunity opp : oppQuery){             system.assertEquals(opp.OwnerId, leadOwner);         }     }            }  Apex Class for custom lead conversion logic: global class AutomatedLeadConversion { public static void Leadconvert(List inputs){ LeadStatus convertStatus= [SELECT Id, MasterLabel FROM LeadStatus WHERE IsConverted=true Limit 1]; List<Database.LeadConvert> listLeadconvert = new List<Database.LeadConvert>();     for(Input i: inputs){         Database.LeadConvert leadConvert = new Database.LeadConvert();         leadConvert.setLeadId(i.record.id);         leadConvert.setConvertedStatus(convertStatus.MasterLabel);         System.debug('Input Account Id: '+i.accountId);         System.debug('Input Contact Id: '+i.contactId);         if(i.accountId != NULL || i.accountId != ''){             leadconvert.setAccountId(i.accountId);             if(i.contactId != NULL || i.contactId != ''){                 leadconvert.setContactId(i.contactId);             }         }         leadConvert.setOwnerId(UserInfo.getUserId());         // if createOpportunity is FALSE, set DoNotCreateOpportunity flag         if(!i.createOpportunity){             leadConvert.setDoNotCreateOpportunity(TRUE);         }         listLeadConvert.add(LeadConvert);     }          if(!listLeadConvert.isEmpty()){         List<Database.LeadConvertResult> lcr = Database.Leadconvert(listLeadConvert);     }      }

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, including more unit test resources, navigate to the  tag.  This canonical question is intended to address several classes of common questions by providing a quick summary and links to comprehensive resources:   How is code coverage obtained and calculated? How do I increase my coverage?  Why can't I cover these lines? Why isn't the body of my loop or conditional statement covered?


I have a scene set up with some objects with really nice shaders I mixed up in the Node Editor, and they look really good. However, I am trying to create a light blooming effect on the emission effect applied to one of my shaders. I have ramped up the strength of the emission effect, but while it makes it brighter, it doesn't give it the 'aura' look that I am seeking. Any advice on how to create the effect I am looking for?

How to achieve the strong light effect (you may see in some games and 3d renders), where the light is so strong it's penetrating the objects?


I am beginning to learn time series analysis and I read that for ARIMA models, one needs to have a stationary process...that would mean removing periodicities and trends in the data....but isn't that what we are trying to predict in the first place?  That is, if there is a periodicity, i need to be able to use that fact in my prediction and my prediction should reflect that periodicity.  Similarly for any non stationary trend.  If we remove the periodicities and trends by differencing or standardizing what are we predicting then in the analysis...what is the utility of such predictions where the underlying trends in the data are not utilized?  What are the popular algorithms that can best handle non-stationary processes?(other than neural networks) Thanks much

Most introductory texts or tutorials to time-series forecasting mention that one should de-trend and de-seasonalize a time series first so that it becomes stationary. It is then easier to forecast future values of the time series.   I don’t completely understand this: Aren’t the trend and the seasonality of the time series the more relevant pieces of information? Once those two are removed, isn’t what’s left a random process equivalent to a coin toss or throw of a die for each new observation?   When one removes the trend and seasonality, is there any deterministic signal left to forecast?


E: Malformed line 1 in source list /etc/apt/sources.list.d/spotify.list (dist parse) E: The list of sources could not be read. Go to the repository dialog to correct the problem. E: _cache->open() failed, please report.  Help?

I have unistalled and reinstalled the Ubuntu Software Center as per info I found in a similar thread and I got the same response about line 91 or something like that.  I just tried to upload a screen shot but since I'm new it won't allow me to.  I also can not figure out how to cut and paste anything so I have to hand type what the error screen says, both when I attempt to open the software center and nothing happens, when I try to enter commands into the terminal to uninstall, reinstall, whatever I get the same following:  COULD NOT INTITIALIZE THE PACKAGE INFORMATION An unresolvable problem occured while initializing the package information Please report t:his bug against the 'update-manager' package and include the following error message: 'E: Malformed line 91 in source list/etc/apt/sources.list (dist parse)  E: The list of sources could not be read.,  E: The package list of status file could not be parsed or opened.   How do I report bugs?  What can be done about this.  I have searched and everything everyone says to do leads me back to the same line error message.  So, I don't know how to get to line 91 in the source list; to tell you what it says. Sorry, I'm really new to this. That is what I need is to find out how to get there and fix what it says. I would really like to NOT have to re partition my hard drive and start from scratch, so I'm really looking forward to getting this problem solved. I need to be able to install new software.


Say I have a list of keywords:  $ cat filenames.txt  satin perdido savoy stockings april lullabye   I want to find all the files in some directory that contains those keywords.   I have tried something like:  find some_dir/ -type f "$(printf '-or -iname *%s* ' $(cat filenames.txt))"   But somehow I am not able to use printf to build the whole find command; I get:  -bash: printf: -o: invalid option

There is an option to use grep -f MY_FILE to let it search for patterns taken from a file, instead of being specified directly on the command line.  Is there an option to do something similar with the find command and let it read the patterns to search from an input file?


According to the Central Limit Theorem (CLT) in statistics, the distribution of the average of randomly sampled n observations tends to follow normal distribution as the sampling size n becomes larger, even when the parent distribution from which the average is calculated is not normal. The distribution of the average of randomly sampled observations has the same mean as the parent distribution and its variance is equal to the variance of the parent divided by the sampling size.  So, my question is, is there a similar CLT-like statement for the distribution of the median of randomly sampled n observations.

If I calculate the median of a sufficiently large number of observations drawn from the same distribution, does the central limit theorem state that the distribution of medians will approximate a normal distribution? My understanding is that this is true with the means of a large number of samples, but is it also true with medians?  If not, what is the underlying distribution of sample medians?


Suppose we have a sphere and a cavity inside which is displaced at a distance $d$ from the center. If a charge $q$ is placed in the center of that cavity, a surface charge $-q$ is induced in the surface of the cavity, and as a result, another charge is induced in the surface of the outer sphere. Is this induced charge uniformly distributed through the outer sphere's surface? If so, why? Would something change if the charge were not put in the center of the cavity but at a distance $d'$ from its center?

Suppose I have a sphere of radius $r$ with all the charge residing on the surface, distributed  uniformly i.e. charge density $\sigma$ is constant. I want to find the electric field created by this sphere.  All problems of this sort I have solved by enclosing the sphere in a larger imaginary sphere with radius $R$, and then using the assumption that the electric field lines are in a radial direction, in combination with the divergence theorem.   If I use that method for this question, I find that the Electric field inside the sphere is zero. I can't understand this intuitively. I would have thought that if you are in the proximity of charge, there will be an electric field. Why would the electric field lines extend outwards radially from the sphere, and not inwards too?


Find the $pmf$ of $Z = X + Y$ for X and Y i.i.d discrete uniform over {1, 2, ..., N}   I know the convolution formula is  $$ f_Z(z) = \sum_n f_X(x)f_Y(z-x)$$  So $f_X(x) = 1/N$ and $f_Y(y) = 1/N$ too. $f_Y(z - x) = 1/N$ as well because in the discrete uniform, the probabilities are the same for every point in the sample space. So I get  $$ f_Z(z) = \sum_{2}^{2N} \frac{1}{N}\cdot \frac{1}{N} = \sum_{2}^{2N} \frac{1}{N^2} = ~~...  $$  I think I'm doing something wrong but I don't know what it is, and I know the answer is  $$ f_Z(z) = \frac{N - |z - (N + 1)|}{N^2} $$  Note: I looked around MSE and while there are similar questions, they don't answer my question specifically.

For two independent, discrete, uniformly distributed random variables $X$ and $Y$, I wish to obtain the distribution of the sum $Z=X+Y$. I have the densities: $$f_X(x)=\left\{\begin{matrix} \dfrac{1}{m+1},\;x\in [0,m]\\0,\;\text{otherwise}\end{matrix}\right.$$ $$f_Y(y)=\left\{\begin{matrix}\dfrac{1}{n+1},y\in [0,n]\\0,\;\text{otherwise}\end{matrix}\right.$$ $$f_Z(z)=\sum_{x=-\infty}^\infty f_X(x)f_Y(z-x)$$  I know that $f_Z(z)$ should look like a trapezoidal distribution. However, without knowing this, is it possible to calculate that distribution in a convenient way symbolically?   I'm finding it tedious to keep track of summation limits and such. For instance, separate cases for $m>n$ and $m<n$. I was wondering if there is a natural or intelligent notation for this, since this problem seems to be just so symmetric w.r.t $\,X$ and $Y$.  To make the question concrete: what is the most natural, symbolic/non-graphical way to solve for $f_Z(z)$? (I don't mind using another convolution formula if there is one, by the way)  Any help would be appreciated. Thanks.


Prove that $\{ \sin(x), \sin^2(x), \sin^3(x)\}$ is linearly independent in $F(\Bbb R)$.  I tried plugging in $\left\{ 0, \frac {\pi} {2}, \pi, \frac {3\pi}{2}\right\}$ but that doesn't work. How should I prove this?

The following problem is from Golan's linear algebra book. I have posted a proposed solution in the answers.   Problem: For $n\in \mathbb{N}$, consider the function $f_n(x)=\sin^n(x)$ as an element of the vector space $\mathbb{R}^\mathbb{R}$ over $\mathbb{R}$. Is the subset $\{f_n:\ n\in\mathbb{N}\}$ linearly independent?


I recently upgraded from Uhuntu 18.04 to Ubuntu 20.04. I was facing some issue about held broken packages when trying to install vim. Turned out there was some problem with the existing Python installation. So I uninstalled and reinstalled python3.8 but after that when I boot up I am stuck at the following screen.  Could someone please instruct how to proceed from here? EDIT : I managed to log in to tty1 in recovery mode. Although I am able to run most terminal commands there, I am not able to get to the GUI. echo $? returns 1 which means gdm3 is not running. sudo systemctl start gdm3 also does not work.

dev/sda1: clean, 552599/6111232 files, 7119295/24414464 blocks   After I turn on my laptop this message appears. The system never boots, the message just stays there.


I´ve got a Method that should read in Input 4 times and do this in an Array. Fine that works. I refactored all for making a Unit test with mock objects. Now the method when().thenReturn always ends in a NullPointerExeption . Source Code is from 3 different classes below :  import java.util.Scanner;  public class SystemClass {     Scanner valueIn = new Scanner(System.in);      public String getInput(){         return valueIn.nextLine();     } }   This the extracted ScannerClass  import java.util.Arrays;  public class GuessRefactor {     private SystemClass systemObj;      public String[] guess(SystemClass systemObj){         int k = 1;         String[] guess = new String[4];         for(int i = 0; i < 4;i++){             k = 1;             while(k==1) {                 System.out.println("now the " + (i + 1) + "color ");                 guess[i] = systemObj.getInput();                 if(guess[i].equals("red")||guess[i].equals("blue")||guess[i].equals("yellow")||guess[i].equals("green")||guess[i].equals("purple")||guess[i].equals("brown")){                     k = 0;                 }             }         }         return guess;     }      public static void main(String[] args) {         System.out.println(Arrays.toString(new GuessRefactor().guess(new SystemClass())));     } }   This the guessing ( Its for Mastermind )  import org.junit.Assert; import org.junit.jupiter.api.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.runners.MockitoJUnitRunner;  import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.when;  @RunWith(MockitoJUnitRunner.class) class TestClass {     @Mock     SystemClass a;      @Test     public void test() {         String b = "rot";         GuessRefactor guessRefactor = new GuessRefactor();         //Mockito.when(a.getInput()).thenReturn(b);         Mockito.when(a.getInput()).thenReturn(b);         String[] expectedOutput = {"red", "red", "red", "red",};         String[] output = guessRefactor.guess(a);         Assert.assertArrayEquals(expectedOutput, output);     } }   This is the TestClass.  Pls Help me!!!

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?


Recently I changed my operating system to Ubuntu 16.04. Before I had Windows 10 and used Western Digital SmartWare to make backups on an external drive from my WD hard drive. Now Ubuntu recognizes the external drive but intended to do backups with some software instead of manually transfer to the external drive. Is there any Ubuntu application to replace  WD SmartWare? Thank you.

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.  While you are encouraged to help maintain its answers, please understand that "big list" questions are not generally allowed on Ask Ubuntu and will be closed per the .   Backup is incredibly important. Obviously there's no best backup tool, but a comparison of the options would be very interesting.   Graphical Interface? Command line? Incremental backups? Automatic backups? Install method: In standard repositories? PPA?


$insert_document_list_results   = "insert into social_compliance_document_list_results      (user_id, serial_number, status, date_of_renewal, date_of_expiry, evidence_1, remarks)       values($user_id, {$row['ID']}, $status_array[$index], $date_of_renewal_array[$index], $date_of_expiry_array[$index], $evidence, $remark_array[$index])";   This is a query that I have written in order to insert data into my MYSQL database. However, each time I execute it, I get this error message,   ERROR: Could not execute sql. You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'Handbook 2019.pdf, 'Remark')' at line 1

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


Recently while visiting a question, I saw two users on Stack Overflow and found uncanny activity. So I visited their profile and saw that these users might be committing vote fraud.  One user is asking and accepting questions from a specific user and vice versa.   Now there is no rule against one user frequently answering another user's question, but if this happens quite frequently then I guess something might be going on.   I believe they are sock-puppets. What can I do in such a situation?

I stumbled over the following which made me a bit puzzled:  A user (quite low rep) asked a question whose solution appeared immediately tricky, but unfortunately it was quite unclear, ambiguous and required clarification.  Shortly after, another user replied to that unclear question with an almost ridiculous simple answer. That made me immediately think that the user who answered has apparently completely missed the underlying possibly hidden tricky problem.  IMHO, his overly simplistic answer not only requires invalid assumptions about the problem, but it was in no way a suitable approach to solve it.  Nonetheless, the almost funny answer was accepted quickly, and to my astonishment, was up voted seven times in a just a minute. Puzzled.  That made me curious, and thus I queried other answers of the user who answered the question. And not to my surprise they all came out a bit suspect.  After a closer look, and some further queries, I suspected the user is using sock puppets and some other fraudulent activities to gain votes.  I gathered the following:   The main account's answer will be accepted quickly, even when the question is still very unclear and ambiguous and requires clarification. The main account's other answers (accepted or not) receive up votes which happen in batches in a very short duration (which indicates there are a number of sock puppets contributing to the up votes which are all controlled by one person). This happens now and then. The main account's answer is often not quite correct. Oftentimes, there are a few comments from third who question the main account's (accepted) answer or even conclude that it is outright wrong. The main account's answer (not accepted) gets up voted at a certain time, even though there is a far better accepted answer from a third which doesn't get up voted at the same time. This is weird at least.  The suspected puppet, as a questioner, is somewhat unimpressed by the other more correct answers and also by valid comments. The puppet's and the main account's English is somewhat broken and easy to identify. A Puppet and the main account built a group who interact to each other with votes and accepts.  The main account often answers its own question with a bunch of up votes.   It seems there have been answers deleted from the main's account formerly, already.  I'm a bit reluctant to disclose the user.   What should I do in this case?


i have made that when ever someone reg the txt file is created and named on user username. now im trying to check if username txt file is there in dir or not here is the code i tried . im unable to check if username txt file is there . i tried many diff way searched google but no luck some i have mentioned as comment. pls help looking  def db():         a = (E1.get(), E2.get(), E3.get(),E4.get(),E5.get())                  if "./library/"+E1.get() == os.path.isfile("./library/"+E1.get()):         # if E1.get() == os.path.isfile(E1.get()):         # if E1.get()in os.path.isdir("./library/"):              cur.execute("insert into Booking values(?,?,?,?,?)", a)             con.commit()             cur.execute("select * from Booking")             a = cur.fetchall()             ab = int(E4.get())             cost=100             ac = ab * cost             messagebox.showinfo("Congratulation!!", "Your oreder value is %s" % ac)             print(a)              te.destroy()             os.system("library.py")         else:             print("username invalid")

How do I check whether a file exists or not, without using the  statement?


Here is my problem: I am developing an embedded system for some classification task. I am using Logistic Regression as my classifier. Now I train my classifier, and download my model on to my machine. Now this is not everything I want to do. I now want to let my model adjust its classification boundary on runtime, online learning as it is called. How do I do it?

A paper "Accurately computing running variance" at  shows how to compute running mean, variance and standard deviations.  Are there algorithms where the parameters of a linear or logistic regression model can be similarly "dynamically" updated as each new training record is provided?


I want to format my documents in such a way that the image is to the right of the text and the text should wrap to it. Can you help me to do this? By the way I am using enumitem package.

I want to use wrapfigure in the enumerate environment. For example,   \documentclass[11pt, a4paper]{article} \usepackage{graphicx} \usepackage{float} \usepackage{wrapfig}  \begin{document} \normalsize {\bf Multiple Choice: } \begin{enumerate}     \item \begin{wrapfigure}{r}{4.5cm}           \includegraphics[scale=0.5]{Exam1_Fig1.jpg}           \end{wrapfigure}           As shown in the figure. This rock is phaneritic and contains quartz, K-feldspar, and plagioclase in nearly equal amounts. What is it? \\           (A) rhyolite \\           (B) basalt \\           (C) diorite \\           (D) ash-flow tuff \\           (E) granite \\ \end{enumerate} \end{document}   However, the figure inserted is not wrapped by the text, but put in a strange position. How to fix the problem?   Thank you!


Okay, I have no clue what this is, but I just received an email that has this in it.    -----BEGIN PGP PUBLIC KEY BLOCK-----  [redacted]  -----END PGP PUBLIC KEY BLOCK-----   If this means something, could someone decode it for me? If not, then could someone just tell me what it is?

There's PGP public key block posted on some websites (eg. ).  It's not hex code. it uses much more alphabet characters. What is it?  Why is this information posted? how can i use it?


Does someone know why I am getting a double arrow instead of a simple directed edge with the following use case scenario? How can I get a single arrowed edge instead?  \documentclass{standalone} \usepackage[dvipsnames]{xcolor} \usepackage{amsmath} \usepackage{tikz} \usetikzlibrary{chains} \usetikzlibrary{shapes} \usetikzlibrary{arrows} \usetikzlibrary{decorations.pathreplacing,shapes}  \newcommand\kk[1]{\textcolor{RoyalBlue}{\text{\textup{\textbf{\texttt{#1}}}}}} \newcommand\cc[1]{\textcolor{Sepia}{\text{\textup{\textbf{\texttt{#1}}}}}}  \begin{document}  \begin{tikzpicture}[>=latex] \begin{scope}[node distance=0pt] \def\width{9ex}  \tikzstyle{frame}=[     font=\scriptsize,     %text width=7ex,     draw,     rectangle split,     rectangle split parts=20,     rectangle split part align={center, left},     rectangle split empty part height=0ex,     rectangle split empty part depth=0ex,     rectangle split empty part width=0ex,     start chain=going right,     rectangle split horizontal ]  %%MAIN \node (main) [frame,     rectangle split parts=4,     rectangle split part fill={Fuchsia!30,                                teal!30,                                teal!30,                                teal!30] at (0,.7) {% \nodepart{one}      \centering \kk{node size} \nodepart{two} \centering \cc{outgoing offset} \nodepart{three} \centering \cc{$id$}     \nodepart{four} \cc{M} };    \draw[->] (main.one north) edge [bend left=10] (main.three north); \draw[->] (main.two south) edge [bend right=10] (main.four south);     \end{scope} \end{tikzpicture} \end{document}

I am quite puzzled when drawing the connection of nodes.  \usepackage{xcolor} \definecolor{darkblue}{HTML}{1F4E79} \definecolor{salmon}{HTML}{FF9C6B} \tikzstyle{cell} = [rectangle, minimum width=1cm, minimum height=0.5cm,text centered, draw=black, fill=salmon] \tikzstyle{state} = [rectangle, minimum width=1cm, minimum height=0.5cm,text centered, draw=black, fill=darkblue] \tikzstyle{arrow} = [thick,->,>=stealth]  \begin{tikzpicture}[thick,scale=0.8, every node/.style={scale=0.8},node distance=1.5cm]     \node (0) [state] {\textcolor{white}{feature extraction}};     \node (1) [cell, below of=0] {invertBotConE2\_f48\_k1\_b4\_noskip};     \node (2) [cell, below of=1] {invertBotConE2\_f16\_k3\_b4\_noskip};     \draw [arrow] (0) -- (1);     \draw [arrow] (1) -- (2);     \draw  (0.east)  [arrow]  edge [out=0, in=0, out looseness=4, in looseness=4]  (2.north); \end{tikzpicture}   0,2 are my nodes. When east is specified, it creates an arrow on node 0. If removed, it disappears. What if I would like to put 0.south as the start of the edge?


Let $H$ be a complex Hilbert space, let $A,B$ be bounded linear operators on $H$. I want to show $\forall x \in H$ $(x,Ax) = (x,Bx) \implies A=B$.  I can show that  $\forall x,y \in H$ $(y,Ax) = (y,Bx) \implies A=B$, pretty easily.  Is there a way to show that   $\forall x \in H$ $(x,Ax) = (x,Bx)$ $\implies A=B$  implies   $\forall x,y \in H$ $(y,Ax) = (y,Bx) \implies A=B$ to finish, or another method?

I feel kind of dumb but I needed this little claim as a part of a proof I'm writing, and I figured out that I'd better just ask, since I could not find the correct algebraic manipulation needed in order to prove it.  So I want to prove this: Suppose $H$ is an Hilbert space, and $A: H\to H$ is a linear operator (if that matters, which I believe it does not, we can assume that $A$ is a projection). Suppose that for every $x\in H$, $(Ax,x)=0$. Then $A=0$.  What I tried to do is a little bit of Cauchy-Schwarz and some algebra but nothing worked out.  Thanks!


I'm trying to set up my system to automatically boot my two main Vagrant boxes when my computer turns on but it's throwing an error saying no such file or directory when I added this to the bottom of ~/.profile  bash cd ~/Develop/Websites/scotch && vagrant up bash cd ~/Develop/Websites/homestead && vagrant up   I can paste that line (minus the bash) into a terminal though and it works fine.  I'm told I shouldn't use ~/.profile for this and should possibly use a cron @reboot.  How would I format that since it's not a script that runs necessarily? It's not a file you run, it's a command that has to be in a specific folder.

How can I run scripts automatically when Ubuntu starts up so I don't have to run them manually after startup?


I have a server with 2 SSDs:  Model Family:     Intel 520 Series SSDs Device Model:     INTEL SSDSC2BW240A3F Firmware Version: 400i User Capacity:    240,057,409,536 bytes [240 GB] Sector Size:      512 bytes logical/physical   On them I have 3 mdraid mirror devices (md0,1,2) formatted with EXT4 filesystem. I'm using mbr (not gpt) partition table. All 3 filesystems are mounted with discard mount option.   /dev/md0 on / type ext4 (rw,discard,errors=remount-ro) /dev/md2 on /vservers type ext4 (rw,discard) /dev/md1 on /var type ext4 (rw,discard)   The PROBLEM is that whenever I reboot the server, fstrim -v /any_mountpoint says it needed to trim ALL of the unused space. Once I do the full fstrim of the filesystems, everything works as expected until the next reboot. Running fstrim after a reboot again trims the whole filesystem.  Could somebody explain to me what I'm doing wrong? I thought ext4 remembered the already trimmed parts of filesystem (on my desktop with 1 ssd, it does). This is on Ubuntu 14.04 with 3.13.0-23-generic kernel.

When I installed my SSD I just mounted with discard and didn't sweat it. However today I was reading about the pros and cons of using fstrim instead and decided to run the program to get an idea of how long it would actually take (still with my partitions mounted with discard). The command took several minutes on both my root and home partitions. For my home partition I used -v and got this:  $ sudo fstrim -v /home /home: 137494052864 bytes were trimmed   This is more than the amount of free space on the partition!  $ df -h /home Filesystem      Size  Used Avail Use% Mounted on /dev/sda2       206G   78G  118G  40% /home   Subsequent runs finish in less than a second, eg:  $ sudo fstrim -v /home /home: 0 bytes were trimmed   Surely if I have always had the partition mounted with discard, fstrim should not trim a large amount of data like that? The discard option is definitely enabled, here are the relevant fstab lines:  UUID=xxxxxxxx...    /          ext4   noatime,discard,errors=remount-ro  0      1 UUID=xxxxxxxx...    /home      ext4   noatime,discard,errors=remount-ro  0      2   And mount output lines:  /dev/disk/by-uuid/xxxxxxxx... on / type ext4 (rw,noatime,discard,errors=remount-ro,stripe=128,data=ordered) /dev/sda2 on /home type ext4 (rw,noatime,discard,errors=remount-ro,stripe=128,data=ordered)   The SSD is a TOSHIBA THNSNS256GMCP. Why does this happen?


If you log in to Stack Exchange from any page (as far as I know) on https://stackexchange.com or any sites like https://scifi.stackexchange.com, the URL looks something like this and redirects to the page you clicked the log in button on after you log in:     1   However, on Data Explorer, which likes to log me out, there is no such method (I use "Log in using Stack Exchange" and when you log in it kicks you back to the homepage.  Can we get some sort of system so that when you log in to Data Explorer, you go back to the page you were on?  1if I were sent there by a button, returnurl would actually display as (in Firefox) as https%3a%2f%2fscifi.stackexchange.com%2f. I changed it for clarity when reading the question.

Recently, the redirect behaviour of login on SEDE has changed (for the worse). Steps to reproduce:   When logged off, go to a query page Click the "login" link Login   Previously, you would be returned to the query page in a logged-in state (ready to run the query without captcha).  Currently, you are redirected to the SEDE front page (http://data.stackexchange.com/#) (so you then have to re-navigate back to where you were). The returnurl parameter passed in the first few steps is lost somewhere along the way.  Could  be reinstated?


i was wondering how can i check that my Xubuntu installation contains the latest intel video drivers?

Can someone help me out and explain or point me in the right direction on how to check video drivers and see if my video card running okay?  I had 10.04 installed on my Thinkpad r61 with Compiz Manager and life was great, until the machine took water damage. I bought an ASUS (X54H) since and am trying out 12.04, but the desktop just doesn't look right.  I always struggled with video driver installation. There are no proprietary drivers available in the hardware manager.  When I run lspci | grep VGA:  00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)   I will greatly appreciate your help. I want to use Linux more, but like I said video drivers appear to be my biggest concern. I have also tried 12.04 on my desktop PC, but again failed to configure video card, so switched back to Windows 7.


I'm trying to wipe a 2TB hard drive ready for sale. I was told to zero it out with 7 passes so it would be secure and no-one would be able to retrieve my information. But I'm struggling to find a program that will perform one pass in less than 24 hours let alone 7 passes.  I was just wondering out of interest and maybe for some fun, would it be secure to overwrite the data and occupy the empty space with 2000 1GB films?

I am about to sell my old desktop PC and I am cautious about some of my sensitive information being available to the purchaser, even after reformatting the hard-drive, using data recovery software.  How can I securely wipe the hard drive so that the data on it cannot be recovered?  Although I specifically want help with my Windows PC, it wouldn't hurt if there were suggestions for Macs as well.


i'm having a problem on my query, this is the working query and      SELECT res_ID,res_fName,res_mName,res_lName,rs.suffix,rms.marital_Name,rg.gender_Name,rr.religion_Name,ro.occupation_Name,ros.occuStat_Name,res_Date_Record,rc.country_citizenship,res_Bday,TIMESTAMPDIFF(YEAR,res_Bday,CURDATE()) AS age, (case    when (TIMESTAMPDIFF(Month,res_Bday,CURDATE())<=1) then 'Maternal and Newborn'  when (TIMESTAMPDIFF(Month,res_Bday,CURDATE())<=1 and TIMESTAMPDIFF(Month,res_Bday,CURDATE())<=12) then 'Babies' when (TIMESTAMPDIFF(Month,res_Bday,CURDATE())<=13 and TIMESTAMPDIFF(Month,res_Bday,CURDATE())<=24) then 'Toddlers' when (TIMESTAMPDIFF(Year,res_Bday,CURDATE())<=2 and TIMESTAMPDIFF(Year,res_Bday,CURDATE())<=4) then 'Preschoolers'  when (TIMESTAMPDIFF(Year,res_Bday,CURDATE())<=5 and TIMESTAMPDIFF(Year,res_Bday,CURDATE())<=8) then 'School Age Children'  when (TIMESTAMPDIFF(Year,res_Bday,CURDATE())<=9 and TIMESTAMPDIFF(Year,res_Bday,CURDATE())<=12) then 'Tweens ' when (TIMESTAMPDIFF(Year,res_Bday,CURDATE())<=13 and TIMESTAMPDIFF(Year,res_Bday,CURDATE())<=19) then 'Teenager' when (TIMESTAMPDIFF(Year,res_Bday,CURDATE())<=20 and TIMESTAMPDIFF(Year,res_Bday,CURDATE())<=35) then 'Young Adult' when (TIMESTAMPDIFF(Year,res_Bday,CURDATE())<=36 and TIMESTAMPDIFF(Year,res_Bday,CURDATE())<=55) then 'Middle-Aged Adults' when (TIMESTAMPDIFF(Year,res_Bday,CURDATE())<=56 and TIMESTAMPDIFF(Year,res_Bday,CURDATE())<=100) then 'Senior'    end) Age_Stage FROM resident_detail rd  LEFT JOIN ref_suffixname rs ON rd.suffix_ID = rs.suffix_ID  LEFT JOIN ref_gender rg ON rd.gender_ID = rg.gender_ID LEFT JOIN ref_marital_status rms ON rms.marital_ID = rd.marital_ID LEFT JOIN ref_religion rr ON rr.religion_ID = rd.religion_ID  LEFT JOIN ref_occupation ro ON ro.occupation_ID = rd.occupation_ID  LEFT JOIN ref_occupation_status ros ON ros.occuStat_ID = rd.occuStat_ID LEFT JOIN ref_country rc ON rc.country_ID = rd.country_ID   this is the Result:   i want is use the alias "Age_Stage" column on WHERE statement, on the image above Age_Stage has their specific value, i just want is to filter those Age_Stage by value that i want.  but when i add on the query  WHERE Age_Stage = "Young Adult" on the of query the error is result is     Unknown column 'Age_Stage' in 'where clause'

SELECT name, gdp/population as capita  FROM world w1  WHERE continent = 'Europe'       AND capita >  (     SELECT gdp/population      FROM world      WHERE name = 'United Kingdom' );   How come I can't refer to capita in the WHERE clause? It returns this error:  Unknown column 'capita' in 'where clause'   I can however, run the query if I replace capita with gdp/population.  I don't want to do gdp/population > .... How can I do capita > ...? Or is this not possible?


Is it possible to create different NS for different countries?  For example, we have 4 nameservers:  #for US ns1.us.domain.com ns2.us.domain.com  #for Europe ns1.europa.domain.com ns2.europa.domain.com   DNS requests coming from Europe will go to ns1.europa, ns2.europa and requests from US and other world will go to ns1.us, ns2.us.  Maybe some paid DNS provides can do it? Any other other ways to speedup DNS lookup? Any links and advises are appreciated.

Currently, when a DNS client makes a request for a DNS record (say, www.example.com., it needs to traverse the DNS tree. It asks the root servers for the location of com., which it then asks for the location of example.com., which it then asks for the location of www.example.com.. Thankfully, much of this is cached.  If example.com. has multiple, geographically diverse NS records listed, my understanding is that these are listed in random order to avoid all queries going to the first (or last) NS record listed.  This would appear to imply that a DNS resolver in Australia could choose a NS record for a nameserver that's located far away, perhaps in Europe, when there may be another authoritative nameserver that is much closer.  So, my question is: Is there any provision within the DNS spec to allow DNS resolvers to select an authoritative nameserver that's local to them? The only way I can see to achieve this is to have the NS records behind an anycast address and do local resolution that way. Would this work? Is there any other option?


We know that the Death Star had an internal atmosphere due to the fact that living creatures reside in it without some form of breathing apparatus. We also know that there are at least two forms of vent-like activities performed on the Death Star: the reactor exhaust, and waste dumping. Considering the size of the Death Star, one could reason that a portion of any matter vented or released approximate to the Death Star would be caught by its gravitational pull and retained as atmosphere. Does the Death Star have an external atmosphere? Thanks

The Death Star is the size of a small moon. Endor being a moon (not sure if it's small or not) has a rich atmosphere.  Could the Death Star hold a nitrogen/oxygen based atmosphere with its gravity?  (Now re-reading my question, I suppose this sounds a lot like the plot of SpaceBalls... that was not my intention)


I have file1 and file2 as following. I would like to first find matches between two files based on first column and then print the matching lines from file1 and file2. I have written the desired output below  $ cat file1 1,      456,    abcd,  ... 23,     567,    rstc,  ... 45,     678,    rsto,  ...     $ cat file2 23,     5607,   abcstc, ... 45,     28,     zfgsto, ...   Desired output:  23,     567,    rstc,    ... 23,     5607,   abcstc,  ... 45,     678,    rsto,    ... 45,     28,     zfgsto,  ...

I have my references as a text file with a long list of entries and each has two (or more) fields.   The first column is the reference's url; the second column is the title which may vary a bit depending on how the entry was made. Same for third field which may or may not be present.  I want to identify but not remove entries that have the first field (reference url) identical. I know about sort -k1,1 -u but that will automatically (non-interactively) remove all but the first hit. Is there a way to just let me know so I can choose which to retain?  In the extract below of three lines that have the same first field (http://unix.stackexchange.com/questions/49569/), I would like to keep line 2 because it has additional tags (sort, CLI) and delete lines #1 and #3:  http://unix.stackexchange.com/questions/49569/  unique-lines-based-on-the-first-field http://unix.stackexchange.com/questions/49569/  Unique lines based on the first field   sort, CLI http://unix.stackexchange.com/questions/49569/  Unique lines based on the first field   Is there a program to help identify such "duplicates"? Then, I can manually clean up by personally deleting lines #1 and #3?


I've created a ResourceDictionary in WPF for all my styles of the application. Because there are much of them, I store them in a different assembly. I've now imported the Dictionary in App.xaml and declared the namespace in my application. But how can i use the styles? Window: xmlns:style="clr-namespace:namespace;assembly=assemblyname" App.xaml: <Application.Resources>     <ResourceDictionary>         <ResourceDictionary.MergedDictionaries>             <ResourceDictionary Source="pack://application:,,,/assemblyname;component/Styles.xaml"/>         </ResourceDictionary.MergedDictionaries>     </ResourceDictionary> </Application.Resources>  Does I also need to declare it in the <Window.Resources>-block?

I have resource dictionary files (MenuTemplate.xaml, ButtonTemplate.xaml, etc) that I want to use in multiple separate applications. I could add them to the applications' assemblies, but it's better if I compile these resources in one single assembly and have my applications reference it, right?   After the resource assembly is built, how can I reference it in the App.xaml of my applications? Currently I use ResourceDictionary.MergedDictionaries to merge the individual dictionary files. If I have them in an assembly, how can I reference them in xaml?


I am helping someone with highschool maths but I got stacked in a elementary geometry problem. I am given the equation of two straigh lines in the space $r\equiv \begin{cases} x=1 \\ y=1 \\z=\lambda -2 \end{cases}$ and $s\equiv\begin{cases} x=\mu \\ y=\mu -1 \\ z=-1\end{cases}$ and asked for some calculations. First I am asked the relative position of them so I get they are skew lines. After that I am asked for the distance between the two lines. In order to get the distance I have to calculate the line that is perpendicular to both of them in the "skewing" point, check the points where it touches the other two lines (sorry, not sure about the word in English) and calculate the module of this vector. Im having trouble calculating the perpendicular line. I know I can get the director vector using vectorial product, but  I'm not sure how to find a point so that I can build the line.

In every geometry textbook it states that the shortest distance between two skew lines (lines that are not co-planar) is given by the unique line that runs perpendicular to both skew lines. This is fairly simple to prove given a shortest line exists (see my comments below). However, how can we prove that between any two skew lines there exists a shortest straight path? I have tried using calculus to show that for lines $L_1 = \mathbf{p}+s\mathbf{u}$ and $L_2 = \mathbf{q} + t\mathbf{v}$ the equation: $$R(s,t) = \Vert \mathbf{p}+s\mathbf{u}-(\mathbf{q}+t\mathbf{v})\Vert^2$$  Has a local minimum  However I am not quite able to show that (without getting into page and pages of calculations) and what is more, even after I have shown this, it only proves a local minimum exists.


I would like to flatten a terrain mesh I generated using a racetrack mesh so the terrain appears flatter around the area where the track runs through, I've tried a few different modifiers for this and the closest one to what I needed was the cast modifier, unfortunately it only deforms with the 3 primitive shapes around the transform of the track and not the mesh itself. Is there a plausible way of doing this or would I have to sculpt the terrain manually? The red circles in the picture below illustrate where I'd need the terrain to flatten out for the track to run through. Thanks in advance.

I would like to be able to modify the height of vertices on a plane using a bézier curve. I sculpted a example of what I would like to do:    For my case, I would need the deformation to be somewhat smooth (i.e. the change in height is greatest at points closest to the curve, and then dampening off as they are further away, until they are far enough that they are not changed at all).   Is there any way to achieve this?  I have tried going a different route, using the curve + array modifier but I end up with undesired results .  I am comfortable with trying to write a custom script if needed; but was wondering if there is already a built-in method or known plugin that does this?


I want half line in twocolumn article but in first page like this  first page   second page   \documentclass[landscape,12pt]{article}  \usepackage[margin=1cm,top=1.3cm,bottom=1.3cm,headsep=5mm] {geometry} \usepackage{fancyhdr,fancybox} \usepackage{pgfplots,tikz} \usepackage[normalem]{ulem}   \usepackage{polyglossia} \usepackage{tkz-tab} \pagestyle{fancy} \renewcommand{\headrulewidth}{.7pt} \renewcommand{\footrulewidth}{.7pt}        \begin{document} hellow hellow hellow    hellow hellow hellow    hellow hellow hellow     hellow hellow hellow    hellow hellow hellow        \end{document}

I am writing a document using the report class in two column mode, but I need a \section to spread across both columns, but how can I set that?  Something like  \documentclass[10pt,danish,a4paper,twoside,twocolumn]{report} \input{preamble.tex} \begin{document}  % This section should spread over both columns \section{Name}  \lipsum[1-3] \end{document}


This solution to the problem presented on :     Given an array of integers, find two numbers such that they add up to   a specific target number.      The function twoSum should return indices of the two numbers such that   they add up to the target, where index1 must be less than index2.   Please note that your returned answers (both index1 and index2) are   not zero-based.      You may assume that each input would have exactly one solution.      Input: numbers={2, 7, 11, 15}, target=9 Output: index1=1, index2=2   by wz2326 ():  vector<int> twoSum(vector<int>& nums, int target) {     unordered_map<int, int> hash;     vector<int> res(2, 0);     for (int i = 0; i < nums.size(); i++) {         if (hash.find(target - nums[i]) != hash.end()) {             res[0] = hash[target - nums[i]], res[1] = i + 1;             return res;         }         hash[nums[i]] = i + 1;     } }   introduces pretty strange use of commas during assignment of int values to vector elements:  res[0] = hash[target - nums[i]], res[1] = i + 1;   Does anyone know the meaning of comma here? Thanks.

How does the comma operator work in C++?  For instance, if I do:  a = b, c;     Does a end up equaling b or c?   (Yes, I know this is easy to test - just documenting on here for someone to find the answer quickly.)  Update:  This question has exposed a nuance when using the comma operator.  Just to document this:  a = b, c;    // a is set to the value of b!  a = (b, c);  // a is set to the value of c!   This question was actually inspired by a typo in code.  What was intended to be  a = b; c = d;   Turned into  a = b,    //  <-  Note comma typo! c = d;


As I presume others have, I've located useful source publications on the . The source templates I have don't seem to cover the case of a scanned copy of a physical book, other than for published microfilms. In this case, it isn't a microfilm, but it isn't a physical book either, so neither template seems to apply.  I'd like to be able to cite the source, indicating both that it's an electronic copy from archive.org, but ideally also including the associated information about the original scanned book (although I think the difficulty of listing multiple repositories for a source has been mentioned here before). I could cite it as a physical book, listing archive.org as the repository, but somehow that doesn't seem correct.  A question that has been asked in the past is  However, it mostly discusses digital books (e-books), not so much scanned copies of physical books. They do suggest just using the physical book template and adding the URL for the scanned version, which I suppose could be made to work. Seems clumsy, though.   My main concern is which template best applies to this case?

I use the following to record my digital book sources. Should I include anything else?   Author Editor Title Publication Place Publisher Publisher Year Page Format Website URL


So i bumped in to this:  Public Stam {        public Stam() {Console.WriteLine("Stam");}         ~Stam(){Console.WriteLine("Stam")}        }   What exactly is the ~? and what will happen when i call the Stam class.

I am looking at some code and it has this statement:    ~ConnectionManager() {     Dispose(false); }   The class implements the IDisposable interface, but I do not know if that is part of that the tilde(~) is used for.


Let $R \subset \mathbb{Q}$ be the subring $\left\{\frac{a}{b} \mid a, b \in \mathbb{Z}, b \text { odd }\right\}$. Prove that the ideals of $R$ are the zero ideal $\{0\}$ and $2^{n} R$ for $n \geq 0$.    Hint: if $\{0\} \neq I \subset R$, the element $2^{n}\frac{\text { odd }}{\text { odd }}$ with the smallest $n$ generates $I$.   I have seen similar questions asked but I am stuck on the specific step which shows that $ I=2^{n} R $. I can show that there exists $n$ such that for every element $x$ of a non-zero ideal of R, it can be expressed as $x = 2^{n} \frac{a}{b}$ with $a, b \in \mathbb{Z}, b \text { odd }$. This gives me that $ I \subset 2^{n}R $, however I am having difficulties proving it in the other direction.    Apologies if this still counts as a duplicate question.

Show that the ring of all rational numbers $m/n$ with $n$ an odd integer is a principal ideal domain.  We haven't really discussed principal ideal domains. I've heard that this is easy, but I just lack the basic knowledge of what a principal ideal domain is.


Show that the equation: $$ y’ = \frac{2-xy^3}{3x^2y^2} $$ Has an integration factor that depends on $x$ And solve it that way.  Already we got to: $$ y’ + \frac{xy^3}{3x^2y^2} = \frac{2}{3x^2y^2} $$ Therefore: $$ y’ + \frac{1}{3x}y = \frac{2}{3x^2}y^{-2} $$ But, in order to get an integration factor, shouldn’t we have a linear equation? Of the form: $$ y‘ + p(x)y = g(x) $$ That way getting the integration factor: $$ \mu = ke^{\int p(x)}, k \in R $$ But what we have is a non-linear equation, so how could an integration factor exists? Thanks.

Solve, by bringing the equation to Bernoulli form: $$ y’ = \frac{2-xy^3}{3x^2y^2} $$  Therefore we want to bring it to a form like: $$ y’ + p(x)y = q(x)y^n $$ So working with the equation i get: $$ y’ - \frac{2}{3x^2y^2} = -\frac{xy^3}{3x^2y^2} = -\frac{y}{3x} $$ I don’t see how to get to Bernoulli equation from here...


I have found my old Compaq Armada E500 laptop and I thought Xubuntu would run fine on it. I burned a CD with Xubuntu 12.10 32bit and loaded it up, but all I could hear is the constant seeking of the CD head, I couldn't even reach the language selector menu.  I tried burning the CD 3 times, even on RW media. I tried to defragment the ISO before burning it to CD but none of them helped. This is not the first time I encountered this problem with a different laptop (but that was old as well), I thought back then that the CD was poorly written.  Windows XP install, Debian or GParted CD loads fine (so the DVD ROM should be OK) on this E500, and the Xubuntu install CD load fine as well on a Lenovo X230 and does not seek a lot.  Is it possible that I need to write the CD with different settings so that it works well in an older (9-10 years old) DVD-ROM? I burned the CD with 16x speed, with Infrarecorder (in Windows 7).

I'm thinking about installing Ubuntu Desktop, but I don't know what flavor is the best for my system. What are the minimum and recommended hardware requirements? What kind of CPU? How much memory? Should I have Hardware Acceleration? What flavor should I use?  This is an attempt of a canonical answer. My answers have the "official  requirements", the recommended are a mix of official sources and opinion based (along with the answer it's told the source). You can comment or edit if you feel that the information is obsolete or incomplete. It is a good rule of thumb that any system capable of running Windows Vista, 7, 8, x86 (Intel) OS X will almost always be a lot faster with any Ubuntu flavor even if they are lower-spec than described below.


I want to establish connexion QGIS and PostGIS in order to run the pgRouting Layer, how can I do it?

I am fairly new to actively work with databases. I wanted to try out some stuff on my home computer where I have installed pgAdmin and PostgreSQL previously. I can connect to my localhost in pgAdmin but I can't do the same in QGIS. I just get an error message saying:  "Connection failed -  Check settings and try again"   I am new in this game and don't really know where to look for solutions. My database connection info is standard settings:  Name: postgres Host:Localhost Port:5432 Database:test   Any ideas what could be wrong?


When it comes to writing code for a question that asks about a procedure, would it be better to write pseudocode, or to write general code in the language they ask for?  Some questions, like comparing strings or some such, would obviously require exact code.  Outside of that, is it better to provide a text answer saying what is wrong and how to fix it, or to provide code saying it?

When answering a question today on SO, I was asked for a . I know it is good practice to have a question with an SSCCE, but how about answers?  As far as I know, an answer doesn't have to provide a complete implementation for a given problem, but at least it should tell how to solve it.  Any thoughts?


I'm following the tutorial on overleaf to create a bibliography, yet I keep getting the error "Empty bibliography on input line...". Here's my code.  \documentclass[a4paper]{article} \usepackage[backend=biber]{biblatex} \addbibresource{sample.bib}  %%% Title Data \title{Seminar}  \author{} \date{November 28, 2019}  \begin{document} \maketitle {\centering   \LARGE\textbf{Nonshellable Triangulation of 3-balls}\par }    \printbibliography  \end{document}   And the content of the .bib file:  @article{einstein,     author = "Albert Einstein",     title = "{Zur Elektrodynamik bewegter K{\"o}rper}. ({German})     [{On} the electrodynamics of moving bodies]",     journal = "Annalen der Physik",     volume = "322",     number = "10",     pages = "891--921",     year = "1905",     DOI = "http://dx.doi.org/10.1002/andp.19053221004",     keywords = "physics" }   Also a screenshot of the window on overleaf I'm working on.     What am I doing wrong?

Is there any way to have BibTeX or biblatex insert a bibliography without having citations in the body of the document itself? Maybe a way to hide the in-text citations, so that BibTeX still sees them and includes them in the bibliography, but does not print them in the body?


In a strongly typed view I have a dropdownlist filled with "instruments" from a List from my viewmodel. Everytime the user clicks on an item a musiciansinstrument should appear underneath the dropdownlist.  this is my viewmodel  public class RegisterMusicianModel {     public RegisterMusicianModel()     {         instrumentRepository = new InstrumentRepository();         instrumentlist = instrumentRepository.FindAllInstruments().ToList<instrument>();         musicianinstrumentlist = new List<musiciansinstrument>();     }     private InstrumentRepository instrumentRepository;     private List<instrument> instrumentlist;     private List<musiciansinstrument> musicianinstrumentlist;      public List<musiciansinstrument> Musicianinstrumentlist     {         get { return musicianinstrumentlist; }         set { musicianinstrumentlist = value; }     }      public List<instrument> Instrumentlist     {         get { return instrumentlist; }         set { instrumentlist = value; }     }       private musician music = new musician();      public musician Music     {         get { return music; }         set { music = value; }     }   }   As you can see I have a filled list of instruments, an empty list of musician instruments and an object of musician. So everytime the user changes selection in the dropdownlist this method gets called and returns a JSON Object (musiciansinstrument, not an instrument).      [HttpPost]     public JsonResult AjaxInstrumentsMusician(int id)     {         musiciansinstrument mi = new musiciansinstrument();         mi.idInstruments = id;         mi.Instrumentname = instrumentrepo.GetInstrument(id).name;          return Json(mi);     }   the script:  $(document).ready(function () {     $('#Instrumentlist').change(function (e) {         var myval = $('#Instrumentlist').val();         alert(myval);         $.ajax({             url: "/Account/AjaxInstrumentsMusician",             type: "POST",             data: { id: myval },             success: function (result) {                 alert(result.Instrumentname);             },             error: function () {                 alert('failed');             }         });     }); });   I can display the JSON object properties in my view wherever I want, that's ok. But what I really want is to add it to the strongly typed object (The empty List from the viewmodel). So i can acces it from my viewmodel parameter in my HTTPPOST method. I'm not a big fan of FormCollection, extra parameters, ViewBags, ...  I'm kinda new to the concept JSON and I couldn't find any good explanation on this on google. Is this possible? Is there another elegant way of solving this issue?

I have a complex JSON object which is sent to the View without any issues (as shown below) but I cannot work out how Serialize this data back to a .NET object when it is passed back to the controller through an AJAX call. Details of the various parts are below.     var ObjectA = {         "Name": 1,         "Starting": new Date(1221644506800),          "Timeline": [             {                 "StartTime": new Date(1221644506800),                 "GoesFor": 200              }             ,             {                 "StartTime": new Date(1221644506800),                 "GoesFor": 100              }          ]     };   I am not sure how this object can be passed to a Controller Method, I have this method below where the Timelines object mirrors the above JS object using Properties.  public JsonResult Save(Timelines person)   The jQuery I am using is:          var encoded = $.toJSON(SessionSchedule);          $.ajax({             url: "/Timeline/Save",             type: "POST",             dataType: 'json',             data: encoded,             contentType: "application/json; charset=utf-8",             beforeSend: function() { $("#saveStatus").html("Saving").show(); },             success: function(result) {                 alert(result.Result);                 $("#saveStatus").html(result.Result).show();             }         });   I have seen this question which is similar, but not quite the same as I am not using a forms to manipulate the data.   I have also seen references to using a 'JsonFilter' to manually deserialize the JSON, but was wondering if there is a way to do it nativly though ASP.NET MVC? Or what are the best practices for passing data in this way?


In our next campaign, I will play a fiend warlock.  I have made a pact with a powerful devil. He will get my soul once I die. In exchange, he gave me a portion of his power. Since the deal, I have matured. I have found religion, and regret the pact.  Thus, I want to avoid dying at all cost. My endgoal would be to become a lich (or achieve immortality another way).  Is this even possible for warlocks, or can only wizards become liches? I have read conflicting information online... How do I go about becoming a lich? Are there fixed rules and requirements, or does my DM have to make it up?

I'm going to play a Warlock character starting at 3rd level. I want to know if he can become a lich. If this is possible, is there something that I must do before he can become a lich,  such as take some spells or skills? I want to change characters after he becomes a lich, so I only need to worry about the the pre-conditions. The DM gave no limits.


I've opened a bounty of 50 reputation on one of my question:  but it didn't receive an answer that could help me from any other Stack Overflow user. After research and development I've found an answer and answered my own question.  The bounty on this question will be lost because I couldn't receive it to anyone else. So my question is now: if a bounty haven't receive the attention that was needed to solve it, could I receive it back?

Timeline:  Asked a question, no (interesting) answers for two weeks  Set bounty on it this morning  Found the answer to my question two hours later. Answered my own question.  Bounty reputation is lost. It was not awarded to me, it was not returned to me (the 100 I invested).   Right now, I feel really stupid for answering my own bounty question.   If this is accepted behavior, then user should be warned - you are answering your own bounty question, your bounty reputation will be LOST.


My Motherboard is Gigabyte . It is written that PCI slots are  1 x PCI Express x16 slot, running at x16 1 x PCI Express x1 slot 2 x PCI slots   And I see one Graphic Card which is of following configuration.  Bus Standard        PCI Express 2.1 Model ID            Radeon HD 5450   Is this Graphic Card compatible with my motherboard?


In section 6.2, in the second paragraph of p. 335 (image below) of  states:      perhaps it is known that $f(x;\Theta)=(1/\Theta)e^{x/\Theta}$   where $x$ is data and $\Theta$ is a parameter.  What does "$;$" mean in this context, as opposed to "$,$" or "$|$", all three are used in different ways in the same textbook ("," and ";" are used on the same page, $|$ in the standard statement of Bayes' Theorem)?  I think I understand "$,$" and "$|$" and I read $f(x,\Theta)$ as "function of data and parameters" and $f(x|\Theta)$ as "function of the data given parameters".   Here is a scan of the page for more context:

What is the difference in meaning between the notation $P(z;d,w)$ and $P(z|d,w)$ which are commonly used in many books and papers?


Map<String,Integer> map; map.put("hey",1);  map.put("k",0);  map.put("thanks",12);   How can I iterate the map entries in order of the second operator (the numbers)? thanks

I am relatively new to Java, and often find that I need to sort a Map<Key, Value> on the values.  Since the values are not unique, I find myself converting the keySet into an array, and sorting that array through array sort with a custom comparator that sorts on the value associated with the key.  Is there an easier way?


Is there an application that I can install in my Ubuntu laptop and will allow me to transfer files via wifi to and from my Android device, which has Zapya installed?

Both my Ubuntu and Android phone are using the same Wi-Fi. How can I transfer files between the phone and the PC? Is there any way to mount the Android file system? I don't want to use the USB cable. Bluetooth doesn't work. So WiFi is the only other option.   The Android version is Jelly Bean and Ubuntu is 12.04 LTS.


I got a Mac given to me. The computer looks good and runs. It was from a business and part of a managed domain. I don't know the username or password. What can I do the access the Mac and change for use at home?

On my mac I have 2 accounts and the both are normal account. So in this moment I don't have a Administrator account, only one that was in the past a administrator, but now is not.  How I can have again a Administrator account?


Is it safe to assume that if a person regularly spells "God" with a lower case letter g for a whole book that he is trying to portray to you that he is not religious?  Why do some writers do this when it is clear that the g should be upper case?

Aside from proper noun usage, like "We're on a mission from God", when should "God" be capitalized? A few examples:   That's a god awful question. Oh my god! No god-damn way. He played the part of the cannibal god   It occurs to me that whenever used for decisive emphasis, by referencing deity, it is effectively functioning as a proper noun as well? For comparison:   That's a really awful question. Oh my stars! (no viable equivalent) He played the part of the cannibal chief   PLEASE, no rants or tangents. This is a grammar question.


If $A$ and $B$ are $n \times n $ $(n \geq  2)$ nonsingular matrices with real entries such that $(A +B)^{-1} = A^{-1} +B^{-1} $ then show that $ \det A = \det B $. Does this also true for complex entries.  my attempt : $(A+B)(A^{-1}+ B^{-1}) = I$ then $I + AB^{-1} +BA^{-1} = 0$ any hint from here how to proceed?

Let $A, B$ be $n\times n$ with $n\ge 2$ nonsingular matrices with real entries such that $$A^{-1} + B^{-1} =(A+B)^{-1}$$   then prove that $\operatorname{det}(A)=\operatorname{det}(B)$.   Also show that this result is not valid for complex matrices.   I'm not getting any way out to solve this. Can anybody solve the problem? Thanks for assistance in advance.


I am trying to create some code that reads a textfile, splits up the text file into smaller chunks, and performs actions depending on what some of the chunks equal to. Here is my example text file.  Derek 19 12 Jake 17 1 God 5000 13   The issue that I am running into is that my if-else statements are being completely ignored and only the else statement at the end is being called upon. I would appreciate it if someone could help me to understand what i am doing wrong. Here is my code(The text file and the code shown are simplified versions of a much larger program that i am working on. I have tested the code to make sure that the error is still there). Any help that anyone could provide would be greatly appreciated.  package testProgram;  import java.io.File; import java.io.FileNotFoundException; import java.util.Scanner;  public class IfElseStatmentTest {  public static void main(String[] args) {     String fileName = "NumberData.txt";     Scanner inputStream = ReadInputFile(fileName);     while (inputStream.hasNextLine()){         String newLine = inputStream.nextLine();         String[] data = newLine.split(" ");         if (data[0] == "Derek")             System.out.println("Hi Derek");         else if (data[0] == "Jake")             System.out.println("Hi Jake");         else if (data[0] == "God")             System.out.println("Hi God");         else             System.out.println("kaboom");     }  }  public static Scanner ReadInputFile(String fileName){      Scanner inputStream = null;     try {        inputStream = new Scanner(new File(fileName));        return inputStream;    }    //display an error message if you have trouble opening the file                 catch(FileNotFoundException e) {        System.out.println("Error opening the file " +                             fileName);         System.exit(0);        return inputStream;    }      }  }   Here is the incorrect output that I am getting  kaboom kaboom kaboom   Here is the output that i am supposed to be getting.  Hi Derek Hi Jake Hi God

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I started the question  but I was not satisfied with the result.  BASIC IDEA:    There is a huge number of new questions each day, part of them unclear, off-topic, duplicate or asked without effort of finding the answer.   AS A RESULT   There is a huge number of duplicate answers, or answers to bad questions just to get reputation   Shouldn't some modification be made to encourage flagging and the quality of the site?

At present if you see a question that may be a duplicate and has an easy answer you can post the answers or post a link to the duplicate question.  (Or the few hi-rep users can vote to close it as duplicate, think of normal users here, not the people that read Meta) It is better for Stack Overflow if a link to the duplicate is posted as a comment, or the user votes to close the question as a duplicate.  However, the user gets more rep if he/she posts the easy answer quickly. I'm thinking of something along the lines of:  First person to post a comment that points to possible duplicate gets some rep if the question is closed as a duplicate and at least 2 of the other closers chose that same dupe question.  Whenever someone votes to close as a duplicate, a “possible duplicate” comment should be posted with a link to the other question, if there is not already a link to it in a comments.  (The system now does this)    As Ether said,  The removal of reputation earned from answering a question that is later closed as a duplicate would at least remove the negative incentive, but is that enough to correct this behaviour? Is a “duplicate finder” badge part of the solution?  A bronze badge for being the first person to vote to close a question as a duplicate with the same “duplicate of” question chosen as most closers choose. A silver badge for doing the same 25 times.  See also  , would also help.  Now that the duplicate can be marked by the OP as helpful, we have another trigger to consider for awarding badges and/or rep.


I have this error:  W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring/main/binary-amd64/Packages  404  Not Found [IP: 91.189.91.14 80] W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring/restricted/binary-amd64/Packages  404  Not Found [IP: 91.189.91.14 80] W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring/universe/binary-amd64/Packages  404  Not Found [IP: 91.189.91.14 80] W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring/multiverse/binary-amd64/Packages  404  Not Found [IP: 91.189.91.14 80] W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring/main/binary-i386/Packages  404  Not Found [IP: 91.189.91.14 80] W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring/restricted/binary-i386/Packages  404  Not Found [IP: 91.189.91.14 80] W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring/universe/binary-i386/Packages  404  Not Found [IP: 91.189.91.14 80] W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring/multiverse/binary-i386/Packages  404  Not Found [IP: 91.189.91.14 80] E: Some index files failed to download. They have been ignored, or old ones used instead. daniele@daniele-XPS-13-9343:~$    when I type sudo apt-get update. How to solve this problem ?

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


What is the difference betwen focal, focal-security, focal-updates? ubuntu@ubuntu:/etc/apt$ cat sources.list deb cdrom:[Ubuntu 20.04.1 LTS _Focal Fossa_ - Release amd64 (20200731)]/ focal main restricted   deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse   deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse   deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse

I see the following lines in /etc/apt/apt.conf.d/50unattended-upgrades. But I'm not able to find the man page for them. Could anybody point me the detailed document for each of them? Thanks.  Unattended-Upgrade::Allowed-Origins {   "${distro_id}:${distro_codename}-security";   "${distro_id}:${distro_codename}-updates"; //  "${distro_id}:${distro_codename}-proposed"; //  "${distro_id}:${distro_codename}-backports"; };