Turicreate iOS Image Similarity

Question: I have been following the Turicreate tutorial link here
I am able to train a model successfully as per instructions. I am also able to consume the model in the iOS app with the help of the code provided over there. But I am not able to figure out how could I get the most similar actual images based on the distances this model returns. Also when I run it on iPhone, it returns me offset and element which I am not able to interpret. Please see the screenshot.

My aim in the iOS application is to input an image, pass that input image to the model and then show the actual output 5 or 10 most similar images and not just the distances.
Comment: \[From [a non-answer](https://stackoverflow.com/a/50419212/3476191) posted by [computerstaat](https://stackoverflow.com/users/1530648/computerstaat)\]: "Please provide your code associated with your question. Also you should be receiving a reference label that can be used to look up your image."
Answer: Be sure that you have an id column or have added the id column to your SFrame using:
reference_data = reference_data.add_row_number()

Here is a code snippet to create the image_similarity model and get the ten most similar images for a sample image. I use fifty as a k value to demonstrate that how to pull out the n most similar from a larger group in your similarity graph.
similarity_graph = model.similarity_graph(k=50)
similar_images = similarity_graph.edges
# pick a sample image from reference_data
sample_index = 3
sample_similar_images = similar_images[similar_images["__src_id"]==sample_index].sort("rank")
# get 10 most similar images
most_similar_ids = sample_similar_images["__dst_id"][0:10]
most_similar_images = reference_data.filter_by(most_similar_ids, "id")

For details on interpreting the distance MultiArray from the CoreML model, see the sample code in the Turi Create documentation. The element value corresponds to the distance.

Turicreate iOS Image Similarity


Can a pug (either puppy or adult) be left alone for 7 hours?

Question: I would like to buy a pug puppy in September, but I work for seven hours across the street. I could check on my pug every 5 hours and would provide with water, pee pads, crate and toys. But I don't know if this would be OK?
Please help me and offer your insight.
Comment: Put your best foot forward. When you get the dog, on the first few nights, the dog will whine/cry/making noises that draws you to them for the entire night. Do not goto them until one night they will stop this altogether. This will make your life much easier for the rest of the dog's life. I did this with my GSD, while it cried for 2 nights in a row and 3rd night, no noise at all. I left the dog for 11-12 hours a day due to work and commute. As long as you trained for the dog to pee on pads, no issues
Comment: You can also get a dog pen attached to a crate, this way your dog should never pee in the crate. Put the pee pad in the pen of course
Answer: Generally to leave any dog alone takes training them for a while to be able to be alone and be ok with it.
Start small with crate training, putting them in a crate with a treat or toy and work up from here. Progress to slightly longer absences and leave it to roam where you allow it to. Build it up say 30mins/1 hour at a time. Reward the dog every time you come back too, this reinforces that you will come back.
This builds the dogs confidence to be content alone and being able to cope. It will eventually build a routine and be ok with it.
If you don't, bored dogs, dogs with separation anxiety can become destructive without putting this groundwork in.
Answer: That would be OK as long as you each room is safe for the dog.
I would suggest securing any loose or dangling wires; and if you have house plants, keep them out of reach (some plants are toxic for dogs).
Comment: Thank you so much I will make sure my house is dog friendly before I buy a dog


how to remove white borders from an UIImageView

Question: I have an application , where I drag a circular UIImageView on top of another UIImageView , and since   a circle could never be squared ,  the white borders of the image must show , so I wonder if there is a way to remove those borders or to hide them (not by making them have the same color ).
Comment: Are you basically asking if you can turn a UIImageView into a circle, because i can give you the code for that. I just don't quite understand the question.
Answer: try to set the image.layer.borderWidth = 0
(this is the swift version)
Comment: I have tried your code , I think you forgot to put the layer property though , and the border width didn't help me
Comment: Well that was actually no real code you should take, just a suggestion. But sorry that did not work
Comment: Can you post a screenshot of your problem?
Answer: I am expecting that you are looking for image masking feature. Have a look at this tutorial and this one too. Both of them uses CoreGraphics frame functions and are really quicker in response.
Please note that it is not the Swift version but will give you atleast a starter.
Comment: Your answer did work for me , but i think it's kind of long to mask an image , actually I have found that corner radius have did the same thing but with less code, but nevertheless I have finally understood what masking means


How can you find the distance to a galaxy using right ascension and declination?

Question: For example, Galaxy NGC 3689 has the right ascension of 11:28:11 and declination of +25:39:40.0. Using these values, how can we find the distance to the galaxy? If it helps, its radial velocity is 2727 km/s.
Comment: It is not possible to do this with only RA and DEC, even if you have radial velocity. You would need the redshift, RA, and DEC to do this.
Comment: Given the redshift is 0.009136, how can we calculate the distance to the galaxy?
Answer: You can't use the RA and dec.  These tell you the direction that the galaxy is in, relative to the stars.  It is possible and normal for two galaxies to have the same (or very similar) RA and dec and be at completely different distance.
You can estimate the distance using the Hubble law $v= H_0 d$, if $v$ is measured in km/s and d is in mega-parsecs the value of H_0 is approximately 70 (measuring this value accurately is a major problem in cosmology)
So $D= 2727/70 \approx 39$ So we estimate the distance to the galaxy to be 39 million parsecs  (multiply by 3.26 to convert to millions of lightyears).  This can only be an estimate, as the actual value of $H_0$ is not know with certainty, and the galaxy can have particular motion relative to the Hubble flow (for example, Andromeda is actually blue shifted, but it isn't a negative distance from us, as this value would suggest!)
Comment: For example, if I say "London is due north"  Can you tell me how far away it is?   No!  But if I also say "It takes me an hour to drive there"  Now you can estimate the distance of London from me. Because you have a model of how fast cars travel.  Similarly we have a model of how fast galaxies move away from us at different distances, so if we can measure this (using redshift) we can estimate their distance.
Comment: So if the redshift was 0.009136, how can we use those values to calculate the distance to the galaxy?? Because I read in another answer that we can use RA, dec, and redshift to measure the distance to a galaxy.
Comment: You can convert redshift to resession velocity (v = cz is a good approximation for small values of z where relativity isn't needed.) and convert to distance by D = v/70.  This gives an estimate for the distance .  You don't use RA and dec at all.  These give direction not distance


How to add Tabs in windows phone

Question: I am new to windows phone.Is there any option to add tabs in visual studio for windows phone.In my project I have to add 3 tabs.I can't find an option for adding tabs.If any one knows please help me
Answer: Using pivot control would be more appropriate for wp7 apps.
http://msdn.microsoft.com/en-us/library/ff941123(v=vs.92).aspx is a good place to start.
To make appealing apps follow design guidelines for windows phone. http://msdn.microsoft.com/en-us/library/ff637515%28v=VS.92%29.aspx and
http://msdn.microsoft.com/en-us/library/hh202915(v=VS.92).aspx
AFAIK, there is no tab control for WP7 as it doesn't fit in with the modern Metro look.
Answer: Although tabs are not recommended by the default design guidelines, you can still use them if you really want to. Guide here.
Pivot or Panorama would be a much better choice, making the applications more consistent with the system UI.

How to add Tabs in windows phone


Salesforce Dreamforce 2014 sessions recording

Question: Can anyone please provide recording of useful dreamforce technical sessions. I know recording for Marc Benioff and some other management sessions are available. But Can anyone provide link for dreamforce technical sessions.
Answer: The Dreamforce '14 sessions are available here. Specifically, you can filter on Developer and Architect sessions. Some great sessions I attended include:

Advanced Apex Enterprise Patterns (by our very own Andrew Fawcett)
Apex Flex Queue: Batch Apex Liberated
Building Salesforce1 Mobile Apps with Angular and Node (one of my favorites)

I want to watch a bunch more, like Faster SOQL? Yes, Please.
Comment: This link has died & redirects to registration. I can still get at recordings for years I attended w/ https://success.salesforce.com/Ev_MyAgenda?eventId=[insert an ID here] but wasn't at 2014. Does anyone who was have a direct link to the video of a session referred to at https://github.com/Xtremefaith/Pardot-API-Example where the author claims to have heard that "managed packages" are good for credentials storage?  He doesn't specify which, but perhaps someone was there...  Thanks!
Answer: All session videos can be found here.


Coulomb Potential in 1+1 and 1+2 dimensions?

Question: It is know that in 1+1 dimensions, the Coulomb potential is of linear form:
$$ V(x) = Cx$$
and in 1+2 dimensions, of the form:
$$V(x,y) = - \ln\left(\frac{L}{\sqrt{x^2 + y^2}}\right).$$
And I am wondering how these results are derived? In 1+d dimensions, the equation that takes the form $\nabla \cdot \vec{E}$ results from the equation ($\nu =0$) (source free):
$$ \partial^\mu F_{\mu \nu}=0 $$
Where $F_{\mu \nu} = \partial_\mu A_\nu - \partial_\nu A_\mu$ and then we try to find a solution to the equation $\nabla V = \vec{E}$. In 1+1 dim, we can solve:
$$ \partial^\mu F_{\mu 0} = \frac{\partial E}{\partial x } = 0$$
Which gives $E= C$, $C$ a constant, and then:
$$ V(x) = \int E\:  \mathrm{d}x  = Cx$$
But in 2-d I am unsure how to get the logarithmic form of the Coulomb potential. Thanks.
Answer: You basically just use the same method you use in $3D$. Your mistake is assuming that the covariant Maxwell equation is source-free. More generally (one of) the Maxwell equations is:
$$\partial_\mu F^{\mu\nu}=-\mu_0 J^\nu$$
Some people use different conventions for the constant in front of the current. For a static point charge at the origin in $d+1$ dimensions, the current is given by
$$J^\nu = \begin{pmatrix} c q \delta^{(d)}(\textbf{x})  \\ \textbf{0}\end{pmatrix}$$
where $\delta^{(d)}$ is the $d$-dimensional delta function. We can identify the elements in the first row of $F^{\mu\nu}$ with the electric field. Therefore taking the $\nu=0$ component of the equation above, we get:
$$\nabla \cdot \textbf{E}=\frac{q}{\epsilon}\delta^{(d)}(\textbf{x})$$
where both $\nabla$ and $\textbf{E}$ have $d$ components. Assuming that $\textbf{E}$ has "spherical" symmetry, we can solve this by using the same method we used in $3+1$ dimensions, that is by integrating both expressions on the volume of a $d-1$ sphere. Using the properties of the delta function and the divergence theorem we get:
$$\textbf{E} A_{d-1}=\frac{q}{\epsilon_0} \implies \textbf{E} \propto \frac{1}{r^{d-1}}$$
where $A_{d-1}$ is the area of a $d-1$ dimensional sphere of radius $r$.
From this, we see that in $1+1$ dimensions,
$$\textbf{E} \propto 1$$
so integrating we get for the  $1+1$ dimensional Coulomb potential:
$$V\propto r$$
while in $2+1$ dimensions,
$$\textbf{E} \propto \frac{1}{r}$$
and integrating we obtain the $2+1$ dimensional Coulomb potential:
$$V \propto \log{r}$$
Answer: You can look at this problem from a different direction. Take Gauss' law
$$\int\boldsymbol{\rm E}\cdot\boldsymbol{{\rm d}S}=\frac{Q_{in}}{\varepsilon_{0}}$$
and lets try to generalize it for arbitrary number of dimensions $d$. Assuming a point charge $q$ at the origin, from symmetry considerations one has
$$\left|\boldsymbol{\rm E}\right|S_{d-1}r^{d-1}=\frac{q}{\varepsilon_{0}}$$
where $S_{d-1}r^{d-1}$ is the surface area of a $d-1$-sphere in $d$ dimensions. Thus the general form of the electric field is
$$\boldsymbol{\rm E}=\frac{q}{\varepsilon_{0}S_{d-1}r^{d-1}}\hat{r}$$
In particular, for $d=2$
$$\boldsymbol{\rm E}=\frac{q}{2\pi\varepsilon_{0}r}\hat{r}$$
and thus the potential is
$$V=-\int_{r_{0}}^{r}\boldsymbol{E}\cdot\boldsymbol{{\rm d}\ell}=-\frac{q}{2\pi\varepsilon_{0}}\ln\left(\frac{r}{r_{0}}\right)$$

This analysis is based on the book "A First Course in String Theory" by Barton Zwiebach. You can look it up in section $3.5$.


Is there CAS Authenticator version for WSO2IS 5.8 and later?

Question: I need to use CAS Authenticator for WSO2IS 5.8. I can't find in download site any version that compatible with 5.8 version.
Answer: The 2.0.2 version of CAS authenticator and the versions released after 2.0.2 (2.0.3 and 2.0.4) supports for WSO2 IS 5.8.0 and 5.9.0 as well.
Please refer to this doc for further information on CAS authenticator and download the authenticator from the connector store.


When using a Settings.settings file in .NET, where is the config actually stored?

Question: When using a Settings.settings file in .NET, where is the config actually stored?
I want to delete the saved settings to go back to the default state, but can't find where it's stored... any ideas?
Answer: It depends on whether the setting you have chosen is at "User" scope or "Application" scope.
User scope
User scope settings are stored in
C:\Documents and Settings\ username \Local Settings\Application Data\ ApplicationName
You can read/write them at runtime.
For Vista and Windows 7, folder is
C:\Users\ username \AppData\Local\ ApplicationName
or
C:\Users\ username \AppData\Roaming\ ApplicationName
Application scope
Application scope settings are saved in AppName.exe.config and they are readonly at runtime.
Comment: The folder for user scope settings on Vista and Win7 is C:\Users\username\AppData\Local\ApplicationName\Publisher\ApplicationName\Version
or
C:\Users\username\AppData\Roaming\ApplicationName\Publisher\ApplicationName\Version
depending on the Roaming property value on Settings pane.
Comment: My local user.config on Windows 7 is in C:\Users\\AppData\Local\Publisher\ApplicationName_Eid_EvidenceHash\Version
Comment: unless its an addin, in which case it will be AppName.dll.config
Answer: Here is the snippet you can use to programmatically get user.config file location:
public static string GetDefaultExeConfigPath(ConfigurationUserLevel userLevel)
{
  try
  {
    var UserConfig = ConfigurationManager.OpenExeConfiguration(userLevel);
    return UserConfig.FilePath;
  }
  catch (ConfigurationException e)
  {
    return e.Filename;
  }
}

ApplicationSettings (i.e. settings.settings) use PerUserRoamingAndLocal for user settings by default (as I remembered).
Update: Strange but there are too many incorrect answers here. If you are looking for you user scoped settings file (user.config) it will be located in the following folder (for Windows XP):

C:\Documents and
  Settings\(username)\Local
  Settings\Application
  Data\(company-name-if-exists)\(app-name).exe_(Url|StrongName)_(hash)\(app-version)\

Url or StrongName depends on have you application assembly strong name or not.
Comment: Hash is SHA1 hash of StrongName when app is signed or path when app is unsigned. More here https://msdn.microsoft.com/en-us/library/ms379611(v=vs.80).aspx
Comment: Any idea what contributes to the hash in that path? Each subsequent release of my app is getting a different hash value, which makes calling ApplicationSettingsBase.Upgrade() futile. :/
Answer: Assuming that you're talking about desktop and not web applications:
When you add settings to a project, VS creates a file named app.config in your project directory and stores the settings in that file.  It also builds the Settings.cs file that provides the static accessors to the individual settings.
At compile time, VS will (by default; you can change this) copy the app.config to the build directory, changing its name to match the executable (e.g. if your executable is named foo.exe, the file will be named foo.exe.config), which is the name the .NET configuration manager looks for when it retrieves settings at runtime.
If you change a setting through the VS settings editor, it will update both app.config and Settings.cs.  (If you look at the property accessors in the generated code in Settings.cs, you'll see that they're marked with an attribute containing the default value of the setting that's in your app.config file.)  If you change a setting by editing the app.config file directly, Settings.cs won't be updated, but the new value will still be used by your program when you run it, because app.config gets copied to foo.exe.config at compile time.  If you turn this off (by setting the file's properties), you can change a setting by directly editing the foo.exe.config file in the build directory.
Then there are user-scoped settings.
Application-scope settings are read-only.  Your program can modify and save user-scope settings, thus allowing each user to have his/her own settings.  These settings aren't stored in the foo.exe.config file (since under Vista, at least, programs can't write to any subdirectory of Program Files without elevation); they're stored in a configuration file in the user's application data directory.
The path to that file is %appdata%\%publisher_name%\%program_name%\%version%\user.config, e.g. C:\Users\My Name\AppData\Local\My_Company\My_Program.exe\1.0.0\user.config.  Note that if you've given your program a strong name, the strong name will be appended to the program name in this path.
Comment: It looks like the My_Company component of the path will default to Microsoft.  I've not yet found a way to change this that actually works, if someone knows that would be good to add.
Comment: user565869,  have you tried  in visual studio, open the project property's application  tab, click the assembly information button and you should then be able to change Company? repeat that for each project in your solution
Answer: While browsing around to figure out about the hash in the folder name, I came across (via this answer):
http://blogs.msdn.com/b/rprabhu/archive/2005/06/29/433979.aspx
(edit: Wayback Machine link: https://web.archive.org/web/20160307233557/http://blogs.msdn.com:80/b/rprabhu/archive/2005/06/29/433979.aspx)

The exact path of the user.config files looks something like this:
<Profile Directory>\<Company Name>\<App Name>_<Evidence Type>_<Evidence Hash>\<Version>\user.config
where
<Profile Directory> - is either the roaming profile directory or the local one. Settings are stored by default in the local user.config file. To store a setting in the roaming user.config file, you need to mark the setting with the SettingsManageabilityAttribute with SettingsManageability set to Roaming.
<Company Name> - is typically the string specified by the AssemblyCompanyAttribute (with the caveat that the string is escaped and truncated as necessary, and if not specified on the assembly, we have a fallback procedure).
<App Name> - is typically the string specified by the AssemblyProductAttribute (same caveats as for company name).
<Evidence Type> and <Evidence Hash> - information derived from the app domain evidence to provide proper app domain and assembly isolation.
<Version> - typically the version specified in the AssemblyVersionAttribute. This is required to isolate different versions of the app deployed side by side.
The file name is always simply 'user.config'.
Comment: Unfortunately the blog link is broken. I'm sure it would have been interesting.
Answer: It is in a folder with your application's name in Application Data folder in User's home folder (C:\documents and settings\user on xp and c:\users\user on Windows Vista).
There is some information here also.
PS:- try accessing it by %appdata% in run box!
Answer: Erm, can you not just use Settings.Default.Reset() to restore your default settings?
Answer: If your settings file is in a web app, they will be in teh web.config file (right below your project.  If they are in any other type of project, they will be in the app.config file (also below your project).
Edit
As is pointed out in the comments:  your design time application settings are in an app.config file for applications other than web applications.  When you build, the app.config file is copied to the output directory, and will be named yourexename.exe.config.  At runtime, only the file named yourexename.exe.config will be read.
Comment: Not correct. There is no app.config settings file in running application, because app.config will be renamed into [appname].exe.config. And anyway this file will contain only ApplicationScoped settings from settings.settins.
Comment: @arbiter:
Perhaps I missunderstood the question, but Adam appeared to be asking about the design-time defaults.  Those are stored in app.config.  At build-time, teh app.config file is copied to the build directory and renamed to (theapp.exe.config).  However, if you edit that file directly (and are working in visual studio), you run the risk of the contents being overwritten the next time you build.
Bottom line:  For a deployed app (or if you are running outside the IDE), change teh name.exe.config file).  If you are working in VS, change either the default value in settings, or app.config
Answer: All your settings are stored in the respective .config file.
The .settings file simply provides a strongly typed class for a set of settings that belong together, but the actual settings are stored in app.config or a .config file in your application.
If you add a .settings file, an app.config will be automatically added to house the settings if you don't already have one.
Answer: Two files:
1) An app.config or web.config file.  The settings her can be customized after build with a text editer.
2) The settings.designer.cs file.  This file has autogenerated code to load the setting from the config file, but a default value is also present in case the config file does not have the particular setting.
Answer: I know it's already answered but couldn't you just synchronize the settings in the settings designer to move back to your default settings?


Is there any good reasons that I should not use - (dash) in field names in MySQL?

Question: I have field name category_id in product table.
And also I want name field of category id as category-id.
Is there any good reasons that I should not use - in a field name?
Where can I find which character I should not use in MySQL field and table name?
Answer: The major reason against use of hyphen is that most references must then quote the field names.  Otherwise they will look like a subtraction operator, both to MySQL and humans.
Answer: You can take a look at the reserved words list
Generally, you can use whatever name you wish as long as you wrap it in backquotes.
Answer: Safest bet is to stick with alphanumerics + _.  Thats pretty standard in terms of "safe" naming, as none of those characters can be misrepresented as operator symbols.


Industry best practice for minimizing tracking error

Question: Lets say I have an alpha generating model that forecasts expected returns for SP500 stocks. I formulate a portfolio with 100 stocks having the highest expected return. What is the simplest way of reducing tracking error relative to the S&P500?
Comment: Pls don't re-ask a closed question even if reworded. Take a look at the "[What if I disagree with the closure of a question? How can I reopen it?](https://quant.stackexchange.com/help/reopen-questions)" help page if you wish to have your question reopened.
Answer: You ask about industry practice. In my experience, generally there are two phases: First an alpha model (which it seems you already have) proposes stocks likely to have above average returns, then a portfolio building model chooses from these stocks to form a portfolio with characteristcs similar (or not too distant) from the sp500 characteristics (in terms of sector composition, large cap/small cap and other variables considered relevant (in fact factor models are often used at this stage to compare the proposed portfolio to the sp500 portfolio and ensure they are no too far apart. For example the S&P500 may have a certain exposure to the oil price factor and you don't want your portfolio to have much more or much less exposure to this factor. Such models are commenrcially available BTW)).


Which version of openssl should I use?

Question: Three different versions of openssl are being concurrently updated on openssl.org: 0.98, 1.0.0, 1.0.1?  What's the difference between them, and how do I go about choosing which version to use?
Answer: https://en.wikipedia.org/wiki/OpenSSL
Has an easy readable table in timeline order.
Answer: To know the difference between versions, you can look at change log of OpenSSL here.
To know how 1.0.0 is different, just see the entries below "Changes between 0.9.8n and 1.0.0  [29 Mar 2010]".
Some of the difference for example support for name constraints certificate extension.
To know the difference between 1.0.0h and 1.0.1 see Changes between 1.0.0h and 1.0.1  [14 Mar 2012].
Criteria for choosing OpenSSL version: It depends all on your use. For example, if you want to use GCM for TSL, then you need to use 1.0.0.
This change log will be helpful for you in identifying which version to use.

Which version of openssl should I use?


What is the meaning what's the meaning of "I'll get it " in this passage?

Question: What is the meaning of,  I'll get it ,  in below passage :
Penny was picking up a pile of wood , doing jody's work. Jody ran to him .
"I'll get it , Pa! " . Jody said .
I think that " I'll get it "or "I get it " means here " I do it " , is it correct? Or if I would say " I've got it " , it could be mean " I've done it " , correct?
Comment: Is Jody's father's name *Penny*?
Comment: Yes! Penny is Jody's father.
Answer: Assuming that Jody's father's name is Penny I'll get it means I will take the wood that you are carrying.
A simpler way to say it would be:

Penny was picking up a pile of wood, doing jody's work. Jody ran to him.
  "I will take it, pa!" Jody said.
Comment: Thank you ! I think I understand it now! Get means here take sth or carry sth from one place to another place.  You know what ? Before I thought it means I'll do it , for example if your mother said you " Do your homework " or " clean your room " you could say "  I'll get it " instead of " I'll do it " . But now I think I was completely wrong.  It just means "take " here. For example you can say " I'll get an umbrella, it's raining " instead of " I'll take an umbrella " or " I'll get her some woods " instead of " I'll take her some woods " I mean get and take are synonymous where you carry sth


Nexus 4 not getting connected to PC

Question: Some days back, My nexus was getting connected to the computer. But yesterday I discovered, it is no more like that. It is only getting charged via USB connection. No notification of connection received, either on phone or computer. what to do? Kindly suggest !
Comment: Have you checked *Settings->Connections->USB connection type*? Maybe you accidentally mis-configured it (which can happen easily, as sometimes it pops up a selection box when you connect your device).
Answer: go to settings << storage << choose option at upper right corner << USB computer connection << enable Media Device option .
Comment: What Android are you referring to? Care to post a screenshot for guidance for OP? :)
Comment: @Aditya refres to android versions 4.2 and above I suppose. In nexus 4, after enabling the developer options by tapping 7 times on the Build Number ( Setting >> About Phone >> Build Number) the device wont be connected in a media storage mode unless we enable MTP option in Settings >> Storage >> Menu >> Media Device
Answer: Transfer files through USB (Windows & Mac OS)
You can use a USB cable to transfer music, pictures, and other files from your device to a computer and vice versa.

Related settings
To change your device's USB connection options, touch Settings > Device > Storage > Menu > USB computer connection.

Windows transfer

Connect your device to the USB port on your computer. Its USB storage is mounted as a
drive and appears on your computer screen.
Copy files back and forth as you would using any other external device.
When you finish, eject the device from within Windows before unplugging the USB cable.

Mac OS transfer

Install Android File Transfer from www.android.com/filetransfer, and
follow the instructions there. (If you are using Android File
Transfer for the first time, double-click it to open it. After the
first connection, it opens automatically whenever you connect.)
Connect your device to your computer with a USB cable. Android File
Transfer starts, if it's not already running, and opens a window
that displays the contents of your device, along with storage space
details at the bottom of the window.
Work with this window much as you do in the Finder window: open and
close folders, create new folders, and drag files to or from it and
other Finder windows.
Disconnect the USB cable when you finish.

By Google site: Device settings
Answer: For those who are getting problems with adb, you can do this:

Go to device manager
If there is is something called android device at the top or at the second dropdown, uninstall it
Download the drivers and install
Answer: Try a different USB port or cable.

Nexus 4 not getting connected to PC


Why I can not improve in chess & why I can not see the things?

Question: Why is it that I can not improve in chess? When I lose a game, I feel very angry. I am always trying to improve so I played a lot, but I can not see any improvement. Please suggest me something.
Answer: Everything is a matter of dedication, but with the correct techniques.
You should not feel angry, but glad! Your opponent just gave you the opportunity to figure out what are your weakness, so you can fix it! :D
Also, you are probably playing a lot of fast games. DON'T DO THAT!
Chess is a game of thinking. You need time for that. That's why chess is naturally a slow-paced game. Everything is so fast nowadays... Slow down a bit. :)
Prefer to play slow games (30min at least - 1h+ ideal). Let your speed build up naturally, at your own pace.
Also, I strongly recommend that you study the basics deeply. Most players (specially beginners) have a lot of "holes" in their knowledge (and don't know that), but they think they have a "playing style".
Stop trying to "win fast" using traps and studying lots of openings and variations. That's remembering, not playing.
There are a few concepts that you MUST know by heart to play good chess in every move:
1) Find all possible:

Checks
Captures
Threats (Pins, forks, etc.).

And I mean ALL of them. Don't consider if it's good or bad yet. That's how the Masters find such great tactics and sacrifices! It's the CCT technique.
2) Find the Least Active Piece (the one that dominates the least squares), and think about what is the best square to put it, where it will have it's Maximum Activity (controls the most squares possible). That's the LAP=>MA technique. Piece Activity is the most important of all concepts, because all the others come from it.
3) Now you reorder the moves you found from the most forced (aggressive) on the top of the list, going down to the least forced (passive) move. That's the Candidate Moves List technique.
4) To be better organized and don't get lost doing that, look at one piece at a time, in descendant order of power/importance: King, Queen, Rooks, Bishops, Knights, Pawns.
5) If you are in the opening, keep in mind it's main goals: Develop the pieces, Control the Center, Protect the King. That's the DCP technique.
6) In the endgame, pawns are everything. Remember that each of them is a potential Queen! Don't try to chase the opponent's King, because in an open board, with few pieces to help, he can escape easily, and you will waste time.
Important! - Do all of that to your opponent first!! (like if it's his turn again). Only after that, you calculate for your own side. That's a great secret, hard to find anywhere, and is the best way to avoid those embarrassing blunders.
The deeper (more moves ahead) you can calculate, the better. About 3 is good, 5 is great (you will hardly need more than that) and 7 is about Master level.
Plus: When you are going to study a game (the ones you lost are the most important), a book, or a video, use all those techniques combined with the "Guess the move":

In a book, cover the moves list an try to figure out the next move.
In a video, pause it after every move, and try to find the next move.

Try as hard as you can, on every single move, always for both sides.
When you think you found the best move, write it down on a paper and include WHY you think it's the best move.
Only then you can see what was the next move made.
Did you guess it right? Great! Go to the next one.
Did you guess it wrong? Don't go further before you find out and completely understand why your move wasn't the best.
You will see that all those techniques combined are enough to bring you (at least) close to the Master level!
I spent 15+ years to find that out... Oh if I had someone to teach me just that when I was beginning... Only now I'm getting at 2000's.
You won't need to remember lots of variants of lots of openings. They will just start to feel right.
Try all those techniques in every move, since the very first one.
Try them everyday to solve chess tactics problems! You will see how things will suddenly start to make sense! And you will hardly make blunders if you use them correctly.
Of course, there is no "chess pill of success", but you won't get much closer than that... :) You have to take your time to learn how to use all of that properly.
I hope that helps. Forgive my bad english... I'm from Brazil.
Comment: I agree with the majority of this, but I think you should only use a thinking technique like this for awhile. Eventually it should all become automatic without requiring you to think about it. You put a lot of thought into your answer
Comment: @Hockeyfan19 That's exactly what I mean with "you MUST know by heart". Those techniques are to get to the Masters level (or close), and then you start to deep study openings, variants, specific situations, etc. I forgot to mention that you must include **strategic** concepts too (Pawn structure, Bishop vs. Knight, good/bad Bishop, etc.).
Comment: As my karate teacher said once: "A black-belt is someone who totally absorbed the basics, and therefore can do it without thinking."
Answer: You should stop playing a lot of games, but

Try to think harder when you play one, start from 15min games or slower, because playing 5min blitz or faster won't help you at all.
Once the game is over, use the computer analysis (cheap) or a chess coach (expensive, but feedback quality is much higher) and go over the game and learn from the mistakes you and your partner made.
Get some tactical training (plenty of web-sites and applications, google for "chess tactics").

This should get you going up to 1500-1600 and maybe a little beyond.
Comment: @GyanaRanjanParida don't worry, everyone once was where you are right now. even the chess legends had so start from the basics. concentrate on tactics and game analysis and I guarantee you'll get noticeable better in just a month. And, please, don't call me `sir`, we're all friends here, treat everyone as your pal =)


British for "one-trick pony"

Question: I've been told that a "one-trick pony" is an American saying. What is the British equivalent for it?
Comment: Just in case there is any doubt, while one-trick pony may have a US origin, though no-one has verified that as yet, it is perfectly understood and widely used in British English. No-one would be confused by it.
Answer: Consider the following, which looks at the issue from a different perspective: instead of saying it can only do one thing, this speaks about wanting to do more than just one thing.

have another/more than one string to your bow
uk
  to have more than one interest, skill, or resource that you can use if you need to:
  I enjoy my work, but I'd like to have another string to my bow in case I lose my job.
- Cambridge Dictionary
Comment: And this can be used as in: **They only have one string in their bow.**
Answer: Aside from one-hit wonder, I grew up believing the phrase is equivalent to:

Jack-in-the-box

It was invented by an Englishman, Sir John Schorne, and really is a 'one trick pony' in that after you've seen it once, there is little fascination with the toy left.
Comment: I've never heard jack-in-the-box refer to anything other than the toy or to someone who can't sit still. Can you give an example of it use that shows equivalence to one-trick pony?

British for "one-trick pony"


GnuCash: Copy & Paste Balance Sheet

Question: I would like to use GnuCash for the limited purpose of inputting an existing balance sheet at a particular point in time (just the totals at year end, NOT any of the activity) in order to enter adjusting journal entries. Is there a quick way to do this without going through the lengthy process of creating individual accounts one by one? This is not to keep the books, just for a demonstration.
Answer: You can import a list of new accounts in CSV format, choosing File, Import, Import Accounts from CSV.
In order to establish initial balances for the accounts, you'll need to import initial balance transactions. Create an account for the balances to come from (like "Equity:Opening Balances") if you haven't already, then use the File, Import, Import Transactions from CSV menu option to import a file into the Opening Balances account that transfers the balances to the rest of your accounts.
It's a bit annoying that it takes two steps (and preparing two different files for import), but I don't see a way to combine them easily.

GnuCash: Copy & Paste Balance Sheet


Guidelines for sizing solar-powered electronics?

Question: Does anyone know of sizing guidelines or calculators for solar powering electronics? i.e. given power consumption, latitude and allowing for bad weather, accumulated dust and bird poop etc, calculate the size of solar cell and amount of storage to ensure that the electronics never run out of power?
Answer: Never is a long time ! :-)
Obtain sunshine hours per typical day on a typical month at your location from the superb gaisma insolation et al site here. As you are in NZ Ive chosen the Wellington page.
Th 4th graph down says the monthly mean insolation in kWh/m²/day  Jan to Dec is as below. This is the equivalent full sunshine hours. Lowest is 1.4 hours/day in 6th entry = June
<code>5.83
5.06
3.97
2.78
1.85
1.40
1.63
2.32
3.32
4.13
5.26
5.60
</code>
1.4 hours per day means over a 24 hour period you will get a mean solar Wattage per square metre of

Watts = 1000 x 1.4/24 = 58 Watts per square meter of isolation
= 5.8% of full sun panel power

Solar panel efficiency = Zp          typically ~ 13%.
Bird poop degradation factor = Kbp = depends on cleaning etc.
 Say Kbp= 0.75.
Average Wellinton June day = 1.4 sunshine hour/day but some days Watts ~= 0
 So D = days you want to run with NO solar input.
I'm going to stop naming K factors and lump them all into "Kother".
 Kother is a degradation factor comprised of all the factors you can think of  MULTIPLIED together.
Battery charge to discharge energy return - say 80% - depends on chemistry and several  other factors.
Temperature - about 90%of rated at 25C as panel gets hot.
Panel matching to battery - addressed by eg MPPT controllers - Panel will be 18V oc for a 12V battery and energy loss without an MPPT controller will vary - say 80%.
SO
A Panel rated at say 100 Watts will power equipment run 24/7 in June in Wellington with  a Wattage of

100 x 1.4 hrs/24 hrs x 0.75 bp x Kother (0.8 battery x 0.9 temperature x  ...)  / D days
= 100 x 0.058 x 0.75 x 0.8 x 0.9 x ... =~ 3 Watts / D

Below, Zp is allowed for by using the panel rated power.
ie a 100 Watt panel will run 3 Watts of equipment in Wellington in June IF days are typical. If you get super black dark and stormy and want to last say 3 days with about no sun you get 3/3 days =1 Watt 24/7 per 100 W of panel with 3 days holdup.
Pretty stunning !
Battery sizing = 1 Watt Hour per Watt of load x 24 hrs/day x D days holdup / Kbattery to load.
Say a 1 Watt load and 3 days holdup = 1 x 24 x 3 / 0.75 say = ~= 100 Watt hours.
E&OE !!!!!!!!!!! - the battery size and panel size don't seem quite correct. I may have dropped  a figure somewhere there BUT the principle should be obvious and straight forwards A major aspect is getting the degradation factors correct.
Ask questions if interested.
Comment: Thanks Russell. Yeah, I was hoping to avoid the figuring it out approach :) The "some days Watts ~= 0" seems pessimistic - any thoughts? Also needs to be some allowance for losses where the panel is not tracking the Sun. Just geometric for the incident light I guess. I did see one formula: 100W panel * 1.4/5.8 (winter/summer in Wgtn) * 1.5hrs/day avg peak sun in mid latitudes = 36Whr/day, plus Kother. Guess I need to make some measurements.
Comment: What city are you in? Your 36 Wh/day tanslates to 1.5 Watt continuous  and for Kother = 2/3 you get 1 Watt.  Which is 3X my above result. I don't know why, but yu need to.
Comment: That was a from a formula for sizing household solar power. Derate the panel by the ration of winter/summer insolation and make an assumption that you get that for 1.5hr/day at that power. So the 1.5hr is I guess a crude factor for cloud, not pointing at the Sun etc. I'm thinking I'll need to get a panel and make some measurements.
Comment: What city / area? | Gaisma data should be good enough for actual mean insolation without fudge factors. | Other multipliers that I mention obiously need assessment in your situation | No, ~= 0is not a bad figure for some days. Panel output goes down reasonably linearly with light level. There will be some NZ days (especially as you go south) where some days are very dark and stormy all day. Well under 1.5 hours equivalent full sun would be possible occasionally even in Auckland.
Comment: Christchurch. The other question is Sun angle. And easy enough geometric calculation, but do the panels turn light into power, equally from all directions?


Question feeds seem to be broken

Question: Sepia Lazers, Lazers, and Athena have all seemed to stop posting new questions in the chat room. Is this due to the change to Fastly, or do they just need to be reconfigured again or something? If so could they be fixed when someone gets a chance?
Comment: Athena? Is that from elsewhere?
Comment: @AshleyNunn the Overwatch chat room. Stix set it up I think
Comment: Oh, shiny. I don't go in there so I hadn't seen it.
Comment: I have noticed that other feeds posts in other rooms have stopped working too.
Answer: The scheduler was not running properly for chat.se - we gave it a kick, so it should be fine now.

Question feeds seem to be broken


Particle Hair Not Assuming Emitter Color

Question: I'm experimenting with hair particles to simulate feathers on a bird. I have painted a texture to designate the color of the individual strands. The texture has a simple node setup with UV texture coordinates, vector mapping, an image texture and diffuse shader. The texture is indicated in the render tab of the particle system. However, the hair particles are not taking on this color. The head and chest should have a green and purple color, but instead the body is a uniform grey. Am I missing something?
Answer: Having other maps such as normal map will cause all hair to show as black, I duplicate the material and disconnect every texture input other than base color, then assign it as the active material in the particle system to fix this.
I had a similar issue pop up which is unrelated. The hairs had desynchronized from the source mesh and were projecting the UV map in a really bad way. It was using the texture area for the characters mouth and tongue along a good stretch of the back, freaky!
If this happens, Click 'Disconnect Hair' near the top of the particle system setting panel, then after it has changed to 'Connect Hair' click the button again.
Another issue I've had is displaced or outright exploding hair caused by changes to the source mesh, this includes many modifiers and subdivision. Checking 'Use Modifier Stack' did not work for me here, strangely.
Answer: Well applying a texture to hair particles is that easy.
All you need is a texture on the emitting object. The hair will use the color of the surface at the point where it attaches.
So you must have something else going on. From your screen shot it looks like you have the material (with the image being used). You have the particle system using that material. But do you have the mesh using that material?
Try a render with the particle system turned off. Does the object have the texture showing?

If not then that is where your problem is. In edit mode select the correct parts of the mesh and assign the material.

Without your blend that is my best guess, that when you added other materials for your bird, some how it ended up that the material you are using the with the texture is not assigned to the mesh.


What to do if my dataset have only One instance for class in classification?

Question: I am working on a benchmark dataset for text classification. The dataset has about 300 classes, and approximately 50 of these classes have a single instance. In a paper that used fine-tuning BERT, the authors split the dataset into training, validation, and test sets. However, they did not increase the number of instances through oversampling or augmentation. This brings up the topic of what happens to classes with a single instance. In which split should they be included?
Answer: Train, Validations, and Test Split Sets cannot give unreliable evaluations of the model's performance. Because it will not be able to adapt well to the new instances of those classes.
Stratified sampling may not be effective in this case, Because of the low Instances. In that case, The potential solution is K-Fold. It divides the dataset into k numbered folds. Each contains the same portion of the dataset. Every fold is trained and evaluated, and the results are averaged. Which gives the perfect prediction.
Here is the code example[1]:
<code># scikit-learn k-fold cross-validation
from numpy import array
from sklearn.model_selection import KFold
# data sample
data = array([0.1, 0.2, 0.3, 0.4, 0.5, 0.6])
# prepare cross-validation
kfold = KFold(3, True, 1)
# enumerate splits
for train, test in kfold.split(data):
    print('train: %s, test: %s' % (data[train], data[test]))
</code>
Reference:

https://machinelearningmastery.com/k-fold-cross-validation/


Hide emission plane and walls/floor in render

Question: In the image, you see I have a mech, a emission plane and floor and walls to reflect the light. Now I am ready to render, but I do not want the emission plane or floor/walls in the render.  How do I remove them from the render?
Answer: A simpler way to do this than with a material like Leander mentioned is you can disable the cycles camera setting on the object found in the object tab of the properties window. Of course, this is faster if you have more materials than objects and the other is easier if you have more objects than materials (because this is a per object setting). If you want to script this, select all objects and run the following in the text editor:
<code>import bpy

for obj in bpy.context.selected_objects:
    bpy.context.scene.objects.active = obj

    obj.cycles_visibility.camera = False
</code>
Answer: In cycles, use the Is Camera Ray attribute of the Light Path node. For the camera ray a Transparent BSDF will be rendered, for all other rays the previous shader stays the same.


How to request from and send payment by merchant using PayPal (Adaptive Payment?)

Question: We have a website developed using Rails (and we use Active Merchant to take payment
from users).
Now we have a new requirement: to allow our users to request money from us and for us to send the money to them by PayPal automatically.
Of course, we'll implement some business logic to ensure that only certain users are allowed to do this.
But the interface should be pretty simple.  A logged-in user enters a PayPal account email address and the amount (including currency) he wants from us.  Then we'll send the money to him by PayPal.
We don't need to verify that the user-entered email address is associated with an existing PayPal account, because the person receiving the email will be prompted to create an account to receive the money on PayPal.
I've looked at PayPal Adaptive Payment and Mass Payment.  Our requirement is pretty simple and we don't need features like sending money to multiple recipients, chained payment, etc.
Our main requirement is that this is done automatically. In other words, we don't want to have to manually enter our PayPal account password every time someone requests money from us.  Is this possible?
Which PayPal API is best suited for our requirement?
Thank you!
Answer: I really think Mass Pay is your best bet. Its going to allow you to automatically send money and would decrease the amount of fees you pay (the fees are a percentage of the money being sent, but its capped at $1 per recipient).
Adaptive Payments would be another solution, but the fees are higher.


How to write a smart contract for access level (read/write)?

Question: I have seen a couple of tutorials on how to code smart contracts, but I can not quite gather how to write one for permission and access level on a blockchain. How can you grant access to a user to read/add/edit or just read/write?
Comment: I think you still need to research a bit the actual functionality of the blockchain or rather for what it is needed for. Once you successfully deployed your smart contract, you actually wrote something on the blockchain; your compiled contract and the transactions used to deploy it. And you can, e.g., get the current block number or timestamp inside of your contract, which may symbolize "reading" something from the blockchain.
Answer: This might be done in the same manner as any other programming language: you basically define who will assign/revoke these permissions and create a structure to handle such permissions per user (read, write..).
In Solidity you can develop it yourself or use audited solutions such as the OpenZeppelin's Access Control to ease the job.


Find all integer solutions: $x^4+x^3+x^2+x=y^2$

Question: Find all integer solutions of the following equation:
$$x^4+x^3+x^2+x=y^2$$
Comment: Can you factor the left hand side?
Comment: *y* is even, and *x* is either odd, or a multiple of $4$.
Answer: When $|x|>1$ we have
$$(2x^2+x)^2<4(x+x^2+x^3+x^4)<(2x^2+x+1)^2.$$
Comment: @achillehui Thank you, but I can't take credit. I learned this trick from Ed Burger's book *The Number Jungle*.
Comment: +1 Learned a new trick today! May I ask if these types of techniques have a name? =D
Comment: @YongHaoNg I don't know if it has a special name. I suppose it only works on very special Diophantine equations, but it is certainly worth knowing!
Comment: I see, I was wondering if the book has a name for it. Thanks~ =D
Comment: @YongHaoNg Nope. Actually, the method is tucked away in an off-topic exercise.
Answer: The equation
$$y^2 = x^4 + x^3 + x^2 + x = x(x+1)(x^2+1)\tag{*1}$$
has four trivial solutions over $\mathbb{Z}\times\mathbb{Z}$:
$$(x,y) = (-1,0), (0, 0),(1,\pm 2)$$
To determine whether there are other non-trivial solutions, let's look at an equivalent problem:
$$y^2 = \begin{cases}
z(z + 1)(z^2 + 1), &\text{ for } z = x \ge 2\\
z(z - 1)(z^2 + 1), &\text{ for } z = -x \ge 2\tag{*2}
\end{cases}$$
Notice
$$\gcd(z(z\pm 1),z^2+1) = \gcd( \pm z - 1, z^2 + 1) = \gcd(\pm z - 1,2) = 1 \text{ or } 2$$
Any solution of $(*2)$ must have one of the following two factorizations:
$$\begin{cases}
z(z\pm 1) &= p^2,\\
z^2 + 1   &= q^2,\\
y &= \pm pq;\end{cases}
\quad\text{ or }\quad
\begin{cases}
z(z\pm 1) &= 2p^2,\\
z^2 + 1   &= 2q^2,\\
y &= \pm 2pq.\end{cases}\quad\text{ with } \gcd(p,q) = 1.$$
We can rule out the factorization on the left because for $z \ge 2$, $z^2 + 1$ is never a square. For the factorization on the right, we can rewrite the $x$ part as
$$\left\{\begin{array}{ccrl}
(2 z \pm 1 )^2 &-& 8p^2 &= 1\\
z^2 &-& 2q^2 &= -1
\end{array}\right.\tag{*3}$$
Define $A, B : \mathbb{Z} \to \mathbb{Z}$ by
$$A(k) + B(k) \sqrt{2} = (1+\sqrt{2})^k$$
It is known the positive integer solutions of Diophantine equations like those in $(*3)$
has the form
$$\left\{\begin{array}{ccl}
2 z\pm 1 &=& A(2m)\\
2p &=& B(2m)\\
z &=& A(2n-1)\\
q &=& B(2n-1)\\
\end{array}\right.
\quad\quad\text{ for } m , n \in \mathbb{Z}_{+}.
$$
It is clear $2 z \pm 1 \ge z \implies 2m \ge 2n-1$.
Notice $\frac{A(k+1)}{A(k)} \to 1+\sqrt{2} > 2$ as $k \to \infty$.
For any $n$ large enough such that $A(2n) > 2 A(2n-1) + 1$, there are no way to find
a $m$ to satisfy $(*3)$. A brute force computation shows that this
happens as early as $n \ge 2$.
This leaves us the cases $n = 1$. It is easy to check
for $n = 1$, one can choose $m = 1$ to make $(*3)$ works. However,
$$
m = n = 1 \quad\implies\quad
\left\{\begin{array}{ccl}
2 z\pm 1 &=& A(2) = 3 \\
2p &=& B(2) = 2\\
z &=& A(1)  = 1\\
q &=& B(1)  = 1\\
\end{array}\right.
\quad\iff\quad
(x,y) = (1,\pm 2)
$$
corresponds to a pair of trivial solutions we have covered before. The conclusion is aside from the four trivial solutions, $(*1)$ doesn't have any non-trivial solution.
Answer: The following shows that the only solutions are
$$(0,0),(-1,0),(1,2),(1,-2)$$
by using a birational transformation to an Elliptic curve.

1. Birational transformation to an Elliptic curve
Denote
$$C: v^2-u^4-u^3-u^2-u=0$$
It is clear that if $u=0$, then $v=0$. For the other case, $u\neq 0$, we can divide by $u^4$:
$$\dfrac{v^2}{u^4}-1-\dfrac{1}{u}-\dfrac{1}{u^2}-\dfrac{1}{u^3}=0$$
Rearranging:
$$\left(\dfrac{v}{u^2}\right)^2=\left(\dfrac{1}{u}\right)^3+\left(\dfrac{1}{u}\right)^2+\left(\dfrac{1}{u}\right)+1$$
Which is in fact an Elliptic curve:
$$E: Y^2=X^3+X^2+X+1$$
In other words, we have a birational transformation $\phi$:
\begin{align*}
\phi: C &\to E\\
(u,v) &\mapsto \left(\dfrac{1}{u},\dfrac{v}{u^2}\right) = (x,y)
\end{align*}
(We know this type of transformation exists since we can compute genus of $C$ to be 1.)
If $(u,v)\in \Bbb Z^2$ is an integer solution for $C$, then $\left(\dfrac{1}{u},\dfrac{v}{u^2}\right)$ is a rational point on $E$.

In other words, it suffices to find all rational points of the form $\left(\dfrac{1}{u},\dfrac{v}{u^2}\right)$ on $E$.

In particular, notice that $\dfrac{1}{u}$ has numerator $1$ which is very restrictive. We shall make use of this constraint to make our main deduction.

2. Rational points on $E$
Using Sage, we find that the Mordell-Weil group over $\Bbb Q$ has the structure
$$E(\Bbb Q)\cong \Bbb Z_2\times \Bbb Z$$
Where the order two torsion is $P=(-1,0)$ and the free group generator is $Q=(0,1)$.
In other words all rational points are written as:
$$E(\Bbb Q)=[a]P\oplus [b]Q, \;\;\;\; (a,b)\in [0,1]\times \Bbb Z$$
Clearly $Q$ does not correspond to a solution. On the other hand, $P=(-1,0)$ has $x$-numerator 1. Hence we let $u=-1$:
$$v^2=(-1)^4+(-1)^3+(-1)^2+(-1)=0,$$
and we find a solution in $C$:
$$(u,v)=(-1,0)$$

3. A useful lemma
We shall be using this later:

If $(X,Y)\in E(\Bbb Q)$, then:
  $$(X,Y)=\left(\dfrac{m}{e^2},\dfrac{n}{e^3}\right)$$
  for some
  $$m,n,e\in \Bbb Z,\;\;\;\;\gcd(m,e)=\gcd(n,e)=1$$
  (This can be shown using $p$-adic valuations.)

4. Solving the main problem
We have seen that $Q=(0,1)$ does not correspond to a solution. Similarly,
$$[2]Q=\left(\dfrac{-3}{4}, \dfrac{-5}{8}\right)$$
so that $[2]Q$ also does not correspond to a solution.
Now let $R=P$ or $R=[a]Q, a\geq 2$. We want to show that $R\oplus Q$ cannot correspond to a solution. Then by induction
$$\{P\oplus [a]Q,[a]Q\;|\;a\geq 1\}$$
cannot be a solution and we would have covered $[r]P\oplus [s]Q, (r,s)\in [0,1]\times \Bbb N$.
Since $R\neq Q$, we can derive a formula for point addition with $Q$:
$$R\oplus Q=\left(\dfrac{2+x-2y}{x^2},\dfrac{4 + 3 x + 2 x^2 + x^3 - 4 y - x y}{x^3}\right)$$
Recall that if indeed some $(u,v)$ maps to a rational point in $E$, then the $x$-coordinate satisfies:
$$x(R\oplus Q)=\dfrac{2+x-2y}{x^2}=\dfrac{1}{u}$$
Now using our lemma in (3):
$$\dfrac{2+x-2y}{x^2}=\dfrac{2+(m/e^2)-2(n/e^3)}{(m/e^2)^2}=\dfrac{1}{u}$$
$$\dfrac{(2e^3+me-2n)e}{m^2}=\dfrac{1}{u}$$
From which we draw the conclusion that
$$e|m^2$$
Since $\gcd(m,e)=1$, this can only happen if $e=\pm 1$.
Either way, this implies that $(x,y)=(m/e^2,n/e^3)$ are integral points.
(Perhaps can be solved without needing this information, but quite tedious.)
Sage tells us that the only integral points are
$$(-1, 0), (0,\pm 1), (1,\pm 2), (7,\pm 20)$$
of which $(0,\pm 1)=\pm Q$ is not possible by construction of $R$.
Individual checking of the rest tells us that only $(-1,\pm 0),(1,\pm 2)$ results in $u=\pm 1$. We have seen the case $u=-1$ in section (2). For $u=1$::
$$v^2=1^4+1^3+1^2+1=4$$
From which we deduce $v=\pm 2$. Thus far we have the points
$$(u,v)\in \{(0,0),(-1,0),(1,2),(1,-2)\}$$
From the induction, we conclude that there are no other possible candidates corresponding to
\begin{align*}
R &=P\oplus [a]Q, a\geq 1\\
R &= [a]Q, a\geq 1
\end{align*}
It remains to cover the rest of the cases. Since $P$ is order two, $[-1]P=P$. Then immediately
$$P\oplus [a]Q = [-1]P\oplus [a]Q, a\geq 0$$
so that these are also not solutions.
The inverse of a point does not change the $x$-coordinates:
$$-(x,y)=(x,-y)$$
Therefore if $R$ is not a solution, then $-R$ is also not a solution. This shows that
$$-(P\oplus [a]Q)=[-1]P\oplus [-a]Q=P\oplus [-a]Q$$
$$-([a]Q)=[-a]Q, a\geq 1$$
are not solutions.
Therefore we have covered all the cases and we are done.

5. Sage codes for reference

E = EllipticCurve([0,1,0,1,1]);
  tor = E.torsion_points();
  rank = E.rank();
  gens = E.gens();
  integralPoints = E.integral_points();
Answer: EDIT : The case (1) in my answer has a big mistake. The case (2) is true.
$(x,y)=(0,0)$ is one of the solutions. In the following, suppose that $(x,y)\not=(0,0).$
We have
$$x(x+1)(x^2+1)=y^2.$$
First, we know that $x$ and $x+1$ are coprime, and that $x$ and $x^2+1$ are coprime, too. This leads that there is an integer $k$ such that $x=k^2.$ (see the right hand side)
In the following, we break up the answer into two cases.
(1) The case that $x+1$ and $x^2+1$ are not coprime.
Letting $$x+1=ps,x^2+1=pt\ \ (\text{$p$ is a prime number, $s,t\in\mathbb Z$})$$
we have
$$(ps-1)^2+1=pt\iff p(t-ps^2+2s)=2\Rightarrow p=2.$$
So, we know we only have the following possibilities :
$$x+1=0,\pm1, \pm2^k\Rightarrow x=-1,0,-2,-1\pm2^k.$$
However, we have $x\not=-1, x\not=0, x\not=-2$, because $x$ has to be a square of an integer (and $x\not=0$). So, we have $$x=-1\pm2^k.$$ In the same argument, we have $$x^2=-1\pm2^l.$$ Note that $k,l\ge1\in\mathbb Z.$
Hence, we have
$$(-1\pm2^k)^2=-1\pm2^l\iff 2^{2k}\mp2^k+2=\pm2^l\iff 2^{2k-1}\mp2^{k-1}+1=\pm2^{l^1}.$$
Now, if $k-1\ge1$ and $l-1\ge1$, then we know that the left hand side is odd, and the right hand side is even, which is a contradiction.
So, we have "$k=1$ or $l=1$".
This leads $x=\pm2^k-1=\pm2^1-1\Rightarrow x=1,-3\Rightarrow x=1.$ ($x^2$ has to be a square.) Also, this leads $x^2=\pm2^l-1=\pm2^l-1\Rightarrow x^2=1,-3\Rightarrow x=1.$
So, this case leads $(x,y)=(1,\pm 2).$
(2) The case that $x+1$ and $x^2+1$ are coprime.
In this case, we know any two of $x,x+1,x^2+1$ are coprime. So, this leads that each of $x, x+1,x^2+1$ has to be a square number of an integer. However, it is impossible that $x$ and $x+1$ are both square numbers except $x=0$. However, we suppose that $x\not=0$ at the top. Hence, this case has no solution.
Now we reach a conclusion that the solutions of the given equation is only the followings:
$$(x,y)=(0,0),(1,2),(1,-2).$$
Comment: How did you go from $\gcd(x+1,x^2+1)=2$ to the conclusion that $x=\pm 2^k$? Agree with your case 2.
Comment: Oh, you are right... I need to check it... but I'm tired:) I'll edit or delete this answer later. sorry.
Comment: @i totally agree with @Jyrki this is a big "jump"


M16 dimmable LED flickering with dimmable switch

Question: I recently moved to home and decided to replace halogen MR16 with LED MR16. I bought DiCUNO MR16 LED Light Bulbs (https://www.amazon.co.uk/dp/B0B2525LNG?psc=1&ref=ppx_yo2ov_dt_b_product_details) from Amazon, later I realized that I need to buy LED dimmer switch too. I bought Zigtiger LED Dimmer Switch (https://www.amazon.co.uk/dp/B08P5MDRDT?psc=1&ref=ppx_yo2ov_dt_b_product_details) too. With old switch, LED bulbs were working, it just that I can't dim and sometimes it flickered. There was four halogen connected to a single switch and only two were working.
After I changed to an LED dimmer switch, only one LED(out of 4) worked and flickering too. What am I doing wrong here? Do I have to replace the driver transformer too?
Answer: Yes the drivers need to be dimmable too. All 3, the led, driver and dimmer have to be compatible.


LP dropping while I am winning

Question: I've recently realized that the amount of LP that I get drops dramatically even when I win games. I'm currently on Gold 2, 1 (depending on when you see this), and I have 53% win rate out of my total ranked games. But I gain about 14~15 LP even when I am on about 5 or 6 winning streaks. I have a duo that is Silver 3/2 that I always duo with, is that the reason for my LP? Like does playing with lower ranked people drop your MMR?
Answer: I don't think it's accurate to say that your LP is dropping while you're winning. You gain LP when you win, even if it's less than what you feel that you deserve.
How do MMR & LP work together?
Think of our Match Making Rating (MMR) as a "GPA" that we have in League, much like you might have a GPA in the American school system.
As we score higher on tests, our GPA will improve. Given that all of our tests are weighted equally, we can change our GPA dramatically with one test early in the semester. At the end of the semester, we've already taken many tests and have essentially "earned' our GPA.
Like our GPA, MMR is a composite score -- it reflects our performance in our past games (or tests, in this example). The more games we play, the more data Riot has to gauge our skill level and the more certain it can be that our MMR is accurate. For that reason, it's harder to change our MMR after playing many games.
What if I play with my friend?
In order to match you with players of similar aptitude, Riot needs to guess how well you and your friend play together as one unit.
Let's say MMR is calculated out of 100. You have an MMR of 90 and your friend has an MMR of 80. For the sake of simplicity, let's assume that you're likely to win the game for your team just as much as your friend is likely to lose the game for your team. Riot splits the difference and gives you a joint MMR of 85. You'll end up playing with opponents who are at the 85 MMR level when you play together.
Playing with a friend who is rated lower than you will lower your joint MMR -- that's the point! You should play with people who are at your skill level.
If you continue to win together, you'll raise your individual MMR in the process.
Caveats
This is a really simplified way of looking at MMR and LP. Riot hasn't fully explained how the rating system works but we do know that recent matches are rated more heavily as it's possible to change your rank. Again, they may not give your recent wins as much weight as you'd like, but you can slowly but surely changer your MMR if you continue to win. Good luck!

LP dropping while I am winning


Automatically Run Contract

Question: I have a private ethereum network made up of multiple nodes and I would like one of them to interact with the a deployed smart contract without my input. Is it possible for create a script that will write to and read from a smart contract once an hour?
Comment: Of course it is possible! For example, with web3.js.
Answer: You can write a script which will trigger a running node API which uses web3 js library
or else you can make use of Ethereum Alarm clock in order to trigger a smart contract function based upon block,time values.

Automatically Run Contract


Where did my bitcoin go?

Question: Wanted to combine bitcoin on coinbase with bitcoin in wallet. Think I did it wrong. Can't remember exact steps but think I went on "swap" for some reason. Thought I was transferring from coinbase to wallet. But bitcoin never arrived there. Had many confirmations and is completed, wondering where it went though?? Guessing I sent it so Someone and it's lost, sad but okay, just want to confirm there is nothing I can do!?
Answer:
wondering where it went though?

If you have a Bitcoin transaction-ID and multiple independent blockchain explorers show that transaction-ID having multiple confirmations and that specific transaction has an output that pays the expected amount to an address you created using your wallet -- then the money is in your wallet even if your wallet software application doesn't know about it for some reason.
Remember that wallets (real Bitcoin wallets, not third-party custodial accounts pretending to be wallets) don't contain money, they contain the secret numbers known as private keys which are used to control amounts of money. So Bitcoin money is never really in transit and it cannot really go astray or get lost in the network.

just want to confirm there is nothing I can do!?

If you sent money from an account provided by the business named Coinbase, you can, and should, ask them for help.
If you sent money to a normal Bitcoin wallet (non custodial like Bitcoin core, Electrum etc), you can ask the appropriate support forums or ask people here for help -- but you might have to provide details of exactly what software wallet you use and maybe the transaction-ID.
Comment: Okay that sounds sort of promising that it hasn't vanished   the "wallet" app is connected to coinbase and therefore I was assuming it would show up in there (as it had previously, although I'm sure I did it differently last time). Sounds like best bet is to contact coinbase and see what's going on.
Not sure how to upload a photo but yes it has all the things you mentioned with blockchain explorers.
Thanks so much for your answer, I really appreciate it!

Where did my bitcoin go?


What's the difference between nohup and ampersand

Question: Both nohup myprocess.out & or myprocess.out & set myprocess.out to run in the background. After I shutdown the terminal, the process is still running.
What's the difference between them?
Comment: bash. And I know why now according @nemo 's answer.
Comment: @Yarkee if the answer suits your problem, please mark the question as accepted (the checkbox below the answer's votes) so it's not dangling around as unanswered. You should do so for all your questions :)
Comment: `shutdown` should be avoided as a term with a specific Linux meaning., and be replaced by `exit`.
Comment: what shell are you using? the behavior varies across shells
Answer: nohup catches the hangup signal (see man 7 signal) while the ampersand doesn't (except the shell is confgured that way or doesn't send SIGHUP at all).
Normally, when running a command using & and exiting the shell afterwards, the shell will terminate the sub-command with the hangup signal (kill -SIGHUP <pid>). This can be prevented using nohup, as it catches the signal and ignores it so that it never reaches the actual application.
In case you're using bash, you can use the command shopt | grep hupon to find out whether
your shell sends SIGHUP to its child processes or not. If it is off, processes won't be
terminated, as it seems to be the case for you. More information on how bash terminates
applications can be found here.
There are cases where nohup does not work, for example when the process you start reconnects
the SIGHUP signal, as it is the case here.
Comment: It may be worth noting that just `&` does cause the subcommand to not receive some signals (e.g. SIGINT). `nohup` essentially adds `SIGHUP` to the list of signals that are not propagated.
Answer: myprocess.out & would run the process in background using a subshell. If the current shell is terminated (say by logout), all subshells are also terminated so the background process would also be terminated. The nohup command ignores the HUP signal and thus even if the current shell is terminated, the subshell and myprocess.out would continue to run in the background. Another difference is that & alone doesn't redirect the stdout/stderr so if there are any output or error, those are displayed on the terminal. nohup on the other hand redirect the stdout/stderr to nohup.out or $HOME/nohup.out.
Comment: I run `myprocess.out &` and exit the shell. However, when I use `ps aux | grep myprocess.out` in other shell, I still can find "myprocess.out". It means than the process is still running, not be terminated.
Comment: Check shopt | grep hupon as mentioned in the other answer.
Comment: @amit_g When killing the parent shell with `kill -9` there won't be a SIGHUP as this would require the parent shell to handle SIGKILL, which it can't.
Answer: Most of the time we login to remote server using ssh. If you start a shell script and you logout then the process is killed.
Nohup helps to continue running the script in background even after you log out from shell.
Nohup command name &
eg: nohup sh script.sh &

Nohup catches the HUP signals.
Nohup doesn't put the job automatically in the background. We need to tell that explicitly using &
Comment: Thanks. Wasn't expecting your answer but the fact that it is here is great. It answers the question I did not ask :D
Answer: Using the ampersand (&) will run the command in a child process (child to the current bash session). However, when you exit the session, all child processes will be killed.
using nohup + ampersand (&) will do the same thing, except that when the session ends, the parent of the child process will be changed to "1" which is the "init" process, thus preserving the child from being killed.
Comment: as pointed out in @Devender's answer below, this is only true in a bash terminal if huponexit is set to 'on'
Answer: Correct me if I'm wrong
  nohup myprocess.out &

nohup catches the hangup signal, which mean it will send a process when terminal closed.
 myprocess.out &

Process can run but will stopped once the terminal is closed.
nohup myprocess.out

Process able to run even terminal closed, but you are able to stop the process by pressing ctrl + z in terminal. Crt +z not working if & is existing.
Comment: Technically ctrl Z just suspends the process - you can resume the process with bg (background) or fg (foreground).  There might be some confusion with 'stop' as it could be interpreted as the process cannot be resumed.
Answer: The nohup command is a signal masking utility and catches the hangup signal. Where as ampersand doesn't catch the hang up signals. The shell will terminate the sub command with the hang up signal when running a command using & and exiting the shell. This can be prevented by using nohup, as it catches the signal. Nohup command accept hang up signal which can be sent to a process by the kernel and block them.  Nohup command is helpful in when a user wants to start long running application log out or close the window in which the process was initiated. Either of these actions normally prompts the kernel to hang up on the application, but a nohup wrapper will allow the process to continue.
Using the ampersand will run the command in a child process and this child of the current bash session. When you exit the session, all of the child processes of that process will be killed. The ampersand relates to job control for the active shell. This is useful for running a process in a session in the background.
Answer: There are many cases when small differences between environments can bite you. This is one into which I have ran recently. What is the difference between these two commands?
1 ~ $ nohup myprocess.out &
2 ~ $ myprocess.out &

The answer is the same as usual - it depends.
nohup catches the hangup signal while the ampersand does not.
What is the hangup signal?
SIGHUP - hangup detected on controlling terminal or death of controlling process (value: 1).
Normally, when running a command using & and exiting the shell afterwards, the shell will terminate the sub-command with the hangup signal (like kill -SIGHUP $PID). This can be prevented using nohup, as it catches the signal and ignores it so that it never reaches the actual application.
Fine, but like in this case there are always 'buts'. There is no difference between these launching methods when the shell is configured in a way where it does not send SIGHUP at all.
In case you are using bash, you can use the command specified below to find out whether your shell sends SIGHUP to its child processes or not:
~ $ shopt | grep hupon

And moreover - there are cases where nohup does not work. For example, when the process you start reconnects the NOHUP signal (it is done inside, on the application code level).
In the described case, lack of differences bit me when inside a custom service launching script there was a call to a second script which sets up and launches the proper application without a nohup command.
On one Linux environment everything worked smoothly, on a second one the application quit as soon as the second script exited (detecting that case, of course took me much more time then you might think :stuck_out_tongue:).
After adding nohup as a launching method to second script, application keeps running even if the scripts will exit and this behavior became consistent on both environments.


How are sins forgiven?

Question: If the original Jews were forgiven of their sins through the sacrificing of lambs, and sacrificing is no longer being practiced, how are sins being forgiven now?
Comment: Prayer and Yom Kippur. To have a merciful Father.
Comment: Yom Kippur comes once every year.
Comment: See https://judaism.stackexchange.com/a/127824/27180 & https://judaism.stackexchange.com/questions/59741/torah-atones-for-all-sins/59744#59744
Comment: Highly related: https://judaism.stackexchange.com/a/76409/27180
Answer: The Torah (Leviticus 23:27-32) teaches us that once a year, on the sacred day called Yom Kippur, our sins are forgiven. G-d cleanses us so to speak.

Mark, the tenth day of this seventh month is the Day of Atonement. It shall be a sacred occasion for you: you shall practice self-denial, and you shall bring an offering by fire to יהוה; you shall do no work throughout that day. For it is a Day of Atonement, on which expiation is made on your behalf before your God יהוה. Indeed, any person who does not practice self-denial throughout that day shall be cut off from kin; and whoever does any work throughout that day, I will cause that person to perish from among the people…

See also my answer to a different question:

See, Gemara (Talmud) Megillah 31b:
Avraham is asking G-d if He will do to the Jewish people if they sin, as what He did to the generation of the Flood. G-d answers with:

No, I will not do that

In Bereishis 15:9, G-d instructs Avraham to bring five different animals for sacrifice:

"Bring Me a three-year-old heifer, a three-year-old she-goat, a three-year-old ram, a turtledove, and a young bird."

Thus, the Gemara, citing this pasuk in the Torah, explains that G-d suggested to Abraham that even if his descendants will sin, they will be able to achieve atonement through sacrificing offerings.
However, what to do when there is no Holy Temple standing in Yerushalayim? That is the question Avraham asks G-d. The Gemara explains as follows:

Abraham said before Him: Master of the Universe, this works out well when the Temple is standing and offerings can be brought to achieve atonement, but when the Temple will no longer be standing, what will become of them?

So, what to do when there is no Holy Temple standing in Yerushalayim?

G-d said to him: I have already established for them the order of offerings, i.e., the verses of the Torah pertaining to the halakhot of the offerings. Whenever they read those portions, I will deem it as if they sacrificed an offering before Me, and I will pardon them for all of their iniquities.

Similary, the Gemara in for example two places discusses the relationship between Torah study and atonement for sins:

Anyone who engages in Torah study need not bring a burnt offering, nor a sin offering, nor a meal offering, nor a guilt offering (Menachos 110a)

And
The Gemara ([Rosh Hashanah 18a][4]) explains the pasuk in [1 Shmuel 3:14][5] where it says "Assuredly, I swear concerning the house of Eli that the iniquity of the house of Eli will never be expiated by sacrifice or offering means that through Torah study and acts of kindness, "the sin of Eli's house" is atoned.

Abaye said: With sacrifice or offering the sin of Eli's house is not atoned, but it is atoned through Torah study and the performance of acts of kindness.

So, according to all the above. The Gemara explains that through Torah study, especially the sections that are speaking about the offerings, are an atonement for sins. However, Teshuva (repentance) can alse be seen as something that brings atonement for someone.
Similary, [Hosea][6] says:

For I desire goodness, not sacrifice; Obedience to G-d, rather than burnt offerings

On this pasuk, the Avot d'Rabbi Natan [explains][7]:

Once, Rabban [our rabbi] Yohanan ben Zakkai, left Jerusalem, and Rabbi Yehoshua followed after him. And he saw the Holy Temple destroyed. [Rabbi Yehoshua said: Woe to us, for this is destroyed –] the place where all of Israel's sins are forgiven!2 [Rabbi Yohanan] said to him: My son, do not be distressed, for we have a form of atonement just like it. And what is it? Acts of kindness, as it says (Psalms 89:3), "For I desire kindness, not a well-being offering." And so we find that Daniel, the precious man, would busy himself with acts of kindness.

How are sins forgiven?


Energy from 1 gram of fuel in a nuclear power plant?

Question: It might go without saying, but I am asking about a fission reactor. I assume the fuel still has mass after it is used. If I am right about that, I can't use $E=m*c^2$ to answer my question. Hence my question.
Answer: The total energy from the fission of one atom of U-235 is 202.5 MeV according to Kaye and Laby.
Typical nuclear fuel is enriched to about 5% U-235, but never more than about 18% - higher than that and you are talking about material for bombs. It is very hard to define the "energy content" of nuclear fuel without knowing what kind of reactor you are using, and what the U-235 level is that this design has for "fresh" fuel, and for "spent" fuel (note that the fuel rods are moved around the reactor - IIRC, the most enriched rods start on the periphery where the neutron flux is lower, and over time they are moved towards the center where higher neutron flux means you can squeeze the last few fission reactions out of them).
If, for example, you went from 10% enrichment to 2% enrichment, you would have "burnt" 0.08 gram of U-235. The energy released would be the number of atoms in a gram of fuel, multiplied by the energy that fission of one atom releases (I hope you can follow where these numbers came from without me having to devise symbols and explain...):
$$E = \frac{0.08}{235}\cdot N_A \cdot 202.5\cdot 10^6 \cdot 1.6\cdot 10^{-19} J=6.6\mathrm{\; GJ}$$
Comparing this to coal, with roughly 24 kJ/g source - but note there is LOTS of variability, you see that Uranium has the advantage by about a factor of 275,000 - or 1 gram of uranium equivalent to 275 kg of coal.
Typically, you will see numbers like "3000 kg of coal". But that is comparing pure uranium - here we were looking at fuel in which just 8% of the weight is converted to energy. The same calculation would give around 3500 kg of coal equivalent to 1 gram of 100% U-235. That is close enough to the commonly quoted value. Of course the amount of heat given off by coal varies a lot with the type - sources vary by more than 2x between the lowest and highest energy density coal.
Answer: You have to use the change in mass. First, figure out to mass of the element/fuel when it is whole. Then, find the mass of the result of the reaction: the two new elements and the neutrons. Take the result on step 1 and subtract the result on step 2. This is the mass that you plug into the equation.


How can I help my weak Aloe vera?

Question: What's wrong with my aloe? It isn't in direct sunlight and I water it once a week, checking if the soil is dry and crumbly.
Comment: And gotta add you can easily cut off the wimpy yellowed leaves and as for the bruised tip just use scissors and cut at a steep angle.  It'll bleed a bit but no big deal...
Answer: I don't see the yellow you are seeing I guess, have you given it any fertilizer at all?  How long ago?
You are watering way too often.   In addition this pot seems to be too big for this plant.  Too much wet soil for a succulent with shallow roots will definitely make an unhappy succulent.  The second pot below bothers me...is the bottom of the aloe's pot sitting in water ever?
Cut your watering at least by half. Watering every 3 weeks is not uncommon.  A bit more for plants in pots out of doors, less for plants in doors with no wind.  Don't water unless that pot feels light when you pick it up. I'd go get a clay pot that is about the same size in diameter but only 4 to 6" deep.  Use plain old sterilized potting soil.  No sand, no compost no nothing.  No rocks at the bottom below the soil and above the drain hole.  Lift the bottom of the new pot up off the surface using pieces of tile or flat stones.  You could also check out 'pot feet' to go with your clay pot.  Eagle claws, lion's claws that are made to lift the bottom of the pot off any surface and look wonderful. Round pots take 3. square pots take 4. Do not soak your plant so much that water needs to drain out of the pot. Remember, those roots are very shallow, they will never grow deeper.
Most plants the rule is to water deeply and allow to dry before watering again.  Some plants need a bit more moisture left in the soil but not cactus and succulents.  They store their water in their leaves and in the 'wild' they get quick showers every once in a great great while that only wet the desert soil a few inches deep at most.  Don't use a schedule with plants.  The micro environment can change and your plant (I am not a nut job, okay) will tell you when it needs something.  They, the plant scientists think they do this via chemistry and your plant will train YOU how to communicate between the two of you.
There are incredible recent documentaries on how plants communicate and sort of 'think'.  Check out one or two.  I must be well trained because I can walk into a home, or a doctor's office or the plant section of Fred Meyers and I will be drawn right to the plant that needs something.
Feel the weight of your plant and pot once you've transplanted it. Feel it when it is dry.  The difference is obvious and this is the best way to know that a potted plant needs water.
Moisten the surface after transplanting and don't bury your plant any deeper than just the roots.  Take a good look at those roots and if they aren't bright white and you see brown or mushy roots pull them off the root ball.  Don't wash the roots just pull off the rotting roots and transplant.  Firm the soil as you transplant. Take a picture of the roots to send to us.  Try to keep the soil that is already in the root ball together with the roots and be gentle.
Leave a good inch of room from the rim of the pot to the surface of the soil.  Again, no bark chips, no added sand, no compost...just potting soil out of the bag.  Also, don't purchase any potting soil with water retentive 'gels' or 'sponges'.  Make sure the soil does not have any fertilizer added as well.  You want a basic extended release balanced fertilizer and I recommend Osmocote 14-14-14 extended release fertilizer beads.  Use half the amount they recommend and once per year is enough.  If you've already added fertilizer do not add any more until you've shared with us what the formula is, brand and the last time you fertilized.  Just a bit too much will kill a plant.  Too little is far better.
Also, get bottled distilled water that has no fluoride or chlorine added.  Tap water shouldn't be drunk by us humans, seriously.  Fluoride is a horribly toxic chemical that does nothing for teeth.  Why they continue to do this is amazing!  If you've got a friend with well water that isn't put through salted filters that would be best.  As infrequently as this plant needs water I'd give it the best water possible.
I hope this helps!
Comment: Are these pebbles used beneath the soil at the bottom of the pot or beneath the pot itself versus chunks of tile?  Yeah, I should get a commission but it is the only one I recommend where it is hard to screw up.  I hate the company (Ortho?  Scott's) and this is the only product I'll even use...to recommend these fancy yet lovely organic fertilizers with all the different formulations is just too much.  I use them but I also know about the pH, the plants and because the amounts are so small it requires more applications more fine tuning and they always put 'Plant Food' in big letters...funny!!
Comment: I looked up cachepot which lucky for you is what I was thinking you meant for her double pot gig.  I saw bits of yellowing which is normal, especially on an over watered aloe along with heavy 'leaves'.  Why is it you don't do answers?  You add so much good information always and you seem to be first to comment and it is usually right on the moola, too...that I've noticed.  I hate answering when you already put the correct answer in a comment...grins!  Have you been trying to ID the two seed questions?
Comment: I got it, pnuts.  I had to go look it up...you foreigners!  I am being silly!  Talk in the chat sometime to find out where it is you live!
Comment: https://tse4.mm.bing.net/th?id=OIP.L2kFhZqjrzd-XTk0YwLigAEsDh&pid=Api
Answer: That is Aloe vera 'chinensis', I think. There are a few things going wrong there. Here is what a healthy plant looks like (mine, 2 gallon pot):

You're plant needs a restart. If it's still alive. I see the one leaf has darkened at the base (circled in the picture below). This can indicate crown rot and root rot.

Here's what to do:

Determine if your aloe is alive. Remove it from the pot, remove the mix from the roots, and check it over. The plant base should be firm and white/green, with white and yellow roots. If the base is translucent and soft, and the roots brown, it's dead.
If it's alive, separate the crowns, and clean the roots well. Remove the lowest leaves if they are dead/dying.
Prepare new pots. Preferably one for each crown you want to keep. The pots should be small. Preferably smaller in diameter than the leaf span of the plant going in. Make sure there are ample drainage holes in the bases.
Use a gritty mix. Aloes like minerals. Crushed pumice is great for mixing into aloe soil. You want to be able to pour water into it and have it run right through quickly.
Plant the plants more shallowly than they are currently. You don't want soil between the leaves and the stem. Make sure the pot is nearly full.
Water it if the mix is dry. From now on, water thoroughly, and allow to almost completely dry in between.
Place in a warm, bright place. Find the brightest spot you can, and if available, ease the plant slowly over time into full sun. Moving from a dark place into full sun can cause sunburn, but low light causes weak growth from etiolation.

Once it's rooted in, it should quickly grow. The more outdoors it can get the better. It makes a huge difference in the overall vitality. Don't let it frost on the plants, and try not to let them in full sun of the temperatures are over 100 F. Only fertilize lightly if the plant is growing strongly but is showing signs of nutrient depravation. My plant, pictured above, has not ever been fertilized in the 10+ years I've had it.

How can I help my weak Aloe vera?


How to Sync a MySQL DB with a Oracle DB?

Question: I have access from 5 views of an Oracle DB located outside of my organization. I need to sync my db that is a mySQL DB with the oracle DB (Oracle views will be the master, my db will be the slave). I was reading about replication on MySQL DB but nothing about replication from a Oracle DB. There's anyway to I keep the tables equals? PS: I don't have access to the original tables, so I can't create a trigger there :(
Comment: So the entire process is driven by the mySQL side?  Pulling data from oracle to mysql?  What kind of time lag is allowable?  Without getting into specific solutions, how will the mysql side identify oracle data that it has already pulled?  How will it identify a row that has been deleted since the previous pull?  How will it identify a row that has been modified since the previous pull?
Comment: Several years ago Oracle bought Golden Gate.  It had the code to replicate from Oracle to MySQL.  Perhaps it is still available from Oracle (under some other name).
Answer: Oracle GoldenGate might not be useful for you if Oracle source database is outside of your organization with no possibility for you to set up extract process.
The best for you is to have a look at this old post "Migrate from Oracle to MySQL" that despite its title points out good ways to do what you're looking for.
I found especially useful the below points from David Mann answer to the above mentioned topic:

There are 3rd party utilities available. I have used a few of these
but best for you to check them out yourself for your intended purpose.
A few 3rd party products are listed here: OraFaq . Unfortunately a lot
of them run on Windows which would slow down the data unload process
unless your DB server was on windows and you could run the load
utility directly on the server.
If you don't have any complex datatypes like LOBs then you can roll
your own with SQLPLUS. If you did a table at a time then you can
easily parallelize it. Topic has been visited on this site probably
more than once, here is an example: Linky


Will excessive rendering damage a GPU?

Question: Whenever I head to school or somewhere else, I sometimes like to render my images(even if they're not complete) at something crazy, like 10,000 samples at a high resolution with many light bounces. Will this damage my computer or GPU, or take up space?
Answer: If your computer has proper cooling and therefore doesn't overheat, it won't damage the GPU.
It will have an unfavorable impact on your electricity bill and carbon footprint though.
Whether a sample size that high is actually appropriate is another question. You probably don't need that many samples or there are computationally less expensive solutions to reduce noise, e.g. the denoiser.
The rendered image will take up disk space when you save it. How much it will use depends on the resolution, the image format and its settings. The higher the resolution, the larger the file. For an overview of image formats and their disk space usage, take a look at the last section of this answer.
Answer: You're not going to "damage" your GPU. What may happen is that if it is constantly over-clocked or over-used, it may wear out faster than a less-used GPU. Render however you wish, as long as your GPU can handle the amount of processing you're asking of it, then it will be fine. However, 10k samples does seem very excessive.

Will excessive rendering damage a GPU?


Using Ionic storage or a database (NoSQL, Sqlite, etc)

Question: I am going to create an app (iOS and Android) that will save data to the users device (text, images, files, etc) and will stay on the users device until they decide to send it to the server. I can do it either with a sqlite database or using ionic storage but I don't know what the best practice would be
For simplicity I will only present two types of items that will be stored - notes and records
notes structure
notes = {
     description: this.description,
     'otherText': this.otherText,
     fileOrImage1: this.imageOrFileURL1,
     fileOrImage2: this.imageOrFileURL2,
    ..... Unlimited number of fileOrImageURL'S here
};

records structure
records = {
     name: this.name,
     'description': this.description,
     // NOTE: These files and images are different than the ones above. They will be in separate components
     fileOrImage1: this.imageOrFileURL1,
     fileOrImage2: this.imageOrFileURL2,
    ..... Unlimited number of fileOrImageURL'S here
}

The user will first store the data on the device and it will only get uploaded when the user sends it to the server. Once its uploaded it gets deleted.
There can be many notes and records, lets say 25 each. Should I use Ionic Storage or something like a sqlite database? If I use ionic storage I will need to create a unique ID for each note and record and save it.
I am willing to change my approach if anybody has a better way. I'm still in the planning stage
Comment: There are 2 similar posts for this topic. Have a look:  1. [ionic storage vs native storage](https://forum.ionicframework.com/t/ionic-storage-vs-native-storage/74958)     2. [sqlite vs localstorage](https://stackoverflow.com/questions/41573983/sqlite-vs-localstorage-with-ionic-firebase)
Answer: I used the sqlite database for an app I did with Ionic, the reason for my choice was that I could then easily query the data, as with any database.


Pair-annihilation why does it occour?

Question: Why does pair annihilation occur with particles and only their matching anti-particle? E.g., electrons and positrons, but not protons and positrons? What is the difference?
Comment: possible duplicate of [Does a particle annihilate only with its antiparticle? If yes, why?](http://physics.stackexchange.com/q/7663/)
Comment: [commas](http://en.wikipedia.org/wiki/Comma) you need
Answer: We (physicists) believe the reason is this: known symmetries and conservation laws. For example, the mutual annihilation of a proton and positron would remove $2\,e$ charge units from the Universe. This violates the conservation of charge principle, which can be seen to arise from the application of Noether's theorem to the global gauge symmetry of the classical electrodynamic Lagrangian, as discussed in QMechanic's answer to the question "Noether theorem and classical proof of electric charge conservation". Other similar conservation laws are conservation of color charges in QCD, conservation of lepton number, baryon number (quark number) and so forth. Your proposed reaction would also violate conservation of lepton number.
But ultimately the answer is simply experimental evidence, i.e. mutual annihilation  simply doesn't happen experimentally unless between antiparticles. The failure to observe certain reactions is what led theoretical physicists to define Lagrangians with various continuous symmetries symmetries (and thus, through Noether's theorem, Noether charge (i.e. quantum number) conservations) as well as the notion of anti-particle itself in the first place as a way to organize our knowledge of experimental particle interaction observations. The theoretical reasons above are simply sufficient conditions that would explain our observations, but they are not necessary conditions. It's simply that, so far, our theories agree with experiment and we therefore have no reason to believe they are wrong.
Comment: @PhotonicBoom Thanks heaps. I think one of my main goals at SE is to test and improve my writing skills, so your comment means a great deal to me.
Comment: +1, such a good answer. Accurate and yet understandable to non-experts (I hope)!

Pair-annihilation why does it occour?


How to i display information from a smart contract on my wordpress website

Question: I want to display specific information from a smart contract on the main ether network on a wordpress website i can't seem to be able to do that, all tutorials only show test networks. the smart contract is already running on the ether network.
Answer: My recommendation is to try and connect your webpage to something like Infura. (https://infura.io/). They have fantastic tutorials, this question is a bit broad to cover in a single answer to be  honest. But looking at Infura should get you started open up a new question if you have trouble with a specific part fo the process or alternatively clearly point us to where exactly you are in the set up process, it is very difficult to help with no details.