"Natural" categories where monomorphisms differ from injective morphisms

I started reading Algebra Chapter 0 on my own, and ran into the definition of a monomorphism for a category. My initial thought was that this was simply the same as the definition of injective. However, it seems at this point in the book, he has not defined injectivity for morphisms in general, only for functions between sets.  In the functions between sets case, monomorphisms are injective functions. However, in general it looks like monomorphisms are a weaker than injective morphism. Monomorphisms seems to be "left cancelable" whereas injectivity suggests there is another morphism that forces the morphism to be "left cancelable".  As I said, injective morphism has not been defined, but I would say the definition in my head is a morphism $f \in \text{Hom}_C(A, B)$ is injective if there exists $g \in \text{Hom}_C(B, A)$ such that $gf = 1_A$.  The definition of monomorphism given is $f \in \text{Hom}_C(A, B)$ is a monomorphism if for $\alpha', \alpha'' \in \text{Hom}_C(Z, A)$ we have $f\alpha' = f\alpha''$ implies $\alpha'= \alpha''$.  Clearly an injective morphism is a monomorphism, but the converse seems likely false. My counter example is a category with two objects $A, B$ with a single morphism $f \in \text{Hom}_C(A, B)$ (and of course the identity morphisms for $A$ and $B$). The composition rule will be easy since I can only compose $f$ with identity morphisms.  Now $f$ is clearly a monomorphism since the only thing $\alpha'$ and $\alpha''$ can be in the definition is $1_A$, thus necessarily the same. But $f$ is definitely not injective, as there is no morphism at all in $\text{Hom}_C(B, A).$  This counter example feels really contrived. Most the categories I know about seem to behave much like category of sets with functions as morphisms, i.e. monomorphisms are injective morphisms.  Is there an example of a category that we deal with all the time (even though we might not call it a category in polite company) where the monomorphisms are not necessarily injective?  Thanks! Any insights are appreciated.


Do I need to buy FFXIV:ARR if I already own FFXIV?

Square Enix seems to be treating them like separate games at times, but also calls them just fixing the old one. I can't find any conclusive evidence on this. What do I need to do to play?  Update:  I try logging into the website to download the client, and it says I need to sign in to the game first. I can't sign in to the game until I have the client installed, but my disks are for the old client. Where do I go from here?


If A is an invertible complex matrix with minimal polynomial $(t-\lambda_1)^{c_1}...(t-\lambda_k)^{c_k}$, is it true that the min poly of A^n is $(t-\lambda_1^n)^{c_1}...(t-\lambda_k^n)^{c_k}$? I think this is true by considering Jordan blocks, but is there a less high-tech way to see this (e.g. just by considering generalised eigenspace decomposition)?


I have a super old windows computer and a mac how to put linux on the windows pc?

I want to revive my old computer (late 2012) with linux and I have a mac. I want to put linux on a hard drive using my mac and then plug the hard drive onto the windows computer and install linux on it. How do i do this?


calculate an integration by using residue theorem

$$ \int_{0}^{\infty}\frac{\mathrm{d}x}{\left(x^{2} + 1\right)\left[\,{\ln^{2}\left(x\right) + \pi^{2}}\,\right]} $$ Calculate the following integration using the residue theorem.


Export 3d model from blender to unity correctly with material

i was export my 3d model from blender using .fbx file and i am facing a problem. i can use the material in unity but not work properly. material look like disoganized.


I want to add more memory to my pc. is there any tool that can scan my hardware tell me how much more memory i can fit, from which type (ddr2/3) in which slot?  Thanks


Is there an intuitive or logical explanation for this identity?

I saw this identity somewhere and I'm wondering if there's a more intuitive explanation for this: $$\sum_{k=1}^{n} 2k-1 = n^2$$ I know how to verify it algebraically by simplifying the left side but is there another way to think about this? Could the fact that the derivative of $n^2=2n$ has something to do with it? What significance does it have, if any?


I want to install Ubuntu on my laptop (i7 ivy bridge 32GB mem) and run a one or two Ubuntu guests.  Is there a step by step guide to help me do this?


I am trying to test that a page successfully redirects to a ThankYou page. I havea  page and controller, some of which are below:  Page:  <apex:page standardstylesheets="false" sidebar="false" showHeader="false" standardController="Case" extensions="PartnerSupportCaseController">  <div>               Description               </div>               <div>               <apex:inputTextArea required="true" rows="5" value="{!Case.Description}" label="Description" />               </div>  <apex:commandLink id="Submit" action="{!save}" styleclass="btn btn btn-primary" style="background-color : Green; background-image:none; color:#002233;">Submit</apex:commandLink>    Controller:  public class PartnerSupportCaseController {  public Case supportCase {get;set;}  public Attachment attachedFile;  private static Boolean isThereFile = True;  public String sEmail;  public String dEmail;  public String sPhone;  public String fixedPhone;  public String finalPhone;  List<String> emailDomains = new List<String>{***SomeEmailDomains***}              public PartnerSupportCaseController(ApexPages.StandardController controller) {      this.supportCase = (Case)controller.getRecord();     supportCase.Protocol_Sub_Issue__c = 'Partner Support - Please Pick';     supportCase.RecordTypeId = '012M000000092ju';  }   public pagereference Save() {  upsert supportCase; PageReference pg = Page.PartnerSupportThankYou;     pg.setredirect(true);      return pg;          }   Test Class:  @isTest public class PartnerSupportCaseController_Test {  static testMethod void testPartnerCase(){      Test.startTest();      PartnerSupportCaseController controller = new PartnerSupportCaseController();     String nextPage = controller.save().getUrl();      System.assertEquals('/apex/PartnerSupportThankYou', nextPage);      Test.stopTest(); }   }  The problem that I am running into is that I get an error "Constructor not defined [PartnerSupportCaseController].()"  I am having difficulty figuring out where I went wrong in setting up the controller and trying to access it with this test class. I just need it to verify that it successfully redirected to the thank you page.   Thanks,  CP


Do I need a transit visa through Zurich with a Canadian visa?

Do I need a transit visa through Zurich with a Canadian visa travelling from Botswana?


Undefined reference to static class member

Can anyone explain why following code won't compile? At least on g++ 4.2.4.  And more interesting, why it will compile when I cast MEMBER to int?  #include <vector>  class Foo {   public:       static const int MEMBER = 1;   };  int main(){       vector<int> v;       v.push_back( Foo::MEMBER );       // undefined reference to `Foo::MEMBER'     v.push_back( (int) Foo::MEMBER ); // OK       return 0; }


Suppose that A is a countable set. Show that the set B is also countable if there is an onto function f from A to B.

Is my logic correct/accepted?   Let A be a countable set. Let f:A->B, surjective. $\exists$g:A->N, bijective. Using definition from 1. $\exists$h:N->B, surjective. $\therefore$B is countable by definition using 4.   Am I allowed to assume #4? Does anything need to be cleared up?


How do I unlock my iTunes account when my old e-mail is unavailable?

When I originally set up my iTunes account, I used an email address from my prior employer.  I later moved my account to a personal rather than corporate email address and I have since changed jobs.  The original email address associated with my Apple account is no longer valid.  In the meantime, my computer on which my original iTunes account died.   Fortunately, I had my iTunes music backed up and when I purchased a new computer, I uploaded my songs.  I recently tried to play an Album and an error message came up that said that this computer was not authorized to play the songs and that I would need to access my account to authorize the new computer.  When I clicked through the authorization screen, my original email address came up and asked for my password.  I tried several of my “usual” passwords, but none of them worked.  I clicked on the “forgot my password” link and Apple gave me the option of answering a few security questions or having my password sent to my email address.  Recognizing that I could not access the dead email account, I asked to answer the security questions.  The first one that came up was to enter my birthdate.  I did so and Apple said that my answer was incorrect.  I next tried the street I grew up on and that did not work either.   I soon figured out that none of the questions matched my personal information so I am wondering if these questions were ever associated with my original iTunes account. Apple then locked my account for incorrectly answering the questions.  When I called Apple to see if we could do something to unlock the account and tie it to my new account (which would have the same name, address, and other personal information), I was informed that Apple cannot unlock the account and that I had to have access to the old email account to access the account and authorize this new computer to play the music.  After going up three levels of Apple customer service, I was told that there was absolutely nothing they could do for me.  So, I have purchased hundreds of songs that I cannot play now.  Is there a work around to this problem?  The songs are stored on my computer – I just can’t play them.


How can I ask a person in which order in his family among the siblings?

My colleague he have two brothers. I want to know, he is first/second/third son of his parents, ie., the order in the family among their siblings.  I can simply ask     Are you first son of your family?   It simply give some predictions, I don't want to that.  Is there a better way to ask the question?


Problem putting matrix operations in an equation

Possible Duplicate:          I'm trying to use official equation container for the first time, and it's giving me some trouble.  I have this equation of a simple matrix operation, and LaTeX isn't liking it.  What's wrong with this statement?  \begin{equation}      y = \begin{bmatrix}         T & I      \end{bmatrix}     \begin{bmatrix}         a \\         e     \end{bmatrix}  \end{equation}


Take screen shots using selenium webdriver

How to take screen shot on both test cases "Positive and Negative" results?  NOTE: Currently, I am working in selenium webdriver (junit) and I did not have an idea about how to code for adding methods to take screen shots.


Let $T_1, \: \ldots, \: T_k$ subtrees of a tree $T$ such that for all $1\leq i <j \leq k $ the trees $T_i$ and $T_j$ have a vertex in common.

Let $T_1,\: \ldots,\: T_k$ subtrees of a tree $T$ such that for all $1\leq i <j \leq k $ the trees $T_i$ and $T_j$ have a vertex in common. Show that $T$ has a vertex that is in all $T_i$.  I found this, it is right?


How to declare a multi dimensional array in Verilog?

module test; reg matrix[7:0] [7:0]='{'{0,1,0,0,0,0,0,0},'{0,0,1,0,0,0,0,0},'{1,0,0,1,0,0,0,0},'{0,0,0,0,1,0,0,0},'{0,0,0,0,0,1,0,1},'{0,0,0,0,0,0,1,0},'{0,0,0,0,1,0,0,1},'{0,0,0,0,0,0,0,0}}; initial begin $display("%d ",matrix[3][3]); end endmodule  this is the test code I am trying to run. My goal is to declare a multi dimensional array to store matrix in Verilog. I am assuming that multi dimensional could be mapped to register or a memory in Verilog. And I have simulated this on Questa sim Error: ** Error: test.v(2): (vlog-2110) Illegal reference to memory "matrix". # ** Error: test.v(2): Illegal LHS of assignment.  Could someone comment on my assumptions and tell me the way to make this happen. Disclaimer: I am a newbie to Verilog !!!


Why does the "separation of variables" method for DEs work?

Heyho,  I am using the separation-of-variables method for quite a while now, but what was always bothering me a bit, is why is it possible to do those operations. I'll give a concrete example (source Wikipedia):  $$\frac{dy}{dx}=xy^2 + x \Rightarrow \frac{dy}{1+y^2} = x \:dx \Rightarrow \int{\frac{dy}{1+y^2}} = \int{x \:dx} \Rightarrow \cdots$$  and so on. My problem lies in step 2. Why can I just treat the differential operator like a variable?


Below is a screenshot for Macintosh HD drive storage.    It shows that I have 82.47 GB storage for "Other". How to delete and free up this space?  I checked ~/Downloads and ~/Desktop, both are less than 2 GB.  I also emptied out ~/Library/Cache and ~/Library/Cache folders.  I am running OS X 10.11.2.


Existence of continuous function $f$ on $\Bbb R$ which vanishes exactly on $A\subset \Bbb R$

Question For any closed subset $A \subset \Bbb R$, does there exist a continuous function $f$ on $\Bbb R$ which vanishes exactly on $A$?   If we take $A=[a,\infty)$ or $(-\infty,a]$ or $\{a_1,a_2,\cdots,a_n\}$ or $\bigcup_{i=1}^{k} [a_i,b_i]$, then indeed we can have such a continuous function. But when I thought about cantor set or the set $\{\frac 1n : n \in \Bbb N\} \cup \{0\}$, which are closed in $\Bbb R$, I couldn't think of a continuous map vanishing exactly at these two sets.  How should I go about this problem?


How to install a program ending in ".run" using terminal

I am following   but at step no 5. i don't know how to do it  5 - Install Catalyst driver, type the following commands on terminal:  cd ~/Downloads  chmod +x amd-catalyst-13.4-linux-x86.x86_64.run sudo sh amd-catalyst-13.4-linux-x86.x86_64.run   this file in the downloads spot how can i use this command to install it  because i can't run it as execute as program


how to calculate critical values of Pearson's correlation coefficient for a large data set containing rows greater than 5000?

I have gone through various materials online but all the formulas were for small values of n(number of rows) say like 100,120 etc.But my problem is to calculate the critical value  for values of n(number of rows).Using the tests like t-tests etc are givings unexpected results like the relation which is not actually significant becomes significant.  so how to calculate it?


Proving the product of any # of commutators can be written as an "extended commutator" (commutator of 3+ elements)

Suppose G is a group and as per usual, the commutator is $[g,h] := ghg^{-1}h^{-1}$ for $g,h \in G$.  I need to show that the product of any number of commutators can be written in the following defined form:  $g_1 \cdot g_2 \cdot \dots \cdot g_n \cdot g_1^{-1} \cdot g_2^{-1} \cdot \dots \cdot g_n^{-1}$ where all $g_i \in G$ for $1 \geq i \geq n$  Every identity I know with commutators uses 2-3 elements (and their inverses), so I'm having trouble proving this since the starting point I'm at involves 4 elements that are not necessarily related. I figured the best thing to do would be to use induction but for the base case I have, for example, $[g_1,g_2][g_3,g_4]=(g_1g_2g_1^{-1}g_2^{-1})(g_3g_4g_3^{-1}g_4^{-1})$ and I can't seem to manipulate that in anyway.


How does the comma operator work with assigning to multiple variables?

The following piece of code #include <iostream> #include <bits/stdc++.h> using namespace std;   int main() {     // your code goes here     string a="abc", b="xyz";     a,b = a+b, b+a;     cout<<a<<" "<<b<<endl;     return 0; }  outputs abc abcxyz  Why is it so? Expected or desired output is abcxyz xyzabc  How to get this?


All my shape fills modified by anchor point tools have broken fill color (Check Image pls)

All the shapes in every .ai file that I have created now appear distorted around the edges where I have  used the anchor point tool . Please check the image around the characters neck and the curves used for the couch. Can anyone please help. This has never happened before.


The devops tools ecosystem is puzzling to me. Instead of shell scripts that work everywhere everyone in the server orchestration/management space is bolting on their own proprietary formats. Ansible has their YAML playbooks, Puppet has its class/graph language, salt like ansible has some kind of YAML format, chef is an embedded Ruby DSL. Out of all of these approaches I like chef the best because it does the simplest possible thing. So I guess one benefit is better visibility into the fleet when you use one of these tools but that's orthogonal to the actual configuration and provisioning component.  I don't quite get why everyone is trying to re-invent shell scripts with YAML because more often than not ssh -t is all I need to get things done along with a library of some shell scripts. These scripts are usually packaged as self-contained tar files and are small and simple enough to be mixed and matched as necessary. They have zero dependencies other than bash and will pretty much just work anywhere. So why is it then that a simple solution like that is not good enough for ansible, puppet, chef, etc.? What do all these solutions gain by replacing bash scripts with some other format?


How to hide filesystems from the launcher in unity

Sorry if this is a silly question - I'm not really experienced in Ubuntu.  I have recently enabled my Chromebook to dual-boot with Ubuntu using crouton. In the launcher, I can see some applications, but also 3 file systems. I think that they're partitions of the solid state storage on my laptop - they won't open and it gives me an error, which is fine because I don't need to use them from Ubuntu, but is there an easy way to hide them from view? I don't want to unmount them in case it mucks things up.  Thanks, Archie


Prove that if $f$ is integrable on $[a ,b]$ then $|f(x)|$ is also integrable on $[a ,b]$ and $|∫_a^b f(x)\,\mathrm dx|$ ≤ $∫_a^b|f(x)|\,\mathrm dx$

Prove that if $f$ is integrable on $[a ,b]$ then $|f(x)|$ is also integrable on $[a ,b]$ and $|∫_a^b f(x)\,\mathrm dx|$ ≤ $∫_a^b |f(x)|\,\mathrm dx$


Say a friend wants to schedule a time to hang out, but I'm not sure when I'll be available, so we set a place-holder time that may be when we hang out or may not. What is this called? I feel like there's a word starting with 't' that works, but 'temporary time' doesn't sound right.  Eg "I'm not sure when I'm free so lets set a * time and we can see if we need to change it"


When a word ends in 's' or 'x', do you add 's or just an '?

1) Alex's house      2) Alex' house     When the noun ends with the letter 's' or 'x', do I need to put 's' after an apostrophe or not?  I remember I read some rules related to this in my school grammar book, but now I've forgotten it.


How is adjusted coefficient of determination ($R^2$) linked to the F-values of a test against zero when adding a new variable?

Someone claims that the  adjusted $R^2$ will increase with the addition of an extra variable.  I wonder why, as it is called adjusted (in contrast to the normal $R^2$).   The only condition it has to satisfy (to increase the adjusted $R^2$) is that the F-value (by the way, how is it simple to calculate it?) of the null hypothesis that the new variable is greater than 1.  Can someone give me a hint where the links between the adjusted $R^2$ and the F-Stat of that test are?   And however, who wants to include a new variable in a multiple OLS regression model anyway, if the beta was tested to be 0? Therefore adjusted $R^2$ always changes.


I want to put some PHP code in my slide with the package listings but I have this error message:  Argument of \frame has an extra }.<inserted text>\par }   My latex code :   \documentclass{beamer}  \usepackage[utf8]{inputenc}  \usepackage[T1]{fontenc} \usepackage[frenchb]{babel} \usepackage{setspace} \usepackage{color} \usepackage{listings}  \usetheme{CambridgeUS}   \begin{frame} \begin{large}     Contexte : \newline \pause \end{large}  \begin{itemize}     \item Avertir Drupal \end{itemize} \begin{lstlisting}  // Gestion du contexte ete2013 // Utilisation d'un nouveau template if (%variables['ctpage'] == "ete2013") {     variables['template_files']=array('page-ete'); } \end{lstlisting} \end{frame}


How is $ \cos (\alpha / \beta) $ expressed in terms of $\cos \alpha $ and $ \cos \beta $?

If it is possible to express  $ \cos n \alpha $ in terms of $ \cos \alpha $  as a power series for integer $n$ ...  I like to see an expression for the quotient angle that obviously tallies when $ (\alpha , \beta) $ are swapped.  EDIT1:  Something like:  $$ \cos (\alpha - \beta)= \cos \alpha \cos \beta  + \sin \alpha  \sin \beta $$  EDIT2:  Like to know why $ \cos ( \alpha / \beta )$ cannot be expressed in terms of $ \cos \alpha, \cos \beta $, but  $ \cos ( \alpha + \beta) $  can be expressed in terms of  $\cos \alpha $ and $ \cos \beta. $


Can someone visit the Schengen Area(Germany) with a "leave to enter" residence permit for the UK?

My husband a non-EU passport holder (Armenia) and I an EU passport holder (UK) wish to go to Germany. I would like to know if he needs a Schengen visa to go to Germany or is there no need?  He has a "leave to enter" residence card for the UK, as well as this my name is written in his Armenian passport and our relationship (Wife).


Show that $\gcd(a + b, a^2 + b^2) = 1\mbox{ or } 2$

How to show that $\gcd(a + b, a^2 + b^2) = 1\mbox{ or } 2$ for coprime $a$ and $b$?  I know the fact that $\gcd(a,b)=1$ implies $\gcd(a,b^2)=1$ and $\gcd(a^2,b)=1$, but how do I apply this to that?


Solving summations of form $\sum_{i=0}^{\infty} i^kx^i$ without Differentiation and Integration

The actual sum I'm looking to solve is $$\sum x^i(i^3-(i-1)^3)=(1-x)\sum x^ii^3$$ But I'd rather do a general answer first. I know the method of differentiation and integration but I'd like to do it without that. I remember seeing a method which reduced the power of $i$ on Brilliant but I can't find it anymore.


Can we ever have a black colored (the color of the light and not the body's color) torch that darken (or dis-illuminates) everything? While compared to a normal torch it would function in an opposite manner. If not now, will it be possible to create this in the near future?


Does the Copy Editor badge exclude tag-only edits or tag wiki edits?

The  has the following description:     Edit 500 posts (excluding own or deleted posts and tag edits).   (emphasis mine). This is unclear to me. Does "tag edits" refer to edits that only modify a question's tags, or edits to tag wikis and excerpts?


Sign of determinant when using $det A^\top A$

We have been given matrix: $$A =          \begin{pmatrix}         a& b& c &d \\         b &−a& d& −c\\         c& −d &−a& b \\         d &c& −b& −a\\         \end{pmatrix}     $$ ...and have been asked to calculate $\det(A)$ using $AA^T$.  We see that:  $$AA^T=\begin{pmatrix}         a^2+ b^2+ c^2+ d^2& 0& 0&0\\         0 &a^2+ b^2+ c^2+ d^2& 0& 0\\         0& 0 &a^2+ b^2+ c^2+ d^2& b \\        0 &0& 0& a^2+ b^2+ c^2+ d^2\\         \end{pmatrix}     $$   So, $\det(AA^T)= (a^2+ b^2+ c^2+ d^2)^4$  Now which should I choose: $(a^2+ b^2+ c^2+ d^2)^2 $ or $ -(a^2+ b^2+ c^2+ d^2)^2$ ?  Please explain me which one and why.


I put a video in my pdf with Acrobat and there I can watch my video. But if I open the pdf on my mobile, I can't watch the video, I only see an image. Is there a way to watch videos of a pdf in a mobile? I have a samsung J5.


What is happening to rotational kinetic energy when moment of inertia is changed?

I know this question is asked here a lot, but I just had to ask this to finalise the concept.  When a system lets say a rod of length $L$ and mass $M$ is rotating with angular speed $omega_1$ its initial angular momentum is $L1 = (1/12)ML^2\omega_1$ and its initial kinetic energy is $KE = (1/24)ML^2{\omega_1}^2$.  Now after some time the rod is folded in half its angular momentum kept conserved i.e. without applying any external force or torque, its new angular velocity becomes $\omega_2 = 4\omega_1$ and its new kinetic energy becomes $KE_2 = (1/6)ML^2{\omega_1}^2$.  This is 4 times the original kinetic energy when no external force works, since the rod is folded, you can even say melted and formed into a smaller and denser rod, it has not undergone compression/expansion of any sort but still there is change in kinetic energy.   The most sense I could make out of this was that all the particles while rotating felt a centripetal force and the particles of half of the rod under this force went in its direction and did some work which appears as the change in kinetic energy. I have written the same and a proof as an answer .  Now if I am write in my concept where did this energy come from, tension was providing the centripetal force but no work was done against tension as the rod was folded in half not compressed. If I am wrong then where did the energy come from?  Extra: I also tried the analogy of this question in translatory motion, suppose there is body of mass $m$ moving with velocity $v$  suddenly, its mass becomes $m/2$ then its velocity becomes $2v$ and its KE becomes $4KE_1$ there is no need to explain the energy conservation here since mass suddenly does not disappear into thin air, however moment of inertia can be changed and hence the question.  Addendum : Since folding the rod seems to bring about unnecessary questions about ways of folding, you can imagine that if rod was melted and formed into a longer rod all the while the system was rotating and angular momentum conserved, then new length becomes $2L$ new angular velocity becomes ${\omega_1}/4$ and new KE becomes $(1/96)ML^2{\omega_1}^2$. This time the energy becomes ${1/4}^{th}$ of the initial, where did this energy go to ? Certainly movement against centripetal force takes place, but since there is no extension in existing rod, energy can not be stored as spring energy in it, or so I think.


Retain the rest of the Clip (Analysis) tool in ArcGIS

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


Is 1 hour 30 minutes enough time to catch a connection flight in Muscat, Oman?

I am flying from London to India with a layover of 1 hour 30 minutes at Muscat Airport. My flight from London to Muscat, as well as the connecting flight from Muscat to Bangalore, is Oman Air.  Is 1:30 hours enough for me to catch my connecting flight from Muscat to Bangalore?  Do I need to re-check in my luggage?  Am I taking a risk or is this time is enough to catch my connection flight?


Let's say I want to place the bold content into a variable called $question_text.  1} What color is the sky: A) Answer A B) Answer B C) Answer C  Answer: A  How do I use preg_match to do that?  I tried:  if(preg_match("#}(.*)#", $question, $question_match)) {     //Extract the question text     $question_text = trim($question_match[1]);   But it only gives me the first line: **What color is the sky: **  What am I doing wrong?


Which one is correct?  1) Pick those pieces of your heart which still wants to be happy , or  2) Pick those pieces of your heart which still want to be happy.


Does that mean that "I don't have any time" or "I have time" because there are two no's there?


Hey I have tried a regex for valid website url, which is as below  @"(?:[A-Za-z0-9-]+\.)+[A-Za-z0-9]{1,3}:\d{1,5}"   But it didn't work, I tried a lot as well which doesn't work.  I am looking for something which will validate some cases like incomplete url's   like   www.yahoo etc.,   more over it should allow all the domians and it should accept url's starts with http or just www.  Please let me know if there is any work around.


How do I show the git branch with colours in Bash prompt?

I am using  to show the branch name in gnome terminal (Ubuntu 15.10) when working in a git repository. Based on the above I now have the below in my ~/.bashrc file:  # uncomment for a colored prompt, if the terminal has the capability; turned # off by default to not distract the user: the focus in a terminal window # should be on the output of commands, not on the prompt #force_color_prompt=yes    ...  # Add git branch if its present to PS1 parse_git_branch() {  git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' } if [ "$color_prompt" = yes ]; then  PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\]$(parse_git_branch)\[\033[00m\]\$ ' else  PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(parse_git_branch)\$ ' fi unset color_prompt force_color_prompt   As a result I now get:    so it works. But why has the coloring of my user@host been removed? And I would also expect that the branch name should be colored. Before it looked like this:    UPDATE: I have now tried this guide instead:    adding this to .bashrc:  parse_git_branch() {      git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' } export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ "   and that works:    Notice in .bashrc I also have this (default):  # uncomment for a colored prompt, if the terminal has the capability; turned # off by default to not distract the user: the focus in a terminal window # should be on the output of commands, not on the prompt #force_color_prompt=yes   I have yet to find the reason why that snippet gives the correct result and the other version does not. Any input on this?  Here is the version of my .bashrc that has the old snippet enabled that does not work:


In the current monthly Reputation Leagues, one user has more monthly reputation than total. Could this be a counting error or is this an issue because an inconsistency in caching or the methods of calculating reputation?


Are answers that just contain links elsewhere really "good answers"?

I have often wondered at the practice on Stack Overflow, Server Fault, and the other sites where someone will ask a question and an answer will come in that says Look here: http://link elsewhere. Rarely will the link have exactly the answer necessary -- often it's an entire article -- yet these answers get voted up.  Why is that, exactly? I realize this is subjective, but my own thoughts are that one should try and give the answer (even if the answer is 'no, it can't be done' or 'no, I don't think it can be done' -- very different answers) and then if you have a link that explains it, go ahead and post it within the answer.  What does the community think about this?     For more information, see  in the .


Suspected hard disk problem on Ubuntu partition - how can I check?

In the last year I had a problem with my notebook: sometimes when I push the power button it starts (I hear the fan) but nothing appears on the screen, I have to hit it on the bottom to make it start..  In the last month the problem changed: now it starts every time without need of hitting it but it shuts down without any apparent reason and then immediately reboots. This happens more frequently when the notebook is JUST turned on or when is turned on from a while but I am not using it. In addition if I instead boot Windows (installed on another partition) the problem disappears...    My hypothesis is that the problem is in the hard disk, so I came to the questions:   How can I verify my hypothesis? Is it plausible? Since Windows in in sda2, Ubuntu in sda5 and sda3 contains only data do you think it is a good idea to move Ubuntu to the left (resizing sda3) and then leaving the last part of the disk (where probably there is the problem) empty (in a new partition)?


How could I get a list of the shells in my operating system?

Say I use some Linux operating system. How could I see a list of all the shells that came installed with it (either CLI shells or GUI shells)?  Typing echo $SHELL isn't good for me because it only shows me my current shell (Bash), but what I desire is to list all shells currently installed in the system.  My aim is to have a direct check of all the shells that came with my OS, especially if there are any other beside sh and Bash.


How do you solve the equation $ax\equiv b \pmod m$ with the extended Euclidean algorithm? I saw that you could solve the Diophantine equation $ax-my=b$ I've seen examples but I'm still a bit confused. (Sorry if this sounds stupid)


If  is exiled with , can people pay the kicker cost to still get 5 tokens?


Setting the conventional null hypothesis as the alternative?

I am a bit confused on assigning null and alternative hypotheses.   For example in comparing 2 interventions, conventionally, null hypotheses are usually stating that there are no differences in between both interventions. The alternative hypothesis or what we are trying to prove is that there is a difference between both interventions.   However, what if I want to actually prove or my hypothesis in conducting the study is that the interventions are actually equivalent. Won't the conventional null hypothesis become the alternative hypothesis? Will the conventional alternative hypothesis become the null? Will the statistical tests change since we are now assuming that a difference between study arms is true?


why does the bibtex generate no bibitem in the beamer?

I use the bibtex to generate the bibliography in my beamer, but I get warning about empty thebibliography environment.   My spmv.bib file:      @thesis{im_optimizing_2000,     title = {Optimizing the Performance of Sparse Matrix-Vector Multiplicatio},     institution = {{EECS} Department, University of California, Berkeley},     type = {phdthesis},     author = {Im, Eun-jin},     date = {2000-06}, }  @thesis{vuduc_automatic_2003,     title = {Automatic Performance Tuning of Sparse Matrix Kernels},     institution = {University of California, Berkeley},     type = {phdthesis},     author = {Vuduc, Richard Wilson},     date = {2003},     note = {{AAI}3121741}, }   My beamer file:  \documentclass{beamer}  \mode<presentation> {   \usetheme{CambridgeUS}   \usecolortheme{dolphin}   \usecolortheme{rose}   \setbeamerfont*{title}{shape=\itshape, family=\rmfamily}   \setbeamercovered{transparent} }  \usepackage[english]{babel} \usepackage[latin1]{inputenc} \usepackage{times} \usepackage[T1]{fontenc}   \begin{document} \begin{frame}   \begin{block}{References}     \bibliographystyle{plain}     \bibliography{spmv}   \end{block} \end{frame}   \end{document}   The output of blg file:  This is BibTeX, Version 0.99dThe top-level auxiliary file: test.aux The style file: plain.bst I found no \citation commands---while reading file test.aux Database file #1: spmv.bib   (There was 1 error message The output of bbl file:  \begin{thebibliography}{}  \end{thebibliography}   The output of beamer:


What is the intuitive meaning of a determinant?

I know how to calculate a determinant, but I wanted to know what the meaning of a determinant is? So how could I explain to a child, what a determinant actually is.  Could I think of it as a measure of independence of the columns or rows? Or is there another interpretation that is even simpler?  Edit: The explanation should also explain, the role of the determinant for the solvability of linear equations.


Difference between function myName() and var myName = function() in javascript?

Is there any difference between declaring a Javascript function like this:  function myName(...)   and like this:  var myName = function(...)   I don't believe so, but...


I have installed ubuntu13.10. My sound card is not having any problem as start up sound was very clear. Bt when I played songs and movies an error occurred giving that mp3 decoder is not present. So which type of driver or software do I need install now.


How to downgrade PHP version 5.56 to 5.4 in Ubutu 15.10

I'm using Ubuntu 15.10. I need to install PHP 5.4 version cause of one of PHP plugin just support for php < 5.56 how to do this?


Undifined reference to Eigen::Matrix, 3, 3>

I am trying to write some code using Eigen but I am having this issue while trying to compile with g++. I have the following template definition: class.h template<int Nr, int Nz> Eigen::Matrix<std::complex<double>, Nr, Nz> efield(Eigen::Matrix<double, Nr, Nz>& rs, Eigen::Matrix<double, Nr, Nz>& zs, double t);  class.cpp Eigen::Matrix<std::complex<double>, Nr, Nz> GaussianBeam::efield(Eigen::Matrix<double, Nr, Nz>& rs, Eigen::Matrix<double, Nr, Nz>& zs, double t) { //Iterate through the rs, and zs to calculate the field in all combinations of r and z.     Eigen::Matrix<std::complex<double>, Nr, Nz> output ;     for (size_t i = 0, size = rs.size(); i < size; i++)     {         for (size_t j = 0, sizez = zs.size(); j < sizez; j++) {             double temporary_r = (*(rs.data() + i));             double temporary_z = (*(zs.data() + i));              output(i, j) = this->efield(temporary_r, temporary_z, t);          }     }     return output; }  And then I call this function from main.cpp: const int Nx = 3; const int Ny = 3;      //creates the "meshgrid" Eigen::Matrix<double, Nx, Ny> X = Eigen::RowVectorXd::LinSpaced(Nx, -5e-4,5e-4).replicate(Ny,1); Eigen::Matrix<double, Nx, Ny> Y = Eigen::VectorXd::LinSpaced(Ny, -5e-3, 5e-3).replicate(1, Nx);  std::cout << "res : \n" << gauss1.efield<3, 3>(X, Y, 0) << "\n";  I am getting the following error on the call to gauss1.efield<3,3> after trying to compile by GCC 5.4.0:  undefined reference to `Eigen::Matrixstd::complex<double, 3, 3, ((Eigen::StorageOptions)0)|((((3)==(1))&&((3)!=(1)))?((Eigen::StorageOptions)1) : ((((3)==(1))&&((3)!=(1)))?((Eigen::StorageOptions)0) : ((Eigen::StorageOptions)0))), 3, 3> Optics::GaussianBeam::efield<3, 3>(Eigen::Matrix<double, 3, 3, ((Eigen::StorageOptions)0)|((((3)==(1))&&((3)!=(1)))?((Eigen::StorageOptions)1) : ((((3)==(1))&&((3)!=(1)))?((Eigen::StorageOptions)0) : ((Eigen::StorageOptions)0))), 3, 3>&, Eigen::Matrix<double, 3, 3, ((Eigen::StorageOptions)0)|((((3)==(1))&&((3)!=(1)))?((Eigen::StorageOptions)1) : ((((3)==(1))&&((3)!=(1)))?((Eigen::StorageOptions)0) : ((Eigen::StorageOptions)0))), 3, 3>&, double)'  The weird thing is that I would have expected perhaps an error on class.cpp but not on main.cpp since this is just a regular call to the function. I found this error that looks similar to mine, but with an std::vector instead of an std::complex: , I don't know if it could help. Any ideas why this might be happening? Btw, I made sure that #include <complex> #include <Eigen/Dense>  are in every relevant file. PS: I am using C++14. Thank you!


Why is this fluid being stretched into a line?

I was trying to simulate an animation of fluid flowing from one cup to another, but after baking the domain, there is this strange shape that stretch all the way out of the cup, and I wasn't sure what had caused it.  Tried turning up the resolution but the domain still stretched far off the cup into a line or something. Please help?   Screenshots:      Thanks :)


Set the height of an image to be equal to height of the viewport after subtracting height of header

My idea is to have the image take the rest of the available viewport height after subtracting the height of the header. For example, if my viewport is 1000px height and my header is 100px height to make the image's height to 900px.   In the example below, I've set the max-height of the image to 100vh, however, since there's a header as well, a scrollbar appear to the side. I'm trying to make the max-height of the image be viewport minus header. Is it correct to assume this is done with JavaScript? Any tips or pointers to use in order to figure out how to do it?    *, *:after, *:before {     margin: 0;     padding: 0;     -webkit-box-sizing: border-box;     box-sizing: border-box;     text-decoration: none; } a {     color: #f1f1f1; } html {     font-size: 16px; } body {     background-color: #fafafa;     font-family: 'Roboto', sans-serif;     height: 100%;     width: 100%; } .navigation {     background-color: #171717; } .navigation-ul {     display: flex; } .navigation-ul>li:not(.dropdown) {     padding: 15px 13px 15px 13px;     font-weight: 500;     text-align: center;     font-size: 1em;     color: white;     background-color: #151719;     list-style-type: none; } .specific-image-flexbox {     display: flex; } .specific-image-column {     flex: 4; } .specific-image-container {     text-align: center;     width: 100%; } .specific-image {     display: block;     max-height: 100vh;     max-width: 100%;     margin: 0 auto; }

Images

Albums


PHP call class and function with names defined later as variable

I have to dynamically call a class and a function based on variables sent from a form. is there a way to do this like $className= 'form1'; $functionName = 'function2456'; {className}->{$functionName}  Prior to this as well, I need to check if that specific function exists within that particular class. Any help please?


Show $\int_0^\infty \frac{e^{-x}-e^{-xt}}{x}dx = \ln(t),$ for $t \gt 0$

The problem is to show  $$\int_0^\infty \frac{e^{-x}-e^{-xt}}{x}dx = \ln(t),$$  for $t \gt 0$.  I'm pretty stuck. I thought about integration by parts and couldn't get anywhere with the integrand in its current form. I tried a substitution $u=e^{-x}$ and came to a new integral (hopefully after no mistakes)  $$ \int_0^1 \frac{u^{t-1}-1}{\log(u)}du, $$  but this doesn't seem to help either. I hope I could have a hint in the right direction... I really want to solve most of it by myself.  Thanks a lot!


Using Iterator with ModelBuilder for clipping and splitting in ArcMap?

My input feature class is a county-wide dataset and the input clip feature is a township’s ‘section.’  I have 576 different ‘sections’ in which to clip the county-wide data out to.  Though I dont have 576 different section feature classes to clip by, I was just using a definition query to select which particular section to clip out to.  I would like to use ModelBuilder to streamline clipping 576 sections of countywide dataset.    How would I set up ModelBuilder to incorporate an iterator into the model for this particular case?    The above model successfully split a township's contours into 36 sections. I need to run it 15 more times to achieve my end goal. I need to add an iterator to batch split out the remaining 15 townships. I put an orange background on the items that need to have the expression or output filename changed when a different township is being run through the model.


Is there a way to counterspell a level 20 druid?

At level 20, Druids get access to the following feature:  Archdruid At 20th level, you can use your Wild Shape an unlimited number of times. Additionally, you can ignore the verbal and somatic components of your druid spells, as well as any material components that lack a cost and aren’t consumed by a spell. You gain this benefit in both your normal shape and your beast shape from Wild Shape  The emphasis is on the fact that you can ignore verbal, somatic and non-consumed material components, which makes these spells imperceptible, as per Xanathar:  If the need for a spell’s components has been removed by a special ability, such as the sorcerer’s Subtle Spell feature or the Innate Spellcasting trait possessed by many creatures, the casting of the spell is imperceptible.  Counterspell requires you to be able to see a creature casting:  Casting Time: 1 reaction, which you take when you see a creature within 60 feet of you casting a spell.  As a result, it seems to me that it is impossible to ever counterspell a level 20 druid unless they use a material component that is consumed. Am I missing something? Is the level 20 Druid feature essentially 'become immune to counterspell' as a hidden bonus? Or is there still a way to counterspell them?


I've been using blender for a while now, and this has never happened to me before. I was designing an ad in Blender 2.73a for a game that I made. However, when I went into camera view, everything looked bigger then in the final render. Why is this happening and how can I fix this?  P.S. I've been using blender for about a year, but I still don't know all the buttons, so please no jargon!


Minecraft Command Blocks: /testfor command for wearing a player head, then tp

I'm currently making a custom map in Minecraft, and I'm a bit new to command blocks. I'm trying to have the player put on a player head named "Training Helmet" and then as soon as they put it on they are teleported to a certain coordinate. This is what I have been tying, but it's not working for me (obviously).  In the first command block (repeating, unconditional, activated with a lever):  /testfor @p {Inventory:[Slot:103b,id:"minecraft:skull"{SkullOwner: dannymastr9000},tag:{display:{Name:"Training Helmet"}}}]}   In the second command block (repeating, conditional, always active):  /tp @p -160 102 60   Any Idea on how to fix it? Thanks!


How to profile long session initialization during boot process in Windows 8?

My computer started to boot for 10 minutes. It has SSD system drive and was booting for 15 seconds previously.  Is it possible to know, what does it doing during this time? The delay occurs before logon screen appears. I mean what I am observing for a long time, is Windows animation of rolling dots. Once logon screen appears, computer works fast. I.e. I need to detalize what happen BEFORE logon screen, not autorunning programs of later stages.  It started suddenly today. First computer hanged in a huge way: it was beeping on mouse move. Very rare type of hang. I have rebooted it hard and it start to boot very slow.   Also it is unable to reboot automatically anymore. Simultaneously, on reboot, I see screen blinking meaning motherboard reboots (?) This tends me thinking it is a hardware-related problem.  UPDATE  Windows Performance tools shows, that slow occurs in the stage Session Init. Probably smss.exe is responsible for this.    It is just evident, that "session init" takes tremendous time.  UPDATE 2  Watching event Event Viewer --> Applications and Service Logs -->Microsoft --> Windows --> Diagnostics - performance -->Operational -->Event ID 100<--  Also indicates session init is guilty:  BootTsVersion 2    BootStartTime 2015-04-09T22:16:20.819659700Z    BootEndTime 2015-04-09T22:23:40.863859000Z    SystemBootInstance 154    UserBootInstance 150    **BootTime 377549**    **MainPathBootTime 347049**    BootKernelInitTime 39    BootDriverInitTime 517    BootDevicesInitTime 599    BootPrefetchInitTime 0    BootPrefetchBytes 0    BootAutoChkTime 0    **BootSmssInitTime 334923**    BootCriticalServicesInitTime 276    BootUserProfileProcessingTime 3399    BootMachineProfileProcessingTime 639    BootExplorerInitTime 4687    BootNumStartupApps 47    BootPostBootTime 30500    BootIsRebootAfterInstall false    BootRootCauseStepImprovementBits 0    BootRootCauseGradualImprovementBits 0    BootRootCauseStepDegradationBits 0    BootRootCauseGradualDegradationBits 0    BootIsDegradation false    BootIsStepDegradation false    BootIsGradualDegradation false    BootImprovementDelta 0    BootDegradationDelta 0    BootIsRootCauseIdentified false    OSLoaderDuration 600    BootPNPInitStartTimeMS 39    BootPNPInitDuration 1146    OtherKernelInitDuration 795    SystemPNPInitStartTimeMS 1932    SystemPNPInitDuration 350    SessionInitStartTimeMS 2292    Session0InitDuration 1751    Session1InitDuration 181    **SessionInitOtherDuration 332991**    WinLogonStartTimeMS 337216    OtherLogonInitActivityDuration 1108    UserLogonWaitDuration 6582    UPDATE 3  Found a solution same as here:   UPDATE 4  Salution with hibernate disabling then reenabling helped with boot slow, but didn't help with reboot hang.


Does COVID-19 have a case fatality rate of 41%? Is this formula correct?

According to the data on the , as of 3rd February 2020 there were 17491 confirmed cases of COVID-19 globally, 536 total recoveries and 362 deaths. From my non-expert calculation this implies a mortality rate of:  (Nd / (Nd + Nr)) * 100 = 41%  where:  Nd is the total number of deaths, Nr is the total number of full recoveries.  This leaves 16593 people still suffering from the disease who have neither recovered or died.  This is in stark contrast to the publicly disseminated value of ~2% mortality, so have I made a mistake in my calculation or assumptions, or is COVID-19 much more dangerous than commonly claimed?    [After a helpful discussion in the comments, 'mortality rate' is not the correct term to use here, instead I should say ''.]


What is fusel alcohol, and does it cause hangovers?

I'd recently heard of fusel alcohol in a reference that it causes headaches/hangovers.  First what is fusel alcohol, and what creates it (can I avoid it)?  Secondly, is fusel alcohol really the main culprit behind hangovers? I know I stopped making/drinking mead as it was a guaranteed hangover for me the next day.


I'm not quite sure how to approach this question.  I need to prove that for $$n\ge1$$  $$1^2+2^2+3^3+\dots+n^2=\frac16n(n+1)(2n+1)$$  Do I just plug $1$ and see if $$\frac16(1)((1)+1)(2(1)+1) = 1^2\text{ ?}$$


What are good JS libraries for game dev?

If I decide to write a simple game both text and graphical (2d) what libraries would I use? (Assume we are using a HTML5 compatible browser)  The main things I can think of   Rendering text on screen Animating sprites (using images/css) Input (capturing the arrow keys and getting relative mouse positions) Perhaps some preloading resource or dynamically loading resources and choosing order Sound (but I am unsure how important this will be to me at first). Perhaps with mixing and chaining sounds or looping forever until stop. Networking (low priority) to connect a user to another or to continuously GET data without multiple request (I know this exist but I don't know how easy it is to setup or use. But this isn't important to me. Its for the question).


Why does rounding disappear in a dict object?

I have a pandas Series:  freq_features = num_occurrences/num_nodes print(type(freq_features)) print(freq_features)  <class 'pandas.core.series.Series'> PAT    0.386667 NUR    0.360000 MED    0.146667 ADM    0.106667   I round each value to 2 decimal places:  freq_features_rounded = freq_features.round(2) print type(freq_features_rounded) print freq_features_rounded  <class 'pandas.core.series.Series'> PAT    0.39 NUR    0.36 MED    0.15 ADM    0.11 dtype: float64   But when I use the to_dict() command, I get the non-rounded values (except for the ADM key):  freq_features_dict = freq_features_rounded.to_dict() print freq_features_dict {'NUR': 0.35999999999999999, 'ADM': 0.11, 'PAT': 0.39000000000000001, 'MED': 0.14999999999999999}   Why is this happening, and how can I get my rounded values into the dict() object as values?


question "on hold" still accepted an answer

According to  "on hold" questions will not accept answers.  But  was placed on hold at: 2013-07-05 07:58:51Z but accepted a new answer at: 2013-07-05 08:09:38Z  Is this expected behavior?  Note, for clarity, that the above meta question/answer reference also states "on hold" questions will behave identically to closed questions.    From what I can tell, closed questions cannot have new answers posted to them after they are closed. (I'm trying to avoid the use of the word "accept" here because I think it is an overloaded term.)  However the example SO question I linked allowed a new answer to be posted to the question after it was closed (more than 10 minutes after it was closed, from what I can tell.)


Upload an image and replace it with a custom image size

My aim is to upload an image and completely replace the original source image with a , as if the custom image sized file was the uploaded image.  For example, I have custom image size wpse, and I want to replace the original image completely with this file upon upload.    How is this possible?   Potential approach could be to hook into the upload process, edit the guid key in the wp_posts table with the URL of the wpse image, then delete the source uploaded file. I'm sure there are other values which needs to be updated.


Should I index a bit field in SQL Server?

I remember reading at one point that indexing a field with low cardinality (a low number of distinct values) is not really worth doing.  I admit I don't know enough about how indexes work to understand why that is.  So what if I have a table with 100 million rows in it, and I am selecting records where a bit field is 1? And let's say that at any point in time, there are only a handful of records where the bit field is 1 (as opposed to 0).  Is it worth indexing that bit field or not? Why?  Of course I can just test it and check the execution plan, and I will do that, but I'm also curious about the theory behind it.  When does cardinality matter and when does it not?


Here is my hardware:    Atom D2550 1.86GHzx4, 2.0TB HD, 4.0 RAM Need help to install Xubuntu. Any one can give me step by step instruction. Previous version is 12.04 LTS with Graphic interface.


In previous versions of OS X the Console.app had buttons to allow you to see earlier or later in the logs.  In Sierra it seems to only show entries from when you start Console.app.  How do you get Console.app to show earlier entries?  e.g. I want to see the logs before my last reboot to see why it hung.


Why don't file managers use the Master File Table for instant search results?

I've just discovered UltraSearch and was blown away by its file and folder search speed. It's instantaneous. And doesn't use any indexing service. It simply uses the , which already stores all the filenames on the NTFS partition.  The question is, why isn't this capability way more popular among file managers, and Windows Explorer Search (Win+F) to begin with?


how to update(not Insert) a standard object(Account) record using sites

I created a site where the guest users can edit their personal information. the operation should be on the Account object.so I created a extentsion submit which will save the edited info by a user. It worked fine in the developer mode when I put that page in sites it's not updating the information on the lead record. when I went to public access settings and checked there are no modify permission for accounts on sites. how can I achieve this task through sites? I want to update the record not insert the record.  public Without Sharing class ExtensionExample{     public String currentRecordId {get;set;}     public String parameterValue {get;set;}     List<Account> accRecords = new List<Account>();     public Account acc{get;set;}     public string accountName;     public id accID;      public ExtensionExample(ApexPages.StandardController controller) {         currentRecordId  = ApexPages.CurrentPage().getparameters().get('id');         acc = [select id ,name, AccountNumber, Type, Industry from Account where id =: currentRecordId ];         parameterValue = ApexPages.CurrentPage().getparameters().get('nameParam');     }     public void  doSubmit() {         accountName = acc.name;         accID = acc.id;         accRecords.add(new Account(id= accID, name=accountName));         update accRecords;      } }   // vf page   <apex:page standardController="Account" extensions="ExtensionExample">     <apex:form >         <apex:pageBlock >             <apex:pageBlockSection title="Current account record Id is : {!currentRecordId}" collapsible="false">                 <apex:InputField value="{!acc.name}"/>                 <apex:InputField value="{!acc.AccountNumber}"/>                 <apex:outputField value="{!acc.Type}"/>                 <apex:outputField value="{!acc.Industry}"/>             </apex:pageBlockSection>                <apex:commandButton value="Submit" action="{!doSubmit}"/>          </apex:pageBlock>     </apex:form> </apex:page>


So, I installed server edition 16.04.  Network manager is not installed.   > ~$ less /etc/network/interfaces  >#auto  enp3s0 >#iface lo inet loopback  >iface enp3s0 inet dhcp   I have tried various combinations here, but with this spesifik config i can reboot and  lo still comes up.  Seems that no matter what I set i etc/network/interfaceses, it is ignored and the computer brings up lo and enp3s0 on every boot.   Can anyone help?


choice of command-line operator and running a bunch of command line commands one after another

I wrote a simple python script that outputs a bunch of linux commands for a custom image manipulation command-line tool. As an example, here is what the python script creates: img_dae_create /d /t /19 "file1.jpg" -output "heavy" -t /mnt/img/output/ img_dae_create /d /t /7 "file2.jpg" -output "light" -t /mnt/img/output/ img_dae_create /d /t /8 "file3.jpg" -output "ex" -t /mnt/img/output/  Normally, I just copy and paste them to my Ubuntu command line and run one by one. Each command can take from 1 minute to 15+ minutes to execute. But sometimes, the python script will generate 100s of these, and it is very tedious to copy and paste each one. So I was wondering what would be the best command line operator to use in this case? Would ; be better than && given that:  The time it takes for each command to run could be between 1 and 15 minutes.  The outcome of the command does not matter, if it fails, then the command line tool records that in a log file and can be dealt with later.   Thanks!


Are there any comics where Superman is influenced by several types of Kryptonite in the same time?

I've seen and know some types of Kryptonite and know what its effects are, but is there something canon (or even non-canon) that shows what effects can happen when various different types of Kryptonite influence Superman at the same time?


Ubuntu 18.04 apt-get error When I run apt-get in terminal I receive these errors: E: The repository 'http://ppa.launchpad.net/blahota/texstudio/ubuntu bionic Release' does not have a Release file.  N: Updating from such a repository can't be done securely, and is therefore disabled by default.  N: See apt-secure(8) manpage for repository creation and user configuration details.  E: The repository 'http://ppa.launchpad.net/mc3man/gstffmpeg-keep/ubuntu bionic Release' does not have a Release file.  N: Updating from such a repository can't be done securely, and is therefore disabled by default.  N: See apt-secure(8) manpage for repository creation and user configuration details.  E: The repository 'http://ppa.launchpad.net/q-quark/equalx/ubuntu bionic Release' does not have a Release file.  N: Updating from such a repository can't be done securely, and is therefore disabled by default.  N: See apt-secure(8) manpage for repository creation and user configuration details.  I have no clue what to do (any ideas?). Your help is SO appreciated!


How do I use near sensor in blender game engine

in BGE, I have set up a near sensor for enemy tracking, however, it won't do anything, so I'm wondering if I did something wrong, I don't know if I have to attach a file, but if I do, for this question to be answered, I have it on a filehost link already to upload it The duplicate questions answer is not working, however I do have the exact same problem


clash of clans on ipod gen 4 transferring to samsung s3

Hi I have been playing clash of clans on ipod gen 4 however i cannot access it now on my ipod. I have a samsung s3. i have downloaded clash onto my s3 and want to continue with my existing village etc on my s3. please please can someone tell me how to do this. need idiots guide to do but many thanks if someone can help. clan now has no leader playing ;-(


Switch between two terminals with ALT-TAB (Ubuntu 18.04)

I have to switch between two terminals very often.  One terminal is a ssh-session to a local test-server and the other terminal is a ssh-session to a remote production server.  I am used to switching between windows with ALT-TAB.  Is there a way to make Ubuntu 18.04 switch between both with ALT-TAB?


Why is this unsigned long long printing a negative integer?

I'm making an algorithm to factor a fairly large number and it's not working. I know that factoring large numbers isn't a great task for a computer, but the problem I'm working on was designed to be solvable. I think the problem is the range of unsigned long long, but the sizeof function indicates that this type is big enough for my number. My program operates as if my input overflows. Furthermore, as a test, I made a short program to overflow the type and I'm perplexed by the result. Here's the test:  #include <stdio.h>  int main (void) {     unsigned long long x = 600851475143;     printf ("%d", x);     return 0; }   The value printed is -443946297. What's going on here?


A method to reverse effect of java String.split()?

I am looking for a method to combine an array of strings into a delimited String. An opposite to split().  Wanted to ask the forum before I try writing my own (since the JDK has everything)


How can I legally avoid submitting a transcript to Phd programs in America or the UK

Background: Five years ago, I obtained a Master's Degree from a top 10 American university in the Social Sciences.  I was a novice in academia, only one year post completing my Bachelor's degree, and simply not yet ready for the rigors of professional academia.  I had virtually no quantitative background from my Bachelor's degree, but after my first semester during my Master's program, I became interested in quantitative analysis, and registered for a doctoral level course in quantitative analysis.  I was simply not able to keep up with the course, and I received a C-, and my performance in my two remaining classes for the semester was negatively affected, and I earned a B- and B+.  For my final semester, I got my act together and earned three solid A's, including in two very quantitatively oriented courses.  I went on to pursue a second master's degree in a foreign school where, although by no means as prestigious as the first, I had a 4.0 GPA.  However, I am quite confident that my low GPA of a 3.33 from the first Master's will immediately kill any chance I have of receiving an admissions from American schools, which essentially means that one poor performance five years, at a time when I was an entirely different individual, will forever preclude me from pursuing my life's dreams.  I do not believe that it is in any way immoral to want send the transcript of my second master's degree, which I feel better represents who I am and what I am capable of, though obviously I am well aware that this is not allowed.    I am not trying to avoid responsibility for my academic performance, I am simply looking to pursue my life without being kept back by one poor performance five years ago.    Questions   Is it possible to request from my first university to have my degree revoked and registration cancelled in a legal, open, and transparent manner?  Is there any way that I can, once again, legally and by the book, not be forced to send in a transcript which will assuredly destroy my chances of being accepted or looked upon as series student?


Eigendecomposition of a matrix implies invertibility?

Does existence of Eigendecomposition of a matrix imply that it is invertible? That is, does the existence of n independent eigenvectors of a matrix imply that the matrix is invertible? If so, what is the reasoning behind eigenvectors and invertibility being connected? It seems intuitively wrong based on what I've learnt.   For instance, suppose A has n independent eigenvectors. Then the eigendecomposition exists:   $$A = PDP^{-1}$$  Then A is invertible?  EDIT: link to another question on this topic:


Why does $x$ divided by zero not equal $x$? After all, $x$ is not being divided by anything.


SQL Query to build a delimited string for a column for each distinct id in a table

I have 4 tables that have 2 columns each.  'Column 1' is the 'One'  'Column 2' is the 'Many'  Column 1 has several different ID's that i need to group somehow and build a delimited string of all the 'Columns 2' values.  I need to do this for every distinct 'Column 1' value.... is this possible?  So for example i have this table..  DECLARE @tblDeadsData TABLE (     [ID] INT IDENTITY(1,1) NOT NULL,     [ContainerID] INT NULL,     [DeadsID] INT NULL     )   It is already populated with data, i need to build a delimited string of ALL the [DeadsID] for each [ContainerID], and then these delimited string need to be placed into this table (the DeadsDataTable Data goes into the tblLastMerge.DeadsIDList in this case)..  CREATE TABLE tblLastMerge(     [ID] INT IDENTITY(1,1) NOT NULL,     [FeedLotID] INT NULL,     [ContainerID] INT NULL,     [ContainerName] VARCHAR(40) NULL,     [IsMergeTargetContainer] BIT NULL,     [PurchaseIDList] VARCHAR(1000) NULL,     [DeadsIDList] VARCHAR(1000) NULL,     [RailersIDList] VARCHAR(1000) NULL,     [FeedBillIDList] VARCHAR(1000) NULL     )   ***************************EDIT********************************* in regards to the duplicate post.........Concatenation is not delimited!!!!!! no wonder when i did a search for my problem i did not see this post..... i do think you should link these 2 post though as i found an answer much more simplified compared to the (supposedly) original post


How do I use multi-touch gestures on a MacBook Air?

I am using Ubuntu 12.04 on my MacBook Air (13" mid 2011) and it works lovely! Are there any news or possibilites to use multi-touch gestures?   But to now I am using the system out of the box. One and two finger gestures are working.


In pdflatex I'm used to clip graphics using something like this:  \includegraphics[trim=14mm 0mm 14mm 0mm,clip,width=1.2cm]{image.jpg}   When I attempt this in XeLaTeX, no clipping occurs and I get a warning:     Package xetex.def Warning: No clipping support in XeTeX yet   It is obvious, that I could clip the image with a separate tool outside TeX, but for several reasons I would like to do this automatically from inside TeX (e.g. when migrating large old documents to XeTeX without messing around with the files)  Two questions:   Is there any workaround I should be aware of to do the clipping automatically during the TeX run? E.g. by replacing \includegraphics by something else (TikZ?) Does anyone know if someone is working on clipping from inside XeTeX? Maybe there is a beta I could try?


I was try and my macbook can charger with ipad charger (i see output 5.2v-2.4a) with usb A to C convert.  But when i read on my macbook charger, it is have 2 output : 14.5v-2.0a and 5.2v-2.4a  my macbook can charge in 2 mode (both 14.5 and 5.2) or only with 5.2v?  if only need 5.2v , why need 14.5v output ?  maybe i use ipad charger on along time, it is what problem ?


How to find which functions are in a static c/c++ library in Visual Studio

I have an application, and a static library. The library appears to build just fine - it certainly compiles my foo and bar and geewhizz functions just fine, and creates the static library without any errors or warnings.  However, when the application builds and links to the static library, it manages to link to functions foo and bar but cannot find function geewhizz. How can I tell if geewhizz made it into the library? I can't see any /map option for libraries like there is for building the applications. And it is pointless using the \map option when building the application, because it can't find my geewhizz function, and has no basis to report on it.  I am working with a mixture of C and C++, and I suspect there is probably a function name mangling/translation issue, or calling convention issue, that is causing the problem, so I think having a list of the functions included in the library should be able to shine light on that. But if there is any more general advice for resolving such issues, I'd be pleased to hear it.


How to write in the middle of a line in an existing file using java?

I hava a .java file that i want to edit using a java program. Basically I simply want to add an "implement something" after the "class name"  I tried using randomAccessFile that i found on stackoverflow but the problem with it was that it was overwriting the next bytes... How could i simply insert it instead of overwriting the next bytes?      RandomAccessFile f;     try {         f = new RandomAccessFile(new File("the path of my file"), "rw");          f.seek(line.length()-1); // goes to where i want to write          f.write(name.getBytes()); //writes the string in name          f.close();     } catch (Exception e) {         // TODO Auto-generated catch block         e.printStackTrace();     }


How to recode categorical variable into numerical variable when using SVM or Neural Network

To use SVM or Neural Network it needs to transform (encode) categorical variables into numeric variables, the normal method in this case is to use 0-1 binary values with the k-th categorical value transformed to be (0,0,...,1,0,...0) (1 is on the k-th position). Is there other methods to do this, especially when there are a large number of categorical values(e.g.10000) such that the 0-1 representation will introduce a large number of additional dimensions(input units) in Neural Network which seems not quite desired or expected?   I am asking about general strategies.


Which sense of the term "mileage" is intended in the phrase "your mileage may vary"?

I gather that the phrase "your mileage may vary" basically means your experience may vary. But, in general use, the term "mileage" has two different senses, and both seem to be capable of being the one the phrase means :  Mileage as a measure of fuel efficiency -- i.e.  how much fuel a vehicle uses for specific number of miles it travels. Mileage as a measure of total miles a vehicle has traveled over its lifetime.  Both can possibly be the intended meaning of the term "mileage" in the phrase "your mileage may vary". So which one is it ?


How to disable Grub's menu from showing up after failed boot

I am performing a test in which I hard-reboot a machine with Ubuntu during its boot sequence (just before login prompt appears).  After the reboot, GRUB's menu shows up with no timeout (not its rescue-mode, but the usual menu), as opposed to before reboot where GRUB had a timeout and started to boot Ubuntu.  I am using a fresh installation of Ubuntu 12.04 LTS Server for my tests.  Although it is a nice feature for recovery, I would like GRUB to continue the "usual boot" sequence with the default timeout, instead of the "fail-safe" mode where it waits for input, even if previous boot failed.  How is it possible?


Can we use the linear momentum of photon to create thrust

I know the concept of solar sail, but I wanted to know if it is possible to create thrust by using a laser that is on a satellite. I mean that the satellite uses a powerful laser as a thruster.  And if it is possible does it have been tested already ?


Get CSS property from a dynamically added element

I have an dynamicly added div that I am calling to my page via a javascript tag added to the bottom from a third party plugin. I want to check if this element has the css value display:none or block. Im having trouble accessing the elements info I think because it was rendered to the page after my script. is there a way to check for this? i tried this:  if($('.element').css('display') == 'none') {     alert("none"); } else {      alert("block"); }


How do I install Windows 10 installation on my Windows 8.1 OEM laptop?

I bought a laptop with windows 8.1 pre-installed, and got an OEM flash drive with windows 8.1 installation. Now I've successfully upgraded to Windows 10. How could I install windows 10 on my laptop even after, other words - how to become Windows 10 owner (not 8.1) ?


How many TCP sockets can I open at once?

I am going to develop a TCP  server application. I am on the "choose server" step. My TCP server is going to have 2000+ clients and one socket to each client.  Is there limit for amount of created sockets depending on the operating system? Which operating system permits more open sockets at a given time?


How to recover deleted file when it is deleted from recycle bin

I had deleted many files from recycle bin I want to know if I could recover them .can you tell me the procedure.


Set Chrome to go to last used tab after tab is closed

I'm an ex Opera user so, simply because of how I am used to certain behaviors, I wanna create them in chrome. For instance: All new tabs should open at the end of all tabs, not next to the current. There is an extension for that, so its all working fine. Now, in Opera it was like, when you close any tab the focus goes to the tab that you last used/looked at before this one. In Chrome it just shows you the one in front of that tab, order wise. Is there any way to change that ?  Example situation: Browsing News page, opening 4 new news items in new tabs, looking at one, closing it, it should bring me back to the news list that I looked at before that. But currently it would just bring me to any of those other items, which ever is in row.


Can I create a constraint to a subset of data?

Here's a simplified view of my database  |---------------|     |-----------| | ORGANIZATION  |     | CONTACT   | |---------------|     |-----------| | OrgId         |     | ContactId | | OrgName       |     | OrgId     | | MainContactId |     | FullName  | |---------------|     |-----------|   Is there a way to ensure that MainContactId only belongs to the subset of the CONTACT table where the OrgId matches?   I did some looking and found that I can use a user defined function, but that appears to have performance issues. Do I have any other options here?   EDIT: I played around, and got the following working. Is there a problem with this approach?       CREATE FUNCTION dbo.CheckOrgMainContact(@OrgId int, @ContactId int)     RETURNS int     AS     BEGIN         DECLARE @Result int          IF @ContactId IS NULL --if the contact ID is not set, don't check it         BEGIN            SET @Result = 1         END         ELSE         BEGIN             IF EXISTS (SELECT *                         FROM dbo.Contact                        WHERE OrgId = @OrgId and                               ContactId = @ContactId)                SET @Result = 1             ELSE                SET @Result = 0         END         RETURN @Result     END     GO      CREATE TABLE dbo.Organization     (        OrgId int NOT NULL IDENTITY(1,1) PRIMARY KEY,        OrgName varchar(50) NOT NULL,        MainContactId int NULL,        CONSTRAINT [CheckOrgMainContact_Constraint] CHECK (dbo.CheckOrgMainContact(OrgId, MainContactId)=1)     )     GO      CREATE TABLE dbo.Contact     (        ContactId int NOT NULL IDENTITY(1,1) PRIMARY KEY,        OrgId int NOT NULL FOREIGN KEY REFERENCES dbo.Organization(OrgId),        FullName varchar(50) NOT NULL     )       GO     ALTER TABLE Organization      ADD CONSTRAINT FK_MainContact FOREIGN KEY (MainContactId)          REFERENCES dbo.Contact (ContactId)      GO      --let's get some date inot the tables     SET IDENTITY_INSERT Organization ON     INSERT INTO Organization (OrgId, OrgName)     VALUES(1, 'Google'),           (2, 'Microsoft'),           (3, 'Leidos');     SET IDENTITY_INSERT Organization OFF      SET IDENTITY_INSERT Contact ON     INSERT INTO Contact (ContactId, OrgId, FullName)     VALUES (1, 1, 'Homer'),            (2, 1, 'Marge'),            (3, 1, 'Bart'),            (4, 2, 'Bob'),            (5, 2, 'Linda'),            (6, 2, 'Gene'),            (7, 3, 'Frank'),            (8, 3, 'Dee'),            (9, 3, 'Dennis')     SET IDENTITY_INSERT Contact OFF       UPDATE Organization SET MainContactId = 1 WHERE OrgName = 'Google' --set this to a valid contact      UPDATE Organization SET MainContactId = 4 WHERE OrgName = 'Google' --try setting this to an invalid contact       SELECT o.OrgName, c.FullName FROM Organization o INNER JOIN Contact c on o.OrgId = c.OrgId --get all the contacts     SELECT o.OrgName, c.FullName as MainContact FROM Organization o LEFT JOIN Contact c ON o.MainContactId = c.ContactId


Is there an Ubuntu Touch emulator or a way to install it in a VM?

Is there any way to install Ubuntu Touch inside a virtual machine on a regular Ubuntu computer instead of on a phone or tablet? Or is there an emulator, like the one the Android SDK comes with?


How to get same styles in DynamicReports and JasperReports

I would like to found best solution for having same styles for dynamicReports and jasperReports. I started to use dynamicReports, however I found it hard to create unusual reports there. It was much easier to do that in iReport graphical builder. So now I have 50% reports which runs on Dynamic and 50% on Jasper.  Now I can't resolve style problem. I've created styles, fonts etc in Template class and used it for DynamicReports. After some magic like:  .setName("cellCenterStyle"); template().setColumnStyle(cellStyle)   I was able to use them for jasper, but this is not a full solution as some options still does not work, for example:  .setDetailEvenRowStyle(Template.evenIntensivStyle)   is working with dynamic, but jasper ignores is.  So, the question:  Could I use same styles for dynamic and jasper with clear structure and without needless "magic". I would prefer solution like *.css styles, but any help would be appreciated.


Did Littlefinger start The War of the Five Kings?

In S07 E04 Littlefinger presents Brandon Stark with a dagger used by the assassin. Brandon asks "Do you know who this belongs to?" and Littlefinger says "No, that very question is what started the War of the Five Kings".  In the first season Littlefinger admits that it was his dagger but won from him by Tyrion Lannister, thereby implicating Tyrion as trying to murder a Stark.  Does this mean Littlefinger lied to Catelyn Stark in order to start a civil war?


Why are two different nested loops (with same time complexity) taking diffrent time to execute?

In my code, both for loops have the same time complexity and same operation, however the second nested for loop takes almost 40 times more time than first one. Why is this happening?  I am using javac compiler and running my code in windows command prompt.   import java.util.concurrent.TimeUnit;  class Elapsedtime {     public static void main(String[] args) throws InterruptedException      {         int i,j,t,a;         long startTime = System.nanoTime();         for(i=0;i<1000000000;i++)         {             for(j=0;j<1000000000;j++)             {                 a=j;             }         }         long endTime = System.nanoTime();         long timeElapsed = endTime - startTime;         System.out.println("Execution time in nanoseconds  : " + timeElapsed + " ns.");         System.out.println("Execution time in milliseconds : " + timeElapsed / 1000000 + " ms.");          startTime = System.nanoTime();         for(t=0;t<1;t++)         {             for(i=0;i<1000000000;i++)             {                 for(j=0;j<1000000000;j++)                 {                     a=j;                 }             }         }          endTime = System.nanoTime();         timeElapsed = endTime - startTime;         System.out.println("Execution time in nanoseconds  : " + timeElapsed + " ns.");         System.out.println("Execution time in milliseconds : " + timeElapsed / 1000000 + " ms.");     } }   I am getting the following output.     Execution time in nanoseconds  : 17963700 ns. Execution time in   milliseconds : 17 ms. Execution time in nanoseconds  : 549485500 ns.   Execution time in milliseconds : 549 ms.   but I don't expect much difference.


What blueprints become available during story?

As I progress, I realize that some blueprints open up throughout the story and don't have to be researched. Are these random or are they always the same and is there a list over those? Seems you can easily waste research point if you don't know that.


We are given two polynomials p, q with deg(q)>1+deg(p). Show that the sum of the residue at all poles of the rational function p/q is 0.   How do I go about solving this?


Projection onto closed convex sets' equivalent condition.

Prop: Let $S\subset \mathbf{R}^n$ be non–empty, closed, and convex. Given any $x\in\mathbf{R}_n$, we have $z^*=\arg\min_{z\in S}\|z-x\|_2$ iff $z^*\in S$ and $(z − z^*)^T(x − z^*)\le 0$ for all $z \in S$.  For this proposition, I know how to prove backwards, i.e. from the inequality to $z^*$. But the forward seems difficult to me. Can any one help?  My problem is different from . You can view my problem as 2 vectors' dot product is negative, which one is from projection point to the point $x\notin S$, the other is from the projection to any point in the convex set, while the link's problem is about distance.


I'm trying to get dns resolution of Avahi .local domains.  I can do:  $ avahi-resolve-host-name redacted.local Redacted.local  10.xx.xx.xx   but not  ping redacted.local ping: redacted.local: Name or service not known


How to Check if File is ASCII or Binary in PHP

Is there a quick, simple way to check if a file is ASCII or binary with PHP?


"I better not ask," vs "I had better not ask."

Example:     Speaker A: Thanks for the fish, I'll feed it to my crocodile.      Speaker B: Your crocodile? I (had) better not ask.   I better not ask sounds better to me ( results on Google Books). However, the one with the most results is I had better not ask ().  Which one is the most common idiom? (I'm open to other suggestions.)


What is a simple intuitive definition of Odd?

From what i read "The probability that an event will occur is the fraction of times you expect to see that event in many trials. The odds are defined as the probability that the event will occur divided by the probability that the event will not occur."   Can any of you tell what is the real life usage of Odds? I would also appreciate if anyone can give a simple explanation on what we are trying to achieve by calculating the Odd? In the case of probability, we are calculating the chance of a particular event to happen. Similarly, what are we trying to find out by calculating the odd in plain English?


Is there a level cap, if anything, in Destiny?  From this , it says there's a soft level cap of 20, but it says you can go past that.  Does this mean the level cap is stuck at 20, but then how does it say you can go past that?


what happens if i reassign value to character pointer in c

where is the change occurring if i am reassigning a character to *p .  #include<stdio.h> int main() {  char* p="hello" ; printf("%s",p); *p='a' ; printf("%s",p);  return 0;  }   *p='a' should have replaced 'h' with 'a' in the string .  *p should access and base element of the string pointed by p and replace it .  but print statement prints "hello " both times   but it doesnt can anyone explain why not ??


How to restrict the download of all files in a folder?

I have several .pdf files, which should be viewed on my website by clicking a link on a page. But when a pdf file opens, in the address bar the directory where all .pdf files reside is visible. So if the user enters http://example.com/myDir in the address bar he will see and be able to download all files at once. But I don't want that!  When I chmod 644 myDir, the files are not visible even for my site - i.e. you can not open them by clicking the link I have mentioned. How to solve this problem?


Why completing an octet stabilises an atom, quantum mechanically?

They say that Neon $Ne$ is stable because it has 10 electrons and with 10 electrons it completes its octet and completing an octet decreases the potential energy of an atom to the minimum and a system loves to remain in the lowest energy as possible.  Then I read that an electron is literally a probability wave and we can only talk about the probability of an electron present at a point at a certain time instant.   How are the two terms related? How do waves decide that when a system is going to be stable? How is potential energy related to these waves?


How do I know what packages I need to install?

Not for any specific program, just in general if I wanted to install something via APT how do I know what packages I need to "apt-get install" for that program


Prove that if square root of ${m\over n}$ is rational, then $m$ and $n$ are both perfect squares

Let $m$ and $n$ be positive integers with no common factor. I have to prove that if square root of ${m\over n}$ is rational, then $m$ and $n$ are both perfect squares, that is to say there exist integers $p$ and $q$ such that $m = p^2$ and $n = q^2$.  Can anyone help me with this??


method invocation may produce nullpointerexception

I'm trying to implement Graph using adjacency list, but when I try to add new pair into the list it gaves me an NullPointerException. Is there anyone know why it would happen and how to fix it?  Thanks in advance.  My Graph.java is like:  import javafx.util.Pair; import java.util.*;  public class Graph{     private final HashMap<String, List<Pair<String, Integer>>> adj;      public Graph(String filePath) {         adj = new HashMap<>();         addEdge("a", "b", 30);     }      public void addEdge(String start, String end, int weight) {         adj.get(start).add(new Pair<>(end, weight));     } }   My Main.java is like:  public class Main {     public static void main(String[] args) {         Graph gr;          try {             gr = new Graph("test.txt");         } catch (Exception ex) {             ex.printStackTrace();         }     } }


Attracting more traffic to Stack Exchange question?

Possible Duplicates:                This question might not be allowed but I am going to try...   I have noticed that asking a question during certain times of the day will elicit much fewer responses then questions asked at peak hours of the day. If I have a question that didn't get much traffic, I didn't get an answer I was looking for, and now is getting towards the bottom of the "Stack" so few people are looking at it, how can I get more traffic to my question? Is there a good way other than offering a bounty? I shouldn't have to sacrifice my points should I?


After seeing how misinformed an article is in a newspaper, you flip the page and continue reading as if the rest can be trusted. What is this called?

I vividly remember reading a Wikipedia article about a named law (e.g. "Betteridge's law of headlines"). It goes something like this: "You read an article about a topic you're very familiar with, and find that the author knows nothing and his article is extremely misinformed. You then flip the newspaper page, forgetting the low content quality you've just read, and continue reading as if the rest of the information in newspaper (about topics you're not familiar with) can be trusted normally."  I am asking for the name of the law. I'm fairly certain it is eponymous, but couldn't find it in .  (Related question that does not contain the answer I'm looking for: )


Theorem 2.17 Rudin's Real and complex analysis - Definition of $F_{\sigma}$ and $G_{\delta}$

In the following statement there's the usage of $F_{\sigma}$ and $G_{\delta}$  Suppose $X$ is a locally compact, $\sigma$-compact Hausdorff space. If $\cal{M}$ and $\mu$ are as described in the statement of theorem 2.14, the $\cal{M}$ and $\mu$ have the following properties:  If $E \in \cal{M}$, there's a closed set $F$ and an open set $V$ such that $F \subset E \subset V$ and $\mu(V - F) < \epsilon$ $\mu$ is a regular Borel measure on $X$ If $E \in \cal{M}$, there're sets $A$ and $B$ such that $A$ is an $F_{\sigma}$, $B$ is a $G_{\delta}$, $A \subset E \subset B$, and $\mu(B - A) = 0$.   I cannot find in the previous sections any definition of $F_{\sigma}$ and $G_{\delta}$. Can anyone tell me the used definitons? or where to find them.


What does the position of the ON clause actually mean?

The normal JOIN ... ON ... syntax is well known. But it is also possible to position the ON clause separately from the JOIN that it corresponds to. This is something that is rarely seen in practice, not found in tutorials and I have not found any web resource that even mentions that this is possible.  Here is a script to play around with:  SELECT * INTO #widgets1 FROM (VALUES (1), (2), (3)) x(WidgetID)   SELECT * INTO #widgets2 FROM (VALUES (1, 'SomeValue1'), (2, 'SomeValue2'), (3, 'SomeValue3')) x(WidgetID, SomeValue)  SELECT * INTO #widgetProperties FROM (VALUES     (1, 'a'), (1, 'b'),     (2, 'a'), (2, 'b')) x(WidgetID, PropertyName)   --q1 SELECT w1.WidgetID, w2.SomeValue, wp.PropertyName FROM #widgets1 w1 LEFT JOIN #widgets2 w2 ON w2.WidgetID = w1.WidgetID LEFT JOIN #widgetProperties wp ON w2.WidgetID = wp.WidgetID AND wp.PropertyName = 'b' ORDER BY w1.WidgetID   --q2 SELECT w1.WidgetID, w2.SomeValue, wp.PropertyName FROM #widgets1 w1 LEFT JOIN #widgets2 w2 --no ON clause here JOIN #widgetProperties wp  ON w2.WidgetID = wp.WidgetID AND wp.PropertyName = 'b'  ON w2.WidgetID = w1.WidgetID ORDER BY w1.WidgetID   --q3 SELECT w1.WidgetID, w2.SomeValue, wp.PropertyName FROM #widgets1 w1 LEFT JOIN (     #widgets2 w2 --no SELECT or FROM here     JOIN #widgetProperties wp     ON w2.WidgetID = wp.WidgetID AND wp.PropertyName = 'b') ON w2.WidgetID = w1.WidgetID ORDER BY w1.WidgetID   q1 looks normal. q2 and q3 have these unusual positionings of the ON clause.  This script does not necessarily make much sense. It was hard for me to contrive a meaningful scenario.  So what do these unusual syntax patterns mean? How is this defined? I noticed that not all positions and orderings for the two ON clauses are allowed. What are the rules governing this?  Also is it ever a good idea to write queries like this?


Extract data from NetCDF using a shapefile polygon in Python

I need to subset data from a NetCDF using a specific shapefile.  The data are sea surface temperature and ocean color at 1/4 degree resolution.  I have 4 polygons describing the US. Northeast continental shelf large marine ecosystem and it's sub-components that I need to use to extract the data.  I am working with monthly composite files from 1982-2014, so this data extraction routine needs to be automated.  The files are already subsetted to the approximate working area grid of [35, 45, -80, -60].    Previously, we were converting HDF5 data files to rasters in R and processing them this way, but this method is really inefficient and I am sure there is a better solution in Python using the current NetCDF files.  Thus far I have been using GDAL and Fiona to read in the shapefiles and NetCDF4 to load the data files. I am not sure how to go about subsetting the data.  I found this:     But I don't have the foggiest idea about how to subset a NetCDF file using anything other than a simple bounding box, which these polygons most certainly are not.  Point in polygon routines would probably take an eternity to work, but maybe I could subset the data using a smaller bounding box that is rotated to fit these shapes like this as an initial starting point and then do a point-in-poly search:    Any ideas?  EDIT 1:  I just came across the OpenClimateGIS package which seems that it may fit the bill perfectly...  I will have a go with this to see if I can get it to work:


Do I need to apply for Airport Transit Schengen Visa if am Kosovar(Kosovo) and Permanent resident of Canada

I am traveling to my home country Kosovo. I am Permanent Resident of Canada and have Kosovo passport. My flight will have 2 layovers in Schengen area. Do I need to apply for Airport Transit Visa?


Is it possible to reintegrate a Horcrux?

As anyone who is familiar with Harry Potter knows, a horcrux is made when someone commits murder and stores a piece of their soul in something. Would it be possible for this someone to later recover and reintegrate their soul piece(s), should they want to?


java nullpointerexception on function call

I`m doing my first steps on using Java and the eBay SDK (API).  In this code snippet I try to get a category list from eBay.  The call seems to work and I get a large result in the gcResponse object. Next step is to loop through the returned categories. The categories are returned in an array. The variable ct of type CategoryType holds one category. When debugging I can see the CategoryType object populated with data correctly(Name, Level, ...).   The ct.leafCategory has a value of 'false' indicating that this category isn't a leaf category.  But when I try to acces this field via the getLeafCategory() function I get a Null pointer exception (it is caught by the APIException-catch block).  Now I wonder how I can access this field correctly (all I want get back would be 'false'). I cannot access the field directly, because of course it seems to be private.  Does that mean, that the NPE happens inside the leafCategory()-function? But what could the function do except 'return leafCategory;'?   Thank's a lot for giving me a hint!      ApiContext apiContext = getContext(env, siteID);      GetCategoriesCall call = new GetCategoriesCall(apiContext);     GetCategoriesResponseType gcResponse = null;      call.setParentCategories(new String[] {"3187"});      call.setCategorySiteID(getSiteCode(siteID));      call.setDetailLevel(new DetailLevelCodeType[] {DetailLevelCodeType.RETURN_ALL});      try {          call.getCategories();         gcResponse = call.getResponse();          CategoryArrayType arr = gcResponse.getCategoryArray();          CategoryType ct = new CategoryType();          KMTgcResponse.categories = new KMTCategory[arr.getCategoryLength()];          for (int i=0; i<arr.getCategoryLength(); i++){             ct = arr.getCategory(i);             KMTgcResponse.categories[i] = new KMTCategory();             KMTgcResponse.categories[i].ID = ct.getCategoryID();              KMTgcResponse.categories[i].leafCategory = ct.isLeafCategory();   // NullPointerException here !!!             KMTgcResponse.categories[i].level = ct.getCategoryLevel();             KMTgcResponse.categories[i].name = ct.getCategoryName();             KMTgcResponse.categories[i].parentID = ct.getCategoryParentID();         }          response.getCategoriesResponse = KMTgcResponse;         response.rc = 1;      } catch (ApiException e) {         e.printStackTrace();         response.err_msg = Common.toString(e);         response.rc = -1; } catch (Exception e) {         response.err_msg = Common.toString(e);         response.rc = -1;     } }


How to set a gamemode radius with command blocks?

I've been trying to figure out how to change a player's gamemode from adventure to survival when walking out a certain radius. The map size I'm using is 2956x2956 & I wanna be sure to cover all of it. I tried using /gamemode creative @a [r=10] with a repeat block just to test out what'll happen. But no matter how far I am from the block it keeps setting my gamemode to creative. Can someone show me how to properly write what I'm trying to do for minecraft 1.12.2? Screenshots would be much appreciated.  (also how can I stop the commands from blowing up my chat lol?)


I want to populating my sql tables using PHP code. For words with accent like ('pépite') , they are inserted as 'pÃ©pite'. Some extra characters are inserted in my string. Here is my code:  $word = 'pépite'; $query = "Insert into [Tracker].[dbo].[Demo] values ('".$word."')"; sqlsrv_query($conn,$query); echo $word; // output : pÃ©pite   I have tried with utf8_decode as well. But this gives some abstract output.


What are the choices for the Ubuntu desktop GUI and how do I enable them?

I am new to Ubuntu and have installed the 12.10 in VM on my laptop. I've installed the Vmware tools as well. However, the VM boots to the command-line. A few questions:   What are the choices of desktops in 12.10? How does one start and stop all the various desktop GUI choices like xdm, kdm, gnome etc?   Within the context of the current terminal session that I have open. I want to try them all before making them one of them permanent via a startup init script.  I've tried xdm but other than Terminal and Nautilus, I can't seem to find a menu that will allow me to view and start all the various applications. Where do I find the equivalent of windows 'start' menu in the xdm desktop (and in other desktops)?


Find  the determinant of the AR(1) matrix given by: $$R = \begin{pmatrix} 1 & \rho & \cdots & \rho^{d-1}\\ \rho & 1 & \cdots & \rho^{d-2}\\ \vdots & \vdots & \ddots & \vdots\\  \rho^{d-1} & \rho^{d-2} & \cdots & 1 \end{pmatrix}$$  This is a common question but I want a simpler method of computation that is without using results of determinants of tridiagonal matrices. Please help!


Are spells that do piercing, bludgeoning, or slashing damage considered magical damage?

Are spells that do only bludgeoning, piercing, or slashing damage considered magical or nonmagical damage?  Most especially when considering them for purposes of resistance/immunity against "bludgeoning, piercing, and slashing from nonmagical weapons that aren't silvered".  For example, Thorn Whip I can see two sides:   It is being created by a spell, using a melee spell attack to hit, and the spell damage increases with level. Thus it is magical damage. The spell description only states piercing damage, and it's the object created by the spell that does the damage rather than the spell directly. Thus it is nonmagical damage.   Similar arguments can be made for other spells (such as Earth Tremor), or portions of other spells (such as the piercing damage of Ice Knife).  I'm interested in the rule(s) for this class of spell damage, rather than the specific spells.    [1]: Thorn Whip spell can be found in the Player's Handbook.  [2]: Earth Tremor, and Ice Knife are spells found the Elemental Evil Player's Companion.


Which is correct: "What lurks underneath ARE our lives," or "What lurks underneath IS our lives"?

I admit, the fact I can't figure this out is embarrassing.  I'm not looking to change the wording of the sentence, but rather want an answer to which is the correct verb tense in this exact instance.  Since "lives" is plural, then "are" should be the corresponding verb, one might argue.  On the other hand, something seems intuitively amiss about that choice.  Perhaps "what IS lurking underneath (IS) our lives is  causing confusion for me, as I try to sort this out (I think "what" is being used as a singular pronoun.  Or is it?  Maybe it's being used as a determiner.)  Maybe "our lives" is one singular concept that should match to a singular verb.  I'm going down a rabbit hole here and can't seem to get out.  Help!  Any assistance is appreciated! Confusing examples that I've considered (that aren't helping) - What time ARE we going? What time IS it? (What is determining the verbs "are" and "is" in the above examples?!)  Please help before I go insane!


is there any possibility to use an Esri .lyr data in QGIS?   Maybe a tool to convert the file into a xml or sld?


How do you avoid getting hit by the Eye of Cthulhu?  I can't get any wings.I find it frustrating that I can't avoid him. Is there a easy wingless suggestion to defeat this boss? My computer wont let me look this up on google.


"bash: syntax error near unexpected token `('" for stable repository set up

While trying to  on ubuntu 16.04 I am trying to set up the stable repository and get the following:  $ sudo add-apt-repository \'deb [arch=amd64] https://download.docker.com/linux/ubuntu \$(lsb_release -cs) stable' bash: syntax error near unexpected token `('   I am new to  Linux (today) so any advice would be much appreciated.