Clarification on Oracle sdo_gtype

Question: I need some clarification on oracle sdo_gtype 4402. I understand that sdo_gtype is codded as DLTT. D: Dimension L : linear reference T T: TT identifies the geometry type. It's clear to me that first 4 indicated that the feature is 4-D. I am not sure about the second "4" and linear reference term. I need to create a spatial table using sdo_gtype 4402 that's why seeking some clarification on it.
Answer: By reading the documentation of Oracle 12c https://docs.oracle.com/database/121/SPATL/sdo_geometry-object-type.htm#SPATL490 GTYPE=4402 is a 4-dimensional geometry where the measure is given with the 4th coordinate. The geometry itself is a line.

The SDO_GTYPE value is 4 digits in the format DLTT, where:
D identifies the number of dimensions (2, 3, or 4)
L identifies the linear referencing measure dimension for a three-dimensional linear referencing system (LRS) geometry, that is,
which dimension (3 or 4) contains the measure value. For a non-LRS
geometry, or to accept the Spatial and Graph default of the last
dimension as the measure for an LRS geometry, specify 0. For
information about the linear referencing system (LRS), see Linear
Referencing System.
TT identifies the geometry type (00 through 09, with 10 through 99 reserved for future use).
02: Geometry contains one line string that can contain straight or circular arc segments, or both. (LINE and CURVE are synonymous in this context.)

Typically these geometries are used for roads. X, Y, and Z coordinates define the road geometry and M as a fourth coordinate gives the distance from the start point of the line. Pipelines and cable networks are other use cases.
Answer: This type describes a 3D line with measures.
The first 4 indicates the number of values that describe each vertex: X, Y, Z, M
The second 4 indicates the position of the measure value (M) in this set of numbers (ordinates) - as the last one. It also confirms that the shape is a 3D shape with measures, as opposed to a 4002 shape, where the last number can be anything - X, Y, Z, T for example: we make no assumption as to the meaning of the last ordinate.
As explained in other answers, this is a "Linear Refetenced Segment" or "LRS". Lines like that carry a measure information at each vertex. That measure typically represents the distance of each vertex from the start of the line. But it could also represent time: for example time on a flight route since a plane took off ...
Measures must be all either increasing or decreasing. They can begin with any value (not necessarily 0). They can be positive or negative.
Not all vertices need have a measure. A measure is mandatory for the first and last vertex only. For all others measures are optional. Any missing measure is automatically interpolated from existing neighboring measures.

Clarification on Oracle sdo_gtype


Is rainy weather in Minecraft dark enough to spawn monsters?

Question: Is it dark enough to spawn monsters, or bright enough to make them despawn?
Answer: No. Rainy weather reduces day-time light-levels to 12 at mid-day, which is not low enough to spawn monsters. This 3-point decrease does mean that, as twilight falls, it will be darker sooner and monsters will spawn just that bit earlier—but of course, it's not "day" anymore at that point.
However! Thunderstorms have a light level of 7 at mid-day, meaning that monsters will spawn then. That's just one more reason to not go walking around when lightning is crashing down.
Comment: Well this helps because im in hardcore and all my survival worlds mobs spawn in rain
Comment: A very good answer, since it describes not only when darkness does take effect mechanically, but specifies that thunderstorms are even darker than regular rain, which I did not even know!
Answer: Notch said on twitter:

MUOAHAHA! Thunder Storms lower the brightness. That means daytime monsters during storms. This is freakily atmospheric.

https://twitter.com/notch/status/57363403102105600
So that means monsters will spawn during a storm (thunder and lightning) in the day, but not when it is only raining.
Comment: Also, monsters only burn in complete sunlight (rain decreases the light level by one I believe), so the monsters won't burn up.
Answer: They can spawn in rain. I know because on my current world it is raining (but there is no thunder or lightning) and hostile mobs are spawning.
Comment: Are you under a lot of trees? That will make it darker.


Selecting Seats after booking from BudgetAir

Question: I have found some affordable tickets on BudgetAir (could be any other service - specifying it just for the reference in case someone needs it) and I wonder if I can choose the seats from the carrier (Kuwait Airways)'s own page later on? I know they allow it for the normal tickets purchased from their website, but do they facilitate it even for the 3rd party ticket purchases too? Issue with BudgetAir is that its not showing some of the seats in seat selection which are available on main KWI Airways page.
Comment: never use 3rd party websites, this just being a small reason for it
Comment: Aye but then irrops happen and you will rue the saved little money. A tale as old as time. This site is full of such stories. https://travel.stackexchange.com/q/168635/4188 https://travel.stackexchange.com/q/171242/4188 comes to mind and that's just within the last year...
Comment: It is difficult to predict what you will have access to. In some cases with the PNR you'll have access to seat selection exactly as if you had bought directly from the airline. Some other times you won't have access at all. Also, it's possible you have a restricted fare which does not give access to all seats (especially any you have to pay extra for, but there may be more restrictions). There's usually a reason for the discount…
Comment: @chx I have concerns about 3rd party websites too. But its giving some discount.
Comment: @chx Had some concerns. Thanks for clearing it.
Answer: There is no general answer for all airlines and all booking sites.
Some airlines will allow people who bought from an other seller all the same perks as people who bought from the airline itself.
Other airlines restrict people who bought from other sellers in some or many ways.
Airlines do not have to publish what rules they follow, when they change them nor whether they keep the same rules for all resellers.
So even when you know about the rules for the combination of airline and reseller you can run into problems when the airline changes those rules.
A good reason to avoid resellers is that they have often proven difficult in getting your money back when the airline cancels the flight, in getting you your money if you get a delay and the airline is bound to compensate.
And often they sell you 'a ticket' for two flights which are unrelated for the airline(s) and leave you hanging when one of them is delayed or cancelled.
And one small thing I noticed myself, the airline send an e-mail to announce a change in departure time and the reseller took 24 hours to send on the mail. In my case it was a departure a bit later which did not matter anything, but it could have cost me big if I had had two different flights or  if the change had been bigger. For me the reason to avoid resellers since.
Comment: Yeah noticed Etihad airways (recently booked directly from their website) sending a barrage of email/sms to notify the change in departure time. Indeed can be costy in the case of reseller.


Typically what range can an active powered type 5 NFC tag be written / read on iOS/Android

Question: does anyone know the answer to the above - I am struggling to find out the information. I know that a type 5 tag can be read from 1.5 metres away in ideal conditions, but what can I expect from a phone, in situations where the tag is powered (active) and situations where the tag is active. I know a lot of it will depend on various factors, but looking for a ballpark figure at this stage.
Answer: Range is very variable and dependent on tag and device antenna sizes and reader design and ICs used.  NTAG 5 Boost versions claim up to 600mm range (see below).
Typically 30 to 100mm ranges are achieved, depending mostly (it seems) or tag and reader antenna design.  Best case 600 mm range is claimed - see below.
____________________________
The following table and graph is provided by ST.
ST25T&ST25DV-I2C read range evaluation with the ST25R3911B antenna reference design.
With a 15 x 15 tag antenna range is 55 mm to 95 mm as reader antenna varies from 30 x 30mm to 100 x 80mm .
AT the other extreme, with a 80 x 50 tag antenna (rather large) range varies from 100mm to 200mm with the same reader antennae as above.

From here
___________________________________
Practical design.   RF430FRL15xH NFC and ISO/IEC 15693 Sensor Transponder Practical Antenna Design
TI Application Report SLOA217–April 2015. 24 pages

The Texas Instruments RF430FRL15xH ISO/IEC 15693 NFC Sensor Transponder is an NFC Tag Type 5
device operating at 13.56 MHz (HF band). Depending on the application communication distance
requirements, the antenna geometry can be adjusted. The device gives the flexibility to be used in
combination with various antenna geometries.
The scope of this document is a short practical guidance on antenna design basics

Results - from page 11 of the above document.
Note - in cm.

____________________________
Claimed longer range - NTAG 5 Boost
NTAG® 5 boost: NFC Forum Compliant
I
2C Bridge for Tiny Devices
OM2NTx5332: NTAG® 5 development kits

Buy on that page or eg from Digikey
NXP Semiconductors
NTAG® 5 Family: NTAG 5 boost I²C Bridge for Tiny Devices
NXP's I²C bridge for tiny devices is NFC forum compliant and offers active load modulation to enable very small antennas here
47 page introductory document from NXP February 2020
NTAG 5 PRODUCT INTRODUCTION NFC FORUM TYPE 5 TAGS: NTAG 5 PRODUCT FAMILY PRESENTATION
600 mm -
Page 8, 18 :  NFC Forum Type 5 Tag compliant ISO/IEC 15693 compliant, up to 60 cm read range
Page 34 - range compariosns.
"Allows the user to build a compact antenna with a smaller footprint without compromising the read range."
______________________
To (probably) add confusion, here are some other sources:
2016 " ...  Many are tagged with the popular ISO 15693 tags, which allow for a longer read range. This is useful for scanning library books or checking passes on the ski lift where a 5 to 10cm read range keeps things moving smoothly. Now, NFC phones can read them too. ..."
From here
ST TAG offerings here
NXP offerings here
Comment: Wow, thank you very much for such a comprehensive answer, there is a lot to digest there and I shall begin now.


Are there grants that can be used to reduce teaching load?

Question: In mathematical and other theoretical fields, there is not much need for expensive equipment, so grant money is mostly used to fund students and research assistants. But in some fields, good students and assistants are very hard to find (for example, in computer science, the salary in the industry is so high, that it is nearly impossible to beat with grant money). In such cases, apparently the most efficient way to use the money is to reduce teaching load from the principal investigators (e.g. by paying external teachers to teach the basic courses), so that they can spend more time on their research. Is there any fund that allows to use the money in such a way?
Comment: Don't turn this into a shopping question.
Comment: Make sure you agree with your department what duties the money can/will buy you out of *before* applying for the grant/fellowship.
Comment: My university has such grants locally, on the depau-level. Answers will differ depending on locale.
Answer: I'm sure that this varies from country to country, but I think a lot of grants (and universities) will let a researcher "buy out" of some sorts of teaching using grant funds. Fewer will let you buy out of all teaching, since that would defeat one of the main missions of a university. But, buying out of an undergraduate class might be possible.
I'd guess that long term buy outs from teaching would be very rare, only for superstars, and not applicable to doctoral advising, or maybe even advanced specialty courses.
And, in some places, doctoral advising counts against the teaching load also, but not one student per class.
Also note that it isn't just up to the grant provider. The university also has to judge that this is a worthwhile tradeoff.

Here is a policy at one university:
https://www.umass.edu/sbs/faculty/professional-resources/faculty-resources/course-reduction-policy
And here is a program that doesn't rule out course reduction necessarily:
https://www.nsf.gov/funding/pgm_summ.jsp?pims_id=505892

Note, also, that there are other reasons a university might grant a reduced load than buyouts.
Comment: @DanielHatton In my experience this is done through "effort reporting"; personnel working on grants have to certify that some percentage of their efforts have gone to one thing or another.
Comment: Note, however, that even when a research funder does fund such "buy-out", most funders don't have any monitoring or enforcement in place to ensure that the host university really does release the faculty time that has been "bought out"
Comment: @BryanKrause The EU Horizon 2020 programme has an arrangement similar to the one you describe, but I'm not aware of other funders having anything like it.
Comment: @DanielHatton I see; it's ubiquitous in the US due to US federal law.
Comment: @DanielHatton, in the US, at least, most grant compliance is done by the university, through a "grants office" or similar.
Comment: Israel's funding agencies and universities, may have their own rules, of course.
Comment: Thanks, this gives a board perspective of the topic.
Answer: It is entirely possible but (as you can imagine) such grants are not so easy to get.  Basically, it depends on the rules of the grant.
There are some "non-traditional" grants that are designed for this:  basically the amount of the grant pays for buyouts and the scholar must produce some report at the end of the grant periods.  Some think tanks contract academics in this way.
It is not that uncommon for institutes to have core members with no defined teaching duties: they can teach courses (usually graduate courses) when they want on the topic of their choices.  In  physics the Perimeter Institute in Waterloo operates this way: its core members are affiliated with the university (and thus can supervise students) but do not operate as regular faculty members (although this situation is not strictly a grant, but a perk of appointment there).
There are also exceptional circumstances: endowed chairs for instance might come with full or partial teaching buyouts.
It goes without saying that such grants or positions are highly competitive.
Comment: Would you answer the same way if the question was instead "are there grants that can be used to pay all or part of a professor's salary"?
Comment: @BryanKrause No.  There is an accounting distinction.  The grants I know that allow buyouts do not technically "cover salary".  If it costs X (plus overhead)to hire contract lecturers so the academic gets a buyout, the university receives X+overhead.  Salary and benefits are still paid by the home institutions.   For endowed chairs or institute positions, I (regrettably) have no first hand knowledge of how this is sorted out.
Comment: Gotcha. The grants I am most familiar with (NIH grants in the US) cover salary if it's requested (the percentage can vary, as long as someone isn't paid more than 100% since they're expected to spend a proportional percentage of their work effort). I don't think they particularly care whether a professor uses those funds to "buyout" their teaching; a buyout is just an arrangement between the professor and their institution. Certainly things may be different elsewhere.
Answer: Indeed this depends on the country.  The answer is mostly that Europe has grants like this moreso than North America in my experience. I don't know about other continents so I will focus on what I know below:
In the USA, the way grants from the NSF often work is through providing summer salary. I haven't seen much there.
On the other hand, UK Research and Innovation grants usually pay for a certain percentage of the academic staff member's salary in order to pay for their time to execute the grant. Typically this number is somewhere around 20% for a standard grant for a permanent faculty member (so a day a week reserved for the grant). One prestigious style of UK grant is the fellowship. In the UK, fellowships will fund somewhere between 75-100% of the researcher's stipend, with some having explicit maximum requirements of time used off the grant (e.g., only x hours a week can be used on academic activities such as teaching and admin off the grant).
European Research Council Starting / Consolidator grants often fund sizeable portions of the PI's time as well. Advanced Grants less so as they expect it is harder for the PI to get out of certain obligations as a senior member of a department.
Comment: I'll add that this is also field dependent. UKRI reserach grants in my field generally only pay for 10% of a PI's salary, and departments rarely reduce teaching load irrespective of how much of your time is paid by UKRI (on project grants, the fellowships mentioned are different). So for example, URKI pays for 40% of my time (across various grants), but I have the same teaching load as when I had no grants.
Answer: ERC grants allow to apply for funding for the PI him-/herself, and thus to buy out of teaching (of course, this requires the university to agree beforehand).


Reference for quaternions and complexification

Question: I am writing something on the complexification of a real associative algebra. There are two well-known isomorphisms about quaternions: $$\mathbb{H}\otimes_\mathbb{R}\mathbb{C}\simeq M_2(\mathbb{C})$$ and $$\mathbb{H}\otimes_\mathbb{R}\mathbb{H}\simeq M_4(\mathbb{R}).$$ I need a reference which includes both of these two isomorphisms. I also wonder if there is a reference dealing with the bimodules over the real division rings and their complexification. Anything about complexification and related Galois descent are also welcome! Thanks a lot!
Comment: [see this MSE post](https://math.stackexchange.com/q/123709/272127)
Answer: What you are looking for is contained in
T. Y. Lam: Introduction to quadratic forms over fields, Graduate Studies in Mathematics 67. Providence, RI: American Mathematical Society (AMS) (ISBN 0-8218-1095-2/hbk). xxi, 550 p. (2005). ZBL1068.11023.
In particular:

the isomorphism $$\mathbb{H}\otimes_\mathbb{R}\mathbb{C}\simeq M_2(\mathbb{C})$$ is a consequence of the proof of parts (3), (4) of Proposition 1.1 (taking, in the Author's notation, $F=\mathbb{R}$, $E=\mathbb{C}$, $a=b=-1$), see the beginning of p. 53;
the isomorphism $$\mathbb{H}\otimes_\mathbb{R}\mathbb{H}\simeq M_4(\mathbb{R})$$ is the  content of Exercise 9 p. 76, with $F=\mathbb{R}$.
Comment: Thanks! This helps a lot. Do you know something which is more specialized on real algebras and complexification?
Comment: You are welcome. At the moment, I have no other reference in mind...


What are the feed addresses for "recommended sites" feeds in Instapaper?

Question: I use Google Reader and Instapaper, and I have a pretty good understanding of rss feeds, and have spent a lot of time finding feeds that are appropriate to Google Reader.
I use Instapaper mainly for articles I come across in my feed reader, but I recently discovered that Instapaper has a "Browse Recommended Sites" options where you can add certain content to Instapaper directly. It would be great to basically have a free subscription to the New Yorker, the Atlantic, The Economist, where all of the best longform articles go straight into Instapaper...my question is, what are the rss feeds that Instapaper is using to get that content directly in?
For example, if you look at the Atlantic website, and go here there is no rss feed that says "Long Form Content from the Print Edition." You can only subscribe to individual writers or channels.
If you look here on the new yorker website, there is a feed that just says "The New Yorker" at the top, but then how do I know if that's the exact same feed going into Instapaper? If that's the case, and Instapaper isn't optimized for general feeds, why would Instapaper recommend a general feed like that they may not contain 100% long form journalism?
I want to know if Instapaper is curating their own feeds using some sort of software like Yahoo Pipes to sort for just long form articles,
or if they have a special agreement with some of these sites to get a proprietary feed,
or if there's a way to find out the exact rss url that Instapaper uses for those recommended feeds,
or if someone could at least direct me to the feeds that Instapaper is using on The Economist, The Atlantic, The New Yorker, Wired, Vanity Fair, and Newsweek.
Answer: Instapaper's "Browse" feature is provided by givemesomethingtoread.com and the RSS feed for what it presents in the app and site is available at  http://givemesomethingtoread.com/rss/links
I suspect the collection is not autogenerated from the RSS feeds provided by these publications, but its manually managed by adding articled where there is a link to the full version.


RubyTest in Sublime Text 2

Question: I am trying to get RubyTest to work in Sublime Text 2. I followed the Instruction on the Github Readme and get the following error. Does anyone know how I could fix this?
/bin/sh: rspec: command not found

Answer: To get this to work you only need to change one setting in the RubyTest package in sb2.
If you are using rvm, your rspec gem is installed through rvm and is not found in /bin/sh
So you need to set the RubyTest package for Sublime Text 2 to automatically check for your rvm environment variables.
What to change:
1) In Sublime Text 2, go to Preferences|Browse Packages. This will open up your packages directory.
2) Open the 'RubyTest' directory and look for the file 'RubyTest.sublime-settings'.
3) find the line that says:
"check_for_rvm": false,

and change it to:
"check_for_rvm": true,

save the change.
4) That's it. It should now work.
Good Luck
Comment: This works perfectly and it's easier than the rest of the answers.
Comment: If you can't find that directory/file and you have RubyTest installed, you can also get to the preferences file here by going to Preferences -> Package settings -> RubyTest -> Settings User and adding the `"check_for_rvm": true` to the existing hash or putting inside a new one if the file is empty.
Answer: This worked for me:
If you're using RVM, open a project with command line from the project's folder:
subl .

Then, it'll hook the ruby version and gems.
Comment: Finally, I knew there had to be a simple solution!
Answer: This is most likely due to using RVM. What is the output of
which rspec

on your command line?
Also of note, just because you've included rspec-rails in a Gemfile, does not mean that 'rspec' is an executable program that your system knows about.
You can edit the RubyTest.sublime.settings to refer to your particular path to the rspec executable and it should work.
Unfortunately, this has the nasty side effect of being tied to one particular version of Ruby. If you're using RVM to switch between versions, you'll have to update your sublime.settings.
One work around, is to run Sublime from the command line.
Comment: opening my project by running

    subl .

from the terminal is a good work-around for me!
Answer: Running Sublime Text 2(2165) with RubyTest plugin. Ruby and Gems managed with rbenv (0.3.0).
First attempt to use RubyTest gave the following error:
    /bin/sh: rspec: command not found
From the command line I ran
    which rspec
and it returned no results.
After some digging, I read that bundle install does not put the executables in your $PATH.
Alternative executable paths not picked up by shims sometimes
In order to use the executible outside the app, I had to delete the gem installed by bundler and then install it manually.
gem uninstall rspec
gem install rspec
followed by
rbenv rehash (Note you will need to run bundle inside your app so it updates the location of the gem)
This had to be performed for each version of ruby I have under rbenv control.
Now when I run
which rspec
it is found in the path and RubyTest is able to grab it without any problems.
fwiw, I had to repeat the steps for cucumber as well.  To use all of RubyTests' features, ruby, cucumber and rspec executables need to be in your $PATH (for rbenv it is ~/.rbenv/shims/).
Answer: Try change the path to usr/local/bin/
I wrote a post on Sublime Text Build Scripts which should show you how to do this.
http://wesbos.com/sublime-text-build-scripts/
Comment: This doesn't really get rubytest running and loses the best part of rubytest which is the cmd-shift-e run last test command.
Answer: Same issue for me. With rspec 1.3.2 what I just did to fix it is to edit the RubyTest.sublime.settings file in the plugin folder, changing the "ruby_rspec_exec" key from:
"ruby_rspec_exec": "rspec"

to
"ruby_rspec_exec": "spec"

It really depends on the location where you have your rspec executable file...
Answer: I had the same problem after installing RubyTest by cloning from the repo. I simply uninstalled and reinstalled the package inside Sublime using Package Control, then everything worked fine.
Answer: You can see a summary of this issue here: https://github.com/maltize/sublime-text-2-ruby-tests/issues/36
Essentially, what Jim said was correct, you're running RVM or some other ruby vm manager that similarly monkeys with your PATH. Following the directions from this issue I did the following:
Install the binaries in my project
bundle install --binstubs

Add the path to my .bashrc and source it
echo 'export PATH="./bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

Open the sublime project from the command line (so that PATH is available in Sublime Text 2)
subl .

Answer: The following steps worked for me (I encountered the same error as OP):

Install the RubyTest plugin through the package control manager.
Note* If you don't have the package manager installed - I highly recommend it for managing sublime plugins - more info here.
Be sure to add the code here to your RubyTest.sublime-settings file.
This file can be found at (from the menu): Preferences -> Package settings -> RubyTest -> Settings User
Save file, close Sublime and restart Sublime from the terminal in your project's folder using (so PATH is available in Sublime): subl .
Answer: No, you don't need to change paths, run sublime from command line etc.
If you are using RVM, you only have to do this:
Go to Sublime Text 2, go to
    preferances-> package settings -> RubyTests
and pick settings-user or settings-default (depending what you are using) and change line:
"run_rspec_command": "rspec {relative_path}"

to
"run_rspec_command": "bundle exec rspec {relative_path}"

And so forth - add bundle exec to all commands
Comment: this one worked for me while the accepted answer didn't. upvoted!
Comment: I have found my own answer after some time, and now, after a year, it didn't work for me on a new machine :) the accepted answer helped http://stackoverflow.com/a/14504365/1612469 No wonder I got zero votes :)
Answer: I spent many hours struggling with this same problem! I could not get rspec to run within Sublime Text 2, using the Michael Hartl "Ruby on Rails Tutorial." It kept saying:
/bin/sh: rspec: command not found

I finally realized that the RubyTest package (https://github.com/maltize/sublime-text-2-ruby-tests) was looking in the WRONG PLACE for my RVM!
On my Mac, the path for RubyTest is /Library/Application Support/Sublime Text 2/Packages/Ruby Test
First, to make RubyTest seek the RVM, I changed the parameter in RubyTest.sublime-settings from
"check_for_rvm": false, to "check_for_rvm": true,

Then I dug into the Python code of run_ruby_test.py: https://github.com/maltize/sublime-text-2-ruby-tests/blob/master/run_ruby_test.py
At line 151, inside class BaseRubyTask, it had the wrong path for my RVM:
rvm_cmd = os.path.expanduser('~/.rvm/bin/rvm-auto-ruby')

I changed it to the full correct path: rvm_cmd = os.path.expanduser('/usr/local/rvm/bin/rvm-auto-ruby')
If this is not your path, find the correct path by typing
$ which rvm-auto-ruby and substitute that instead.
After saving run_ruby_test.py, I went to Terminal, cd to my Rails application directory, and ran spork
Finally, I opened static_pages_spec.rb in Sublime Text 2. Now all the tests work from it!
Comment: I'm using RVM as well, but only had to set the `check_for_rvm` setting to `true` to get it to work.
Answer: I'm using rbenv and found that adding the following to my .bashrc did the trick
/Users/user/.rbenv/shims/rspec

RubyTest in Sublime Text 2


Do you have to live in California to have a California's Driver's License?

Question: I lived in California for many years under a work visa. I then moved back to Canada. Can I keep/renew by California driver's license if I currently operate a business in California (and thus currently have a California address)?
Comment: The question is moot, since you are required (in most cases) to give up the California licence when switching to the local licence (B.C. within 90 days).
Answer: This travel StackExchange question has some relevant discussion.
CVC §12505 goes into more detail than the fragments that are extracted and appear on the California DMV web site.

(a) (1) For purposes of this division only and notwithstanding Section
  516, residency shall be determined as a person's state of domicile.
  "State of domicile" means the state where a person has his or her
  true, fixed, and permanent home and principal residence and to which
  he or she has manifested the intention of returning whenever he or she
  is absent.
Prima facie evidence of residency for driver's licensing purposes
  includes, but is not limited to, the following:
(A) Address where registered to vote.
(B) Payment of resident tuition at a public institution of higher
  education.
(C) Filing a homeowner's property tax exemption.
(D) Other acts, occurrences, or events that indicate presence in the state is more than temporary or transient.

So the true test is whether California is "where a person has his or her true, fixed, and permanent home and principal residence and to which he or she has manifested the intention of returning whenever he or she is absent." If that describes your relationship to the place where you operate your business, then you really are a California resident for driving purposes, even if A, B, C or D don't apply to you.
On the other hand, if California is not where you have your "...true, fixed, and permanent home and principal residence..." then California isn't your residence for driving purposes, even if A, B, C or D  do apply to you.
However, if A, B, C, or D do apply to you, and you drive with your Canadian driver license in California, you could be charged with driving without a license. The prosecution could show one of A, B, C, or D as prima facie evidence of residency, and the burden would be on you to present evidence that you are not a resident. But if you truly are living in Canada, there should be a great deal of evidence that you live there, and proving it should be rather easy.
Since, if you truly are a resident of Canada, you could drive indefinitely in California as long as you keep your Canada license in force, it's hard to understand why you would want a California license. If you were willing to say what you are ultimately trying to accomplish, someone might be able to suggest a way to accomplish it that does not involve getting a California driver license.
Answer: From the CA DMV website  https://www.dmv.ca.gov/portal/dmv/detail/pubs/brochures/fast_facts/ffdl05

Residency Documents
You must provide 2 California residency documents
  if applying for a DL, renewing a California commercial DL, or
  converting to a REAL ID Compliant DL.
DMV will not accept an application without the accompanying residency
  documents. DMV will accept photocopies, "informational copies," or
  computer-generated documents for residency purposes. All residency
  documents must list the applicant's first and last name and the
  California residence address must match the residence address listed
  on the DL application. For a complete list of acceptable residency
  documents, visit www.dmv.ca.gov.

I suggest that owning a business is not the same as residing. By your own admission you no longer live in California.  While you might be able to fool the person who takes your documents, it is likely a fraud against the state government and you would be subject to criminal prosecutions.
Answer: No, since you are a Canadian resident, you are required to have a driver's licence that is issued in Canada.
For British Columbia, you are required to do so within 90 days.
If you have not done so yet and it has been longer than the given period

you are driving illegaly

Once you have converted/switched your California licence to a British Columbian (or that from another province), you will no longer have a California licence to renew since the original is mostly retained by the issuing authority of the new licence.
When visiting California, you can use the licence issued in Canada.

Moving from outside Canada
  Welcome to B.C.!
  After moving here, you have 90 days to switch your valid licence to a B.C. driver's licence.

Sources:

British Columbia - Driver licensing & ID

Moving and your licence

Moving from outside Canada


The preparation of 0.005 M Iodine Solution

Question: The dissolution of iodine crystals with potassium iodide is very slow. To prepare a 0.005 M Iodine solution will require you keep the vessel until all crystals dissolve. With the low concentration and the volatile nature of Iodine, the solution might lose its concentration at the time of complete dissolution. Can the solution be heated to speed up the dissolution?
Answer: Since $\ce{I2}$ is a non-polar covalent molecule, it does not ionize in water. It cannot also be soluble in the polar water.
$\ce{KI}$ which is a polar, ionic compound, will ionize and dissolve in water. When $\ce{KI}$ dissolves in water, it ionizes to $\ce{K+}$ and $\ce{I-}$.
The $\ce{I−}$ will react with $\ce{I2}$ to form the complex ion $\ce{I3-}$. $\ce{I3-}$ being negatively charged will dissolve in water.


what is the difference between two sentence? why we use introductory subject

Question: There is a man of the roof
A man is on the roof
both sentence are giving information.
my questions is why we use introductory subject?
Answer: In this use, there" is only ever an adverb. There is a common misconception that "there" can be a pronoun.
There means "at that place." (Here means "at this place" and "where" means "at which place")[1].
We know that there is an adverb because there cannot be the subject of the sentence:
There is a dog in the garden (A dog is in the garden.)
There are two dogs in the garden. (Two dogs are in the garden.)
Because, in English, the verb's form is dictated by its subject, the subject cannot be "there", the subject must be "dog" and "dogs" respectively.
OED description and comment:

Used unemphatically to introduce a sentence or clause in which, for the sake of emphasis or preparing the hearer, the verb comes before its subject, as there comes a time when, etc., there was heard a rumbling noise. In interrogative sentences there comes between the verb and subject, as Breathes there the man, etc.?, or follows the first word of a compound verb, as Does there breathe a man?, Shall there be any notice taken of it? The same order was formerly observed after an introductory adv. or clause, as Then came there a voice, Soon shall there arise a prophet.
  Grammatically, there is no difference between There comes the train! and There comes a time when, etc.; but, while in the former there is demonstrative and stressed, in the latter it has been reduced to a mere anticipative element occupying the place of the subject which comes later. Preceding or following a main verb, or following any verb, there, thus used, is stressless (proclitic or enclitic: e.g. there-ˈcame, ˈbreathes-there, ˈis-there, ˈwill-there), but preceding be or an auxiliary, there has a slight stress, and the verb is enclitic (e.g. ˈthere-is, ˈthere-was, ˈthere-will).

The inversion of subject and verb is relatively common when a sentence is fronted by an adjunct:
Only after the war was over did he go home.
Dearly do I love you.
Many are the times that I thought of you. (Many are the times  -> The times exist numerously.)
Thus, there may be
(i) weakly demonstrative and merely indicates the existence of an item -> "There is a dog in the garden." Or "There are lions in Africa" This is because the only way that the verb "to be" can take an adverb is in its meaning of "to exist" (or "have an existence.")
(ii)    clearly demonstrative when used with a non-stative/dynamic verb: "Look there!"
It might seem that there can be a noun meaning "that place [yonder]" e.g. "He left there last night." This occurs only because the other forms of thence and thither [size=2]which indicate motion[/size] have been all but lost and "he left there last night"  = He left from that place last night, in which "from that place" is adverbial and likewise "thence "to that place"[1]".
[1] There, here, and where also may substitute for thence, thither and hence, hither, and whence, whither with the appropriate change of preposition.
Answer: We call "there" existential or introductory. One can express himself by any other plausible means. But that doesn't mean we have no need of Introductory THERE. Often times it is essential and lends beauty and elegance to your writing.

There was a time when no man existed.

Don't  begin, " In ancient times....."
The sentence would be lackadaisical.


Is a loose part on a 1995 Mercury Tracer important?

Question:
I just noticed a loose part on my 1995 mercury tracer trio. Honestly, I am unsure of the name of the part and its importance. It's the black plastic piece under the front bumper and it's hanging but one of the two bolts. The hole where one of the bolts goes through is ripped. Can I just take this piece off and not replace it or is this a critical part of the car?  Thank you.
Comment: Could you post a couple of photo's of the damage and loose components?
Comment: @DucatiKiller Please see the picture above, thank you!
Comment: Zip tie it up. Make a hole in the plastic part.
Answer: It really depends on what the piece is you are talking about. Some vehicles have an air dam on the bottom of the car which forces air to flow through the radiator while the vehicle is running down the road. This piece would (in its normal position) extend directly down under neath the radiator core. You'd also have a space just in front of the piece where you could see the radiator. If this is the piece, it is absolutely important. If it's not there, the car engine will run hot while you are driving at speed.
If it is just a piece which covers other parts of the bottom front side, it's not very important and can be removed if you don't mind the ugly aspect of it.
EDITED NOTE: Please note, if you remove a piece which covers vital bits/pieces (such as the radiator), it can leave these parts exposed to the elements and flying road debris. Choose wisely if the piece in question does cover any of these vital parts prior to removal.
This is one of those cases where a picture could be worth a 1000 words.
Comment: Thanks for the insight, I do appreciate it. Please see the picture I just posted and let me know if that helps.
Answer: Rip it off if you want.
It isn't directing air into a radiator.
It isn't acting as an air dam (keeping airflow from under the car to keep it from lifting at speed).
It is most likely a valance/splash guard/splash shield. Yank it off or hold it up with a zip tie.
They were usually not held on with bolts but a plastic trim fastener that looked somewhat like a bolt. These were used when a thin plastic part was fastened to sheet metal, or another plastic part. Punch another hole for your zip tie to make a loop and reattach.


What is the thrust of Momentus' thrusters?

Question: I understand that they have an interesting method of using microwaves to produce plasma from water.  They claim to have a "high" thrust and "high" specific impulse.  Their Isp numbers are published, but apparently not thrust.  Has there been anything published on that end?  More about the company here: homepage, but it doesn't look like much in the way of technical specs
Comment: I also haven't seen many on their homepage, but the "high thrust and high isp" claim needs some evidence. All engines which have flown are either high thrust or high isp. I believe VASIMR can achieve both, but they can't generate enough power without onboard nuclear power... What can be claimed without evidence, can be dismissed without evidence.
Comment: Yes, sorry.  Question has been edited
Comment: Please could you put the published Isp number into your question? I can't see any sign of it on their web page.  The limits to what can be achieved for Isp and Thrust at the same time are fundamentally connected to how much power is available. If you can set out in your question the Isp and also the max electrical power available in any of their platform options (assume all power available to the client for the mission phase is used by the propulsion system in the deployment phase) then I could provide an answer to the max thrust in principle.
Comment: @ChrisR it's not a particularly extraordinary claim, it's just a trade of energy efficiency vs. propellant efficiency. For a given flow of mass, thrust is proportional to the exhaust velocity, power to the square of the exhaust velocity. Since it's just an electrothermal thruster, they can in principle increase thrust at the cost of specific impulse by just pumping more water through the thruster.
Comment: @ChristopherJamesHuff if I read you correctly, we're on the same page: one can increase thrust by decreasing isp, and vice-versa.
Answer: Probably, partial answer. Momentus has been published (slide #58) value of the thrust for its Vigoride Extended vehicle of 0.8 N (800 millinewtons) with 650 seconds Isp and total impulse capability of 2.000.000 N-s (for maximum "wet" mass of 700 kg).
Picture from the above mentioned source:

Aslo the thrust values can be obtained from the relation between the deltaV and the total mass for known Isp and total mass (slide #53, the same source):
Answer: Just to add to Peter Nazarenko's good answer on the thrust as the power requirement was also discussed in comments:
The electrical power required to feed the beam power of the thruster is P= T V/(eta 2)   where eta is a combined efficiency factor comprising thermal losses from the thruster (20% - 50%) and electrical losses (maybe 5% - 10%).
Thus the absolute minimum, artificially setting eta to 1, Isp = 650s and Thrust = 0.8 thus electrical power = beam power = 650 * 9.81 * 0.8/2 = 2,550W.


CentOS 6.5 not bringing up network interface automatically after reboot [ifup eth0]

Question: I am having this issue with many of my CentOS servers where after a reboot the network interface fails to come up automatically. This is a big problem for me since I need to drive to the datacenter every time when this happens as a result from a remote reboot. Then on the console eth0 is down and I have to ifup this manually. Is there a specific config file I can check to prevent this from happening in the future?
Comment: One thing to look at is to make sure the designation of NIC device is consistent across reboots. There's like about 3 places you need to look at for this. I don't remember offhand what they are - I've got them written down at my other job, so later I'll take a look and post here. The reason I say this is because I've had this happen before a number of times, and it turned out that the OS was relabeling "eth1" as "eth0" and vice-versa during reboot.  ... Annoying! But there's a way to force it to be consistent.
Answer: Ensure that the file /etc/sysconfig/network-scripts/ifcfg-eth0 has the line
ONBOOT="yes"
See 9.2. Interface Configuration Files for details.
Comment: Also worked on CentOS 7.2.
Answer: Make sure ONBOOT="yes" is set in /etc/sysconfig/network-scripts/ifcfg-eth0 also check that
NetworkManager or network  (whichever you use) is started on boot.
chkconfig NetworkManager on  or chkconfig network on
Answer: Configuration file must have right privileges also:
sudo chmod 0755 /etc/sysconfig/network-scripts/ifcfg-*

At /etc/sysconfig/network can have those lines:
NETWORKING=yes
HOSTNAME=myhostname.mydomain
NETWORKING_IPV6=yes

Comment: I needed chmod 0755 if* it was absolutely critical I was getting ifdown /ifup,ifpost 'permission denied' this solution here was the only one  I was able to Google. I'd inadvertently backed-up  and restored the config files without a cp -p (preserve)


Invocable Apex to compare 2 collections and get unique elements

Question: We have a flow that loops through 2 objects (User & Email message) and stores its email addresses in 2 collections (Co11 and col2). I want to compare 2 collections and get unique elements before i send out an email to unique email addresses. I tried to loop through and use a decision outcome to see if the col1 contains in col2 however there seems to be a limitation on CONTAINS function. I looked up This question
but doesn't seem to find any solution. Is there any way we can compare 2 collections from flow and get unique elements without writing APEX? If not, how do i compare 2 input collections in apex and pass it  back to flow from apex?
Thank you!
Answer: As per the documentation, CONTAINS only compares strings so cannot be used to compare collections.
Take a look at (and perhaps vote for) this idea and note the references to unofficialsf.com where you will find pre-build List actions for Flows that you can incorporate into your solution instead of writing the code yourself.


Cant fetch production db results using Google app engine remote_api

Question: Hey, I'm trying to work out with /remote_api with a django-patch app engine app i got running.
i want to select a few rows from my online production app locally.
i cant seem to manage to do so, everything authenticates fine, it doesnt breaks on imports, but when i try to fetch something it just doesnt print anything.
Placed the test python inside my local app dir.
<code>#!/usr/bin/env python
#
import os
import sys

# Hardwire in appengine modules to PYTHONPATH
# or use wrapper to do it more elegantly
appengine_dirs = ['myworkingpath']
sys.path.extend(appengine_dirs)
# Add your models to path
my_root_dir = os.path.abspath(os.path.dirname(__file__))
sys.path.insert(0, my_root_dir)

from google.appengine.ext import db
from google.appengine.ext.remote_api import remote_api_stub
import getpass

APP_NAME = 'Myappname'
os.environ['AUTH_DOMAIN'] = 'gmail.com'
os.environ['USER_EMAIL'] = 'firstname.lastname@example.com'

def auth_func():
 return (raw_input('Username:'), getpass.getpass('Password:'))

# Use local dev server by passing in as parameter:
# servername='localhost:8080'
# Otherwise, remote_api assumes you are targeting APP_NAME.appspot.com
remote_api_stub.ConfigureRemoteDatastore(APP_NAME,
 '/remote_api', auth_func)

# Do stuff like your code was running on App Engine
from channel.models import Channel, Channel2Operator

myresults = mymodel.all().fetch(10)
for result in myresults:

 print result.key()
</code>
it doesn't give any error or print anything. so does the remote_api console example google got. when i print the myresults i get [].
Answer: App Engine patch monkeypatches the ext.db module, mutilating the kind names. You need to make sure you import App Engine patch from your script, to give it the opportunity to mangle things as per usual, or you won't see any data returned.


can an interior motion sensor be installed to an existing flourescent light fixture?

Question: our pantry has a rocker switch to turn on/off the flourescent light, but my husband forgets to turn it off manually. I'd like to know if we can install a motion sensor in place of the rocker switch and how is that done?
Answer: So you're looking for something like this?

It's an "Occupancy Sensor Wall Switch", which combines the functionality of an on/off pushbutton with a PIR motion sensor.
You would simply remove your existing switch and replace it with something like one of these.
When it senses movement it turns the lights on, and then after a pre-determined period of no activity it automatically turns them back off again.
You can also use the pushbutton to manually toggle the lights.


Can "contemporary" be used for objects

Question: I don't want to use the word competitors in a business context, can I use the word  "contemporaries".
For example,

Our business stands out from its contemporaries.
Comment: Not an answer, but I think it looks weird. Maybe try 'peers'. "In the context of financial markets, a peer group refers to companies that are competitors in the same industry sector and are of similar size." https://www.investopedia.com/terms/p/peer-group.asp "a group of companies that offer similar products or services" https://dictionary.cambridge.org/dictionary/english/peer-group
Comment: Thank you so much!!!
Answer: The sentence

Our business stands out from our contemporaries.

forces business and contemporaries to be compared as though they were the same class of object, when what you really wish to compare is your business and the business of your contemporaries. Therefore, to be clear and precise in modern English you should compare those things, as follows:

Our business stand out from the business of our contemporaries.

Or, in case you are using business as a count noun to denote that each is a business that does not partake of a common set of features, try

Our business stands out from the businesses of our contemporaries.

You can avoid repetition, if you wish, this way:

Our business stands out from that of our contemporaries

or

Our business stands out from those of our contemporaries.
Comment: Why interpret it as "businesses of our contemporaries" rather than "contemporary businesses", which is what I think is meant?
Comment: Because his emphasis is on "competitors" in the example he gives.
Answer: While contemporary is usually used for people (specifically as "his/her/their contemporaries"), it can also be applied to objects. To list a few examples found through the Corpus of Contemporary American English:

Motobecane was a leading brand. After fading away (along with most of its Euro contemporaries), the brand is now making a comeback. (Bicycling, 2002 (Apr), vol. 43, issue 4, pg. 27.)
In fact, the handset drops the removable battery altogether, in order to make the device waterproof like many of its contemporaries ("More info leaks out ahead of LG's G6 launch," TechCrunch, 2017 (17-01-26).)
She has compassion for and insight into the teenage experience and she treats it with an understanding that lifts the film above its contemporaries. (Review: 'Edge of Seventeen' enters rare teenage air." Detroit News, 2016 (16-11-17).)

Each of these examples shows that "its contemporaries" describes objects like the prior specified thing: the examples above involve Motobecane and contemporary brands, the device and contemporary devices, and the film and contemporary films. If you wanted to do this as well by focusing on contemporary businesses, you could write:

Our business stands out from its contemporaries.

Its is necessary to specify the object (the business). Alternatively, your current phrasing ("our contemporaries") specifies the contemporaries in relation to us, and could include your coworkers and colleagues. It's comprehensible but awkward.  If you truly meant to specify the people in those businesses as your "competitors" or "contemporaries," then any of the rephrasings given by Robusto would accomplish that, e.g.:

Our business stands out from the businesses of our contemporaries.

Can "contemporary" be used for objects


Ruby on Rails: Model.all.each vs find_by_sql("SELECT * FROM model").each?

Question: I'm fairly new to RoR. In my controller, I'm iterating over every tuple in the database. For every table, for every column I used to call
SomeOtherModel.find_by_sql("SELECT column FROM model").each {|x| #etc }
which worked fine enough. When I later changed this to
Model.all(:select => "column").each {|x| #etc }
the loop starts out at roughly the same speed but quickly slows down to something like 100 times slower than the the find_by_sql command. These calls should be identical so I really don't know what's happening.
I know these calls are not the most efficient but this is just an intermediate step and I will optimize it more once this works correctly.
So to clarify: Why in the world does calling Model.all.each run so much slower than using find_by_sql.each?
Thanks!
Answer: Both calls do make the same SQL call, so they both should be roughly the same speed.  Model.all does go through an extra level of indirection.  I think that Rails in all collects all the rows from the DB connection, then calls that collection as a param to another method that loops over that collection and creates the model objects.  In find_by_sql it does it all in 1 method.  Maybe that is a little faster.  How large is your data set?  If the set is over 100 or so records you shouldn't use all, but use find_in_batches.  It uses limits and offsets to run your code in batches and not load the entire table at once into memory.  You do need to include the primary key in the select since it uses that to do the order and limit.  Example:
Model.find_in_batches(:batch_size => 100) do |group|
  group.each {|item| item.do_something_interesting }
end

Comment: `all` is an alias for `find(:all)` which eventually calls `find_by_sql` which is precisely the reason why I don't understand the slowdown. Like I said, I know this is not the most efficient call but if this doesn't work then more efficient calls won't work either. I cannot call `find_in_batches` (or more appropriately, `find_each`) because of the structure of my database but that is beside the point. Thanks for answering, though.
Answer: ScottD is correct. The find_by_sql call does not create the slowdown you are seeing B_. The speed issues are due to the fact that Model.all loads a model instance into memory for every single record fetched. This can result in complete failure with a large enough result set. FYI, this is covered very well in the Rails Guides here: http://guides.rubyonrails.org/active_record_querying.html#retrieving-multiple-objects


How can I make the camera taller in the Blender Game engine?

Question: I was making a first person game in Blender and I wanted my character to be taller, at the moment the character is just a camera set to character physics. I cannot scale each individual factor [x, y, z] on their own and making it bigger on all factors makes it impossible to control, is there anyway to fix this and make my camera taller?
Answer: By making your camera taller do you mean to change the resolution? Your character and your camera should never be the same object. Make a cube (this will be your character), and parent the camera to it. The camera should be set to no collision and the box to dynamic. You can change the shape of the cube if you want the character to be taller. Or if you just want the camera to be higher up you could just move it up in the Z-axis.
If you are meaning resolution then you can simply adjust it in the Output tab under dimensions.
Answer: Size and Focal Length
Do you mean the size and focal length?

If yes just make the focal length smaller number and\or make the size bigger number.
What is do? Is make the fov of view camera big.
Resolution
Do you mean make the camera tall by the height or width and it is not changing by the x,y,z axis scale?
It is easy, you want to change the Embedded Player Resolution:

Now change that x\y and you will be see the camera is taller!
Example:
Now I have the Resolution like this:

I will see this:

It was like this:

so now try what you need and see.
Comment: try what you need and see!


My dryer drum quit working

Question: My dryer drum quit working but when we turn it on it heats up. I had a guy come out and look at and told me the heating element was bad and it was blowing fuses. He then gave me a quote for $230 is that the going rate?? I was wondering cause parts alone are less than $100
Comment: I would want to know how a bad heating element would still heat up, but somehow cause the drum to not spin.  Sounds more like a broken belt or a bad motor or electrical connection.  Also, the cost of parts has little to do with the cost of replacing them.   A timing belt on a car can cost $20, but it can also be one of the most expensive maintenance jobs you can do...
Comment: Do you mean to say that the drum doesn't rotate when the dryer is ON but that the heating element does get hot?  In that case it's either the motor or more likely the drive belt has slipped off or has broken.  But it does not sound like a bad heating element.  What's the story on blowing fuses?  Were you seeing that or was your service tech telling you that?
Comment: Do you hear the motor spinning up? Or is it spooky silent?
Answer: It sounds more like the belt on the drum broke.
Most dryers are belt driven , it is possible if you turned it on enough times the NiChrome heating element over heated and broke.
There is normally a thermal fuse that blows to protect the element.
Prices are off topic as they quickly become obsolete, I have replaced belts, elements and the thermal fuses for under 100.
Find a local repair shop call them give them the model number and ask for the prices on these 3 parts. They are easy to replace. I am sure there are u-tube videos showing how to swap out the parts. I have kept driers working for decades with these parts and some rollers for the drum when they wore out.
You may not need all of them but this will give you an idea.
Answer: There's a fair chance you lost a neutral wire
That would shut down all the 120V parts of the circuit, e.g. timer and drum motor.  However the heating elements would still operate.
If your dryer plug is 4-pin, that's the end of the story.  However, if your dryer has a 3-pin plug, this is actually a very dangerous situation.  Loss of neutral electrifies the chassis of the dryer.  The motor is trying to return 120V through the neutral, which is bonded to the dryer chassis, and with the neutral broken it will try to return it through any human who touches the dryer and also something grounded.   This is a very bad "design" and you should get rid of 3-prong dryer connections as soon as able.
Turn the dryer off, unplug, then confirm 120V between hot1 and neutral, and hot2 and neutral.  If that's not the case, carefully look over cord, plug, receptacle and breaker-box neutral bar connection.
Comment: And a lost neutral that causes the drum and fan not to spin would probably indeed cause the (still working) heating element to blow some thermal fuses, since it wouldn't be able to get rid of its heat.

My dryer drum quit working


Notation for joins/meets in lattice theory

Question: Most often I see $\lor$ and $\land$ used for the join and meet operations respectively in a lattice, however what I am writing makes concurrent use of both symbolic logic and a particular lattice, thus I am already using these operations to express logical conjunction/disjunction and am unsure what to use for the joins/meets. For example I don't want to use $\cup$ and $\cap$ since I think this might cause confusion with sets or enable some unconscious error where I treat them like their set counter parts i.e. I might accidentally distribute them over each other despite not dealing with a distributive lattice, likewise for similar reasons I'd rather not use $\sqcup$ and $\sqcap$ as I often use the latter for 'disjoint' unions. So with all of that in mind what are some standard alternatives to these that I could use for joins/meets in a lattice?
Comment: In the Boolean algebra setting, it is also common to use additive and multiplicative notation for join and meet, respectively. I don't remember now a reference, but I think that in ancient Lattice Theory papers this was also common, for some authors. Perhaps the reason was just that those symbols were more easily accessed. Personally, I think it looks weird, specially when dealing with equalities in which both operations appear; for example, one distributivity law would be $$x(y+z)=xy+xz,$$ which looks OK, but the other equivalent one, $$x+yz=(x+y)(x+z),$$ not really.
Comment: As @amrsa suggests, old lattice theorists used + for join and * or $\cdot$ for meet.  I recommend using those since they were standard well before $\vee$ and $\wedge$ came into fashion.
Comment: $\Cup$ and $\Cap$ maybe? I doubt there's a great choice if you need to avoid all three types of symbols you mentioned.
Comment: i just need somthing meet/join symbols other then $\lor,\land,\cup,\cap,\sqcup$
Answer: Supremum and infimum, or greatest lower bound and least upper bound.
$$a\vee b=\sup(a,b)=\text{lub}(a,b)$$
$$a\wedge b=\inf(a,b)=\text{glb}(a,b)$$


What states is Kraken doing business in

Question: Is there a list of states that the kraken exchange is currently doing business in?
Answer: Kraken also known as Payward Ventures Inc is currently registered as a Money Service Business in every single state in the US.
As far as I can tell however they will still not do business for the 2nd 3rd or 4th tier verifications in any state. I have no idea why this is.

What states is Kraken doing business in


Get yourself decent containers

Question: I was watching a cooking show and the guy in the show said "get yourself decent containers" Why not just to say get decent containers?
What does yourself mean with a verb get?
Answer: This phrase, to get oneself (a thing), is usually used as part of a set of instructions, particularly in a very informal environment.  When I've heard and used it, it is most often part of the following, which includes two parts that are not immediately obvious to a nonnative speaker, the verb want used in an imperative sense, and the phrase that you asked about.

You'll want to get yourself X.

This means

You should get X for yourself.

The implication is that you do not current have decent containers for (whatever the host was cooking) and that purchasing them is a worthwhile investment that will make the job easier and/or more successful.  The speaker is usually an expert, or at least considers him or herself to be an expert, and is speaking to a novice.
There is a completely separate usage that is similar, but instead of to get oneself (a thing) it is to get oneself to (a place).  In this case, it is an imperative sentence telling you to go somewhere.  It would only be used in informal conversation as well, as in the following:

John, your alarm didn't go off.  You need to get yourself to school in a hurry.
Answer: Yourself is a reflexive pronoun and is used for emphasis in your example.

You will want to get some good containers.
  You will need some good containers.
  Some good containers will be necessary.

All have the same meaning and can be used in both written and spoken conversation

You'll want to get yourself some good containers

Was used to emphasize attention by the TV host since he was talking to you.
Comment: Though they can be used in written and spoken conversation, as you say, it's a somewhat informal construct. I don't think we'd find this very often in, say, a textbook.

Get yourself decent containers


Pure-FTPd Configuration on Ubuntu 12.04

Question: I have a fresh installation of pure-ftpd on Ubuntu Server 12.04, and for the life of me I can't find any kind of central config file. All I need to do is set a passive port range. At this point I would settle with knowing its default passive port range (assuming it has one) so I can go change the firewall to match it. Any ideas?
Answer: Try this:
echo "10000 11000" > /etc/pure-ftpd/conf/PassivePortRange

I found this by reading the manpage for pure-ftpd-wrapper:

   pure-ftpd-wrapper reads the configuration for the Pure-FTPd daemon
   from files in the directory /etc/pure-ftpd/conf. Each file in this
   directory is related to a command line option.
   ...
   Two numbers
       "AnonymousRatio", "LimitRecursion", "PassivePortRange",

I was directed to that manpage by /usr/share/doc/pure-ftpd/README.Debian (which I found from looking through dpkg -L pure-ftpd|grep -i doc:

pure-ftpd for Debian
Please note that these packages use a complete new configuration
  scheme, read the pure-ftpd-wrapper manual page for more information.
Comment: Thanks! Especially for the documentation finding tip. Too often I know there must be documentation for a problem but I'm clueless as how to find it.Would it hurt to have a note at the top of the pure-ftpd manpage about the new configuration scheme? Or at least a reference to pure-ftpd-wrapper in the SEE ALSO section??
Comment: Yeah, from my brief tour I assumed it was a change from the Debian packagers who may not necessarily be the same as the `pure-ftpd` authors.  If this is the case, it may explain why this seems a little "bolted-on."
Answer: Try the next variant:
echo "40000 50000" > /etc/pure-ftpd/conf/PassivePortRange
/etc/init.d/pure-ftpd restart

Where 40000 is the minimal passive port and 50000 is the maximal passive port for ftp.

Pure-FTPd Configuration on Ubuntu 12.04


"it was intended decision" vs. "it was an intended decision"

Question:
"it was intended decision" vs. "it was an intended decision"

Do they both are grammatically correct?
If so, is there a difference in meaning?

Thank you in advance!
Comment: Hello, if the "decision" is known/made (which I think it is) then it is something specific. In that case, you need the definite article "the".
Answer: There are certain situations where we do not use articles. Among them are, before plural countable nouns, before uncountable or abstract nouns, before proper nouns, etc.. A full list can be fount on Englishgrammar.org.
"Intended decision" does not come under any of those. Therefore, grammatically speaking, the use of an article would be considered correct.
The question remains, which one to use.
You cannot use "the" if the decision is known/made as it would make the sentence about something specific. (As advised by AIQ in the comment). Or you may choose to use "an" if the sentence isn't about any specific decision.


Level of String Fields

Question: I know that the Tachyon state $c_1|0;k\rangle$, where $|0;k\rangle = e^{ikX}|0\rangle$, has eigenvalue $-1$ under $L_0$ operator. Using $L_0 = \alpha'p^2 + \sum_{n\ge1}\alpha_{-n}\cdot \alpha_n$ it is easy to see. Then if I define tachyon states as the zero level of the string states, the other $L_0$ eigenvector states have its levels given by its eigenvalue plus one, that is, the eigenvalue of the operator $L_0+1$. But I dont understand for example why $c_{-1}|0\rangle$ or $b_{-2}c_1|0\rangle$ has level 2, or why $c_{0}|0\rangle$ has leval one. To me it would have level $-1$ since $L_0$ should comute with ghost modes. It is a simple question but I don't know how to answer.
Answer: Your expression of $L_0$ includes only the matter operator, you are missing the ghost part:
$$
L_0^{gh} = \sum_{n \in \mathbb Z} n \, b_{-n} c_n
$$
This is why you had the impression that $L_0$ commutes with the ghosts, but it's not the case.
Moreover, the state $c_1 |0; k\rangle$ has not eigenvalue $-1$ but:
$$
L_0 c_1 |0; k\rangle = (\alpha' k^2 - 1) c_1 |0; k\rangle
$$
You have forgotten that $\mathrm{e}^{i k \cdot X}$ has eigenvalue $k$ for the momentum operator.
This is compatible with the fact that the on-shell condition $L_0 = 0$ should give the mass-shell condition for the tachyon: $k^2 = - m^2$, with $m^2 = - 1 / \alpha'$.
Moreover, the level operator $\widehat L_0$ is defined as $L_0$ without the zero-mode matter operator (which is the momentum operator)
$$
L_0 := \alpha' k^2 + \widehat L_0
$$
and can be written as (for $d = 26$ dimensions, flat Minkowski background)
$$
\widehat L_0 = N_X + N_b + N_c \in \mathbb N
$$
where $N_X, N_b, N_c$ are the matter, $b$-ghost and $c$-ghost level operators:
$$
N_X = \sum_{n > 0} n N_{X,n},
\qquad
N_b = \sum_{n > 0} n N_{b,n},
\qquad
N_c = \sum_{n > 0} n N_{c,n}
$$
and $N_{X,n}, N_{b,n}, N_{c,n}$ are the matter, $b$-ghost and $c$-ghost number operators:
$$
N_{X,n} = \frac{1}{n} \, \alpha_{-n} \cdot \alpha{-n},
\qquad
N_{b,n} = b_{-n} c_n,
\qquad
N_{c,n} = c_{-n} b_n.
$$
This is equivalent to the expression you wrote for the matter, plus the one I wrote for the ghosts, but written in a nice form.
Indeed, you can see directly that each number operator counts the number of excitations in a given mode, and then the contribution to the level operator is weighted by the frequency of the mode.
If you want more details, I can recommend having a look at the draft of my book, chapters 7 and 8 where I gave a lot of details on expressions for the CFTs.
Answer: Ok, I think I can use Equation (2.6.24) on Polchinski to write: $$ [L_0,c_n] = -nc_n \ ,\ \ \ \ \ \ \ [L_0,b_n] = -nb_n $$. Since the ghosts are holomorphic tensor fields. Then, I was wrong, the $L_0$ does commutes with the ghost modes. Now, I have $$L_0c_n|k\rangle = c_nL_0|k\rangle -nc_nL_0c_1|k\rangle = -nc_n|k\rangle $$ and $$L_0b_n|k\rangle = b_nL_0|k\rangle -nb_nL_0c_1|k\rangle = -nb_n|k\rangle $$ Now it is clear that $c_n|k\rangle$ is on level $1-n$. Samething about $b_n|k\rangle$. The levels of $b_nc_m|k\rangle$ also follows:
$$ L_0b_nc_m|k\rangle = b_nL_0c_m|k\rangle - n b_n c_m|k\rangle $$ $$ = -mb_nc_m|k\rangle - n b_n c_m|k\rangle = -(m+n)b_nc_m|k\rangle
$$
Therefore, $b_nc_m|k\rangle$ has level $1-n-m$.

Level of String Fields


Lightweight alternative to elastic search

Question: I only have 8 MB of data and 55000 items which I want to use for fuzzy autocompletion. The user base is very small and it is a research project so I don't need 100% uptime and replication.
Even with debouncing, Fuse.js brings Firefox to a halt, even on an Intel i7-9700.
So I want to add a backend search engine that can easily be set up as a docker container.
The industry standard seems to be ElasticSearch but our single server only has 1 GB of RAM left over and it seems like total overkill. Should I still use ElasticSearch or is there something available on DockerHub that is easy to setup, scales better than Fuse.js and  is not as heavy weight as ElasticSearch?
The data is already on a Virtuoso SPARQL endpoint, which has a "bif:contains" index however that doesn't seem to support text that includes spaces and fuzzy search. A client side library may be an option too if it is fast enough for real time fuzzy search and does not block the main thread.
Comment: "[...] our single server only has 1 GB of RAM left over..." . That is your problem.
Comment: Maybe [Qt](https://qt.io/)
Comment: @BasileStarynkevitch: I followed your link but that seems to be a user interface framework, not a backend search engine. Did you mean something else?
Comment: @KonradHöffner: I actually don't understand your question, and what you call "fuzzy autocompletion". Feel free to contact me by email to `email@example.com` (near Paris in France). I also don't understand what you mean by "real time"? Do you need to "autocomplete" in µs or in deciseconds?
Comment: @FrancescoMantovani: More resources would certainly help but unfortunately those are the conditions under which we we operate at the moment.
Comment: @KonradHöffner: IIn many countries (including Germany), buying a few GB of RAM (or renting a more powerful Linux VPS) is cheaper than paying a software developer for a few days.... Feel free to discuss that by email
Answer: If you are a software developer and can afford developing software on Linux for several weeks (or at least days), you might consider the following approach:
Use some open source HTTP server library or framework.
In C, that would be libonion. In C++, try Wt. In Ocaml, try Ocsigen. And all are developed in Europe, so you could contact their developers (or pay support) easily.
8 megabytes of data is tiny. If you have a lot of simultaneous connections (C10K problem), you may want to store it in some database like PostGreSQL (or perhaps sqlite).
A simple backup search engine can easily be coded, using ordinary memoization techniques. Reading books like the garbage collection handbook could be helpful. You could code something which "removes" or "forgets" old queries (e.g. after a few seconds).
If you want a research prototype for a dozen of simultaneous connections, I guess that a RaspberryPi hardware is enough.
Feel free to contact me by email to firstname.lastname@example.com (near Paris in France)
As I commented, in many cases, buying more RAM is cost effective.


Can we use "there is" a main clause? and independent clause starts with a word "then"?

Question: 1."This is because they have already gone thier home". In this sentence "because they have already gone thier home" is an dependent clause of independent clause "there is". Here my doubt is "there is" main clause?
2."We went to the movie and then we went to restaurant near the theatre". In this sentence "then we went to restaurant near the theatre" is a independent clause. Here my doubt is, can we start independent clause with "then"?
Answer:
This is for a good reason.
  This is because they have already gone home.

The first line represents a sentence with a single independent clause.   We can divide the clause into a subject and a predicate.   We can divide the predicate into a verb and a complement.
The second line represents a complex sentence, with both an independent clause and a dependent clause.   The independent clause has the same three parts as the clause in the first line: the subject "this", the verb "is", and the complement "because they have already gone home".   This exactly matches the earlier subject "this", verb "is" and complement "for a good reason".
"For a good reason" isn't a clause.   It's just a prepositional phrase.   It should be easy to see that it is a part of the independent clause on the first line.   The same thing is true about the entire dependent clause on the second line -- the dependent clause is a part of the independent clause.   One clause exists completely inside another clause:

{ This is ( for a good reason ) }.
  { This is ( because { they have already gone home } ) }.

Do the words "this is" on the second line just above represent a complete independent clause?   No, or at least they don't represent the same clause.   All of the words on the second line are parts of the independent clause.   "This" and "is" are the two words that belong only to the independent clause.   The rest of the words belong to both the independent and the dependent clauses.
A dependent clause isn't simply attached outside an independent clause.*   It plays a role inside.   If you take a dependent clause away from its matrix clause,** then what you're left with is either an incomplete clause or simply a different clause with a different meaning.

We've had a long evening.   First we went to a movie.   Then we went to a restaurant near the theater.   After that we came here.   Now we're ready to go home.

It's no stranger to start an independent clause -- or even a complete sentence -- with "then" than it is to start one with "first" or "now".   Like "first", "then" can indicate a position in sequence.   Like "now", "then" can indicate a position in time.
However, don't confuse "then" with "than".   The word "than" will not appear at the start of an independent clause.   Just like "because", it is a subordinating conjunction.***   It has the power to turn an independent clause into a dependent clause.
The two words may look similar, but they behave very differently.
_______________
* For what it's worth, some dependent clauses are simply attached on the outside.   One example is the "for what it's worth" in the prior sentence.   However, it's simpler to call these clauses supplemental rather than dependent,  since they add meaning without depending on having a role inside some other clause.
** "Matrix clause" simply means a clause that contains another clause.   There is no maximum depth: an independent clause can contain a dependent clause that itself contains yet another dependent clause.   In that case, the one dependent clause is the matrix of the other dependent, even though the matrix is not independent.
*** It might make more sense to call it a subordinating preposition, but I'm trying to stick to the terms that traditional grammar has handed me.   "Than" also functions as an ordinary preposition, as in "I like this better than that."
Comment: Your answer really cofuses me. 1."This is because they have already gone home". In this sentence "because they have already gone home". Genarally, a subordinate clause normally follows the main clause. Here is my question. Is "this is" a main clause?
Comment: We went to the movie and then we went to restaurant near the theatre.
                                                                                "Then,now, and after"  all here are adverbs. All adverbs that can tell us when we can be placed at the beginning of the sentence to emphasize the time element. Am I right?
Comment: That a subordinate clause normally follows a main clause is a mistake.  A subordinate clause is normally *inside* a main clause.  Look at that first sentence.  Take away "that a subordinate clause normally follows a main clause" and you're left with "is a mistake".  That's not the main clause.  That's not the same clause.  That's not any kind of clause.  That's just a predicate without a subject.  The main clause is the whole sentence.  The subordinate clause is just the subject of the main.
Comment: Again you are cofusing me. Just tell me 1."This is because they have already gone home". In this sentence "because they have already gone home". Genarally, a subordinate clause normally follows the main clause. Here is my question. Is "this is" a main clause?


Is there a difference in "feel" of a dedicated Manual focus lens (MF Only) vs an AF lens set to Manual Focus mode?

Question: I really love shooting in Manual mode, but my AF Micro-NIKKOR 60mm f/2.8D Lens, when in Manual mode, doesn't have a 'buttery' feel and it can be difficult to get it to focus precisely. I have a dirt cheap Nikon Series E 50mm f/1.8 AIS which is MF only, and the focusing is unbelievable, truly 'buttery' smooth. Is this difference the standard? Are AF lenses in Manual mode generally a bit 'stiffer'/'clunkier' than dedicated MF lenses? I have purchased brand new AF lenses that have this same 'clunky' feel so it's not an age thing. I have double checked that the lens/camera settings are correct for MF. Would love any feedback!
Comment: Most older manual focus lenses get smoother the more they are used. Your 50mm f/1.8 AI-S may have been stiffer when new than it is now. But MF only lenses also usually have longer throws and certainly have no resistance from an AF motor or AF linkage mechanisms.
Answer: Well yes, you've noticed this for yourself and answered your own question.
But the question as to whether AF lenses are "stiffer/clunkier" is quite a bit more variable because different AF lenses use different AF drive mechanisms. For instance, your 60mm AF-D uses screw drive with the AF motor being in the camera body; whereas some lenses use micro drive, pulse (stepper) drive, or various versions of ultrasonic motors located in the lens. Each is likely to have something of a different feel.
Another significant factor is AF "throw"... in order to make AF faster the focus throw is smaller. I.e. the distance the focus ring has to move is much shorter between 2m and infinity on the 60mm AF than it is on the manual focus 50mm. This means the AF gearing is necessarily coarser for a given focal length lens/focus range.


Site Magento 1.7.2 is down for Malware reason

Question: I cannot access the site in Chrome and Mozilla. In internet Explore it is OK. It shows me "Security error->The site ahead contains malware". When I try to open it. The site is melvinflex.com. Is there any way how to solve this by not upgrade it to any other version because I have some bad experience with magento in version upgrades.Thank you.
Comment: Could you please check all the files , any code written in it like , "eval(" or any malicious code. Remove all the codes . Give the proper permission to the site files and folders.
Comment: @Lorenc  Take Backup of your website (Files and DB) . Download Magento 1.7.2 and replace the files using FILEZILLA or in the Hosting Panel. Then try to Debug the downloaded code where it effected.
Comment: I removed some js scripts  in backend and there are a lot of files effected.
Answer: Scan your site on magereport.com to identify any missing security patches and to determine if it has been infected with known malware strains.
You can install all missing patches and test store functionality in a non-production environment.
Remove any suspicious script added via backend.
However I recommend you to upgrade magento to its latest version which will include all the patches implemented.
Comment: I just removed some js scripts in backend and there are some patches that miss .


Security considerations when naming S3 Buckets

Question: What security considerations should be taken into account when naming an S3 bucket?
Answer: If you embed a bucket name into an application (of any sort), and subsequently you delete that bucket, then someone else might create a bucket with the same name and now effectively have a way to influence your application.  Because of this, it's better to deliver bucket names to applications as configuration rather than embedding the name in code.
Answer: For S3 buckets, anyone can query a bucket name (without specifying an account owner) and see if the bucket is misconfigured to allow public access.
Therefore, I would argue that it makes sense to have a more complicated bucket name that includes random numbers or letters in order to add a level of security through obscurity, such as:
converting-user-metrics-3k5jb3.
S3 settings can be complicated and privacy settings can get overriden by some script somewhere that turns the bucket public.
Going to the extreme and using just a mix of letters and numbers as a bucket name, such as:
njkfv983v4yn894tvy4v439xnjf
can quickly become impractical when one has many buckets for different uses and will necessitate looking into a bucket to see what it contains.
However, AWS doesn't seem to think this additional level of obfuscation is necessary. From their documentation:

The following example bucket names are valid and follow the recommended naming guidelines:
awsexamplebucket1
log-delivery-march-2020
my-hosted-content

Remember that depending on the use case of your bucket, an attacker could gleam the name of your bucket anyway, which is why it's so important to ensure that the correct settings are configured for your bucket.
Answer: There aren't many security considerations that need to go into naming your S3 bucket -- just make sure it's a useful name.
S3 Bucket names have to be what AWS refers to as "unique within a partition". For anyone that isn't AWS China or AWS GovCloud, that means it has to be globally unique (you can't have the same bucket name as any other S3 bucket in the world). Additional information can be found in the AWS Documentation Bucket Restrictions and Limitations. [1]
I've won't delve into too many details as it's not what you asked, but your security concerns begin right after finding an applicable name. You can read more about this in AWS Documentation Policies and Permissions in Amazon S3 [2], but should include considerations such as Bucket Policies, replication to other regions for DR purposes, and more.
[1] https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html
[2] https://docs.aws.amazon.com/AmazonS3/latest/dev/access-policy-language-overview.html


Is there a python cryptographic libraries like the MIRACL library?

Question: MIRACL (Multiprecision Integer and Rational Arithmetic C/C++ Library) is a famous library used most of the time for implementing number-theoretic based methods of cryptography. I don't know how to code in C and C++ so I was wondering are there other libraries like MIRACL but for python?
Answer: I'm not familiar with MIRACL and I don't know what features you're looking for, anyway, but Python has arbitrary-sized integers (int) and rational numbers (fractions.Fraction) built in.
Answer: For Python, you can use Charm: https://jhuisi.github.io/charm/install_source.html
In Charm, you will find a wide range of implemented schemes that can be easily used, please see this example for the RSA public key encryption https://jhuisi.github.io/charm/charm/schemes/pkenc/pkenc_rsa.html
This is a list of all the implemented cryptographic protocols: https://jhuisi.github.io/charm/schemes.html
Answer: I'm also not familiar with MIRACL but one very good Python Cryptographic library would be PyCryptoDome. You can find it's documentation here.
Hope this helps :)
Comment: How do we know it supports multiprecision?
Answer: MIRACL is a core cryptographic library implemented in python as follows.

Paper "MIRACL Cryptographic SDK: Multiprecision Integer and Rational
Arithmetic Cryptographic Library." [Online]. Available:
https://github. com/miracl/MIRACL (Accessed: Dec. 2021).
GitHub Codes------>https://github.com/miracl/core/tree/master/python


Coding guidelines for seamless merging

Question: I am looking for coding guidelines developers should follow while writing C#/ASPX/SQL code, so that merging into other branches is smooth if not seamless.
Answer: Provided you're team is working on the trunk rather than doing feature branches.  Martin Fowler will tell you they're bad in this article
Ensure that:

everyone uses the same set of standards, especially if they're set in the IDE so that it does the formatting for them.
the commits are done regularly so that merging happens often so the merges are small.
developers are following solid principles (classes and methods are small) so developers are not working on top of each other.
the team communicates so major renamings, moving of packages, etc can happen when everyone knows about it.

Then you shouldn't have too much pain in merging.
Answer: It's more a matter of proper SCM usage than coding style. However, a few coding style specific guidelines should be followed:

Avoid long lines, especially lines that do more than one thing (and are thus more likely to contain more than one edit)
Avoid overly long blocks (functions, classes, nested blocks, etc.)

And SCM-usage wise:

Pick a good SCM. The world's most popular one (Subversion) is, unfortunately, not a good one.
Branch liberally (this is why you need a good SCM: bad ones make branching and merging unnecessarily hard).
Commit often. If your commit touches more than one implementation step, you're doing it wrong.
Pull and catch-up-merge often. The later you integrate other people's changes into your own line of development, the more confused the SCM will be.
If you feel you have to reindent, reformat, or refactor, do it in a separate commit and mark it as such.
Never put anything under source control that can be derived from something else - this means no binaries, no generated code, no build intermediates, etc.
As far as SQL scripts go, opinions differ, but IMO, an SQL script, once committed and pushed, should never be touched again (unless it is buggy to the point that it doesn't execute at all). Also, set up a procedure that makes sure everyone runs the right scripts, and never runs them twice. Keeping a list of scripts already executed in the database, and a list of all scripts to be run in source control, is a simple yet effective way, especially because the to-be-run list can be branched and merged like any other source file.
Comment: "Never put anything under source control that can be derived from something else - this means no binaries, no generated code, no build intermediates, etc."   I disagree with this, on one product the build system CHECKED all such items were the same in the SCM as the output of the tool, this was great.   It let us diff generated SQL between versions, but still make it impossible for anyone to hand edit it.
Answer: Take the "If it ain't broke, don't fix it" mantra even further - if it is broke, fixing it will cost the time to fix and the time to fix the merge conflict.  Most of the time you will get lucky, and not have a merge conflict. The rest of the time, you will want to be really sure the pain was worth it.
i.e. If you don't like the formatting, learn to live with it. Don't make changes that are not material to the feature that you are working on.
Comment: Actually, a proper SCM can go a long way. Just because the world's most popular SCM is fundamentally broken doesn't mean everyone has to bend over backwards to work around it.
Comment: -Please do let us all in on your valuable secrets.  I assume you are referring to CVS or maybe Subversion as the broken one. Which one(s) can detect and avoid conflicts on format changes and are language agnostic, I really could use it?
Comment: Yes, CVS and by extension SVN ('CVS done right' - uh-huh) are the broken ones. Google a bit and you'll find plenty of testimony. Or better yet, just try out a real SCM. Mercurial is fantastically easy to learn and runs on practically everything you can imagine; there's an excellent tutorial on http://hginit.com/.
Answer:
so that merging into other branches is smooth if not seamless.

I don't think coding guidelines per se will be very helpful, but some best practices in using your chosen version control tools will help:

Avoid having two people modify the same section of code at the same time. That's not always easy or possible, especially on larger teams, but multiple simultaneous modifications of the same code is what creates merge conflicts.
In furtherance of the previous point, merge your work as soon as is practical. Don't wait a week to merge if you're done now -- you want to keep the window during which someone else might modify the same code that you worked on as short as you reasonably can.
Learn to use your tools effectively. Merge conflicts will happen, and merging will seem a lot more "seamless" if you know how to resolve them. It'll help if you create some toy projects and create conflicts on purpose. Do you know how to resolve a tree conflict? Can you roll back to a previous version? Can you merge changes between branches?
Coordinate. If two people do have to work on overlapping sections of code, have them coordinate with each other. If they know what they're doing, they can share changes with each other during their work so that there are no surprises at merge time.
Answer:
Always put the code for if, while, etc in "{}" with the brackets on
  their own line.

A bad merge is then much more likely to lead to code that will not compile.

Do not have lot of boiler place comments, for example.

<code>//-----
// Arther AXB
// Date method was added::
//-----
</code>
Often the merge will decide the 2 methods are the same due to the comments and merge the updates date, when you had added new method.

Always put a "," on the last item in an emun

Then when two people add a value the merge often works.

Coding guidelines for seamless merging


What are the differences of bringing RAW or JPEG into Photoshop?

Question: Most of my images are in RAW format.  When I bring an image into Photoshop, does it make a difference whether it's a JPEG or RAW?  I understand the difference between JPEGs and RAW images. I'm just wondering if it is better to bring in a JPEG or RAW into Photoshop, not Camera RAW?
Comment: Hi Ryan. Not to be snarky, but the fact that you're asking this question indicates that you might be unclear on the difference between JPEG and RAW at some level, since that difference (sort of by definition) has to be behind any answer comparing use of the two. So, I think it'd help if you could explain your understanding of those differences, and say _what's left_ to wonder about. Thanks!
Comment: I'd try to answer this question but I don't actually use Photoshop. Does it have a more-simple RAW converter that it can use _other_ than the Camera Raw plugin?
Comment: @mattdm - Nope. Adobe Camera Raw is how you bring them in.
Answer: The short answer to this question is: The raw option is better.
The slightly longer answer is: The raw image data gives you the chance, in ACR, to effectively "develop" the image based on your own desires and do that many times in a non-destructive manner with a lot more data available because it's the base data for the image. Drop into jpeg and you've already started with data being lost, partly a result of the 8 bit image format, but also because jpeg is lossy in compression. So, you've already dropped some color information and you've also discarded some pixels. Not to mention, your start point is what the camera maker decided was a "good" result.
So, seriously, there is no condition in which jpeg is superior to raw when you have the time ans space to deal with the image. The only time I would recommend jpeg is when you won't have the time to post-process, but in the last 4 or 5 years, for me, that has never happened... Your mileage may vary.
Comment: Thank you John for the great answer!!!  I just have one more question.  What is the difference when adjusting settings like exposure, in Camera RAW and in Photoshop?  I noticed that when I take the exposure all the way up in Camera RAW it looks way different when I pull the image into Photoshop first and then take the exposure all the way up.  Thanks for the help!  Im just learning photoshop and want to really understand the difference with Photoshop and Camera RAW.
Comment: @Ryan - ACR is about development of the raw data and so is about adjusting how to read the sensor data. Photoshop is dealing with a bitmap image, the data has already been interpreted and so adjustments are against that. Another factor is that you're probably bringing the image into Photoshop as an 8 bit image, so some info is being discarded. Look at the bottom of the ACR module to see how it will send it to
Comment: Continued.... Send it to PS. It's the default to be 8 bit.


Kivy draw on a widget

Question: I am new to Kivy and after I have done the tutorials my next step was to add the two tutorial's widgets in one application. The class CombWidget will be my Widget to which the Paint and PingPong widgets will bne added to. For an intermediate step a BoxLayout was added and

a few Buttons
MyPaintWidget

in the BoxLayout.
To restrict the drawing only to MyPaintWidget a if statement was added
def on_touch_move(self, touch):
    if self.collide_point(touch.x, touch.y):
        touch.ud['line'].points += [touch.x, touch.y]

The line are drawn only to a small spot just above the buttons. The dot are draw everywhere except on the Buttons. The Buttons also don't react to clicks any more.
The code:
from random import random
from kivy.app import App
from kivy.graphics import Color, Ellipse, Line
from kivy.uix.button import Button
from kivy.uix.widget import Widget

class CombWidget(Widget):
    pass
class MyPaintWidget(Widget):

def on_touch_down(self, touch):
    color = (random(), 1, 1)
    with self.canvas:
        Color(*color, mode='hsv')
        d = 30.
        Ellipse(pos=(touch.x - d / 2, touch.y - d / 2), size=(d, d))
        touch.ud['line'] = Line(points=(touch.x, touch.y))

def on_touch_move(self, touch):
    if self.collide_point(touch.x, touch.y):
        touch.ud['line'].points += [touch.x, touch.y]

class MyPaintApp(App):
    def build(self):
        return CombWidget()

if __name__ == '__main__':
    MyPaintApp().run()

and the layout file:
#:kivy 1.7.0

<CombWidget>:
    BoxLayout:
        orientation: 'vertical'
        padding: 20
        spacing: 50

        MyPaintWidget:
            size: 100000, 100000
            size_hint: 100000, 100000

        Button:
            text: "Hallo"
        Button:
            text: "Hallo 1"
        Button:
            text: "Hallo 2"

To increase the size of MyPaintWidget I used the size: and size_hint: parameters in the kv file but not success.
Can anybody help met to increase the size of MyPaintWidget so that that area behaves just like the MyPaintyApp the in tutorial. Also why does my buttons show when you click on them.
Regards
Answer: The solution was to modify the layout file
<CombWidget>:
BoxLayout:
    orientation: 'vertical'
    size: root.size

also by adding 'return True' to the methods on_touch_down and on_touch_move, everything worked.

Kivy draw on a widget


Is it haram to make an offensive joke even when who you are joking about knows it's a joke?

Question: Assalamualaikum, me and my friend were talking about something and some people said I am better at something than my friend and I said just as a joke to him that learn from me, I don't think I had intention of mocking him and he also knew it was a joke. Will this still be haram?
Answer: One can joke without putting anyone else down.
E.g. if you respond with something like "If I'm better at it, that's because he's a better teacher than I am.", it doesn't put anyone down (except possibly yourself).
The humour comes from the language itself, making people have to think about what you said so they can figure out why it makes sense, or doesn't.
Showing respect will earn you respect; showing disrespect will earn you disrespect.
Whether haram or not, wit is always better than a cheap shot.
Answer: First, I want to thank you for your keenness to learn about halal and haram.
A person who has knowledge always wants to increase it, and he continues to learn until he dies.
It is better to be considerate of other people's feelings.
Do this method with your friend in front of them. Try to highlight something your friend is good at.
These things over time will make your friend sad
Comment: Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).