Can I use a 14v 2A dc adapter on 12v 1A  dc rated device? Now what i did is by a buck controller i set the voltage to 12v but there is no variables to control the current in that buck control module. So i don't know how to control 2A current to 1A,because the device that i want to connect is rated as 12V 1A (As it's input).I'm afraid about that the current cause any damage to the device


Show that a function that satisfies $f(\frac{x+y}{2}) \leq \frac{f(x)+f(y)}{2}$ is continuous

I am trying to prove that the following function is continuous using the assumptions, with basic real analysis. (This is from some of my old notes and I'm trying to brush up my Analysis). "Let $f:\mathbb{R}\to\mathbb{R}$ be a bounded function that satisfies the following: $$f\big(\frac{x+y}{2}\big)\le{}\frac{f(x)+f(y)}{2}\text{ for every }x,y\in{}[a,b].$$ Show that $f$ is continuous on $(a,b)$." The question does give the hint to "Try setting $x=c$ and $y=c+2\delta$." But you just get: $$2f(c+\delta)\le{}f(c)+f(c+2\delta),$$ $$f(c+\delta)-f(c)\le{}+f(c+2\delta).$$ Heuristically this means (to me, as how I understand it) as you move across the domain to the right, the difference between the function evaluated at two points of some step $\delta$ gets larger and larger, suggesting the function maybe has an increasing first derivative, or a second derivative greater than or equal to $0$ (?). Of course we can also say there is a $K\ge{}0$ s.t.$|f(x)|\le{}K$ for each $x\in{}[a,b]$. Am I missing something, I can't see how to progress here.


Behavior of $\sum_{n=1}^\infty \frac{1}{n} z^{n!}$ on the unit circle

I'm trying to understand the behavior of $\sum_{n=1}^\infty \frac{1}{n} z^{n!}$ on the unit circle.  Since for each $m$th root of unity $\zeta_m$ $$\sum_{n=1}^\infty \frac{1}{n} \zeta_m^{n!} = C + \sum_{n=m}^\infty \frac{1}{n} = \infty$$ holds for some $C \in \mathbb{C}$, the series diverges for all $e^{\varphi \pi i}$ with $\varphi \in \mathbb{Q}$.  But what happens for $\varphi \in \mathbb{R} \setminus \mathbb{Q}$?   Does the series diverge everywhere, or are there points where it is convergent?


We need an accounting Stack Exchange site

What do you guys think about an accounting Stack Exchange site?  Because the answer is yeah we do. It would be the sexiest thing out there in the Stack Exchange space.


Enable click-through, preferrably for all applications

I would like to enable click-through on all windows. Is this possible on Lion?  To be more specific, "click-through" as defined by Apple in the  means "that the user can activate the item when the containing window is inactive."       An item that provides click-through is one that a user can activate with one click, even though the item is in an inactive window. (To activate an item that does not support click-through, the user must first make the containing window active and then click the item.) Although click-through can make some user tasks easier, it can also confuse users if they click items unintentionally.


$f: \mathbb C \to \mathbb C$ be a non-constant entire function then every line which passes through origin would intersect image(f)?

$f: \mathbb C \to \mathbb C$ be a non-constant entire function then how to prove or disprove that every line which passes through origin would intersect image(f)?  Can anyone please  give me a hint?


Getting sql error on deleting data from tables - target and source for delete

I am trying to execute this query. it is to delete all the accounts that is less than the average of all the accounts in the account table. I am however getting this error:  #1093 - Table 'account' is specified twice, both as a target for 'DELETE' and as a separate source for data  The query is:  DELETE  FROM account WHERE account_number IN  (   SELECT account_number FROM account  WHERE balance < (SELECT AVG (balance) FROM account) );   How can I solve this problem?


What is the quantum mechanical definition of a measurement?

I hear the word "measurement" thrown around a lot in quantum mechanics, and I have yet to hear a scientific definition that makes sense. How do we define it?


Prove that solution blows up in finite time

I want to show that solution of this Cauchy problem \begin{cases} u'(t)=u(t)^2 + t \\ u(0)=0 \end{cases} is defined for $t \in [0,\alpha]$, with $\alpha <3 $  I tried to integrate, but it's not possible because of the $t$. I can see that $u'>0$ for all $t \geq 0$ , and that's all. I don't know how to argue honestly


How to tell Google that I have changed my website URLs?

I have done major updates to my website, and renamed all my URLs.  How can I tell Google that I have renamed these URLs and let Google refresh its index?  My website URL: http://www.pndmasr.com/  My sitemap: http://www.pndmasr.com/sitemap.xml  I have uploaded my sitemap via Google Webmaster Tools many times.  However, every time I search Google for "pndmasr", I still get results with old pages. I have waited more than 3 days but the problem remains. Any suggestions?  Is there a problem with my sitemap?


Enumerate or list all variables in a program of [your favorite language here]

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


So at the moment I have something like:  \documentclass[twoside, a4paper, 11pt]{article} \title{} \author{} \usepackage{ragged2e} \usepackage{booktabs,tabularx} \usepackage{amsfonts} \usepackage{amsthm} \usepackage{mathtools} \usepackage{verbatim} \usepackage{amsmath, amssymb} \usepackage{natbib} %\def\pgfsysdriver{pgfsys-dvipdfm.def} \usepackage{tikz} \usepackage{enumerate} \usetikzlibrary{matrix, arrows} \usepackage{graphicx} \usepackage{subfig} \usepackage{listings} \usepackage{color} %\usepackage{hyperref} \usepackage{float} \usepackage{multicol} \usepackage{booktabs} \usepackage{lscape} \usepackage{cases} \usepackage{multirow} \usepackage[figuresright]{rotating} \usepackage{setspace} \usepackage{lscape} \usepackage{longtable} \usepackage{caption} %\usepackage{subcaption}  \usepackage[update,prepend]{epstopdf} %\usepackage{mathpazo} %\usepackage{eulervm} %\usepackage{iwona} \usepackage[pdftex,colorlinks,linkcolor=black,citecolor=blue,urlcolor=black]{hyperref} \usepackage[official]{eurosym} %\usepackage{MinionPro}  \setlength{\textwidth}{6.5in} \setlength{\oddsidemargin}{0in} \setlength{\evensidemargin}{0in} \setlength{\parindent}{0pt} \setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}  \linespread{1.5}  \usepackage[top=2.5cm, bottom=2.5cm, left=2cm, right=2cm]{geometry}    \begin{document}  The most standard approach to modeling default risk centres upon \cite{merton74}'s structural model.  \bibliographystyle{apa-good} \bibliography{bibliography} \end{document}   The entry in bibtex is:  @article{merton74,     author  = "Merton, R.",     title   = "{``On the Pricing of Corporate Debt: The Risk Structure of Interest Rates''}",     year    = "1974",     journal = "The Journal of Finance",     volume  = "29",     number  = "",     pages   = "449--470"}   The output is like:    However I would like the 's to appear right after Merton, ie, Merton's (1974).  How can I achieve this?


Trigger flow if a specific field on the updated record changed

I'm using a flow to set a field to a certain value (01, 02, 03) depending on the value of another field on the same record. I initially wanted to do it with process builder but because of the mapping it seems I would need three 'criteria nodes' or a formula field. Furthermore, it seems Salesforce is recommending using flows instead of process builder for before update actions as it is faster.  The problem with Flows is that I found a way to trigger it when the record is new or updated but not when the specific field is changed so it triggers every time the whole record is updated even when the field stay the same.  On Process Builder, you can use isChanged and then call the flow with specific record but that kinds of defeat the point of using flows for before Update.  So is there a possibility to do the same thing directly in flow ?  Thank you for the help !


How to identify what apps are using internet?

I have slow internet connection, when I watch online TV I'm trying to close those apps and processes on my Mac that use internet.   Besides the intuitive way (close skype, browser tabs, dropbox, etc) how to identify what apps are using internet?


Python 3.5.0  I'm working with 150-200 lines of code so it isn't the worst. But this game involves a lot of repetitive lines of code, so I was wondering if there was a command that clears the whole console (for instance if I was to write code that prints "hello world" then it clears itself and prints "hello usa" where "hello world" used to be) before outputting the next line of code. I'm hoping to do this in the code editor in IDLE instead of the shell.  I guess I didn't make it clear enough D: sorry, my bad. I tried the import os way, and it just opened up a cmd console every once and a while for about a fraction of a second. I want a command that I can write in the python code editor that comes with idle, so that whenever I run the program and the program pops up, the text will pop up on the running program, disappear, then print the next text (or next step of the program).


jQuery click event - What am I missing here?

So, I have a page where a div, PDF object, and a button are all being created on-the-fly by javascript. The creation of those page items works great. The button is to function as a remove PDF and is assigned an id of 'removeAttBtn1', 'removeAttBtn2'...etc for each PDF that was added.  The issue I am having though, is that the jQuery selector I'm attempting to use appears to not be triggering the click event function.  The button is defined as follows;  <input class="btn btn-primary" type="button" id="removeAttBtn0" data-id="0" style="float: right; display: inline-block; margin-top: 3px; margin-right: 15px; margin-bottom:10px;" value="Remove Attachment">   And the jQuery selector I am trying to use for this button is;  $('input[id^=removeAttBtn]').click(function() {   alert('Remove Attachment button was clicked'); });   Am I missing something here as to why the jQuery is not picking up the click event for the associated button?  Thanks!


15 persons are arranged in a row. Find the number of ways of selecting  6 persons so that no two persons sit next to each other.   I think we have to select 6 persons from either the group of 8 people sitting 1st, 3rd, 5th.....15th or the group of 7 people sitting 2nd, 4th...14th.  I tried to solve this way but I'm not getting the required answer. Please some one help me.


How is leasing a car beneficial to the one who leases?

They say that a car is a depreciating asset and so leasing a car works better than buying one. I heard this from folks and car salespersons. Although I understand the aspect of leasing cars meaning not having to spend on repairs, I don't understand how leasing is better.  It seems that leasing is fine if you assume that the car will run into repairs after the leasing period. But this may not be true always. I feel like I may be missing something here. Any analysis to help understand?  Clarification: I have heard from a few persons (sales and otherwise) that it mathematically makes sense on a depreciating asset. So their recommendation would be to just lease a car after another forever instead of ever buying it. So I am considering average leasing vs avg buying in installments (EMI) case, not extreme examples.


Number of positive integral solutions $(x,y)$ of $x^2-y^2=12345678$

I have to find out the number of positive integral solutions $(x,y)$ of  $$x^2-y^2=12345678$$  Specifically, if $S$ is the set of all ordered pairs $(x,y)$ then $S$ -  A) is an infinite set B) is the empty set C) has exactly one element D) is a finite set and has at least two elements.  Now, with a calculator capable of doing prime factorization, this is an easy question. However without a calculator, its very difficult to find the prime factors by inspection. What is the most efficient and fast solution to such a question. This question was asked  (Q no. 4)


I have been looking around on Google and StackOverFlow and I have not been able to find a good SIMPLE definition for:  @Override when it is used.  Can someone help me find a very simple definition for this?  Thanks.


Tikz matrix not working the same in a titleformat command

Consider the following code:  \documentclass[oneside, 10pt]{book} \usepackage[     paperwidth=6in,     paperheight=9in,     tmargin=0.75in,     bmargin=0.75in,     lmargin=0.75in,     rmargin=0.75in ]{geometry} \usepackage{calc} \usepackage{tikz} \usepackage{etoolbox} \usepackage{transparent} \usepackage[explicit]{titlesec} \usepackage{tikzpagenodes} \usepackage[table]{xcolor} \usetikzlibrary{calc} \usetikzlibrary{fadings} \usetikzlibrary{shadows.blur} \usetikzlibrary{matrix} \pagestyle{empty}  \titleformat{\part}[display]{\normalfont\filcenter}{ \thispagestyle{empty} \tikz[remember picture, overlay] {     \matrix [column sep = 5mm] at (current page text area.center) {         \node[             inner sep = 0pt,             outer sep = 0pt,             font = \sffamily\fontsize{24}{24}\selectfont         ] {Part}; &         \node [             circle,             fill = black,             font = \sffamily\fontsize{24}{24}\bf\selectfont\color{white},             outer sep = 0pt,             minimum size = 1.5cm         ] {\thepart}; \\}; } }{6em}{ }[]  \begin{document}  \tikz[remember picture, overlay]{   \matrix [column sep=5mm] at (current page text area.center) {     \node[         inner sep = 0pt,         outer sep = 0pt,         font = \sffamily\fontsize{24}{24}\selectfont     ] {Part};  &     \node[         circle,         fill = black,         font = \sffamily\fontsize{24}{24}\bf\selectfont\color{white},         outer sep = 0pt,         minimum size = 1.5cm     ]  (numb) {I}; \\ }; }  \part{}  \end{document}   The result is the following:    Why is the first page different than the second, and how to make the titleformat work the same way as the normal tikz command? In other words, how to center "Part I" in the page on a single line as it is done on the first page? And why does it currently fail?


How to manually plug in values in an array of strings?

I often have a problem picking up what movie I should watch. So, I decided to make a simple program to randomize my pick but got stuck on the first step. I want to know how to assign Strings - that are the movie names- to an array. Here is my  unfinished code      Scanner input = new Scanner(System.in);    System.out.println("How many movies are you considering?");   int number = input.nextInt();   String[] movies = new String[number];    System.out.println("Enter movie titles...");    for(int i=1; i <= number; i++){      System.out.print(i + "- ");      movies[i] = input.next();      System.out.println();   }


I'm trying to prove Exercise 3.5 in Set Theory by Thomas Jech: $$ \Gamma(\alpha\times\alpha) \leq \omega^\alpha $$ where $\Gamma(\alpha\times\beta)=\operatorname{otp}(\{(\zeta,\delta)\mid(\zeta,\delta)\lt(\alpha\times\beta)\})$  and  $$(\zeta,\delta)\lt(\alpha,\beta) \iff \begin{cases}   \max(\zeta,\delta)\lt \max(\alpha,\beta)\\       \max(\zeta,\delta)= \max(\alpha,\beta)\text{ and } \zeta\lt\alpha\\   \max(\zeta,\delta)= \max(\alpha,\beta)\text{ and } \zeta=\alpha \text{ and }\delta\lt\beta \end{cases}$$ Here's what I've tried so far:   If $\alpha=0$ , then $\Gamma(\alpha\times\alpha) = 0\le1=\omega^0$. If $\alpha>0$ is finite, then $\Gamma(\alpha\times\alpha)$ is also finite, hence $\Gamma(\alpha\times\alpha) \lt \omega \le\omega^\alpha$.   Then I'm not too sure where to go from here


How does one dispatch a helpless opponent?

There is no coup de grace mechanic in D&D 5e like there is in previous editions. So how is a helpless opponent dispatched quickly, mechanically? Is it just a matter of giving the opponent advantage?  It seems like one should be able to deal with someone who is under the effects of a sleep spell, for example, more quickly than just what a to-hit bonus enables.


I'm getting an error INACTIVE_OWNER_OR_USER, operation performed with inactive user, and I have been doing a lot of research and the cause that I have found for this is its attempting to assign a my lead to inactive user.  So I understand that part I think the issue is now I don't actually know how to fix it, I didn't write this trigger/test class and I'm not sure how to go forward.  Do I need to create a new Test User?  I've never worked on the Lead object before..  Edit** I added IsActive = True the trigger user query, no luck.  Edit** I just went talking to anyone that might have an idea about UserTypes, and they have no idea what UserType = 'PowerPartner' is.  So I changed it to a different UserType.. didn't work  Edit**  I'm nuking this trigger, I have to re write it..  Test Class  @isTest private class PartnerLeadShare_test { static testMethod void myUnitTest1() { List<Lead> leadList = new List<Lead>(); List<LeadShare> leadShareList = new list<LeadShare>();   Lead ld = new Lead(); ld.lastName = 'Tester';//=/ ld.Company = 'MyCompany'; ld.Status = 'Open'; ld.Program_EAU__c ='11'; insert ld; system.debug('ld****' +ld);  GroupMember groupMemberStore = [select GroupId,UserOrGroupId from GroupMember limit 1];  LeadShare ls = new LeadShare();  ls.LeadId = ld.id; ls.UserOrGroupId = groupMemberStore.UserOrGroupId ; ls.LeadAccessLevel = 'Edit'; leadShareList.add(ls);   if(leadShareList.size()>0){     system.debug('INSIDE LEADSHARE LIST.');      insert leadShareList;  }  } }   Don't know this will help but here is my trigger..  trigger PartnerLeadShare on Lead (after insert,after update) {  Map<id,User>PartnerUsermap = new Map<id,user>([select id,UserType from user where      UserType = 'PowerPartner' and IsActive = True] );    List<GroupMember>GroupMemberList = new List<GroupMember>([select GroupId,UserOrGroupId   from GroupMember]);   System.debug('PartnerUsermap ===  '  +PartnerUsermap); System.debug('GroupMemberList    '+GroupMemberList );  List<LeadShare> leadShareList = new list<LeadShare>();    if(!PartnerUsermap.isEmpty()){ for(Lead ld: trigger.new){      for(GroupMember grpmem : GroupMemberList){         if(grpmem.UserOrGroupId == ld.CreatedById){               LeadShare ldShare = new LeadShare (LeadId = ld.id,UserOrGroupId = grpmem.GroupId,LeadAccessLevel = 'Edit');              leadShareList.add(ldShare );         }     } } } if(!leadShareList.isEmpty()){ Database.SaveResult[] lsr = Database.insert(leadShareList,false);            Integer i=0; for(Database.SaveResult sr : lsr){     if(!sr.isSuccess()){     Database.Error err = sr.getErrors()[0];              if(!(err.getStatusCode() == StatusCode.FIELD_FILTER_VALIDATION_EXCEPTION                                              &&  err.getMessage().contains('AccessLevel'))){                  trigger.newMap.get(leadShareList[i].LeadId).                   addError(                    'Unable to grant sharing access due to following exception: '                    + err.getMessage());             }     }    i++; } }


This is my first post in this forum. I am new to Linux, just installed Ubuntu 11.10 on my Sony Vaio VGN-Z12 with two graphic cards Intel and NVidia Geforce 9300 GS.  After the installation the lightdm works on Intel card but with very law display quality. I installed Nvidia driver from the official website as well as this PPA.  sudo apt-add-repository ppa:ubuntu-x-swat/x-updates sudo apt-get update sudo apt-get install nvidia-current       Once I installed the driver and run nvidia-xconfig which creates xorg.conf file, the xserver will not start with error "no screen". If I delete the xorg.conf file then I am able to start the xserver normally but with intel display (bad quality)


Combine text and add blank line before each file

I want to combine multiple text files in a directory to a new file while leaving new lines between files.


Can I setup an MX record for a particular user email address?

I would like to configure 2 MX records :  - One MX record that identifies an email server to the domain @mycompany.com that will handle all of the emails except one email - Another MX Record that will redirect to another email server if the address email is: me@mycompany.com  Is it possible? If yes, how can I achieve it?  Thanks,  Fabien


Unexpected behavior of linked questions when sorted by recent activity

For any question I can view questions linked from/to it by from the url of the form: https://meta.stackexchange.com/questions/linked/id where id stands for the number of question. If some question has many linked posts, then this link is even available - by clicking on "see more linked questions..." at the bottom of linked questions list.  When I get the list of linked questions, I can choose from the tabs: hot, newest, votes, active, unanswered. I occasionally use this list ordered by recent activity if I am curious about something like this: Why were there recently upvotes on this relatively old post of mine? Did somebody link to it recently? Was something interesting related to this  topic posted recently?  Today I noticed that when I left the list open in one tab, and did something in another one, the number indicating new questions appeared.  It seemed a bit surprising that several posts would be linked to quite old post in such a short period. When I got back to this tab, I saw the gray banner: "3 questions with new activity". After clicking on it, new questions appeared on list. (It seems to be the recently active question on the given site.) After refreshing the page, this new questions disappeared and only questions which are really linked to the original one were shown again.  I should add that probably people will be using links like this very seldom and it can be corrected by refreshing the displayed page, so it is definitely not much of a problem. But I guess it is still a bug worth reporting.    I will add screenshots showing this behavior on this question:  (This is where I observed it. I tried this both in Mozilla Firefox and Google Chrome.)  Here is what I saw after coming back to the tab:    Here is screenshot after clicking on the gray banner:    After refreshing the page it all went back to normal.  When I tried the same thing with two questions from the same site opened in two tabs (namely  and ) I noticed that the same questions appeared in the list. I do not know why, but in this case it took much longer time before I saw this happening. I do not know whether this might depend on the size of the site, or on what I was doing in other tabs, or something else. But for the questions I tried, it seems to take much longer on meta.SE than on math.SE. Based on what I tried so far, it seems that questions which are shown are the recently active questions of the site. In the other words, if I wait a bit, the beginning of the pages  and  (replace any question id here) and will become the same.


Problem statement:  Let $S$ be the set of all positive integers $n$ such that $n^2$ is a multiple of both $24$ and $108$. Which of the following integers are divisors of every integer $n$ in $S$? The choices are: $12, 24, 36, 72$. The solution is $12$ and $36$. My solution was $S = \{36, 36* 6^3, 36*6^5, ...\}$  I can't figure out this problem. I started by finding the $\text{lcm}(24,108)$ and solved for $n$. I got some of the numbers in the set $S$, but not all of them, and I don't see what I'm missing. Update: added the choices and what my results


I have enum class like this:  REGULARLY("Regularly"), SOCIALLY("Socially"), RARELY("Rarely"), NEVER("Never");  private  final String name;  Drink(String s) {     name = s; }   How to get value of enum field by its position. For example for position 0 output should be "Regularly". NOT THE "REGULARLY"


All REST API's that I've built have always had a good series of unit tests to verify that they are working as expected.  One downside to this approach is that the testing almost always happens on either a development or a CI server and they don't verify everything is running correctly on a live or a clone of the live servers.  Is anyone able to recommend any additional tools for checking the API at a higher level when deployed to a server.  Thanks Scott


Is it possible to clip a figure inserted with \includegraphics to contents? That is, remove all surrounding whitespace.


An example of continuous random variable X > 0 with finite second moment but Infinite third moment

Can someone construct an example of this?  i.e., $E[X^2] < \infty$ but $E[X^3] = \infty$. Results could be in terms of pdf, or cdf, or survival function. Justification would be appreciated


How do that charge gets transferred while rubbing?

We all have studied that on rubbing a glass rod with silk or human hair, the two get charged with opposite polarities.  What confuses me is that since both glass and silk(or hair) are insulators, they contain no free electrons. So, how do the electrons get transferred?


How to prove that the numeric series $S := \sum_{n=0}^{\infty} x^n=\frac{1}{1-x}\text{ for any } x<1$

So...  $$S := \sum_{n=0}^{\infty} x^n=\frac{1}{1-x}\text{ for any } x<1$$  I just found out, and it tested it myself, that if this is true, then:  $$S_1 := \sum_{n=1}^{\infty} n = -\frac{1}{12}$$  Why? Because if the $S$ equality is true, then we derive $S$, and use $x=-1$, then $S_2 := 1-2+3-4+5-... = \frac{1}{4}$, and then $S_1-S_2 = 4\cdot S_1$, and $S_1 = -\frac{1}{12}$ which doesn't make any sense to me. I'm trying to see that everything is correct in this reasoning.  Though I could test $S$, because it is so for $x=\frac{1}{2}$, for $x=0$, for $x=-\frac{1}{2}$ (apparently), I can't test it for $-1$ or smaller numbers. So how do I know that $S = \sum_{n=1}^{\infty}x^n=\frac{1}{1-x}$ for any $x<1$? For my whole adult life I've known $S_1$ to be a divergent sequence. Now it converges? How?


Java Matrix with Generic / Bounded Wildcard Inputs

I'd like to create a class Matrix that accepts objects of type T extends Item for a game inventory. However, I'm having issues with implementing the class using generics / wildcards. This is what I have so far. public class Matrix<T> {     private final int maxVertical;     private final int maxHorizontal;      private T[][] contents;       public <T extends Item> Matrix(int maxVertical, int maxHorizontal) {          this.maxVertical = maxVertical;          this.maxHorizontal = maxHorizontal;           contents = new T[maxVertical][maxHorizontal];     }


How do Wounds, Damage, Saving Throws and Invulnerable Saves interact with each other?

I have read the freely available , which explains the core rules. However, I am still a bit confused regarding how exactly to resolve damage.   Imagine a unit of Space Marines gets 10 shots at a unit of Orks. The weapons of the Space Marines have an Armour Penetration value of -2, and a Damage Value of 2 as well. Out of those ten shots, six shots hit. Of those six hits, four of them wound.  The next step would require me to allocate "Wounds". How many Wounds did I generate? Is it 4, because 4 shots hit and passed the Wound roll? Or is it 8, because each shot would deal 2 damage? The Ork player would then have to allocate the wounds and roll Saving Throws. Let's assume his Orks have a saving throw of 4+. Does this mean he has to roll 4 individual Saving Throws (one per shot) or 8 individual Saving Throws (one per damage). Imagine one Ork had the ability to roll Invulnerability Saves. Are those Save rolls per-shot, or per-damage?


I want to know how to set volume with cmd but can't download software. I know it is possible because I had it but deleted it. opps


I was just watching a documentary a few days ago of the most famious boxing match's ever the "Thrilla in Manilla"(between joe frazer and Mohammed Ali), quite an interesting and motivating vedio to watch.   Well in the 13th round (the fight from the 3-13th round was dominated by Joe frazer.) Joe frazer really had Ali against the ropes and was hammering him with right and left hooks, uppercuts and what not , now in the documentary , one of the commentators famiously said      "He(Frazier) was't just 'beating Ali' , he was 'BEATING Ali UP' !!" .   I did't quite understand what that statement meant , whats the difference between "beating Ali" and "beating Ali up" ? Can anybody explain ?   Thank you.


Should the IPA of the word "conscious" be /ˈkɑːnʃəs/ or /ˈkɑːntʃəs/?

Ok, see the word "conscious" has the IPA /ˈkɑːnʃəs/ in the   However, when you listen clearly, you will feel like it should be /ˈkɑːntʃəs/ not /ˈkɑːnʃəs/.  So it should read /tʃ/ rather than /ʃ/.  In some other dictionaries, which use different transcription systems, they give the entry "ˈkän(t)-shəs" , for example in the . Here we see it with a /t/.  So, should the IPA for the word "conscious" be /ˈkɑːnʃəs/ or /ˈkɑːntʃəs/?


Can you always define the sum of ideals?

Let $R$ be a ring and $I_1, I_2$ be ideals.  Then the sum of these ideals is defined as:  $I_1+I_2=\{s_1+s_2| s_1\in I_1\,\text{and}\, s_2\in I_2\}$  Is it always possible to define this sum of ideals, or just for a finite amount of ideals?  Let $\{I_k\}_{k\in K}$ be a family of ideals. In which case can you define $\sum_{k\in K} I_k$? Has $K$ to be finite, countable or can $K$ even be uncountable?  Since we are in a ring the addition is closed and always gives an element of $R$. So $\sum_{k\in K} I_k$ is always well defined.  Am I right?  Thanks in advance.


Can I call a constructor from another constructor (do constructor chaining) in C++?

As a  developer I'm used to running through constructors:    class Test {     public Test() {         DoSomething();     }      public Test(int count) : this() {         DoSomethingWithCount(count);     }      public Test(int count, string name) : this(count) {         DoSomethingWithName(name);     } }   Is there a way to do this in C++?  I tried calling the Class name and using the 'this' keyword, but both fail.


I'm really new on ffmpeg and have a question where I cannot find a solution. I really hope that somebody from you could help me with that.  On one server I receive a 1080p stream, with ffmpeg I create a new stream with multiple bitrates and resolution and send it afterwards to a rtmp destination on this server. Below CL the command that I use at the moment and it is working.  ffmpeg -i - -copyts -muxdelay 0  -c:a libfaac -ab 128k  -c:v libx264 -preset faster -profile:v main -level 3.1 -crf 20 -g 50 -b:v 1500k -s:v 1920x1080 -f flv rtmp://localhost/stream/output_stream  -c:a libfaac -ab 64k -c:v libx264 -preset faster -profile:v main -level 3.1 -crf 23 -g 50 -b:v 1000k -s:v 1280x720 -f flv rtmp://localhost/stream/output_stream  -c:a libfaac -ab 32k -c:v libx264 -preset faster -profile:v main -level 3.1 -crf 23 -g 50 -b:v 800k -s:v 960x540 -f flv rtmp://localhost/stream/output_stream   Now I have the challenge that I need to send it to multiple servers. Is there anyway to add multiple outputs?  At the end the incoming 1080p stream should get multiple bitrates and should be send to around 10 different RTMP server.  I really hope that somebody can help me with that.


Sed. Change the characters in a string that satisfying a pattern

I have a file with these lines:  abcd hfd ktr hfk itor fld fjkdf name fkld ew wew name   It is necessary to change the characters in the lines that satisfy the pattern (contain the word 'name') as follows: a-> b, b-> c, c-> d ... z-> a, and apply these changes to the file. resulting in:  abcd hfd ktr hfk itor fld gkleg obnf glmf fx xfx obnf


How could the new MacBook Pro connect to a external display?

I have a DELL UP 2516Dt and I used to connect it to my old MacBook Pro with a HDMI.  But for the new MBP. I tried the so-called "Thunderbolt 2 to Thunderbolt 3" but it's not working (I found a lot of negative reviews at Apple Store).  I think this picture below describes quite well my confusion.    What should I try now to get them connected?  Thanks!


Stupid Facebook keeps telling me that my computer is infected so my account is temporarily blocked. I can't find a solution how to remove block.  Where can I ask this kind of question on the Stack Exchange network of sites?


What should I do when my neural network doesn't learn?

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


Confidence Interval of a bounded variable

Given a random variable $X$ which can take values on $[0,1]$. I am interested in calculating the confidence values for the mean estimator.  We know that the mean is normally distributed and can calculate the regular confidence value, but they lie outside of $[0,1]$. How do you deal with this do you intersect the confidence value with the range $[0,1]$?


How to see my hats from winter bashes 2013 & 2014?

I remember last year there was a possibility to see my hats even after the winter-bash has ended. I would like to see them again. How can I see the hats I earned in winter bashes 2013 and 2014?  PS: not a duplicate of that question, I don't want to see my performance/rankings, I want to see the hats I earned. And it WAS possible shortly after the winter-bash ended, so it's likely to still be possible now.


Find white spaces in the string using RegExp

/route/some pic name.jpg   I need to find all white spaces beetwen route/ and .jpg using RexExp.


In James Munkres' classic topology textbook, he writes a topology T using a typeface I am unfamiliar with.  I tried looking it up using detexify and checking commonly used character sets but the closest I could find was a capital fraktur I.


Prove that orthonormalsystem is an orthonormalbasis

We have an orthonormalsystem in $L^2(0, 2\pi)$: $\{e^{ikx} : k \in \mathbb{Z}\}$. Now I want to show that it's also an orthonormalbasis.   I thought the easiest way to do that would be to show that for every $v \in L^2(0, 2\pi)$ with $(v,\phi_k) = 0, \phi_k(x) = e^{ikx}$ for all $k \in \mathbb{Z}$, $v(x) = 0$ for all $x$. But I'm stuck showing that if $\int_0^{2\pi} v(x)e^{ikx} dx = 0$ for all $k \in \mathbb{Z}$, then $v=0$.  How do I proceed? Is there an easier way?


Show that if $(a_k)_{k \in \mathbb{N}}, (b_k)_{k \in \mathbb{N}}$ are bounded, then $\lim \sup(a_k + b_k) \leq \lim \sup(a_k)+\lim \sup (b_k)$  I'm not quite sure how to prove this.  I want to try this comparing cases.  Assume that $a_k \geq 0 \forall k \in \mathbb{N}, b_k \geq 0 \forall k \in \mathbb{N}$  $\Rightarrow \sup (\bigcup_{i=k}^\infty \{a_k + b_k \}) = \sup (\bigcup_{i=k}^\infty \{a_k \}) + \sup (\bigcup_{i=k}^\infty \{a_k \})$   The same is true if both sequences are negative for all k.  If one of the sequences is negative for all indices and the other is positive, then the inequality would be real.  Would that be sufficient for a proof, or does the fact that e.g. all terms are positive in both sequences not imply the equality of the sup terms?


I'm running torbrowser on Debian. klipper saves the history of my clipboard. I would like to desactivate this feature for tor browser, so that I can use the copy-paste functions "locally", without sharing them with the rest of my system.  Is that achievable? Is this a linux-oriented question?


Why is "happened" spelled with a single "n"?

I've seen the words        plan -> planned, planning   begin -> beginning      Why is "happen" different and why is "happenning" an incorrect spelling?


Why are there two Wifi indicators in the panel?

I just installed Ubuntu 13.10 en noticed that I have two indicators for WIFI in my upper panel.  In my 'panel' (where the clock is) I can see the time, a little envelope, a battery, an icon to adjust the sound etc.  And a symbol that shows me that I'm connected to the internet. BUT, I have 2 of these icons side by side. A normal one and one with a lock on it.


I have made a very simple, basic ball animation with Blender, and was just going to render it (in Cycles). I want to render each frame as an image, so I set it to PNG. But when I render it, after about 5 seconds, it renders a bunch of black images. The render result does not even appear in the UV image Editor. Here is what it looks like when I hit the Render Animation button-   I am trying to render it with 128 samples, 32 preview. Here are my Render settings-  Here is the project file:  I am using Blender 2.79. Can anyone help me and tell me why my animation is not rendering?


I have no idea how to do this problem; please consider helping me:     If $3|(a^2 + b^2)$, show that $3|a$ and $3|b$.


Windows command line runas with the builtin administrator disabled by default

On my laptop running Windows 8.1, I want to invoke a mklink command as admin, How could I run runas in an ordinary command line session? I tried Runas /user:administrator "mklink /d c:\doc c:\users\•••"  It can not execute with neither my password or an empty password. Just as most home user, I haven't explicitly set up the password of the built in administrator.  I can open up a runas admin command prompt box, but it's very inconvenient. I wish I can do it as sudo. Thanks.    A solution I found through Powershell:  c:\> @powershell saps cmd -verb runas   start-process in its short form. However, another command prompt with separate environment variables must be forced and I can't directly embed my command "mklink ..." into this statement. It's still more convenient than finding out an icon with silly mouse clicks.


How can we run amd64 architecture on a raspberry pi 4?

We are trying to install jevois-inventor onto the ubuntu18.04 but we flashed the ubuntu18.04 onto a raspberry pi 4 which is an arm64 architecture(we think). We tried to install amd64 packages individually on ubuntu terminal, but we can not install build-essential, gcc, etc packages for amd64.(We are new to Ubuntu and raspberry pi)


What are the main reasons to use scripting in games?

I'm trying to understand the appeal to scripting in large games.  Is it ease of development by avoiding lower level coding like C++? Thus avoiding the long compile times?  It seems scripting doesn't often have the benefits of rich tools like IDE and debugger and requires an adaptation layer to expose the low level code to the scripting interface.  Is it to keep options for changing story line and game play until later in the process? If so, at some point the scripts must be compiled or encrypted to prevent tampering.


Prove every odd integer is the difference of two squares

I know that I should use the definition of an odd integer ($2k+1$), but that's about it.  Thanks in advance!


How to get link of wms layer in Geoserver

How to Get WMS links of all published layers from specific workspace and store in Geoserver using gsconfig  or any environment. I want to get all WMS links of all layers in excel? I can get a published layer name from below code.     from geoserver.catalog import Catalog   cat=Catalog("http:// localhost:8080/geoserver/rest")   myResource = cat.get_resources(store='storeName', workspace='workspaceName')   layers = cat.get_layers(myResource)   for rss in myResorce:     print rss.name


Cannot get "Vertical Align: middle;" to work in header

I am trying to vertically align my  in my header to be in the middle. I looked up the solutions to this question being asked and none of them work. Does vertical-align: not work for trying to vertically align an inline-element within a div such as a header?  I tried creating a box model using 100% width and 100% height, or also the exact px of my div element that my h1 is in.  It just does not respond and stays on the top.  I know this question has been asked many times, however, I just cannot get it to work. Thank you for your time!

 This Is My Lab Zoe!

    .main-header {     width: 100%;     height: 150px;     background:#3d594b;     margin: 0;     padding: 0;     box-sizing: border-box; }  #header-title-box {     display: inline-block;     vertical-align: middle;     border: none;     width: 100%;     height: 150px;     margin: 0; }  h1.header-font {     height: 150px;     vertical-align: middle;     font-size: 40px;     color: white;     margin: 0;     text-align: center; }


What does battery charger's current rating mean?

I am basically a software engineer but have some interest in electronics so this is probably a very basic question.  I understand theoretically a battery or power source can provide as much current as needed by the circuit. However, I see in battery charger they say 5v and 500 mA. I don't understand what this is. Isn't it the current will be drawn as needed by the circuit? I understand if too much current is drawn it might burn something.... but having a current specified on charger (or a power source) is what I don't understand. Same is the thing in case of computer's USB (I heard it cannot supply more than 500mA. what if a circuit tries to draw more than 500mA?).  Hope I was able to explain my question well.  Thanks


java.lang.NullPointerException: Cannot read the array length because “testing.survivalMatrixFicheiro” is null

import java.io.File; import java.io.FileNotFoundException; import java.util.Scanner;  public class testing {      public static int[] populationVectorFicheiro;     public static double[] survivalMatrixFicheiro;     public static double[] birthMatrixFicheiro;     public static double[][] matrizLeslieNaoInterativo = new double[survivalMatrixFicheiro.length + 1][birthMatrixFicheiro.length];      public static void main(String[] args) throws FileNotFoundException {         readFileInfo();     }      public static double[] formarVetor(String[] line) {         double[] matrix = new double[line.length];         for (int i = 0; i < line.length; i++) {             String[] numbers = line[i].trim().split("=");             matrix[i] = Double.parseDouble(numbers[i]);         }         return matrix;     }      public static double[] getValores(String[] linha) {         double[] matriz = new double[linha.length];         for (int i = 0; i < linha.length; i++) {             String[] objeto = linha[i].split("=");             matriz[i] = Double.parseDouble(objeto[1]);         }         return matriz;     }      public static int[] getTotalPopulacao(String[] linha) {         int[] matriz = new int[linha.length];          for (int i = 0; i < linha.length; i++) {             String[] objeto = linha[i].split("=");              matriz[i] = Integer.parseInt(objeto[1]);         }          return matriz;     }      public static void readFileInfo() throws FileNotFoundException{         Scanner fileReader = new Scanner(new File("caes.txt"));         String[] primeiraLinha = fileReader.nextLine().trim().split(",");         populationVectorFicheiro = getTotalPopulacao(primeiraLinha);          String[] segundaLinha = fileReader.nextLine().trim().split(",");         survivalMatrixFicheiro = getValores(segundaLinha);         for (int i=0; i< survivalMatrixFicheiro.length;i++){             System.out.println(survivalMatrixFicheiro[i]);         }           String[] terceiraLinha = fileReader.nextLine().trim().split(",");         birthMatrixFicheiro = getValores(terceiraLinha);          double[][] leslieMatrix = fillMatrix(survivalMatrixFicheiro,birthMatrixFicheiro);         printMatrix(leslieMatrix);      }      public static void printMatrix(double[][] matriz) {         for (int i = 0; i < matriz.length; i++)//Cycles through rows         {             for (int j = 0; j < matriz[i].length; j++)//Cycles through columns             {                 System.out.print(matriz[i][j] + " ");             }             System.out.println(); //Makes a new row         }     }       public static double[][] fillMatrix(double[] survivalMatrix, double[] birthMatrix) {          for (int i = 0; i < birthMatrix.length; i++) {             matrizLeslieNaoInterativo[0][i] = birthMatrix[i];         // preenche a primeira linha         }         int count = 0;         for (int i = 1; i < survivalMatrix.length + 1; i++) {             for (int j = 0; j < birthMatrix.length; j++) {                 if (i == j + 1) {                     matrizLeslieNaoInterativo[i][j] = survivalMatrix[count];                     count++;                 } else {                     matrizLeslieNaoInterativo[i][j] = 0;                 }             }         }         return matrizLeslieNaoInterativo;     }  }  I currently have this code in Java for some testing for a bigger project. I'm trying to create some public variables to use throughout my bigger project, but I keep getting an error while trying to use them here. Whenever I create a public matrix with other public variables as its parameters, I keep getting an error:  Exception in thread "main" java.lang.ExceptionInInitializerError Caused by: java.lang.NullPointerException: Cannot read the array length because "testing.survivalMatrixFicheiro" is null  Is there anyway to fix this? I need to keep that matrix as a public variable for other methods on the bigger project.


I wonder if it is possible to convert text to C# code for dynamic validation. For example, I'd love to be able to store a string in my DB like this:  ((Value.StartsWith("CR") || Value.StartsWith("TRC")) && Value.Length == 10)   Then - pull it from the DB and use it to validate data. If would automatically swap out Value for the piece of data I'm trying to validate.  All validations would return a boolean that I would use in the code to see if the data being tested passed or failed.  I would have numerous variations of validations similar to the one above like this stored in my DB.  I've tried researching various phrases on Google but can't seem to think of what this might be called?


How to Dispose an object using Dispose method

How to Dispose managed or unmanaged objects Using Dispose Method?  In my application class is implemented IDisposable interface and gave overridden method Dispose(). But my actual doubt is how to dispose managed or unmanaged code with in the Dispose method.  public override void Dispose() {    // What should i do for my unmanaged objects?     // can i make my object set to 'null'? }


Strip out all HTML Tags from an excel file

I have an excel file that has cells with text that includes HTML tags.  The data was exported from a database and the HTML tags were included.  The HTML is stored as text, but I need it gone.  Is there a quick easy way to remove it all (other than find/replace)?


Cpp linking/header, why is it done this way?

I'm new to c++ and I have 'actually' learned a lot these past days. I just learned how to link multiple files today or what I think is called, using "headers".  My question is related to headers and linking files.   1. I was taught that you are supposed to "define" classes, structures, or functions in the header file. Then in the corresponding c plus plus file you set the definitions? Here is what I am doing, and here's where I read to do it :   Header.h file code  #ifndef HEADER_H #define HEADER_H class simple_math{ public:     int add( int, int);      int subtract( int, int); };  #endif   extras.cpp file code  #include "header.h"  int math::add( int x, int y){     return (x + y); };  int math::subtract( int x, int y){     return( x - y ); };   Why don't we just do everything in the actual .cpp file? Why do we post the declarative code in the header file, then create (excuse me if I'm using wrong terms) prototypes in a separate .cpp file?     It seems kind of odd to me. That some how these functions or class methods get defined in a .cpp file that isn't even "#included"(I guess) in the header. Instead, the header is included in the .cpp file and the code still gets executed properly.


what's the time complexity of the following program? How to calculate the complexity? What is the upper bound and lower bound of complexity?  for(i=n;i<=n^2;i++)    for(j=1;j<=i*log(i);j++)       a[i][j]+=3*i*j;


Proving breath first traversal on graphs

I am trying to proof the following algorithm to see if a there exists a path from u to v in a graph G = (V,E).   Reach := {u} LastCardinality := 0 while LastCardinality < |Reach| do   LastCardinality := |Reach|   Next := null   foreach i <- Reach do     foreach j <- V do       if(i,j) exists in E then         Next := Next + {j}   Reach := Reach + Next return Reach   So far I have got that the output needs to be Reach = Goal where Goal = {r | r exists V, there is a path from u to r}. I also have three invariants that I am pretty sure will help prove this.  Reach is always a subset of Goal and Next is always a subset of Goal.  After an arbitrary K times through the while loop, for every t that exsits in V, if t has a path of length k+1 from u, then t exists in Reach  If Reach is a subset of Goal before the while loop then LastCardinality < |Reach|  I know that to finish up the proof, I need to prove termination, the invariants, and correctness but I have no idea how. I think I need to use induction on the while loop but I am not exactly sure how.   How do I proof those three characteristics about an algorithm?


Did Voldemort know that Harry contained a piece of his soul before or when he killed Harry?

Would it be possible that Voldemort knew that Harry carried a piece of his soul in him before he tried to kill Harry? In knowing what Voldemort knew, we are able to tell more about the core motivation that Voldemort had in wanting to kill Harry. Yes, we know that he wanted to kill Harry in order to prove that he could not be stopped/megalomania or whatever, but was he willing to kill a part of himself in order to achieve that?  As per the question, when Voldemort killed Harry, wouldn't he be able to deduce that there are only two fragments of his soul left, in the snake and his own body?


Unwanted space after author name when using \citep

I am new to LaTeX and am having trouble when using \citep. Whenever I use it there is an extra space that is inserted after the author and before the comma. This is an example of what I get:     known as the response ratio (see page 30 of Borenstein et al. , 2009).   When I want this:     known as the response ratio (see page 30 of Borenstein et al., 2009).   I made example code to demonstrate the issue.  TeX file:  \documentclass[12pt,a4paper,openany,twoside]{report} \usepackage{natbib}  \begin{document}  known as the response ratio \citep[see page 30 of][]{BO&HE&HI&RO09}.  \bibliographystyle{authordate4} \bibliography{refs}  \end{document}   And the contents of the Bib file:  @book{BO&HE&HI&RO09, AUTHOR =       {Borenstein, M. and Hedges, L. V. and Higgins, J. P. T. and Rothstein, H. R.}, TITLE =        {Introduction to {M}eta-{A}nalysis}, PUBLISHER =    {Wiley}, YEAR =         {2009}, address =      {Chichester, West Sussex} }   I am using linux and my editor is Texmaker if that matters. Any help would be much appreciated.  Thanks  Edit: I have played around with this a little more and there is no issue if there is only one author. This makes me think that it might have something to do with how the author list is being abbreviated


What happens to my votes I cast when I was <15?

I joined SE network sites. As I am new, I have low reputation. As a part of contribution, I cast votes.  But when I cast votes, I see the following message.    Today, I gained 15 reputation on money.stackexchange. Then I cast votes and those reflected immediately; the earlier message disappeared. That means my votes are being reflected now immediately.  Looking at the message above, I was assuming that my votes are being recorded. It's just that those are not visible publicly.  When I go to my Activity section of my profile, I see following:    That section shows I only cast two votes. I have cast those two votes after I got 15 reputation. I do not see the vote count for those I cast before that.


It is possible to make the caption of a figure in CAPS (versalitas) typeface format?  Like as image below. But I want to change only the 'FIGURE 1.1'. Descriptive text label that is invariant. That has not been answered in another post  I also want to ask if it   is possible to write in bold the test in CAPS format?   Code (false) right here for either case:    \documentclass{article}   \usepackage{mathtools,amsmath}   \usepackage{amsthm}    \begin{document}    \begin{center}   \fbox{\parbox[b]{.3\linewidth}{     \begin{center}      .......\\This is a figure\\*******     \end{center} }   }   \end{center}    \begin{center}   \textsc{Figure 1.1:} Solution of $x^2\leq 4$   \end{center}   \end{document}


Let's say I have around 30k points of time series data with values ranging from 0 to 0.5. I have split this data into 5 buckets of 0.1 each which contains values within that range. I then plot these values with x axis being the bucket sizes and y axis being the number of values. I noticed that the distribution pattern depends on the size of the buckets. How do I know for sure what type of distribution my data follows? My knowledge in statistics is not very good and maybe evident from my question. Any help appreciated!


'Hot' StackExchange questions can be seen , but what exactly is special about them that makes them 'hot'? Many of these 'hot' questions range from 2-20 upvotes, and range from a minute to a week-or-so old. They also have low activity. What's so special about these questions that makes them 'hot'?


How to solve "Attempt to invoke virtual method 'java.lang.String java.lang.Object.toString()' on a null object reference"?

I am trying to fix this null pointer exception issue from the past 24 hours. It is constantly showing error in getOppositeSexUsers() . I have asked questions and also got the reply but it  showing the Null Pointer Exception evey time.   This is the logcat .    java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Object.toString()' on a null object reference         at com.techjd.hubu.MainActivity$6.onChildAdded(MainActivity.java:205)         at com.google.firebase.database.core.ChildEventRegistration.fireEvent(com.google.firebase:firebase-database@@19.2.0:79)         at com.google.firebase.database.core.view.DataEvent.fire(com.google.firebase:firebase-database@@19.2.0:63)         at com.google.firebase.database.core.view.EventRaiser$1.run(com.google.firebase:firebase-database@@19.2.0:55)         at android.os.Handler.handleCallback(Handler.java:815)         at android.os.Handler.dispatchMessage(Handler.java:104)         at android.os.Looper.loop(Looper.java:207)         at android.app.ActivityThread.main(ActivityThread.java:5740)         at java.lang.reflect.Method.invoke(Native Method)         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:766)   This is the main activity code .       public void getOppositeSexUsers(){         DatabaseReference oppositeSexDb = FirebaseDatabase.getInstance().getReference().child("Users").child(oppositeUserSex);         oppositeSexDb.addChildEventListener(new ChildEventListener() {             @Override             public void onChildAdded(@NonNull DataSnapshot dataSnapshot, String s) {                 if (dataSnapshot.exists() && !dataSnapshot.child("connections").child("nope").hasChild(currentUId) && !dataSnapshot.child("connections").child("yes").hasChild(currentUId)){                     Object ImageData = dataSnapshot.child("profileImageUrl").getValue();                     String ImageDefault = "default";                      if (ImageData != null){                         ImageDefault = ImageData.toString();                     }                        cards item = new cards(dataSnapshot.getKey(), dataSnapshot.child("Name").getValue().toString() , ImageDefault);                       //cards item = new cards(dataSnapshot.getKey(), dataSnapshot.child("Name").getValue().toString(), dataSnapshot.child("profileImageUrl").getValue().toString());                     rowItems.add(item);                     arrayAdapter.notifyDataSetChanged();                 }             }             @Override             public void onChildChanged(@NonNull DataSnapshot dataSnapshot, String s) {             }             @Override             public void onChildRemoved(@NonNull DataSnapshot dataSnapshot) {             }              @Override             public void onChildMoved(@NonNull DataSnapshot dataSnapshot, String s) {             }             @Override             public void onCancelled(@NonNull DatabaseError databaseError) {             }         });      }   Everytime I try a solution in getOppositeSexUsers() It will generate Null Pointer Exception . What is fix ?


Testing Batchable with Callout Error: You have uncommitted work pending. Please commit or rollback before calling out

I have a Batchable class which does a callout.  When I test the class which like this:  Test.startTest() MyBatchableJob job = new MyBatchableJob(); Database.executeBatch(job, 50); Test.stopTest();   I get this error:     System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out   But when I test like this:  Test.startTest(); MyBatchableJob job = new MyBatchableJob(); job.execute(null, [SELECT ... FROM ... ]); Test.stopTest();   It works fine.  Does creating and executing a Batchable object using Database.executeBatch count as pending uncommitted work? or am I missing something?


Changing the Half-Life of Radioactive Substances

Is there a way to extend or reduce the half-life of a radioactive object? Perhaps by subjecting it to more radiation or some other method.


I'm new to Ubuntu and want to disable the turbo boost. I tried with cpufreq but i cant get it to work. is there any other way to do it.   In windows it was as easy as changing the CPU speed from 100 to 99.


php base64_decode equivalent in javascript

I need the exact base64_decode() equivalent in javascript. I did a lot of research but have encountered some problems.   I can not use javascripts atob(), as for some reason, it just returns a complete different result as phps base64_decode().  Then I found a special decode function on this page:   function Base64Decode(str, encoding = 'utf-8') {         var bytes = base64js.toByteArray(str);         return new (TextDecoder || TextDecoderLite)(encoding).decode(bytes); }  function Base64Encode(str, encoding = 'utf-8') {     var bytes = new (TextEncoder || TextEncoderLite)(encoding).encode(str);             return base64js.fromByteArray(bytes); }   Which indeed gives the same result, as the php function base64_decode(), but unfortunately, you can not reverse it.  So in php you can do base64_encode(base64_decode( 'BASE_64_ENCODED_STRING' )) and you will get back your original BASE_64_ENCODED_STRING  but in Javascript   Base64Encode(Base64Decode( 'BASE_64_ENCODED_STRING' ))   won't give you back your original BASE_64_ENCODED_STRING, but I need to be able to do that. I found out, that it might be due to some UTF-8 encoding issue.  Interestingly btoa(atob( 'BASE_64_ENCODED_STRING' )) will get me back the original BASE_64_ENCODED_STRING, but as I mentioned above, it won't decode the same as phps base64_decode() anyway...


Is it worth it to buy an FD-EOS adapter, or is it better to exchange a misbought lens?

I recently bought a manual-focus (since manual doesn't bother me) . However, I didn't notice at the time of purchase that it was an FD lens. (I'm a hobbyist; I didn't know Canon had actually changed lens mounts at some point.)  On the one hand, I kind of want to experiment with this guy. And quality FD lenses are relatively cheap on the used market, so if the adapters were worth it, I could probably get more (and more varied) glass. On the other hand, everything I read about the FD-EOS adapters is highly contradictory. As in, some people swear by them, and others think they're outright tripe.  I am still within the exchange period, and can easily exchange this lens for this  that I'd been tossing up about buying anyway, as they are the same price.  Which would be the wiser choice?


How can I get a report of all MAC addresses nearby?

I am trying to get an idea of how to get a list of all the MAC/IP's near my network. I've tried arp -a commands (What I found from some previous searching.) but those are not showing any of the iPhones or iPads that I know are for sure in range. The goal is to get all available devices, not only ones that are already connected. I have zero programming or networking experience so please be as simple as you can with a response. This is for a business meeting I have coming up with some IT guys, and I would like to have a general idea of how this can work before I get there.


Prove that $ 3 =\sqrt{1+2\sqrt{1+3\sqrt{1+4\sqrt{...}}}}$   According to the source, this can be done easily like $$(x+1)^2 = 1+2x+x^2$$ $$(x+1)^2 = 1+x(x+2)$$  But how to continue and prove this?


Is there a way to echo output that being piped to the next command? For example lets say that I can reading filenames from a text file and then running a command on that file:  cat files.txt | xargs -I{} -d"\n" command    The command runs and the output is displayed in the terminal, is there a way to print out the filename as well?   Lets say the input file contains:  file1.txt file2.txt   Intended output:  file1.txt [output of command with file1.txt as input] file2.txt [output of command with file2.txt as input]   Is there a way to get file1.txt and file2.txt in stdout as well?


How to check if a value of the input is number or not?

I have this problem here, I want to check if the value of the input is going to be a number or not on keyup. Any help would be appreciated.    $('input').keyup(function () {  var check_nm = $('input').val();  if(check_nm != "123"){    console.log('not number');  }else{    console.log('is number');  } });


Booting off windows image through network

I have a HP st5742, which is a tower that does not have a hard drive and I am trying to boot it off the network, preferably off an image. It was designed along with the program HP Image Manager, however this program has been discontinued by HP and I can not seem to find a way to get a copy. If this helps, I am running my network with windows server 2008 R2 and would like the streaming client to be running windows. I have spent days searching for a way to deploy this machine however I can not seem to find a straight forward program, guide, or way to do this. I am new to this sort of thing but I willing to reading into the subject, all I need is a point in the right direction. Any help would be greatly appreciated.


Let $f(z)$ be a holomorphic function and $f(z)$ is 1-1.  If $f(z)$ has a zero at $z=x$,  then $x$ is a simple zero?  I guess this is simple fact, But I can't prove it, and I can't find related article.  Thanks!


I copied personal files to ubuntu live home directory usb. with intention of transferring to another pc. but files seem to be lost. how can i recover these files


Proving a formula for $\sum ^{n}_{k=1}\sin kt$

Let $t$ be a real number such that $\sin \dfrac{t}{2}\neq 0$.  Show that $$\sum ^{n}_{k=1}\sin kt=\dfrac{\cos\dfrac{t}{2}-\cos \left( n+\dfrac{1}{2}\right) t}{2\sin \dfrac{t}{2}}$$ for every positive $n$. What method should I use?  Any explanation is much appreciated.


My understanding was that all objects emit light of continuous spectrum when hot ( black body radiation) but then you see discreet wavelengths in spectra lines and I am confused. I know I am making a mistake somewhere but not able to point it


Ok, I've been using a command block to spawn a villager that has custom trades. There's no problem with that at all- I'm just wondering if it's possible to have a villager trade me an item that has a custom name (eg. Key). Or is this unchangeable, so I'd need to name it with an anvil after purchase?  /summon Villager ~ ~1 ~ {Offers:{Recipes:[{buy:{id:"minecraft:emerald",Count:4},sell:{id:"minecraft:leather_helmet",Count:1}},{buy:{id:"minecraft:emerald",Count:6},sell:{id:"minecraft:leather_chestplate",Count:1}},{buy:{id:"minecraft:emerald",Count:5},sell:{id:"minecraft:leather_leggings",Count:1}}]}}   The code is fully functional, it's just integrating custom names for the item he sells.


I've been trying to learn Java lately, making slow progress but I'm getting there. Anyways, I've been working my way through the book: 'Sams teach yourself Java in 24 hours' and quite early on it states:     Java is flexible about where the square brackets are placed when an array is being created. You can put them after the variable name instead of the variable type, as in the following: String niceChild[];      To make arrays easier for humans to spot in your programs, you should stick to one style rather than switching back and forth. Programs that use arrays in this book always place the brackets after the variable or object type.   I totally understand all of that, but then later on during one of the exercises it seems to go against what has just been said. As you can see below it has: String phrase[] = { but I can't help thinking it should be String[] phrase = { instead? I know that the program runs fine with either. I presume it's just a typo but I wanted to know from someone who understands it a bit better.          package com.java24hours;  class Wheel {     public static void main(String[] arguments) {         String phrase[] = {             "A STITCH IN TIME SAVES NINE",             "DON'T EAT YELLOW SNOW",             "JUST DO IT",             "EVERY GOOD BOY DOES FINE",             "I WANT MY MTV",             "I LIKE IKE",             "PLAY IT AGAIN, SAM",             "FROSTY THE SNOWMAN",             "ONE MORE FOR THE ROAD",             "HOME FIELD ADVANTAGE",             "VALENTINE'S DAY MASSACRE",             "GROVER CLEVELAND OHIO",             "SPAGHETTI WESTERN",             "AQUA TEEN HUNGER FORCE",             "IT'S A WONDERFUL LIFE"         };         int[] letterCount = new int[26];         for (int count = 0; count < phrase.length; count++) {             String current = phrase[count];             char[] letters = current.toCharArray();             for (int count2 = 0;  count2 < letters.length; count2++) {                 char lett = letters[count2];                 if ( (lett >= 'A') & (lett <= 'Z') ) {                     letterCount[lett - 'A']++;                 }             }         }         for (char count = 'A'; count <= 'Z'; count++) {             System.out.print(count + ": " +                 letterCount[count - 'A'] +                 " ");             if (count == 'M') {                 System.out.println();             }         }         System.out.println();     } }


Why do some Atlanteans need water breathing suits?

In the new Aquaman movie there are a number of scenes where Atlanteans are seen on land wearing suits filled with water so they can breathe. In some of the fight sequences we even seen their suits breaking and the person inside "drowns" like a fish out of water.  Yet Aquaman, his mother, and numerous other Atlanteans have no trouble breathing both air and water. I suppose in Aquaman's case he was half Atlantean and half human, but that doesn't explain the others who had this ability.   I felt like this was either not explained at all or else I missed it. Why do only some Atlanteans need water breathing suits while others don't?


Unable to output cyrillic ASCII encoding

I have MySQL field which contains plain text Cyrillic characters (ex. Широка поляна). Collation is utf8_general_ci.  When I pull out this content with MySQL query and try to output it with php I always get ???? symbols. HTML encoding is utf8, document encoding is utf8, mb_detect_encoding() shows ASCII for the string but none of the PHP / MySQL convert functions turns it into something readable.


How are the Lagrange equation and Feynmann path integral related?

My question is, where could I get some more info on how the Euler-Lagrange equations are related  $$ \delta S [y(x)] =0 $$  with the Feynmann path integral formulation $ \int D[y(X)]e^{iS[y(x)]/\hbar} $  I believe that when $ \hbar \to 0$ (semiclassical), only the points that satisfy (1) contribute to the path integral.   If someone can give me more info about it :D thanks


How can I restrict `pgfplots` plot to an interval manually?

OK, I've plotted these graphs but am unable to stretch the second one, so that they both have the same values on the vertical lines drawn from one to another. I've tried to set domain=0:2200 for both but it doesn't work.


How to determine whether a given likelihood function has a conjugate prior?

Does there exists a certain formal procedure one has to go through before being able to claim that no conjugate prior $p(\theta)$ exists for the given likelihood function $p(X | \theta)$?   In other words, how can one be sure that a conjugate prior is truly impossible to find, rather than that one has simply failed to do so due to a lack of experience or intuition?


Modify a shape and have modifications apply to clones

Is there any any "Symmetry Modifier" option in illustrator?   Let's say I want to create a head that is totally symmetric. I created one half then mirrored it to get another half. Flipped the other half, aligned them and joined them together with Pathfinder→Unite option.   Now I modified some portion of the right half outline. But how can I get that same modification to be updated on the left option? I thought it would happen automatically.


Why isn't my utf8 working in my php page?

I searched for a lot of answers here but i still have a problem with the UTF8. "Special" letters doesn't appear in my browser.  I'm using:  php Designer 8 Wampserver 3.1.4_x86 MySQL 5.6 Navicat100_premium I'm using Google  [ those "?" are all "çççççççç"  This is the beginning of the code:    <html> <title> APPACDM </title> <meta name="viewport" content="width=device-width, initial-scale=1"/> <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css"/> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"/> header('Content-type: text/html; charset=utf-8'); <head>     <meta http-equiv="Content-type" content="text/html; charset=utf-8" />     <meta name="viewport" content="width=device-width, initial-scale=1">


What will result in better page ranking in search results: Page views or time spent on page?

What will result in better Page Ranking in search results?   More page views & less time spent per page    Less page views & more time spent per page     Note: The website that is being made has over 10,000 pages.


How to resolve a Java Rounding Double issue

Seems like the subtraction is triggering some kind of issue and the resulting value is wrong.  double tempCommission = targetPremium.doubleValue()*rate.doubleValue()/100d;   78.75 = 787.5 * 10.0/100d  double netToCompany = targetPremium.doubleValue() - tempCommission;   708.75 = 787.5 - 78.75  double dCommission = request.getPremium().doubleValue() - netToCompany;   877.8499999999999 = 1586.6 - 708.75  The resulting expected value would be 877.85.  What should be done to ensure the correct calculation?


What is the difference between Affection and Friendship, if any?

I've risen Pokemon Amie Affection to 5 hearts on my Riolo in the hopes that it will evolve as soon as it levels up, but I'm not certain that this is the same thing as friendship, and I'd like to not waste a level.  My question is this: What is the difference between Pokemon Amie Affection and the Friendship stat?


Wacom Bamboo Fun pen draws even while hovering

My  tablet is only a few months old and I had not used the pen when I bought it. Its mouse has been working fine. When I used the pen recently it was stuck in the drawing mode all the time, even while hovering!  What I mean by this is that the pen starts drawing as soon as it is hovering within range of the tablet! That is even when the pen is not making physical contact with the tablet. It does not matter which application I use: Paint or Paint.net, the pen always has this behaviour.  I have tried the (1) uninstall (2) reboot (3) install latest Wacom drivers routine, but it has not solved this problem. Does anyone who has faced this problem know how to fix it?


Interacting with JavaScript-generated HTML

Using javascript, I have taken data from a JSON file and placed it into an HTML select element. Each item from the JSON file is in a different option element within the select.   I would like to now be able to display a user's selected option in an HTML input element. I thought that this would work using this code:  <script> $( "select" )   .change(function() {     var str = "";     $( "select option:selected" ).each(function() {       str += $( this ).text() + " ";     });     $( "div" ).text( str );   })   .trigger( "change" ); </script>   I think my issue is that my HTML generated from the javascript is not recognized. Is there a way I can make this work?  Thanks


I have already tried many of them but i want to switch between the different camera lenses (like wide angle, macro, telescopic) none of the apps seem to offer it accept for an ios app called ios camera which is available as plugin for obs but that is also not available for linux and i have an android phone i am looking for for something free but paid is also okay.


Arriving at night before Schengen visa valid date?

I'll be traveling to Germany this May and my planes would arrive at 4 May 20.30 at Frankfurt Airport but the Schengen visa that I received is valid only at 5 May.  Is it possible to enter if it's only a few hours before the day change? Or do I have to wait until day change in the transit area?  Another thing, would the airline rejected me from boarding the plane?


I was always taught that when you are talking about the time you fell asleep, you say "I went to sleep at 10pm". I am increasingly hearing people say "I slept at 10pm". Is that also correct?  Related question:   However the above discusses "sleep" as part of a longer sentence, while I am talking specifically about using it in these shorter sentences.


I'm learning linear algebra on Kunze Hoffman book and stuck for a  long time by this problem.Please help me solve this. Thanks:     Let $S$ be a set, $F$ a field, and $V(S,F)$ the space of all functions from $S$ into $F$:   $$ (f + g)(x) = f(x) +g(x)$$   $$(cf)(x) = cf(x)$$   Let $W$ be any $n$-dimensional subspace of $V(S,F)$ . Show that there exist points $x_1, x_2, ... x_n$ in $S$ and functions $f_1, f_2, ..., f_n$ in $W$ such that $f_i(x_j) = \delta_{ij}$. Here $$\delta_{ij} =  \begin{cases} 1 ,  & \text {if $i = j$} \\ 0 , & \text {if $i \neq j$} \\ \end{cases} $$


"a pitch to a company" What does this mean?

This is also a TOEFL listening question.  An outside class student is taking a game creation class ( computer programming ) and in order for him to pass the class, he has to demonstrate his own project.  Here is the conversation between a professor and the student.  Professor     Alright, that sounds like it would consititute an appropriate amount of work on your part. Now, the project also incorporates a presentation where the students demonstrate their prototype.   Student     Yeah, I was figuring I'd present my project as if it was a pitch to a company. I figure it would be boring if I went through the whole design document in front of the class, so I'd create a slideshow and present it as if I was looking for investors or a publisher.   Could this mean, possibly, something like a submitting a resume to a company??


I have a problem with two updates for Windows 10 Preview - they are constantly failing. I want to skip them, but using new 'Windows Update' UI I have no idea where to find this option.  I'm using latest Windows 10 preview.  I just want to skip and hide two updates which are failing every time.  In Windows 8, I could click on any update and say "please don't install this one and don't bother me again with this update." I cannot find this option in Windows 10 Preview.


condition number of a matrix with diagonal ones and constant else.

Consider the matrix  $$A=\left(\begin{array}{ccccc} 1 & c & \cdots & c\\ c & 1 & \ddots & \vdots \\ \vdots & \ddots & \ddots & c\\ c & \cdots & c & 1\\ \end{array}\right)$$ for some $c\geq1$. So $A$ is a matrix with every entry equal to $c$, excepts for the diagonal entries, who equal $1$.  If $c=1$, $A$ is singular. Furthermore if $c$ increases, the condition number of $A$ decreases. I want to prove this, but I do not know how. Manually writing out the condition number seems a burden.   So my question is: how do I compute the condition number of $A$?    Edit: The solution is $$\kappa(A)=\left|\frac{\lambda_{\mathrm{max}}(A)}{\lambda_{\mathrm{min}}(A)}\right|=\left|\frac{(N-1)c+1}{1-c}\right|=\frac{Nc}{c-1}-1,$$ since the eigenvalues of $A$ are $1-c$ and $(N-1)c+1$, where $N$ is the number of rows (or columns) of $A$.   However, I retrieved the eigenvalues by throwing a couple of matrices into WolframAlpha. So my question reduces to how to prove $1-c$ and $(N-1)c+1$ are the eigenvalues of $A$?


Selenium/Cucumber/pom model - unable to launch browser

I'm setting up a framework using Java, selenium, Cucumber using page object model. project -   I'm getting null pointer exception while running the code.  The code runs fine if I directly open the browser in launchstep.java file.  I'm not sure the problem here is. I'm sure I have initialized everything that is required.  launchstep.java  package Steps.LaunchSteps;  import Utils.DriverFactory; import cucumber.api.java.en.Given;  public class launchstep extends DriverFactory {      @Given("^I go to HelloFresh$")     public void iGoToHelloFresh() throws Throwable {         OpenBrowser.goToURL();     } }   launchpage.java  package pageobjects.launchpage;  import pageobjects.BasePage;  import java.io.IOException;  public class launchpage extends BasePage {       public launchpage() throws IOException {     }      public launchpage goToURL() throws IOException {         getDriver().get("www.google.com");         return new launchpage();      }   }   DriverFactory.java  public class DriverFactory { public static WebDriver driver; public static launchpage OpenBrowser;  public WebDriver getDriver() {      try {         Properties p = new Properties();         FileInputStream fi = new FileInputStream(System.getProperty("user.dir") + "/src/main/java/properties/config.properties");         p.load(fi);         String browserName = p.getProperty("browser");           switch (browserName) {              case "firefox":                  if (null == driver) {                     System.setProperty("webdriver.gecko.driver", Constant.GECKO_DRIVER_DIRECTORY);                     DesiredCapabilities capabilities = DesiredCapabilities.firefox();                     capabilities.setCapability("marionette", true);                     driver = new FirefoxDriver();                  }                 break;              case "chrome":                  if (null == driver) {                     System.setProperty("webdriver.chrome.driver", Constant.CHROME_DRIVER_DIRECTORY);                     driver = new ChromeDriver();                     driver.manage().window().fullscreen();                   }                 break;          }     } catch (Exception e) {         System.out.println("Unable to load browser" + e.getMessage());       } finally      {         driver.manage().timeouts().pageLoadTimeout(60, TimeUnit.SECONDS); OpenBrowser = PageFactory.initElements(driver, launchpage.class);      }      return driver;  } }


Hey I'm supposed to show that the sequence $a_n=(1+\dfrac{1}{n})^n < 3$. Can someone please help me out?


How to cleanly pass many arguments in python and have default values?

I have a function, which has a bunch (~25) parameters. However, I usually want to use the default value of most of those parameters, and only specify a couple (to have values other than their defaults). So I've been doing something like (same idea, but fewer parameters for this example):  def myFn(self,a=20,b=10,c=5):     self.a = a     self.b = b     self.c = c  myFn(a=100)   Which will give a the value 100 and leave b and c with their default values.  And this has worked till now. However, it's getting cumbersome, having a million parameters in the function definition, and also if I call the function with a ton of arguments.  Is there a better way to do this? I know that you can pass keyword arguments, as a dict, which is almost what I want I think. But how can you then give default values inside the function?  edit: this is not a duplicate of  as that doesn't help me with what you should do with defaults.


If change element in DOM with JS not working event

I have a function that changes a table in a list, so far so good, but when the function changes in js it stops working, if I reload the page it works but if I change the DOM nothing. Can you help me?  $(document).ready(function() {     $('#table-list tbody tr').click(function(event) {         if(event.target.type == 'checkbox'){         }else{             $(':checkbox', this).trigger('click');         }     });      $('#ul-list li').click(function(event) {         var checkbox_type = $(event.target).find("input[type='checkbox']").attr('name');         if(checkbox_type){             $(':checkbox', this).trigger('click');         }     });  });   These are the two events that should always be active. But if I change the table to ul not it works  So let me explain better, I have a table like this:

       <input type="checkbox" name="1" />

       <input type="checkbox" name="3" />

   Then by clicking on a button I convert it to a list by removing the table from the DOM and inserting this:

       <input type="checkbox" name="1" />

       <input type="checkbox" name="3" />

   Now I want if I try to click on the list this function should start:  $('#ul-list li').click(function(event) {         var checkbox_type = $(event.target).find("input[type='checkbox']").attr('name');         if(checkbox_type){             $(':checkbox', this).trigger('click');         }     });   instead no.


Is there a (basic) way to understand why a limit cannot be brought inside of a sum, in certain situations?

I have seen that the method of "dominated convergence" implies that sometimes a limit cannot be brought inside of a sum, but is there a more basic way to understand this, preferably without using integrals?   A conceptual or simple answer would be helpful. Thank you!


I am trying to classify all groups of order 75. I am only allowed to use Sylow's theorems, and other basic facts (such as what groups of order $p^2$, $2p$ are isomorphic to, basic facts about direct products, etc).  My attempt was the following:  We have that $75 = 3 \cdot 5^2$.  Sylow's third theorem tells us that the number $n_5$ of Sylow $5$-subgroups is congruent to $1 \bmod 5$, and must divide $3$. Therefore $n_5 = 1$, so we must have a normal (by Sylow's second theorem) subgroup of order $5^2 = 25$.  Similarly we get that $n_3$, the number of Sylow $3$-subgroups, is either $1$ or $25$. In the case that $n_3 = 1$ it isn't hard to show that that the group is isomorphic to either $\mathbb Z_{25} \times \mathbb Z_3 \simeq \mathbb Z_{75}$, or to $(\mathbb Z_5 \times \mathbb Z_5) \times \mathbb Z_3 \simeq \mathbb Z_5 \times \mathbb Z_{15}$.  In the other case when $n_3 = 25$, we have $25$ subgroups where the pairwise intersection of any two is $\{e\}$. This accounts for $1 + 25 \times (3-1) = 51$ distinct elements (including the identity) of the group, leaving $24$ elements.  This is all I know for this case, and I don't know how to proceed. I appreciate any assistance.


The test statistic for the Durbin Watson test can range from 0-4 from what I have gathered. Now the lower limit of 0 makes sense considering the test statistic consists of two summations which are both squared and divided by each other; but what gives us our upper limit of 4? Is this limit incorrect? Also, if the upper limit to this test statistic is not 4, than what is it?


My SQLs are taking too long to execute for first time everyday in Oracle 11g

whenever I make a new request in my application it takes to long to respond for the first time and all the subsequent requests are faster. If I do it again after some hours or tomorrow again it takes more time to respond and same subsequent requests respond quickly. I am not sure why this is happening every now and then even though the server is not restarted. I can understand if it is issue of explain plan creation. But the explain plan is created only once for the first time and it should not be slow there after. But I am keep on experiencing periodically even though the server is not restarted.


why is the class method called by instance and class not the same thing

for start, let's define a class and instance of the class  class c:     @classmethod     def m(cls, a):         return a + 1 a = c()   those methods are used the same way  >>> c.m(5), a.m(5) 6, 6   and cls in both cases is c  but c.m is a.m is False and c.m == a.m is True  why is the class method called by instance and class not the same and why am I able to call it even by an instance of that class  it would make sense if cls were not the same in both cases  EDIT:  I already knew the difference between is and ==  I was already successfully using is to check if two classes are the same (type(a) is int for example), but I did learn I should use it for is None, so thanks anyway for leading me to that page  My question actually was why are they not the same object  they even have same ID id(a.m) == id(c.m)


Is the union of finitely many open sets in an omega-cover contained within some member of the cover?

Let $\mathcal{U}$ be an open cover of $\mathbb{R}$ (Standard Topology) such that $\mathbb{R} \not \in \mathcal{U}$ and for any finite set $A$ there is a $U \in \mathcal{U}$ such that $A \subseteq U$. We call such an open cover an $\omega$-cover. Can we show that for any finite set $B \subset \mathcal{U}$, there is a $V \in \mathcal{U}$ such that $\cup B \subseteq V$?  Ultimately I'm working on showing the following. Let $\langle \mathcal{U}_n: n \in \mathbb{N} \rangle$ be a sequence of $\omega$-covers. Can we find a sequence $\langle F_n: n \in \mathbb{N} \rangle$ with each $F_n \in \mathcal{U}_n$ such that $\cup F_n$ is an open cover of $\mathbb{R}$?  My approach here was to use each $\mathcal{U}_n$ to cover $[-n,n]$, thus eventually covering all of $\mathbb{R}$. Since $[-n,n]$ is compact and $\mathcal{U}_n$ is a cover, $\mathcal{U}_n$ has a finite subcover. But that's as far as I can get unless what I conjectured above is true.


How do you exclude yourself from Google Analytics on your website using cookies?

I'm trying to set up an exclusion filter with a browser cookie, so that my own visits to my don't show up in my Google Analytics.  I tried 3 different methods and none of them have worked so far.  I would like help understanding what I am doing wrong and how I can fix this.  Method 1 First, I tried following Google's instructions, , for excluding traffic by Cookie Content:     Create a new page on your domain,   containing the following code:      <body onLoad="javascript:pageTracker._setVar('test_value');">    Method 2 Next, when that didn't work, I googled around and found this Google thread, , where the most popular answer says to use a slightly different code:       SHS Analytics wrote:         <body onLoad="javascript:_gaq.push(['_setVar','test_value']);">       Thank you! This has now set a __utmv cookie containing "test_value",   whereas the original:         pageTracker._setVar('test_value')       (which Google is still recommending)   did not manage to do that for me (in   Mac Safari 5 and Firefox 3.6.8).   So I tried this code, but it didn't work for me.    Method 3 Finally, I searched StackOverflow and came across this thread, , which suggests that the following code might work:   <script type="text/javascript">     var _gaq = _gaq || [];     _gaq.push(['_setVar', 'exclude_me']);     _gaq.push(['_setAccount', 'UA-xxxxxxxx-x']);     _gaq.push(['_trackPageview']);  // etc...  </script>   This script appeared in the head element in the example, instead of in the onload event of the body like in the previous 2 examples.  So I tried this too, but still had no luck with trying to exclude myself from Google Analytics.  Re-iterate question So, I tried all 3 methods above with no success.  Am I doing something wrong?  How can I exclude myself from my Google Analytics using an exclusion cookie for my browser?   Update I've been testing this for several days now, and I've confirmed that the 2nd method of excluding yourself from tracking does indeed work. The problem was that the filter settings weren't properly applied to my profile, which has been corrected.  See the accepted answer below.


how to prioritise between home and work network connections

I work at home and have a vpn and lan connection  Vpn is ok for work related bits but for some reason browsing the internet is very slow. If i disconnect the vpn then the problem goes away. Can I set my laptop to browse via the lan connection whilst still also using the vpn connection to remain on the work network?


How to show the following      $$\displaystyle  \int_{0}^{1}\dfrac{\arcsin{\sqrt{x}}}{x^4-2x^3+2x^2-x+1}dx  \\ =  \pi\sqrt{\frac{1+\sqrt{13}}{78}} \log \left(\frac{1+\sqrt{13}+\sqrt{2  \sqrt{13}-2}}{4} \right)+\pi\sqrt{\frac{\sqrt{13}-1}{78}}\tan  ^{-1}\left(\frac{\sqrt{5+2 \sqrt{13}}}{3} \right)$$   It seems that it can be transformed into an elliptic integral. Maybe we can define   $$I(a) = \int_{0}^{1}\dfrac{\arcsin{a\sqrt{x}}}{x^4-2x^3+2x^2-x+1}dx $$  Then by differentiation   $$I'(a) = \int_{0}^{1}\dfrac{\sqrt{x}}{(\sqrt{1-a^2x})(x^4-2x^3+2x^2-x+1)}dx $$  Another approach might involve series expansion of $\arcsin(x)$  $$\arcsin(x) = \sum_{n\geq 0}\frac{{2n \choose n} }{4^n(2n+1)}x^{2n+1}$$  To be honest it seems helpless.   Reference


Cycles Taking 2 Hours to Render One Frame

I am new to rendering with cycles (I usually just use internal), and am trying to render a particular scene with it. The scene does include an explode particle system and a smoke system, however they are still quite simple. Though I believe there must be something wrong with my setup, as it is taking about 2 hours just to render one frame at a time. I have tried using GPU rather than CPU but it caused an error ("OpenCL build failed") so I ignored that option.  Computer details -  AMD A10-7300 Radeon R6, 10 Compute Cores 4C +6G 1.90 GHz  8.00 GB RAM  64 Bit Operating System  Windows 10      Any suggestions will be gratefully appreciated!  Michael.


Parents applying together for UK visit visa

My parents are both permanent residents of USA and are applying for their first UK visit visa to come and see me (their daughter, EU citizen).  My father is in full-time employment with a reputable company in the US and good regular income. Mom is a housewife and not in employment. They have a joint account where my dad receives salary and they also keep their joint savings.   My Dad is going to pay for my mom's visit. However, they have to each fill separate applications. So both of them are asked about their savings and since they have a joint account, they are not sure what they should write? Should they each mention the total sum in their joint account? or divide the total in half and each of them write that amount?  Also, there is a question as how much money you are going to spend in this visit. My dad was wondering if the number he puts down in his applications should be just the money for him or the total of sum for him and my mother? If he puts, let's say 5000 for both of them, then how should my mother answer the same question? It is a bit confusing as my mom is stating that she is dependent on my dad but still they have to each fill two separate applications.  I would be thankful if you can advise.


Identify this sci-fi book - young man, teleporters, alien planet survival?

I read this book probably 25 or more years ago. - Maybe 1988 or so. I keep thinking it was Heinlein (or really any classic sci-fi authors) but I haven't found it yet. I think it was a short book, not a huge novel. Maybe even a short story.   Here's what I remember...  Young boy lives on earth and uses a teleporter to go to school in a far away city. Each morning he uses it to get to school then uses it to come back after school. One day he has a test in one of his classes to see if he can survive on an alien planet (maybe, that part is fuzzy) so they use the teleporter (I think?) to transport him to an alien planet to survive. Maybe the transporter breaks and they can't get him back. Maybe. I can't remember if any classmates go with him or if he's alone and I can't really remember what happens on the planet.   I'd like to re-read it, if i can figure out what it is. That's all I remember.  Ideas?


Divisibility in Integers and General Rings

If x|y and y|x in integers, does this imply x=y?  Similarly, for any general ring, if x|y and y|x in the ring, does this imply x=y?


Recoloring math in an equation in Beamer

I have a presentation with the color for math changed to blue:  \setbeamercolor{math text}{fg=black!15!blue}   Everything looks nice, until I want to recolor part of an equation:  \begin{align*}    x\ y\ z &: A  \color{red}\longleftarrow \text{Assumptions}\\    \hline    x &\in \color{red}\underbrace{[x,y,z]}_{\text{Goal}} \end{align*}   Then it just goes bananas: half of the left arrow is printed in blue, and the brace is totally printed in blue.  Any help will be appreciated.  The entire code:  \documentclass{beamer} \setbeamercolor{math text}{fg=black!15!blue}  \begin{document} \begin{frame}    \begin{align*}       x\ y\ z &: A  \color{red}\longleftarrow \text{Assumptions}\\       \hline       x &\in \color{red}\underbrace{[x,y,z]}_{\text{Goal}}    \end{align*} \end{frame} \end{document}


Custom command does not reference a label created with a previous custom command

Using pdfLaTeX. I have created a new command \newcommand{\singlefigure}[3]{   \begin{figure}   \label{fig:#2}   \centering   \caption{#3}   \includegraphics[trim={0cm 0cm 0cm 0cm},clip,height=0.2\textheight]{./fig/#1}   \end{figure} }  having it in mind to speed up the coding of figures. Actually it suits me pretty well, at first since \singlefigure{directory/file.jpg}{mylabel}{My caption}   gets me immediately where I want.  Likewise, I have created another shorthand to reference a figure \newcommand{\fig}[1]{Figure~\ref{fig:#1}}    which works well except when I am referencing a figure created with \singlefigure above, say \fig{mylabel}.  The result is  Apparently I created a situation in which the label of the first command is not visible to the second one. Is there a remedy, correction or workaround for this glitch?  Similar posts:


Do you have to place the input and output capacitors on LOAD basis or the capacitors specified in the datasheet. I have a linear power supply that supplies 16 Volts with no load. The maximum load I want to apply to this regulator would be less than 2A and maximum Voltage, 9 Volts. I just need to know what values of capacitors to use. My supply does have a 4700uF filter capacitor but it is around 2 feet away. I want to make this regulator in separate box.


Div not centering within parent div with margin auto

I know I'm probably missing something really obvious, but I've tried   display: block; and margin: 0 auto;, and the inner div is not centering horizontally within my parent div?    .row-fluid-wrapper.row-depth-1.row-number-3 {   display: block;   margin: 0 auto;   text-align: center;   border: 1px solid red; }  .row-fluid {   width: 100%;   display: block;   margin: 0 auto; }  .row-fluid [class*="span"] {   margin: 0 auto;   border: 1px solid blue;   display: block;   float: left;   min-height: 28px;   margin-left: .2%;   box-sizing: border-box;   height: 150px; }  .row-fluid .span4 {   width: 31.914893614%; }

Col 1

Text.

Col 2

Text.

Col 3

Text

     As you can see, the blue divs are more left aligned than being in the middle.


do I require Transit visa for Amsterdam since I am travelling from Delhi- Amsterdam- Havana and my layover time at Amsterdam is 1.45 hrs

I am travelling from India to Havana via Amsterdam.the layover time at Amsterdam is 1.45 hrs. Do I require to obtain Transit Visa?


Prove that $2\sqrt{x+1} \ge 2\sqrt{x} + 1/\sqrt{x+1}$ for $x \ge 1$

How can I prove that the blue line is always less than or equal to the red line when X is greater than or equal to one?  This is a crucial algebraic step in a proof by mathematical induction. In order to complete my proof,  I have to show that this is true. How do I do this?


Is it ever explained why everybody seem to understand droids?

In Star Wars, I find it weird that droids are not speaking the common language, but instead do beep-boops. And what is weird of that is that even then everybody seems to understand perfectly what they are saying. (or at least the protagonists) Is it ever explained why even if droids talk in beep boops the common man seems to be capable of understanding the droid language? Like if the 'droid language' is a language just like spanish or french in our world?