If I have an id:  #my~~id   Q#1: Is there a way to target it using js/jQuery? Ex:  var myid = $('#my' + ~~ +'id')   Update:  The 'duplicate' doesn't address my question about replace as this question isn't about spaces in a id.


May I know how I can create a code coverage for if statement code? Here is my if statement code:     @AuraEnabled     public static void submitFinalApproval(Id recordId) {          //1. RS         if(String.valueOf(recordId).startsWith('a0O')){             update new Return_Shipment__c(Id = recordId, Final_Approved__c = true);          }         //2. VO__c         if(String.valueOf(recordId).startsWith('a0G')){             update new VO__c(Id = recordId, Final_Approved__c = true);          }         //3. RPR__c         if(String.valueOf(recordId).startsWith('a0A')){             update new RPR__c(Id = recordId, Final_Approved__c = true);          } }


I've often seen questions getting questioned and people coming up with anwsers that are totaly irrelevant.  For example, in  I was looking for a library that adds attributes in a certain order to XML documents. Someone on Stack Overflow was asking about this, and all he got was people telling him that this is not XML standard and he shouldn't do that. I needed ordering attributes too because of readability, but all I found were useless answers. I had to ask the question again and provide reason in order to get useful answers.  Providing a reason for a question might be a good thing, but is it really so hard to answer questions, even if who asked did not explain all the details about his reason for asking?


Is this regex is correct for validating email ID

If there are any changes tell me... It should accept general mail ids "xyz@adaf@fa.com" should not accept "xyzadaf@fa.com","xyz@ad.co.in" should accept    function checkEmail(){   var emailFormat = /^[a-zA-Z0-9._-]+[@]{1}[.]{1}[a-z]{2,3}[.]*[a-z]{0,3}$/;   var email = document.getElementById("email").value;   var emailStatus = emailFormat.exec(email);   if(emailStatus == "true"){  alert("success");   }   else(emailStatus == "false"){  alert("Try again");    } }


Continue a Civ5 game over internet that started on LAN

Is it possible to start a multiplayer game of Civ 5 on a LAN connection, save the game in progress, and then at a later point, continue the game over the internet? If so, how can I do this?


I am flying through Dubai INTL. arriving at T3 and leaving on the same ticket (FlyDubai) from T2. I understand the transfer between terminals will happen automatically but I really want to take a shower. There are no showers in T2. Can I stay, take my shower in T3 and then make the transfer?


TeXStudio is overwriting second `\` after automatically having closed a bracket (`\{\text\}` is turning into `\{\text}`)

In general I would like TeXStudio to close my brackets (including {}), but there is always the same problem while using this feature (especially in mathmode): Assuming I want to write something like $\{\hfill\}$ TeXStudio is always ignoring the second \ (because it is overwriting it in the process of typing) and it produces the code $\{\hfill}$. There is obviously a very easy workaround to this problem (by always putting a space after having opened a bracket), but I wonder if there is a way to prevent the second \ to be overwritten (in ALL cases), because I simply do not have any use for this functionality and it is always getting into my workflow and hindering me. I already scrolled through the properties (also the advanced properties), but I haven't found anything useful yet (apart from deactivating the whole "bracket-closing-feature" in auto-completion).  I'd be very thankful for any suggestions.


How to save all parameters of a function as a string?

I am looking to save the input parameters of a function as a string. I am using Python 3.7. I want so save that string for debugging.   What I could do easily would be something like this:  def Model(par1=150, par2=100)  #some processing  return results, par1  parameters = str(par1) + str(par2)   However, I want to be able to automatically save all parameters, even if I add more parameters later. So if I add a par3 = 300 to the function, "parameters" would also contain str(par3), instead of me having to add it manually.   The behavior I would like to have is something like this:  def Model(--any number of parameters--)  #some processing  return results  parameters = --all parameters of Model--   The reason I would like to have it done automatically is that I expect that otherwise it would cause more trouble than it being worse, as I would have to remember to manually change this all the time.  Is it possible to save ALL parameters of a function as a string (or in any other way that lets me easily check later which parameters a function ran with)?


Today I down voted a question on "StackOverflow" for the first time. The user I down voted had a reputation of 1(this means that this user can't take revenge even if it were offended). From that time onwards someone has been down voting the Questions I have asked and the answers I have given. Even the very old ones. Can this be a ripple of my Down Vote. How can I stop this guy or girl. I am quite worried.


It's driving me nuts that using verbatim causes the \end{frame} statement to throw an error. How do I fix this?  LaTeX:  \documentclass{beamer}  \begin{document}     \begin{frame}         \begin{itemize}             \item An item             \begin{verbatim}             some code             \end{verbatim}         \end{itemize}     \end{frame} \end{document}   Error message:  File ended while scanning use of \@xverbatim.   This is supposed to work like that but it doesn't.


If $\lim_{n \to \infty} nx_n=0$, find t such that $\lim_{n \to \infty} x_n(\log n)^t=0$

Let a real sequence {$x_n$}$_{n\ge 1}$ be such that $\lim_{n \to \infty} nx_n=0$ Find all real values of t such that  $\lim_{n \to \infty} x_n(\log n)^t=0$ My approach is $\log n\to \infty$, so $t > 0$, but I am not sure about it. Also, I am not sure how to write the solution.


Prove that if $\chi(G) > k \wedge |\{\operatorname{ad}(H): \text{$H$ is an induced subgraph of $G$}\}|$ then $G$ has a $k-regular$ induced subgraph?

I have found an interesting exercise in my introduction to graphs workbook:  Let $\operatorname{ad}(G) = \frac{2\vert E(G)\vert}{\vert V(G) \vert}$ and $\operatorname{mad}(G) = \max\{\operatorname{ad}(H): \text{$H$ is an induced subgraph of $G$}\}$.  Given a graph $G$ and a number $k \geq 3$, prove that if $\chi(G) > k \wedge \operatorname{mad}(G) \leq k \Rightarrow \exists A \subseteq V(G)$ such that $[A]_{G}$ is k - regular.  I believe this can proved by contradiction:  Given a $G$ and $k$ for which the properties hold, we assume that $G$ has no induced subgraph $H$ that is k - regular. We then prove that if $\nexists H$ then at least one of the property is false and thus we contradict ourselves however I can't quite figure out the connection between $H$ and the mentioned properties.  How would you go about solving this?


Can I install Ubuntu 18.04 LTS with 1 GB ram

Can I install Ubuntu 18.04 LTS with 1 GB RAM. My desktop computer has 2.99 GHz 32-bit CPU and 1GB RAM. What Ubuntu version should I install?


Computational check whether $G\cong \tilde G$

Unless I was mistaken somewhere in the proof, the following claim should hold: Claim. Let $G, \tilde G$ be groups. Then, $G\cong\tilde G$ if and only if there are a set $S$ and two bijections, $f\colon S\to G$ and $\tilde f\colon S\to \tilde G$, such that: $$\tilde f^{-1}(\tilde f(s)\tilde f(t))=f^{-1}(f(s)f(t)), \space\space\forall s,t \in S\tag 1$$ (Operation symbol is omitted in both groups.) As a first test of $(1)$, I'd like to show by brute force that, if $G=\mathbb{Z}_4$, $\tilde G=\mathbb{Z}_2\times \mathbb{Z}_2$ and $S=\{1,2,3,4\}$, then: $$\forall \alpha,\beta =1,\dots,24, \exists i,j \in S \mid f_\alpha^{-1}(f_\alpha(i)+f_\alpha(j)) \ne \tilde f_\beta^{-1}(\tilde f_\beta(i)+\tilde f_\beta(j)) \tag 2$$ where $\{f_\alpha, \alpha=1,\dots,24\}=\operatorname{Sym}(S,G)$ and $\{\tilde f_\alpha, \alpha=1,\dots,24\}=\operatorname{Sym}(S,\tilde G)$, $\operatorname{Sym}(X,Y)$ being the set of bijections from $X$ to $Y$.  Is there any available fast resource to computationally check $(2)$?


This is the problem I have to solve, I tried many times using the definition, but the result is not the one required.  Let $(X_n)_{n\in \Bbb N}$ be a sequence of independent and identically distributed random variables with $ \Bbb P(X_i=0)=p$ and $ \Bbb P(X_i=1)=1-p$ for all $ i \in \Bbb N $. Show that for $ p \in [0,1) $ $ \lim_{n\to \infty} {\sum_{i=1}^n X_i \over \sum_{i=1}^n X^2_i } = 1 $ almost surely.  Thanks in advance


We just ran an external security scan from 403Labs against one of our servers (RHEL 6.3 x86_64) for PCI compliance and the results appeared to mainly dictate that we had a hand full of applications that needed to be upgraded to pass the scan.  That having been said, the problem I am encountering is that the package manager (yum) and the use of the remi repo do not have the versions I need for Apache and OpenSSH. I have already performed the following:  yum update yum --enablerepo=remi,remi-test install httpd mysql mysql-server php php-common   This resolved our critical and high risk results, but the medium level results are still stating that we need to further upgrade the following packages.  The upgrades we need are:     Current            Required Apache 2.2.15 to >= Apache 2.2.23 OpenSSH 5.3   to >= 5.7   So, since the package manager is not capable of letting me upgrade to those versions, how must I go about doing this? I'm currently under the premise that I will need to install from source. If there's a better alternative, please indicate that.  Also, if I have no choice but to install from source, can someone please help me identify what the proper source packages would be so that I know I am installing the correct versions for my OS?  Thank you very much for any help.


How do I determine which is the current user's DE through CLI within SSH or Cron?

Let's assume we have a computer with Ubuntu Desktop installed on it. There are a few desktop environments (DE) installed such as: Unity, Gnome, KDE, XFCE, Mate, etc.   Also few users have their accounts and they regularly using the computer. Each user could change its DE according to its free will :)   How to determinate which is the current user's desktop environment, for certain user, through CLI within limited environment?   This question could be fragmented in this way:   In which file is stored this information? What is the best way to read it through a script executed within an limited environment such as ssh session or cron? How to read this information for random user? I'm finding for one line command solution if it is possible.


Infinitely many positive integers $n$ such that $\phi(n) = \frac{n}{4}$?

Do there exist infinitely many positive integers $n$ such that $\phi(n) = \dfrac{n}{4}$?


Elements on view not working after rendering with ajax call

I have multiple html elements on the view that are loaded with the ajax call. These html elements depends on javascript files that i have included. It is working properly when loaded without ajax but when i load it with ajax it stops working.    jQuery(document).on('submit','form#hc',function(e){     jQuery.ajax({                     'url' : baseUrl+'manage-function',                     'dataType': 'json',                     'type' : 'post',                     'data': {formData : formData},                     success:function(response){                         jQuery('.function_div').html(response.html);                     }                  }); });


If $\operatorname{Re}f^\prime > 0$ on a convex domain, then $f$ is one-to-one.

Let $f(z)$ be analytic on a convex region $D \subset \mathbb{C}$. If $\mathrm{Re}f'(z)>0,\forall z\in D$, then show that $f(z)$ is a one-to-one function, that is, if $z_1\ne z_2,$ then $f(z_1)\ne f(z_2)$.


Running Steam on the Ubuntu 16.10 desktop

I have ubuntu 16.10 on my desktop. I've downloaded steam on my computer after installing ubuntu 16.10 on my desktop and it wasn't working so my friend used chrome remote desktop to uninstall it but it didn't complete and because it was not working and I tried pressing the uninstall button but it got cancelled and after that my friend did something and steam updates got installed but Steam when it was lauched the first time it said  You are missing the following 32-bit libraries, and Steam may not run: libXtst.so.6 libXrandr.s02 libgobject-2.0.so.0 libglib-2.0.so.0 libgtk-x11-2.0.so.0 libpulse.so.0 libgdk_pixbuf-2.0.so.0 Please help me with this


I transferred all of my Pokemon from the PokeBank into Sun/Moon, where is the Nationaal Pokedex?

I just moved all of them into Sun/Moon but the game doesn't seem to notice, even if I move a Pokemon I got from another game into the party.   How do I get the National Dex?


Insert multiples rows/columns - PostgreSQL 9.2

I've got a table that has several columns, But I need to insert data into two columns of that table. I need to add data into those columns, from a select statement.  Would it be something like:  INSERT INTO dm.billables_links (billable_id, mobiuser_id) SELECT billable_id FROM junk.wm_260_billables2 WHERE info ilike '%Alisha%' SELECT id FROM public.ja_mobiusers WHERE name_first LIKE 'Alisha%' AND name_last LIKE 'Dson%'   It has to be in the same transaction because the mobiuser_id must go to the selected billable_id on the first select.  How can I do that?     1 - Select billable_id from dm.billable       2 - Select mobiuser_id from   ja_mobiusers       3 - Insert the billable_id and the mobiuser_id to the   dm.billables_links table.   I've a CONSTRAINT on the target table: (That's why I need to get it done at the same time. So I won't get errors like:      ERROR:  new row for relation "billables_links" violates check   constraint "cc_one_and_only_one_target"   ALTER TABLE dm.billables_links   ADD CONSTRAINT cc_one_and_only_one_target CHECK ((("customer_id" IS NOT NULL)::integer + ("role_id" IS NOT NULL)::integer + ("mobiuser_id" IS NOT NULL)::integer) = 1);   This is related to my previous question - Which I've asked to be deleted because have done the wrong question and it has been confused.   UPDATE 1: This is an example of what I need  1 - select the billable_id: (SELECT1)  SELECT billable_id FROM junk.wm_260_billables2 WHERE info ilike '%Alisha%'   2 - select the mobiuser_id: (SELECT2)  SELECT id FROM public.ja_mobiusers WHERE name_first LIKE 'Alisha%' AND name_last LIKE 'Dadryl%'   3 - Insert those two data into the dm.billables_links table (EXAMPLE):  INSERT INTO dm.billables_links (billable_id, mobiuser_id) VALUES (**SELECT1**, **SELECT2**);


When I look at my Review Progress on the , it tells me that I have edited 27 posts.  However, when I look at my Editor Stats on a , it tells me that I have had 29 edit suggestions approved.  I went through the list of edit suggestions I made, and it seems that I have 27 of them approved.  Why is there the discrepancy between the two?  Is this a bug or am I missing something?


Airmong-ng start wlan0 comment not found

I updated aptitude,  installed aircrack-ng, but still airmon-ng command in not working...


When combining multirow and multicolumn in the same cell of a table I am getting extra vertical lines:  \documentclass[plain]{article} \usepackage{multirow} \pagestyle{empty}  \begin{document}  \begin{tabular}{|l|l|l|l|}\hline   \multirow{10}{*}{numeric literals} & \multirow{5}{*}{integers} & in decimal & \verb|8743| \\ \cline{3-4}   & & \multirow{2}{*}{in octal} & \verb|0o7464| \\ \cline{4-4}   & & & \verb|0O103| \\ \cline{3-4}   & & \multirow{2}{*}{in hexadecimal} & \verb|0x5A0FF| \\ \cline{4-4}   & & & \verb|0xE0F2| \\ \cline{2-4}   & \multirow{5}{*}{fractionals} & \multirow{5}{*}{in decimal} & \verb|140.58| \\ \cline{4-4}   & & & \verb|8.04e7| \\ \cline{4-4}   & & & \verb|0.347E+12| \\ \cline{4-4}   & & & \verb|5.47E-12| \\ \cline{4-4}   & & & \verb|47e22| \\ \cline{1-4}   \multicolumn{3}{|l|}{\multirow{3}{*}{char literals}} & \verb|'H'| \\ \cline{4-4}   & & & \verb|'\n'| \\ \cline{4-4}   & & & \verb|'\x65'| \\ \cline{1-4}   \multicolumn{3}{|l|}{\multirow{2}{*}{string literals}} & \verb|"bom dia"| \\ \cline{4-4}   & & & \verb|"ouro preto\nmg"| \\ \cline{1-4} \end{tabular}  \end{document}     Notice the vertical lines in the char literals and string literals cells (which should span three columns). How can they be avoided?


How do I find the mime-type of a file with php?

Ok, so I have an index.php file which has to process many different file types.  how do I guess the filetype based on the REQUEST_URI.  If I request http://site/image.jpg, and all requests redirect through index.php, which looks like this  <?php    include('/www/site'.$_SERVER['REQUEST_URI']); ?>   How would I make that work correctly?  Should I test based on the extension of the file requested, or is there a way to get the filetype?


Been struggling with this for a while now, just kind of spinning my wheels at this point.  Any help/advice/anything much appreciated.  This is a problem from Wade's Intro to Analysis, chapter 3.  Suppose $f : \textbf{N} \to \textbf{R}$. If $\lim\limits_{n \to \infty}f(n + 1) - f(n) = L$, prove that $\lim\limits_{n \to \infty}\frac{f(n)}{n}$ exists and equals $L$.


I have a binary file and I want to read all of them. I thought, I should find its size and use fread function but I cant find the size. Do you have any idea?  size_t size, size_begin, size_end;  size_begin = fseek(dir_file, 0, SEEK_END); size_end = fseek(dir_file, 0, SEEK_SET);  size = size_end - size_begin;


I feel like I have tried everything, but I also have no idea what I'm doing, so I hope you guys can help me out. I have installed Ubuntu Restricted Extras from the Software center. Shockwave Flash 11.2 r202 is listed in the Firefox Plugins, but flash does not work in my browser. I'm using Ubuntu 14.04.  Ive tried running:  sudo apt-add-repository “deb http://archive.canonical.com/ $(lsb_release -sc) partner”   in terminal, but it returns   Error: need a single repository as argument   I'm a complete noob to any of this, so help is much appreciated.  Thank you.


Code sample not syntax highlighted in edit mode, but is highlighted after posting

When viewing my post in edit mode, the code blocks do not have syntax highlighting, even after .  After submitting it,  does have syntax highlighting.   I can also get the syntax highlighting to update in edit mode if I explicitly add the <!-- language: lang-c# --> before the code block, but without it will never update with highlighting.  Is this considered as a bug? Sometimes I take some time to find why the code is not being syntax highlighting and I find it difficult to reviewing my code blocks in edit mode without it.  Update: Syntax highlighting seems to work in the preview when I modify an already-posted post in just about any way {, }, but for new posts it just refuses to work unless given a language hint.


/give command will not work if i add enchantments or attributes

I'm using a Minecraft give command generator since I can't format the commands myself. What I'm trying to do is:  /give @p diamond_sword{Damage:1000} 1   or  /give @p minecraft:diamond_sword{Enchantments:[{id:sharpness,lvl:2000}]}   But every time I try that command I get the error: Unknown item name  I have no idea what to do with this issue or where to search about it.  I'm trying all these on my Minecraft Bukkit Server version 1.14.4.


How can I recursively copy files by file extension?

I would like to copy all files with a certain extension that are in sub directories to a different folder. I don't want to maintain the directory structure, I just want to copy all files found to a different folder.  I used this command to do it:  cp `find . -name "*.aac"` /media/moasad/New\ Volume/Media\ files/Avengers/Aud/aac/   However, I noticed that If it runs into folders or files with spaces in them the cp function doesn't know what to do and I get an error something like this:  cp: cannot stat ‘./Temporary_Items/martin/Problem’: No such file or directory cp: cannot stat ‘Files/nav-YCA136843.aac’: No such file or directory   Notice that its one file: ./Temporary_Items/martin/Problem Files/nav-YCA136843.aac  But because of the space in "Problem Files", it's confused.


How can you use type of a variable in Python3 as a condition in a while loop?

I'm a beginner in python. I'm trying to use type of a variable type as a condition in the while loop before getting to the clause.   while ((str(type(number))!='<class \'int>'):   try:   number=int(input())     except ValueError:    print('you must enter an integer only')   So what I expected was that the while loop would check if the type of variable number is an integer, then if it is, it would input the new value of number. Otherwise it would show an error, say for float type or str type entries. But it is showing an error like this:   File "C:\Users\nanda\Desktop\hello\collatz.py", line 21 while ((str(type(number))!='<class \'int>'):                                            ^ SyntaxError: invalid syntax   I cannot think of any sytax errors. If there is some other way to pass the type of variable into the condition of the while loop, please share it. If someone can point out the syntax errors, that is just as fine.


How do I duplicate a whole line in Emacs?

I saw  and it has been something that I myself wanted to know how to do for Emacs. In ReSharper I use CTRL-D for this action. What is the least number of commands to perform this in Emacs?


How to Force Quit a not responding application?

VLC doesnt quit. How do I force quit the application?


In machine learning, we let $X$ be a real-valued input vector and $Y$ be a real number output, with joint distribution $P(X,Y)$. We are looking for a function $f(X)$ for predicting $Y$ given the values of $X$. In most of machine learning problems, we give penalty for each time that the prediction is wrong. The loss function is defined as follows:  $L(Y,f(X))=(Y-f(X))^2$.   The expected square prediction error is given as:   $$EPE(f) = E(Y-f(X))^2 = \displaystyle\int [y-f(x)]^2P(dx,dy). $$    The book I'm reading says: By conditioning on $X$, we can write EPE as $EPE(f) = E_XE_{Y|X}((Y-f(X))^2|X)$, and eventually getting a solution that is $f(x) = E(Y|X=x)$.   I'm not sure I follow what happened in these steps. Please help me with the derivation.  Thanks


Where can I post a job listing to outsource a graphic design project?

I'm on the stage of hiring a graphic designer for my Android app and I was thinking that it will be a better idea to hire the right person for this task. I know about websites as elance, odesk, etc that have sections for graphical design jobs.  Are there any other sites on which to post a graphical designer job?


the for loop is not being covered... I would like to know why. Thanks! Here the test:      @IsTest public static void testSaveDistriverloren()     {     Priority_Distribution__c fetchPd = new Priority_Distribution__c(distriVerloren__c =      FALSE, Products_list__c='Lucky Strike Original', Item_Number__c=2003);      insert fetchPd;      Boolean distri = TRUE;      Priority_Distribution__c checkDistriVerloren = new Priority_Distribution__c();     checkDistriVerloren= [SELECT distriVerloren__c FROM Priority_Distribution__c WHERE      Item_Number__c=2003 AND Account__r.Id =: fetchPd.Account__r.Id];     checkDistriVerloren.distriVerloren__c = distri;     update checkDistriVerloren;     Test.startTest();         try {             PriorityTableController.saveDistriVerloren(distri, 2003, fetchPd.Account__r.Id);         } catch (Exception ex){}    Test.stopTest(); }


Do you always Capitalize after a question mark?

I'm about to send out some questions to someone.  How was it starting your own business? tougher,easier than you had expected?   Does "tougher" need to become "Tougher"?


Find all integers $a$ for which $x^2-x+a$ divide $x^{13}+x+90$.  The answer is $a=2$.


Why only 1 component of angular momentum?

Griffiths says that you can have only 1 well defined component of the angular momentum because of the uncertainty principle. From the uncertainty principle, we get that  $$ \sigma_{L_x}\sigma_{L_y} \geq \frac{\hbar}{2}|\langle L_z\rangle | $$  If we know $L_z$, can't we make $\sigma_{L_x}$ as small as possible while letting the deviation in the $y$ component get bigger, essentially making it so that we know 2 components?  Also from the uncertainty principle,  $$ \sigma_{L_y}\sigma_{L_z} \geq \frac{\hbar}{2}|\langle L_x\rangle | $$  So if we know the $z$ component, that means its deviation is zero, making the right hand side $\langle L_x \rangle$ zero as well?


Global variable in Python : Getting NameError while performing a comparison

I am trying to implement SAX parser in python. Reading the XML and creating objects. Below is my code.  import xml.sax  class Employee :     def __init__(self, id):         self.id = id   class EmployeeHandler(xml.sax.ContentHandler):      emp = None     emplist = []     fName = False     lName = False     age = False     company = False      def __init__(self):         xml.sax.ContentHandler.__init__(self)      def startElement(self, name, attrs):         print("startElement '" + name + "'")          if name == "Employees" :             global emplist             emplist = []          if name == "Employee":             global emp             emp = Employee(attrs.getValue("id"))         elif name == "FirstName":             global fName             fName = True         elif name == "LastName":             global lName             lName = True         elif name == "Age":             global age             age = True         elif name == "Company":             global company             company = True      def characters(self, content):         print("characters '" + content + "'")         global fName, lName, age, company         if fName is True:             emp.firstName = content         elif lName is True:             emp.lastName = content         elif age is True:             emp.age = content         elif company is True:             emp.company = content        def endElement(self, name):         print("endElement '" + name + "'")         if name == "Employee":             #global emplist : To use list methods global is not required             emplist.append(emp)   def main(sourceFileName):     source = open(sourceFileName)     xml.sax.parse(source, EmployeeHandler())   if __name__ == "__main__":     main("EmployeeData")     print("Ids ", emplist[0].id , emplist[1].id)   While executing the code I am getting the below error :   File "C:/Users/611834094/PycharmProjects/PractiseProject/xml_pratise/saxparser.py", line 47, in characters     if fName is True: NameError: name 'fName' is not defined   To be precise the below block is raising the error :  def characters(self, content):     print("characters '" + content + "'")     global fName, lName, age, company     if fName is True:         emp.firstName = content   The variable fName (along with other global variables) are defined with an initial value which is getting changed in the startElement() method of the handler, in the characters method, I am trying to compare the value of fName against True (boolean), I am getting the error as mentioned above.  Thank you


How to (re)enable the "New" context menu items for an administrator when right-clicking in a folder and selecting New > X?

I just migrated from XP x86 to Win7 x64  (clean install). I had a couple of data drives in my XP x86 system that I physically moved to my Win7 x64 system.  When browsing a directory in any of the transferred drives, the only option available in the 'new' context menu is "Folder", i.e., Right-Click inside a folder > New > Folder (this is similar behavior for Win7 when using the context menu in c:\Program Files):    However, whenever creating a new folder within any of the directories, all the context menu new items are available within the new folder:    Steps I've taken that have failed to add the new context menu items:   Removing all security permissions from a directory and sub-directories. Replacing them with new permissions. As well as removing inheritable permissions from the parent. Taking explicit ownership of a directory and sub-directories. Combing the above two.   Sample of Effective Permissions that do not work:    Steps I've taken that have succeeded to add the new context menu items:   Adding the "Everyone" group to the drive and giving the group explicit "Modify" privileges.   Giving the "Everyone" group explicit privileges smells wrong. I'm an administrator on my system; why should I have to add the "Everyone" group as well?  Adding my username to the drive and giving full permissions.   Again, since I'm an administrator on my system and the administrators group already has full control of the drive/directories/folders, why should I have to explicitly add my user name to the security permissions?    Finally, The Question:  Is it possible to have the New Item context menu have all available options by default without having to explicitly add the everyone group or a specific user name to the security permissions?  I'm suspecting that the option may not be available unless the username is explicitly added to the security permissions.  Of note: I've seen the registry hacks for updating the new items context menu; my preference is to avoid such hacks and return the functionality to the expected behavior an administrator should have.


Start a task an hour after Windows started

I only found answers to start a task every hour or similar, but my need is different.  My mother-in-law's PC is quite slow to start, so I think it would be a good idea to postpone things that are non-essential.       Can I put programs in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup so that they are started an hour later?


Where Exactly are Apple Diagnostics Results Stored on Disk

I know that on macOS you can access the last run Apple Diagnostics test in System Information, as seen in the image below.    You can also access reference codes in the Terminal using system_profiler SPDiagnosticsDataType | grep "Reference Code".  Where on disk is this information actually stored? Or how could I use Finder to access this information? I understand there are a few other questions that are asking about software diagnostics, but I am looking specifically for hardware diagnostic results. I have checked the following directories already, and have not found the Apple Diagnostics results.  ~/Library/Logs/DiagnosticReports  /Library/Logs/DiagnosticReports  ~/Library/Logs  /Library/Logs  /private/var/log  Thanks in advance!


Can't Boot Windows 7 Pro after installing Ubuntu 16

I've had Windows 7 and Ubuntu 16 installed as a dual for some time now running well until I made a stupid move by being curious to see if my new arrived Qubes3.2 would run live from the disc on boot-up.Once I got into system of Qubes I couldn't get out of it, so I shut down the system. Went to reboot again with out Qubes USB into windows 7 or Ubuntu but none were present just Qubes error message, sorry did not write them down. After that I decided to use my Ubuntu 16 USB thought maybe I could restore system so I ran the Boot-Repair " I was unable to see this in the Unetbootin software to download on disc, they may have change the name' so I install via commands. Ran the system this is what the output is:  Now it did bring back the Ubuntu OS in boot-up but not the Windows 7...Any help would be appreciated...


difference between 'introduction to' or 'introduction of'

I will be giving an introduction to Historians or introduction of Historians. Which one is correct? 'to' or 'of'?


So, everything I see seems to indicate that "sales price" is the correct way to refer to the price that one pays for a house or similar type of property. However, would it not be better as "sale's price", being that the price "belongs" to the sale of the property thus making the word "sale" possessive? In the same way that you might call any details of the sale (including the price) the "sale's details"


While loop exiting when condition to continue in the loop is met

Whether i enter a "y" or a "n" the program exits the while loop. I tried changing some of the == to .equals but then no matter what i entered the loop kept going.  System.out.println("Just Cycling Caps provides three types of caps: Small caps – ID: 1 Price: $4.50, Medium caps – ID: 2 Price: $7.00, and Large caps – ID: 3 Price: $9.00"); continueOrder = "y"; //While loop to get items ordered while(continueOrder == "y"){   //get desired cap size and quantity   System.out.println("Enter the ID of the item you would like");   capSize = reader.nextInt();   if(capSize == 1){     price = 4.5;     System.out.println("How many small caps would you like?");     quantityOfSmall = reader.nextInt();     priceOfSmall = quantityOfSmall * price;   }   else if(capSize == 2){     price = 7.0;     System.out.println("How many medium caps would you like?");     quantityOfMedium = reader.nextInt();     priceOfMedium = quantityOfMedium * price;   }   else if(capSize == 3){     price = 9.0;     System.out.println("How many large caps would you like?");     quantityOfLarge = reader.nextInt();     priceOfLarge = quantityOfLarge * price;   }   //Ask the user if they would like to continue ordering   System.out.println("Would you like to purchase another product? (y/n)");   continueOrder = reader.next();   continueOrder = continueOrder.toLowerCase(); }


example of discontinuous function having direction derivative

Is there a function (non piece-wise unlike below) which is discontinuous but has directional derivative at particular point? I have a manual that says the function has directional derivative at $(0,0)$ but is not continuous at $(0,0)$. $$f(x,y) = \begin{cases} \frac{xy^2}{x^2+y^4} & \text{ if } x \neq 0\\  0 & \text{ if } x= 0 \end{cases}$$  Can anyone give me few examples which is not defined piece wise as above?


How to prove this sequent using natural deduction?

How do I prove $$S\rightarrow \exists xP(x) \vdash \exists x(S\rightarrow P(x))$$ using natural deduction? Just an alignment of which axioms or rules that one could use would be much appreciated.


Theories that Relate Gravity, Electricity, and Magnetism

There are some people who (without having a stated theory that I know of) insist that Gravity, Electricity, and Magnetism are related. Some point to symmetry in Maxwell's Equations as a potential indication of this (intuitive) connection. Is it possible that there are "Maxwell-like" equations that relate Electricity and Magnetism directly to Gravity? All forms of electromagnetic energy do interact with gravity. Are there any physicists who are working on this sort of theory?


$$ \begin{cases}xy^2\sin\left(\frac 1 y\right), \text {if $y$ $\neq$ 0} \\ 0, \text{if $y$ = 0} \end{cases}$$  I'm not sure how to work out this limit as $x$ goes to infinity. If it were just the y part, I know that $y^2$ goes to 0 and $\sin$ is a limited function, so it has to go to 0, but I don't know what to do with the $x$ term.


I have used this command mentioned below to find the files and move it in a folder: $ find . -maxdepth 1 -name "Screen*.png" -exec mv ./ScreenShot/ {} +  This is showing this error: usage: mv [-f | -i | -n] [-v] source target        mv [-f | -i | -n] [-v] source ... directory


Which is more optimal: `new` or `calloc`?

I use calloc, I've read that, calloc internally calls new handler, so what should I go for?   Should I use new operator(which allocate fast) or calloc(which can allocate and initialize memory as well)?


Loading external GeoJSON file into Leaflet map?

I would like to load a geoJSON (polygon) file into my leaflet map. I have seen examples where geoJSON is embedded into the javascript code but I can't find any examples showing how it is done with an external file.        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">     <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.css" />                  <div id="map" style="height: 100%"


I am struggling with using the correct test for count data in R. The dataset I have is the number of nymphs produced by three aphid species on wheat.  So this is count data with one response variable (number of nymphs) and one explanatory variable with three levels (i.e. three different species).  I want to test whether there are any differences between the three species with the number of nymphs they produce.  I think that I should not use an ANOVA with count data. I have tried a GLM with QuasiPoisson, but I am struggling to interpret the output and be sure that I have used the correct test. Essentially I want to equivalent for a one-way anova but for count data.


What happens if I add a single quark to a system of hadrons?

In pure QCD in the confinement phase what happens if I add to a system of baryons, which are quarks in the condensed phase, another quark? It doesn't have any quark or antiquark to form a baryon or a meson so how does confinement work in this case?


Closing a laptop top and keeping ubuntu running

I have a Lenovo Edge E130 and a problem with Ubuntu 14.04. If I close the top the OS is sent to sleep mode. I would like to keep Ubuntu running. What exactly is the cause of this behavior?


Can't figure out what is causing the dereference null object error?

The code below keeps throwing a dereference null object error. I've tried making changes to make sure the item isn't empty but I am still getting this error. It is driving me insane. This code is supposed to check if the value in the BillingPostalCode field matches a value in a field called "Name" in a custom object called DMA_Value__c, if it is it should return the value from the DMA_Value__c field in the custom object to a DMA field on the account.I have looked at the other questions that are said to be duplicates, but those do not give me the answer I need. I've tried putting the suggestions into the code to catch null values. Now that I have done that I'm confused as to how it could still have this error. Maybe a better explanation of what this error message means would help.  FIRST ATTEMPT   trigger UpdateDMAAccount on Account (before insert, before update) { //get set of Postal Codes from leads to be inserted or updated Set<String> BillingpostalCodes = new Set<String>(); for(Account l : trigger.new){ if(l.BillingPostalCode != null){     BillingpostalCodes.add(l.BillingPostalCode);  } } if(BillingpostalCodes.size() >= 0){ //create Map of custom object records with Name (PostalCode) as key Map<String,DMA_Value__c> validBillingPostalCode = new Map<String,DMA_Value__c>(); for(DMA_Value__c obj : [SELECT Id, Name, DMA_Value__c FROM DMA_Value__c WHERE Name IN :BillingpostalCodes]){     validBillingPostalCode.put(obj.Name,obj); } for(Account l : trigger.new){     if((Trigger.isInsert || trigger.oldMap.get(l.Id).BillingPostalCode != l.BillingPostalCode) && validBillingPostalCode.containsKey(l.BillingPostalCode)){         //not sure what this field is called         //Market2__c or Market_3__c         l.DMA__c = validBillingPostalCode.get(l.BillingPostalCode).DMA_Value__c;     }     else if(trigger.oldMap.get(l.Id).BillingPostalCode != l.BillingPostalCode && !validBillingPostalCode.containsKey(l.BillingPostalCode)){         //blank value if new PostalCode does not match a record in the Map         l.DMA__c = NULL;     }   }  } }   SECOND ATTEMPT  trigger UpdateDMAAccount on Account (before insert, before update) { //get set of Postal Codes from leads to be inserted or updated Set<String> BillingpostalCodes = new Set<String>(); for(Account l : trigger.new){ if(l.BillingPostalCode != null){     BillingpostalCodes.add(l.BillingPostalCode);  } } if(BillingpostalCodes.size() >= 0){ //create Map of custom object records with Name (PostalCode) as key Map<String,DMA_Value__c> validBillingPostalCode = new Map<String,DMA_Value__c>(); for(DMA_Value__c obj : [SELECT Id, Name, DMA_Value__c FROM DMA_Value__c WHERE Name IN :BillingpostalCodes]){     validBillingPostalCode.put(obj.Name,obj); } for(Account l : trigger.new){     if((l.BillingPostalCode != NULL && trigger.oldMap.get(l.Id).BillingPostalCode != l.BillingPostalCode) && validBillingPostalCode.containsKey(l.BillingPostalCode)){         //not sure what this field is called         //Market2__c or Market_3__c         l.DMA__c = validBillingPostalCode.get(l.BillingPostalCode).DMA_Value__c;     }     else if(l.BillingPostalCode != NULL && Trigger.isInsert && !validBillingPostalCode.containsKey(l.BillingPostalCode)){         //blank value if new PostalCode does not match a record in the Map         l.DMA__c = validBillingPostalCode.get(l.BillingPostalCode).DMA_Value__c;              }     else if(trigger.oldMap.get(l.Id).BillingPostalCode != l.BillingPostalCode && !validBillingPostalCode.containsKey(l.BillingPostalCode)) {         //blank value if new PostalCode does not match a record in the Map         l.DMA__c = NULL;     }   }  }


How to get unique xpath with dynamic @id?

Hi I am facing problem to identify cause @id is dynamic :-  //div[@id='SubmissionWizard:LOBWizardStepGroup:LineWizardStepSet:WC7LineCoverageScreen:WC7LineCoverageCV:WC7ConditionsDV:5:CoverageInputSet:ConditionInputGroup:PolicyOwnerOfficerLV-body']//tr[RowIndex]//td[ColIndex+5]/div[@class='x-grid-cell-inner ']   In the above @id is   SubmissionWizard:LOBWizardStepGroup:LineWizardStepSet:WC7LineCoverageScreen:WC7LineCoverageCV:WC7ConditionsDV:5:CoverageInputSet:ConditionInputGroup:PolicyOwnerOfficerLV-body   In second attempt @id is   SubmissionWizard:LOBWizardStepGroup:LineWizardStepSet:WC7LineCoverageScreen:WC7LineCoverageCV:WC7ConditionsDV:6:CoverageInputSet:ConditionInputGroup:PolicyOwnerOfficerLV-body   I cannot use contains also because similarity is there, so I need to handle this numbers before coverageInputSet.


Let $f(z); z = x + iy,$ be an analytic function and $u$ be its real part. If   $u$ is a polynomial in the variables $x$ and $y,$ then show that $f(z)$ is a   polynomial in $z.$   I need to confirm my attempt: $u,v$ must satifies the C-R equation. So, $u_x=v_y\implies v=\int u_x dy,$ a polynomial in $x,y.$ Consequently $f=u+iv$ is a polynomial in $x+iy.$


Getting " when trying to replace a character in string

I want to replace " from a string with ^.  String str = "hello \"there"; System.out.println(str); String str1 = str.replaceAll("\"", "^"); System.out.println(str1); String str2= str1.replaceAll("^", "\""); System.out.println(str2);   and the output is :  hello "there hello ^there "hello ^there   why I am getting extra " in start of string and ^ in between string  I am expecting:  hello "there


Change Steam account email address, having lost access

How do you change an unverified Steam email address, with no access to the cell phone number and email address for the Steam account?


How to run 2 different computers with one CPU and using VMware

I have a good CPU i7 4.4ghz 16 GB ram and 6GB 1060 Graphics card. Also, I have an old i5 laptop. Is there any way for the laptop to run using my CPU resources simultaneously? I am short on funds and my girlfriend needs to work on my PC but we both have work. My CPU is always underutilized. So wondering is it possible to work on my laptop but use my CPU resources such as processing speed and graphics card


I had installed and updated the libimobiledevice, and now, ubuntu can see my iphone after connected. Great to have this libimobile device tool.  From Banshee or Rhythmbox, can see music in my iPhone.  But,the music files only can move one way. I cannot save the music files into the iPhone. Only the music files can be copied out from iPhone into the harddrive of ubuntu.  What's wrong with my setup? Or this is the bottleneck of current libimobiledevice? Thanks for your advice.


How to get rid of light desktop manager entry in Ubuntu greeter

I've got a "light desktop manager" entry in Ubuntu greeter for some strange reason, and I can't get rid of it. As the current OS is Ubuntu 13.10 the way to configure the lightdm greeter is rather strange, and I can't find any solution in greeter configs.  A more annoying thing is that LDM seems to have password very hard to guess so I can't login to this "account".  Can you help me to find what is causing this problem and find the solution?


Python adds line break to unexpected place

Im making script to find directory paths from file to form ant mkdir elements from that.  The problem is that when I print at the end there is linebreak added inside each line:  ant_mkdir = '<mkdir dir="..' + path + '"/>'   code:  from io import open from string import * def main():     with open("file.txt", "r") as f:         content = f.readlines()      paths = []     for line in content:         if ("d:\\apps" in line):             line = line.split("d:\\apps")             path = line[1]             path = path.replace("\\", "/")             if path not in paths:                 paths.append(path)      for path in paths:         ant_mkdir = '<mkdir dir="..' + path + '"/>'         print ant_mkdir  if __name__ == "__main__":     main()   print result:  <mkdir dir="../path/folder/1 "/> <mkdir dir="../path/folder/2 "/> <mkdir dir="../path/folder/3 "/>


Difference between normalization and normalisation

Regard this . I used normalization instead of normalisation.  Google says "Normalisation is the process of taking data from a problem and reducing it to a set of relations while ensuring data integrity and eliminating data redundancy. Data integrity - all of the data in the database are consistent, and satisfy all integrity constraints."   And "Database normalization, or simply normalization, is the process of organizing the columns (attributes) and tables (relations) of a relational database to minimize data redundancy."     Can you explain it in formal way, please?


create array object with elements BufferedReader and BufferedWriter

I'm trying to create a return object that contains a BufferReader and a BufferWriter.  Here are my two classes:  test.java  package FileIO;  import java.io.*;  public  class Test{      static String line = null;     public static void Main() {         String fileName = Input.getInput();          Object[] ioObject = new Object[2];         ioObject = OpenFile.openFileName(fileName,"READ");                BufferedReader bufferedReader = ioObject[0];            do{            //line = null;             line =  ReadLine.getLine(bufferedReader);             System.out.println(line);         } while (line != null);    }     }   OpenFile.java  package FileIO;  import java.io.*;  public class OpenFile {     static Object[] ioObject = new Object[2];     static BufferedReader bufferedReader = null;     static BufferedWriter bufferedWriter = null;     public static Object[] openFileName(String fileName, String type){          if(type == "READ"){             try{              // FileReader reads text files              FileReader fileReader =  new FileReader(fileName);              // Always wrap FileReader in BufferedReader.             bufferedReader =  new BufferedReader(fileReader);             ioObject[0] = bufferedReader;             System.out.println("you lucky dog, file " + fileName + " was found");            }catch(FileNotFoundException ex) {             System.out.println("FATAL ERROR: File " + fileName + " not found");              System.out.println(ex);          }        }else if(type == "WRITE"){               }else{          System.out.println("FATAL ERROR: type input can only be READ or WRITE");                  System.exit(0);       }        return ioObject;    } }    I'm getting an error on this line in test.java:  BufferedReader bufferedReader = ioObject[0];    incompatible types object can not be converted to BufferedReader.  I'm confused as ioObject[0] is a BufferedReader.


I've just been awarded the  bage!  Whooo, go me (didn't even realise it existed)!  =D I'm curious to know which of my (all rather mundane) comments has brought for me such honour. I found , which suggests using .  However, that query shows that I have only 2 comments with a score of 5 or more and I can't see anything wrong with the query... Do I not deserve this shiny new badge?  :(


Finding the moment of inertia of a lever

I am required to find the moment of inertia of the lever for a project in physics. This is my attempt:  Please note that we have not been taught this yet in class so i have not been taught this officially yet.   The seperate radiuses are the distance from the fulcrum to the end of each side of the lever.  $L = 1.57m$  $r_1 = .97m$  $r_2 = .6m$  $M_{total} = 2.3 kg$  $$ I = \frac{M_{total}}{L}\int_{0}^{.97} x^2 dx + \frac{M_{total}}{L} \int_{0}^{.6} x^2 dx $$  $$ I = \frac{M_{total}}{L}[\frac{.97^3+.6^3}{3}] $$  $$ I = \frac{2.3(.97^3+.6^3)}{4.71} = \frac{165347}{300000} $$  But this seems way too easy? Am i doing something wrong?


Let $x_0=a,x_1=b$     $$x_{n+1}=\Big(1-\dfrac{1}{2n}\Big)x_n+\dfrac{ x_{n-1}}{2n}, n\ge1$$   Find $\lim x_n.$  If the limit exists, I can plug limit as $l$ to get a equation of $l$, whose root will be the limit. But in this case it becomes a identity. I am not familiar about how to compute such a limit. Please Help.


This morning I attempted to upgrade from 19.04 to 19.10.  However, during the upgrade my laptop went to a black screen with a blinking dot in the top right corner.  It stayed like this for hours.  I then forced a shutdown.  Now when I boot the laptop up it goes to a blank screen an will not fully boot up.  I am running a dual boot with windows 10.  I can still boot up windows. Can I attempt to do a full install of 19.10 from a USB drive?  Or what do you recommend?


Where did the Programmers Stack Exchange site go?

Wasn't there a Programmers Stack Exchange site? A site different from Stack Overflow, of course. I don't see it listed.


What is your Instagram password when signing in using Facebook?

Do this:   On your phone, create an instagram account using Facebook log in. Now on your desktop web browser, log in using Facebook connect.  Now go to delete your account - edit profile -> I'd like to delete my account.    It will ask for your password.   But you never gave it a password in order to create the account.   I tried using my Facebook password, but that didn't work.   Any ideas? The Instagram account management seems quite broken.


Show that $(2,0,4) , (4,1,-1) , (6,7,7)$ form a right triangle


Looking for animated movie with a scene where a young man makes flowers grow from his father's hair

This was a movie I saw as a young child, which means it was probably made in the 80's or earlier, though conceivably it could have been early 90's.  It was animated, but I don't recall if it was Japanese or Western.  The scene I remember most clearly is a young man coming to a house where an older man and woman live; I believe it was a son coming home to his parents.  However, he now serves some sort of monstrous big-bad and has magical powers.  I remember he made flowers grow out of his father's hair and one grow out of his nose.  His mother brushes away the flowers from the hair but not the one on the nose.  Later, the big bad has some evil scheme going on that turns humans into these nondescript block people that look like they are crude stone carvings of people.  They all start marching together, and you can tell that one of them is the boy's father because it still has a flower coming out of its nose.  I also remember a scene where the block people are climbing on each others' shoulders to make a big tower, and I think the main badguy is inside.  The badguy himself is some sort of ghost or monster - I don't remember specifically, but I'm pretty sure he was non-human.  There might have been a unicorn as a major character in this story, but I may be confusing it with a different movie.  Does anyone know what show I'm talking about?


Show that in a Matrix A, if the sum of the elements in the row for each row is u, then u is an eigenvalue

I have to show that given the matrix A equal to:  $$\pmatrix{a_{11} & \dots & a_{1n} \\ \vdots & \ddots & \vdots \\ a_{n1} & \dots & a_{nn}}$$  Where:  $$ \sum_{j =1}^{n} a_{ij} = u, \forall i \in \{1, \dots, n\} $$  Then $ u $ is a eigenvalue, and then get his corresponding eigenvector....  I tried to show that checking if $ A \vec{v} = u \vec{v} $ or $ \det{(A - uI)} = 0 $, but I couldn't conclude anything....  How can I conclude that $ u $ is a eigenvalue?


Installed Ubuntu, now I get "fatal err. not os detected

I installed Ubuntu. Now I get:   "fatal err. not os detected.   I cant boot from dvd either  What can I do?


How do I create a self-signed certificate for code signing on Windows?

How do I create a self-signed certificate for code signing using tools from the Windows SDK?


multi line equation with full left brace, small right brace and text at right bottom of right brace

I want to write a three line equation with left curly brace for all three, right curly brace for bottom two ones and some text at right bottom of right curly brace. All with proper alignment. I wrote following code.  \documentclass{article} \usepackage{amsmath,amssymb,amsfonts} \usepackage{flexisym}  \begin{document}  \begin{equation*}     \begin{aligned}         K_{\mathbb{A}_{Ui}} =\begin{cases}             D                =\ g^{ \frac{ (\alpha + r) }{\beta} }\\             \left.\begin {aligned}                 &D_j           &=\ &g^r . H(j)^{r_j} \\                 &D_j\textprime &=\ &g^{r_j}             \end{aligned}\right\} \forall j \in   \mathbb{A}_{Ui}         \end{cases}         \end{aligned}     \end{equation*}  \end{document}   It is giving some problems.   Second and Third lines are aligned but they are not aligned with the first one. I want alignment to occur at start of "D", "=" and "g" for all three. Right now, the text at right of right curly brace is coming at center. I want it to shift down and come at bottom.   Please help. Thanks in advance.


how to find all faces linked to a specific face

I need to find all parts of a mesh which are separated by seams, or which are unconnected sub meshes. As an illustration see the following image:  I need to get the sets of faces for each of the 5 shown mesh areas. How can i do that in a convenient way with Python?  I found this operator:  bpy.ops.mesh.select_linked(limit=True)   But maybe bmesh could provide a better way to go here ?


I figured out a method to abuse the Association Bonus, however I'm unsure whether or not this is a serious issue. Are there anti systems in place that prevent this?       Prerequisites: 1 account with the Association bonus, and 1 account with 100 reputation on a different site.      Step 1: Create a bounty on the first account using the association bonus on the site on which the second account has 100 reputation, and award it to the second account.  The second account now has 200 reputation and will receive the Association Bonus.    Step 2: Abuse the bounty system to give the association bonus from the second account back to the first.    Step 3: Create a third account, and again abuse the bounty system to gift 200 reputation to it from the second account.  Step 4: Repeat steps 2 and 3 in order to gain infinite reputation.    Step 5: Give the 200 reputation back to the first account.    Please don't actually do this.


Swipe to delete Recyclerview brings about a null object reference error

I am working with a recyclerview and am implementing swipe to delete. the code works pretty well but when I try getting my list from the adapter so that I implement swipe to delete, I get a null object reference.  My adapter class is below  public class TlAdapter extends RecyclerView.Adapter<TimelineVholder> { private List<FetchModel> models; private Context context;   public TlAdapter(List<FetchModel> models,Context context) {     this.models = models;     this.context= context; }  @NonNull @Override public TimelineVholder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {      View view= LayoutInflater.from(context).inflate(R.layout.timeline,parent,false);     return new TimelineVholder(view,viewType); }  @Override public void onBindViewHolder(@NonNull TimelineVholder holder, final int position) {     SharedPreferences preferences= PreferenceManager.getDefaultSharedPreferences(context);     final SharedPreferences.Editor editor=preferences.edit();          FetchModel list= models.get(position);          String activity= list.getJournalEntry();         String time= list.getTime();          holder.activity.setText(activity);         holder.time.setText(time);  }  @Override public int getItemViewType(int position) {     return TimelineView.getTimeLineViewType(position,getItemCount()); } @Override public int getItemCount() {      int arr=0;     try {         if (models.size()==0){             arr=0;         }         else {             arr=models.size();         }     }     catch (Exception e){}     return arr; }  public List<FetchModel> getkey(){     return models; }   }  and my recyclerview gesture class is as below  public class RecyclerViewBasic  { private Context context; private List<FetchModel> modelList; public RecyclerViewBasic(Context context) {     this.context = context; } public void recyclerGesture(){     new ItemTouchHelper(new ItemTouchHelper.SimpleCallback(0,             ItemTouchHelper.RIGHT|ItemTouchHelper.LEFT) {         @Override         public boolean onMove(RecyclerView recyclerView,  RecyclerView.ViewHolder                 viewHolder, RecyclerView.ViewHolder target) {             return false;         }          @Override         public void onSwiped(RecyclerView.ViewHolder viewHolder, int  direction) {             int position= viewHolder.getAdapterPosition();              TlAdapter adapter= new TlAdapter(modelList,context);              modelList= adapter.getkey();             modelList.remove(position);             adapter.notifyDataSetChanged();          }     }).attachToRecyclerView(recyclerView);  }   and the error in my logcat is as below also  06-29 13:19:41.691 4282-4282/com.revosleap.journal E/AndroidRuntime: FATAL EXCEPTION: main Process: com.revosleap.journal, PID: 4282 java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object java.util.List.remove(int)' on a null object reference     at com.revosleap.journal.RecyclerUtils.RecyclerView.RecyclerViewBasic$2.onSwiped(RecyclerViewBasic.java:89)     at android.support.v7.widget.helper.ItemTouchHelper$4.run(ItemTouchHelper.java:692)     at android.os.Handler.handleCallback(Handler.java:739)     at android.os.Handler.dispatchMessage(Handler.java:95)     at android.os.Looper.loop(Looper.java:145)     at android.app.ActivityThread.main(ActivityThread.java:5942)     at java.lang.reflect.Method.invoke(Native Method)     at java.lang.reflect.Method.invoke(Method.java:372)     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)   I have gone through a number of similar questions here and tried the methods suggested but I cannot get the one that helps me out. I even tried to populate the list anew but it even got me another error. I'd really appreciate any possible help. Thanks.


Is product of random numbers still random?

If I have a function f that generates a random number uniformly distributed between 1 and 5 then can I say that g=f*f generates a random number uniformly distributed between 1 and 25?


Was Snape always a Death Eater, or did he turn for Dumbledore?

Through the course of the seven books, we learn more about Snape’s life. We learn that he was a Death Eater, and that he was in love with Harry’s mother, Lily.  Before James and Lily's death, he came to Dumbledore to beg him to protect them.  Dumbledore wanted something from Snape in return.  Was Dumbledore asking to spy on the Death Eaters (meaning he was already a Death Eater)? Or was he asking Snape to become a Death Eater?


I need some help in a proof: Prove that for any integer $n>6$ can be written as a sum of two co-prime integers $a,b$ s.t. $\gcd(a,b)=1$.  I tried to go around with "Dirichlet's theorem on arithmetic progressions" but didn't had any luck to come to an actual proof. I mainly used arithmetic progression of $4$, $(4n,4n+1,4n+2,4n+3)$, but got not much, only to the extent of specific examples and even than sometimes $a,b$ weren't always co-prime (and $n$ was also playing a role so it wasn't $a+b$ it was $an+b$).  I would appriciate it a lot if someone could give a hand here.


reversing the screen including null and an empty string

I have this problem that I have to reverse the order of a string that appears.   I've tried reversing the string by creating an empty string, then adding the characters from the back using a for loop.   However, it doesn't really work with the null. Below is the code I tried.    public static String reverse (String str){    String reverse= "";     for(int i=str.length()-1; i>=0; i--){    reverse+=str.charAt(i);   }   return reverse;   }   This is the tester.    String s1=null;   System.out.println (reverse(s1));//null   System.out.println (reverse(""));// empty string   System.out.println (reverse("a"));//a   System.out.println (reverse("abc"));//cba   System.out.println (reverse("atoyota"));// atoyota   System.out.println (reverse("atOyotA"));//AtoyOta   System.out.println (reverse("dad"));//dad   System.out.println (reverse("Dad"));// daD   System.out.println (reverse("DaD"));// DaD   The error I get from doing the code above is       Exception in thread "main" java.lang.NullPointerException at PalindromeLab_BB.reverse(PalindromeLab_BB.java:62) at PalindromeLab_BB.main(PalindromeLab_BB.java:5)   Anyone got any idea what's wrong, or how to fix it?  Any help would be greatly appreciated :).


Creating lots of random cuts on a surface

Here's an image of a cube with lots of edges added. It was created using knife tool and lots of clicking:    What would be the best way to randomly generate such cuts with less effort...?


Pros and Cons of having additional columns in join table of many to many relationship

I searched but did not find any discussions on this topic. Are there any pros and cons on creating many extra columns on joined table? Does it affect speed of data retrieval because we are joining 3 tables?  As far as what I think, it may slow tiny bit but it is necessary otherwise how can we save additional data about many-to-many relationships. Or is there any other way of which I am not aware of?


How can I find $\int \dfrac{ dx}{1+x^4}$

I saw the solution on a website and I didn't understand most of it.  I would appreciate if someone could please explain it using baby steps for me.  Thanks,


How did Amy survive the crack in her wall?

How did Amy Pond survive without being consumed by the crack on her wall, given that the same crack consumed her parents?  I haven’t seen season 6 yet, so no spoilers please.


I'm working on an assignment for my IB biology class and some assistance would be highly appreciated. I've read several articles and I still haven't quite gotten the answer I'm looking for. I have to write a one page summary on whether or not Mitochondrion are alive or not.


I try to do this:  bpy.ops.object.select_all() bpy.ops.object.join()   in my script. It selects all the stuff like CtrlA but fails on join() (CtrlJ) with the following error message:     Traceback (most recent call last):   File "", line 1,   in    File "C:\Program Files\Blender   Foundation\Blender\2.71\scripts\modules\bpy\ops.py", line 188, in   __ call __       ret = op_call(self.idname_py(), None, kw) RuntimeError: Operator bpy.ops.object.join.poll() failed, context is incorrect   the message is from console.  How can I make this work? CtrlA, CtrlJ actually works.


Im developing the "features" section of a website and Im having trouble aligning text to an image.  I've tried setting the alignment to middle for the image in the css file like this:  vertical-align: middle;   And used <span> to place the text, but thats not working either.   What Im trying to acheive is very simple, but none of the solutions I've come across on here or through youtube have worked so I figured that I should just post the code, along with the image of how its supposed to look.  Heres a link to the folder containing the code:   Inside the folder, theres an image of how the website should look right below the index.html file  I would love any assistance on this. Thanks in advance!


Clicking a column in the reputation graph shows details for the previous day

When clicking a column in the reputation graph on my profile, the previous days' details are displayed, even if no changes happened on that day. The tooltip also shows the wrong date. In the example below (taken on StackOverflow), clicking on "Aug 14" shows data for Aug 13 while the tooltip at Aug 13 shows August 12.    Note that even if my question is a duplicate of , it was closed and fixed, but the issue seems to have reappeared and as such I'm posting it again.  Browser I'm using is Opera 30.0.1835.125 on Windows 10


Can I cast guidance immediately before a check and keep Hex active?

I am currently playing a Warlock and I am going to take the tome pact boon. I know you cannot be concentrating on two spells at once but if I am concentrating on Hex and I cast guidance immediately before an ability check (same round) would Hex end? It is six seconds or less that guidance would be up. Is that enough time for Hex to end? Could it be considered instantaneous in this case? I guess my main question is could I cast guidance immediately before a check and keep Hex active?


Merge Conflict Issue?? Weird <<<<<<< HEAD tag preventing heroku push

I'm learning Ruby on Rails and was following the tutorial minding my own business, but after creating and trying to merge static pages etc., my app is failing to deploy on heroku and the tests are failing all of a sudden.  Based on the research I've done this is may be due to a merge conflict? In any case, the following lines:   <<<<<<< HEAD content >>>>>>> efcece9f3324a1a06d5f70e2a350b33d0c06d6c7   Have popped up in a bunch of my files (gemfile, gemfile.lock and even a controller) pretty randomly randomly. My tests no longer return green but now display an error "unexpected <<". I'm a noob and totally confused?   Can anyone help me understand if this is indeed a merging conflict, and in any case what caused this and how do I go about fixing it?


Once i login through putty i see one ram usage and when run free -m i see another different one . which one is right? and whats the correct way to get real ram usage?


I have a bunch of laptops I need to set up for our support dept and I need to be able to access/monitor them at all times. The laptops run ubuntu 11.10 gnome shell 3.2 and all have the desktop sharing thing enabled along with a password. This all works, I can connect to the laptops and view them and interact with them.  Now, from what I've read, that password thing ain't the most sophisticated security measure out there so I'm looking for a secure upgrade for this setup, preferably one that doesn't need too much changes on their end. I've read up on implementing ssh, but that is if I want to log on to a dormant account not when I want to just bomb the existing user session.


Given an undirected graph $G=(V,E)$ Prove the following a) Let $|V|=m$ and $|E|=n$. It holds that $2n\leq m^2−m$ b) If $|V|>3$ and $\not\exists v_0∈V:d(v_0)=1$, then there is a circuit in $G$. I need some help to prove a) and b). I know for b) if there are no cycles $G$ is a tree and the edges are $m - 1$ but that's about it. Thanks in advance to anyone who can help!


I uninstalled Homebrew using .  After running the above commands, I can't find .bashrc and .bash_profle.  When I do git status on /Users/ava it shows:  # On branch master # Untracked files: #   (use "git add <file>..." to include in what will be committed)  ... all the files which are in /Users/ava   history    113  cd `brew --prefix`   114  rm -rf Cellar   115  brew prune   116  rm `git ls-files`   117  rm -r Library/Homebrew Library/Aliases Library/Formula Library/Contributions   118  rm -rf .git   119  rm -rf ~/Library/Caches/Homebrew   120  sudo chown -R $USER:admin /usr/local   121  ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"   122  brew doctor   Also noticed that all files are missing from Documents and Downloads  What just happened?


How much money does a Russian citizen have to have to visit the US as a Tourist, and does the visitor have to have a certain amount of cash even if that person can stay at a friends house during the visit?


On Stack Overflow the "Analytical" badge has its description as Visited every section of the FAQ (retired).  What is the meaning of the term retired?


why does not work this condition?  if [ -d /home/virt -a $(ls -A /home/virt/) = 0 ]   Exists of directory /home/virt AND check if the directory is /home/virt/ empty  Thank you...


small business 10 workstation network mess

Fellow friends,  I am in a dire need for help. I have gotten myself in a situation where I am expected to take care of small business computer network. Little background: I'm in sales/marketing sector in company, and because I'm on help desk-level of computer knowledge, the boss thinks a can manage the whole setup.  Oh my God. The setup is a mess. There are 10 computers, one ADSL commercial modem, two 5 port switches. All computers are Windows XP workstation with critical business information on all of them, no antivirus, no updates. And the one workstation is named "server".  What can I do to make a setup that will work with stability, to automate cleanup/patch jobs, to understand what is failing and make my life livable. How to plan for remote work, and how to add a layer of security?  Please advise


Why do movies and series "leave" streaming services?

I'd like to understand why services like Netflix or Amazon don't retain movies or series forever. That seems the logical thing to do: Potential revenue for basically zero extra effort, plus an ever-growing pool of awesome entertainment. I can only imagine two reasons:  Somebody else offers more money for the license than can be generated by the streaming service. But how could that be so? Why would another streaming service be able to generate more money from it? Or do these films and series move to free TV? If the latter: Why not share the license? After all, apparently the audiences don't overlap much, so there is extra revenue to be had? The expected revenue is less than the license fee plus storage cost for the movie, of which I'd think the license is the bulk. But doesn't that essentially mean that the license has become less valuable (because the movie or series has fallen out of fashion) and should be re-negotiated? After all — see point 1 — others are equally unlikely to generate beaucoup money from it now.  What is the typical reason to discontinue a movie or series? P.S. I have trouble finding appropriate tags — no "license", "streaming", "amazon".... ah, "Netflix"! But the question is, while untypical, on topic, isn't it?


Use apt get install without inserting the DVD?

I installed Debian 7 using a DVD version, so every time I'm trying to install something using apt-get, the system ask me to mount the DVD. Is there a way to avoid that (inserting every time the dvd).


Windows 7 End of Support - How to get OLD updates / patches thereafter?

Today is the End of Life for Windows 7. Of course MS will not release new updates or patches for Windows 7 anymore.  If I install a new PC by a Windows 7 disc from scratch, I would expect I will not be able to download the Windows Updates. When I open "Windows Update" and check for updates, I would expect nothing will be found. (Correct?)  However in the MS website, there is a . It seems that we can download all the updates from there. As we all know Windows XP was EOL years ago. We can still find Windows XP updates from there.  Let me assume that the Microsoft Update Catalog contains ALL the updates and patches for Windows 7 now. (Correct?)  And let me assume that the Windows 7 updates and patches will still be available (for a few years) in the Microsoft Update Catalog even after Windows 7 EOL. (Correct?)  As MS is actually still hosting the update files in their server (the Microsoft Update Catalog), why MS does not keep steaming those OLD updates and patches to users through the OS built in "Windows Update" service?


Need to Define Global Variable With Name "attacked_switches"

I'm using code from GitHub for mitigation of DDoS attacks using reactive flow rules in Floodlight Controller. I can't run the program because the global variable attacked_switches is not defined, but I don't know how to do that. Can anybody help me?        def start():      try:          number_of_switches, number_of_hosts = topology_info()         switch_dpids = list()         hosts = dict()         switch_dpids = switch_info(number_of_switches, switch_dpids)         hosts = host_info(number_of_hosts, hosts)         dpid = switch_byte(number_of_switches, switch_dpids)         print 'dpid= ', dpid         if dpid != 0:             print'calling flow pusher'             global attack             attack = True             attacked_switches.add(dpid)             T2 = threading.Thread(target=Flowpusher, args=[dpid])             T2.start()         elif attack:             T3 = threading.Thread(target=Flowremover, args=[dpid])             T3.start()      except Exception as e:         print'Error occured:', e


Why does magnet attract iron but not other metals?

While searching, i found this page:  but it does not have full explanation. So Please tell full explanation of why this happens?


I have recently downloaded truecrypt from www.truecrypt.org and got a .tar.gz file. I am completely new to ubuntu and dont know how to install it.Please help and give extra details.


Ruby why does floor method rounds to next integer


$\sum a_n$ is convergent $\implies \sum a_n^2$ is convergent?

Assume that $\sum a_n$ is convergent. Does it imply that   I) $n\cdot a_n\rightarrow 0 $ and   Il) $\sum a_n^2$ is convergent?  Are (I) and (II) true if we also assume that the sequence ($a_n$) is monotone?


I've been trying to modell with some accuracy using Blender 2.8 using the Edge Length under Viewport Overlays > Measurements. However I've noticed that the measurement is not always accurate or at least when I use the  the Edge length is different to the MeasureIt output.  This is with the same edge selected but two different measurements.  Edge Length: outputs 1.95cm    MeasureIt: outputs 1.0cm    Am I doing something wrong with Blender's edge length..?


A diligent student gives me (not for the first time!) a problem to solve; it is now:  Prove or disprove $$(m,n)\in \mathbb N^*\Rightarrow \frac{(mn)!}{m!(n!)^m}\in\mathbb N^*$$


About the term $-\nabla_{[u,v]}w$ in the definition of Riemann curvature tensor

As we know, in the definition of Riemann curvature tensor, we require  $$ R(u,v)w=\nabla_u\nabla_v w-\nabla_v\nabla_u w-\nabla_{[u,v]}w $$  Could somebody tell me why we need $-\nabla_{[u,v]}w$ appearing in this definition. Is there any geometric meaning in it? Because the geometric meaning of $\nabla_u\nabla_v w-\nabla_v\nabla_u w$ is pretty clear, but for $-\nabla_{[u,v]}w$ I feel not so direct.  In my opinion, because $[u,v]=\cal L_u v$, then $-\nabla_{[u,v]}w=-\nabla_{\cal L_u v}w$. So it looks like that this term is kind of correction of $\nabla_u\nabla_v w-\nabla_v\nabla_u w$, I mean, to neutralize the effects of the vector fields. This is a very naive hunch. Could you give me a more clear answer?


How to fix the column width of my table?

Sorry I have deleted the text in the table (since it would be seen as plagiarism (on my thesis, I can publish it).    Here is my code. I have tried to use \begin{tabular}{|c|c{3in}|c|} in order to fix the second column width but it does not work :  \begin{table}[h!] \centering  \begin{tabular}{|c|c|c|}  \hline  & \textbf{Ohjdudfd fhedjeji veghjk} & \textbf{hedfj jddi}  \\  \hline  \textbf{hdiud-d} & 3-7-17-20-6-8-13-16-8-5-12-21-14-19-2-50-15-5- 14-11-1 & 5.62\%\\ \hline  \textbf{kdjd-hk}  & 7-80-16-7-6-87-2-8-83-5-71-4 -77-88-54-9-55-15-18-77-20 & 5.63\% \\ \hline  \textbf{ded ffvfr}  & --- & 74.58\% \\ \hline \end{tabular} \caption{Rusdh ohju tje dkjdk djdkd} \label{table:3} \end{table}  \begin{table}[h!] \centering  \begin{tabular}{|c|c|c|} \hline  & \textbf{ikji hikk hyhu} & \textbf{bhhy kokol}  \\  \hline  \textbf{njsd-h} & 2-8-3-7-2-8-5-4-4 & 77.30\%\\ \hline  \textbf{hcdh-j}  & 7-6-1-7-3-3-5-4-9 & 02.77\% \\ \hline  \textbf{Conhhjj mehjj}  & --- & 02.56\% \\ \hline \end{tabular} \caption{hhi ojj oool juui hjjj} \label{table:2} \end{table}


Replace MacBook Pro screen with Screen from old MacBook

I have a 13” MacBook Pro mid 2014 as well as a late 2011 MacBook Pro.  My 2014 MacBook Pro screen is broken and I was wondering if I could replace it with the screen from my 2011 MacBook Pro.  Will there be any issues during installation?


Limits of the Universe: how can be sure about the size of unobservable Universe?

It is established by different observations a 13.4 Gyr and 93 Glyr diameter Universe. However, how can be sure about the size of the Universe if there are portions of it we can not see? Is due to recollapse due to gravity?


When selecting components, is there a way to control the "selection distance/area"? I don't want to select a component, even if I click ~20 pixels away from it.    Thanks in advance!


A closed ball in $l^{\infty}$ is not compact

Definition of compact in Real Analysis, Carothers, 1ed said that:   In Example 8.1 (c), he claimed that closed ball $\{x: \|x\| \leq 1\}$ in $l^{\infty}$ is not compact. Why?


$p$ a prime and I want to show $p^n-1 \mid p^m-1$ iff $n \mid m$

And also that: $\gcd(p^m-1,p^n-1)=p^{\gcd(m,n)}-1$. For the love of a God I don't see how to show these two identities.


main(String[] args) or main(String args[])

I'm watching Java tutorials right now and I've noticed that some people use:  public static void main(String[] args)   and some people use:  public static void main(String args[])   I was just wondering if there is any difference between them.


Launcher changes the order of windows of the same application randomly in preview mode

When I open several instances of the same application (eg I'm viewing multiple PDF files, or MATLAB) it merges buttons for the same program in the Unity Launcher into a single one. When I click on the merged button, it shows me a preview of all windows. When I choose one of the windows it opens in full screen mode. But when I want to switch to next window and I press on the button again, the order of windows in the preview mode is completely changed so I'm confused about what is next.   How can I prevent Ubuntu from reordering windows in preview mode? The below photo shows what I mean by preview mode.


How to prove that$\frac{\cos\left(x\right)}{1+\sin\left(x\right)} = \frac{1-\sin\left(x\right)}{\cos\left(x\right)}$

How can I prove that:$$\frac{\cos\left(x\right)}{1+\sin\left(x\right)} =  \frac{1-\sin\left(x\right)}{\cos\left(x\right)}$$   My attempt:   $$\cos^2(x/2) =\frac{\cos x +1}{2}$$ $$\sin x = 2 \sin(x/2)\cos(x/2)$$  $$\frac{\cos\left(x\right)}{1+\sin\left(x\right)} =\frac{2\cos^2(x/2) -1}{1+2 \sin(x/2)\cos(x/2)}=  \frac{(\sqrt2\cos(x/2) -1)\sqrt2\cos(x/2) +1)}{1+2 \sin(x/2)\cos(x/2)}$$  Can anyone help me to simply this last expression or provide me with tip?


which flavor of Ubuntu works on ASUS P4GE MX mobo with P4 and 1gb ram

I have Ubuntu 13.10 installed on ASUS P4GE MX Mother board with Intel 845 Chip set and Pentium 4 processor with 1GB ram.   Unity and Dash are not loaded, hence not able to close any page opened by  right clicking on blank desktop and entering into 'change desktop background'. Live wall papers are working but the setting page is not closing as no buttons are available on the panel.   I removed Ubuntu 13.10 and tried with 13.04 / 12.10 / 12.04 / 11.10 and 11.04.  Ubuntu 11.04 is working but the problem is that it out of date and upgrades available.  Please provide a way / solution


Using QUERY and IMPORTRANGE to pull records from a specific date range

I have created two spreadsheets.  This one is my source data:   And I would like this one to just be the people who are currently here (so Column D < today and Column E > today):   I keep tinkering with the formula for the date, but can't get it right. Most recent error I've gotten is      Unable to parse query string for Function QUERY parameter 2: NO_COLUMN: A.   Any thoughts?


How to enable virtualization without using bios?

I am using android studio.I want to run my app on simulator but it is asking me to install intel haxm,.When i install intel haxm it says that vitualization is not enabled/.To enable virtualization i need to goto bios but issue my bios is password protected & i don't know password.So please tell me is there any other way by which i can enable the virtualization without going into bios?


Is it possible to upload expository papers to arXiv?

I would like to know if arXiv allows authors to upload expository papers (for example, a paper in which the author explains a specific topic). If this is the case, how should those papers be written? And will they be automatically moved to the General Mathematics section?


How do I get the third stick of dynamite?

I'm trying to blast open the crack in the wall in the orehole mine in boring springs, but I can't find all 3 dynamite. I got 2 from the trader, but can't find the last one. Where do I get it?


Can I have two PlayStation 4s, two accounts and still only use one PlayStation Plus subscription?

Here is an example:     PlayStation 4 #1: PSN account name: Jack      PlayStation 4 #2: PSN account name: Harry      Jack has PlayStation Network Plus, Harry does not. Jack confers his   PlayStation Network Plus benefits to Harry, who has access from his   own console, so they can both play online.   Is it possible to have two PlayStation 4 consoles, using separate accounts, with the same PlayStation Plus subscription?


Specifying the conditional distribution for the response in practice?

In normal linear regression, defining $Y_i = X_i\beta+\epsilon_i,$ with $\epsilon_i$ c.i.i.d. $\mathcal{N}(0,\sigma^2)$, is equivalent to say $Y|X \sim \mathcal{N}_n(X\beta,\sigma^2I_n)$. The second seems a better choice for generalization, for instance in GLM's, where the distribution of $Y|X$ usually belongs to the exponential family. In practice, if there are no "physical constraints" in choosing the statistical model, how does one model the stochastic part of a GLM? I used to think that you could do it by looking at the histogram of $Y$, but this question  made me realize I was completely wrong!


"Require Installation Of Untrusted Packages" while upgrading with the update manager

It didn't fixed the error. So, how do I fix my GUI update?  For every software I have to install it from command line because I got same error when install software from Ubuntu Software Center.


Is it possible to use a TP-Link Archer T8E wireless card on Ubuntu 14.04?

I built a computer recently and did not do my research for this card. I'm also completely new to Linux (Planning to duel boot later but for now I'm trying to learn Ubuntu) and I'm having a hard time finding good tutorials to follow to learn the basics/  All that to say: I don't know what I'm doing! I need some serious guidance. Any help/pointers/advice and learning materials greatly appreciated.   I have access to ethernet (Though not at the moment) and a secondary computer, but no optical drives.   Thank you. I've only just dipped my toes into the water here but I can already tell this is a really passionate community, I'm excited. Have a cool day.   ran lspci -nnk | grep 0280 -A2 and got:  Broadcom Corporation BCM4630 802.11ac Wireless Network Adapter [14e4:43a0] (rev 03)        Subsystem Broadcom Corporation Device [14e4:0619]


Deleted my ubuntu partition off windows. The system will no longer boot up (Only boots into grub)

so I accidentally deleted my ubuntu hard drive off windows and I created a new partition and now my system will not properly boot up into Windows. I have to hit F12 and click on the Windows Boot Manager option , otherwise my system will boot into GRUB. I did some research on the forums and found that I have to get a Windows 10 pendrive and just go to the repair, and insert in the command line both  "bootrec.exe /fixmbr" & "BootRec.exe /fixboot" but that does not seem to solve my problem. Any thoughts on this? Thanks in advance


How to solve $\int \tan^2(x) \sec (x) \ dx$?

How should one solve the following integral? $$\int \tan^2(x) \sec (x) \ dx$$  I can't think of any substitutions to be made involving $\tan^2(x)=\sec^2 (x)-1$ or $\sec^2(x)=\tan^2(x)+1$, which is how I've been solving most of the similar problems in my book until now. What should I do?


How to add an underbrace to the part of the row vector?

My code is      A = \left[\begin{matrix}         1&\underbrace{\begin{matrix}             1&\dotsb&1         \end{matrix}}_N     \end{matrix}\right]   and the outcome is   but I want the following outcome    How can I get this?


When I tried to set up git in my computer I encountered the following error:  E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?


Can we proof that $\sqrt{a + b} < \sqrt{a} + \sqrt{b}$?; given $0 < a < b < 1$

I have found in some test problem:  Given $0 < a < b < 1$, can we conclude that $\sqrt{a + b} < \sqrt{a} + \sqrt{b}$?  I divide the combination of a and b into a few cases. Then, see what happens.  case 1 : $a \rightarrow 0$ and $b \rightarrow 0$  When $a$ approaches to zero and $b$ approaches to $a$ (which is zero), the expression will be evaluated as $\sqrt{0 + 0}$ and $\sqrt{0} + \sqrt{0}$. Since $0 = 0$, this case cannot conclude that $\sqrt{a + b} < \sqrt{a} + \sqrt{b}$  case 2 : $a \rightarrow 1$ and $b \rightarrow 1$  When $b$ approaches to one and $a$ approches to $b$ (which is one), the expression will be evaluated as $\sqrt{1 + 1}$ and $\sqrt{1} + \sqrt{1}$. Since $\sqrt{2} < 2$, then this case concludes that $\sqrt{a + b} < \sqrt{a} + \sqrt{b}$  case 3 : $a \rightarrow 0$ and $b \rightarrow 1$  When $a$ approaches to zero and $b$ approches to one, the expression will be evaluated as $\sqrt{0 + 1}$ and $\sqrt{0} + \sqrt{1}$. Since $1 = 1$, then this case cannot concludes that $\sqrt{a + b} < \sqrt{a} + \sqrt{b}$  case 4 : $a \rightarrow b$  When $a$ approaches to $b$ the expression will be evaluated as $\sqrt{b + b}$ and $\sqrt{b} + \sqrt{b}$. Since $\sqrt{2b} < 2\sqrt{b} $, then this case concludes that $\sqrt{a + b} < \sqrt{a} + \sqrt{b}$    From above cases, am I still missing some point? If not, How should I write the conclusion from that pieces of thinking mathematically? Because I instinctively believe that $\sqrt{a + b} < \sqrt{a} + \sqrt{b}$ should be true (and not $\sqrt{a + b} \leq \sqrt{a} + \sqrt{b}$).


What's the difference between the adjectives "strategic" and "tactical"?

I recently read this sentence:     It was a strategic move rather than a tactical one.   I have trouble interpreting it. Can someone help?


Show that the $\lim_{n\to \infty} \frac n{n+1} = 1$ using the limit definition. So far I have: Let $\varepsilon > 0$, there exists $N \ge 0$ such that, $|a_n-L|< \varepsilon$, for all $n \ge N$. $\left|\frac n{n+1} -1\right| < \varepsilon$. I have ended up with $\left|\frac 1{n+1} \right|  \le \frac n n = 1$ (which is $< \varepsilon$, for all $n$) I know there needs to be an n at the end, so for all $n >$ something $\varepsilon$. I am not sure what to do after $n/n$, or is that enough to show the limit of the sequence $= 1$. Thanks


I am suffering from the same old wireless problem. I tried everything I could find on the net as well as Ubuntu forums, but nothing works.  How can I fix this??  my device information from lshw -C network:  ***product: BCM4311 802.11a/b/g vendor: Broadcom Corporation configuration: driver=wl latency=0***   To me, what I was able to learn from the net, the driver is just the right one. but still it isn't working.  iwconfig shows:  **lo   no wireless extensions. eth0 no wireless extensions.**   What other information do you need?


Mirror modifier creates new vertices in weird ways

I'm a Blender newbie and I'm trying to use it to make a simple model for a 3D project. I'm trying to edit a cube with a mirror modifier to make a symmetrical shape, but when I drag some vertices to a side in edit mode it creates new vertices on the other side instead of moving the symmetrical equivalent:    What am I doing wrong?


What is the easiest way to test python Add-Ins with ArcGIS 10.1 +?

I am trying to develop a Python Add-In for ArcGIS 10.3 and finding debugging pretty laborious. At the moment when I make a change to my python script I have to do the following:   Close ArcMap Delete the "Python_Addins.esriaddin" file in my Default installation directory double-click the "makeaddin.py" file to create another "Python_Addins.esriaddin" file Install the add-in Restart ArcMap and start the project Test the tool   Surely, this can´t be the only way to test a python Add-In in ArcMap.


I'm trying to customize the Abstract of a memoir document using the following command:   \renewcommand{\abstractname}{Executive Summary}   The problem is that it actually has no effect. How can I achieve this?


Probability brain teaser of secret santa

There is a room having 100 people. There is a box with letters containing names of 100 people on it. No two people have same name. Everyone is supposed to pick one letter and keep it.   What is the probability that someone will pick the letter with his own name?


Why is my Windows 8 pc always powered on by moving mouse?

I recently installed Windows 8 RTM, but found a very annoying thing. My PC always powered on automatically even in midnight. Eventually I noticed that I can power on the PC by pressing keyboard or mouse, and even moving mouse.  After searched this in Google, I turned off Sleep and Hibernate in Power Options -> System Settings -> Shutdown settings, but it still did not work.  Would anyone please help me?  I don't want to suffer from the noise of PC powering on in midnight any more.


Display tag synonyms differently in the tag browser

Is [bugs] a tag with one question, or a tag synonym? Can't tell... can you? This is a real problem when trying to manage tags.  Please differentiate tag synonyms in the list, possibly with a different border.


Suppose $X_1$ and $X_2$ are iid observations from the pdf $f(x|\alpha)=\alpha x^{\alpha-1}e^{-x^\alpha}$, $x>0$, $\alpha>0$. Show that $\frac{\log X_1}{\log X_2}$ is an ancillary statistic.  I guess I need to show that the distribution of this statistic is independent of $\alpha$, i.e. it is the same as if $\alpha = 1$. However, this concept is a little bit confusing to me and I am not sure how to approach this problem.


Schengen visa while waiting for residence permit renewal

I am a Turkish citizen, I am currently studying in Italy.  My permit of residence has expired lately and in my city, it takes around 7-8 months to renew it. However, I need to travel to the Netherlands for research purposes soon. So, do you know if it is possible to acquire a Dutch Schengen visa in this situation, if I go to the Dutch embassy directly?  Thanks


Difference between "commit suicide" and "suicide"

One of the examples in my English composition book (for learning to write my language's sentences in English) was "Why he committed suicide under such a good circumstance is an unsolved question.", but what I would have written would have been "Why he suicided...".  What's the difference between "commit suicide" and "suicide"?  (I think I saw 'commit suicide' more than just 'suicide', and the spell checker of Google Chrome says that 'suicided' is not a  word, even though I think it .)


I am struggling with choosing metric that I will use to compare models performance and hiperparam search. My task is similar to fraud detection.  I have found out that many people states PR is better curve than ROC for comparing performance on imbalanced data (absolutely my case). I will run probably run hundreds of experiments so I would rather stick to one metric with one number.  That is why I am looking for AUCs of PR and ROC. I found out that imbalanced data has actually bigger influence on PR AUC than ROC AUC. Do you think I should use ROC AUC or FPR at given recall point or there is something wrong with my plots? Is PR curve better tha ROC curve for imbalanced data but it is opposite with their AUCs?   Scores obtained by sampling from different Gaussian dist with mean = 0.1 for class 1 and mean=1 for class 1. Scores Histogram: green- scores for class 1, blue scores for class 0


Is cooked chicken brought to work but left unrefrigerated for 5 hours safe to eat?

I cooked chicken last night and stored it in the fridge right after.  Today I brought in chicken in a glass container within my backpack and opened it 5 hours later. I put it in the microwave for 1 minute and 30 seconds and it still feels a bit cold.  Is it safe to consume?


Can anyone help me understand on how to parse the response in to a JSON object from string.  String s = [{"id":"12345","Account":"31338","name":"Accounttest","subaccounts":[{"id":"39658"}]}]   I'm generating the above string Using JSON.createGenerator.


I am currently reading through a java book and I have reached a chapter on GUI's.  The book has given example code on how to get a buttons ActionEvent, which I will paste below:  import javax.swing.*; import java.awt.event.*;  public class SimpleGUI implements ActionListener {  JButton button;  public static void main(String[] args){      SimpleGUI gui = new SimpleGUI();     gui.go();  }  public void go(){      //Create a JFrame and add title     JFrame frame = new JFrame();     frame.setTitle("Basic GUI");     //Create a button with text and add an ActionListener     JButton button = new JButton("CLICK ME");     button.addActionListener(this);     //Add the button to the content pane     frame.getContentPane().add(button);     //Set JFrame properties     frame.setSize(300, 300);     frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);     frame.setVisible(true);  }  //What should happen when button is pressed public void actionPerformed(ActionEvent e) {         button.setText("Button pressed");     } }   However, when I run the program and click the button, I get a massive error as follows: (which I have cut short because of space on the post).  Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at SimpleGUI.actionPerformed(SimpleGUI.java:34) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) ......   Could anyone explain why this is not working?


Why can't unproven conjectures/hypothesis assumed to be axioms in mathematics?

I started learning about mathematical logic a short while ago, when I stumbled upon the formal definitions of the terms propositions and axioms. According to Wikipedia,     An axiom or postulate is a statement that is taken to be true, to serve as a premise or starting point for further reasoning and arguments   In one of the video lectures on introductory logic that I was watching, famous unsolved conjectures(such as Goldbach's conjecture and Riemann's Hypothesis) were being discussed, this question struck my mind:     Why can't unproven hypothesis\conjectures be assumed as axioms to derive more useful results? Why is it that a proposition like Axiom of Extensionality qualifies as an axiom, while a proposition like Goldbach's conjecture does not?   The fact that these conjectures and hypothesis assert certain results about properties of numbers(or other abstract mathematical entities), which themselves are described by axioms(such as those in ZFC) does give a feeling that axiomatic systems like ZFC are more fundamental, but I feel being fundamental is a subjective notion. In any case, I seek an answer. Maybe I'll narrow down my question to this:     What qualities must a proposition possess in order to qualify as an axiom(and not, say, a conjecture/hypothesis)?


I've been chatting from mobile today (with my Galaxy SIII), seems like when people ping me, it doesn't matter whether I send messages, or even specifically ping them back, the notification doesn't get cleared, and it eventually reaches my inbox with a flurry of 14 inbox notifications.    I've read other threads close to the subject, but it doesn't seem like anything addressed this specifically, so I'm opening this  report here.


How to calculate next date(days months and year) based on provided number of days in java?

Iam trying to calculate new date based on  provided  no. of days to base date(i.e current date or any specific date). Linux shell can do by date -d "2020-10-19 30 days" 2020-10-19  is base date 30 is new date after 30 days.


When I get the message for a Software Update and click to install I get a message "Insufficienct space" telling me to empty trash and remove temporary files using sudo apt-get clean. I have emptied the trash but I still get the same message and don't know what temporary files to remove or what sudo apt-get clean is.


Proving that, for integers $n$, $m$, $p$, if $n| 72m–p$ and $n|8m$, then $n|p$

I'm trying to write a proof but I have been stuck for the past few hours trying to make progress. I have to prove that  For all integers $n$, $m$, and $p$, if $n| (72m–p)$ and $n| (8m)$, then $n|p$.  I tried substituting $72m-p$ for $x$, and $8m$ for $y$, but I'm not really sure where to go from there.


How to remove iCloud account from used iPhone?

I bought an iPhone 4s used and the previous owner did not clear their iCloud account. I need to reset phone, but can't turn off "Find my Phone" because of iCloud password!  How can delete iCloud without a password?