Does a painted side of a glass cover for a fluorescent light go towards or away from the light?

Question: In my building, there are ceiling and wall fixtures that use fluorescent bulbs.  The cover of them is just a sheet of glass and there is a large square in the middle that is painted white.  My question is, does the painted side go toward the bulbs or is the painted side supposed to be pointed toward the outside, away from the bulbs?
Comment: If it is painted and not etched I'd guess it will be marginally better on the outside, even a fluorescent bulb emits heat. Over the years this might have an effect.
Answer: I have seen a coat of semi-translucent paint on the inside of a fixture before.  My understanding was that the paint was to help dim the direct brightness of the bulb by making the cover more opaque. The paint was put on the inside to help prevent it being worn away, which is how I would place the glass.  I've seen the paint chipped off the glass before, and putting it towards the bulb may help prevent this. (plus its easier to clean and looks better?)
Comment: @RedGrittyBrick The heat is relatively low and the protection and cleaning need is high. Most paint on glass is fused to the surface and not just painted, so heat should not be a problem.
Answer: I have never seen "inward" paint on a fixture before, flat cover or otherwise.  This is interesting.  I do think you should flip one around and observe the difference.  Just thinking from a physical viewpoint, I would imagine it would create a very slight difference (inward being duller) in the ambiance of the light...though I doubt the "central" block of the light would change much other than the universal dullness achieved by the inward facing paint.  Of course none of this takes into account the type/transparency of the paint, glass, fixture, etc.  Interesting nonetheless.
Source:  lots of google searching and personal contemplation.


Which laws prevent a corporation with a 51% stake in another firm from exploiting the minority shareholders?

Question: What are the relevant laws which prevent a corporation with a majority stake in another firm from acting against the interests of the minority stakeholders? Such a corporation could, for example, use its majority to approve the sale of the remaining shares at an extremely low price.
Comment: In the case of an acquisition if a necessary majority of shareholders approve of the sale (usually somewhere between a two thirds and 90% majority) ALL of the shares are sold at the agreed upon price.
Comment: Wouldn't such a decision be voted on by all shareholders? If the 51% (or 76%) vote as a bloc couldn't they approve such a sale?
Comment: If you want specific references to specific laws that would protect you in such a circumstance, then the state  would be needed, and the question might be better answered on law.SE. However as-is, I've provided a general summary in my answer below.
Comment: The rights of minority shareholders are determined by the law in the state where the business is incorporated. And that's why so many corporations are incorporated in Delaware: their laws limit how much those pesky minorities can interfere with what the big boys want to do.
Answer: In a case where no corporate law exists, then yes, a majority voting bloc could flex its power over minority shareholders and do things to their own personal benefit  [by electing a majority of the Board of Directors, who then appoint a CEO friendly to the majority bloc]. A simple example would be to enter into a contract with a related party supplier at exorbitant fees, and siphon off all profits of the company.
However, most jurisdictions do have protections for minority shareholders, and the US is no exception, though specific corporate law will vary by state. Here is a decent writeup of those protections as they apply to Virginia corporations [I am not a legal expert, but quick review of this page seems to show no immediately obvious errors] https://www.generalcounsellaw.com/minority-shareholder-protections/ . The key item relevant to this discussion is that the Board has a 'fiduciary duty' owed to all shareholders, meaning they cannot enrich themselves through abuse of power, and they cannot do something against the general financial interests of the minority shareholders.
Note that in your example, forcing the sale of minority shareholder interests in a corporate takeover wouldn't necessarily be a breech of such fiduciary responsibility. Generally speaking, if you were 'forced' to sell your shares for higher than their market value, then it would be difficult to argue that you have been cheated by that action taken by the board. My general understanding is that, depending on state and country law, you might need to prove that such an action was a breach of fiduciary responsibility [something along the lines of 'they undervalued the company and actually my shares were worth more than I got']. See further discussion of that here [again, no affiliation]: https://smallbusiness.chron.com/force-shareholder-sell-stock-66789.html .
Comment: And don't most corporate by-laws require a 60% or 2/3 vote?
Comment: Perhaps for most public companies, but this answer would also broadly apply to private corps, which can do anything they want, limited only by corp law, which will differ by jurisdiction.
Comment: Also as a side note - this answer is purposefully avoids concepts like 'corporate raiders' who achieve short-term shareholder success at the cost of long-term business profitability / employee layoffs, etc.. These are related but different concepts [as an example, activist investors are often not even majority shareholders, but rather investment companies that buy 10-30% of a company's stock which can be enough to achieve great influence over business decisions]. See more on that here: https://www.investopedia.com/terms/r/raider.asp


Creating user in Firebase after Wordpress user registration

Question: I have developed an App that uses Firebase. The user has to go through a Wordpress website and buy a subscription before being able to access the App.
When a new Wordpress user registers, I would like to create the user in Firebase too with the very same credentials (e-mail/password). I have searched but not found anything to be able to do that. What would be the best solution. Thank you in advance!
Comment: Has there been any resolution to this? I'm in a very similar situation, searching for the same functionality. Thanks!
Answer: I have no knowledge or experience with Firebase specifically, so I will answer generally as it could be applicable to any external App / User Database synchronization.
The password is the tricky part, as WordPress hashes the password before putting it in the database, and so does not by default store the plain text password anywhere for security reasons. This means you would have to either:

Send the username and password to the App API for storage upon user creation. Then activate those users later when they pay for subscription. However, this may mean you end up with a lot of inactive users in your App (who didn't buy a subscription after signup) which you would probably have to clean up (expire) regularly.

OR

Save the plain text password to user meta upon user creation. Normally this would not be recommended, but if "anyone can register" for a WordPress subscriber account, which you are using to make a "real" membership later, then it's not really much of a security hole - as the free subscriber role has no extra privileges anyway. Then when they make a paid subscription, you can send the stored password to the App API with their membership and make sure to delete it from the user meta.

In either case, you would also need to add some code to synchronize a new password with via the App API in the case that the user changes it through their profile page.
Comment: It is just you have the opposite user on-boarding models from the start.As I said that was a quick search, it's still quite possible someone has done it your way around before and written a tutorial about it already, you probably should spend some time searching for that before proceeding in case you luck on it, but in any case to get an idea of how complex it might be. I could do this with custom code as have done similar before, but API integrations like this can be time-consuming and so not cheap to build or maintain (due to possible API changes.)
Comment: Thank you for taking the time to type that reply. I was hoping there would be a plug-in hidden somewhere that would allow that more easily. or a solution not too complex to implement. I tried Zapier but I'm not sure it can be of any help. I'm still trying to understand how Webhooks work. I don't know if that would be a right direction tho.
Comment: a quick search turned up this one: https://wordpress.org/plugins/integrate-firebase/
which allows users to authenticate login via their Firebase account. I'm not sure if that is helpful in what you are wanting to achieve or not.
Comment: Yes indeed, I would need the exact opposite ^^ something that also deals with users changing their password. Both wordpress and Firebase users credentials would have to be synced. I really thought this would be easier and people would have done it before with plugins.
Answer: The way you are thinking about it is to use two different identity providers (IdP), Firebase and WordPress, and keep them in sync. This is the most difficult solution to your problem. You really only want to have a single IdP and then use federation to allow users to log into another platform by using that single IdP.
In your scenario you want WordPress to be your IdP and Firebase to use federated IDs. FirebaseUI can be used to allow your application to use federated IDs. It supports both SAML and OpenID Connect which are two different ways you can authenticate your users to an IdP. Now you need a way for WordPress to be able to receive and respond to these requests. You'll be looking for a plugin like this one from miniOrange that has been made to allow you to use WordPress as an IdP and supports federation through SAML or OpenID Connect.
Using both FirebaseUI and a WordPress plugin you can now authenticate all your users to a single account and no longer have to worry about keeping two different login methods in sync.


How to remove plastic anchor from brick?

Question: I was putting these plastic anchors into brick to mount a TV, but didn't drill the first hole deep enough! I've tried screwing in the screw a little and pulling it out that way, but it won't budge. What's the best way to remove this? At this point I don't think it's salvageable so it doesn't matter if it's destroyed.
Comment: You can try to pull it out with pliers.  If that doesn't work, cut it as flush as you can with the wall, and then drill it out.
Answer: Pulling it out with long nose pliers is one option, but it often comes out in pieces if you do that.
If you want to pull it out with a screw, you need to engage the screw enough to grip the plastic, but not enough to make it expand. This position may not exist, or if may be further out than you think. Sometimes a screw engaged just 2-3 turns will give you something to get a grip on with pliers or a claw hammer (not under the screw head but near the tip). A very slightly undersized screw can help with some fixings.
Drilling it out completely is tricky. Once it breaks into pieces they tend to go round in the hole rather than drill.
It looks to me, from the fact that there's still some sticking out but it won't pull out, that the hole is too tight (drill too small). The universal plastic fittings often call for different hole sizes for different materials.
Answer: 'If you thread the corkscrew into the hole deeply enough to grip the center of the anchor, you can pull the anchor free of the drywall slowly and carefully to minimize drywall damage.'
credit: https://www.familyhandyman.com/article/remove-wall-anchors-with-corkscrew/
Answer: Just drill the thing out, I do it all the time removing old ones flush or not.
Use same diameter bit you drilled the hole with.


A question on primitive rings

Question: Is there any characterization for the left primitive rings which are left duo ?  Clearly division rings satisfy this property.
Answer: The class of rings in the question is exactly the class of Division rings. Here is another proof based on the characterization of primitive rings.
Proof. Since you have asked about primitive rings I can assume that you are familiar with the Jacobson's Density Theorem. Therefore $R$ can be regarded as a dense subring of linear transformations of a vector space $V$ over a division ring $D$. It is enough to show that $\mbox{dim}_D V = 1$ (since then $R$ would be equal to $D$) . Suppose not and consider two linearly independent vectors $u,v \in V$. By density there are $f,h \in R$ such that $f(u) = u , f(v) = 0$ and $h(u) = u , h(v) = u$. Now Take $I$ to be the left ideal generated by $f$ in $R$. We show that $fh \not \in I$ (which is a contradiction since by assumptions any left ideal of $R$ is two-sided):
If $fh \in I$ then there exists $g \in R$ such that $fh = gf$. Hence $u = fh(v) = gf(v) =  g(0) = 0$ a contradiction !
Comment: I accept this solution since the argument works even if $R$ assumed to be a right duo ring.
Answer: Unfortunately, I'm afraid these rings aren't very interesting: a left primitive ring $R$ is left duo if and only if it is a division ring.
For the nontrivial direction, suppose $R$ is left duo.  Fix a faithful simple left $R$-module, which up to isomorphism is of the form $R/M$ for a maximal left ideal $M$.  As $R$ is left duo, $M$ is in fact a two-sided ideal.  But for $R/M$ to be simple, this means that $M = 0$. Thus $M = 0$ is a maximal (left) ideal, and $R$ is a division ring.
Comment: @Manny Reyes: Thanks for your celever solution.  But I accepted chatish's solution since his argument works even if we assume that $R$ is a right duo ring (instead of left duo ring).

A question on primitive rings


I am a US Citizen born in the US. I am american. I am traveling to Philippines

Question: I want to know if I travel to the Philippines and I have a layover in Seoul Korea,  do I need a visa to transit through to my next flight to philippines?
Comment: Welcome to TSE. Note that your citizenship or how you obtained it is a separate matter from how you *demonstrate* your nationality to officials when traveling, ordinarily done with a passport. You may be a U.S. citizen, but will only be treated as such if you present a U.S. passport or equivalent for identification.
Answer: With a US passport, you don't need a visa to visit the Philippines for up to 30 days.
As you'll only be in transit in South Korea, their requirements aren't relevant (though you would be able to enter for up to 90 days)


Django - Confirmation page before change of different models

Question: I'd like to create a confirmation page for selected objects before a change is made to them (outside the admin). The objects can be of different models (but only one model a time).
This is much like what is done in administration before deletion. But the admin code is complex and I haven't grasped how it is done there.
First I have severall forms that filter the objects differently and then I pass the queryset to the action / confirmation page. I have created a form factory so that I can define different querysets depending on model (as seen in another similiar question here at Stackoverflow):
def action_factory(queryset):
    ''' Form factory that returns a form that allows user to change status on commissions (sale, lead or click)
    '''
    class _ActionForm(forms.Form):
        items = forms.ModelMultipleChoiceField(queryset = queryset, widget=forms.HiddenInput())
        actions = forms.ChoiceField(choices=(('A', 'Approve'), ('D' ,'Deny'), ('W' ,'Under review'), ('C' ,'Closed')))
    return _ActionForm

Which I use in my view:
context['form']=action_factory(queryset)()

The problem is that the items field wont be displayed at all in the html-code when it is hidden. When I remove the HiddenInput widget it displays the form correctly.
I don't want to display the choice field since there can be thousands of objects. All I want to have is something like "Do you want to change the status of 1000 objects" and a popdown and a submit button. A simple enough problem it seems, but I can't get it to work.
If someone has a solution to my current attempt I would be glad to hear how they have done it. Even better would be if there is a cleaner and better solution.
Answer: I used the wrong widget. It should be MultipleHiddenInput not HiddenInput.


Why isn't iPhone syncing Calendar items with Outlook?

Question: I am trying to set up a new (Verizon) iPhone to sync Contacts and Calender entries with Outlook 2007 on a Windows Vista Ultimate PC. The Contacts sync both ways, and calendar entries created in Outlook sync to the phone, but calendar entries created on the phone don't sync back to Outlook. I only have one calendar in Outlook. How can I get the calendar items created on the iPhone to sync back to Outlook?
Answer: The best troubleshooting I have found for this problem is iPhone, iPad, iPod touch: Troubleshooting contact and calendar syncing via USB on Windows(Apple), mainly due to the fact that it explains how to reset sync history in iTunes, a process that reevaluates the contents of both devices and tries to resync them.
Another good little trick is to try a "Replace data on this iPhone" near the bottom of the info tab, that will wipe the specific data set off the iPhone and replace it with the computers, often a good way to get them talking to each other again.
Answer: http://www.sync-iphone.com/contacts-calendars-email/sync-iphone-with-outlook.html#sync-iphone-with-outlook-two-way

This is unfortunately a one-way synchronization from Outlook to iPhone.
     To sync iPhone with Outlook two-way, use Google Calendar Sync
  and select 2-way as the Sync option
This procedure works for both Mac and PC
Your calendars must be Outlook 2003 or above compatible
Once you complete the above procedure, your iPhone Contacts will
  synchronize every time you connect
  your iPhone to your Computer
In case of any iPhone Contacts synchronization problems, on your
  iPhone go to Settings->Safari->Clear
  Cookies and restart the Contacts
  application (if your iPhone supports
  multi-tasking, make sure you have
  actually closed the Contacts app)

If this isn't what you want, then you need to sync with an Exchange server, then you can do it in almost real time over the air.
Comment: That's wrong. http://support.apple.com/kb/ht1296 Says all PIM info is sent two ways.
Comment: Yeah, you're probably right - I just copied the content from the link. My own setup is through Google (Exchange), so I have all in sync over the air with Push on my iPhone, and normal refresh in my local client.
Comment: Yeah the google exchange stuff does work perfectly, just the 2 way syncing stuff.
Answer: I'll share simple solution that worked for me.  My iPod Touch was syncing with calendar entries from Outlook 2007, but Outlook 2007 wasn't syncing with appointments entered on my iPod calender. As iPod Touch has same functionality as iPhone 4, I'm guessing the same resolution would work for iPhone also. Reason for discrepancies, was my default Calender on iPod, was set to a different Calendar than Outlook.
Verify "Calendar" is selected in Outlook 2007 under "My Calendars".
On iPod Touch:- Go to - "Settings"
                Select - "Mail, Contacts, Calendars"
                Move down to - "Calendar" section
                Select - "Default Calendar"
                Select  - "Calendar" under "From My PC" heading (Blue dot)
Now go back to your iPod calendar and select "List" view.  Any appointments that don't have the blue dot will need to be modified, as basically only those with blue dot will sync to Outlook 2007.
To Modify in "List" view:- Tap on appointment
                           Select - "Edit"
                           Under "Calendar" select "Calendar" "From My PC"
                           Select "Done" x2 to return to Event Details
Now you're all set.  Simply go to iTunes on your PC and "Sync" once again.  All should be in order.
Answer: I would check on your iPhone that the events aren't being added to another calendar. In the calendar app when adding an event there is the option called Calendar which lets you select which calendar events are being added to. I would try creating some test events on your iPhone in different calendars if you have multiple. If events are created in a calendar that syncs over the air (i.e. mobileme, gmail, yahoo) those events won't sync via an iTunes tethered sync. Outlook 2007 is supported to sync by iTunes so they should be syncing both ways. Update to the latest version of iTunes and Outlook 2007 if its not already. If that doesn't work, I would try backing up your data in Outlook, then unchecking that selection to sync calendars with outlook in iTunes, sync and remove the data from the phone when prompted, then check the selection to sync the calendars with Outlook again and syncing the info back to the phone. Create some test events and see if events sync then. Hope this helps
Answer: Maybe this will help someone having some issues syncing "both ways" with outlook/iphone calendars....
Some background:
My boss got a new iPhone 4 and uses Outlook '03.  We were having issues getting his calendar items to sync back and forth, as he used his iPhone on the road/at home, and the Outlook '03 in the office.

Certain events were syncing back and forth, but others weren't.  It was partially syncing "both ways".
He created an iCloud account, and set up his calendars to sync through iCloud, but did not install the iCloud Control Panel for Windows (yet).
The events that he created on the iPhone were "iCloud home/work" calendar events, as opposed to "PC Calendar events".

So, I went into his iPhone, changed the home/work(green/purple color) back to "PC events (blue).  All of the sudden, the events were all syncing both ways.  Viola!
So, in final, make sure that with the iPhone 4/4S (iOS5) that you have iCloud set up TOTALLY.
My boss hadn't finished the process of creating his own "iCloud", therefore his iPhone wasn't able to send "iCloud" events to Outlook, because his PC had no clue what to do with iCloud, since the Control Panel wasn't installed.
Now, if you have iCloud control panel set up on your PC/Mac, you should have no problem syncing both ways, but in this case, my boss didn't do his homework on iCloud and the Outlook syncing process.
Answer: I recently ran into this same exact issue and, with the help from Sampson @ Apple, we worked thru the issue to resolve. Here is what we found.
In a nutshell:
  You have a calendar entry, or two or three ..., that are corrupt, in some way, and it/they are affecting all the other items in your calendar syncing properly.
Steps:
Depending on the version of MS Office, the exact menu choices are different.

But, either way, you want to creat a New Folder adjacent (not under) the existing "Calendar" and call it by any name you'd like (e.g.: New Calendar).
Make sure you set the Folder Contains field to be Calendar Items.
Now, go back to your original Calendar folder in OUTLOOK and change the view of your calendar to a List view.
Select ALL of the items in that list
Right-Click on any of the selected items and drag-n-drop them to your New Calendar folder ... Choose "Move" when given the option of Move or Copy
Now, Sync your iPhone
Now, create one new appointment in your ORIGINAL CALENDAR folder in OUTLOOK and Sync your iPhone, again.
If you see your one new entry, that's a good sign.  If not, you're going to have to refer to Apple for more help.
So, if your one new entry showed up, go back to your NEW CALENDAR folder, put it in List view format, and select SOME items and MOVE them back to the original CALENDAR folder.  Sync the iPhone.
Repeat this so long as these items you're moving back to CALENDAR are showing up on the iPhone.  At some point you should come across the calendar item(s) that caused this issue.

HINT: Sort the calendar list by Start Date and do NOT copy/move these items back to the CALENDAR folder if they're stale/dead/defunct/moot.
Answer: See Pierre-Yves 1 post: https://discussions.apple.com/message/23297197#23297197
This was driving me crazy. Sync between Outlook 2007 and my iphone was working perfectly on ios 6 - I primarily sync Calendar, contacts, and notes.
Then everything went bizerk with ios 7... All of a sudden nothing was getting  syncronized, but rather multiple Calendars and Contacts showed up in Outlook 2007. Disabling Calendar, contacts, and Notes in my iphone's icloud settings did the trick. Now I have ONE Calendar and ONE contact list in Outlook, fully in sync with my iphone.
Comment: Welcome to AskDifferent! We encourage users here to explain and/or paraphrase the content that they link to, as this helps reduce the effects of link rot.
Answer: Seems like a one way sync.
Its not the first time iv heard of this issue popping up.
You can try to solutions by the users above.
But what I did was sync with a 3rd party Plug-in.
Iv been using EVO Collaborator for several different syncing needs so I was using this for iPhone standard as well. And it has no problems whatsoever.
So I suggest you try out EVO Collaborators free trial version and see if it helps :)
Blogpost : http://outlookandmacosxserver.blogspot.com/2014/10/synchronize-iclouds-contacts-and.html


Is it possible for a malware in a VM to be still running after the VM is shut down?

Question: Let's say that VMWare or VirtualBox is running the newest version of Debian. I'm not sure if it's possible for any program in the guest to continue running, stealing data from the host, even after the guest system has shut down.
Comment: If the VM is down, it is down - like a computer switched off. In order for the malware to be run after the VM shutdown it had to propagate out of the VM into other places first. This is not impossible but there are other questions already dealing with the topic on how much separation VM really provide.
Comment: On the other hand, it is possible that malware in a VM resumes running when the VM is restarted.
Answer: It is possible if your malware managed to escape the VM to run under the host operating system. It's colloquially called VM escape or Guest-to-Host Escape. Most if not all hypervisors had some bugs giving an attacker a way to do that in their history.
A few example, non exhaustive list (a longer list is available in the Wikipedia article linked earlier):

VMware CVE-2018-6981
HyperV CVE-2017-0075
Xen CVE-2008-1943

Staying on top of your hypervisor patching is thus critical if you allow arbitrary code to be run on your VMs (e.g. you are an IaaS provider), a tiny bit less so if an attacker need to compromise a VM first.
Answer: "Running" means being executed by the CPU (normally from RAM).
When you shut down a guest OS, it stops being executed, it gets unloaded from RAM, its RAM regions are freed and the guest OS becomes bits and bytes on your mass storage, thus it's no longer executed by the CPU, so the answer is "it's impossible".
Answer: Only if the malware managed to propagate itself from the VM to the host, which is very unlikely.


asp.net in process memory, sqlite?

Question: Has anyone used SQLite before with asp.net?  Is there a SQLite Linq provider?  Do you recommend something other than SQLite?  Would like to hear your thoughts.
Will this work as the master database and then backup to a sql server 2005 db?  Can you run a hybrid of the two?
Answer: I wouldn't use SQLite at all if I don't have the need to rebuild the database each and every time I ran my code. Read more about Asp.Net and SQLite here!

asp.net in process memory, sqlite?


New line in Zebra ZPL

Question:
How do I put new line characters for my "Text"? Say for example:
Hello World

will become
Hello
World

Is there anyway that I can put a new line character for my code like this?
^FT78,76^A0N,28,28^FH\^FDHello\nWorld^FS

If the "text" in my label is too long, how would I put another line to it?
Answer: I suggest you combine the answers from Thorsten and Dharmesh for maximum effect:
^FB400,2,0,C^FO0,50
^FDHello\&World^FS

Doing so will yield a label that looks like this:

The nice things about this approach are two: First, the text block will position and align the new line appropriately. And second, you have complete control over where the line break actually takes place.
Comment: For anyone trying out this answer but not getting the desired result: I tried this and it didn't work, until I removed the ^FH\ preceding my ^FD. Then everything worked as expected.
Answer: Use \& for new line
^FT78,76^A0N,28,28^FH\^FDHello\&World^FS

Answer: I know this question is pretty old, but I found out that the ^FB command (Field Block) is actually pretty good at wrapping text:
I used a line like this:
^A0R,54,54^FO505,3424^FB630,2,0,L,0^FDThis is a pretty long line of text^FS

and it got wrapped into two lines nicely. The only thing you need to mind is that wrapping seems to take place at spaces only, not at commas or any other punctuation marks.
Comment: Utilizing the FB command is the best way to handle multiple lines.
Answer: The ^FX doens't understand \n, you will need to pass it \0A (the hex equivalent of \n) ASCII wiki page
So your ZPL should look like
^FT78,76^A0N,28,28^FH_^FDHello_0AWorld^FS

I changed the hex char to be _ vs \ so as others that look at this when you are done don't get confused.
Jason's idea about using the ^FB command is an excellent idea. It has some odd properties to it (with text rotation), but in general is a for text wrap.
Answer: While this question is a little older, it does serve to mention that the ZPL command ^FT is the command that dictates where the text element appears.  The 78 and 76 correspond to the label's X-axis and Y-axis, respectively, and the unit of measure is dots.  With this in mind, the previous answer is correct in principle.  You can call another ^FT command with the y parameter being changed, such as this:
^FT78,78^A0N,28,28^FH\Hello^FS
^FT78,110^A0N,28,28^FH\World^FS

As an alternative, the ZPL manual details the ^TB (textbox) command, which includes automatic word wrapping.
Answer: Doesn't answer the original question but for anyone using ZPL for unicode this may be of help.
I am using ^TB for Arabic text and found \& didn't work to create a new line.
What did work was to convert new line to hex (_0A) and use that.
For example:
^XA
^LL0406
^CI28
^CWZ,E:TT0003M_.FNT
^PA0,1,1,0

^FO609,50,2
^AZN,40,35
^TBN,559,300
^FH
^FD
_D8_B4_D8_B4_D8_B4_0A <-- new line
_D8_B4_D8_B4_D8_B4_0A <-- new line
_D8_B4_D8_B4_D8_B4
^FS

^PQ1
^XZ

... would output a ticket like this:
ششش
ششش
ششش

Answer: Unfortunately, You can't really do that. You have probably found that text which is too long it wraps around back onto the same line.
You have to create a new line to accommodate the text. I forget which of the numbers in that string are the positions (probably the 28,28) try adding a line, changing those to 34,28 and see if it moves to a new line below.... Just play with those 4 numbers at the front of that line.
One is a font size (which might help you) and 2 of the others are position from top and right. an easy way to play with those is just to edit the file with a text editor and do a copy command from the command line to the printer UNC path and see what you get. (i.e. copy "C:\test.txt \127.0.0.1\zebra). Hope this helps.
Answer: For android, "\r\n" works for adding a line break.
text.replaceAll("\n", "\r\n");

Comment: How is this related to Zebra printers and the ZPL programming language?

New line in Zebra ZPL


Right to be photographed in public area

Question: I know the general answer to being photographed in public is legal. But what if they photograph me without my permission. I am talking about my face. In public, do I not even have the right to my own face? It happened out in public when this random dude just started to point a camera towards me. I told him to delete the photo of me but he said in a public space, there is no sense of privacy. How do I prevent this from happening again? In case if you are wondering, there is creepy dudes who film strangers for fun.
Comment: Since you know the answer, what is the point of asking, other than to to complain about a legal fact that you don't like? Politics SE is where you complain about laws you don't like.
Comment: @user6726 Politics SE is not a dumping ground for personal opinions, thank you. Asking for rationale about why laws are as they are, for example, is on-topic. Complaining about them, most definitely is not.
Comment: You've got to come to terms with the realities of 21st century. Another 10-20 years and cameras will be chipped in human heads so that you won't even know they're taking pictures of you pretty close-up from a distance. If you can be seen, you can be remembered with however much detail people are capable of remembering. You can't stop people around you from using their eyes and brains full stop.
Answer: your question is:

How do I prevent this from happening again?

Don't go out in public.
Wear a disguise, dark glasses, a wig, make-up, etc.
Make yourself uninteresting to photograph.
or Don't let it bother you.

Right to be photographed in public area


Is there any stable hadron?

Question: Neutron can decay into proton and I think some hypothesis claim that proton can also undergoes decay into subatomic particles... Is there any hadron that never decays?
Comment: Cn you mention in which hypothesis proton is unstable? As much as I know only proton and anti-proton are stable Hadrons.
Comment: may be *Quark* and *AntiQuark*
Comment: @Ari: I read that proton decay is the prerequisite for one of the [GUT theory](https://en.m.wikipedia.org/wiki/Georgi%E2%80%93Glashow_model)
Comment: @user6760 Not a prerequisite, a consequence.
Answer: The question of hadron decay is intimately connected to the reactions of quarks, because hadrons are made of quarks. Weak interactions can transform the different types of quarks into each other, for example a neutron decays into a proton when a down quark decays into an up quark (and a W boson).
The up quark is the lightest quark so it can't spontaneously decay into any other quark. That means the proton can't decay into anything else via weak interactions. (You might think it could decay to a baryon with three up quarks, but the exclusion principle means that baryon has to have a higher spin and this means a higher energy. The baryon with three up quarks, the Delta, actually decays into a proton.)
In the Standard Model quarks can't just disappear so a proton is stable. Well, a quark and antiquark can annihilate and disappear, which is how mesons decay, but if we consider a single quark it can't just disappear. However theories have been suggested in which quarks can decay into non-quarks. As far as I know the earliest of these was the Georgi-Glashow model. In this model two up quarks can decay into an X boson, and this subsequently decays into a positron and an anti-down quark. This means a proton could decay into a positron and a neutral pion - the pion then decays into two photons.

But the Georgi-Glashow model has been ruled out by experimental measurements as it predicts too short a proton lifetime. Other more complicated models remain just viable, though the current lower limit on the proton lifetime is pushing even those models. As of right now there is absolutely no evidence that protons can decay. So until evidence to the contrary exists I think it seems reasonable to maintain the position that a stable hadron does exist, and that hadron is the proton.
Answer:
Is there any hadron that never decays

The current experimental limit for the decay of the proton is $5.9\times 10^{33}$ years, so it depends what "never" means. The Avogadro number, number of molecules in a mole, is $~10^{23}.$ One would have to wait $10^{10}$ years to be at the experimental limit for a mole of matter. The experiments check for the decay of protons in enormous in mass detectors, and have not seen any, that is what the limit means.
So with "never" defined as "more than $10^{33}$ years of waiting for it to decay, protons are stable.
After all it was the assumed stability of the protons that built up  the conservation of baryon number and the isospin model for nuclear physics. Quarks, discovered later, were assigned 1/3 baryon number and can decay through the weak interaction to a lowest level, but still a quark will exist in the end of the decay chain to carry the baryon number. Unless the Standard model is superceded  aside by new data and new symmetries that allow for non conservation of baryon number, the proton can be considered stable.
There exist rumours about leptoquarks at the LHC,  the X in John' answer. If they exist , then the proton can decay and there will be no stable hadron. Eventually, the weak interaction would get all the quarks, but the lifetime of the universe should be practically infinite.

Is there any stable hadron?


How to check dependencies of libraries against classes in java

Question: I have a java project which is previously developed by another developer, in this application there are a lot of unnecessary libraries. I was able to delete some of those libraries. But, as there are a lot of them I want to know whether there is a technique to scan the project and detect unrelated libraries to the project.
Answer: I recommend Tattletale from JBoss.
Answer: Depending on the build method, it should be easy to remove unnecessary libraries without deleting/adding them by simply recompiling the application modifying the classpath at compile time, or rather modifying the build files by one-by-one deletion of lib dependencies.  Either one of these methods will require no manual deletion of jars.
1) If you set the jars using the classpath manually, you can play with classpath wild cards to remove / add different jars when running : Setting multiple jars in java classpath classpaths .  This does not require manual deletion / adding of jars.
2) Find the dependencies definition (pom.xml in maven, ivy.xml for some ant projects).
and One by one delete the (maven)
<dependency>..</dependency>

or (ivy)
<dependency .... />

entries in your build file.
If you have the correct build plugins installed - then your IDE will immediately rebuild the project using your new definitions (no error prone removal/deletion of jars or classpath entries).
Comment: oh, sorry, I forgot to tell that this is a swing application which is developed using netbeans IDE.


Enable sysadmin user to restart SQL server from management studio

Question: I have SQL server login with sysadmin role, but I cannot stop and start SQL server when I connect from remote management studio, just from local server management studio. How can I enable it?
I use windows server 2008r2, SQL server 2008r2.
Comment: Are you trying to start/stop from SSMS ?
Comment: yes, the start/stop option enabled just from local server machine, not from remote ssms.
Answer: If you connect to SQL Server from a Machine M which has SSMS installed but your account is not local admin on Machine M you would find the option of start/stop to be disabled or greyed out. OTOH if you are local admin on the Machine M you would find the option to be enabled. When you do this from server on which SQL Server is installed, you are administrator there and hence you see the option. It does not matter whether your account is admin in SQL Server or not when you connect from machine where you do not have local admin privileges you would see the option disabled, however you would still be able to perform all sysadmin activities in SQL Server. This is not a complete statement their could be other reasons as well, this is what mostly I have observed, please check and let me know. Please also refer to SQL Server agent start stop and restart disabled blog to know more about reasons why this could happen
Comment: How can I check which domain\local user is behind my sql server login?
Comment: You mean to say which login is used to connect to SQL Server ?. First check whether your login is local admin on machine from where you are connecting SQL Server, please read the answer and let me know if that works.


Where can I find stimuli for steady-state visually-evoked potentials?

Question: I am a student working on a project which deals with Steady State Visually-Evoked Potentials (SSVEP) Stimuator. Does anybody know where can I find stimuli (checkerboard or single graphic) as a video file? It's very difficult to find these files on the Internet. I am not allowed to use videos from youtube.
Comment: What is SSVEP and why can't you create the stimuli yourself?
Comment: steady state evoke potentials. For evoke this potentils you need to see a special stimuli like a flickering checkerboard or single graphics. Does anybody know where can I find them?
Comment: What system are you using? For example, the people from Espion (a widely applied ERG/VEP system) are very kind folks that are always more than willing to help out (needless to say, as long as you are using their system :-)
Answer: Researchers are often willing to share their stimuli. If you know of a paper that uses the same kind of stimuli that you want to use, you could try emailing the authors. A friendly request with a brief explanation of why you want the stimuli usually works.
Comment: I disagree. It's certainly not the ideal answer to the question but it is an answer. Contacting people who have used the stimuli before is a really common way to solve exactly the problem that the question poses (how do I find stimuli that aren't readily available on the web?).
Comment: I agree with @Josh here. Cognitive scientists frequently don't host these anywhere, so telling the author to use email is just instructing them on common practice.


Can a non-AF lens be used on a Canon 1000D AF camera?

Question: Can I use a non-AF lens with a Canon 1000D AF body. Canon lenses use in-lens motors for focus, and the only connection is electrical, so I don't see why not. What type of mount and lens should I look for? I like the convenience of AF, but there are times when I don't need it, and non-AF lens are cheaper.
Comment: To be clear: If you mean Canon "FD bayonet" or "breech lock" lenses when you say "non-AF", these are *just as foreign-mount a lens to an EF mount camera than any other foreign-mount lens*. https://photo.stackexchange.com/questions/7172/is-it-worth-it-to-buy-an-fd-eos-adapter-or-is-it-better-to-exchange-a-misbought . However, a *manual focus lens that comes with an EF mount* will, of course, work.
Answer:
AF = Auto Focus; MF = Manual Focus
If by non-AF lens, you meant a manual-focus lens, the answer is yes. You can use manual-focus lenses with your camera. Depending on the particular lens you are interested in, you may need an adapter.
EF = "Electro-Focus". This is the name of the Canon mount.
If you meant to type non-EF lens, the answer is also yes. You can use adapters to attach non-EF manual-focus lenses to your camera. For instance, adapters are available for M42 lenses. However, there are limits on which lenses you can use. See Can I use lens brand X on interchangeable lens camera brand Y?

To get an idea of what lenses and adapters are available, you can search for "EF lens" and "EF adapter" on various shopping sites. However, be aware that "Using an adapter most of the time is masochism.", as Agent_L has commented.
Unless you are after a specific effect, such as fish-eye or particular bokeh, you would be better served by getting a modern general-purpose lens, such as the EF-S 18-135mm/F3.5-5.6 IS USM, which is fairly inexpensive. Despite being a zoom lens, it will deliver much better image quality than most adapted manual-focus lenses.

As noted by Frank, your camera has a crop-frame sensor and EF-S mount. Lenses with EF mounts, made for use with full-frame sensors, will work with your camera. EF-S lenses made by Canon can be identified by an extra ring of plastic that prevents them from being mounted on full-frame bodies. However, EF-S lenses made by third parties may still mount on full-frame bodies. In this case, they may be identified by heavy vignetting in the images taken with them. Care should be taken to ensure that lens elements do not obstruct and damage the mirror.
Comment: There are two types of lens mounts that will fit your camera without the need of an adapter.  These are the EF-S and EF lens mounts.  The EF mount is compatible with any Canon DSLR or AF SLR.  The EF-S mount is different in that these lenses will only fit onto Canon APS-C format DSLRs; it is literally impossible to attach an EF-S lens onto a full-frame DSLR or SLR.  There are some lenses like those from Samyang that have an EF or EF-S lens mount, but they don't have the internal AF motor.  They will work just like any other lens, but without AF.


TDS imperial items change

Question: Have the items that you get from the imperial levels in TDS changed?  When I collected them tonight I noticed they were different and cost more buxs to speed up the creation time.
Answer: Yes, the images did not change, nor did the quantities I already had assembled, but the descriptions certainly did!
Droid Works now produce Repair Droids instead of Astromech Droids.
Officers Lounge now gives inspections instead of officers. Etc
The cost in bux to hurry production have now skyrocketed from 1 bux to 100 bux in the instance of my Sith Meditation Chamber. There is now a standard cost of 100 bux per hour to hurry an imperial item.
Answer: Yeah I noticed that too.  For instance, I swore the Sith meditation chamber used to make "Mind Tricks", and now it makes "Sith drones".  I previously noticed that the bux required to speed up building varied wildly from floor to floor.  I'd have my superlaser level wanting only 5 bux to sped up 5 hours of work, while other floors requiring only an hour of work required 84 bux!

TDS imperial items change


Zeroes in natural numbers up to a googol

Question: How many times does the digit $0$ occur in the list of numbers from $1$ to $10^{100}$, inclusive?
Comment: And list all the numbers in which it occurs... ;-)
Comment: Are we considering leading zeros as well?
Comment: hehe good luck with that :)
Answer:
 Observe that the numbers of occurrences of zeroes from $0$ to $10^n-1$ follow this sequence

 0, 1, 10, 190, 2890, 38890, ... (oeis)

 those numbers can be obtained for any $n > 2$ as

$10^{n-1} + \sum_{i=2}^{n-1} (10^{n-1}-10^{n-i})$
 Where each summation member is the number of occurrences of the zeroes in the $i$-th position starting from right and $10^{n-1}$ is the count of zeroes in the first position.

ie. for $n=4$ we count all zeroes between 0 and 9999

$10^3+(10^3-10^2) + (10^3-10) = 2890$

 plugging in $n=100$ we obtain:

$ 10^{99} + \sum_{i=2}^{99} (10^{99}-10^{100-i})$

 Now we have to move the range from $[0,10^n-1]$ to $[1,10^n]$.

 To achieve this, we have to subtract the first zero count and add 100 zeroes from the googol itself to get the final answer:
$ 10^{99} + \sum_{i=2}^{99} (10^{99}-10^{100-i})$ - 1 + 100 = 98888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888989

Bonus

 To easily get the n-th entry (ignoring the first "$0$" term) of the OEIS serie above, for $n >= 3$ you can use this simple trick:

- write $n - 2$
- append $8$, $n-3$ times
- append $90$

 for $n=100$
- $98$
- $8888.....8888$ (97 eights)
- $90$
Comment: Great work and thanks for finding the sequence. There is actually a closed form formula in the OEIS, which you can use here.
Comment: Nice! Can you write the answer in closed form, just for clarity? Thanks.
Comment: It is easier to count all zeros (proper and leading) first: N x 10^(N-1) and then subtract leading zeros: 1+10+100+1000+... (N terms). (Add back 1 if you want to count 0 as a legit 0 even though it is leading.)
Answer: Consider the last $100$ digits of each of these numbers, padded with leading zeroes as necessary.

 Now consider reversing each of these strings. Since we're counting all $10^{100}$ $100$-digit strings, this is a bijection, and it has the effect of turning leading zeroes into trailing zeroes, with the exception of the all-zeroes string we got from $10^{100}$. Therefore, the trailing zeroes that we wish to count are half of all the zeroes, plus the other $50$ from the all-zeroes string.
 Each position in the string has a $0$ in exactly one-tenth of the strings each, and there are $100$ positions, so the total zeroes are $\frac{\frac{10^{100}}{10}100}{2}+50 = 5×10^{100}+50$.
Comment: What about zeros that are neither trailing nor leading?
Comment: It's a good try, but you forgot about palindromes.
Comment: I got a different answer which matches the other answer posted


Stop ECS cluster temporarily

Question: I want to stop EC2 instances after office hours to save costs. How can I do the same with ECS instances? Even if I stop all tasks/services, the instance is still there? Do I stop the EC2 instance directly?
Comment: Did you get a useful answer? The solutions here so far will 1- kill the running services without letting them stop and 2- constantly trigger placement alarms if you are running as ECS services.
Answer: From EC2 Management Console

Click Auto Scaling Groups from the left menu.
Select the group from the list.
Click edit on the details tab.
Set desired property to '0'.

After clicking save it is all done.
The Auto Scaling Group is smart enough to shut down all instances.
Answer: You can use the "Scheduled Actions" feature of Auto Scaling Groups.
Starts similar to Kerem Baydoğan's answer
From EC2 Management Console:
1 Click Auto Scaling Groups from the left menu.
2 Select the group from the list.
3 Select "Scheduled Actions" from the bar that appeared in the lower middle of the screen.
4 Click on create scheduled action
5 Fill the fields as you see fit and notice that under recurrence there is also a cron option for extra flexibility.
Answer: If you have the cluster set to a minimum number of nodes with an asg. If you turn off the nodes the asg will start another node to bring it up to three minimum number of nodes. You must set the asg to zero nodes.. Then turn off the current nodes.
Comment: Yes... If your asg is 3... and you attempt to shut down a node... The cluster will think the node is broken or failing health checks and just bring up a new node
Comment: what is 'asg' that you are referring to?
Comment: ASG == Auto Scaling Grouo
Comment: when i updated it to 0, the cluster started shutting down my nodes automatically. Are you saying that you need to set it to 0 when we want to shut it down and then back to desired number when we want it up
Answer: Yes, just stop the EC2 instance directly. When you start the instance again during office hours, the ECS agent will make the services start according to their desired value.
We are doing the same thing and it works for us.
Comment: Really, is that working for you guys?!! With the autoscaling group and ECS cluster?!
Comment: The question was asked in 2017 and it has no mention of autoscaling group. Yes, the answer I provided in 2017 in response to the question asked was working for us.

Stop ECS cluster temporarily


What is an idiom for an ultracrepidarian?

Question: Is there an idiom for a person who is in the habit of giving advice or suggestions on matters he or she knows nothing about? I know there is this word ultracrepidarian for such people but I'm looking for an idiom.A phrase would do too.
Comment: When asking a question you're supposed to be a bit more specific about what context you're going to use the word in and what exactly you're referring to. There are various terms for educated people who exceed their areas of expertise, but different terms for idiots who know nothing but think they know everything, or for those who like to contribute to every conversation without necessarily professing expertise. Are you looking for an adjectival phrase, a noun phrase, an address to such people ("cobbler, stick to your last" is allegedly something people say), or what?
Comment: Searching for *ultracrepidarian* on this site will lead one to several pages where arguable synonyms for this word may be found. (The question itself is not a duplicate in the strict sense, but it is a duplicate in a broad sense, in so far as likely answers to it will repeat what can be found on these other pages.)
Comment: [Related and possible duplicate](https://english.stackexchange.com/a/268505/2085).
Answer: I make three suggestions (meddler and the more idiomatic backseat driver and busybody) but in confirming them have found others I did not know previously:

meddler - an officious annoying person who interferes with others
an unwelcome person, persona non grata - a person who for some reason is not wanted or welcome
backseat driver - a meddler who insists on giving unwanted advice
busybody, nosey-parker, nosy-parker, quidnunc - a person who meddles in the affairs of others
buttinsky - a meddler who tends to butt in
kibitzer - (Yiddish) a meddler who offers unwanted advice to others
Free Dictionary

Other dictionaries are consistent with this conveniently compact group of descriptions.
Comment: I know plenty of "armchair experts".
Comment: @MichaelHarvey a good addition to the list!
Answer: A term denoting such a person, that (unlike ultracrepidarian) would be readily understood by most English speakers, is know-it-all. In British English, its variant know-all is also available. The term is inherently ironic: it means that the person does not, in fact, know very much, let alone 'all', but merely behaves as if he does.
Comment: This is posted as a wiki-answer because it is a copy of what appears in an answer that I have posted to a differently formulated, but closely related question.


TextView is not Clickable on OpenGl Curl View Effect

Question: In my application I have requirement like this.I have number of data and I need to show that data on ListView kind of layout,now I have suppose total 6pages on each pages I want to show such data.I have listed number of textview on each page.Suppose i have 7pages so i need to make book kind of layout for that i am using this Code.https://github.com/harism/android_page_curl.
with this i am able to get such effect.As mentioned in below image.

Now my issue is,As OpenGl is converting entire layout to bitmap,i am not able to handle click event of textview.Whenever i click on textview on that time ACTION_DOWN method is called.and offcourse it should be called as entire layout is converting to bitmap thus we can't handle textview click event.
for making solution of this have googled and found some trick from This issue.Here mentioned to make seperate layout for handeling click listener,but not getting what exactly i have to do,as i don't have any experience in OpenGl,so if any one have idea about this issue,any one who can guide me handle click event.
Comment: Can I ask how you achieved, what you have got so far, I am doing something similar, however my pages won't need to interacted with. At the moment I was thinking to convert my layouts into a  bitmap then add it to a List (as its more dynamic than an array) and then change the pageProvider a little bit, however my curl view is now acting very weird and almost pulling out random layouts?
Answer: The above solutions depends on your views pages. It may not work if you use ListViews on your pages or any ScrollView, you have to retest your application performance...
What i have done to get it working, is to create an extra root parent with,FrameLayout, place on top the widget, fi.harism.curl.CurlView and add PageContainer(RelativeLayout on may app).
At run time, get the drawable of your view page (View.getDrawingCache()) , and add The real PageView(witch contains click listener) to the PageContainer. Make the PageContainer alpha to 0. You have a duplicate page (transclude) to receive the page clic, the CurlView will still handle touch events for curl.


ASP.NET - Razor. Rewrite URL on the fly

Question: Is it possible to rewrite URL on the fly, only when a part of the server code has already been processed for the "raw" URL and it becomes clear the parameters must not be revealed to the user? Like, I want to proccess all the GET parameters in my page code on the server and create a tracking record in the database, then serve the user the page but change URL to parameterless in the browser.
I guess all the web.config referred module techniques won't work as they offer URL rewriting before request is passed to the page code on the server. But it comes in my case that I receive an ugly URL from google adwords clicks and I do like it tracked 'as is' in my database, and I do certainly not like it show to user in her brower's bar.
At the same time I would like to keep URL unchanged without applying the URL rewrite most of the time unless some particular parameter shows up in it (like ref=adwords) so that any paramter written by hand or posted back would be displayed in the address bar.
Is it possible to do so by any means?
Answer: Have you considered writing an ActionFilter that would (if your controller or method is decorated with it) intersect your initial request, do all the necessary processiong and then redirect back to the requested page only indicating, that processing has been done?
This would be my first thought.

ASP.NET - Razor. Rewrite URL on the fly


Online shopping steps: payment and confirmation vs review and payment

Question: You are shopping online and you have already added some products to your shopping bag and proceeding to checkout.
From the below options which one works better?
Answer:
From the below options which one works better?

For both, the online-shop operators and the customers, a combination of both options works best:

Shopping bag
Delivery address
Review order: without, the customer has to cancel an acciental order which is avoidable bad UX. Also as a customer I would not buy anything without knowing what is on my list.
Payment
Confirmation: tell the customer that everything went well and the order will be sent in the next x days. Don't leave the user in the dark; the confirmation is like the "Good bye and have a nice day" of physical stores.

Also, keep in mind, that most things in online shopping are regulated by laws. In some countries the online-shop has to show a detailed listing before the final checkout.
Comment: Good suggestion Marvin.
Comment: Reason why i didn't include confirmation in steps is because i feel confirmation is not a step. Yes, showing a confirmation page is necessary (agreed) but i am a bit doubtful in showing it as a step because when you are making a payment online, the actions you have to take is "Provide address" > choose payment method > review orders > pay. Showing confirmation as a step increases the no. of steps visually.  What do you think?
Comment: I agree with you. I saw your "steps" as a more abstract workflow than a concrete visualisation for the user. In this case I probably also would not show confirmation as a step.


solving an equation by suggested method

Question: I have an equation
I want to do this issue: T(dV/dT)-V=0 and obtain T that satisfy this relation. How can I do it? we should at first obtain V and then Drivate it. How can?
Comment: This is a site for the computing software *Mathematica*. Did you mean to post this on [physics.se] or [math.se]? If not, please edit your question with more details.  Ideally, enter your equation in *Mathematica* code with proper syntax, properly formatted in code blocks.
Comment: Check the document of `Solve` and `Dt` and `D`.
Answer: This is an equation of state. This is extensive since it does not depend on n, the number of particles. This is homogeneous in the sample. Just one composite. The second equation is easy to solve. Separation of the variables Ln[V]=Ln[T] and the respect to the starting conditions.
One the other hand the second equation show some dependence abstraction, since for polynomials the differentiation with respect to T leads to a loss in the power of T, the multiplication compensates for that. TdV/dT=T V'[T] for V[T]=const T works to replicate V[T].

The equation of state does not offer such a simple relationship. It can be solved for V as a function of P, T, a, b that are rather complicate. Differentiate that to T make the rational polynomials even more tedious to work with.
The equation of state has then to be solved for T to simplify the representation. This can not be done since a[T] is an arbitrary function of T.
From the wikipedia page for the equation of state this is the Peng–Robinson equation of state.
The second equation stems in a slightly modified form from the same page: Charles's law or Law of Charles and Gay-Lussac (1787).
On the other hand, it looks like the Coefficient of thermal expansion but without the restriction for p. And this third parameter is for the best answer the question that remains. In this openness, a look at Thermal_expansion for technical, chemical important cases might help.
Another view worth is State_function.

solving an equation by suggested method


Probability using empirical distribution function of stock returns

Question: Is it good idea to create empirical distribution of stock returns and make function of its density (using density() in R)? Then I can integrate it and have probability of value less than assumed. Another aproach is to model distribution using normal distribution but as we know stock returns are not normal distributed. What is better solution to get probability?
Comment: What are you going to use the density for?
Answer: I don't think it's a good idea to blindly use the density function; looks like it uses gaussian kernels by default, for Kernel Density Estimation.
This means its kurtosis is underestimated compared to stock returns. Which means you underestimate extreme results (such as, say, -5% or +5% in one day, for S&P500). A popular book about financial implications of this is The Black Swan.
What I would do instead, in general:

Optimize a distribution's parameters to fit your data; for R (which I don't use) it looks like you need fitdistr, or fitdist from the fitdistplus package.

Fitting Distributions with R

Check the various distributions' fit to your data (both as a numerical score, and by visually inspecting them (look using a linear and a log Y-axis, as well as a Q-Q plot maybe).
Choose the one you think is best, in light of the data.

People argue a lot about which distribution is best for stock returns, but they generally accept that the Normal is not acceptable.
Here are some (hopefully) better options:

Laplace
Some other leptokurtic distribution that you tried out and has a good fit (especially on the tails)

The more scholarly way of choosing a distribution is to also consider the theory behind their relationships, and to know why one might be a better fit than the others. While it's the safer option, it also takes lots of learning. I'm not an expert.
Do post a comment or another answer about your own findings, since I'm curious! I haven't tried this myself.


Prove, that for all sets A, B, C and D, in which $A \subseteq B$ and $C \subseteq D$, given formula: $A \setminus D \subseteq B\setminus C$ is true.

Question: Knowing
$$A \subseteq B \Leftrightarrow  (x\in A \Longrightarrow x\in B)$$
$$C \subseteq D \Leftrightarrow  (x\in C \Longrightarrow x\in D)\\$$
I tried to prove, that for any $y\in A$ and $z\in D$, given formula
$$A \setminus D \subseteq B\setminus C$$
is true, but I got stuck almost at the beginning, when I tried to show  $$(y,z)\in A\setminus D\equiv \{y\in A\}\wedge \{z\notin D\}$$ and I am not really sure what should I do now. Although I know, that if $x\notin D$, then $x\notin C$, but it really leads me to nowhere. I would like to see a formal proof of this. Thanks in advance.
Comment: It's supposed to be $y\in A\setminus D\iff \{y\in A\}\wedge \{y\notin D\}$. No $z$ anywhere.
Comment: Thank you, I was trying to prove it the same way as I did for $A\cup C \subseteq B\cup D$, that's why I used two elements.
Answer: The problem is in your assumption: $$(y,z) \in A \setminus D$$
When showing membership for a non-relational set we suppose a single element in the set, not an ordered pair. This is how it should go:
$$x\in (A\setminus D)\implies x\in A \land x \notin D$$
Notice, $C\subseteq D \implies (\forall x)[(x \in C)\rightarrow (x \in D)]$, consequently, by modus tollens $x\notin D \implies x\notin C$
Since $A \subseteq B \land C \subseteq D$, then:
$$(x\in A \implies x\in B) \land (x\notin D \implies x\notin C)$$
Therefore, $$x \in A \setminus D \implies x\in B \setminus C$$
$$A\setminus D \subseteq B\setminus C$$
Answer: $C \subseteq D \Leftrightarrow D^{\complement} \subseteq C^{\complement}$
So $A \setminus D = A \cap D^{\complement} \subseteq B \cap C^{\complement} = B \setminus C$ as $A \subseteq B$ as well, and if we replace two sets in the intersection by posibly larger sets, we get a possibly larger set.


How can I make android react as in a call and the proximity sensor is triggered?

Question: I have an application which makes VoIp call. During those call, I would like the screen to react exactly as it does during a normal call. That is, i want the screen to disable all events and turn off when the user triggers the proximity sensor. Of course, when the user moves away his ear from the phone, I want the phone to turn the screen on and enable back all events. I tried before to turn off and on the screen myself. Never worked. So I thought i'd used this solution.
Answer: There is a similar question I found which gives some great info on the Proximity Sensor using samples from the Android Phone app.
android: turn off screen when close to face
Comment: Thanks for the link. I read it and used this code to turn the sensor on:

PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
     mProximityWakeLock = pm.newWakeLock(32,"Salut");  // 32 correspond to constant PowerManager.PROXIMITY_SCREEN_OFF_WAKE_LOCK
     // automatically when the sensor detects a close object.
     if (!mProximityWakeLock.isHeld()) {
         mProximityWakeLock.acquire();
     }

and a release to turn the sensor off.
Answer: Here is the code which may help you ..this demonstrate how we can access proximity sensor using SensorManager Class,here the proximity sensor will triggered an it calls a method which changes an image view you can try your code on that method...., get the Whole Source code here
<code>public class MainActivity extends Activity {
SensorManager sm;
Sensor ProximitySensor;
boolean state=true;
@Override
public void onCreate(Bundle savedInstanceState)
{
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    txstate= (TextView) findViewById(R.id.txstate);
    sm = (SensorManager)getSystemService(Context.SENSOR_SERVICE);
    ProximitySensor = sm.getDefaultSensor(Sensor.TYPE_PROXIMITY);
    sm.registerListener(proximitySensorEventListener,  ProximitySensor, SensorManager.SENSOR_DELAY_FASTEST);

}
SensorEventListener proximitySensorEventListener = new SensorEventListener()
{
  @Override
  public void onAccuracyChanged(Sensor sensor, int accuracy)
  {

  }
@Override
public void onSensorChanged(SensorEvent event)
{
if(event.sensor.getType()==Sensor.TYPE_PROXIMITY)

    {if((int)(event.values[0])==1)

        {

                    call();
        }
    }

}

private void call()

{
        ImageView im = (ImageView) findViewById(R.id.imageView1);
        if(state)
        {
            state =false;
            im.setImageResource(R.drawable.smile);
        }
        else
        {
            state=true;
            im.setImageResource(R.drawable.sad);
        }
    }
};
}
</code>


How to load OSM data into PostGIS preserving all Tags?

Question: I am new to the field of GIS and am trying to view source tags in OSM. I have downloaded the shapefiles from http://downloads.cloudmade.com and have loaded them into Postgres. When I view the data, I am unable to see any tagging data. Should I be following a different process or using shapefiles at all?
Comment: You don't explain what tool you have used to import the shapefiles into Postgres (sometimes they omit fields except the strictly necessary ones) and you also forget to mention with what tool you view them.
Comment: I have used Postgis shapefile loader in pgAdminIII. I have simply viewed them in pgAdmin as well be right clicking on the table name and viewing the data.
Answer: Download the OSM files (in .osm format) and import using osm2pgsql.
When using osm2pgsql, there's a file called default.style that allows you to control which OSM feature goes into which postgresql table, e.g.:
way        boundary     text         polygon
node,way   railway      text         linear

means that

features tagged "boundary" go into the *planet_osm_polygon* table
features tagged "railway" go into the *planet_osm_point* and *planet_osm_line* because the "railway" tag is common between railway stations (osm nodes) and railway tracks (osm ways).
Answer: It looks like the Cloudmade (and Geofabrik) shapefiles only have a minimum number of tags included.  The free-form nature of tagging in OSM doesn't transfer to the shapefile format very easily.
You might want to consider a setting up a database if you want to use OSM data very extensively. OSM Stack Overflow suggests:

It's also possible to create PostGIS databases of OpenStreetMap data using either osm2pgsql or Osmosis, which will give you greater control over the types of features included, but is a more complicated procedure.
Answer: Shapefile on cloudmade server are final data made from osm data. If you want to get raw data (ie with osm tags) you need to download osm files.
You can find some information about how import osm files into PostGIS here: http://trac.osgeo.org/mapserver/wiki/RenderingOsmDataUbuntu
Hope it helps.
Y.


Will make install in the GNU build system overwrite previously installed binary files with the same name

Question: My question regards the GNU build system, namely, the configure, make, make install build system.  My question regards "make install" specifically.  Let's say there is a bin directory a man directory etc. where I install all of my binaries and man pages.  What happens if there is a name clash.  For example what if there were a binary called program and then another package also has a binary called program?  When I do make install on the second program will it overwrite the first?
Answer: The behavior of the "make install" command varies, but the short answer is essentially correct.  "make install" typically copies files from the build directory to some system directories, and those files would overwrite files that already existed in the destination directories.


Move /var from atn Ext4 partition to a ZFS partition in Debian

Question: I want to move /var from a simple ext4 partition to a zfs pool I've built on a RAID array.  I understand I've got to reboot in single user mode to cp -avr the /var partition across, but how do I make sure all of the kernel modules are loaded on boot and in the single user environment, do I have to put them in an initrd?
Comment: I don't know in your exact scenario, but normally the only time you need to worry about modules in initrd is when you're trying to find the root partition. Or wherever the _other_ modules are, _e.g._ `/lib/modules/`. Even in single user mode the kernel will pivot to the drive's root partition.
Answer: Solved this (Debian 10);

Set up your ZFS structure but not mount points
Reboot in single-user mode
Import ZFS structure using zpool import -d /dev/disk/by-id
Copy /var to new pool, I used rsync -avxHAX /var/
Move /var to /var2 as a backup
Edit /etc/fstab to prevent mount of old var
Change the mount point of your ZFS partition to zfs set mountpoint=/var
Reboot

Optional; you might need to "zfs set overlay=on ". I didn't need to do this on a test VM with zfs on a single disk, but did on a crufty old server. This is because the kernel was starting to fill /var before ZFS mounted. looking at the systemd log, this was about the same point in the boot as my old ext4 partition got mounted over /var and the system works, but ymmv.
Rationale; I wanted more space for my docker containers and VMs and them to be in the standard location on the filesystem and I wanted to try ZFS for the snapshotting, compression and stability. I'll update this if it goes horribly wrong.
Comment: I can't see what your rsync target is.
rsync -avxHAX /var/  . . .  to where?
Can you copy files to a pool that isn't mounted?


What's the difference between returning void and returning a Task?

Question: In looking at various C# Async CTP samples I see some async functions that return void, and others that return the non-generic Task.  I can see why returning a Task<MyType> is useful to return data to the caller when the async operation completes, but the functions that I've seen that have a return type of Task never return any data.  Why not return void?
Answer: SLaks and Killercam's answers are good; I thought I'd just add a bit more context.
Your first question is essentially about what methods can be marked async.

A method marked as async can return void, Task or Task<T>. What are the differences between them?

A Task<T> returning async method can be awaited, and when the task completes it will proffer up a T.
A Task returning async method can be awaited, and when the task completes, the continuation of the task is scheduled to run.
A void returning async method cannot be awaited; it is a "fire and forget" method. It does work asynchronously, and you have no way of telling when it is done. This is more than a little bit weird; as SLaks says, normally you would only do that when making an asynchronous event handler. The event fires, the handler executes; no one is going to "await" the task returned by the event handler because event handlers do not return tasks, and even if they did, what code would use the Task for something? It's usually not user code that transfers control to the handler in the first place.
Your second question, in a comment, is essentially about what can be awaited:

What kinds of methods can be awaited? Can a void-returning method be awaited?

No, a void-returning method cannot be awaited. The compiler translates await M() into a call to M().GetAwaiter(), where GetAwaiter might be an instance method or an extension method. The value awaited has to be one for which you can get an awaiter; clearly a void-returning method does not produce a value from which you can get an awaiter.
Task-returning methods can produce awaitable values. We anticipate that third parties will want to create their own implementations of Task-like objects that can be awaited, and you will be able to await them. However, you will not be allowed to declare async methods that return anything but void, Task or Task<T>.
(UPDATE: My last sentence there may be falsified by a future version of C#; there is a proposal to allow return types other than task types for async methods.)
(UPDATE: The feature mentioned above made it in to C# 7.)
Comment: @JamesCadd: Suppose some asynchronous work throws an exception. **Who catches it?** The code that started the asynchronous task is not on the stack anymore -- it might not even be on the same *thread* -- and exceptions assume that all the catch/finally blocks are *on the stack*. So what do you do? We store the exception information in the Task, so that you can inspect it later. But if the method is void returning then there is no Task available to user code. How exactly we deal with that situation has been a matter of some controversy and I do not recall at this moment what we decided on.
Comment: I actually asked this question of Stephen Toub at BUILD. In .NET 4.0 unobserved, unhandled exceptions in Tasks would eventually crash the process once TPL detects they were not observed. In 4.5 they've changed the default behavior so that unobserved exceptions will still be reported via the TaskScheduler::UnobservedTaskException event, but will no longer crash the process. If you *want* the old 4.0 behavior you can opt back in with . Most likely the change was made precisely for supporting fire-and-forget for void async methods.
Comment: +1 I think the only thing missing is the difference in how exceptions are treated in void-returning async methods.
Comment: `async void` methods raise their exception on the `SynchronizationContext` that was active at the time they started executing. This is similar to the behavior of (synchronous) event handlers. @DrewMarsh: the `UnobservedTaskException` and runtime setting only apply to "fire and forget" async *Task* methods, not `async void` methods.
Comment: Citation link for async exception handling info: http://blogs.msdn.com/b/pfxteam/archive/2012/04/12/10293335.aspx#11
Comment: Great explanation, thanks Eric! I am curious as to what João is referring to about differences in exceptions.
Answer: In case the caller wants to wait on the task or add a continuation.
In fact, the only reason to return void is if you cannot return Task because you're writing an event handler.
Comment: No, you can't.  If the method returns `void`, you have no way of getting at the task that it generates.  (Actually, I'm not sure whether it even generates a `Task` at all)
Comment: I thought it was possible to await methods that return a void type as well - could you elaborate a bit?
Answer: Methods returning Task and Task<T> are composable - meaning that you can await them inside of an async method.
async methods returning void are not composable, but they do have two other important properties:

They can be used as event handlers.
They represent a "top-level" asynchronous operation.

The second point is important when you're dealing with a context that maintains a count of outstanding asynchronous operations.
The ASP.NET context is one such context; if you use async Task methods without awaiting them from an async void method, then the ASP.NET request will be completed too early.
Another context is the AsyncContext I wrote for unit testing (available here) - the AsyncContext.Run method tracks the outstanding operation count and returns when it's zero.
Answer: Type Task<T> is the workhorse type of the Task Parallel Library (TPL), it represents the concept of "some work/job that is going to produce a result of type T in the future". The concept of "work that will complete in the future but returns no result" is represented by the non-generic Task type.
Precisely how the result of type T is going to be produced is and implementation detail of a particular task; the work might be farmed out to another process on the local machine, to another thread etc. TPL tasks are typically farmed out to worker threads from a thread pool in the the current process, but that implementation detail is not fundamental to the Task<T> type; rather a Task<T> can represent any high-latency operation that produces a T.
Based on your comment above:
The await expression means "evaluate this expression to obtain an object representing work that will in future produce a result. Sign up the remainder of the current method as the call back associated with the continuation of that task. Once that task is produced and the call back is signed up, immediately return control to my caller". This is opposed/in contrast to a regular method call, which means "remember what you're doing, run this method until it is completely finished and then pick up where you left off, now knowing the result of the method".

Edit: I should cite Eric Lippert's article in October 2011 MSDN Magazine as this was a great help to me in understanding this stuff in the first place.
For loads more infromation and whitepages see here.
I hope this is of some help.


Is it okay to reuse the text of a sentence from a paper that summarises the findings of a primary reference?

Question: If x paper says "y et al. [1] have found so and so in the water of India", why can't I use the exact same words as the "x paper" and just cite [1]? My understanding is this- since x paper does not own the set of words that was used to explain what y has found, it's not their 'idea'. And stating that another paper have found something doesn't give x paper credit for the findings. It's a bit like saying that just because some person said "This store makes tables", I can't use these words and instead I have to say "Tables are made by this store", which, I think is an unnecessary restriction.
Comment: Welcome to Academia SE! On one hand, when seen objectively, your question is quite pertinent, and it has solicited some high-quality answers. On the other hand, to be quite honest, your tone in asking the question is somewhat off-putting, which might explain some negative votes. You write as if you are complaining about the unfairness of the convention that requires citation of secondary sources. I suggest that you edit your question to simply ask your question neutrally without sounding like you are complaining. In any case, hopefully you will continue to find Academia SE helpful!
Comment: Thank you for welcoming me and especially the feedback! I'll rephrase the question to the best of my abilities.
Answer: If x paper says "y et al. [1] have found so and so...," then you need to read and cite the original y paper, not the citing x paper.
Comment: In reusing the words of x while citing y, the OP seems to be attempting to cite y without having read y, which is what the linked Q is about.
Comment: Correct, I have not read y paper
Comment: The OP seems to be asking about citing y but reusing the words of x while doing so, not about citing x instead of y.
Comment: Agree: this answer would be improved if you explained how OP needs to handle the x paper. Do they need to cite x? Under circumstances are they allowed to use the same words that x used?
Comment: Agreed, but the OP does not mention that they did not read y, so this seems a bit tangential to the question asked.
Comment: @BruceMurdock https://academia.stackexchange.com/questions/1922/whats-the-correct-way-to-cite-a-paper-cited-by-another-paper
Answer: Generally  there are two things to consider and they are not the same: copyright and plagiarism.
Plagiarism is attributing the ideas of others to yourself. Your reuse of "a few words" doesn't have that effect, so it isn't plagiarism. In most places, plagiarism is a social, not legal matter, though there are some exceptions.
Copyright violations involve copying and republishing the words (music, ...) of others, even if you properly attribute it. Copyright is a civil law matter (most places) and laws differ though there is a movement to unify national copyright laws. One of the principles of most copyright law is whether the copying reduces the value of the original to the copyright holders. Again, a few words is almost always unlikely to do that and certainly not in your case. Copying a paragraph, or a chapter, from a copyrighted work is a much different matter.
But another principle of copyright law (generally speaking) is that for some things there is really only one way to say it. Some mathematical definitions and theorems fall into this category and they aren't limited by copyright which is aimed at creative expression.
It seems like you are operating ethically. You properly attribute the idea to Y, just as X did. It is only a few words. There are few ways to express the same (proper) idea.
There could be closely aligned situations, however, in which the idea you are trying to get across is that X agrees withy Y, rather than Y says something. In that case, a citation of X might be needed.
The title question, however, can't be answered without context. Sometimes yes (as above) and sometimes no, depending on what you want to copy. When in doubt cite and also quote, while minimizing your quotes.
Comment: I would be very careful with saying "a few words" is not plagiarism. I think this might give the wrong impression to some people, especially considering the "copy paste" that is being asked about in the question (which to me implies more than a "few" words).
Comment: "There could be closely aligned situations, however, in which the idea you are trying to get across is that X agrees withy Y, rather than Y says something. In that case, a citation of X might be needed." - This was crucial.
Answer: No, paper x does not own the words. You could obviously write a very similar, if not identical, sentence like it is written in paper x after reading paper y. And as long as you really, really do not use paper x as a source there is no issue at all. In this case, the identical wording is pure conincidence and you would not have to cite paper x.
However, if you use paper x as a source you must make that transparent, especially if you in fact copy and paste their words. Never ever simply copy words you read without citing properly. There really is no reason to deny the authors of paper x the credit.
Answer: If this is a piece of assessed work, then leaving aside the copyright/plagiarism issues (well covered by @Buffy), it is worth bearing in mind that assessments are set to give you an opportunity to demonstrate your understanding of the topic (as that is generally what is being assessed).  Direct quoting or close paraphrasing only demonstrate that you are able to identify a suitable source, not that you understand it.  Use the literature review to demonstrate that you understand the relevance of the source for your project/work.  All to often literature reviews are just thinly paraphrased quotes from the abstracts of the papers, which does not create a good impression and conveys little useful information.
Answer: The fact that you are able to write "x paper says 'y et al. [1] have found so and so in the water of India'" strongly suggests that x paper has been helpful to you in identifying the original Y et al. reference. This suggests that you did not come up with these exact words yourself, but that you got them from x paper. This raises the issue of copyright. Facts and ideas are not copyrightable--no one owns the fact that y et al had a particular finding. However, the precise way that ideas are expressed in recorded form (specifically in writing, sound recording, video, etc.) is copyrightable. The first person to express an idea in a specific way gets copyright to it. Others who come after them are supposed to find their own original way to express the same idea.
You seem to object to this application because the phrase ("y et al. [1] have found so and so in the water of India") is so short. But if it is so short, then you should have no problem reading y et al yourself and then expressing what they did in your own original words. If you read y et al yourself and then use your own words to summarize what they found, then there is no need to cite x paper at all and then there is no problem. But if you somehow feel that you cannot come up with an original way of saying "y et al. [1] have found so and so in the water of India", then indeed you should quote and cite x for their original way of saying that. (That said, as some of the other answers have indicated, scholarly rigour expects you to read the original source and cite it directly rather than taking the shortcut that "x said that y said…".)
Answer:
It's like saying that just because some person said "This store makes tables", I can't use these words and instead I have to say "Tables are made by this store", which is totally unnecessary.

I don't think you have a correct understanding of the issue of plagiarism. If copying the words "This store makes tables" were plagiarism, then changing it to "Tables are made by this store" would still be plagiarism (but the change in words might fool some plagiarism detectors). If you find yourself changing words or "paraphrasing" then you are trying to hide something, you should stop and reconsider what you are doing.
Plagiarism is about presenting somebody else's work as your own. It's not about whether you use the same words or not, but whether you use the same ideas (without proper attribution). If you write your literature review by very closely mimicking the structure of another literature review (citing the same references in the same order, synthesizing the ideas in a very similar way) then it's plagiarism. It doesn't matter how many words you replace by synonyms and how you change the structure of the sentences, it's still plagiarism.
As a general rule, I would never, ever, use the literal ctrl+c, ctrl+v way of copy pasting anything from another paper without immediately putting it in quotation marks with a citation. Even if the amount you copy is "small enough" to not be plagiarism, I think the fact that you are even considering copying and pasting from a paper is a very troubling sign that you are writing your own work with the other's work too close in hand, and there's a very real risk you would mimick the structure and synthesis of ideas too much.
If you end up writing the same words by chance then it is okay and not plagiarism. A good lithmus test is the following: if you were to forget about the paper for a week and then continue writing (without consulting the source you are "copying" from again), would you still use the same words?


A photon scatters an electron at an angle... Does it imply electron having an area greater then the photon's?

Question: Even we don't know much about scattering areas of photons and electrons does the fact that a photon scattering an electron at an angle mean that the photon cross-section area hits only a small lateral area of the electron causing it to move at an angle. If the photon cross-section area was greater than the electron's one would the electron be scattered only in the direction of the photon incoming motion because the whole its area would be uniformly objected to photon's pressure? So should the electron have a finite volume?
Comment: See [Is the zero distance limit of Coulomb's law something to worry about?](https://physics.stackexchange.com/q/453912/37364)
Answer: Photons and electrons are elementary particles in the standard model of particle physics, SM , a quantum field theory model.
They are by axiomatic definition point quantum mechanical particles and  their behavior is perfectly described by the SM. Their scattering can only be described within this quantum mechanical framework.
So, as the SM fits the great plethora of particle physics data and predict new observations, it is accepted that the electron and the photon do not have a crossection. Their scattering is due to the electric field of the electron and the coupling of the photon to the electromagnetic field as given by the Feynman diagrams that can compute the probability of the scattering, example:

The experiments have put an experimental limit on the "size"of the electron , see this,  as < $10^{-18 } m$ , which gives a limit to the validity of the standard model.
Comment: Really nice answer.
Answer: I think the question is based on a very mechanistic idea of scattering. IN reality what is important is energy and momentum conservation. Assuming for simplicity a non-relativistic electron, this means
$$
\frac{p_i^2}{2m} + \hbar ck_i = \frac{p_f^2}{2m} + \hbar ck_f,\\
\mathbf{p}_i + \hbar\mathbf{k}_i = \mathbf{p}_f + \hbar\mathbf{k}_f.
$$
To satisfy the momentum conservation (i.e. the second equation) the initial and final momenta of either the electron or the photon do not have to be parallel. In fact, there are simply many more possibilities to satisfy both conservation laws when they are not parallel, i.e. when photon and electron are scattered at an angle.


Categorical variables in Linear Regression

Question: I learned that in order to use categorical variables in Linear Regression models, I have to convert them to several binary dummy variables. Binary dummy variables can either be 0 or 1, so they aren't continuuos, too. So why does it work better with binary dummies?
Comment: for dummy coding you convert k categories into a k-1 dummy variables, so your binary variable has 2 categories you will get 1 binary dummy that is either 0 or 1. I don't know why would you think one works better than another one, they all work the same
Comment: Dummy variables or other contrast variables are (used as) quantitative. That is important. It doesn't matter if they are integer-valued or fractional-valued. Simple contrast variables are fractions, for example. All contrast variable types are discrete, that is, they can bear a limited amount of possible values, but the amount can be more than two or three.
Comment: About contrasts and contrast variables of different types https://stats.stackexchange.com/a/221868/3277
Answer: It is all about interpretation.
Suppose you have a variable $X$ that can take three different values: A, B and C. And suppose we are interested only in the realtionship between $X$ and some response variable $Y$. If we do not encode $X$ with the dummy variables, but use $0$, $1$ and $2$ instead, then the model is:
$$ Y = \alpha + \beta X + \epsilon.$$
When we estimate $\beta$ with $\hat{\beta}$, then our interpretation of the model would be something like: "a change in X from group A to group B is associated with $\hat{\beta}$ changes in units of $Y$, whereas a change in X from group A to group C is associated with twice as much change!"
But what if you code the groups differently? For example, you can change $A$ and $B$, and you will get a completely different interpretation. The estimator may even be very close, but the conslusion will be different.
With dummy variables you wouldn't run into these kind of problems.
There are models where it makes sense: for example, if you have $X$ representing age groups. If the categorical variable is ordered and one expects that the difference between A and B is the same as between B and C, then yes, it may make sense to just forget about dummies and use the variables straightforward. But most often, the categorical variables stand for something like race or gender, where there is no ordering. Hence, dummy variables.


your fresh content on Google

Question: I have actually pretty simple question. Having new sitemap every week and get it indexed immediately. How can I guarantee that the new fresh content will be indexed immediately by Google without building new sitemap. I suspect there are should be kind of trigger to index just one particular URL that will be working with huge sitemap created early.
Answer: There is no way to guarantee it. Google will crawl your site whenever it feels like it. Typically sites that are updated often and have a lot of quality links are crawled more frequently then those that do not.
Update
In response to your comments: Your sitemap should reflect all of the content on your website that you wish to have crawled and indexed. So if you keep adding pages to your site then your sitemap should grow accordingly.
Like I said in my answer above, Google isn't going to find your changes or update its index quickly for a site like yours. You need to be patient and continue to add content and seek links to your site. Google will eventually find your changes and update its index accordingly. If and when this happens is beyond your direct control.
Comment: I just found very interesting topic [FAQ](https://sites.google.com/site/webmasterhelpforum/en/faq--crawling--indexing---ranking) take a look at question Q: I changed some text on my pages, why isn't it updated in the search results? My question is can I create sitemap incrementally, such that I have cumulative sitemap every week, and small update every day with ping. Will this wort properly, or everyday update will overwrite the cumulative sitemap?
Comment: Thanks for your answer! I wish I could vote. In your opinion how frequently can I build sitemap? If there is any way to know that google already have indexed my site? (of course not from search string). Sorry for being annoying, but I really need to know the details. Thanks!
Comment: You can build a sitemap as often as you want. In fact, many sitemaps are dynamic and add new pages immediately upon their creation. If you want to know more about how Google sees your content sign up for a [Google webmaster account](https://www.google.com/webmasters/tools/home?hl=en).
Answer: The sitemap isn't all that useful unless you have over 1000 pages or so, so large that Googlebot isn't likely to crawl it all at once. As long as you have clear navigation and URL structure, Googlebot will find your content, new and updated, when it crawls your site. If your site appears more active, it will get crawled more frequently than a less active one. In other words, don't worry so much about the sitemap unless you have a highly complex or large site where Googlebot will need help in finding everything.
You can use pinging to alert search bots of new/updated content. Many CMS scripts have this built into them. You only need to ping once since additional pings are ignored.
It's also effective for indexing purposes to use Twitter, Facebook and other social media to highlight new content. If you can get other people repeating your new content links, so much the better.
Lastly, getting strong, long term, links to your content is essential to having your site rank well and for it to be crawled more often.
Comment: Do you know, If there is any way to know that google already have indexed my site. I can come up with two of them, searching for robots.txt in your web server log and searching for google user-agent in log. Do you know any other way? Thanks
Comment: I check Google itself by using site:mydomainname.com to show the indexed pages. I usually do this via the SEOQuake toolbar in Firefox. You can also use Google Webmaster Tools for some additional information if you want it.

your fresh content on Google