Unable to update existing lead from force.com site

I have a requirement where I need to update an existing Contact in Salesforce from a Visualforce page on display of a Force.com site.  How can this be achieved, since there is no update permission on Standard objects.  Whatever I had tried is as below :   public without Sharing class ContactEditExt {  public PageReference CANCEL() {     return null; }  public Contact con; public Id recordId; public ContactEditExt() { recordId = apexPages.currentPage().getParameters().get('id'); System.debug('>>>>>>>recordId'+recordId); }  public Contact getcon() {     con = [Select Id, firstname, lastname, Account.name ,email, Double_OptIn__c, Double_OptIn_Time__c, Receive_Communication__c from Contact where Id =:recordID];         return con; } public pageReference saveStatusChange(){     if(con.Receive_Communication__c == true){         con.Double_OptIn__c = true;         con.Double_OptIn_Time__c = date.today();     } try{     update con; } catch(exception e){     System.debug('update Contact :'+e); } return null; }   }  Visualforce Page:       <apex:page sidebar="false" controller="ContactEditExt">  <apex:form >   <apex:sectionHeader title="Edit Contact for" subtitle=""/>    <apex:pageBlock >      <apex:pageBlockButtons >        <apex:commandButton value="Submit" action="{!saveStatusChange}"/>        <apex:commandButton value="Cancel" action="{!CANCEL}"/>      </apex:pageBlockButtons>        <apex:pageBlockSection Title="Update my Records" columns="1" >          <apex:inputText value="{!con.email}"/>          <apex:inputText value="{!con.Account.name}" label="Company"/>          <apex:inputText value="{!con.firstname}"/>          <apex:inputText value="{!con.lastname}"/>          <apex:inputCheckbox value="{!con.Receive_Communication__c}" label="I would like to receive communications from the Roundtable on Sustainable Biomaterials"/>         </apex:pageBlockSection>      </apex:pageBlock>  </apex:form> </apex:page>   Thanks in advance!


What special properties does 18% gray color have in photography?

I keep seeing 18% gray color backgrounds being used in different areas of photography. What's special about it, why 18% and not 17 or 19?


Can I go outside Toronto airport with transit visa for a few hours?

I am an Indian citizen studying in US on F1 Visa. I have a 6-7 hour layover in Toronto International Airport on my flight from Chicago -> Tornoto -> Zurich -> Mumbai. I am wondering if it's possible for me to outside the airport and get some food and roam around a little bit before catching my flight? Is this allowed on a transit visa? Will there be any issue during Immigration check?


At the end of Game of Thrones season 7, we saw the Night King's army destroy (at least part of) the Wall. At the end of S08E06, we see Jon go      north of the Wall.   In those final shots, the Wall seems to be intact. Has it been repaired? Why is there no visible damage?


Let  $$0 \rightarrow M \rightarrow N \rightarrow P \rightarrow 0$$  be an exact sequence of $A$-modules, where $A$ is a commutative ring with unity.  Then for each natural number $i$ one can look at the induced maps  $$\mathrm{Sym}^i(N) \rightarrow \mathrm{Sym}^i(P)$$  and   $$\mathrm{Sym}^i(M) \rightarrow \mathrm{Sym}^i(N).$$  The first question is, if they are still surjective, resp. injective, i.e. is $\mathrm{Sym}^i$ an exact functor?  The second question is: what are the kernel, resp. cokernel of these maps?


For $p\neq q$ odd prime integers, $(\mathbb{Z} / pq \mathbb{Z})^*$ is not cyclic.

I am working through Aluffi's Algebra Chapter $0$ and I'm not sure how the author intended us to use the conclusion from exercise $4.9$ in $4.10$    Since $p$ and $q$ are distinct prime numbers, they are relatively prime. So using $4.9$, $C_p \times C_q \cong C_{pq} \cong (\mathbb{Z} / pq \mathbb{Z})^*$. However $|(\mathbb{Z} / pq \mathbb{Z})^*| \ne pq$. The order of $(\mathbb{Z} / pq \mathbb{Z})^*$ is $pq-p-q+1 = (p-1)(q-1)$. Since it is assumed that $p$ and $q$ are odd, $gcd(p-1,q-1) \geq 2$ and we can no longer utilize the result of $4.9$


How would Forbes' design team create these photos?

There's a gallery of  where all of the portraits have the same effect applied. What would that be called, and how can I do something similar using Adobe Photoshop?  For example:


Was Gandalf permitted to go all out on the Balrog?

The Maia sent to Middle Earth to safeguard it from Sauron were under strict orders: while in Middle Earth, they are to live as mortals, they are not to reveal their true identities, nor are they to engage Sauron or his armies with their true power. These rules are designed to prevent them from dominating the Free Peoples, and to protect Middle Earth from further devastation by another "war of the gods".  When Gandalf faced the Balrog, however, do these rules still apply? Do the Valar require Gandalf to stick by these rules to the bitter end, or are exceptions made for self-defence? After all, as a Maia who had never fought in the wars, his ability to defeat a top lieutenant of Morgoth is objectively speaking in doubt, let alone if he has to "fight as a mortal".


As a non- native speaker of English, I often find myself struggling with the usage of the suffix -al in adjectives. For instance, what's the difference between the words "historic" and "historical", "metaphoric" and "metaphorical", etc? Are there any rules as far as this suffix is concerned?


Apple Official iOS Development Certificate

Are there any official certification programs by Apple for iOS App Development?


PreparedStatement with list of parameters in a IN clause

How to set value for in clause in a preparedStatement in JDBC while executing a query.  Example:  connection.prepareStatement("Select * from test where field in (?)");   If this in-clause can hold multiple values how can I do it. Sometimes I know the list of parameters beforehand or sometimes I don't know beforehand. How to handle this case?


How to give hover effect in inline html?

I want to give inline css for p tag in html inline,so what i need is something look likes this,
Node.js
   Is there a way to give such thing in inline html,


I have two custom taxonomies applied to two custom post types. the terms list on the sidebar just fine and will list all posts associated with it. However, if you search one of the terms in specific, it doesn't bring up a post with that term.  Example:  Search for term "PQRI"  I get nothing. Any ideas? I've tried using various search plugins but they either break my custom search parameters or just don't work.


i want to parse the following JSON String. Please help

I have two objects MDM_Object_Mapping__c(parent) and MDM_Field_Mapping_ims__c(chaild) are in MD relationship. My JSOn String is:      public static List < JSON3Apex > parse(String json) {         return (List < JSON3Apex > ) System.JSON.deserialize(json, List < JSON3Apex > .class);     } }


Proof of Euler's general formula for a sum involving harmonic numbers

I have seen this formula, but how to prove this? $$2\sum\limits_{k=1}^\infty \frac{H_k}{\left( k+1 \right)^m} =m\zeta \left( m+1 \right)-\sum\limits_{k=1}^{m-2}{\zeta \left( m-k \right)\zeta \left( k+1 \right)}$$


Save Custom Class Array With NSUserDefaults

I have a custom class called Friend:  class Friend {      var fullName: String     var birthday: String     var from: String      var photoLink: String = ""     var photo: UIImage = UIImage()     var photos: [AnyObject] = [AnyObject]()      init(fullname: String, birthday: String, gotFrom: String) {         self.fullName = fullname         self.birthday = birthday         self.from = gotFrom     } }    I've tried saving it with NSUserDefaults but I get an error because I use a custom Class.  How can I save an array of Friend?


Let $A$ and $B$ be nonempty sets of positive real numbers that are bounded above. Also let $AB = \{ab: a \in A, b \in B \}$. Prove that $AB$ is bounded above and $\sup(AB) = (\sup A) (\sup B)$.   So $\sup A$ and $\sup B$ exist by completeness. An upper bound for $AB$ is $(\sup A)(\sup B)$. Let $\alpha = \sup A$ and $\beta = \sup B$. We want to show that if $c$ is an upper bound for $AB$ then $\alpha \beta \leq c$. For $a \in A$, $ab \leq c$ for all $b \in B$. So $c/b$ is an upper bound for $A$. Thus $\alpha \leq c/b$. It follows that $\alpha \beta \leq c$.  Is this correct?


How can I protect my eyesight when using computers?

My job requires long periods of computer screen use. I have good eyesight (20/15) and don't wear glasses, but I definitely notice my eyes feeling fatigued at the end of the day. Sometimes when I'm short on sleep, I have trouble focusing or see slightly blurred vision.  I want to protect my eyesight as much as possible. What are the best practices for doing so if you spend a lot of time staring at screens?


I understand there are a few questions related to this topic which is why I don't think it's duplicate, and that there is one directly addressing it. I am still extremely paranoid about this, and would still like to let you guys know how EXACTLY how I did it, since the process might be different from the other questions.  I believe the upgrade process is the same for both Windows 7 and 8.1 since I have PCs running both of those OSs that I would like to upgrade.  I didn't install other updates before I decided to upgrade to Windows 10.  Then I went to  and I downloaded the 64-bit tool listed on that site.  Afterwards, I run the media creation tool.   It leads to the above image.  Will this program A) download AND install or  B) download OR install?  Best case scenario it downloads and waits for me to give it the ok before installing.  When I give it the ok and it finishes, will the result be a WIPED computer or will all my personal documents/files all be there?


How to install package in 86 hosts in the same time (RHEL)?

I would like to install python3 and python3.4 in my office servers. There are 86 hosts and I am confused how I do that in the same time. In this time, I found my solution like this pssh -h host_86.txt -i "yum install -y epel-release && yum install -y python34"  Is python3 included in python3.4 package automatically or separately? Is my solution right to do that? The OS is RHEL 7 and I found the yum package from here: . Do I need to install python34-setuptools and easy_install-3.4? I am junior system administrator and confused about how to handle 86 hosts a day.


Can't start my Windows XP Virtual Machine: Insufficient Disk Space

Okay, I currently have a server with two virtual machines installed on it, a CentOS5.4 and a Windows XP. I was remote desktopping the Windows XP chatting on IRC, and all of a sudden I lost connection.  I checked with my HyperVisor and tried to restart it, and it won't start at all.  It's giving me this error: Message     from server0297.serverpool.gnet.ba:    Failed to extend swap file (fileHandle   16414)  from 0 KB to 524288 KB: No   space left on device.  Could not power   on VM : No space left on device.    Failed to power on VM info 4/17/2010   9:49:20 PM root   Basically I bought the set up from a host, he installed the HyperVisor and the VirtualMachines, and honestly I don't really know what I'm doing. I've looked at some of the settings, and I can't figure it out. If you need any additional information, I'll try to provide it.  The CentOS5.4 is still starting and working flawlessly, if that's relevant.


Bijective and continuous $\implies $ monotone.

How can I show that a bijective continuous function $f:\mathbb R\to \mathbb R$ is monotone ?  My attempts  Let $a<b$. Since $f$ is injective, $f(a)\neq f(b)$. Therefore $f(a)<f(b)$ or $f(a)>f(b)$. Suppose with out loss of generality that $f(a)<f(b)$ and let $x,y\in[a,b]$ such that $x<y$. By injectivity, $f(x)\notin \{f(a),f(b)\}$. Suppose that $f(x)\notin ]f(a),f(b)[$.   If $f(x)<f(a)$, by the intermediate value theorem (IVT), there is a $c\in[x,b]$ such that $f(x)=f(c)$ what contradict injectivity.  If $f(x)>f(b)$, by IVT we have a $d\in[a,x]$ such that $f(d)=f(b)$ what also contradict injectivity.   Then $f(x)\in [f(a),f(b)]$. We can show as well that $f(y)\in [f(a),f(b)]$ and that $f(x)<f(y)$. Therefore we have that $f(x)<f(y)$ if $x<y$.   The problem is that I'm not sure that my proof is finish. I just proved that for all $a,b\in\mathbb R$, s.t. $a<b$ the function $f$ is monotone on $[a,b]$. But may be it's enough to say that it's monotone on all $\mathbb R$. What do you think ?


Short story in book collection about war machines and armies out of control

I read in an anthology book in 1975. It starts with two people watching a “robot” plane glide high and then dive into an opening of a factory causing a massive explosion. I’m not sure but I think the people may have orchestrated the attack on purpose to get the robot armies fighting each other in the hope that it would diminish robot army capabilities and bring them under control. The robot wars did occur, but at the end of the story the people discover a tube sticking out of the ground that is periodically shooting something into the air. Nearby they find a canister that did not get launched out of the “cannon” successfully and it was broken open. After close examination they discover tiny “ants” on the canister that are actually tiny robots which are rebuilding the robot war factories. The robots have adapted and will keep trying to fulfill their mission. This story may  have been in a booked edited by Roger Elwood, but I cannot guarantee it.


Finite subgroups of orthogonal transformations in $\mathbb{R}^3$

The group of orthogonal transformations of $\mathbb{R}^3$ is direct product of the group of rotations and the group $Z=\langle x\mapsto -x\rangle\cong \mathbb{Z}/2$. The finite subgroups of group of rotations are well known: rotational symmetries of regular polyhedrons.   These subgroups, along with their direct product with $Z$ will give some (families) of finite groups of orthogonal transformations.  It looks that some finite groups of orthogonal transformations need not be of this form (see Shafarevich- Algebra I; I couldn't understand arguments there).  How do we cover all finite subgroups of orthogonal transformations?  A more general question in this context may be: How to get subgroups of $H\times K$ knowing subgroups of $H$ and $K$?


Prove that if $X$ is and infinite set and $Y$ is countable or finite, then $|X \cup Y| = |X|$

Let $X$ be an infinite set and $Y$ a finite or countable set. Prove that $|X \cup Y| = |X|$.   The form to prove this is by finding a bijection between both sets $X \cup Y$ and $X$. I got a hint to use the property that every infinite set has a finite or countable subset. My problem is how to define this bijection. Any ideas?


Is $\sqrt{2}\in{\Bbb Z}[\sqrt{2}+\sqrt{3}]$ true?

Motivated by the positive answer to the following question:      I'm curious about whether ${\Bbb Z}[\sqrt{2}+\sqrt{3}]=\Bbb{Z}[\sqrt{2},\sqrt{3}]$ is also true, where ${\Bbb Z}[\alpha]$ denotes the smallest subring of ${\Bbb C}$ which contains $\alpha\in{\Bbb C}$. It suffices to know whether $\sqrt{2}\in{\Bbb Z}[\sqrt{2}+\sqrt{3}]$ is true or not. With some manipulation one can get $$ 2\sqrt{2}\in {\Bbb Z}[\sqrt{2}+\sqrt{3}].  $$ It seems no hope to get $f(x)\in\Bbb{Z}[x]$ such that $$ f(\sqrt{2}+\sqrt{3})=\sqrt{2}, $$ which is equivalent to $\sqrt{2}\in{\Bbb Z}[\sqrt{2}+\sqrt{3}]$. But I don't have a proof. How should I go on?


Currently I have laptop with 16GB of RAM and 512GB SSD. I always use "full encrypted disk" option in installation creator which automatically create 16GB swap partition. Now I want to buy laptop with 32GB of RAM and I guess creator will try to make 32GB swap partition. Do I really need such big partition for occasional hibernation? I mean, does it really dump whole 32GB into swap or only real used memory which often will be much much less? Can I reduce swap partition size after installation? I have also vm.swappiness=1 instead of default 60  I'm reading that ubuntu 18.04 has option for swap file instead of partition so maybe I should wait for KDE Neon LTS based on 18.04 (current release which I'm using, is still on 16.04)


Here is my main. All I am trying to do is create an object of the class file, this is probably a very noobish question so sorry, just need to know what I'm doing wrong.  #include <iostream> #include "Player.h"  using std::cout; using std::cin;  int main() {     cout << "Hello and welcome to the student adventures game.\n";      Player player1(); }


Copying a Shapefile without affecting the original?

I have a layer in ArcMap 10.2 that is one big shape made up of five smaller shapes. I need to create a layer with only four of those shapes, for the purpose of showing the difference in areas when the fifth shape is not included.  I've noticed that a simple copy and paste of the original shapefile back into the Table of Contents is not a good idea as any changes I seem to make to the new layer also affect the original layer.  Is there a simple way to go about doing this? If it's relevant/useful I have the free version of XTools Pro.


Salesforce lightning get current users username

How I would go about getting the current users username or first and last name?  I have been looking at this for the last couple of hours - I was just wondering how I would go about getting their name and then displaying it on the page.  For example the current user is 'John Smith' and in the lightning component I want to output John Smith's name like:     Welcome to our community John Smith!


So I have a plane and leaf which I used as a hair particle. But the leaf is passing through the plane. What should I do?   Enabling or disabling rotation doesn't change anything.    These are the leaves used as collection     No rigid body or collision is set up since I don't know how to set that up. The leaves are stationary and no animation is made with the leaves...


Writing ISO 19139 compliant XML metadata from spreadsheet?

I am looking at a way to migrate the metadata from a spreadsheet into ISO 19139 compliant XML metadata documents for a collection of shapefiles. I can parse the data out of the spreadsheet into strings without issue however I am getting lost on how to take those strings and use them to populate the elements.   This example:  covers most of what I want to do, however I would need to generate the tree beforehand based on the ISO 19139 schema. PyXB seems to have schema bundles for OpenGIS but I would like some insight on how to connect everything.


Is the antecedent of a relative pronoun in a prepositional 'of' phrase a matter of choice?For example,

The bag of books that was found belongs to me. The bag of books that talk about history belong to me.   Thanks


How to add X/Y data from Excel file (saved as CSV) on shapefile?

I need to add my X/Y coordinate data as points from my Excel I need help with adding points (using X/Y coordinates). Can anyone help?   import arcpy    from arcpy import env  env.workspace = "C:/myFolder" env.overwriteOutput = True out_path = "C:/myFolder"  out_name = "X_Y_Points.shp" geometry_type = "MULTIPOINT" has_m = "DISABLED" has_z = "DISABLED"


Wording of "at least [n] reputation points to post images" is misleading

I wanted to post a picture with my question on Stack Overflow, but an error message came up saying "You need at least 10 reputation points to post images" yet I have exactly 10 rep.  Is this a bug or am I misinterpreting the error message?  It says "at least" therefore doesn't that mean my rep has to be >= 10? not >10?


Dealing with columns while placing a figure at the top of next page

I am using ACM template and having problem while placing the figure at the top of next page. I read threads here, but still instead of placing the figure at the top of whole page it only places it at the top of next column.     I am using following commands:      I want it to be like this:     But it happens to be like this:


Schengen Visa Refusal: Justification for the purpose and conditions of the intended stay was not reliable

Schengen refusal formulae can be difficult to understand sometimes.  Sometimes an applicant receives a refusal with:       Justification for the purpose and conditions of the intended stay was not reliable.     often accompanied by:       Your intention to leave the territory of the Member States before the expiry of the visa applied for could not be ascertained.   What is meant by this refusal reason?  What are they trying to say?


Publish SharePoint Provider Hosted app to office store

Can I publish SharePoint Provider Hosted app to office store?  I can't publish autohosted app to office store


How to get rid of OTA software update notification?

I upgraded my Nexus 4 to Lollipop a few days ago but I don't like it. I'll leave out my reasons because they're not relevant here. I wiped my phone and installed a clean stock 4.2.2 version instead. I'm happy with this.  Not long after, Android automatically downloaded the 4.3 upgrade and notifies me with the choices "Later" and "Install". I don't want to do this upgrade.  How do I:   get rid of the notification, and  remove the downloaded update (to free up precious storage space).     I have already tried choosing "Later" but the same notification immediately reappears.    Based on Google search results, I also tried going to Settings > Apps > All > Google Services Framework and unticked "show notifications" but it still appears. Force stop or disable also doesn't seem to help, so I've re-enabled the service including notifications. I didn't see any other apps in this list that sounded relevant - did I just not see it?


Is it possible to do remote capture on a Canon DSLR?

Is it possible to do remote capture on a Canon EOS DSLR?  I have an infra-red remote, but when I connect the camera to the PC via USB I only get the option to download pictures from it.  I'm a pretty proficient Windows user, currently on XP, Vista or Win7 depending on which machine I use.  The laptop is Win7, so any information with a bias in that direction would be most appreciated. :)


If $G$ be a group of order $8$ and $x$ be a element of order $4$. Prove that $x^2 \in Z(G)$

Now as $x$ is of order $4$ and it generates $H=\langle x\rangle$ a cyclic subgroup of $G$ of order $4$, hence index of $H$ in $G$ is $2$.  So $H=\langle x\rangle$ is normal in $G$.  Now $gH=Hg $, for all $g$ in $G$.  => $g(x^2)=(x^2)g\:$ (since  $x^2$ is an element of $H$), for all $g$ in $G$.  Hence $x^2 \in Z(G)$.  This was my approach. (I think that I am wrong in here, $g(x^2)=(x^2)g$) Please, correct me wherever necessary. And if you could provide a better solution, please do.


Staying more than ninety days in Andorra, San Marino, Monaco, Vatican, …

It’s possible (not always convenient) to enter Monaco from the Mediterranean, but getting into Andorra, San Marino, or Vatican City requires going through a Schengen country.  Is it possible (and legal) to skirt the Schengen 90/180 rule by proving (for example) that thirty of your one hundred days were spent within one or more of the micro-states?  How much/what kind of proof would be needed?  Seems an entry/exit stamp would not be persuasive, since I could ask for a stamp, enter, and then promptly leave without a stamp.


Procedure for reducing the degrees of freedom of an arbitrary system

I'm trying to understand how it's possible to always reduce the degrees of freedom of a system represented by $n$ coordinates $q_{i}$ for which holds $f(q_{1},...,q_{n})=0.$  For example, let's consider the system represented by $x+\cos y=5$. How can i show that this system has only 1 degree of freedom?


What's the schematic to share one crystal with two micros?

How do I share a single crystal (not a complete oscillator module) between two micros? Is it OK to just connect everything as normal for the first micro and also directly connect its XO to the XI of the second microcontroller? I expect to place the micros very close together on the board.


How did Stack Exchange bootstrap its reputation system?

Is the birth of Stack Exchange documented somewhere? How did the system trust users in the very beginning before there were any users with any reputation?


The likelihood of being an accountant vs being an accountant and a plumber

This is a very interesting word problem that I came across in an old textbook of mine. So I know it's got something to do with probability, but other than that, the textbook gave no hints really and I'm really not sure about how to approach it. Probability has always given me headaches but in fact, I've been racking my head over it so long that I've got a huge headache. Any guidance hints or help would be truly greatly appreciated.  "Last week, the heat in my apartment crapped out because my water heater broke. I went to a person, showed him the water heater and asked him to fix it." Ignoring the practicality side of this problem and instead focusing on the math probability side of it, Is this person more likely:  An accountant  OR  An accountant and a plumber?


Implementing friend (available in C++) functionality in Java

Ok, let's leave the debate of whether friendship breaks encapsulation, and actually try elegantly come up with a coherent design. It is a two fold function:  1) General question on how to implement:     public class A     {       friend class B;    }   2) Why do I need this functionality? Some of my classes implement Serializable interface. However, I want to make Serializable methods protected in the Derived class so that I don't expose them to a client (as well as in the documentation -- javadoc). However, internal classes should be able to access them. What is the General way to solve this problem in java?  Note: I am using friendship as defined in the current C++ standard.  Thanks


If $y^y=x$, can $y$ be expressed as a function of $x$?

If $y^y=x$, can y be expressed as a function of x?  Specifically, I am finding the solution to a PDE where the most general solution is $u=t^{-\frac{1}{2}} f(x,t)$ and  $$\LARGE f^f=Ce^{\frac{-x}{2\sqrt{t}}} $$ Any help will be appreciated!


Attempt to invoke virtual method void android.widget.ImageView.startAnimation on a null object reference

I want when a user clicks on "ans_three_btn_one" button than a dialog appears and in that dialogbox, I want to implement rorate animation on sunburst imageview. The only problem in this code is "sunburst.startAnimation". If I remove this line then code work properly but no animation. With this line of code my app crashing. Appreciate If you help me.      public class GamePlay extends AppCompatActivity implements View.OnClickListener    {      Button ans_three_btn_one;     @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_game_play);          ans_three_btn_one = findViewById(R.id.ans_three_first_btn);         ans_three_btn_one.setOnClickListener(this);     }      @Override     public void onClick(View v) {         Dialog first_prize_dialog = new Dialog(this,android.R.style.Theme_Black_NoTitleBar_Fullscreen);         first_prize_dialog.setContentView(R.layout.activity_first_prize);         first_prize_dialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent);         first_prize_dialog.show();          ImageView sunbrust = findViewById(R.id.sunbrust_img);         //----Error area start ---         sunbrust.startAnimation(AnimationUtils.loadAnimation(v.getContext(),R.anim.rotate));         //----Error area end ---     }     java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ImageView.startAnimation(android.view.animation.Animation)' on a null object reference  Application terminated.


How to convert a JSON requestBody of the RestRequest to a Map of Strings?

A type of the body is JSON Blob in a form of:  {"key1":"val1";"key2":"val2"}  I wanted to convert it into a Map<String, String>. Do I have to manually deserialize it or there's a class which can handle that?


JavaScript object assignment: unexpected behaviour

Suppose we have two objects:  var a = { foo: { bar: 1 } } var b = { foo: { bar: 2 } }   If I set the object b to a (a = b), I expect that a takes the value of b, not the reference. So, in this case:  a = b a.foo.bar = 3 console.log(b.foo.bar);   I expect that the last console.log shows 2, not 3. Why? Just because I changed a property related to a, not to b.   I can't understand why JavaScript also changes the b property and how to avoid this unexpected behaviour.  How to avoid this behaviour? Should I assign object to variables in a different way?


Not sure if this is possible and I just didn't read well enough but a not operator in search might be helpful.  For Example:  [android] studio is:question ![android-studio] To exclude questions with the tag android-studio but with results with studio in the body  [android] android studio is:question ![android-studio] or to find questions about android studio but without the correct tag.


Permanently deleting trashed files after 30 days

Gmail has a nice feature that permanently deletes e-mails after they've been in the Trash folder for 30 days. This is pretty clever, because if I don't need a trashed message back after 30 days it's very likely that I won't ever need it again.  I want to do the same for my Trash folder in OS X to make the best use of my disk space. Is there an easy way to automatically delete trashed files after 30 days?  Meta note: I don't think this is a duplicate of  because there the trigger is "disk space drops below X GB" and the effect is "the entire Trash folder is emptied". I only want to autodelete files older than 30 days.


List being reassigned new values when not explicitly told to do so

I am writing a program that dose many math computations that eventually make a list of points to plot.  I does so over several iterations and gets one point per iteration, and then uses the new point for the next iteration in the code.  The list conditions_old holds the values from the last iteration.  The list conditions_new are the new points that are found after an iteration is finished.  At the end of the code, the lists are set equal to each other: conditions_old = conditions_new.  This is the only time conditions_old is assigned a value except for the initial conditions that are used to start the calculations.  With all that said, here is the problem I'm having:  conditions_old = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]  kCompute = conditions_old[:]  for i in range(3):     for j in range(3):         print("conditions_old BEFORE: ", conditions_old[i][j])         kCompute[i][j] = (conditions_old[i][j] + (1/4))  # This is where things get fishy.         print("conditions_old AFTER: ", conditions_old[i][j])         print("kCompute: ", kCompute[i][j])   This is a small portion of my code.  What happens is that the list conditions_old will acquire the values of kCompute once that calculation has been made.  My question is this; why is conditions_old acquiring the the new value of kCompute?  Also, how do you fix this problem?  I've  seen python do some odd things before, but this is something I never expected to run into.  I'm currently using python 3.4 on Yosemite


I am getting month and its weekno like 1,2,3,4,5 . I want ISO week from it.  Eg. I have April as month and week no 4. I want weekno 16 as output.  Thanks in advance.


I tried installing Ubuntu with Windows, and when I restarted my computer there was no Windows. And so I decided to reinstall windows and such, it won't let me. I want to go back to windows badly.....


Is there any way to know the algebraic multiplicity of the $0$ eigenvalue in the minimal polynomial when the rank is $1$?

Say I have a matrix $A$ of $r=rank(A)=1$  I know that in the characteristic polynomial the algebraic multiplicity of $(\lambda-0)$ is $n-r$ which in my case is $n-1$  Is there a rule about the algebraic multiplicity in the minimal polynomial in this case or in the general case?


Sign convention of force due to universal law of gravitation

when is the force due to gravitation positive and when negative? i.e.  $$ F=+\frac{GMm}{r^2} ~~\mbox{or} ~~ F = -\frac{GMm}{r^2}. $$  we know that GPE $U=-\int F\cdot dr$, here $F$ will be $+GMm/r^2$ or $-GMm/r^2$  and if so why?


Breakout Collision: Detecting the side of collision

I am writing a breakout clone (my first game) and am totally stuck as to how I figure out which side of the brick was hit.  I have a collision detection method that looks like this:  DetectCollision(Object a, Object b)     x = distance(a.x, b.x);    y = distance(a.y, b.y);     if (x is smaller than the combined width &  y is smaller is than combined height {        return true;    } return false;     This works totally fine, but I need to know the side of the collision, and location relative to the center in order to respond properly.  I've spent the past few days snooping around but am lost.


I use WinEdt Build 20131031 (v. 8.1) 64-bit with Windows 7 and MikTeX. My slides have been made with the seminar package and contain a lot of eps files. I compile the tex document in the following order: LaTeX -> dvips -> ps2pdf.  My problem is that I want to turn off the autorotate in ps2pdf. Otherwise a number of slides that contain the eps plots are incorrectly rotated. How can I do this with WinEdt?  By the way, I already tried to write "-dAutoRotatePages=/None" into Options -> Execution Modes -> ps2pdf -> Executable -> Switches, but without success.


Find three polynomials whose squares sum up to $x^4 + y^4 + x^2 + y^2$

Prove that $$p(x,y) = x^4 + y^4 + x^2 + y^2$$ can be written as a sum of squares of three polynomials over $x,y$ for real numbers.


When I'm watching a film in Mythtv the screen turns to black every 10 - 15 mins and I have to log back into Ubuntu. Very annoying!  How do I disable the black screen / screensaver / logout in Unity?  There no longer seems to be any options to turn the screen saver off as there were in Ubuntu prior to Unity.


Writing $\left(\mathbf Z/2\oplus\mathbf Z/4\oplus\mathbf Z/8\right)\oplus\left(\mathbf Z/9\oplus\mathbf Z/27\right)$ in a different way

Writing $\left(\mathbf Z\big/2\oplus\mathbf Z\big/4\oplus\mathbf Z\big/8\right)\oplus\left(\mathbf Z\big/9\oplus\mathbf Z\big/27\right)$ in a different way   If $M$ is equal to above how can I find the ideals,(of course of the form $m\mathbf Z$) $I_1,\dots I_n$ such that $I_1\supset I_2\supset \dots I_n$ and $M\simeq\mathbf Z\big/I_1\oplus\dots\oplus\mathbf Z\big /I_n$  (there should be only $1$ way of selecting such ideals, but I don't know how)


Windows 10 , SSD Drive is not full but shows red bar

I've split my SSD to 2 drives, one of them has 44GB and Windows 10 shows the red bar in Computer section and notify me to check the storage.    but when I'm getting the properties of all files and folders , I used only 27% of 44GB.    Is there a problem with my SSD or the bug of Windows ?


If I know that $b$ is a multiple of $32$ then how can i show that $b+5$ and $b^2 + 7$ are coprime?

I'm using the polynomial division method and i got a remainder of 32 but how do I explain in words or mathematically how this justifies my solution.  The previous question has answers based on Properties of Divisibility but I want to know how I can use long polynomial division in my method.  Thanks


Any idea of why my viewport preview of the simulation stops at 250 frames? (as you can see on the orange line on the timeline)  Am I maybe missing any kind of configuration?..  It's a rigid body simulation.. e.thing works fine but the preview freezes at 250 frames.... No keyframes on the simulation, only on the colliding object that has an infinite loop rotation.....    Is it maybe because of motion paths setting?  It is set on 300......       Update:  Problem solved! I missed this tab of configurations!!


I have a canvas element defined statically in the html with a width and height. If I attempt to use JavaScript to resize it dynamically (setting a new width and height - either on the attributes of the canvas or via the style properties) I get the following error in Firefox:     uncaught exception: [Exception... "Illegal operation on WrappedNative prototype object"  nsresult: "0x8057000c (NS_ERROR_XPC_BAD_OP_ON_WN_PROTO)"  location: "JS frame :: file:///home/russh/Desktop/test.html :: onclick :: line 1"  data: no]   Is it possible to resize this element or do I have to destroy it and create a new element on the fly?


RecordMyDesktop doesn't work. Suggestions for a screen recorders for my game console?

Please. I need a new screen recorder so I can record my emulated games. (PS1, SNES) Please suggest me ones that are simple and require no hard to understand sudo code.


Copy maintenance plans to a different server

Is there a way to copy maintenance plans from one SQL Server 2012 to another? Both servers are not accessible via the same copy of Management Studio at the same time (on different networks).


Is it possible to delete a board in Trello? I see how to pin or unpin it, or add it to an organization. Best I can come up with is remove everyone else from it and set it to member visibility. Guess I could create a dummy user to assign deleted boards too.


is anyone able to tell me what i am doing wrong? The problem is that "ramdom1" is not being added to the array.(nothing is showing up in the text_loot)  Any help would  be great, thanks.  var lootArray = [].join("<br>");  lootArray.add("ramdom1");  document.getElementById("text_loot").innerHTML = lootArray;


How to get homepage div container of wordpress website to display full width?

I'm looking to have the home page main content section full width 100% and all other pages with sidebar at 75%.   I have a homepage template set up, what can I add to the homepage template  (page-home.php) so that only that page displays 100% in the main content section

          <?php         /* Run the loop to output the page.          * If you want to overload this in a child theme then include a file          * called loop-page.php and that will be used instead.          */         get_template_part( 'loop', 'page' );         ?>

      The website is vistahomeimprovement.com


For a prime number $p \neq 11$, do we have $p = x^2 + xy + 3y^2$ for some $x$, $y \in \mathbb{Z}$ if and only if $p \equiv 1, 3, 4, 5, 9$ mod $11$?  An example where this is true:$$5 = 1^2 + 1 \times 1 + 3 \times 1^2.$$I know that $\mathbb{Z}[(1 + \sqrt{-11})/2]$ is a PID.


What is the password to the keypad in the secret office in sister location?

There is a keypad in the secret office. In the secret office is 2 doors, 1 vent, 3 tv's, 1 poster, and 1 keypad.


How find this limit $\lim_{n\to\infty}\underbrace{\sin{\sin{\cdots\sin{x}}}}_{n},x\in R$

Find this limit $$\lim_{n\to\infty}\underbrace{\sin{\sin{\cdots\sin{x}}}}_{n},x\in R$$  My idea: let  $$f(x)=\underbrace{\sin{\sin{\cdots\sin{x}}}}_{n}$$ then $$f(x+2\pi)=f(x)$$,so we only consider $x\in[0,2\pi]$, so define sequence $a_{n}$ such $$a_{1}=\sin{x},a_{n+1}=\sin{a_{n}}$$  so I think we can Discussion of x.can you someone have methods?  other idea: $$|a_{n+2}-a_{n+1}|=|\sin{a_{n+1}}-\sin{a_{n}}|\le |a_{n+1}-a_{n}|$$


Die tossing - comparing probabilities between players

If 2 players toss a fair die, one tosses it 999 times and the other tosses it 1000 times, what is the probability that one gets more even numbers than the other? It's clearly comparing binomial distributions but I'm not sure how to do it.


The standard normal distribution vs the t-distribution

Given an IID normally distributed sample $X_1,...,X_n$ for $n$ small with mean $\mu$, standard deviation $\sigma$, sample mean $\overline{X}$ and sample standard deviation $s$ (the unbiased estimator form).  I understand that  $$\frac{\overline{X} - \mu}{\frac{\sigma}{\sqrt{n}}} \sim N(0,1),$$  but I'm having trouble reconciling this with the fact that  $$\frac{\overline{X} - \mu}{\frac{s}{\sqrt{n}}} \sim t_{n-1}.$$  Since the $t$-distribution is like the standard normal distribution but with a higher variance (smaller peak and fatter tails), this would seem to suggest that the sample standard deviation $s$ systematically underestimates the population standard deviation, making it in fact a biased estimator.


Test statistic for follow up procedure (stepwise step down) of Kruskal Wallis

When conducting a Kruskall Wallis test, it is possible to follow up the procedure with a post hoc test, looking for homogeneous subsets. My question is which statistic is used to perform this procedure (e.g., is it Chi-Square, z, or the original H)?


I have this method that calculates some statistics: public void calculateAverage(int hour){      if (hour != 20) {         int data =0;          int times = 0;         for (CallQueue cq : queues) {             data += cq.getCallsByTime().get(hour);             times++;         }                averageData.add((double)data/times);         calculateAverage(hour + 1);     }      }  Now I am very proud that I have created a recursive method but I know that this could have been solved with a loop. My question is: is it better to solve these kind of problems recursive or with a loop?


How to iterate more than 10 directories using "for dir in equil[0123]"?

for dir in equil[0123] could iterate over folders of equil0, equil1,equil2 and equil3. But if I have folders with name number more than 10, e.g. equil23, how to properly refer to them? How the separator is recognised in equil[0123]?


Let $G$ be a group and $H$ is subgroup of $G$.Prove that there not exists subgroup $S$ of $G$ such that $S$ not equal with $G$ and $G-H \subseteq S$ I try to prove with contradiction and $(G-H)⋃ H\subseteq (S⋃H)$, so $G \subseteq (S⋃H)$ and $G$ is a group, but I'm more concerned with how I can derive


resolv.conf + is it necessary to defined the domain in resolv.conf

We have a DNS server at 103.16.36.88 that resolves all hosts and IP addresses.   more /etc/resolv.conf # Generated by NetworkManager search Jupiter.com nameserver 103.16.36.88 domain Jupiter.com   But I am not sure if we need to defined also the:  domain Jupiter.com   because the domain name already set in the DNS server.  So in that case can we unset the domain Jupiter.com, from /etc/resolv.conf?


Position an element relative to its container

I'm trying to create a horizontal 100% stacked bar graph using HTML and CSS. I'd like to create the bars using DIVs with background colors and percentage widths depending on the values I want to graph. I also want to have a grid lines to mark an arbitrary position along the graph.  In my experimentation, I've already gotten the bars to stack horizontally by assigning the CSS property float: left. However, I'd like to avoid that, as it really seems to mess with the layout in confusing ways. Also, the grid lines don't seem to work very well when the bars are floated.  I think that CSS positioning should be able to handle this, but I don't yet know how to do it. I want to be able to specify the position of several elements relative to the top-left corner of their container. I run into this sort of issue regularly (even outside of this particular graph project), so I'd like a method that's:   Cross-browser (ideally without too many browser hacks) Runs in Quirks mode As clear/clean as possible, to facilitate customizations Done without JavaScript if possible.


A friend gave me this integral and I am having nightmares since. The integral looks like:  $$\int_0^\infty \frac{\ln(1+x-\sqrt{2x})}{1+x^2}\ \mathrm dx$$  Mathematica gives a solution of $0$ but any procedure to get the result eludes me. I found a messy solution with substitutions and by parts( which I will probably add in an edit later because it's too messy to even write ).  A better ( preferably quicker ) solution using any method ( differentiation under integral sign, complex analysis, vector calculus etc ) would be rather helpful. Any input is appreciated!


Windows 7 - programs won't run, weird chinese signs

I've been asked by my parent's to help them with their computer (windows 7) today, but I'm afraid I ran out of ideas. It could be a virus, but they had the latest Kaspersky AntyVirus installed on their computer, and I'm pretty sure they weren't browsing any suspicious russian webisites in their free time.  The PC boots without errors, but after that, basically everything stops working.   I cannot open any .exe file - not only Internet browser, AntiVirus and all the other "basic" programs, but also regedit or cmd, and even Task Manager.  Also, in the bottom right part of the screen when you can usually see most of the programs running in the background, like AntiVirus, wi-fi printer etc. there is only 1 icon, some weird blue logo with chinese signs as a description (according to google, it's the logo of Tencent).   All the other programs that should be opened after launching the pc aren't there, and what's more - the internet is also turned off, even though the router is right next to the desk.  I'm sure the system isn't completely frozen - I can see the mouse and browse through directories, but besides that, nothing works.   Is there anything I can do, besides reinstalling the entire OS?


Determine whether $712! + 1$ is a prime number or not

Let $n = 712! + 1$ If $n$ was a prime number then, by Wilson's theorem:  $ (712!)! \equiv -1 \pmod{712}$  The double factorial makes it seriously more difficult...  But We can require:  $$712!! + 1 \equiv 0 \pmod{712}$$  $$712 = 2\cdot 356$$   Hence: $712!! = 2^{356} 356!$  Lets compute: $356! \pmod{712}$. Obviously:  $$356! = (356 \cdot 2) \cdot (355!/2)  = 712 \cdot 355!/2$$  Then: $356! \pmod{712} \equiv 0$.   Now, $2^{356} \pmod{712}$  $2^{356} = 2^{6 + 350}$  Nevermind, what should I do?


What is the basis behind default installed applications?

well there are many packages and applications installed by default in Ubuntu, which some relate to old choices made by Canonical like using Unity and stuff like that. But I'm wondering about the decision when they select an specific software over other similar ones to be installed by default on the OS, for example transmission.   So is there any explanation by Canonical over these kinds of decisions and selections? Are these decisions more about system stability and performance rather than popularity?


Do any methods exist whereby a "hash" can be embedded in the "document" it hashes?  What I mean is this. Say I have a given plaintext T. I wonder if there is a method to craft (i.e. not discover as a fluke) a "document" D being some combination  (e.g. a concatenation) of T and a hashvalue h, where h is H(D), H being some hash function.  Perhaps a simpler way of phrasing this is: Is there any way to make a document contain its own hash, under the constraint that the document must, apart from its own hash, contain a given plaintext?  Is this possible in theory? In practice?   This question is somewhat different from , in that I am assuming a given plaintext T, whereas that question asks if any T can be crafted (or found).


How do I handle a PC trying to assassinate another?

I have a situation in which one PC is sitting on top of a roof with a rifle (which I've house ruled as having stats of a repeating crossbow) and there is another PC approaching the building. He wants to literally snipe the other guy in the head as he approaches. Assuming the attack roll hits, is there any way this could be ruled as a 1-hit kill? The player is completely concealed and hidden and all that.  Any advice would be greatly appreciated, I know 4th edition isn't super pvp friendly.


I use terminal for almost all tasks. Let's say I have entered a huge command like this:  sudo a-huge-command   What is the easiest way to delete the whole command with a single shortcut, rather than keep on hitting backspace key?  I'm a Ubuntu newbie looking to use Ubuntu in a professional way.


How does one integrate  $$\int \dfrac{du}{(a^2 + u^2)^{3/2}}\  ?$$  The table of integrals here:   Gives it as: $$\frac{u}{a^2 ( a^2 + u^2)^{1/2}}\ .$$  I'm getting back into calculus and very rusty. I'd like to be comfortable with some of the proofs behind various fundamental "Table of Integrals" integrals.  Looking at it, the substitution rule seems like the method of choice. What is the strategy here for choosing a substitution? It has a form similar to many trigonometric integrals, but the final result seems to suggest that they're not necessary in this case.


Lost Password, Problems with Downloading anything except simple thingls like word documents, prsentations and pictures

I lost my password for my Ubuntu account. I recently moved here from XP and have no idea what to do. I'm an youtuber and need a recording software.The account with my password was the administrator account. The other account I cannot download anything. I cannot open software manager.


Why is my texture projecting onto other objects?

Alright, so let me start off with I'm fairly new to blender, so this may just be an error on my part for not using a certain setting or something.    My problem is that my texture is semi-appearing on the walls of a box I'm making. At 500 samples:   In the 500 sample one it's not as major of an issue, but at lower samples it is. Whenever I changed the textured floor to just a plain pink diffuse bsdf, the problem still occurs.   In the first picture I used an image texture plugged into a velvet and glossy shader which is plugged into a mixed shader. In the second picture just a pink diffuse bsdf is used.  Edit: I should've asked how to stop this from happening, not why.


I just get a black screen remoting (RDP) into Windows 8 box

When I remote into my Windows 8 desktop with Windows 7 it works fine but when try with Windows 8 I get an empty screen after it connects. Keyboard commands work despite the screen being black; I can open Explorer etc. using them and they persist when I reconnect with Windows 7.  Any ideas on what is wrong?


Proof of theorem on Poisson distribution

Can someone help prove this theorem? Many thanks!  If $p\to0$ and $n\to\infty$ in such a way that $\lim np = \lambda > 0$, then for  $k=0, 1,\dots$: $$\lim_{n\to\infty}\binom nkp^k (1-p)^{n-k}=\frac{\lambda^k}{k!} e^{-\lambda}$$


What's the difference between `ifconfig`, `interfaces`, `ifup` and `ifdown`?

I'm somewhat new to network interfaces and I'm confused with the difference between the 4 terms. I've seen the related question here: , but this discusses the difference between all of the above and NetworkManager. I'm looking for something more specific between the 4 terms above.  I know that interfaces refers to the file at /etc/network/interfaces but all I see there is the lo interface. I would assume that I would see wlan0 and eth0 over there as well, as when I call ifconfig. I also know that the lo interfaces is activated by ifup -a at boot time.  Looking forward to your explanations.


How to run my own program without specifying its path

Let's suppose I have compiled something and I run it like so:  $ /path/to/my/executable/mycmd Hello World   What do I need to do to run it like   $ mycmd Hello World    from everywhere in my computer?


How can I tell if a question has been shared?

If you look at the edit history of a question (ie ), you can see if that question has been shared. However, if the question has not been edited then I don't see a way of finding out if it has been shared.   Is there an alternative way of seeing if a question has been shared?


How do I remove/uninstall a program that I have complied from source?

How do I remove a program that I have compiled from source using the ./configure; make; make install method?  Does it matter whether I have kept the original directory that the source was stored in or not?


Understanding Android app data storage areas

Android stores some application data in non-volatile memory that can be accessed without needing root privileges. Android stores other application data in non-volatile memory that can only be accessed with root privileges. What is the correct terminology to use to describe each of those storage areas, and what determines in which location an app stores its data?


Should the first word after a colon be capitalized? Which of the following is correct?   For example: This. For example: this.


SharePoint 2013 group list task and subtask via the rest api not working

I am trying to fetch task and sub-task from a list via the rest api and display the in a page.  here is my html:

Get Site List via REST API Call
    here is my call:  function getListData() {      var fullUrl = "siteurl/_api/web/lists/getbytitle('Tasks')/items?$select=*,ParentID/Id&$expand=ParentID";      $.ajax({         url: fullUrl,         type: "GET",         headers: {             "accept": "application/json;odata=verbose",         "content-type": "application/json;odata=verbose",         },         success: onQuerySucceeded,         error: onQueryFailed     }); }  function onQuerySucceeded(data) {     var mainTasks = [];     var subTasks = [];     for(var i = 0; i < data.length; i++) {         if(data[i].ParentID.Id) {             subTasks.push(data[i]);         } else {             mainTasks.push(data[i]);        }     }      $("#divTaskItems").html(mainTasks);       $("#divSubTaskItems").html(subTasks); }  function onQueryFailed() {     console.log('Error!'); }   The only thing that displays on my page is the  tag.  Thanks in advance.


UK visit visa: What documents prove genuine relationship with the visitor?

In the UK immigration rules for visitor visa  it states if;      Funds, maintenance and accommodation provided by a third party      V 4.3 A visitor’s travel, maintenance and accommodation may be   provided by a third party where the decision maker is satisfied that   they:      (a) have a genuine professional or personal relationship with the   visitor;and      (b) are not, or will not be, in breach of UK immigration laws at the   time of decision or the visitor’s entry to the UK; and      (c) can and will provide support to the visitor for the intended   duration of their stay.   I'm a UK  citizen. I'm planning to invite my brother-in-law and another close friend to the UK. In my invitation letter, I have clearly mentioned that I'm going to provide them accommodation only. They have prove sufficient funds to support themselves. I have sent them an invitation letter along with a copy of my passport and tenant agreement.   What other documents do I need to provide to indicate that it is a genuine professional or personal relationship with the visitor?


Evaluate the limit: $$ \lim_{n \to \infty}e^{-n}\sum_{k = 0}^n \frac{n^k}{k!} $$ It is not as easy as it seems and the answer is definitely not 1.  Please help in solving it.


Which sentences are correct?        1- The cover of book is green.   2- The cover of the book is green.   3- A cover of book is green.   4- A cover of a book is green.      When should we use a or the?


optimization with ellipsoidal constraints

I'm reading a paper recently and encounter a optimization equation which I can't understand: $\max_{x\in\{x|x^TPx\le1\}} c^Tx =(cP^{-1}c^T)^{1/2} $ where $P\succ0$   Anybody knows why the result is $(cP^{-1}c^T)^{1/2}  $?


Contradiction in the fact that magnetic fields do zero work

Consider a metallic rod hung by two springs (symmetrically), a magnetic field exists out of the plane of our system. At t = 0, we switch on a battery which produces current in wire (left to right in the rod) so now, a force of magnetic origin acts on the rod to pull it down and extend the springs thus magnetic force appears to do work in this case.  So is the fact that magnetic forces don't do work incorrect? Because I don't think that some other force can do work on the system  Assume the rod and springs to be massless.


Will an object orbiting a non-rotating mass with a layer of water on it cause two bulges of water on opposite sides of it?

Imagine a non-rotating spherical mass with a sea on its surface (somewhat like the earth, except for the rotating part). Around this mass is circling an object with a much smaller mass, but nevertheless big enough to exert a gravitational force on the non-rotating spherical mass. Will, in this case, two bulges of water develop on opposite places of the mass with the water on it (the line between the two bulges aligned with the line connecting the two masses)?   Because the gravity of the mass circulating around the mass with water, you would suspect that all the water on the big mass is drawn towards one side, so no two bulges will develop. Or am I wrong? Does the fact that the big mass revolves around the CM of the two masses influence the movement of the water?


Where to ask buying questions about peripherals?

Is it even OK to ask such questions? If it is, should I ask these on  or somewhere else?  For example I need a suggestion about good sound speakers that have quite long cables (for some specific reasons)?


Elementary proof for $\sqrt{p_{n+1}} \notin \mathbb{Q}(\sqrt{p_1}, \sqrt{p_2}, \ldots, \sqrt{p_n})$ where $p_i$ are different prime numbers.

Take $p_1, p_2, \ldots, p_n, p_{n+1}$ be $n+1$ prime numbers in $\mathbb{P} \subseteq \mathbb{N}$. $\sqrt{p_{n+1}} \notin \mathbb{Q}(\sqrt{p_1}, \sqrt{p_2}, \ldots, \sqrt{p_n})$ seems to be quite clear, but still need a proof. I know some proofs are involved with Galois theory, which is not I want.


I want to put a 2D image on a 3D object in Blender. How do I do that?  I have found the "textures" tab in the "properties" window, but I can't figure out what to do with it.  Preferably, I would like to click and drag an image off my desktop right onto the object.


I'm searching for a book, video documentary, or any other source of information to learn Quantum Physics from the beginning. I know almost nothing on physics, so I guess I would need the basics first. And although I can't skip the math, what I'm seeking is more on the theoretical part.   Also I'd love to know how history on this goes. I mean, what Plank did, Einstein, Schrodinger... Things the way they happened.  But of course, anything helps.


Can "casted" be the past tense of "cast"?

'The Hindu,' an Indian daily, :     Leader of Opposition in Rajya Sabha Arun Jaitely casted his vote at Chimanbhai Patel Institute opposite Karnavati club.   Does the verb cast have a form as casted?


Non constant analytic function from $\{z\in\mathbb{C}:z\neq 0\}$ to $\{z\in\mathbb{C}:|z|>1\}.$

Does there is non constant analytic function from  $\{z\in\mathbb{C}:z\neq 0\}$ to $\{z\in\mathbb{C}:|z|>1\}?$ According to me there is no such  non constant analytic function because if there is any such function say $f,$ then $f$ can have  either a pole or essential singularity at $z=0$. In the case of pole Picard's theorem of meromoprphic function will work and in the case of essential singularity we know that image of  any neighbourhood of essential singularity  is dense in $\mathbb{C}$, so in both of the cases we get a contradiction. So no such non constant analytic function. Am i right? Please suggest me. Thanks.


There are a lot of factors with drop rates in Borderlands 2, I was wondering: Does the drop rate for legendary items (or any better colored item) increase when in TVHM or in UVHM?   And if it does increase, would say, all four players in a game have the Vault Hunter's Relic, would it it's 5% chance of dropping rare items stack? Increasing the already increased drop rates when in harder modes?


20 month old boy quit staying in his bed at bedtime

My son has been in a big boy bed since 14 months. He started jumping out of his crib at will and it scared us a little, so we got the big boy bed and were amazed! He loved it. He never got out at bedtime he was so proud of getting to sleep in his bed.   Two weeks ago, when he learned how to open his bedroom door the game has changed. He will come open his door (with baby locks on them) and run out laughing. I can put him back 100 times he will keep doing it. I have held his door closed physically for 40 min and he never gave up, even when I know he is so extremely tired. Before this, he was never difficult to get to sleep for the night.    This is making me very frustrated, and it's starting to hurt my feelings.  Why is he doing this, and what can I do to solve this problem?  I'm not sure if it's because he knows he can get out of the room or what changed. When he does go to sleep FINALLY he sleeps all night and doesn't wake up.


(Unity) Proper way to save ScriptableObjects changed during play mode?

I was wondering what the "correct" way to save scriptable objects in Unity that are changed during Play mode. So far I have something that works:      // changes     PartyMember Lalala = PartyMemberDictionary.Find("Lalala");     Lalala.HP += 17;     print("Lalala's HP: " + Lalala.HP);     // then saves     AssetDatabase.Refresh();     EditorUtility.SetDirty(Lalala);     AssetDatabase.SaveAssets();   Note: Lalala is a direct reference to a PartyMember scriptable object in my Assets/Resources folder.   I'm still a little shaky on this approach, however. I got this directly from reading this question:     But the commentator did not explain what each of these three lines of code mean.      AssetDatabase.Refresh();     EditorUtility.SetDirty(Lalala);     AssetDatabase.SaveAssets();   Can someone explain these to me? I'm not sure I understand them fully. I assume "dirty" indicates that data changed; please correct me if I'm wrong.  In this link    it asserts that SaveAssets() saves all unchanged asset changes to disk, so why do I need the other Refresh and SetDirty Functions?  In this link    The OP says "as I found out after some trial and error AssetDatabase.SaveAssets doesn't actually save the asset as expected." ... so confused at this point. That leaves me hesitant to continue until I understand what's going on. Perhaps the Refresh and SetDirty cement the job?  Also, in this link    it mentioned that Undo.RecordObject is preferred. Based on your experiences, is this true? Is EditorUtility.SetDirty(); obsolete in this day and age already? I don't want to use it if I have to change my code in the future.  At the end of the day I simply want something that works.


Right circular cone shortest distance question from a junior high school st.

Ant's shortest distance that it can travel      Can you show me the answer in the cone unfolded. I would be glad if you guys can show me the solution in a simple way because I am a high school student.


Mailmerge alternatives for exam variations?

I need to make 10 different versions of a test for a very large cohort of students.  I could use mailmerge for this, but I wonder if there are any alternatives which might suit my needs better?  For example, test 1 might have  \int_0^1 x e^{x^2}\,dx   and test 2 (for the same question) might have  \int_{\pi/6}^{\pi/2}x\cos(x^2)\,dx   and so on.  Clearly I would need to set up some sort of external file containing all the variations, and have that read into the main file, to produce the different tests.  What is the best way of doing this?


How was I able to remove a root owned file without sudo

I had the following output for ls -lFh:  -rw-r--r-- 1 hjpotter92 hjpotter92  926 Aug  2 18:40 static.yaml drwxr-xr-x 5 hjpotter92 hjpotter92 4.0K Sep 12 19:40 templates/ -rw-r--r-- 1 root       root       1.5K Sep 12 20:09 xyz   I am logged in as hjpotter92. My user does not have a NOPASSWD entry in sudoers list. Can someone explain the behaviour when I tried the following:  $ which rm rm: aliased to rm -i $ rm xyz rm: remove write-protected regular file 'xyz'? y $ sudo rm xyz rm: cannot remove 'xyz': No such file or directory $ ls -lFh total 176K <a lot of other files> -rw-r--r-- 1 hjpotter92 hjpotter92  926 Aug  2 18:40 static.yaml drwxr-xr-x 5 hjpotter92 hjpotter92 4.0K Sep 12 19:40 templates/


Where is the OpenLayers plugin in QGIS 2.6?

I have just installed QGIS 2.6 and have installed the OpenLayers plugin. It lists the OpenLayers plugin in the installed tab, however, I can't add a layer to my project as it does not give the option to add an OpenLayers layer as previous versions do.  Does anyone know what is going wrong here?


How can I achieve Geocoding with the JavaScript OpenLayers API, in the same fashion as the Google Maps API?


I came across a sentence in my advanced book:  "Mobile phones are a public nuisance and should be banned."  I am aware of the structure "The mobile phone is a ~" Where the is used to refer to all mobile phones. Is the meaning of the second sentence the same?


Why does & work instead of &; for forks in 1 line bash loop

If you write a 1 line shell script that forks a process, like the following: for i in {1..1000};do ./binary & done It runs, you don't need a semicolon, and if you try to use a semicolon it throws a syntax error. In a normal loop, without forking, you need the semicolon for it to work in a 1 line script. Why does the fork operator change how this works?


A while ago, I DMed a battle royale one shot for my players. I gave my players level 20 characters and let them fight each other till there was one person standing. Near the end of this game a situation occurred between me and one of my players. I wasn't sure what the appropriate ruling was in this situation, so I chose one that made sense to me and continued on. The player accepted it, but I still feel my players argument were somewhat legitimate.  The situation  During the game, one of the other players cast a wish spell. This player asked for "A powerful magical blizzard that covered the battlefield". Since the wish spell states that the DM has great latitude in ruling what occurs in such an instance and one of my players had to leave the game soon, I decided to not hold back on my players and take stats from the  for this blizzard.  I took the following modification from the spell and made the all players do checks for it after each round of combat.     Each creature must make a Dexterity saving throw. A creature takes 20d6  damage on a failed save, or half as much damage on a successful one.   The arguments  The Ranger in my game asked me if he could use  to halve any damage from the blizzard. He thought he could since the blizzard was created by a wish spell and that could be seen as an attack.  My ruling was, the snow storm was targeted at the battlefield and not directly at him, so there was no case of an attacker hitting him. It was a blizzard being a blizzard, there just happened to be a Ranger in it.  Was this situation handled correctly? Or is there something that I might have overlooked?


Determining if two resistors are in series or in parallel.

I know that this is a rather trivial question, but I've been having issues developing a problem-solving strategy for figuring out whether resistors are in parallel or in series. The Specific problem is in the photo.  Is there a strategy towards problems like this? Or is it that I just don't understand the definition of series and parallel?


bash: can't set a variable to a solid string

I cannot set a variable with a whole command-string as following:  A="/bin/ps wwwaux"  for a in $A do   echo "$a" done   It assigns array instead of solid string someway.  My environment:  GNU/Linux, GNU bash, version 3.2.51(1)-release (x86_64-suse-linux-gnu)


$z_1,z_2,z_3 \in \mathbb{C}$ Prove that $z_1^2+z_2^2+z_3^2=z_1z_2+z_1z_3+z_2z_3$ is true iff $z_1,z_2,z_3$ are points of a equilateral triangle.(not necessarily in the coordinate begining)  Ive proved for example that $|z_1|=|z_2|=|z_3|$ and $z_1+z_2+z_3$ that mean that these numbers are points of a equilateral triangle in the coordinate begining, using some trig identities, but this one I really don't know how to go about doing.


How to attach to a running jar and debug it?

I have written an old app long time ago on another computer. This one does not exist anymore - and with it all the source is gone - but I still have the app in form of jar files.  Now I need to check my old code what I have done in a particular place in code. I know I can create a java from it - but I need to check it while it's running...  I have tried javasnoop - but it can not attach. It keeps trying but forever - other apps I can attach to and debug.  is there any other way/tool that can attach to a running jar and debug it?  If that makes a difference: the application is being started with an EXE file and then uses the jar libs...  Thanks


Merging different resolution DEMs in ArcMap?

I have 4 DEMs I would like to merge/mosaic together into 1 - each have a different cell size. I am using ArcMap 10.6.1  Things to note:  - All have 1 band  - There is 1m, 2m, 5m & 10m DEMs  - There are no overlaps between the DEMs  I have tried to use the "Moasic to new Raster" tool but got a "999999" error.


Replace Wordpress' default post edit pages with custom pages

I have the following problem: When I want to edit the content of posts, Wordpress simply opens its standard page editor where I can add and arrange blocks, control the general page design and what not. That page editor comes with tons of controls and in my case also all kinds of additional parameter areas for various plugins (like Yoast SEO and Content Egg etc). Only among others can I edit the post content (text) there. What I would like Wordpress to do is to open a custom page where I can just edit the post content (text) and submit the changed text back to the underlying database. So how would I go about directing Wordpress to opening some custom page I have created where I can simply edit the post content, without all the editing facilities of Wordpress around? The custom post editing page would probably a form with a message field where I can edit and submit the post content. How exactly would I need to build that form so that the (edited) post content is stored back into the database when I click on the form's submit button?


How to capture ordered STDOUT/STDERR and add timestamp/prefixes?

I have explored almost    , to no avail.  Let me describe the problem in detail:  I run some unattended scripts and these can produce standard output and standard error lines, I want to capture them in their precise order as displayed by a terminal emulator and then add a prefix like "STDERR: " and "STDOUT: " to them.  I have tried using pipes and even epoll-based approach on them, to no avail. I think solution is in pty usage, although I am no master at that. I have also peeked into the source code of , but that has not been much productive.   Ideally I would use  instead of Bash to accomplish this, but I have not been able to. Seems like pipes automatically forbid keeping a correct lines order because of buffering.  Has somebody been able to do something similar? Or it is just impossible? I think that if a terminal emulator can do it, then it's not - maybe by creating a small C program handling the PTY(s) differently?  Ideally I would use asynchronous input to read these 2 streams (STDOUT and STDERR) and then re-print them second my needs, but order of input is crucial!  NOTE: I am aware of  but it does not work for me with Bash scripts and cannot be easily edited to add a prefix (since it basically wraps plenty of syscalls).  Update: added below two gists       (sub-second random delays can be added in the sample script I provided for a proof of consistent results)  Update: solution to this question would also solve , as @Gilles pointed out. However I have come to the conclusion that it's not possible to do what asked here and there. When using 2>&1 both streams are correctly merged at the pty/pipe level, but to use the streams separately and in correct order one should indeed use the approach of  that involves syscall hooking and can be seen as dirty in many ways.  I will be eager to update this question if somebody can disprove the above.


How to parse ISO8601 dates with linux date command

I'm trying to use the date command to generate a file timestamp that the date command itself can interpret.  However, the date command does not seem to like its own output, and I am not sure how to work around this.  Case in point:  sh-4.2$ date Fri Jan  3 14:22:19 PST 2014 sh-4.2$ date +%Y%m%dT%H%M 20140103T1422 sh-4.2$ date -d "20140103T1422" Thu Jan  2 23:22:00 PST 2014   date appears to be interpreting the string with an offset of 15 hours.  Are there any known workarounds for this?  Edit: this is not an issue of display:  sh-4.2$ date +%s 1388791096 sh-4.2$ date +%Y%m%dT%H%M 20140103T1518 sh-4.2$ date -d 20140103T1518 +%s 1388737080 sh-4.2$ python Python 3.3.3 (default, Nov 26 2013, 13:33:18)  [GCC 4.8.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> 1388737080 - 1388791096 -54016 >>> 54016/3600 15.004444444444445 >>>    It's still off by 15 hours when displayed as a unix timestamp.    EDIT #1  Maybe I should pose this question a little differently.  Say I have a list of ISO8601 basic timestamps of the form:   YYYYMMDDThhmm YYYYMMDDThhmmss   What is the simplest way to convert them to the corresponding Unix timestamps?   For example:  - 20140103T1422   = 1388787720 - 20140103T142233 = 1388787753


US 30 day Visa requirements from Indonesia?

So my girlfriend is from Indonesia, and according to her she went to a US embassy some years ago before we even met and tried to visit the US on a vacation. They gave her a list of documents to bring like a birth certificate, proof of where she was employed, etc and that she had to have $10,000 in her bank account to prove she could support herself for the trip.  There's a noticeable difference in the value of USD and IDR so she of course didn't have enough at the time and they rejected her application. I'm wondering however if she could prove other means of financial stability for her trip. Maybe prove she's dating a US citizen and that I'll be accommodating her.  After Googling I didn't find anything about a required bank balance or anything like it. So I'm not sure where to look.  Any info would be very much appreciated, thanks.


Proof question: Show there is no homomorphism from $\Bbb Z_{16} \oplus \Bbb Z_{2}$ onto $\Bbb Z_4 \oplus \Bbb Z_4$

Prove that there is no surjective homomorphism from $\Bbb Z_{16} \oplus \Bbb Z_{2}$ onto $\Bbb Z_4 \oplus \Bbb Z_4$.  The book I'm reading starts off the proof with:  Suppose $\phi$ is such a homomorphism between the two groups, then $f: \Bbb Z_{16} \oplus \Bbb Z_{2} / \ker \phi \rightarrow \phi(\Bbb Z_{16} \oplus \Bbb Z_{2})$ is an isomorphism.  Therefore $\ker \phi = \langle (8,1) \rangle, \langle (0,1 \rangle),$ or $\langle (8,0)\rangle$.  How does the isomorphism imply that this is what the kernel equals?


regex doesn't match python end of string

I am trying to capture some text in a string shown below  testdir1\testdir1\textfile.vhd  I want to capture the file extension plus the dot and i am using the regex  [.vhd]{4}$  This seems to work on regex101    but when i actually implement this in python it doesn't  import re result = re.match(r'[.vhd]{4}$',"testdir1\\testdir1\\textfile.vhd") print(result)  None   I am assuming that the regex is essentially working but i am calling the python match function wrong???  any help would be appreciated.


80's/90's sci-fi movie about passengers on a ship crewed/commanded by people in sealed environments

I'm trying to identify a sci-fi movie I saw in the late 80's to early 90's, for some reason I want to say it was on Cinemax.   The highlights I can recall:   The story focused on passengers on a large starship; Opening of the film was some type of facility or star port that featured a massive dome that was opening to either allow a ship/shuttle to land or launch (not positive about this, I just recall early in the film some time of massive dome opening up and passengers all gathering there); Ship was mostly automated, only crew were a mother and a son who survived in isolated environments (immunologically compromised or somehow modified so they couldn't be around normal humans); At one point the crew-son is in a sealed suit/pod and is helping a female passenger in a space suit travel along scaffolding; The crew-son is protecting/helping the passengers against his mother.    For some reason it reminded me of The Ship Who Sang series, except that it's a movie.


How do I run a script at startup? (tried several methods but nothing worked)

I have a script in a folder:  /home/ubuntu/jasperreports-server-cp-6.3.0/ctlscript.sh   I need this script to run every time the server starts. Usually the server shuts down on Friday evenings and starts on Monday morning. What do I need to do in order to make this happen?.  How I manually start the script:  I will ssh to the server, and then go to this location /home/ubuntu/jasperreports-server-cp-6.3.0  and then run ./ctlscript.sh* start command manually.  But I am unable to start this script at the server start on Monday automatically.   I tried using rc.local , and also creating a script in /etc/init.d, I did follow this but it didn't work either .  Does anyone have any other suggestions? Or is my procedure wrong?


I'm trying to loop through an array of EditText id's to get all of their texts and add them to a single message. I understand how NullPointers work, but I cannot understand how temp and temp2 are NullPointers if I'm initializing them just as I have before, just this time it is in a loop. This is the error I get:  Process: com.example.brandon.netflixcalculator, PID: 6369 java.lang.NullPointerException: Attempt to invoke virtual method 'android.text.Editable android.widget.EditText.getText()' on a null object reference at com.example.brandon.netflixcalculator.Exact_Activity.getInfo(Exact_Activity.java:152) at com.example.brandon.netflixcalculator.Exact_Activity.updateFile(Exact_Activity.java:125) at com.example.brandon.netflixcalculator.Exact_Activity$Listener.onClick(Exact_Activity.java:76) at android.view.View.performClick(View.java:5254) at android.view.View$PerformClick.run(View.java:21179) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:6895) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)   Here is the method:  int[] editTextIds = {R.id.editTextMon, R.id.editTextTues, R.id.editTextWed, R.id.editTextThurs, R.id.editTextFri, R.id.editTextSat, R.id.editTextSun}; int[] spinnerIds = {R.id.spinnerMon, R.id.spinnerTues, R.id.spinnerWed, R.id.spinnerThurs, R.id.spinnerFri,        R.id.spinnerSat, R.id.spinnerSun};   public String getInfo(){     String msg = "";     StringBuffer sb = new StringBuffer();     for(int i = 0; i < editTextIds.length; i++){         EditText temp = (EditText)findViewById(editTextIds[i]);         Spinner temp2 = (Spinner)findViewById(spinnerIds[i]);         sb.append(temp.getText().toString());         sb.append(".");         sb.append(temp2.getSelectedItem().toString());         sb.append("\n");     }     msg = sb.toString();     return msg; }   Here is my layout. Each of the days of the week is its own fragment, so here is Monday's (they are all the same besides the id's of each component):  <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.example.brandon.netflixcalculator.Monday" style="@style/Main">  <!-- TODO: Update blank fragment layout -->  <LinearLayout     android:orientation="vertical"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:layout_gravity="center_horizontal|top">      <EditText         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:id="@+id/editTextMon"         android:layout_gravity="center_horizontal"         android:background="@drawable/apptheme_edit_text_holo_light"         android:hint="Average number of available viewing minutes on Monday"         android:numeric="integer"         android:layout_marginTop="15dp" />      <TextView         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:textAppearance="?android:attr/textAppearanceLarge"         android:text="Probability of above viewing time on Monday"         android:id="@+id/textView"         android:layout_gravity="center_horizontal"         android:textAlignment="center"         android:layout_marginTop="15dp" />      <Spinner         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:id="@+id/spinnerMon"         android:layout_gravity="center_horizontal"         android:layout_marginTop="15dp" /> </LinearLayout>


Clarification regarding Drinker's paradox

This is the informal proof of      The proof begins by recognising it is true that either everyone in the   pub is drinking (in this particular round of drinks), or at least one   person in the pub isn't drinking.      On the one hand, suppose everyone is drinking. For any particular   person, it can't be wrong to say that if that particular person is   drinking, then everyone in the pub is drinking — because everyone is   drinking.      Suppose, on the other hand, at least one person isn't drinking. For   that particular person, it still can't be wrong to say that if that   particular person is drinking, then everyone in the pub is drinking —   because that person is, in fact, not drinking.   I can agree with the first case of the proof. But how is the second case true ? How can they apply material implication in the second case when the material conditional itself has not been proved yet or given to us ?


Should we `enable` the User Systemd service `pulseaudio.service`?

I just realized there is a /usr/lib/systemd/user/pulseaudio.service provided by the pulseaudio package. It is disabled but pulseaudio works completely fine without. Have been using it for a year. Don't need to do anything after boot to start the actual executable. It's an Ubuntu shipped-in package after all. Why is it so ? Should I enable the service ? If so, why doesn't Ubuntu do this by default ? Also, what will change from current operation ? Thanks in advance PS: The ubuntu wiki page doesn't give any information.


I have encountered following function in C# code:  Byte[] GetUNIXTimeStamp(DateTime dtVal) {   if (m_bytTimeStamp == null) m_bytTimeStamp = new Byte[14];    Byte[] bytVals = BitConverter.GetBytes((UInt16)dtVal.Day);   m_bytTimeStamp[0] = bytVals[0];   m_bytTimeStamp[1] = bytVals[1];   bytVals = BitConverter.GetBytes((UInt16)dtVal.Month);   m_bytTimeStamp[2] = bytVals[0];   m_bytTimeStamp[3] = bytVals[1];   bytVals = BitConverter.GetBytes((UInt16)dtVal.Year);   m_bytTimeStamp[4] = bytVals[0];   m_bytTimeStamp[5] = bytVals[1];   bytVals = BitConverter.GetBytes((UInt16)dtVal.Hour);   m_bytTimeStamp[6] = bytVals[0];   m_bytTimeStamp[7] = bytVals[1];   bytVals = BitConverter.GetBytes((UInt16)dtVal.Minute);   m_bytTimeStamp[8] = bytVals[0];   m_bytTimeStamp[9] = bytVals[1];   bytVals = BitConverter.GetBytes((UInt16)dtVal.Second);   m_bytTimeStamp[10] = bytVals[0];   m_bytTimeStamp[11] = bytVals[1];   bytVals = BitConverter.GetBytes((UInt16)dtVal.Millisecond);   m_bytTimeStamp[12] = bytVals[0];   m_bytTimeStamp[13] = bytVals[1];    return m_bytTimeStamp; }   …and just wondering if there is some shortest and cleanest way to achieve the same effect?


Every once in a while I'll come across the sneaky devils and they always flee.  What determines when they flee (time, distance, etc.) and do I get better loot by killing them faster?  Is there anything else I should know in order to get the most out of the encounter?  EDIT: What I mean is: Is the final drop better based on how effectively I defeat them?


How to hide “all traffic” when plotting rows in Google Analytics?

I would like to look at my referral traffic over time on a per domain-basis in Google Analytics. This is what I have done:   Set New visits as advanced segment  Navigated to traffic-sources -> Referrals Checked a couple of domains Clicked plot rows   The individual domains now show up in the graph, but the problem is that "all traffic" is also visible. All traffic is much bigger than the graphs for individual domains. This makes it very hard to see any changes as they look all values are Zero.  Is there any way to hide "Visits" from the graph in order to zoom in on the vertical axis?


Use VPN connection only for selected applications

I have access to a VPN and want to use it only for some applications, not all.  For example: If I connect to a VPN I want only the applications Opera and Newsbin to use that VPN connection. All other applications, like f.e. Outlook, should use the normal internet connection (while the VPN is connected/open).  Afaik this isn't possible, but I'm not totally sure. So therefore my question: is it doable?


Any hints or answers to figure out the unknown value of C?

Evaluate $$ \int_{1}^{\infty} \left(\frac{1}{\,\sqrt{\, x^{2} + 4\,}\,} - \frac{C}{x + 2}\right)\,\mathrm{d}x $$  I am stuck at this question where I should find the value of C for which the integral converges and evaluate the integral for this value of C. Any hints or answers ??.


Why is deposit interest rate in the same currency different from country to country?

My bank offers 11% interest rate for 1-year deposit in USD. This is similar to what other Ukrainian banks offer but much higher in comparison with our neighboring countries, Belarus (3.5%) and Poland (1.8%). In the US it seems to be even lower at .2%.  Why is it so different from country to country? Is it all about the risk? I believe this rate was the same even before the war.


How do I get rid of the ugly selection boxes around the desktop icons in ubuntu 20.04?

It used to be so that the icon shape itself was the selection area in 18.04 and you also had the option of not snapping the icons to grid, all of that seems to be gone now in 20.04. Could someone please help with that? I've included a snapshot of the problem .


What can I do if the game disconnects while a Pokemon is being caught?

Sometimes when attempting to capture a Pokémon, the mon will be wiggling in the ball and the app will disconnect from servers (for mobile connection reasons or whatever), and I'll be left staring at a ball containing Schrodinger's Pokémon. I'll sigh at the loss (or in the case of a 500CP Pinsir, scream in agony), and reload the game.  I thought maybe encounters in general couldn't handle disconnecting well, but sometimes immediately after a Pokémon broke free of a ball, the little icon in the upper left would appear, the game would stall for a bit, but it would recover.   Is there anything I can do to avoid this? Should I be waiting it out, instead of reloading?  (and before anyone says it, yes I have filed a bug report)


I entered Europe with a USA passport on May 3rd for a 90-day stay. I am wondering what exact date I have to leave Europe. How do I determine my exact cut off date?


How to overwrite and print the values in console in java

Here is one while loop that will iterate 11 times.  public static void main(String[] args) {             int count=0;         while(count<=10){                    System.out.print(count);             count++;         }        }   & the output will be definitely : 012345678910  But I want to display the same output in such a way that every iteration will overwrite the previous value while printing the value on console.   Here's the restriction is : We can not use file.  clearing the console on every iteration can be one of the ways, is there anything left we can do?


Triple noun, plural and ownership apostrophe

Been asked to write "x is good for your Customer's vehicle interior". I feel this should be "Customers' vehicle interiors" but am spinning in circles on it. Can you help break the stalemate in my head?!


Uncountable number of mutually disjoint countable sets in $\mathbb R$

Does there exist countable/uncountable number of mutually disjoint subsets of $\mathbb R$, each of which is countable and dense in $\mathbb R$?  For finite number, I am able to choose irrationals say, $r_n=\sqrt2-\frac1n$, and get the finite number of mutually disjoint sets as the rationals in $s_1=(-\infty,r_1),s_2=(r_1,r_2),\dots$ But how is such a thing possible for countable/uncountable irrationals because they can not be arranged in increasing order? Is there any other way of doing this? Is the answer to this question in the affirmative? Please help.


Difference between @RemoteAction annotation and ?

Can someone tell me the difference between these VF tags... in brief?


I have table of content in my document and header/footer with section, subsection marks.  When I include tocloft package I don't have header/footer anymore, that is not I want. On the other hand, I want to control spacing in the toc.  Another problem is that the toc leave a subsection mark in a header/footer.  MWE  \documentclass[12pt]{article}  \usepackage{lipsum} \usepackage{fancyhdr} %\usepackage{tocloft} % Uncomment this line  % ----------------------------------------------------------------------------- \pagestyle{fancy} \fancyhf{} % clear all header and footers \renewcommand{\sectionmark}[1]{\markboth{\thesection\ #1}{}} \renewcommand{\subsectionmark}[1]{\markright{\thesubsection\ #1}} \fancyhead[L]{\rule[-0.25in]{0pt}{0.25in}\parbox{0.9\textwidth}{%   \textbf{\leftmark\\\rightmark}}} \fancyhead[R]{\thepage} \fancyfoot[L]{\rule[-0.25in]{0pt}{0.25in}\parbox{0.9\textwidth}{%   \textbf{\leftmark\\\rightmark}}} \fancyfoot[R]{ \thepage} \renewcommand{\headrulewidth}{0.4pt} \renewcommand{\footrulewidth}{0.4pt}  \begin{document} \tableofcontents \section{Section1} \lipsum[4-8] \newpage \section*{Section2} \lipsum[4-8] \newpage \section{Section3} \lipsum[4-8] \section*{Section4} \lipsum[4-8] \end{document}


Alternative definition of hyperbolic cosine without relying on exponential function

Ordinary trigonometric functions are defined independently of exponential function, and then shown to be related to it by Euler's formula.   Can one define hyperbolic cosine so that the formula $$\cosh{x}=\dfrac{e^x+e^{-x}}{2}$$ becomes something to be proven?


What does the text on the Gate of Truth mean?

In FMA Brotherhood we can see a lot of text on the Gate of Truth. What does the text mean? I'm especially interested to find out what "Corona" on the top means.


Can you sacrifice a creature you block with to fulfill Annihilator?

Lets say someone is blocking an Eldrazi with annihilator. Can they sacrifice a creature they blocked with to count as one of the things sacrifice with annihilator?


Could I take environment variables across the files.  Could I set env. variable in one file, and get it in another?  For example.  first.py  import  os os.environ["FOO"] = "1"   second.py  import os  print os.environ['FOO']


I need a bootable DVD to install a desktop from scratch. The default 16.04 distribution .iso is not bootable. Where could I find an bootable image that has files shown in following web page?


$G$ be a group and $H,K$ are two normal subgroups of $G$, then $H\cong K$ if and only if $G/H\cong G/K$ (True/False)

I know that $H\cong K$ may not imply $G/H\cong G/K$ as a counter-example take $G=\Bbb{Z}$, $H=2\Bbb{Z}$ and $K=3\Bbb{Z}$, $G/H=\Bbb{Z}_2\ncong\Bbb{Z}_3=G/K$. But I cannot get whether $G/H\cong G/K$ implies $H\cong K$. Can anybody help me in this regard? Thanks for the assistance in advance.


Limit of the recurrence $b_{n+1}=\sqrt{2+b_n}$ with $b_1=\sqrt{2}$.

I was given the following exercise as homework: find the limit of $b_{n+1} = \sqrt{2 + b_n}$, $b_1 = \sqrt{2}$, with a hint that $b_n < 2 \forall n \in \mathbb{N}$. I have proven that $b_n$ is strictly monotonically increasing and strictly bounded above by $2$ by using induction over $\mathbb{N}$ (which means that it has a limit, by the monotone convergence principle). However, now I need to prove that  $$2 = \text{sup}\{b_n : b \in \mathbb{N}\}$$  In order to prove that the limit is indeed $2$. By definition, I would only have to prove that $\forall \epsilon > 0 \exists n \in \mathbb{N} : 2 - \epsilon < b_n$, which is intuitively true, but I have been so far unable to prove it.  Any hints will be appreciated.


What is the different between force push and normal push in git

I want to know what is the different between force push and normal push and at what kind of situations i should do force push in git?Is it a good practice to do force push into master branch?


I'm trying to find the concave hull of a lat, lon pointset but when I project my points on my map it doesn't look like expected. I've tried a lineare projection and a spherical projection. My data is about 10000-70000 lat lon pairs. How is this possible?  $mapWidth    = 2000; $mapHeight   = 2000; $mapLonDelta = $mapLonRight - $mapLonLeft; $mapLatDelta = $mapLatTop - $mapLatBottom;  $worldMapWidth=(($mapWidth/$mapLonDelta)*360)/(2*M_PI); $f=min(max(sin($mapLatBottom*(M_PI/180)),-0.9999),0.9999); $mapOffsetY=$worldMapWidth/2 * log((1+$f)/(1-$f)); $f=min(max(sin($mapLatTop*(M_PI/180)),-0.9999),0.9999); $mapOffsetTopY=$worldMapWidth/2 * log((1+$f)/(1-$f)); $mapHeightNew=$mapOffsetTopY-$mapOffsetY; $mapRatioH=$mapHeight/$mapHeightNew; $newWidth=$mapWidth*($mapHeightNew/$mapHeight); $mapRatioW=$mapWidth/$newWidth;  $tx = ($lon - $mapLonLeft) * ($newWidth/$mapLonDelta)*$mapRatioW; $f = sin($lat*M_PI/180); $ty = ($mapHeightNew-(($worldMapWidth/2 * log((1+$f)/(1-$f)))-$mapOffsetY));   This should look like Germany. What's wrong?:    Update: It seems to work. This is a map of Bonn(Germany):


Kinetic Energy of Electrons vs Current in the Photoelectric Effect

Consider a setup of an experiment to measure the photoelectric effect. We have a photodiode which is linked to an ammeter and a source of voltage which can apply voltage in either direction. Let the light shone onto the photodiode be such that the energy of photons exceeds the work function of the metal and a current is observed to flow when the voltage is set to zero.  I understand that when a reverse voltage is applied - one that opposes the flow of electrons through the diode - eventually a stage is reached when the kinetic energy of even the most energetic electrons cannot overcome the potential energy attracting the electron back in the direction it came, and no current flows because no electrons reach the other side of the diode.  However, what I don't understand is that when a voltage is applied in the same direction as the electrons, the current does not increase. However, it looks to me as if the current is dependent on the kinetic energies of the electrons, because when the kinetic energy of the electrons is restricted by a reverse voltage, the current drops.  I like to compare this to an analogy of an object being thrown off a high place. The gravitational force at the top of the cliff depends on the height, and a change in height could be compared to a change in voltage - they both lead to a change in the potential energy of the object/electron. The initial velocity of the object when it is thrown downwards is analogous to the initial kinetic energy on the electron created by the photoelectric effect. It remains constant, no matter from what height you throw the object.  With this analogy in mind, it looks to me as if it does not matter what height you throw the object down from - it will always have the same kinetic energy when it hits the bottom. This is obviously incorrect in mechanics, but seems to be the case in the photoelectric effect.  What is going on here?


I need to evaluate a mathmatical expression that is presented to me as a string in C#.  Example noddy but gets the point across that the string as the expression.  I need the evaluate to then populate an int.  There is no Eval() in C# like in others langugaes...  String myString = "3*4";   Edit:  I am on VS2008   Tried the Microsoft.JScript. = Its deprecated method (but still complies - warning)  However the Microsoft.JScript dll that I have doens work on      public object InvokeMember(string   name, BindingFlags invokeAttr, Binder   binder, object target, object[] args);   Complains that there is a missing ";"  go figure...  EDIT 2  Solution - was the codeDom one - it worked for as there are no security issue - only me ever going to be running the code.  Many thanks for the replies ...  And the link to the new Dragon Book  awesome   EDIT 3  Matt dataTable.Compute() also works - even better for the security conscious.  (parameter checking noted)


It's been 14 in-game days and he hasn't re-spawned. I died at the Wall of Flesh and I don't get the debuff when I go into Hell so the WoF isn't the problem.  I checked all the skylands, my old houses, and the default spawn point; I went the East and West ends.  There isn't a goblin invasion going on.  So I'm clueless as to what's happening.  I just want to get into Hardmode, but I can't because the dang Guide isn't spawning.  The house I made for him is suitable. 2 doors, 2 torches, table, chair, walls 6 high 10 wide.  I've been standing at the East end of the map for him to spawn, but nope. Any suggestions on what I need to/can do for this bug would be appreciated.


Getting hostname of the computer connected to the ssh session

As part of our deployment script for one of our apps I'm trying to log the date, time, and other relevant information for the deployment.  The way we have it set up, developers use a generic "app" account to perform deployments, so logging the user wouldn't be particularly helpful.  Would it be possible to get the hostname of the machine that connected to the SSH session?


What is a very descriptive and easy to understand description between git fetch and git pull? When is it better to git fetch vs git pull?

I am somewhat new to git any advice would be appreciated. Even a link to learn a more in depth free video/course practice could be useful to me here.


Changing environment variables for a specific program Ubuntu 20.04, Gurps GCS using Java

I'm using a program to make GURPS characters (this is a game basically like D&D, with a lot more flexibility) created and run over here:  It's made in Java, and currently, when I open it, it renders all of the text invisible unless I click on an option. (See the screenshot.) Corresponding with the developer, he's saying that the dark theme I'm using is contributing to the unreadable quality. I can confirm this after playing with that option! There is a theme option in the program, but nothing in those options controls the basic presentation of text in selection. They also suggested opening GCS with a different environment variable setting, but I'm not sure what to change. I've investigated the option but most of what I've found involves changing the entire desktop environment, not just the variables for one program. I would love to know how to change the environment options just for this program!


How to Extend Ubuntu 18.04 Manually Configured Disk?

I have Ubuntu 18.04 server, I have 30 GB of space on my ext4 type manual disk, I want to add another 20 gb. How can I achieve this?    I did not add a separate disk, I expanded the existing disk.