Send cmd to ESP8266 from web server

Question: I have just started studying about IoT a few days ago, and now I'm trying to work with the wifi module ESP8266.
I want to do something like this: I send a cmd from Android device to a server, which have some php code to handle my GET or POST data. Then, it will send some data, like json or something, to the ESP8266, and to a micro controller like AVR via UART to handle the changes. And sometime the MCU can send some data to server, and server will noti the android (a reverse process).
I have understood how to send data from wifi module to an URL with Get and Post method (not fully, but maybe enough). I just dont understand how to send message from server to the module! Does the module need to send request to server and get the respone again and again in a loop?!
I am a newbie so please give me a clear and answer! Thanks and sorry for bad English =)
Comment: The MQTT protocol is much better suited for your use case than HTTP. There are lots of tutorials on the net on how to connect an ESP8266 with a android phone using MQTT.
Comment: First time heard about MQTT! I will try out! Thanks :D
Answer: In general servers do not push data to devices for several reasons. The most obvious reason is that the devices are behind routers which effectively hide them from the Internet.

Does the module need to send request to server and get the respone again and again in a loop?

Yes, that is the usual method. The device just needs regular Internet access and routers are usually configured to allow outbound HTTP traffic.

As this isn't an electrical design question it will probably be migrated to one of the other SE sites.
Comment: Thanks for your answer :D I will try getting data with a loop. Not sure how much power it will take?
Answer: You could set up a MQTT broker (available both to the server and the ESP, so you would have figure out the networking and security).
The ESP would subscribe to a particular topic. On the server side you could use phpMQTT to connect to the broker and publish an event. The broker would then notify the ESP.

Send cmd to ESP8266 from web server


How to make a block non-cacheble in default.xml

Question: I want to add a block in header which will not be cached. The block needs to be added to default.xml. I can't set cacheble="false"to the block as it will make all pages non-cacheble ( Reference ). What is the best way to achieve this ?
Answer: You can add the block, but you can not work with visitor-specific elements - such as a customer's name or cart contents - in pure PHP.
Instead, you need to handle the data using Knockout.js
Here is the relevant documentation on this: https://developer.adobe.com/commerce/php/development/cache/page/private-content/
Comment: I have an input field on the block where user can add their zipcode, and after pressing the submit, I am adding the zipcode in a cookie using Js. I know that to update private content, you need to have a sections.xml where you put a controller path , upon hitting which the content refreshes. In my case, I am seeing the old zipcode even after I have set the cookie, and refreshed the page. It updated only after I clean the cache. Should I add `cms/index/index` in sections ?
Comment: It's hard to say without seeing the code, but I guess that you're reading the cookie with PHP? That's wrong; you must read it with JS. If that doesn't work, check if you _controller path_ is correct in sections.xml, and maybe try to update all sections instead of only your own; but again, hard to say without the code.
Comment: @AniruddhaRay if you're setting the cookie via JS, maybe it's wise to populate the field via using JS as well. I mean, keep the field empty by default and once the page is loaded, populate the value via JS.


How do I set up an API key for a user?

Question: The current documentation for creating an API key for user is on the wiki at https://wiki.civicrm.org/confluence/display/CRMDOC/REST+interface#RESTinterface-CreatingAPIkeysforusers. Unfortunately there is not a release for the user friendly API Key extension for CiviCRM 4.5, 4.6 or 4.7. And the manual method is not very user friendly for those who are not programmers. How can a relatively non-technical user set up an API key that is needed for an extension, for example?
Answer: Hopefully a new release will be made for the API Key extension soon. Here are detailed instructions for creating one manually without needing to get access to your database through phpMyAdmin, mysql on the command line or some similar MySQL database administration tool.
Usually it is a good idea to create a special separate contact for each service that needs to use CiviCRM's REST API. Do this at Contact > New Individual, enter a name like Attentive.ly Service, and click Save. At the bottom of your page in small faint type and in the url you can get the Contact ID of the new contact.
Create a 16 character random value for the API Key, eg at http://passwordsgenerator.net/ with settings that exclude special characters, eg
Now use your CiviCRM installation's API explorer to set the API key for your user. Navigate to Support > Developer > Api Explorer v4. Enter the following and click Execute:

For those wanting to use APIv3, navigate to Support > Developer > Api v3 (/civicrm/api3#explorer), and enter the following values then click on the Execute button. Note that the image shows Internal Contact ID as the fieldname. This is true CiviCRM up to version 4.6, but you'll need to select the Contact ID for versions 4.7 and above since it was relabeled in the API Explorer.

You will need to ensure that the contact is given a role that has the appropriate permissions required for the relevant Extension. At a minimum this will include 'Access AJAX API', and unless otherwise specified, 'Administer CiviCRM'.
Comment: Does this need to mention that a User needs creating and eg in Drupal it might be easier to 'create new user' and get the civi contact as a result?
Comment: Very nice!  For completeness, please mark this as answered.  Also, 4.7 changes things just slightly.  The field "Internal Contact ID" is seen as "Contact ID."  Additionally, don't forget to hit Execute to apply the changes.
Comment: I've also updated the Wiki page with a link to this question.
Answer: You need to use the extension which creates an 'API Key' tab on the contact record.
https://github.com/cividesk/com.cividesk.apikey/archive/v1.0.zip
JMC
Comment: It works on 4.2, 4.3, 4.4 and 4.5 in our experience
Comment: I have checked it with 4.7.3 and it's working fine for me.
Answer: To add an API key to an existing contact in API Explorer v4:

navigate to Support > Developer > API Explorer v4.

In the "entity" drop-down menu select "contact", in the "action" drop-down select "update".

In the "where" section select "id" from the "add clause" drop-down and make that equal to the contact id of the contact that you wish to add the API key to.

In the "values" section select api_key from the "add value" drop-down and add your desired API key to the box that appears next to it.

click the execute button.

How do I set up an API key for a user?


FolderBrowserDialog in wpf c#

Question: I am using System.Windows; and System.Windows.Controls; so I can't use System.Windows.Forms; because there is a lot of controls like messagebox and list box...etc are common between them is there another solution to get folderbrowserdialog without using System.Windows.Forms; or is there any get folder location dialog box ?
Answer: You can use the FolderBrowserDialog; either explicitly place the namespace in front of the class...
System.Windows.Forms.FolderBrowserDialog browse = new System.Windows.Forms.FolderBrowserDialog();

...or create an alias with regard to your namespace.
Imports [ aliasname = ] namespace

Comment: The main problem with this approach is that it introduces the need for the System.Windows.Forms assembly reference which then invites other developers to start using WinForms features unintentionally such as MessageBox, etc.
Comment: I got this exception in browse.ShowDialog() the exception is
Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it. This exception is only raised if a debugger is attached to the process.
Comment: @salamonti Looks like you got everything working; being you accepted the answer, let me know if you still need assistance.
Comment: Not sure why but your code above has FolderDialoespaceg();  It should be

new System.Windows.Forms.FolderBrowserDialog();
Comment: @jpierson is right, it's really not nice to use WinForms in a WPF project!
Answer: I have also encountered this using FolderBrowserDialog in WPF with listBox.
because we use WPF, we need to add winform component "FolderBrowserDialog".

right click on the project name or reference, and choose "Add reference"
choose .Net tab and browse for System.Windows.Forms.

So now you can use FolderBrowserDialog in WPF.
private FolderBrowserDialog openFolder = new FolderBrowserDialog();

Here is a link to a post on my blog that contains the image and a short explanation
http://syumulnetwork.blogspot.com/2011/09/myth-self-note-5-c-wpf.html
Answer: See my answer to Select folder dialog WPF for some example code. Basically the Windows Presentation Foundation 4.5 Cookbook recommends that you use the Windows® API Code Pack for Microsoft® .NET Framework if you need a folder browser.
Comment: It seems like this is the only answer on the internet which is not proposing the guilt including WinForms in a WPF project.
You should probably update your answer to include some of its usage, something like this:
using (Microsoft.WindowsAPICodePack.Dialogs.CommonOpenFileDialog dbd = new Microsoft.WindowsAPICodePack.Dialogs.CommonOpenFileDialog()
{
    IsFolderPicker = true
})

FolderBrowserDialog in wpf c#


Is it wise to completely rely OAuth2 for new users and not have our own login(with username and password) system

Question: My question is: Is it fine to build applications where the user login is completely handled by OAuth2 and services like that. That way we do not have to have our own password database for the users. How good this approach would be keeping in mind the user experience?
Also would this approach be easy to implement the multi-factor authentication?
Answer:
Is it fine to build applications where the user login is completely handled by OAuth2 and services like that.

If both the user and the service provider can trust the OAuth2 provider and if OAuth2 is implemented correctly it is fine. Note that this trust also includes privacy: the service provider can see which services the user is using. And there is no general rule if a service provider is trustable or not - it depends on the specific service provider and the specific use case. For example: NSA would likely not use Baidu (China) as OAuth2 provider.

That way we do not have to have our own password database for the users.

The use case of OAuth2 is not only third party provided authentication. It can also be used in-house to provide single sign on to various internal services. In this case you still have your own internal password database.

How good this approach would be keeping in mind the user experience?

In general single sign on and less passwords to remember provide a good user experience. But if you force the user to use an OAuth2 provider he does not like the experience will be bad. This can for example the case when you force privacy sensitive users to login with some social network provider even if these users specifically refused to use social networks so far for privacy reasons.

Also would this approach be easy to implement the multi-factor authentication?

Most large OAuth2 providers offer MFA already.
Comment: As a user I tend to avoid those "Login with!" buttons, and (especially for social media sites, which I refuse to use) frequently don't have the necessary accounts anyway.  I'd much rather use a password manager with an individual login on each site.  As a result I'd probably fall under "the experience will be bad".  Then again I may or may not be your typical user.
Answer: I think you are confusing "social login" with "OAuth". A social provider may or may not use OAuth. And an OAuth provider may or may not be a public IDP.
If the question is "Should I use social login". I would say... it depends on your security requirements. If you can accept the inherent risk (i.e. lack of identity proofing), it's awfully convenient for the user. And you don't have to build a password reset or other IDM flows. And you won't have to protect passwords (which are like toxic waste).
If you are using an external IDP (i.e. social login), you will rely on them to provide MFA (as suggested above).
Answer: I have rejected multiple services in the past because they only used only external SSO(single-sign-on)-services (especially only ones that are on my personal blacklist).
Why did they get on my blacklist:

Facebook and similar for privacy reasons
Requires a verified phone-number (for privacy reason, I only give my phone-number when there is a reason and just for login is not a valid reason)
SSO-providers which repeatedly deleted/locked my account for no reason after a month (or suddenly required me to give them my full real name, address, photo (!), verifiable phone-number(!) and a scan of my passport (!)). I used the account for nothing else than for a simple product activation for a free(!) product and they locked it for "suspicious behavior". The most likely reason for this blocking was likely that I insert a fake name (why would they need my real one?) and that I didn't provide enough personally identifying information.

So you should check, if you are really OK with this. Also you should think about what you would/can do, if an important user gets blocked by your SSO-provider because they not only verify the password but they also decide whom they don't let in. Also think about the case, when there is an outage at the SSO-provider and your administrators/moderators/... needs access and you can't because of the outage or they are blocked.


Normalize data from different groups

Question: I have data that has been grouped into 27 groups by different criteria. The reason for these groupings is to show that each group has different behavior. However, I would like to normalize everything to the same scale. For example, I would like to normalize to a 0-1 scale of 0-100, that way I could say something like $43^{rd}$ percentile and it would have the same meaning across groups. If I were to just, say, standardize each individually by subtracting the mean of each and dividing by standard deviation, would this work? Would I have to calculate the mean/standard deviation of all of the combined data or do each of the 27 groups individually?
Answer: You can normalize each criteria independently in values between 0 and 1 without taking into account the other criterias, it will work better for most classification methods k-nearest neighbors, random forest, neural network, etc.
$$x^*_{i,j}=\frac{x_{i,j}-x^{min}_j}{x^{max}_j-x^{min}_j}$$

Normalize data from different groups


PROMAX DECIPHER hydraulic brake hose replacement

Question: I have a set of PROMAX Decipher hydraulic brakes and need to replace the hose cable (basically adapt these brakes to another bike and the cables length is longer). I would like to know how to split the cable from the bolt and golden part of the picture.
Thanks in advance.
Answer: Slide the threaded ferrule away from the end and you should see that the gold-colored insert is pressed into the end of the tube.
It pulls out but you may find it difficult to remove since it's barbed.  If needed, carefully split the tubing to remove it.  Heating the assembly to soften the tubing can also make removal easier.
I think it's best NOT to reuse these components as replacements are inexpensive and it's easy to have a leak with your new lines.
Here is what the parts look like:
Comment: Thanks for the comment, I got to remove them. Any hint where can i find this replacements?
Comment: Where in the world are you?  The site I found the above photo was in the UK.
Comment: Search for "promax hydraulic brake hose fittings" and you'll see multiple options.
Comment: I am in Finland, but any seller that ships is ok.
Answer: Actually, I have these replacements, but I don't think will fit the inner part of the brake. Or will it?
In addition, the tube is slightly smaller.
Comment: Those are for Shimano. The design of the seal is radically different. Won't work safely.
Comment: That's what I thought. But cannot find the proper replacements of that model


System.Windows.Media.DrawingVisual.RenderOpen() erroring after a time

Question: Use Case: I'm using WPF to dynamically overlay text on images within a web context.
Solution:
I'm using a DrawingContext from a DrawingVisual (wrapped in a using statement) to draw the original bitmap and overlay text.
Problem: After a few thousand requests the [DrawingVisual].RenderOpen() method starts refusing to execute and throws the following exception:
The system cannot find the file specified System.ComponentModel.Win32Exception UInt16 RegisterClassEx(WNDCLASSEX_D) at MS.Win32.UnsafeNativeMethods.RegisterClassEx(WNDCLASSEX_D wc_d)
at MS.Win32.HwndWrapper..ctor(Int32 classStyle, Int32 style, Int32 exStyle, Int32 x, Int32 y, Int32 width, Int32 height, String name, IntPtr parent, HwndWrapperHook[] hooks)
at System.Windows.Media.MediaContextNotificationWindow..ctor(MediaContext ownerMediaContext)
at System.Windows.Media.MediaContext..ctor(Dispatcher dispatcher)
at System.Windows.Media.MediaContext.From(Dispatcher dispatcher)
at System.Windows.Media.Visual.VerifyAPIReadWrite()
at System.Windows.Media.DrawingVisual.RenderOpen()
at ...

Temp fix: The only fix for this is to recycle the IIS application pool on the server which fixes the problem for a few hours.
Question: Anyone have a thought on the cause of this issue (leaks, threading, unmanaged code etc)? Is there any other way of getting text on an image avoiding the drawing visual? Perhaps writing geometry to a bitmap and overlaying the bitmaps directly?
Comment: I'm having a similar problem: http://stackoverflow.com/questions/5195808/wpf-formattedtext-the-system-cannot-find-the-file-specified-exception-in-a-serv
Comment: Can you share a code snippet of how you're getting the DrawingContext and the DrawingVisual? Why not just recycle the DrawingVisual? Are you allowing the Dispatcher to pump?
Comment: I know this is an old question, however does the process leak memory or handles? Seems maybe a hang dump would help get to the root of the problem?
Answer: This is an old patch - and I would have assumed it was included in .NET 4.x - but I'm not so sure.  Anyways - You can give it a shot.
» Discussion & Bug Report
».NET Patch(x86)


Online Voter fraud

Question: I'm hosting an online singing competition that's at the finale 2 contestants with a cash prize over $10,000 plus a duet with a well known artist in that genera. What we found was that 2 of the finale 4 contestants found a way at to multiply their votes dramatically on the semi finale round. They where between 15k-20k votes while the other 2 barely pushed passed 3K votes. Needless to say I warned them they continued and are no longer in the contest. This is the first year doing this contest and were looking to incorporate stronger security measures been that the prizes will be higher every year. More importantly than the money we are trying to run a new platform with a good reputation. We don't want to scare people away from voting but we want to minimize the fraud.
Comment: And your question is...
Comment: You've told us nothing about your existing voting system or the problems with it.  It's impossible to offer any advice at all until you add detail to the question.
Comment: Probably not an ideal solution, but you could require an account to vote, disallow multiple accounts per email address, and make it one vote per account. At least then someone would have to go through the trouble of setting up an email address for each vote.

Ideally, each account would have a private key (stored externally to the system) which they use to sign their vote to make sure an attacker can't change existing votes.

Edit: Maybe verify accounts by sms and disallow multiple accounts per phone number?
Comment: you could use a blockchain to authenticate votes. or a slow derivation process, ~30s of client time to vote to limit hammering. Anyone can tampermonkey a page, fewer can rip hashes with a GPU to over-vote.
Answer: I'd use, in addition to standard IP limiting, recaptcha or some other proven captcha system. What they most certainly did was/or found someone who could script your voting API and just churned out votes. With a captcha, and a strong one at that, each voter would need to prove that they are at least human. Google's recaptcha is great because it heuristically decides if the user is valid and so normal people (aka people who have Google accounts..) can just click the fancy checkbox and be good in three seconds. There have been some recaptcha attacks but really they're slow and experimental.
Vote fraud is so difficult that even all the governments of the world haven't been able to solve it. Since you can't jail people for fraud you need to make it as difficult as possible to automate votes. There's really no easy answer beyond "throw a captcha at it". Maybe you have some vulnerability where they were able to modify the vote table directly? Very open ended.

Online Voter fraud


Where does Drupal store its url/domain name?

Question: I created a site using an IP address and imported a live site on another server, then I made the domain name live on the new server created with the IP address.  Since then I get permissions error for the admin when logged into the domain name/ url.  However if the same admin logs in using the IP address, I can see the broken links report. Otherwise it says I don't have permissions.    I'm trying to reset the root domain url but uncommenting it in the settings file doesn't fix the permissions issue. I think it is something deep in the DB
Answer: Check https://www.drupal.org/node/776864 under Troubleshooting - No user login. It might help.
Basicly, it says Enable clean URLs, check Apache config, check .htaccess, you probably want to uncomment rewritebase. Also check that "$cookie_domain" is not set to your old domain.
Answer: The main places that the domain will be affected are:
1) DNS
2) .htaccess - Look for the RewriteBase setting AND RewriteEngine on
3) settings.php - Look for $base_url and $base_path
Don't forget to clear the cache after you change these settings.  If you can't access the site, use drush cc all or login to your database and truncate all tables that start with cache_ (sometimes clearing the cache still leaves persistent entries).


Contacts missing on new Galaxy Core Prime

Question: My phone was stolen and they deleted my contacts. They must be backed up somewhere? How can I restore them to my new Galaxy?   Everything else came back.
Answer: Did you select an online/synced account as the location for your contacts?
You can simply login to your former account and synchronize the contacts to your new device.
Did you select SIM card as the location?
I hope you've got that card. Simply put it in your device and your contacts are back. Move them to an online account or do whatever you want with them.
Did you select phone or device as the location?
Well, there are your contacts now. And they won't leave your device any time soon.
Some manufacturers offer you to sync those contacts to their services anyways so maybe you can login to that account and restore your contacts.


Which thermostat for both forced air and baseboard heating

Question: I recently purchased a Bosch 2 stage central a.c. with a heating inverter. I have baseboard heating and but have a large and opened family room so didn't want to run more pipes. The Bosch will work up to 5 degrees but living on long island temps sometimes get colder so I still have to use the baseboard heating. Any recommendations regarding a smart thermostat that will control both heating systems? I have the honeywell 9000 but I funny believe will control both. I appreciate any suggestions.
Answer: The W2 (Aux/E) terminal on the thermostat is for a second stage heat relay or heat pump auxiliary / emergency heat.
Note that this is to energize a relay or contactor coil, which will in turn energize your baseboard heaters;  you can't directly switch baseboard heat with the Honeywell 9000.
Selecting a contactor or contactors and rewiring your baseboard heat so that it is controlled by the smart thermostat rather than the line voltage thermostats you're using now could be an easy job, could be a hard job, depends on the existing wiring.


Would fast oscillating charged object emit light?

Question: If I were able to mechanically oscillate an electrically charged object at frequencies of 430-580 THz, would the object emit light?
Answer: Yes. In fact, that's what happens with very hot objects like the atoms of light bulb filaments.
Answer: Oscillation is defined as mechanical vibration.
You are basically asking about thermal radiation, so I will assume your electrically charged object is part of a medium.

Thermal radiation is electromagnetic radiation generated by the thermal motion of particles in matter. All matter with a temperature greater than absolute zero emits thermal radiation. Particle motion results in charge-acceleration or dipole oscillation which produces electromagnetic radiation.
    Thermal radiation, also known as heat, is the emission of electromagnetic waves from all matter that has a temperature greater than absolute zero.[3] It represents the conversion of thermal energy into electromagnetic energy.

Thermal energy consists of the kinetic energy of atoms and molecules in matter. All matter by definition is made up of particles with kinetic energy, and these interact. Now atoms are made up of charged particles, and the kinetic interaction between the particles creates charge acceleration and dipole oscillation.

This results in the electrodynamic generation of coupled electric and magnetic fields, resulting in the emission of photons, radiating energy away from the body through its surface boundary.

https://en.wikipedia.org/wiki/Thermal_radiation
You might be asking about a free (not in a medium) oscillating object with EM charge. As per SR, the answer is yes, the charge will emit EM radiation.
Now it is very important to understand that of your object is an elementary particle with EM charge, like an electron, then a free (in vacuum, not interacting with an external EM field) electron will not emit EM radiation. In your case, you are asking about an oscillating charge. To have oscillation, there must be a external EM field, that makes this charged object oscillate. In this case, the answer is yes, the oscillating charged object will emit EM radiation (but in this case the object is not free).
Comment: I actually mean mechanical vibration. So rather than heating it up, if I'd vibrate the entire object at these frequencies
Comment: @user1282931 you need to vibrate it with something. Is that an external EM field?
Comment: Does that matter? Let it be a fast rotating offset weight.
Answer: Even a slow oscillating charged object does create light; that's how a radio antenna
emits (long-wavelength) electromagnetic radiation, a kind of light.   There
is a radio-frequency current forced into the antenna, the current being
an oscillating movement in the mobile charges in the metal of the antenna.


How to resolve IIS 500.19 with Error Code 0x8007000d to run .net core 2.2

Question: I am not able host the asp.net core 2.2 web api on windows server 2019 iis 10.
I get HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid. I created self contained deployment and even install url rewrite also. But still i am not able to resolve this error. Please help me resolve this issue
Detailed Error Information:
Module     IIS Web Core
Notification       Unknown
Handler    Not yet determined
Error Code     0x8007000d
Config Error
Config File    \?\F:\Publish\Renault\web.config
Requested URL      http://localhost:9095/
Physical Path
Logon Method       Not yet determined
Logon User     Not yet determined
Comment: Did you install dotnet core hosting bundle?
Answer: Finally i got the resolution. After installing ASP.net core 3.1.7 hosting model my problem got resolved.
https://download.visualstudio.microsoft.com/download/pr/21a5322f-cf9c-40e0-af41-4cdf14b3fb17/ff1390906525099bcd6b322279e09938/dotnet-hosting-3.1.7-win.exe


How can I prove the existence of rest points in rigid motion with all speeds orthogonal to $\vec{\omega}$?

Question: If in a rigid motion there is a point at rest, then all speeds are normal to $\vec{\omega}$ (assumed $ \neq \vec{0}$), to prove choose the rest point as origin and explot fundamental equation of rigid motion: you find $\vec{v}_P = \vec{\omega} \times \vec{r}_P$. But how can i prove the vice versa: if all speeds are ${\perp}$ to $\vec{\omega}$ then it exists a rest point (and so infinite rest points)?
Answer: I think you need to add at least one extra assumption and/or to more precisely state your hypothesis and thesis.
Here is the (silly, but still...) counterexample: consider a translation at a uniform velocity perpendicular to your $\vec{\omega}$... it is rigid and it has no rest point.
[Addition after first comment]
Sure, you assumed that $\vec{\omega}\neq\vec{0}$ but you have not declared WHAT $\vec{\omega}$ is. In the absence of further info, to me this is just a generic vector. Based on your comment I guess you also want to assume that $\vec{\omega}$ is some sort of "rotation direction"? Then my next question is: what do you mean by that, exactly?
I continue with guessing here... then I guess that indeed your initial assumption is that the velocity field has the form
$\vec{v}(\vec{r}) = \vec{v}_0 + \vec{r}\times\vec{\omega}$
for some unknown $\vec{v}_0$ and what you are wondering here is if/how this can be written as $\vec{v}(\vec{r})=(\vec{r}-\vec{r}_0)\times\omega$, with a fixed point $\vec{r}=\vec{r}_0$? If I am guessing right and I am interpreting correctly your initial hypothesis, then the proof is not difficult. Requiring $\vec{v}(\vec{r})$ to be always perpendicular to $\vec{\omega}$ is equivalent to state that
$\vec{v}(\vec{r})\cdot\vec{\omega}=0$
for any $\vec{r}$, which in turn implies
$(\vec{v}_0+\vec{r}\times\vec{\omega})\cdot\vec{\omega}=\vec{v}_0\cdot\vec{\omega}=0$
so the hypothesis implies that our unknown $\vec{v}_0$ has to be perpendicular to $\vec{\omega}$ too. You can then exploit the expansion of the triple product
$(\vec{v}_0\times\vec{\omega})\times\vec{\omega} = -\vec{v}_0(\vec{\omega}\cdot\vec{\omega})+\vec{\omega}(\vec{v}_0\cdot\vec{\omega}) = -\omega^2\vec{v}_0$
where $\omega$ is obviously the norm $|\vec{\omega}|$ (note here we used $\vec{v}_0\cdot\vec{\omega}=0$ to drop one term, otherwise we end up with a screw transformation). If $\omega$ is not zero (and here we exclude the silly counterexample above), then you can rewrite your velocity field as follows
$\vec{v}(\vec{r}) = -(\vec{v}_0\times\vec{\omega})\times\vec{\omega}/\omega^2+\vec{r}\times\vec{\omega} = [\vec{r}-(\vec{v}_0\times\vec{\omega})/\omega^2]\times\vec{\omega}$.
So here is your fixed point:
$\vec{r}_0 = (\vec{v}_0\times\vec{\omega})/\omega^2$
and the whole axis $\vec{r}_0+\lambda\vec{\omega}$ for $\lambda\in\mathbb{R}$ is fixed... the rotation axis.
Comment: I assumed $\vec{\omega}\neq\vec{0}$ so translatory motion Is excluded.
Comment: Ok but you have not said what $\vec{\omega}$ is for you! In the absence of info to me this is just a vector  ¯\_(ツ)_/¯. But I guess that to you this is not a generic vector, so next question is ... what is ur exact initial hypothesis on the velocity field? Possible guessed answers in the updated text above!
Comment: $\vec{\omega}$ is nothing but the vector that we know exists by Poisson's theorem. Anyway thank you I will reflect on what you and others have written.
Comment: Welcome. Can you formulate Poisson's theorem or provide a link? I know about Poisson brackets, about the Poisson distribution... I cannot recall any "Poisson's theorem" in connection to rigid motion.
Comment: I found this theorem in the beginning of this very interesting page : https://www.dma.unifi.it/~frosali/meclab/labanc/motrigid/motrigid.htm  I can't understadnd the proof after "rimarrebbero da da definire" but anyway I developed a different proof by myself
Answer: Your strategy might be

Show that all rigid motion is a combination of rotation plus translation
Rotation is rotation around an axis. If there is no translation, the axis is fixed.
If there is translation, the axis is moved to another place. Find the place.
Answer: Theorize there exists such a point C such that the velocity of any other arbitrary point P is found with
$$\vec{v}_P = \vec{\omega} \times (\vec{r}_P -\vec{r}_C) \tag{1}$$
Now find where $\vec{r}_C$ by using the vector triple product $a\times(b \times c) = b ( a \cdot c) - c (a \cdot  b)$
$$ \require{cancel} \begin{aligned} \vec{\omega} \times \vec{v}_P & = \vec{\omega} \times \left(  \vec{\omega} \times (\vec{r}_P -\vec{r}_C) \right) \\
 & = \vec{\omega}( \cancel{\vec{\omega}\cdot(\vec{r}_P -\vec{r}_C)}) - (\vec{r}_P -\vec{r}_C) ( \vec{\omega}\cdot \vec{\omega}) \\
 & = (\vec{r}_C - \vec{r}_P) \omega^2 \\
 \vec{r}_C &= \vec{r}_P + \frac{\vec{\omega}\times \vec{v}_P}{\omega^2}
\end{aligned}$$
The above assumes we are considering only points on the plane of rotation about P which is why $\vec{\omega}\cdot ( \vec{r}_P - \vec{r}_C) = 0$. Also above I use the shortcut $\omega = \| \vec{\omega} \|$, or $\omega^2 = \sqrt{ \vec{\omega}\cdot \vec{\omega}}$.
So we can always find a point C located at $$\vec{r}_C = \vec{r}_P + \frac{\vec{\omega}\times \vec{v}_P}{\omega^2} \tag{2}$$
which describes the location of the rotation axis. Now, this point isn't unique, as any point parallel to $\vec{\omega}$ would also be valid for (1).

Edit 1
The general motion of a rigid body is described as the translational velocity of a point P, and a rotation about P at the same time. This motion has 6 independent quantities that can be specified.
There exist an axis in space (rotation axis), parallel to $\vec{\omega}$ and through a point C such that the translational velocity of the body on this locus in space is purely parallel to the rotation, $\vec{v}_C = h\,\vec{\omega}$. The ratio of magnitudes between the translational and rotational velocity at C is a scalar value called pitch $h$.
The velocity of P is found by
$$ \vec{v}_P = h\,\vec{\omega} + \vec{\omega} \times (\vec{r}_P - \vec{r}_C)
 \tag{3} $$
So given the rotation $\vec{\omega}$ (3 components) the location long the rotation axis $\vec{r}_C$ (2 components, since C can slide along the axis) and the scalar pitch value $h$ (1 component) , equation (3) gives the translational velocity of any other point. There is a 1:1 relationship between the general motion $\{\vec{v}_P,\vec{\omega}\}$, and describing the motion by the rotation axis, rotational velocity and pitch  $\{\vec{r}_C, \vec{\omega},h \}$.
So how do we go in reverse? Use $\vec{\omega} \cdot \vec{v}_P$ and $\vec{\omega} \times \vec{v}_P$ to come up with the rotation decomposition parameters
$$ \vec{r}_C = \vec{r}_P + \frac{\vec{\omega} \times \vec{v}_P}{\omega^2} \tag{4}$$
$$ h = \frac{\vec{\omega} \cdot \vec{v}_P}{\omega^2} \tag{5}$$
You can prove the 1:1 relationship by plugging in (4) and (5) into(3). The 1:1 relationship also proves the existence since each motion possible can be described by the rotation axis location and pitch.
There is a special case of pure translation with $\omega=0$, and in that case, the rotation axis is at infinity, and pitch is infinite also. When this is the case then $\vec{v}_P = \vec{v}_C$.
Appendix
Read more about the rotation axis and the terms twist and wrench that describe the motion and loading of rigid bodies geometrically.
Comment: @Haumea - see edit to expand more on the idea of a rotation axis, and let me know if this helps, or if you have any further comments.
Comment: It looks that that proof works if we assume that a rest point exists, and if it exists we can find it with (2), but in general we are not sure a rest point exists (think to a rigid body rotating while moving forward) and this confuses me. Where the proof fails in this case? I suppose in assuming the existence of some point C such that (1) works.
Comment: Point **C** is not a physical point and therefore can move around arbitrarily. The velocity of the rigid body at **C** is guaranteed to be parallel to the rotation axis. The point does not have velocity in terms of rate of change of position, it has a velocity of whatever particle on the rigid body happens to pass over that location.
Comment: I thought what follow. You generalize by using (3) instead of (1). This doesn't trouble me, it is Mozzi's theorem. And it is a good idea because going on the previous proof is the same because of cross product with $\vec{\omega}$. But in this case the point $\vec{r}_C$ we found is in motion at speed $h\vec{\omega}$. It is at rest iff $h=0$. But looking to (3) this condiction is the same as saying that $\vec{v}_P \perp \vec{\omega} \quad \forall P$. This would answer my question. This looks working.


My blending options are gone

Question: Usually when I right click on the layer on the left and press blending options the dialogue box that appears has a list of blending option including stroke, shadow, glow, gradient, etc. For some reason all of a sudden there is only stroke. I was playing around with photoshop earlier and I think maybe i turned on a setting that made it do this. Any idea how I can get the options back?
Answer: Click Blending Options, hit the FX on bottom right, Reset to Default List
Comment: @RyanCarney no problem, if you don't mind marking this the correct answer so it doesn't appear in the unanswered list we'd appreciate it (also stop SE Bot from bumping it randomly)

My blending options are gone


What is Adobe Server 3?

Question: My nmap scan revealed the port with adobeserver3 label (TCP 3703). What is Adobe Server 3, and what does it do?
Answer: I would guess that "Adobe Server 3" refers to Adobe flash media server
However although a port may be registered with IANA for a particular purpose, there is nothing to stop you configuring almost any service to listen on that port (e.g. an Apache HTTPD server). Alternatively there is nothing to stop some malware listening on that port for remote control or command connections.
Use netstat to identify the program listening on that port.
Answer: The port 3703 is used by the Adobe Version Cue server. This will be the application this is referring to.

What is Adobe Server 3?


Who was the Rishi Katyayan who became father of Goddess Katyayini?

Question: In the Nava-Durga the sixth form is of Goddess Katyayini & I have heard that Goddess Durga became the daughter of Rishi Katyayan that is why she was given this name. I want to know who the rishi was and how could he obtain the Supreme Goddess as his daughter?
Answer: We find a brief story of emergence of goddess Katyayani at the ashrama of hermit Katyayana  In Vamana Purana- Chapter 18 - Description  of greatness of Goddess-Verses 6-13.  And from that we come to know him and how he gave birth to Goddess Katyayani.
Brief story Of Birth Of Devi Katyayani from Vamana Purana-
Once demon Mahishasura defeated all the gods from heaven. All the gods then went to Lord Vishnu for help with the lead of Brahmadeva. There they saw Lord Vishnu and Lord Shiva being seated together. Gods told all the deeds of Mahishasura to them and asked for their help. Vishnu-Shiva-Indra then got filled with anger. As a result of their anger   a ray (splendor or Teja )came out from their mouths. And that ray got crstallised like ridge of the mountain  in the ashrama of  Maharshi Katyayana . He then processed that   splender and it gave birth to an goddess called Katyayani.

ततोऽनुकोपान्मधुसूदनस्य सशंकरस्यापि पितामहस्य।  तथैव शक्रादिषु
  दैवतेषु महर्द्धि तेजो वदनाद् विनिःसृतम् ।। 18.6  ।।  तच्चैकतां
  पर्वतकूटसन्निभं जगाम तेजः प्रवराश्रमे मुने। कात्यायनस्याप्रतिमस्य
  तेन महर्षिणा तेज उपाकृतं च ।। 18.7 ।। तेनार्षिसृष्टेन च तेजसा वृतं
  ज्वलत्प्रकाशार्कसहस्रतुल्यम्। तस्माच्च जाता तरलायताक्षी कात्यायनी
  योगविशुद्धदेहा  ।। 18.8 ।।
As a result of anger built up in the minds of Madhusudana , Shankara ,
  Pitamaha and Indra etc. gods , rays came out from their mouths. O
  hermit ! that ray was crystallised like the ridge of a mountain  in
  the ashrama of Katyayana hermit. That hermit processed (Upabrhana)
  that splendor. That crystallised splendor of all the gods and duly
  processed start glowing like several thousand suns. Such combination
  of splendor gave birth to caprice and to a huge eyes and purified body
  , a goddess called Katyayani.

How could he obtain the Supreme Goddess as his daughter?
From the above story we came to know that Rishi katyayana was having very great merit (splendor) and powers . So that he could process  beams of light radiating from the bodies of the gods and from that processing goddess was born. So he was technically did not gave birth to the goddess , but he made the appearing of the goddess  possible through his powers , by processing the teja (splendor) of gods like Vishnu , Shiva , Brahma and Indra and that is why  he is considered as father of devi katyayani.

Why she was given this name.?
The answer is also provided in vamana purana shloka 13.

तथार्षितेजोत्तममुत्तमं महन्नाम्ना पृथिव्यामभवत् प्रसिद्धम् ।
  कात्यायनीत्येव तदा बभौ सा नाम्ना च तेनैव जगत्प्रसिद्धा ।। 18.13 ।।

The great and supreme splendor of hermit was popularly known as
  Katyayani and the goddess so originated became famous in this universe
  with the same name Viz. Katyayani.

The goddess Katyayani is called so because she was born from the great merit or splendor of rishi Katyayana. i.e. because he processed the tejas of gods from his merit  and from that the goddess was born. So the goddess is called as Katyayani  after the name of Rishi Katyayana.

I want to know who the   Rishi Katyayana was.?
We find several personalities called as Katyayana who wrote or are author of various works like  Vartikas on Paniniya sutras  and a son of Somadatta. Another is author of  Chandra-Vākyās and several names from Tamil Nadu and kerala.
But since we are interested in Rishi Katyayana who is associated with hinduism and mentioned in Hinduism scriptures lets see one Rishi Katyayana mentioned in Garuda Purana -Achara Kanda - Chapter 205  to whom Skanda or kumara narrated the rules of grammar.

कुमार उवाच ।  अथ व्याकरणं वक्ष्ये कात्यायन समासतः ।
  सिद्धशब्दविवेकाय बालव्युत्पत्तिहेतवे ॥ GP 1.205.1 ॥
Kumara said : O Katyayana , I shall briefly expound the rules of
  grammar which will enable infants to easily comprehend that subject
  and to understand the formation of word.

So the above mentioned Rishi
 Katyayana is a grammarian.

David Frawley in his book Vedic Yoga: The Path of the Rishi is also quoting from Rishi Katyayana

Other internet sources are mentioning that he is related with clan of Vishwamitra and gave birth to Shukla yajurveda Katyayana Branch. Unfortunately we are not very much sure about who exactly among these this story of Katyayani Devi  is associated. He name is just briefly  mentioned in Mahabharata but apart from this we won't get any stories related to Rishi katyayana from Hinduism scriptures. .
Comment: Very nice answer SwiftPushkar
Comment: Thanks for providing so many details. If you find more about the lineage and early life of the rishi please add that also.
Answer: I was reading the Katha-Sarit-Sagar and came across this name so am sharing with you the details of Rishi Katyayan as per this particular story. I couldn't find an online english version of the text so am sharing the scrrenshots of the relevant portion here along with a summary:

Rishi Katyayana was originally a Shiva ganna named Pushpadanta who had earlier been a human named Devdatta who managed to please Lord Shiva and ask for his blessings to become his attendant. He used to live on Kailash with his wife Jaya serving Lord Shiva and Goddess Parvati. Parvati, who had wanted Shiva to tell her a story that no one else knew but Pushpadanta, managed to overhear it.

The Goddess did not like the idea of Pushpadanta knowing a story that was meant only for her ears and therefore cursed him to become a mortal on earth. Pushpadanta's friend Malyavan who had been his brother in the human form tried to intercede on his behalf but he was also cursed similarly.

Pushpadanta lived his life as Vararuchi also known as Katyayan and faced many ups and downs as a human. He worshipped Goddess Durga and finally got to meet the Pishach Kanabhuti who told him the way to get rid of the curse:

This story that Katyayana narrates to Kanabhuti is the same one that he had heard from Lord Shiva and is believed to have been in seven parts. But only one of them survived and is now known as the Kathasaritsagar.
After narrating the story he goes back to the forest to worship the goddess to help him give up his body. Though the Kathasaritsagar doesn't mention the incident of him siring the goddess or shaping the energy beam as mentioned in the other answer, his connection to the goddess Durga/Parvati is unmistakably there throughout the text.
EDIT:
I came across another reference in the Agni Purana that mentions Skanda or Kartikeya teaching Katyayan the rules of Sanskrit grammar:

O Kātyāyana! I shall describe the essence of grammar [i.e., vyākaraṇa-sāra] that is of the form of perfected words for imparting to the beginners..

This and the further chapters with below mentioned titled=s cover many rules followed in Sanskrit and give the sense of Katyayan possibly being a grammarian:
Chapter 349 - The pratyāhāras and fundamental rules in Grammar (vyākaraṇa)
Chapter 350 - The forms of completed euphonic combinations (sandhi)
Chapter 351 - Perfected forms of inflection in the nouns
Chapter 352 - Narration of the finished forms of the substantives in the feminine
Chapter 353 - The finished forms of substantives in the neuter
Chapter 354 - The relation between a noun and a verb in a sentence (kāraka)
Chapter 355 - Different kinds of compounds
Chapter 356 - The formation of taddhita (secondary nominal bases)
Chapter 357 - Adding primary affixes known as uṇādi
Chapter 358 - The completed forms of the verbs after adding the conjugational signs
Chapter 359 - Adding the kṛt affixes (primary affixes added to verbs)
Chapter 360 - Synonyms denoting the celestial region and the nether world
I hope this helped you know a little more about the rishi's origins.
Comment: Wow thank you so much sir for providing these details! So the rishi was a Shiva Gana cursed by the Goddess which in turn made him help her manifest as Katyayini.. That is planning of a different level altogether by the gods.
Comment: Haha yes @Viraj seems more like a surgical strike planned by the current government ;)
Answer: @SwiftPushkar has given a nice answer. Here some more detail extracted from the 13th chapter of the Guhyakālīkhaṇḍa of the Mahākālasaṃhitā is added.
Kātyāyana was the son of Yāgñavalkya through his 2nd wife Kātyāyanī (the first being the celebrated Maitreyī) as per Skandapurāṇa : Nāgarakhaṇḍa : Chapter 31. His āśrama was situated in the Himalayas. Once Mahiṣāsura happened to pass by his āśrama situated in the Himālaya while Kātyāyana was out collecting wood, leaving his śiṣya Kapota to protect the āśrama through his Yogic powers. Being the troublemaker he was, Mahiṣasura assumed the form of a woman & successfully seduced Kapota. Devoid of Yogic protection, the Dānava army accompanying Mahiṣasura desecrated the āśrama & left. When Kātyāyana came back, he saw his āśrama wrecked & his śiṣya Kapota in a compromising position with a woman in open air nearby. Kātyāyana was able free Kapota from the clutches of the woman & cursed Mahiṣasura to be killed by a woman in battle.
Mahiṣasura, at first laughed off at the concept of a woman being able to fight with him in battle, but Kātyāyana made him conscious about the powers of austerities (in Kātyāyana's own words, ṛṣi's don't carry weapons for their curses are their daggers & their anger is their khaṛga) & the greatness of ṛṣis (Gautama making Indra's body covered with vaginas, Durvāsā's curse making the Lakṣmī abandon Svarga to the great distress of the devas, Agastya's drinking of the ocean, Kapila's burning of the thousand troublemaking sons of Sagara, Visvāmitra's creation of a 2nd Svarga, Parāśara's creation of the submarine fire, Indra's harassment at the hands of the kṛtyā created by Cyavana were cited as examples). Kātyāyana then goes to inform Mahiṣasura about the existence of a woman (Bhagavatī Ādyāśakti) whose beauty outshines even that of the devīs like Lakṣmī, Rati & Śacī, putting even the likes of heavenly courtesans like Rambhā, Ghṛtācī, Menakā, Urvaśī & Tilottamā to shame. After describing her beauty, Kātyāyana then describes her attributes (in his words, Her playfulness excels that of Kāmadeva, Her forgiving nature exceeds that of Bhūdevī, Her strength exceeds that of Vāyu, Her seriousness exceeds that of Sarasvatī, Her firmness exceeds that of Meru, Her prowess in gaining victory in battles exceeds that of Viṣṇu, Her weight-lifting capabilites exceeds that of the divine tortoise who supports Ananta, the carrier of the earth & Her anger exceeds that of Kāla & Yama).
When Mahiṣasura inquires about the whereabouts of such a woman, Kātyāyana replies that She is omnipresent & then proceeds to harshly rebuke the tyrant by stating that the stature of Mahiṣasura (who has conquered the all the 7 underworld realms, earthly realm & Svargaloka) before Her is like that of a frog before Śeṣanāga, a rabbit before a lion, a drain before the river Gaṅgā, a firefly before the moon, a yāma (unit of time equal to ¼th of daytime) before a yuga & a single night before the end of a kalpa.
Incensed at being insulted in this way, Mahiṣasura tells Kātyāyana to make that woman manifest before him or else he will kill him. So Kātyāyana proceeds to a nearby bilva tree & prays to Jagadambā present in it to protect him. Bhagavatī answered his prayers & manifested out of that bilva tree, wielding bow & arrows, seated on a lion, surrounded by 4 maids, in midst of a a blinding mass of light comparable to a crore of suns. Mahiṣasura was eager to fight on the spot but was dissuaded by his advisors, who saw the turn of events as an ill-omen. So Mahiṣasura then left the āśrama.
Now as per Kālikapurāṇa, when the devas were at Svetadvīpa to complain about Mahiṣasura to Bhagavāna Viṣṇu, Bhagavatī Ādyāśakti manifested before them & directed them to assemble at ṛṣi Kātyāyana's āśrama in order to solve their problems. Here She manifested out of the energies of all the devas (combined by Kātyāyana) as famously described in the Devīmāhātmya.


Diophantine equations: ternary forms

Question: Thue proved that all Diophantine equations consisting of an irreducible binary form (cubic or higher) equal to a constant, i.e.,
$$c_nx^n+c_{n-1}x^{n-1}y+\cdots+c_oy^n=k$$
($n,k$ fixed) have finitely many solutions.  What is known about equations that are ternary rather than binary forms?  I.e.,
$$c_{n,0}x^n+c_{n-1,1}x^{n-1}y+c_{n-1,0}x^{n-1}z+c_{n-2,1}x^{n-2}yz+\cdots+c_{0,0}z^n=k$$
with $n,k$ fixed.
Answer: For example, $x^3 + y^3 - 2 z^3 = 0$ has infinitely many solutions.
Comment: Or $x^n + y^n - 2z^n = 0$, for arbitrary $n$
Answer: Here are a few papers about ternary forms of degree at least 3:
MR0006740 (4,34c)
Mahler, Kurt
Remarks on ternary Diophantine equations.
Amer. Math. Monthly 49, (1942). 372–378.
MR0025489 (10,14c)
Huff, Gerald B.
Diophantine problems in geometry and elliptic ternary forms.
Duke Math. J. 15, (1948). 443–453.
[Note: this paper studies $ax(y^2-z^2)=by(x^2-z^2)$]
MR0062767 (16,14g)
Selmer, Ernst S.
A conjecture concerning rational points on cubic curves.
Math. Scand. 2, (1954). 49–54.
MR0167460 (29 #4733)
Oppenheim, A.
The rational integral solution of the equation $a(x^3+y^3)=b(u^3+v^3)$ and allied Diophantine equations.
Acta Arith. 9 1964 221–226.
MR0376520 (51 #12695)
Dofs, Erik
On some classes of homogeneous ternary cubic Diophantine equations.
Ark. Mat. 13 (1975), 29–72.
[Note: this paper studies $ax^3+by^3+cz^3=dxyz$]
MR1704332 (2000h:11033)
Bayadilov, E. E.
On the divisor problem for values of a ternary cubic form. (Russian) Vestnik Moskov. Univ. Ser. I Mat. Mekh. 1999, no. 1, 58--60; translation in
Moscow Univ. Math. Bull. 54 (1999), no. 1, 43–45
MR2095257 (2005i:11037)
Choudhry, Ajai
Symmetric Diophantine equations. (English summary)
Rocky Mountain J. Math. 34 (2004), no. 4, 1281–1298.
There is also work on $\it pairs$ of ternary forms, where degree $2$ is already interesting:
MR1378574 (96m:11026)
Gaál, István(H-LAJO-IM); Pethő, Attila; Pohst, Michael(D-TUB-3)
Simultaneous representation of integers by a pair of ternary quadratic forms—with an application to index form equations in quartic number fields. (English summary)
J. Number Theory 57 (1996), no. 1, 90–104.
Answer: This is an old post. (Ok, a very old post.) But for the benefit of those who might come across this, the equation,
$$x^3+ny^3+n^2z^3-3nxyz = 1$$
is sometimes known as the cubic Pell equation. If for a given constant $n$, there is an integer solution $x,y,z$, then one can generate an infinite more from that initial triple.

Diophantine equations: ternary forms


Running NDK projects on Android

Question: I'm trying to develop part of an application that would enable it to render PDF file's pages into Bitmap, or to display it on a viewer. I'm looking for a free open-source one. I've already tried a bunch of them, for example, droidreader, and android-pdf. The problem is that I think it needs NDK to be able to run, I keep getting errors when trying to build it on Eclipse, even though I'm importing it directly with SVN. Can anybody refer me to a good step by step tutorial that would help me at least run those projects?
Comment: fyi. Both of the mentiond projects are GPL or commercial. i.e. they are not free!
Answer: Just download Android NDK
And then run in project folder following command:
<code>[path to ndk]/ndk-build
</code>
More information on Android NDK page

Running NDK projects on Android


Stranger's remote has the ability to unlock my car

Question: I have a 2014 Mercedes GL350.  When I get up some mornings, the windows are down, sunroof open along with back door hatch.  Someone's remote has the ability to unlock my car.  How can I change my key fobs to respond to a different code?
Comment: The most likely reason is that the unlock button on your remote has been accidentally held down for long enough (keys squashed while in your pocket or accidentally sat on etc.) to activate the total open/closure function.
Comment: Agreed with @AndyHames. Sounds like a malfunctioning fob or it's being physically pressed for too long when you're not aware. Do you hang your keys up on the wall or leave them somewhere they are prone to presses such an in a purse or simply somewhere easily accessible by a cat/dog/child?
Comment: Welcome to Motor Vehicle Maintenance & Repair!
Answer: Its not possible to reprogram the keyless code on your key but it IS possible with a mb tool to have all the keys disabled except the key your using or if you really wanted you could get a new unused key from a locksmith or dealer and then disable all the other key spaces so you could be 100% sure there is no trickery with old keys.
That said,
It is highly unlikely with the system these keys use that someone else has a working key unless you have recently lost one.
More likely you have some issue's with your own remote, the controlling module for locking systems or keyless entry, or the door lock actuator itself is failing and thinks its being held in the unlock position sometimes (makes most sense since all windows are open). I'd take it to a mb specialists or dealer and have it checked out first instead.
Comment: I'm thinking the body control module (BCM - or whatever MB calls it) is having an issue. Agree with your assessment of going to a MB dealer to get it sorted ... not going to be cheap, though. Considering how many codes there are for the secure interface (literally billions if not more) it seems nearly impossible (with a five-nine improbability) for someone else to have the same code as the vehicle. It would not have come from MB with a duplicate as they track that stuff (along with every other car manufacturer).
Comment: Or the kids are playing with the remote...
Answer: One maybe less plausible explanation is that you leave the fob fairly close to a door or elsewhere, and a computer a radio amplifier and another radio module can extend the proximity unlock and ignition/start on the vehicle permitting the window opening from the inside.
I find this beyond improbable considering no prankster would keep doing this more than maybe twice, let alone day after day risking criminal trespass charges, arrest and jail time — would be more probable if this happens, that you don't find the car in the morning.
However, technically, it is not impossible.


Java Exception vs C++ Exceptions

Question: Where are exceptions stored ?
Stack, Heap.
How is memory allocated and deallocated for Exceptions?
Now if you have more than one exception which needs to be handled are there objects of all these exceptions created?
Comment: Looks like users answer you without mentioning are they referring to Java or C++. On the other hand, about which one do you ask?
Comment: He first asked about Java only, C++ came later ...
Comment: Additionally I would like to know are Exceptions in C++ and Java handled similarly or additional measures are to be taken ?
Comment: I was first going to ask about only Java Exceptions but again I felt the need to clear concepts about C++ Exceptions as well.
Answer: I would assume that memory for exceptions is allocated the same way as for all other objects (on the heap).
This used to be a problem, because then you cannot allocate memory for an OutOfMemoryError,
which is why there was no stack trace until Java 1.6. Now they pre-allocate space for the stacktrace as well.
If  you are wondering where the reference to the exception is stored while it is being thrown, the JVM keeps the reference internally while it unwinds the call stack to find the exception handler, who then gets the reference (on its stack frame, just like any other local variable).
There cannot be two exceptions being thrown at the same time (on the same thread). They can be nested, but then you have only one "active" exception with a reference to the nested exception.
When all references to the exception disappear (e.g. after the exception handler is finished), the exception gets garbage-collected like everything else.
Comment: if you were to locate it in the stack segment or the data segment, where would you find it ??
Comment: Wasn't the question topic "Java Exception vs C++ Exceptions" from the beginning?
Answer: For C++ it's not defined where to store exceptions, but most compilers use a special stack.
For Java as somebody wrote before, they're stored on the heap.
As exceptions are objects in C++ as well as in Java, they're allocated and deallocated as objects in the specific language.
There is always only one exception active per thread in both languages.
Comment: There **can** be multiple active exceptions in C++. You can throw an exception in a Dtor that's called during stack unwinding, provided that you catch it again (i.e. not let it escape the Dtor). Between when the second exception is thrown and when it's caught, there are two active ("stacked") exceptions. The standard at least implies this, and I have tested it on more than one compiler -> works.
And I would really be surprised if this didn't work in Java (substitute finally blocks for Dtors).
Comment: so you mean to say, if I do a "new Exception" then it gets stored in the "special stack" . Now how does the new operator distinguish between which stack to use when ? Is it handling special cases ?
Comment: The question is, how does the compiler evaluates an object as an exception and provides appropriate machine code. What I wanna say is, that the new operator doesn't have to distinguish...
Comment: By the way, don't miss the note: "For C++ it's not defined where to store exceptions"!
Comment: I guess when you throw "new Exception" in C++ you're throwing a pointer, and the actual Exception is created like any other object by new. And btw in C++ the recommended way is to throw by value and catch by reference. edit : http://www.informit.com/articles/article.aspx?p=373339
Answer: For the most complete information on exceptions, we can go directly to the source: Chapter 11: Exceptions of The Java Language Specification, Second Edition.
Exceptions are indeed objects. They are a subclass of Throwable:

Every exception is represented by an
  instance of the class Throwable or one
  of its subclasses; such an object can
  be used to carry information from the
  point at which an exception occurs to
  the handler that catches it.

Therefore, it would probably be safe to assume, that as with any other Object in Java, it will be allocated on the heap.
In terms of having mulitple Exception objects, that probably wouldn't be the case, as once an exception occurs, the Java Virtual Machine will start to find an exception handler.

During the process of throwing an
  exception, the Java virtual machine
  abruptly completes, one by one, any
  expressions, statements, method and
  constructor invocations, initializers,
  and field initialization expressions
  that have begun but not completed
  execution in the current thread. This
  process continues until a handler is
  found that indicates that it handles
  that particular exception by naming
  the class of the exception or a
  superclass of the class of the
  exception.

For more information on how exceptions are to be handled at runtime, Section 11.3 Handling of an Exception has the details.
Answer: Exceptions in Java are objects, and as such, they are stored on the heap.
When an exception is thrown, the JVM looks for a matching exception handler in the code. This applies even when there are multiple exceptions that something could throw.
Answer:
Where are exceptions stored ? Stack,
  Heap. How is memory allocated and
  deallocated for Exceptions?

Exceptions are objects like any other in this regard. Allocated on the heap via new, deallocated by the garbage collector.

Now if you have more than one
  exception which needs to be handled
  are there objects of all these
  exceptions created?

Not sure what you mean with this. They're created via new, one at a time. There can be more than one around when you use exception chaining - and there's actually nothing keeping you from creating thousands of exceptions and putting them in a List somewhere - it just doesn't make much sense.
Answer: In Java, Exception extends Throwable which extends Object. i.e. from a memory point of view its an object just like any other.
It has been suggested in Java 7 that local variables could be placed on the stack using escape analysis to find candidates for stack variables.  However, Exceptions are typically thrown from a method to a caller (or its caller etc.) so its wouldn't be very useful placing the Exception on the stack.

Java Exception vs C++ Exceptions


Spring constant of harmonic oscillator

Question: I got a task from my lecturer to solve a differential equation for a simple harmonic oscillator: $$m{d^2\vec{r} \over dt^2}=-k^2\vec{r}.$$ So far, I have managed to find this equation only in one book. It is a bit bizarre for me as in most sources there is only $k$ without square. What do you think about it? Is this equation correct in some cases or does a book contain a mistake?
Comment: The k is a name for a quantity to be measured.  Changing the name to k^2  does not change the physics.
Comment: It's an unusual notation but not incorrect. The author defines the spring constant as $k^2$ instead of $k$, and as long as that is clear it is OK. There's nothing wrong with that but there's nothing gained by it either.
Answer: Written as scalars, the DE looks like:
$$m\frac{\text{d}^2x}{\text{d}t^2}+k^2x=0$$
Or:
$$x''(t)+\frac{k^2}{m}x(t)=0$$
Set:
$$\omega^2=\frac{k^2}{m}$$
The DE then solves to:
$$x(t)=A\cos(\omega t+\varphi)$$
Where $A$ and $\varphi$ are determined from the initial conditions (not specified here).
Using this notation the angular velocity $\omega$ then becomes:
$$\omega = \frac{k}{\sqrt{m}}$$
Instead of the conventional:
$$\omega = \sqrt{\frac{k}{m}}$$
But as long as $k$ (or $k^2$) is well defined in each case, it doesn't alter the meaning of the expression.

Spring constant of harmonic oscillator


Where does it says that snakes can kill birds by looking at their shadow?

Question: I have seen several early Jewish sources (e.g. Midrash Tanhuma, Beshalah 18) refer to the idea that a snake can kill a bird by just looking at its shadow. Has this ancient belief been documented elsewhere and what other sources are there to such an idea?
Comment: Very interesting!  Please link the passages if you get a chance.
Comment: The source I cited can be found here: https://books.google.co.il/books?id=dH1jAAAAcAAJ&lpg=PT168&ots=dvLBp2VWp7&dq=%D7%90%D7%A4%D7%A2%D7%94%20%D7%A2%D7%9B%D7%A1&pg=PT168#v=onepage&q=%D7%90%D7%A4%D7%A2%D7%94%20%D7%A2%D7%9B%D7%A1&f=false but it's a bunch of different Jewish sources as well.
Answer: I think this is a really really great find! I did some research and found nothing. South American myths contains a lot of kinds of Snakes, but this quite new for me. I think we will be waiting for someone reveal some other source.
But here is why makes sense to me: I think it's old knowledge for the universal and ancient questions of the "opposites". You can find this duality - snake and birds, skane and eagles - in many works like the Nietzsche's Zaratustra and Marriage of Havean and Hell from William Blake. In both cases you can see this  transcended duality, with the junction of opposites represented as the eagle and the snake. In Blake's work the snake can see better been carrying by the eagle. In Zaratustra, Nietzsche claims in the beginning of the work the friendship of the eagle that carries the snake in its neck. Again, the opposites are together. The bird and snakes are symbols to represent the opposites, the most earthly animal and the most aerial animal.
I will make a guess, using a alchemical proposition: so above, as below. the most earthly animal (or the Devil, as judaic representation) can be view as the "Shadow" in some cases pointed in Carl Jung studies. So, taken this representation, the Devil is a fallen angel, he knows very well the "Shadow" of the higher - higher as the spirit. So anyhow, he is the shadow, he has control of the shadow, the animal instinct, he knows the dark side, so in this case, he knows the weakness of a higher being, like birds. Because he once was a like aerial being. It makes sense? lol
Hope it helps someshow.


how to capture and decrypt packets sent over TLS

Question: I have been using MITM for decrypting https traffic , using tools like fiddler and burpsuite . Is there a way to decrypt packet sent over TLS, any guidance would be a real help.
Comment: I'm pretty sure this is a duplicate but I can't find the post right now. The tl;dr is that you will need the TLS master key, which means you will need have complete control over at least one of the two endpoints.
Comment: I surely searched from the questions , if you find it letme know , otherwise dont mark it duplicate, thanks
Answer: Capture

--> Open Fiddler
--> Tools
--> Fiddler Options
Set the option boxes as shown in the image below:

Source: How do I use Fiddler to capture HTTP/HTTPS sessions for debugging?
Decrypt
If you haven't already, enable the Decrypt HTTPS traffic option, shown in the image above. You can read how to decrypt TLS traffic with Fiddler in the How come I can see full HTTPS requests via Fiddler? thread, which links to a set of instructions.
Comment: but this shows the data for https traffic not TLS , as for tls fiddler outputs tunnel to 443


Looking for a web tool for core dump/crash dump analysis

Question: Our team needs to analyse core dumps from testers (or sometimes from clients) that C++ libraries and applications produce. Both on Windows & Linux. Of course we can use gdb to analyse it, but it is all about simplifying and team-work. Do you know any Atlassian, Jetbrains or others web tool or plugin that can integrate with Jenkins or BitBucket for example, that simplifies (browse a stack trace and a list of local variables, etc.) C++ core dump analysis?
Comment: IMHO your request is too broad, covering Windows + Linux + User mode + Kernel mode. There once was a tool for Windows only, called [Instant Online Crash Analysis](http://www.osronline.com/page.cfm%5Ename=Analyze.htm). However, it was for Windows only and with very limited functionality (running `!analyze -v`). Also, the terms of use were not exactly great. They reserved the right to use the uploaded crash dump in seminars. Crash dumps may contain personal information, they definitely contain information about the system of the user and may even contain passwords. That's quite sensitive data.
Comment: Also, Microsoft once provided online crash dump analysis, also for Windows only. It was a service called Windows Error Reporting (WER), then renamed to Windows Quality Online Services (WinQual). Both services do not exist any more. As the [top all time WinDbg user](https://stackoverflow.com/tags/windbg/topusers), I don't know any online service and my guess is that you have to write your own. Be prepared that people upload files that are 4 GB large, just to find out that they ran into a OutOfMemory condition.
Comment: An online service also has the problem of finding the matching PDBs. If you don't upload them as well, the reliable information will be limited. I think that's the main reason that online tools do not exist. If you do it yourself, consider linking the analysis tool to your symbol store (e.g. TFS).
Comment: All in all +1. I think the request for such a tool is valid. If you develop one, ping me. I'd be glad trying it.
Answer: Since you already know gdb, why not automate it?
Everyone seems to know Python these days, so take a look at these (or choose your own way to automate it):

Invoke and control GDB from Python
Extending GDB using Python - with a link to the API to control gdb from Python
scripting gdb
pygdbmi - "A function to parse gdb machine interface string output and return structured data types (Python dicts) that are JSON serializable."
Comment: Of course I can write my own plugin/script. But there are different compilers on different OS'es so that I am asking for ready solution. If it doesn't exist, I could give my time and write it :)
Comment: I hope that you don't have to, as I would also like to have such a tool :-)  It seems that I spend more time these days writing Python scripts than doing "real coding" :-)


How to label duplicate geometry features avoiding text overlapping?

Question: As shown in the screenshot, a point layer contains identical overlapping geometries. When labeling these points, the texts appear on the map in two rows. If there are more than two points, the texts appear overlapped and are unreadable. How could this case be solved? For example, each text value appears in a new text line.
Comment: A simple way would be to set the label placement to "Around Point" unless you want to get it all on the same column...
Answer: In the label placement settings, increase the distance of the label so that all labels have enough place.
The larger the distance, the farther labels are away form the feature and the more labels are shown. You might use callout lines to connect the labels to the features.


Who decides on grant spending rules?

Question: I am a university faculty supported by this Simons Foundation research grant. Who decides on the spending rules for this grant? Can my universty impose any rules, for example acomodation cost limits or a requirement that any use of funds requires a justification as to how it "benefits" my university?
Comment: It helps to realize that grants are always given to a university, not the individual PI. That's often a good thing as it can avoid individual liability and having to compensate out of your own pocket when things go wrong.
Answer: Generally speaking, with possible exceptions, spending rules are decided by the funding agencies, but universities may impose additional constraints within the rules set by the agencies.
For instance, I participate to several European projects funded by a certain agency. When travelling, participants to the same project from different institutions have different travel and subsistence limits, and these are set by the institutions. The differences in these limits across the institutions can be fairly large, and the limits may be even different within the same institution depending on the rank of the people travelling.
Furthermore, yes, any use of the funds within a certain grant typically needs to be justified. For instance, if I travel to a conference and I want the travelling expenses to be covered by that grant, I'm required to submit at least a paper acknowledging the grant.
When buying instruments, the institution can set the rules according to which an instrument can be bought and in which way its operating time within the project should be recorded.
Some institutions might have relaxed constraints with respect to others, but generally don't expect to be able to freely dispose of your grant money without justification. And the funding agencies may send revisers years later to verify that the grants had been used according to the rules.
Answer: As @Massimo_Ortolano remarks, universities frequently impose constraints on how grant funds may be spent that are over and above the constraints imposed by the granting agency.
That said, the constraints imposed by the Simons Collaboration itself are in fact detailed on the very page to which you provided a link. There are within-page links, one detailing the things on which funds are permitted to be spend (Allowable Expenses) and the other, explaining what should happen to unspent funds at the end of the grant period.
The information headings (i.e., "allowable expenditure" and "unspent") funds are fairly typical of many granting agencies. More specifically, if you locate the website for a granting agency, then you might be able to search from within the agency itself for those headings, or alternatively use Google with a search such as:

site:thegrantingagency.gov "unspent funds" OR "allowable expenses" OR "allowable expenditure"

Who decides on grant spending rules?


What is the difference between an explicit and an implicit lock in database?

Question: What is the difference between an explicit and an implicit lock in database?
Answer: Implicit locks are generally placed by the DBMS automatically. Most DBMS allow the developer or the application to issue locks which are referred to as explicit locks.
Answer: Implicit Locking
Objectivity/DB will implicitly obtain the appropriate locks for your application at the point at which they are needed. An operation that reads an object will obtain a read lock; an operation that modifies an object will obtain a write lock.
Explicit Locking
Implicit locking obtains access rights to resources as they are needed by an application. In general, the automatic locking by Objectivity/DB provides a level of federated database concurrency that is sufficient for most applications.
Some applications, however, may need to reserve access to all required resources in advance. Reasons for doing so might be to secure required access rights to the necessary objects before beginning an operation, or to prevent other sessions from modifying objects critical to the operation.
An application needing to reserve access to all required objects in advance can explicitly lock objects. Suppose an application needs to calculate a value based upon the state of many objects at a specific point in time. Although the application cannot check all of the necessary objects simultaneously, it can achieve the same effect by freezing the state of the objects and then checking them in sequence. Explicit locking effectively freezes the objects, because no other session can modify them as long as they are locked.
Answer:
Explicit Lock: - Lock is explicitly requested for a record or table.
Implicit Lock: - Lock is implied but is not acquired
Comment: A more explicit explanation would be useful. What does "not aquired" mean in this context?


Trinary star system - Tidal locked planet

Question: I'm trying to build a world where an earth-like planet is tidal locked to a sun in a three star system, where the other two would orbit each other in the center (being the central mass of the system). Is it possible? What is the perfect star scenario to life exist in the planet? Would the two stars in the center have a Sunrise/Sunset effect in this planet? Would there be a way to control time passing through those two suns (like they appearing in the scenery in an year time lapsing, or something like this).
Thank you!
Comment: The question should be asking only one clear question so that it is easier to determine what answers are better, The current question body has multiple questions, please edit the question body to have only one question
Comment: Well they couldnt orbit close to each other. For why google "Three Body Problem". If they are close together eventually one star is either going to be ejected or collide with another. From the data we have, you can have two stars orbit each other and a 3rd orbiting the pair at some distance. Prosumably you could have all three stars orbit close ish so that they are always in the center.
Comment: Not really clear where the stars are and masses, Start from largest mass. eg start A is 6 M_sun star B is 2 M_sun and 5 AU away from A they have a circular orbit. star C of .9 M_sun is 100 to 110  AU away from A,B. in a slightly elliptical orbit,  Planet in question is orbiting star C at 1AU distance and is 1 M_earth.  Makes it much easier to determine what conditions the planet would experience to know those basic numbers.
Answer: If you want  to have two stars orbiting each other in the center, the combined mass must be equal to the mass of the third. Your planet would orbit the largest star. The two other stars would be avble to provide a daylight circle to the "outside" of your planet with the length of the day beeing the time it takes to revolve around its sun.. Life would evolve at all it would do so on the side opposite to the star the planet is tidally locked to, due to the heat on the other side.
Comment: "If you want to have two stars orbiting each other in the center, the combined mass must be equal to the mass of the third" I don't think that this is correct.
Answer: It is possible for three stars to orbit roughly as you suggest and examples are known:
https://en.wikipedia.org/wiki/EZ_Aquarii
You have not provided a detailed description of the system so it is hard to answer specifically. However any calculation to find stable orbits involving three bodies should be based on the Hill Sphere approximation:
https://en.wikipedia.org/wiki/Hill_sphere
The sun rise and sun set pattern is dependent on many factors such as the orbital radius of all of the stars and the planet, the inclination of the planets axis, the orbital eccentricity and inclination of the orbits relative to each other.
Assuming all orbits are circular, in the same plane and with zero inclination and viewing from the "far side" of the tidally locked world the twin central suns should rise and pass across the sky relatively close to each other before setting. The next day the process repeats although the relative positions of the twin suns will change (probably slowly relative to the planets rotation) at some points in the "year" both of the twin stars will eclipse the other.


An infinite sequence of independent events with constant probability is uncountable

Question: Let $(\Omega, M, P)$ be a probability measure space and assume there is an infinite sequence $A_1, A_2, \ldots$ of elements of $M$ which are all independent from each other and such that $P(A_i) = \frac{1}{2}$ for all $i \in \mathbb{N}$. How does one prove the claim that $\Omega$ is uncountable?
Answer: Assume that $\Omega$ is countable, and call $\omega_i$ its elements.
Then, we define $I_i=   \{n|  \omega _i \in A_n     \}$. From Borel-Cantelli each $I_i$ is infinite.
Now, observe that
$$\Omega = \bigcup _{ i \geq 1   }   \bigcap_{n\in I_i     }A_n $$
From independence it is straightforward that $$\mathbb{P}(  \bigcap_{n\in I_i     }A_n   )=0$$
Now, $\Omega$ is a countable union of null sets therefore from subadditivity
$$\mathbb{P}(\Omega)=0.$$
A contradiction.
Comment: I believe the fact that $I_i$ is infinite only happens with probability $1$ by B-C. So maybe we should write $\Omega$ as a union of intersections of $A_n$, together with a union of $\omega_i$ for which $I_i$ is finite. Since the latter has probability $0$, I think your conclusion goes through anyway.
Comment: Or maybe it could be just $$\{ \omega_i \} \subseteq \bigcap_{n \in I_i} A_n \cap \bigcap_{n \notin I_i} A_n^c$$ so the intersection is always countable. Therefore $\mu( \{ \omega_i \} ) = 0$ and the contradiction follows. A very nice proof anyway!
Answer: Suppose $(\Omega, \mathcal{M}, \mu)$ is a probability measure space where $\Omega$ is countable.
Lemma 1. There is a decomposition $\displaystyle \Omega = \bigcup_{n < \alpha} \Omega_n$ into $\alpha$ disjoint measurable subsets $\Omega_n \subseteq \Omega$, where $\alpha \leqslant \omega$, such that $(\forall \varnothing \subsetneq A \subsetneq \Omega_n) \, A$ is not measurable.
Proof. Define an equivalence relation $\sim$ on $\Omega$ by
$$a \sim b \iff (\forall E \in \mathcal{M}) \, \big[ a \in E \Leftrightarrow b \in E \big].$$
Let $\{ \Omega_n : n < \alpha \}$ be the set of it's equivalence classes, which is at most countable, so $\alpha \leqslant \omega$. Let $a \in \Omega_n$ for some $n < \alpha$. For each $b \notin \Omega_n$ we find $E_b \in \mathcal{M}$ such that $a \in E_b$ but $b \notin E_b$. Then $\displaystyle \Omega_n = \bigcap_{b \in \Omega} E_b$ which is a countable intersection, so $\Omega_n$ are measurable.
Now suppose $\varnothing \subsetneq A \subsetneq \Omega_n$ and let $a \in A, b \in \Omega_n \setminus A$. If $A$ were measurable, by definition $a \not \sim b$ although $a, b$ belong to a common equivalence class $\Omega_n$, which is impossible. $\ \square$

Lemma 2. $(\mathcal{M}, \mu)$ is isomorphic to $(\mathcal{P}(\mathbb{N}), \nu)$ for some probability measure $\nu$ on $\mathcal{P}(\mathbb{N})$.
Proof. Let $\displaystyle \Omega = \bigcup_{n < \alpha} \Omega_n$ be a decomposition as in Lemma 1. Let $\varphi : \mathcal{P}(\alpha) \to \mathcal{M}$ be given as $\displaystyle \varphi(A) = \bigcup_{n \in A} \Omega_n$. One easily proves that this is an isomorphism of algebras.
Now if $\alpha$ were finite, so would be $\mathcal{M}$, but since $A_i$'s from the question are independent, they are infinitely many distinct sets in $\mathcal{M}$. So $\alpha = \omega$ and $\mathcal{P}(\alpha) = \mathcal{P}(\mathbb{N})$ and it suffices to transport $\mu$ to $\mathcal{P}(\mathbb{N})$ through $\varphi$. $\ \square$

By Lemma 2, without loss of generality we can assume that $\Omega = \mathbb{N}$ and each $A \subseteq \Omega$ is measurable. There is $N \in \mathbb{N}$ such that $\mu( \{ 1, 2, \ldots, N \} ) \geqslant \frac{5}{6}$. Since there are infinitely many $A_n$'s, there are $n < m$ such that $A_n \cap \{ 1, 2, \ldots, N \} = A_m \cap \{ 1, 2, \ldots, N \}$. But given that $\mu(A_n) = \mu(A_m) = \frac{1}{2}$, we have $\mu(A_n \cap \{ 1, 2, \ldots, N \}) = \mu(A_m \cap \{ 1, 2, \ldots, N \}) \geqslant \frac{1}{3}$, so $\mu(A_n \cap A_m) \geqslant \frac{1}{3} > \frac{1}{4}$ and they are not independent.
Comment: Maybe someone could get confused why we can assume that $\{1,2, \cdots,N    \}$ are measurable.
Comment: @clark That was an essential flaw in my argument that I have now supplemented by adding two lemmas. Thank you! That made the proof a bit lengthy by the way and I don't like it anymore. :-(
Answer: Define $X:= \sum_{n=1}^{\infty} 2^{-n}\cdot 1_{A_n}$.
Using this question, we see that $X$ is uniformly distributed over $[0,1]$.
Now if $\Omega$ was countable, then $$\sum_{\omega \in \Omega} P(X=X(\omega)) = 1$$But since $X$ is uniformly distributed, it follows that $P(X=X(\omega))=0$ for all $\omega$, which contradicts the above expression.


Domain Controller issues: Can't join Domain, change password, access printers. Why?

Question: For the last week, we have found ourselves in a sticky spot with Windows XP machines on a Windows Server 2003 Active Directory. Our computers can't join the domain, change passwords, or anything like that. What could possibly be wrong. Both our primary and secondary domain controllers are on and online. Help!
Comment: Look in the event logs of the DCs and the workstations that can't be added and post anything possibly relevant as an update to your question.
Answer: try using DCDIAG.exe infomation is found here at Microsoft. http://technet.microsoft.com/en-us/library/cc776854(WS.10).aspx
Can you login as the domain admin and make other changes?
Has anyone gone in and made chages to the DNS/DHCP/permissions in the past week or so?
and possibly Netdiag.exe /fix
Comment: Running DCDIAG remotely results in this: LDAP bind failed with error 8341.
Comment: There may be a replication error or a firewall issue.  repadmin.exe /showrepl dc* /verbose /all /intersite > c:\repl.txt
start c:\repl.txt
Answer: Depending on the results on that look try this (excerpt below)
http://forums.techarena.in/active-directory/45533.htm
1. Demote or reinstall the machine(s) that were disconnected.
2. Use the "repadmin /removelingeringobjects" tool to remove inconsistent
deleted objects and then resume replication.
3. Resume replication. Inconsistent deleted objects may be introduced. You
can continue replication by using the following registry key. Once the
systems replicate once, it is recommended that you remove the key to
reinstate the protection.
Registry Key:
HKLM\System\CurrentControlSet\Services\NTDS\Parameters\Allow Replication
With Divergent and Corrupt Partner


If I install Ubuntu over PCLinuxOS will I loose my files?

Question: I am currently running PCLinuxOS on my Dell Dimension 4500.  I'm having problems with PCLinux and would like to install Ubuntu over it.  If I do that, will my files be retained?  Is there anything I need to do to ensure that they are not lost?
Comment: backup the data then install Ubuntu.
Comment: Upon re-thinking this, I probably should do a dual boot.  At the moment, I can't reboot PCLinus.  That's why I was considering Installins over it.
Answer: You shouldn't have any loss of data if you install Ubuntu on your hard disk as a dual boot system.  But since you want to install over, I would highly recommend that you backup all that you need before installing Ubuntu, because you will lose your data, since the installation will erase your partition.
For info on how to backup, see Backup Your System.  For more info on how . to install Ubuntu see Install Ubuntu 13.04, and for 12.04.
Answer: If you are just concerned about your files, just do a backup by copying the files you want to keep, such as your entire home directory, to an external hard drive or usb. To answer your question on whether you files will be retained if you just install over PCLinuxOS, the answer is no they will not.
Hope that helps!
Answer: Installing Ubuntu over PCLinux will cause the PCLinux partition to be formatted (wiped) - any data on it will be lost. Unless your hard disk has multiple partitions - or your computer has multiple hard disks - to which you can move your files, you will need to back them up onto a memory stick or external hard drive before you install Ubuntu.
The following web links may be of use:
How to Back Up Your System
Details on Installing Ubuntu


I want to use a common power supply to pi and sensors BME280 and BMA180 (sensor modules). Is it possible?

Question: How can I accommodate between the difference in voltage and current levels with a single power source?
Answer: BME280 Adafruit I2C or SPI Temperature Humidity Pressure Sensor
First, I assume that this sensor module is referred to, not the bare sensor itself. There it reads:

So we made it easy for you to get right into your next project. The surface-mount sensor is soldered onto a PCB and comes with a 3.3V regulator and level shifting so you can use it with a 3V or 5V logic microcontroller without worry.

So it is possible to directly run it with the Pi. The sensor itself runs at about 3V and the board comes with a voltage converter to accept 3..5V inputs. If supplied with 3.3V from the Pi the serial data pins (I2C and SPI) have the appropriate voltage levels for the Pi.
Adafruit has this excellent tutorial that explains how to wire and use it. Read it! (I mean it!)
BMA180 Sparkfun Triple Axis Accelerometer Breakout
First, I assume that this sensor module is referred to. There it reads:

The board doesn't have any on-board regulation, so the provided voltage should be between 1.62 and 3.6V for VDD and 1.2 to 3.6V for VDDIO. The sensor will typically only consume 650uA in standard mode.

If connected to 3.3 from the Pi as power supply you'll be within that specified range and everything should work just fine. Voltage level on the serial data pins (I2C and SPI) will be acceptable for the Pi then.
Common power supply
From your question and comment I take it that a common power supply should be used - but without the Pi. I'd advise against that.
For the BME280 and from the tutorial we learn that:

To power the board, give it the same power as the logic level of your microcontroller - e.g. for a 5V micro like Arduino, use 5V

So, the Pi's power supply is 5V but its GPIO pins are not 5V tolerant. Thus, while the BME280 could handle 5V the Pi just would not like it. Power the BME280 at a voltage suitable for the Pi's 3.3V GPIO pins.
For the BMA180 the 5V are also not an option, as it requires a voltage below 3.6V. So again, simply use 3.3V and you're on the safe side.
Given the low power consumption (very low current) of both sensor modules simply connect them to the 3.3V pins the Pi provides (Pins 1 and 17 at connector P1).

 On a side note: the question could certainly be improved by both linking to datasheet of the respective sensors and listing their requirements in the question itself. Think of it that way: would it not be easier for people to give an appropriate answer if you provide those information in the first place? Would it not show your own effort to solve the issue? This is even more important as there are different devices out there with the same name, i.e. in the case of the BME280 it is possible to purchase the bare sensor or a sensor module (such as the one offered by Adafruit).
Comment: Thank you so much for the response. I have edited my question now.  I am now concerned regarding the current magnitude. As the sensor module draws only around 600 micro Amps , is it fine to connect it directly to pi??
Moreover, if I want to give a common power source for both pi and sensor means , how can it be done (without driving the sensor module from pi, but just connecting it with pi for I2C data transfer)
Comment: 600 µA is almost *nothing*. Don't worry about that. Your Pi and most likely your power supply can provide this.
Comment: If I give a 5v supply to pi from a Regulated Power Supply and connect sensor module to pi directly , will it be fine??
Comment: No, it won't. See my updated answer.
Comment: Thank you so much for the response.  Just check what I  have understood is correct or not.
I will connect my pi with Computer's CPU using USB and connect the sensor modules to 3.3v GPIO of raspberry pi.
Comment: BME280, BMA180 and BMP180 are the sensors that I am going to connect with pi via I2C. Can I use SMPS for powering both pi and sensors (as a common power source). If yes, how can it be done? voltage range of sensors is around 3.3V and current drawn is around 600 micro Amps
Answer: The BME280 looks like a viable option, and it can connect directly to Pi's GPIO, which gives you lots of opportunity. However I have not found much info on the BMA180 sensor. If your after a 3 axis accelerometer may I suggest the ADXL345 available here. There is also instructions on the same page for setting it up.
I'm not sure what you mean by "How can I accommodate between the difference in voltage and current levels with a single power source". But if your worried about connecting multiple sensors to the GPIO, there are plenty of guides out there easy to find.
Comment: Thank you so much for the response. I am now concerned regarding the current magnitude. As the sensor module draws only around 600 micro Amps , is it fine to connect it directly to pi??
Moreover, if I want to give a common power source for both pi and sensor means , how can it be done (without driving the sensor module from pi, but just connecting it with pi for I2C data transfer)
Comment: You are going to need a 5V 1.2A power supply for the Pi minimum. The sensors I suggested can be directly connected to the Pi's GPIO.
Comment: BME280, BMA180 and BMP180 are the sensors that I am going to connect with pi via I2C. Can I use SMPS for powering both pi and sensors (as a common power source). If yes, how can it be done? voltage range of sensors is around 3.3V and current drawn is around 600 micro Amp
Answer: yes its possible that you can connect multiple devices with pi as long as you dont exceed the max current.
there are few things you need to keep in mind.

Make sure all i2c devices have different- different addresses. (as you are trying to attach more then one i1c device to the pi at same time)
Pi has 3.3V level for all GPIO including the I2C, so if you have any sensor which works at 5 v or some work at 3.3v. you can get a I2C hat which will convert to I2C voltage either 5v or 3.3V. if you use this Raspberry Pi Hat it will convert I2C voltage to 5V. its a better choice because there are lot of sensor who works at 5V only.

Now we have your master working fine lets move to Slave side.
here need to focus on few things.

Make sure you are using the i2c voltage same as your Pi hat.

if you dont have much exprince with voltage sift and level sift you can use a sensor BME280 like this which has on board voltage regulator, level sifter and pull ups. this will make sure your hardware is correct.
for BMP180 you can use same kind of module and it also has on board voltage regulator, level sifter and pull ups.
if you use these you dont have to worry about wiring and power its all in built.
now you have all of your hardware working lets move to the coding. you can find Raspberry Pi sample codes for BME280 and BMP180 over here
before running code run sudo i2cdetect -y 1 and make sure your pi detects both sensors. once you see both address you are good to go. all you need to do is copy paste the code and you are done.
Cheers!!!!!!!!!!


Linking lights to single parameter in Cycles

Question: I would like to be able to link lights to a single master control. Say I have 4 down lights in a room, I wish to set one as the master light and when I adjust its intensity, the other 3 lights adjust to the same intensity automatically. I'm coming over from Poser, and this is a basic function in that software. For a room with lots of downlights (like halls) this makes adjusting lighting much easier and faster.
I do have a workaround of sorts for Blender, just would like to know if there's a way to actually gain control of light intensity for groups of lights.
Comment: look into drivers: https://docs.blender.org/manual/en/dev/animation/drivers/introduction.html. You can drive other lamp's parameters with single "master" lamp or for example drive intensity of all lamps with location of some Empty object as control. When you create one driver you can copy paste it to all other lamps.
Comment: Look into instancing first, it is much faster than drivers. (Alt-D your light as often as you want. Any change to any of the lights will be transferred to the other instances)
Comment: That looks like a similar approach to the one Poser uses, so probably the best option for linking lights to a master parameter. Cheers!
Answer: OK, so my options now are:
1) place the lights on a separate layer and set their intensities then use the filmic response options to determine 'exposure'. As long as the lights are accurately calibrated to all lights in the scene, this will work.
2) master parameter drivers as Jerryno indicated above. Probably the most technically correct option.
3) Set a master light first, apply any textures, then use alt D to make copies. These take their data from the original light. I just tested it and it works just fine. Make sure to name the light before making copies if using multiple lighting sets.