Where can I find a list of states, districts and tehsil names in India?

Question: I need only names for making a chained dropdown list for users to select location correctly and submit the data.
Please provide any resources.
I emailed censusindia.gov.in but no reply from them.
Answer: Expanding on my Comment, You should download the Administrative Atlas from here: http://censusindia.gov.in/2011census/maps/maps2011.html
This has the data for all sub districts in India. It might not be an easy to extract format, but this is as official and exhaustive an list that you are going to get.
You should know that division of districts is not uniform across India. In some states they are called Tehesils, somewhere else they are called Taluks, in A.P. They are called Mandals, and so on.
Comment: Thanks for the information,but i can't use information available on that site in commercial website.Asked them for permission but no reply.Looking for free source.
Comment: If you want freely available data that is accurate, and allows commercial use, you are going to have a hard time. Not even GDAM allows Commercial usage of Data. Your best bet might be to purchase a DVD from Census Of India. I know that it allows commercial usage.
Answer: I found more updated data in different formats
at http://questionbox.in/india-state-district-sub-district-database-in-excel-csv-and-sql-query-format/
Answer: Additional resources for subnational spatial data are available on this page.
You can try the GAUL dataset, which provides yearly updates of administrative divisions at a global scale from 1990 to 2013.
Answer: The gadm datasets from http://www.gadm.org/country include level 0 to level 3 geometries with names in the attribute tables.
Level 0 is the whole India, 1 to 3 the subdivisions.
The Shapefile datasets contain csv and dbf files with the information you can use without GIS software. Level 3 include the names of the corresponding higher levels as well.
Comment: While GDAM is a wonderful resource, unfortunately the level 2 and level 3 data is woefully dated in certain regions of India, and totally wrong in some other parts.
Answer: Try Indian-State-City-db-json .It is a comprehensive json data of cities with the different states as keys.
for ex: {[Uttar Pradesh: Lucknow, Kanpur, Agra ...],[Karnataka: Surathkal, Bangalore ]...}
Here is the github link : https://github.com/shauryashahi/Indian-State-City-db-json
Answer: I found states, districts and tehsil info from the below path and the details are upto date.... You can check it here.
http://egreenwatch.nic.in/Masters/Public/TehsilView.aspx
Answer: I found states, districts and tehsil info from the below path and the details are upto date (as of Aug 2015)
http://questionbox.in/india-state-district-sub-district-database-in-excel-csv-and-sql-query-format/


Google Drive API grant access without manual authorization

Question: I am building a web application which facilitates its user to upload different types of documents. All users can see each user documents in one place. Now if a user wants to access another user's document, he should not go through all the normal manual process of authorization that is carried out by Google. He should just get access to that document. I have seen this functionality in the alfresco CMS that users can see and grant access without manual authorization. Let me know how I can get this facility.
Answer: Perhaps business accounts are what you need. Users within the same domain are able to access each others documents after the regular authorization flow.


Usage of the 's

Question: Should I use Video options or Video's options when referring to a few video properties that can be edited?
Comment: You only need the `-'s` when it's a definite person: _Bill's options, Your options,_ but for a non-specific indefinite like _User_, either _User's Options_ or _User Options_ may be used. Otherwise noun compounding like _video options_ is the only real alternative, unless you want to use a Romance genitive like _Options of Platinum-Level Users' Video,_ which comes in handy for heavy noun phrases like _Platinum-Level User_.
Comment: It's "Video options", but I'm afraid I can't explain why. Stand by for better answers...
Answer: Properties that are associated with videos are called

video options
Among the video options that can be changed for viewing are...

since you are referring to videos in general.
If you are referring to a specific video you might use

The video's options allow you to specify what aspect ratio you would like to use.

Usage of the 's


Can a lawyer ethiclly have a person in a 3 way call attempt to gain bank account information?

Question: A lawyer in a 3 way call used my sister-in-law to gain information from my bank accounts. The lawyer kept quiet and had my sister-in-law ask questions. My bank told her that they could not help her. Can a lawyer do this? Ethically?
Comment: Sounds like you may need a real lawyer instead of an internet Q&A site.
Comment: Please add a jurisdiction tag, as laws vary from place to place.  In this case, it sounded like the bank held a view of what it was and was not allowed to say to who, and did not disclose information it wasn't supposed to.
Comment: This is a question about what the law, or legal ethics permits. IMO it should not be closed as asking for specific legal advice, although a jurisdiction tag would be helpful.
Answer: If the lawyer honestly and reasonably took the position that it was legal for your sister-in-law to ask these questions, and try to get answers, then the lawyers actions would have been permitted by legal ethics in many jurisdictions.
The bank might have refused to answer because it was legally prohibited from doing so, or because it was against the bank's own policies to provide the information. Or possibly the bank should have provided the info, but the specific bank employee was misinformed. Without knowing what info was requested and what jurisdiction this was in, there is no way to know what the legal position on the questions might be.
In general, a lawyer may not ethically advise someone to commit a criminal act, nor assist someone in committing a crime, nor advise how to commit a crime. But even if it was a crime fro the bank to provide the information requested, it might not be a crime for the sister-in-law to ask for it. And it might only be a tort, not a crime, for the bank to provide the information, or it might not be illegal at all.
Of course, some lawyers violate legal ethics, just as some people commit crimes, even though the law forbids this. It is often hard to get enforcement action on alleged violations of legal ethics, depending very much on the details of the case.


How to cite my earlier paper which is submitted to the same conference?

Question: I actually wrote two papers on my work, and I want to publish both in same conference. I have now submitted first paper and it is yet to be selected and my second paper is extension of my first paper. I want to publish the second one also. So can anyone please tell me how to cite my first paper? Both are IEEE papers.
Answer: One solution would be to post one or both papers to the arXiv, and then cite the arXiv versions.
IEEE does allow posting to the arXiv with certain terms. From their FAQ:

Can an author post his manuscript on a preprint server such as ArXiv?
Yes. The IEEE recognizes that many authors share their unpublished manuscripts on public sites. Once manuscripts have been accepted for publication by IEEE, an author is required to post an IEEE copyright notice on his preprint. Upon publication, the author must replace the preprint with either 1) the full citation to the IEEE work with Digital Object Identifiers (DOI) or a link to the paper's abstract in IEEE Xplore, or 2) the accepted version only (not the IEEE-published version), including the IEEE copyright notice and full citation, with a link to the final, published paper in IEEE Xplore.
Comment: Thank you for your valuable answer,I will surely consider it.
Answer: Since at this time your first work is unpublished, that is how you unfortunately have to cite it, unless you state "submitted to ...." but the latter is usually used on a CV rather than for publications.
Comment: Presumeably, the issue just arises for the *submission* version, anyway. If both papers are targetted at the same conference, their acceptance or rejection notification will arrive roughly at the same time, and the final (published) version can be referenced in the camera ready version.
Answer: Dual submission of related works is a fairly common occurrence, and need not be problematic.  The key question is the degree to which one work depends on the other.
Typically, if you have two pieces that are being submitted in parallel, they should be exploring different aspects of the work.  In this case, you simply cite the other paper with its publication date and venue as "submitted."  When this is done with journals, one often submits the other paper as supplementary information, but many conferences to not allow this.
If one piece builds incrementally on the other, however (as it sounds like is the case for you), then you should seriously consider whether it is actually appropriate to have two separate papers, or whether they should be combined into one.  Otherwise, you may be viewed as engaging in salami slicing, which is definitely a bad thing.
Comment: Thank you for your help,the thing is my first paper represents 1 algorithm and in second I added another algorithm and many features.So the overlapping is not too much,hardly 20%.Is it ok?
Comment: @PushkarTerwadkar Now that you've created the second algorithm, is the first one actually still particularly interesting, or is it obsolete?  If the first is basically obsolete, then the papers should probably be compacted into one focused on the second algorithm.  If the algorithms are separately interesting and each have a real full paper worth about them, it's probably fine to have both.
Comment: No both algorithms are there,first one is not obsolete rather both are different methods to solve same problem.Thank you for your help.


How do I substitute InAppBrowser for ChildBrowser in PhoneGap 2.3.0 using Xcode?

Question: I am following this adobe tutorial about setting up a remote db connection using database.com. He uses ChildBrowser which I couldn't get working on my version of PG. So I updated PG to 2.3.0 and I find there's this new cool thing, the InAppBrowser. The basic examples of IAB I can get working just fine, but I haven't been able to figure out how to use it in the above tutorial. Any help is appreciated. My Git Repo is here. Thanks for reading! Mike
Answer: So, I realize my question is a little broad. At this point cordova 2.3.0 and InAppBrowser are a little too new for there to be a lot of documentation out there so basically what I did was use an older version of cordova in order to have the tutorial match my process.
The tutorial linked above is Andrew Trice's and they responded to me that they intend to write an update to the tutorial using IAB. The version of Cordova that he is using as far as I can tell is 1.7.0. I had been using 1.4.1 prior on another machine so 1.7.0's dmg file could be installed straight from the finder and the two versions seem to be autonomous within xcode. I was creating a brand new project so I was able to ignore the somewhat lengthy cordova upgrade instructions. All source files were copied over from the tutorial git repo. And the childbrowser was installed using the instructions here: Ryan Stewart ChildBrower . I found this set of instructions to be the best I'd found. The only change is the External Hosts that you need are *.database.com and *.salesforce.com.
Hope that helps others in the same bind.
Mike
Edit: Use the child browser plugin for iOS not iPhone. And add a "Telephone" field to your db table.


Find out whether network connection is full or half duplex

Question: How do I find out whether a network connection is full or half duplex?
Answer: You can use mii-tool :
<code>$ sudo mii-tool
eth0: negotiated 100baseTx-FD flow-control, link ok
</code>
'FD' is full duplex.  'HD' would represent half.  For those who haven't seen this, it's because it generally represents a network problem -- you should always see and expect full.
If you don't have mii-tool installed, it is in the net-tools package:
<code>$ dpkg -S mii-tool
net-tools: /usr/share/man/man8/mii-tool.8.gz
net-tools: /sbin/mii-tool
</code>
I believe it is included with a base install, however.
In some cases, dmesg will be sufficient.
Identify your local interface and check dmesg:
<code>$ dmesg | grep -i duplex
[   31.920900] e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: Rx/Tx
</code>
Comment: An article that gives more details: http://www.cyberciti.biz/faq/howto-setup-linux-lan-card-find-out-full-duplex-half-speed-or-mode/
Comment: @N.N.  Ah, it does also talk about `ethtool` .  Not installed by default, but the package is also named `ethtool`, for those wanting to check it out.


What are the methods to reserve one SSD for only an operating system?

Question: Out of all the computers, I've built I've always used a separate hard disk drive or solid state drive to separate the contents of the operating system and the user files. However, eventually somehow someway user folders even not knowingly will have content on the operating system drive. Throughout the years, I've discovered little tricks to OPT content out of that drive such as switching all download directories. Automatic downloads to certain drives. So I was wondering, have anyone found a for sure thing that works or, just nit pick things that will improve the chances of nothing ending up on that drive. Also, the operating system is mainly Windows. More specifically Windows 10.
Answer: Depending on your operating system you can set the automatic download locations for all your music, videos, documents, downloads etc for windows 10 and the file explorer.
Otherwise it just takes a careful eye when installing things to actually pause and read the path that you're installing or extracting things too. Also changing the library locations is very easy to do on all versions of windows.
You are right occasionally the misc file gets transferred to the OS drive accidentally, but this wont cause much of an issue in the long run. Simply watch your path destinations and you will be fine.
EDIT
You can also simply change the registry file that sets the default file path for installations: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion
http://www.thewindowsclub.com/change-default-program-files-directory-windows
Comment: Please don't answer off topic questions.


How do I know eggs are fresh?

Question: I buy eggs from market last week and when I used their colours are little bit changed.I am confused that eggs are fresh or not.
Answer: the color does not signify freshness. rather it changes based on the diet of the chickens.
you can see freshness based on the firmness of that little sack around the yolk

How do I know eggs are fresh?


Is there a Lagrange point between the earth and the moon?

Question: Is there a Lagrange point between the earth and moon where a space station could sit forever without orbiting around either? Just curious, but it seems like a place like that would be perfect for either a second space station or maybe like a giant tv that could display international weather or something. Or maybe a giant laser that can shoot down all that space debris.
Comment: Yes there is, but please delete the part about a giant TV before Elon Musk sees it.
Comment: From your comments it seems like you might be confusing Lagrange points and geostationary orbits.  At a Lagrange point, the object will still orbit both bodies.  And the bodies will still have spin indepentent of that orbit.  So, there really isn't much pratical use for such an orbit.  Also, if the weather is "interesting", it's probably cloudy and you couldn't see the sattlite to get more info.  If it's clear, you probably don't need to know anything else.
Answer: Yes. The Earth-Moon system has a Lagrange point L1, positioned between the Earth and the Moon,  It is about 85% of the distance to the moon (about 320000km compared to 380000km.)  A body at L1 would orbit the Earth, once every month (it would be in a 1:1 resonance with the moon)
L1 is an unstable point, so you would need to use rockets to keep the satellite close to the L1 point for an extended period of time.
320000km is much further than the geostationary orbits, (at about 36000km) and much much further than the Low Earth Orbit of the ISS (about 400km)
There are practical reasons not to put a space station there: It is much harder to get to, with few practical benefits.  It is too far for "tv" or "lasers".
Answer: @JamesK's answer is good, but I'll address some of your points more specifically.

Is there a Lagrange point between the Earth and Moon...

Yes, it is called Earth-Moon L1 (to distinguish it from Sun-Earth L1)

...where a space station could sit forever...

As pointed out, you could put a station there but you'd have to do some station-keeping maneuvers using propulsion of some kind to keep it there.

...without orbiting around either?

It's always a little tricky when we talk about what does or doesn't orbit. You can say the Moon orbits the Earth, but really they both orbit the center of mass of the Earth-Moon system.
And both the Earth and Moon orbit the Sun.
But let's just say that the Moon orbits the Earth, and the five Earth-Moon Lagrange points orbit along with the Moon once a month as well.
You can watch the Lagrange points orbit Earth in the really cool 3D4U video Earth/Moon Lagrange points animation which should also be viewable below, and was found in https://space.stackexchange.com/q/14337/12102
Basically we usually say that the Moon and the five Lagrange points orbit the much more massive Earth, but mathematically they're all orbiting the center of mass.
Answer: Yes, the Earth-Moon system has Lagrange points, and Wikipedia has a short list of satellites that have (or will) orbited near L2, L4 or L5. Neither L1 nor L3 appear to be popular.
The Moon's orbit around the Earth-Moon barycentre has an eccentricity of ~0.0549 and it's quite dynamic, with relatively short apsidal and nodal precession cycles, primarily due to perturbation by the Sun. Alternatively, the Moon's orbit around the Sun is strongly perturbed by the Earth. ;)
The mean Earth-Moon distance varies over the year, as I mentioned here. It's interesting to compare that distance with the distances to the Lagrange point. Here are the relevant graphs:

The mean distances are

Bodies
Distance (km)

Earth-Moon
384,975

Moon-L1
58,106

Earth-L1
326,869

All of those plots were created using the script in the linked answer. The Horizons ID for the Earth-Moon L1 point is 3011.


Do Hindus worship cows in some way?

Question: I've read that Hinduism respects cows since they are considered to have holy Gods. I was curious to know if Hindus also worship cows in some way? I'm really ignorant in this theme, so I'd like to understand exactly the relation (regarding worship) between the Hinduism beliver to the cow.
Comment: Does this answer your question? [Why are cows given special importance?](https://hinduism.stackexchange.com/questions/321/why-are-cows-given-special-importance)
Comment: I'd like to know more about and focus on the worship point because I've seen here that Hindu don't worship cows while my Indian acquaintance had told me that they do. I'm a bit confused.
https://www.washingtonpost.com/national/religion/the-splainer-what-makes-the-cow-sacred-to-hindus/2015/11/05/acdde3e2-840c-11e5-8bd2-680fff868306_story.html
Answer: Hindus worship Brahman in the form of a cow. The cow is a very useful animal for humans. Also the Chandogya Upanishad says that all is Brahman. So in this spirit Brahman is worshipped through a cow. An person not aware of this subtle distinction may very well conclude that a person is worshipping a cow.
Goddess as a cow

May that goddess, who is here manifest as the cow and who residing in
the gods, beams through the bloom and beauty of all sentient
creatures, grant me peace. May that goddess who dwells in the vital
principle of man and is known as Raudri the beloved wife of Sankara
and who has now assumed the shape of a cow, absolve me of all
impieties. May the goddess who lives in the bosom of the god Vishnu as
her own beloved Lakshmi and who is but another manifestation of the
goddess Svaha, the wife of the god of fire, grant me boon. May the
goddess, who guised in different shapes and as their own loving wives,
leads the Sun, the Moon and the gods of asterism in the paths of their
heavenly duties, grant me boon. May the goddess who has assumed the
shape of a cow and who embodied as an idol of beauty and love augments
the connubial bliss of such gods as the four-faced deity, the patron
god of wealth and the Lokapalas and forms the fountain source of their
respective divine splendours, grant me boon. Oh, cow, as you are
Svadha to the Pitrs and did represent the goddess of fire (Svaha) who
makes her lord carry the libations of sacrifice to the gods who drink
them, give me peace.

Agni Purana 210.23-28
Goddess as cow

Thereafter Brahma went on meditation. He saw the excellent cow of the
Great Lord. In her universal form it had come out of his mouth. It had
four feet, four faces, four hands, four udders, four eyes, four horns,
four teeth and four mouths. The cow as goddess Herself who had faces
all round and who possessed thirty-two qualities.

Linga Purana I.13.5-7
Kine – rays of the sun

In respect of the prosperity and the growth that kine confer, in the
matter also of the protection that kine grant unto all creatures of
the earth, kine are equal to the very rays of the sun that fall on the
earth. The word that signifies the cow stands also for the rays of the
sun. The giver of a cow becomes the progenitor of a very large race
that extends over a large part of the earth. Hence, he that gives a
cow, shines like a second sun in resplendence.

Mahabharata, AnusasanaParva, Section LXXI
The sun could be interpreted to stand for Brahman.
Comment: I don't know the details of the process. You need to consult a priest. I am also talking of a physical cow. In India cows are everywhere and so a cow can be brought to a temple.
Comment: Can you please add more about the process itself, of worshiping the cow? (like Prostration or bowing or incense offering etc.) and I'm talking about worshiping a physical cow rather than sculpture etc. For example, can a cow be brought to a temple?

Do Hindus worship cows in some way?


Formula for Scalar Curvature in Spherical Symmetry

Question: I calculated the formula for the scalar curvature for a spherically symmetric metric, in particular of the form
\begin{equation*}
g= h(r) dr^2 + r^2(d\theta^2 + \sin^2(\theta) d\phi^2)
\end{equation*}
and after a lengthy calculation I got the scalar curvature $R$ to be
\begin{equation}
    R(r)=\frac{2h'(r)}{rh^2(r)} - \frac{2}{r^2 h(r)} + \frac{2}{r^2}.
\end{equation}
Could someone please let me know if this formula is correct? In the case of $h(r)\equiv 1$ the metric is the flat Euclidean metric in spherical coordinates and the formula does indeed give $0$ as it should.
Many thanks!
Answer: Your formula gives the correct answer, $ R=\frac{6}{a^2} $, for the isotropic space also: $$ h=\frac{1}{1-\frac{r^2}{a^2}} $$ (see "classical theory o fields" by Landau and Lifshtz). Moreover I obtained the same result, but this fact is not very important.


Word that means bad sounding

Question: I'm looking for the word that means certain words when placed together sound bad. Example: Mary is sad because she had bad luck. Better wording: Sadness engulfed Mary after she experienced misfortune. What is the word that means example numer one SOUNDS awkward?
Comment: I prefer the first sentence. Please say in what way it is *bad sounding*.
Comment: Awkward.  Bad will do, too.  Or you could specify the reason you think it sounds bad: too simplistic.  I frankly prefer your first example over thesupposedly "better" wording, so I would say convoluted, obtuse, wordy, or pretentious.
Comment: _The woman's suspicious behaviour made Clouseau suspicious._ This is an _incongruous_  juxtaposition.
Comment: To add my vote: The first sentence is OK.  The second sentence sounds as though you are trying too hard.  Is it sad, had, bad that worries you?  It doesn't look or sound that bad.
Comment: The first sentence is better - the latter is too melodramatic.
Answer: discordant -

disagreeable to the ear; dissonant; harsh.

dissonant was my first thought, but it's not as apt as discordant for your example. I think of dissonant as something that's off, not something that's just jarring to the ear.
You have to be careful to distinguish this use of the word from the more common meaning of being in disagreement.
Answer: Dissonant  "To disagree in sound.....Disagreeing; incongruent."  Webster's New Collegiate.  It is usually used in music, but is not confined to music.  "If things don't go together well, you can call them dissonant. Dissonant voices are saying different things. Dissonant clothing choices clash. Dissonant chords lack harmony." -- vocabulary.com
Comment: I got up to feed the cat and got scooped.  Priority goes to stevesilva.
Comment: I suggested a synonym.  Your answer is fine by me.  I struggle to explain my preference for one vs. the other.
Comment: This is a possible answer to the question as posed in the **title**, but it should be emphasised that it is not applicable to the sentence that the OP used as an example in the body of the question (as you have yourself pointed out above, it is not clear what the OP regarded as problematic about that sentence).
Comment: @jsw29 I can't argue with your comment!  But I am disappointed that, after more than 5 years, no one has reacted to the word-play in my first comment, above.
Answer: Cacophony has a similar definition in both the American Dictionary of the English Language, 1828 by Noah Webster and Webster's Revised Unabridged Dictionary 1913. The latter has an example so I'll just quote that one to reduce redundancy:

(Rhet.) An uncouth or disagreable sound of words, owing to the concurrence of harsh letters or syllables. Cacophonies of all kinds." Pope. "

Aside from the rhetorical use of the word, it also has specific medical and musical senses which are less relevant here. Unfortunately, I do not think people are as careful to use the word in as specific of a sense these days, so it may just be understood as simply sounding bad irrespective of context. It is a shame, given how much more useful specific words are.
In more recent years it seems to have gained the adjective cacophonous, with the adverb cacophonously, which are the fifth edition of the American Heritage Dictionary of the English Language.

Word that means bad sounding


How can I make seaborn do PairPlot such that it wraps around?

Question: I'm trying to do some PairPlots using seaborn, so I can compare a bunch of features against the label I'm trying to model. There are a bunch of features though (~50). So I'm basically doing:
g = sns.pairplot(train_df,x_vars=["MoSold","GarageArea","ScreenPorch","OverallQual"],y_vars="SalePrice",size=4)

Where "SalePrice" is the label that I want to compare the others against. For now I don't care about comparing the features to each other.
The problem I'm having, though, is that when I plot this in my Jupyter notebook, it formats it as one long row.

I'm only doing it with 4 features here, but when I add as many as I want to, it basically makes the row thinner and longer, and impossible to read (because it's trying to make them all share the same y axis).
What I'd like is for it to automatically wrap like panda's hist does:

I can think of a few little hacks. I could do several individual PairPlot commands to manually do it, using a for loop or something, but that would be kind of a pain. Is there some more elegant way to do this? Something where I'd specify the number of columns it'll display with, and then it'll make a grid, where the y axis is always SalePrice?
Answer: You should not use sns.pairplot which is for plotting all-by-all comparisons.
You should use sns.regplot which can specify particular comparisons to make. Then use subplots can control the tiling.
Comment: Nowadays `lmplot` is the figure-level equivalent of `regplot` and it should be used instead - it has arguments `col=` and `col_wrap=` which should help do this relatively smoothly.


Mordell-Weil rank bound

Question: Given an elliptic curve $y^2 = x(x^2 + bx + c)$ is a non-singular curve, say $c
> 0$ and $b^2 - 4c > 0$. Can we show the bound on the rank $r$ in terms of $\nu(c)$ and $\nu(b^2 - 4c)$ without quoting the Selmer groups?
Well, a classical approach on $2$-descent says
$$
r \leqslant \nu(c) + \nu(b^2 - 4c) - 1.
$$
I suspect that we can just show
$$
r \leqslant \nu(c) + \nu(b^2 - 4c)
$$
by using a simpler argument, however I stuck here. Could you please give any
hints?
Answer: This is done in Silverman and Tate's "Rational points on elliptic curves" in Section 5 of Chapter III (see in particular the discussion at the top of page 85). Notice however that even though the proof does not mention Selmer groups explicitly, they are lurking in the background. The authors try hard to keep the proof elementary for undergraduates, but once you learn about Selmer groups you would quickly realize that the argument they discuss is essentially using Selmer groups without defining them as such.

Mordell-Weil rank bound


How to make the new window display in the center of the screen?

Question: I'm using Ubuntu 22.04LTS. When I open a new window, the new window will appear in the upper left corner of the screen. That's terrible. I'd like to know how to make the new window display in the center of the screen. I have downloaded the CCSM(CompizConfig Settings Manager) and changed the settings, but it doesn't work. HELP!
Answer: Assuming you're running GNOME, try this command:
gsettings set org.gnome.mutter center-new-windows true

If that doesn't work, try installing GNOME Tweaks using sudo apt install gnome-tweaks, launching it, then going to "Windows" and enabling the "Center New Windows" option.
Comment: Thank you very much! I installed GNOME Tweaks and then finished the setting successfully!
Comment: Pleasure's all mine! Happy I could help! Have a blessed rest of your day (or night)!


Shut down actions order: write buffers after RO root remount

Question: Exploring amazing Book How Linux Works by Brian Ward I usually have no question. But this one. At the "6.7.0 Shutting Down Your System" there is an ordered list of jobs.
After remount root file system in ReadOnly mode (6) write buffered data by the sync program (7).
How is it possible to write data in a file system after mount in in ReadOnly mode?
May be it is an error, correct order is first write buffers (7) then unmount (5) and ro remount (6)?
1. init asks every process to shut down cleanly.

2. If a process doesn't respond after a while, init kills it, first
trying a TERM signal.

3. If the TERM signal doesn't work, init uses the KILL signal on any
stragglers.

4. The system locks system files into place and makes other preparations
for shutdown.

5. The system unmounts all filesystems other than the root.

6. The system remounts the root filesystem read-only.

7. The system writes all buffered data out to the filesystem with the
sync program.

8. The final step is to tell the kernel to reboot or stop with the
reboot(2) system call. This can be done by init or an auxiliary program
such as reboot, halt, or poweroff.

P.S. The book is amazing it is an only question usolved during several chapters.
Answer: There's the filesystem driver (which translates blocks on some block storage medium into directories and files), and there's a caching layer beneath that (so that you can quickly write data to the storage medium, and continue doing other things, while the kernel actually takes care of getting the data written to the storage device in the background, because that typically is relatively slow).
sync makes sure anything that's still in that caching layer is written to storage.
So, this is about data "below" the filesystem, if you will.
Answer:
How is it possible to write data in a file system after mount in in ReadOnly mode?

Read only is an attribute of the mount(point). In other words, you cannot make changes to the filesystem via the mount(point). It does not mean that no changes can be made to the filesystem by a lower layer, such as the block layer or the caching layer. (Probably there's not really such thing as the caching layer. More like the block layer takes care of the caching, I guess.)
To prevent any potential change made to the filesystem, the partition or drive itself will need to be by some means read-only. (Probably not even the effect of blockdev --setro would "cut off" any buffered data from being flush onto the device. It will likely require the the device itself to forbid write access to any of its logical blocks.)
From the point of view of the files and directories, changes you made to them do not differ depending on whether they have been written to the actual storage. In other words, unless the filesystem driver is made to run in some "synchronous mode" (if it's a thing), what you read from a file may still be in the write buffer / cache, until a flush all the way down from the filesystem driver (e.g. sync -f path/to/mountpoint) is requested. (The flush could occur behind the scene because of other reasons though.)
I do wonder if in Linux you actually need any explicit sync / flush after you remount a mount in read-only mode. I would be slightly surprised that it does not cause an implicit one like unmounting.
Comment: Btw, there's the term "dirty page", which might be what you'd be interested in to know more about...
Comment: "caching layer" was indeed my choice to describe what the layer does, not the name of the layer! Yes, it's the block device layer; there can be arbitrary many of these stacked (say, in a LVM volume on a thin provisioning pool backed by an md-integrity layer on a md-raid0 on physical SSDs, that's already 4 layers of block abstraction, and then there's the hardware).


Changing the license of a derivative work

Question: Let's say I take a software (Work) distributed under GPLv3 compatible license, and create a Derivative Work. Can I distribute it (the Derivative Work) under GPLv3 license? If not, how can I make a Derivative Work part of a project distributed under GPLv3?
Answer: In brief, yes.
The very definition of a GPLv3-compatible licence is that "you can combine code released under the other license with code released under the GNU GPL in one larger program".  If you are not the rightsholder in the GPLv3 code, then (by GPLv3 s5c) you must release the entire derivative work under GPLv3.  Since in this case you are the rightsholder, you do not have to do that, but you very clearly may.
Comment: If you are not the rightsholder, though, then I think the answer should be "yes, you can combine the code" but "no, you can't change the license." In most cases the license must remain the same (e.g. MIT code can be included in the GPLv3 project, because MIT is compatible, but the code that is included in the GPL project still is MIT licensed and it still must follow the MIT license requirements).
Comment: I fundamentally disagree, and make my position and argument clearer [here](https://law.stackexchange.com/questions/4149/can-one-take-bsd-licensed-code-and-distribute-it-under-gpl/4194#4194).  GPLv3 s5c is pretty clear, by the way ("*This License will therefore apply ... to the whole of the work, and all its parts*").  The entire combined work must be released under GPL, rather than some chimeric half-GPL-half-MIT beast, and if this were not possible, there would be no such thing as a compatible licence.
Comment: The wording in your linked post is much clearer, the "combined terms of both the X license and the GPL license." For example if it's MIT licensed code,  you can "add on" the GPL requirements on top of that to the MIT license requirements. But the MIT requirements don't go away. I think it's just a wording disagreement. I.e. you can 'change' the license in the sense that you can change your home by adding a room onto it (i.e. old rooms remain), but as the non-rightsholder you cannot change the license in the sense of changing your attire from a necktie to a bowtie (i.e. old attire removed).
Comment: The question that makes the distinction clear is this: can I, on receiving a copy of the derived work, extract from it those parts that were originally MIT-only, and use them under MIT-only terms?  I believe I can't; if you agree, then I, too, think we're just discussing nomenclature.
Answer: Unless the original license explicitly allows it, you can not drop the license of the original Work and replace it with the GPLv3.
What you can do is that you license your modifications under the GPLv3 license.
Although the GPLv3 requires that you distribute the entire Derived Work under the GPLv3 license, it does not give you permission to go against the requirements of the original license. For a GPL-compatible original license, this means in effect only that you can't just throw away the original license text. (Although, officially it means you need to comply with the requirements of both licenses where it comes to code that was part of the original Work.)
Comment: GPLv3 s5c is pretty clear that the interpretation in your first para won't fly.  If your argument held, GPLv3 s12 would prohibit any redistribution of the derived work.  I agree with everything you've stated in the second para, though.
Comment: @MadHatter, I updated the first paragraph to better reflect what I meant.
Comment: Thank you for that, but I still disagree with it.  GPLv3 s5c is very clear that it's *not just the modifications but the whole work and all of its constituent parts* that must be licensed under GPLv3.


libGDX - Using a HashMap causes growing HeapSize and Out of Memory on Android Phone

Question: I'm facing a problem with a fast growing heap size because of using a HashMap. All works fine in the Desktop version but crashes on Android with the following Error:
I/dalvikvm-heap(23022): Grow heap (frag case) to 15.307MB for 767952-byte allocation
I/dalvikvm-heap(23022): Grow heap (frag case) to 16.486MB for 767952-byte allocation
I/dalvikvm-heap(23022): Grow heap (frag case) to 17.661MB for 767952-byte allocation
W/Adreno200-GSL(23022): <gsl_ldd_control:230>: ioctl fd 52 code 0xc00c092f    (IOCTL_KGSL_GPMEM_ALLOC) failed: errno 12 Out of memory,inBufSizeBytes:12,inBuf:0x539f185c

My code looks like this:
public class SkillManager {

    // all skills in one map
    private Map<Class, AbstractBaseSkill> skills;

    // singleton
    private static SkillManager instance;

    public static SkillManager getInstance() {
        if (instance == null) {
            instance = new SkillManager();
        }
        return instance;
    }

    private SkillManager() {
        Gdx.app.log(TAG, "#SkillManager Cstr");

        skills = new HashMap<Class, AbstractBaseSkill>();
        skills.put(Skill1.class, Skill1.getInstance());
        skills.put(Skill2.class, Skill2.getInstance());
        skills.put(Skill3.class, Skill3.getInstance()); // crash on android
        skills.put(Skill4.class, Skill4.getInstance());
        skills.put(Skill5.class, Skill5.getInstance());
        skills.put(Skill6.class, Skill6.getInstance());
        skills.put(Skill7.class, Skill7.getInstance());
        skills.put(Skill8.class, Skill8.getInstance());

        skills.put(Skill9.class, Skill9.getInstance());
        skills.put(Skill10.class, Skill10.getInstance());
        skills.put(Skill11.class, Skill11.getInstance());
        skills.put(Skill12.class, Skill12.getInstance());
    }

The SkillManager constructor only gets called one time after loading the MainMenuScreen. So what is the problem with that? There are not that much entries? All the singletons I put in have an empty constructor. The first two entries are working fine, but at the third entry the heap size gets too big. Is it because of the singletons or because using a HashMap with that types is not recommended? Sorry if this is a stupid question, but I'm not that experienced yet...
Thx a lot for your help!
Answer: Using SoftReferences or WeakReferences helps.
Also there is this good article on avoiding out of memory
http://blogs.innovationm.com/android-out-of-memory-error-causes-solution-and-best-practices/
A temporary hack(Solve the issue before you publish the build) for this is increasing the heap size in manifest
android:largeHeap="true"


Where can I find out the names and definitions of all the grub.conf kernel= parameters (specifically RHEL6)?

Question: I'm having difficulty finding any sort of comprehensive list and description of parameters available in /boot/grub/grub.conf file for the kernel line.  I've googled around but haven't found a good reference for this information.
Answer: I don't think there is any comprehensive list. In addition to what the kernel does (see kernel-parameters.txt), any program can look at /proc/cmdline and extract information, and many do. In RHEL7 (and Fedora, etc.), systemd looks for a number of systemd. parameters there — you will find these documented in the Kernel Command Line section of the systemd(1) man page.
Some of these and a few others are documented in the kernel-command-line(7) man page.
Comment: Saying it's the same information as in grub.conf is... a little upside down. The bootloader is what *gives* the kernel its command line, so the default will be in its configuration. But, you can also specify different options at boot time — this is frequently the case for debug and rescue options.
Comment: Hmmmm...../proc/cmdline simply provides the same information as that in the /boot/grub/grub.conf.  BTW, the kernel-command-line man page is a RHEL/Centos 7 item.
Comment: kernel-command-line man page is from systemd, so you'll see it in RHEL 7 and also Fedora, Arch, Debian, openSUSE, Ubuntu, etc.
Answer: The kernel-doc package should provide the list you seek.
yum install kernel-doc

After installation, look in the kernel-parameters.txt file:
less /usr/share/doc/kernel-doc-<version>/Documentation/kernel-parameters.txt

Be sure to change <version> to your version (possibly 2.6.32).  My system uses 2.6.18 (RHEL 5.X version).
kernel.org may provide a more complete list of kernel parameters and definitions.
https://www.kernel.org/doc/Documentation/kernel-parameters.txt

Comment: I've seen that one in my google trek, but it is not complete.  EX: rhgb or crashkernel=auto or biosdevname...etc....etc.....Where do I go to discover these and other possibly hidden gems?
Comment: @mdpc - anyone writing a driver uses their own parameters that can be passed to the kernel so unless you read the documentation for all modules and whatnot I'm afraid there is no such comprehensive list
Comment: How do you know which are passed to other modules and which are processed by the kernel?  I might agree with you but for the example crashkernel parameter is defined in the document but not the auto setting.


IPad Pro out of battery and won't charge

Question: I just bought a new Moshi line to charge my iPad, it was working fine at first but yesterday it said something like unlicensed line and when i saw it i didn't really care and just pressed dismissed. When i woke up my iPad didn't charge. Now my iPad is completely out of battery and when i plugged it in the charger it showed that it was charging but i can turn it on. I change lines several times and it still wouldn't  work.
Answer: I'm not 100% sure what Moshi line is, other than a lightning cable. What Gen is this iPad? The problem may be with the cord, the hot wire, or the bar wire could be soldered wrong. There's only one fix for this, a messy project in taking the cord apart by the Male Piece. You'd have to re solder it, and make sure it's a sturdy fix. An other problem may be the charging port, when did you buy this iPad, is it brand new? Apple isn't known for soft error's like a wire misplace, but it could happen with any company. I've dealt with Phillips and a missing wire before, this could also be the case.
Answer: Press the Home and Standby button simultaneously for at least ten seconds. If you're lucky the iPad will reset.
Comment: i already tried that and it didn't work
Comment: Please keep trying. Happened to me before but eventually worked... Unplug and replug several times. Also make sure to use a power supply sufficiently powerful to charge the iPad (which I'm sure you already did).


Associate Protractor tests to TFS properly

Question: I'm trying to write a few tests in Protractor, but looking a bit forward I wonder if anyone knows how to fully associate my Protractor tests to my test cases in TFS. So, I can run it those tests from  my test cases on Microsoft Test Manager.
Answer: As far as I know, you can only associate and execute MSTest based test automation to test cases in TFS.  You could write a MSTest test method to wrap each of your protractor test cases.  Somebody did something similar here for Ranorex tests.  Doing that manually would be painful, so I'd recommend automating the MSTest dll creation.
There's also the potential to associate your protractor tests directly with TFS Test Cases using something like this.  However, I'm not sure how you would execute them via MTM.
Answer: You can use the TFS SDK to directly insert test results.  See https://stackoverflow.com/questions/6505812/how-to-create-a-test-run-and-result-using-the-team-foundation-server-api.
This may or may not be a worthwhile use of your time to implement something like this.  TFS is pretty integrated with MSTest and the entire Microsoft infrastructure.  While you could use the TFS SDK, it would be much much simpler to use a different TCM that supported results from protractor out of the box.  Is there anything tying you to TFS?
Comment: Is there a TCM for Protractor that allows to see results and test cases in a UI? I haven't found any.


How to control and interact with elements on a webpage displayed with IE or a different browser with pywinauto

Question: I want to be able to access the elements of a webpage with python. I use Python 2.5 with Windows XP. Currently, I am using pywinauto to try to control IE, but I could switch to a different browser or module if it is needed. I need to be able to click the buttons the page has and type in text boxes. So far the best I've gotten is I was able to bring IE to the page I wanted. If it is possible without actually clicking the coords of the buttons and text boxes on the page, please tell me. Thanks!
Comment: http://stackoverflow.com/questions/12773356/how-to-control-ie-explorer-with-pywinauto
Answer: I think for interacting with webserver better is to use cUrl. All webservers function are responses for GET or POST request (or both). in order to call them, just call the urls that buttons are linked to and/or send POST data attaching that data to appropiate request obj before calling send method. cUrl is able to retrieve and do some processing on webserver responce (web site code) without displaying it, what delivers knowledge about  url adresses contained in the web site, which are called when clicking certain buttons. Also possible to know html fields which carry POST data to get their names.
Python has curl lib, which I hope is so powerful as PHP curl, tool what I used and presented.
Hope you are on the track now.
BR
Marek
Comment: Not really what I was looking for
Answer: Tommy ,
What i Have observer till now if u have a web application and if u are able to identify the object in that page using winspy (tool for spyup the controls in the page). you can automate that. Else you cant.
Like using following code
<code>app = Application.Application();
app.window_(title_re = 'Internet Explorer. *').OKButton.Click()
</code>


Plugin to submit forum posts to StackOverflow

Question: I would like to see a forum plugin [phpbb, etc] that would allow forums to move posts to Stackoverflow. It gets rather annoying seeing repetitive questions in forums that are posted on SO or in the forum in another place.
Comment: You mean like a bulk move operation that posts *all* questions on a forum to Stack Overflow?
Comment: Kinda similar: http://meta.stackexchange.com/q/79244/131713
Comment: I think we'd have a flood of poor quality posts with no clear owner which would be closed almost immediately.
Comment: Oh no, I mean... someone posts a post on a forum, there would be a vote system on the plugin, then the post's content on the forum then says "this has been moved to stackoverflow" ... the concern is that there is a lot of dups in forums or unique questions that aren't coming here. Also specialized questions that can be found on those sites that you can't find here.
Answer: I'm opposed.
A question needs a person  to ask it, adjust it to the audience, tag it, submit it, look at other questions and the way they are written, browse the site for duplicates, browse around in the relevant tags... All these things a forum plugin can't do.
Comment: My idea is that a forum post on a specific software could be easily submitted to so kinda like twitter apps submit to twitter.
Comment: @steven the point still stands IMO, the asker needs context that they don't have when posting from a forum. And copy&pasting is so easy
Comment: Thats true... my thought is that the forum could pass tags related to what the forum/subforum is about.
Answer: The Stack Overflow API currently has no writing function.  The bot discrimination system in use prevents the use of most bots.  If you want to migrate posts, your best bet is to do it by hand.
Eventually the API will include posting functions, and the thing you'll need to be careful about then is that the questions posted are good, otherwise the user account (and eventually IP and other methods of tracking it) will be blocked due to consistently poor posts.
But as long as the questions add value to stack overflow, it won't be a problem.
There is no timetable for the post access on the API.
Comment: @The There are quite a few gems hidden in edit comments, primarily because there's no moderation, and most people ignore them.  It's like a secret garden in there!
Comment: @TheRenamedException Uh-huh, of course you're not.  Why don't you have a seat *right over there* mmmkay?
Comment: You read edit comments? Wow, I am impressed! :-)
Comment: I've started putting rather unusual things in there myself. As you saw :-)
Answer: IMO this is a bad idea since it has the potential to reduce question quality and just have all sorts of crap posts pushed to SO for the sake of it (if someone just needs to click a button to add a post to SO from an original forum post they probably will just in case they get a response.)
If all questions on forums were carefully worded, good, on topic questions then I'd be for it. But I suspect all this would bring to SO is more bad questions. If someone really wants to get input from stack overflow as well as a forum and really feels the question is suitable for both, they'll post it in both places.
Comment: @steven _People_ at StackOverflow are really good at filtering things out. I'm not seeing a huge benefit from your suggestion, but I do see an increased burden on volunteers.
Comment: Stackoverflow is really good at filtering this out. Also its good at filtering out duplicates.


Unable to login my subdirectory WordPress site

Question: I am trying to build a new website in my existing website's subdirectory folder. I have installed WordPress to www.fitfix.ca/new subdirectory. I can access to the page but when try to login fitfix.ca/new/wp-admin This page isn't working right now fitfix.ca redirected you too many times appears. I tried to change plugin/theme name and deleting htaccess file but nothing worked. What's the solution please help.
Answer: Look in the site's error.log file for hints. A 'white screen' will cause entries in the error.log file (in the site's root folder - the 'new' folder).
You might also try to rename the plugin's folder in case it is a plugin.
You also need a basic htaccess file - see here for info: https://wordpress.org/support/article/htaccess/ . If the htaccess file is not proper, then the site won't load.


Did I brick my Yaesu ft-780r

Question: I bought a second-hand #Yaesu #FT780R real cheap (€30). The fuse was dead, I replaced it. It turns on. N-type antenna connector: ordered an adaptor, to be delivered today. While waiting for the connector, I prepared the radio on top of my table. Turned it on, all seemed OK. Fully responsive, it received well without an antenna and in the right frequency. Then I connected a CW key. A spark flew in it and the display turned completely erratic and irresponsive (zeros and random numbers of varying brightness). Removing power completely for half an hour does not help. I checked the manual [http://radiomanual.info/schemi/YAESU_VU/FT-780R_user.pdf], but found no way to factory-reset it. Have I bricked this beauty from the 80s? I would appreciate ideas on what to do next, thanks a million.
Comment: It's likely that the key plug shorted the jack and transmitted briefly as you inserted it. Was it set up to transmit, and with no antenna? It's possible this would damage an 80s rig, but I'm not sure how it would upset the display.
Comment: SWR probably hit the display. .
Answer: The manual for this radio is quite helpful in that it has a theory of operation, block diagram and complete schematics in it.  This radio doesn't have non-volatile memory, so simply removing all power should reset it.
The usual troubleshooting rules apply.  First check all power supply voltages and filtering.  Look for ripple. Look for bad caps. It has multiple voltage regulators - make sure each output is within spec and clean.
Since the display is scrambled, I'd look at the CPU next.  Check the output of Q27 the 5V regulator for the CPU.  It looks like it is supplied on pin 41.
It has a 2.56MHz crystal on pins 22 and 23 - make sure it is oscillating. It likely has a reset circuit.  It looks like that might be on pin 24 with a cap (C01) and a resistor (R01).  Make sure it starts low at power up and rises high a bit later correctly.
The radio does have SWR protection, so briefly transmitting into an open antenna jack should not be fatal.
Good luck
Comment: Thanks a million for such a detailed response. I went to see a knowledgeable colleague, who disassembled the radio and found out that it had been modified to use the CW key as a 12 V power supply for a TNC. Undoing the modification with help from the schematics did the trick. The radio works fine now and I have used it for contesting. After PTT, every now and then, some relay gets stuck and does not return to RX.

Did I brick my Yaesu ft-780r


What is CI/CD Pipeline in DevOps?

Question: I just graduated with a non-tech background. As a person from a non-IT Background is DevOps a good career choice? Is it a good time to enroll in devops training?
Answer: CI = Continous Integration, CD = Continous Delivery.
What is CI/CD:
Continuous Integration (CI) means automatically testing each change made to your codebase as soon as possible. Continuous delivery (CD) follows this testing and pushes changes to a staging or production system.
Further information:
Data pipelines, web services, apps etc. all of this is just code that needs to run on some computer that executes and runs the code. Normally one separates the dev (development) from the prod (production) environment. Code will change over time, new features, new requirements, bug fixes etc. will result in more and more code over time and will create new versions and releases of your software. DevOps and CI/CD is an essential part of successful software development. And this will remain like this as long as there will be software devlopment.
To answer your question: Is DevOps a good career choice?
Whoever is serious with IT and software development, needs to know about DevOps. It's definitely a domain where you can learn a lot. If you plan to stay in some IT related career path, I think knowledge about DevOps will always remain helpful for you. My advice is: try to find out what is it you like to do and investigate your time in learning and improving your knowledge on this. It doesn't matter if your background is IT or not. If you are willing to put in the effort and learn, you will  find your way.

What is CI/CD Pipeline in DevOps?


Auto-update ->Cinnamon AND Gnome fallback stop working

Question: I'm running 13.04, and work in Cinnamon.  Today, I updated everything that was suggested.  When the update finished, I restarted.  Cinnamon crashed, sending me to gnome fallback.  Gnome fallback worked OK.  I figured I might get cinnamon back by running sudo apt-get update && sudo apt-get dist-upgrade just to make sure that everything is at its latest version.
On doing so, Gnome fallback breaks -- specifically, moving to a different workspace leads me to a blank screen (with a mouse) from which I can do nothing.  There are also other bugs -- windows don't get recognized as such when you right click their upper bars (for example, to send them to a different workspace).
I am now working in Unity, in which my productivity is quite bad.
Does this problem sound like a known problem?  Any way to fix besides reinstalling ubuntu?
Answer: Try
sudo apt-get intall cinnamon
sudo apt-get update
sudo apt-get upgrade

It help me solve save problem


How to call IShellFolder::EnumObjects externally in a shell extension

Question: I have created a Windows Shell Extension similar to Google's GDrive. Now I want to add different views to the ListView that inherits from IShellView. A new context menu has been added to to display 3 views (Details, Small Icon, Large Icon). When a view is changed using the context menu, the current window needs to be refreshed/created to display the changed view.
In my IShellFolder::EnumObjects, a new ListView object is created and OnCreate is called automatically. I need to call this method when I change view using the context menu also. I guess there might be some API like SHChangeNotify() that can all the EnumObjects() automatically and a new IShellView window will be created with the changed view.
Answer: As i understood from your question, you need the same contents to be viewed in listview but with the new view.
You don't need to recreate the Listview object after the new view mode selection, Just set the ListView's style to LVS_REPORT, LVS_SMALLICON, or LVS_ICON.
SHChangeNotify is used to reflect the change to the tree pane not the ListView.


What is the difference between symbian belle and Symbian Anna?

Question: What is the difference between symbian belle and Symbian Anna? Is it just small updation of Symbian ^3 or entirely a new os?
Answer: Belle offers six home screens and the previous siblings of Symbian have 3 home screens only.
Widgets have been redesigned and are now available in five different sizes. Widgets can be rearranged to create complete personalized home screen.
Belle has taken a neat approach to notifications through – a pull down notification tab that incorporates common setting, notification for incoming messages, missed calls, etc.
Belle has introduced a toggle widget for one touch operation of Bluetooth, profile, Wi-Fi, etc.
Lock screen is active in Symbian Belle. It will tell about missed calls, incoming message, etc. Colored wallpaper can also be added to lock screen.
Near Field Communication (NFC) is integrated in the Symbian Belle operating system.
Belle incorporates new apps such as Microsoft Lync – an IM for business, SharePoint, OneNote, Exchange ActiveSync, and PowerPoint Broadcaster.
Answer: Symbian Anna is the name for Symbian^3 PR2 (and PR means product release).
Symbian Belle is the name of the next update, and is a considerably larger update than Anna, with lots of UI changes.
Both use the same Symbian operating system, although Belle will have more updates. Most applications should be able to run on Symbian^3, Symbian Anna and Symbian Belle phones.
Symbian Anna can be updated on existing Symbian^3 phones such as the Nokia N8.
Symbian Belle can also be updated on Symbian^3 and Symbian Anna phones.
Answer: Nokia has made a specific point of making both of the updates fully compatible with older handsets on the same basic platform, so Symbian^3 handsets such as the Nokia N8 and Nokia E7 have been issued with a Symbian Anna update, and will also benefit from an update to Symbian Belle too.
That will leave a single group of high-end Symbian handsets all running on the latest Symbian Belle platform within the next few months.
So what about the updates themselves? A common question we're seeing right now is which is the bigger update – Symbian Anna or Symbian Belle? Well, we say this having not had a chance to actually try out Symbian Belle yet, but it seems obvious even at this stage that it's a far more bigger step forward than Symbian Anna is, which is great news indeed.
In terms of headline improvements, Symbian Anna offers an attractive new icon design and font, a better web browser plus updates to other Nokia services, a portrait-style QWERTY keyboard and split-screen text entry.
Symbian Belle offers a doubling of the number of homescreens you can work with, the introduction of more flexible homescreen widgets in several different sizes, a wide range of NFC capabilities (though that will of course rely on your phone itself being NFC-enabled, which of the current range only the Nokia C7 is), a new status bar which takes a neat drop-down approach to notifications, dynamic real-time multitasking previews and a lock screen that shows additional detail, such as incoming messages and missed calls.
We'll have plenty of time to delve into the specifics of each of these improvements in due course, but as a whole they certainly give us a lot to look forward to.
There's no sign yet of any device-specific features being rolled out with the Symbian Belle update, as we've seen for the Nokia C7 and Nokia N8 with Symbian Anna. Time will tell, but we're certainly not complaining about what we've seen so far.
What do you make of Symbian Belle in the light of what Symbian Anna has to offer? Do you think the new features being lined up make for a bigger step forward than we've seen in Symbian Anna? Let us know what you think in the Comments!
Comment: There are currently some BC breaks between Anna and Belle. Some people are working on it. Also, I don't think you can upgrade to Belle without having Anna first.


how to set static ip in ubuntu 16.04 on raspberry pi 3 (cloud-init)?

Question: I installed Ubuntu 16.04 on Raspberry pi 3 but when I edit /etc/network/interfaces to setup a static ip it gets replaced with default settings on startup.  Looks like cloud-init is managing the network settings.  How do you manage cloud-init?
Google rendered no help.
Thanks.
Comment: I found a workaround : "sudo apt remove cloud-init"  -- problem solved!
Comment: Any other "official" way to do this? I ended up removing cloud-init, but am wondering whether there is way to configure it using cloud-init
Answer: I tried simply apt remove'ing cloud-init on the latest 16.04 server image from Pi Flavour Maker, and it rendered my system unbootable. This tip for a different Ubuntu (probably the official desktop 18.04) warns that there may be other processes that depend on cloud-init, and those dependencies aren't automatically cleared up by removing it:
gotcha warning about 18.04

You just deployed yourself a fresh copy of Ubuntu Server 18.04 Bionic
  Beaver. It should be the latest and greatest, and you just need a
  virtual machine to do some web development or perhaps you just want to
  enable IP forwarding and use this machine as a router. That's great,
  except the latest Ubuntu assumes that you are part of the current
  trend to put everything in the cloud, and so ships with something
  called cloud-init.
No harm normally, but this wastes valuable seconds doing something you
  don't need if you're not in the cloud. It's easy to remove this
  package by following the (modified) instructions
  here:
dpkg-reconfigure cloud-init

Then deselect all the options except None.
sudo apt-get purge cloud-init
sudo mv /etc/cloud/ ~/; sudo mv /var/lib/cloud/ ~/cloud-lib

I prefer to move, rather than delete, in case something goes wrong and
  you wish to restore the files.
When you remove cloud-init following those steps, your machine stops
  booting and there is apparently a service that is waiting for network
  to be up. This would normally be just an inconvenience, but the boot
  hangs indefinitely waiting for said network. Odd choice of
  configuration out of the box, but anyway, you can fix this by:

List the services which depend on network being online.
sudo systemctl show -p WantedBy network-online.target

This will list the culprits as some iscsi services that you probably don't need.
Disable the services and remove the open-iscsi package
systemctl disable <service name>
sudo apt remove open-iscsi

That should do to get the system booting without some service waiting
  endlessly for a network connection.


Controlling ColorRamp nodes with Group Inputs

Question: Is there a way to control parts of a node (that doesn't have inputs) with Group Input nodes?
Comment: Nope. AFAIK this isn't supported.
Comment: I am able to change the factor using a Driver Scripted Expression but even though the Pos slider seems to support this, I can't get it to have any effect for that particular field.   I have not put much effort into drivers yet so maybe someone who has can figure this out.

You can use animation keyframes for the Pos field.
Comment: Related: http://blender.stackexchange.com/questions/40770/possible-to-control-a-driver-from-a-group-node-input-slider/.
Answer: So far as the method addressed in the question, I think the C-Code would have to be changed for that to work.  Maybe with Python but I'm not sure about that.
This field can be manipulated using Drivers and Scripted Expressions.
One way to do this would be to add an Empty.

Next keyframe the empty at t=0 then move the timeline to the end of the animation and the empty 1 unit to the right along the X-axis.

Now add a driver to the Step Field of the Color Ramp by hovering over the value and pressing 'd'.
Open the graph Editor and change the value in the expression field to be 'var' as seen in the image below.  Also, add the Empty as the Object to the default Variable field and change the Type to X Location so when the Empty moves to the right, it will change the driven value accordingly.
(I had to add a default modifier to get this to work for the Pos field which may be a bug since it now continues to work after I delete the modifier.

Here it is animated.  The reason I am moving the mouse cursor around in the Node Editor is because this updates the UI and the animated values can be seen to move.

With a bit of creativity, maybe you can find a way to use drivers to do what you were planning on doing with the socket input...  you didn't say what would be driving the socket so we can only guess at this part.
Some thoughts I'd like to add to this.  I believe, (at least according to my understanding which is very limited here) that this will be per-object since I don't know of a way to make drivers work on a per-vertex basis and especially not on a per-fragment basis which excludes a lot of the refinement which a shader-based control would offer.
It may be possible to duplicate an object and give it the same material but make it invisible and alter it's shape in order to affect shader input values like Geometry->Position and if I come up with anything like then I will append this method to the Answer.
If anyone else does think of something like this, feel free to piggy-back a second answer based on what I've shown here as a starting point so that this page can become a more comprehensive piece of documentation.  I'll vote up any answers that are useful even though this has been chosen as the solution.
Answer: Blender 2.81 introduced a "Map Range" node which is essentially the same as a color ramp node with two stops which both have grayscale values.
The "Map Range" node has 5 inputs.
The "Value" which is the same as the input of the color ramp.
The "From Min" and "From Max" inputs are the left and right position, between 0 and 1.
The "To Min" and "To Max" inputs are the rgb value of the left and right stops.


In MySQL how do I grant a user access to a read replica only?

Question: I have some users that I want to grant read only access to my database so I setup a replica server, but I don't want to grant them access to the master. I'd assume that this is a common use case, but I've not been able to find out how to do this easily. The only thing I can think of to accomplish this is to restrict access by IP to the master server.
Comment: @akuzminsky, if all the power users decide "because I have a choice, I'll use the master instead of the replica, because I know that it runs on more powerful hardware", then nobody uses the replica, and the resources go unused.
Comment: Well, you can create a user on the slave host only. But this is a bad idea because it will lead to other problems. For example, what are you going to do with users in case you decide to promote the slave to master?
Comment: It's not common actually. What problem are you trying to solve?
Comment: @akuzminsky, I've got my master server/db which is for production and is the backend to a website with many end users. There are some other power users that want direct read access to the database. I've set up the replica to handle this extra load to the database, and to separate it from prod. Now, these power users have access to both databases, and I can't figure out how to enforce that they only use the read replica. Thanks.
Comment: assuming the power users have read-only permissions is it OK they still can have access to the master?
Comment: It is common. The slaves are used by people and tools for reports etc.
Answer: Master and slave instances can have different users and access permissions -replicated queries are executed by the SUPER user-, just create and/or modify the separate users with SET SESSION sql_log_bin = 0; every time (so you do not create conflicts on replication). Avoid any other process writing directly to the mysql.user (and other mysql.*) tables directly and you will be fine.
You probably want to set your slave as read_only and not provide SUPER privileges on anyone else there (as it will become out of sync if someone writes there and not to the master).
Comment: We use replication by 'white lists', e. i. replicate only specified databases. So mysql database is excluded.


How can I open the window when it's dark outside without fearing that moths might fly in?

Question: I have a mottephobia (a fear of moths) and when it's too warm in my room in the night I can't just open the window. My Screen is way too bright. Is there any way to open the window by night and nothing flies in?
Comment: At my house, every window has a screen. Moths can't get in unless I open those.
Answer: During a camping trip, I had seen the camp guy place a pan/plate filled with water, right under a light.
Being the only light source in the room, the moths came in and many got tricked and dived into the water.
But a window net screen is best solution
Comment: This is... brilliant!
Answer: In India, open spaces with greenery translate to two things:

great view to look at during the day
mosquitoes rushing in to your house by the night

You could try buying stick-on nets for your windows. These have adhesive backing velcro frame that you can stick on the borders of your window frames (you have to keep the window open all the time though) and then stick on the net. This means you will fresh air and no bugs by the night.
Also see this google search query
Answer: Light temperature makes a huge difference. If you are using compact fluorescent lamps, make sure you are using those with "yellow light" (2700 Kelvin).In the case of incandescente lamp, you  can use a 220V lamp on a 127V instalation the light will attract way less insects (moth included).
This will not prevent any moths but will reduce a lot their presence.
Comment: You can use [F.lux](https://justgetflux.com/) to do the same to your computer screens at night.
Answer: This isn't a hack answer, but I've got the same problem, I hate them in the house. I never open a window at night when the lights are on unless its one of the windows covered either in net curtain (which prevents most of them getting in, not necessarily all, depends how bright the light is in the room) or an insect screen. Both of which you'd have to buy...
Answer: Well, if darkening your screen is not a option:

Take a cloth and pin that up in window. This can be achieved with tacks, tape or etc.
This is not a hack, but investing in other cooling options would be wise.
Having a fan facing the window also helps. As this gives the insects something to fly against and makes it harder for them to enter.
Comment: A window-mounted fan, while not very hacky, could cover all three of these!
Answer: I've had success in tricking flies into leaving a room by turning on a light in the hallway. You may be able to distract (a percentage of) the moths by installing a more moth-attractive light somewhere outside.
Answer: I spray around the window frames periodically with bug spray.  Does a good enough job for me ( a few hours in the evening watching TV with windows open)...a more permanent solution may be required for others!


How to find the exact time a tweet was tweeted

Question: So on the Twitter website, underneath the post there's a timestamp, but it's not very specific - it will just say something like Jul 10, or 11 hours ago or something like that.  Is there any way to find the EXACT time a tweet was posted?  Like to the second?  I want to avoid messing around with programming or dealing with the API if possible, but I've looked all over, and haven't been able to find anything.
Answer: It is not possible without getting down in HTML or using an extension that does what I am going to do. It was most likely formatted this way to be more friendly to the wider audience.
Right click the time link and inspect the source with an approriate browser.

You should see something similar to the following.

22 Jul

data-time has all the information you need. For example, you can use Wolfram Alpha to convert it.

Quicker ways include

using a JavaScript console and Date() (new Date(1311344201000);)
the show API method
Use another Twitter application and use ChrisF's method to rollover to see:
Comment: Does this method still work? When I tried on sample URL twitter.com/petermortensen/status/88211587667738625 (known to posted on 2011-07-05, within Unix time range 1309755600 - 1309928400) I could not locate anything resembling the expected Unix time in the HTML source.
Comment: @PeterMortensen Twitter decided to remove it for reasons that leave me staring at the wall with long blank stares. The only way now would be either via the API or a Third Party. Wrong move by Twitter imho.
Comment: @PeterMortensen I found it again. It's there.
Comment: jut search for data-time in the inspector
Answer: Hover over the "23 seconds ago" link. It will bring up a tooltip with the exact date and time it was posted.
However, this is only to the minute, not the second.
Comment: That just gives the time to the minute, not the second.  I'm pretty sure there's a way to do that though, I just don't remember.
Comment: @Shravas - oh, missed that in your question.
Answer: The methods in the other answers don't work anymore for more than minute precision, however there is a new-ish one: you can tweet

@tweet_stamp stamp

in a reply to the tweet whose timestamp you want, and this account will very quickly reply to you with a link to data including the timestamp. You can also just DM the link to it.
Comment: Works great 2021, ty!
Answer: You can view the timestamp down to the second by using the mobile version of the site.  (NB: You need to be logged-in to see it.)
https://twitter.com/markphillip/status/711966337078198273
https://mobile.twitter.com/markphillip/status/711966337078198273
Answer: Just hover the mouse over the time stamp "Jul 10" and it will create a dialogue bubble with the full time it was tweeted.
Answer: A convenient online service is now available which can convert both Twitter's "Snowflake" tweet ids and the pre-2010 ids to timestamps. Great for deleted tweets, especially pre-Snowflake ones:

TweetedAt: Find the date and time of a tweet

Read more at

TweetedAt: Finding Tweet Timestamps for Pre and Post Snowflake Tweet IDs


The Picard group of a semisimple algebraic group in positive characteristic

Question: Let $k$ be a field of positive characteristic and let $G$ be a connected semisimple algebraic group over $k$ with fundamental group $\mu$. Note that $\mu$ can be non-smooth. It is stated in Sansuc's 1981 Crelle paper Groupe de Brauer et arithmétique des groupes algébriques..., Lemma 6.9(iii), p.41, that ${\rm Pic}\, G=\mu^{*}(k)$ is the group of $k$-characters of $\mu$. Sansuc refers the reader to the Fossum-Iversen paper On Picard groups of algebraic fiber spaces, Proposition 4.6, for this. Now, it is not clear to me that the latter paper really works at the required level of generality. To confuse matters even more (for me), Raynaud, in his thesis (Lecture Notes in Math. 119), discusses in particular the canonical map  $\mu^{*}(k)\to {\rm Pic}\, G$ (Proposition VII.1.5, p.106). By examining Raynaud's proof, all I can see is that the latter map is an injection whose cokernel is a torsion group annihilated by some power of the characteristic of $k$. So, my question is: has it really been proved in the literature that Sansuc's statement  ${\rm Pic}\, G=\mu^{*}(k)$ is true in positive characteristic even when $\mu$ is not smooth?
Comment: For covariance reasons you're right about this terminology (and anyway, as you note, this has nothing to do with the real content in your question). Also, you are correct that section 4 of Fossum-Iversen does *not* operate at the correct level of generality (they are tacitly assuming in their proofs that the ground field is algebraically closed). For example, their Corollary 4.4 that Pic($G$) is finite for smooth connected affine $k$-groups $G$ is false in the 1-dimensional unipotent case over every imperfect field.  I'll check with someone I know who has done much work near this recently.
Comment: Minor comment: what you are calling "fundamental group" is not generally (or should not generally) go by that name; it is the finite etale Cartier dual $\mu^*$ that is called the fundamental group (with $\mu$ the kernel of the central isogeny from the simply connected central cover $\widetilde{G} \rightarrow G$).  For example ${\rm{PGL}}_n$ has fundamental group $\mathbf{Z}/n\mathbf{Z}$ (not $\mu_n$).
Comment: I was under the impression that the kernel of the central isogeny you allude to is what is usually called the fundamental group. Anyway, we can change names but the problem remains...
Comment: Many thanks nfdc23. I think it is important that we try to fill this apparent gap in the literature.
Answer: I'm not sure if there is really a literature gap, or maybe it is addressed in some reference that just hasn't come to mind. Anyway, let $G$ be a perfect smooth connected affine group over a field $k$, so $G_K$ has no nontrivial $K$-homomorphism to ${\rm{GL}}_1$ for any extension field $K/k$, and hence $K[G]^{\times} = K^{\times}$ by Rosenlicht's Unit Theorem. If $L'$ is a line bundle on ${\rm{Pic}}(G_{k'})$ for a finite Galois extension $k'/k$ such that the isomorphism class of $L'$ is ${\rm{Gal}}(k'/k)$-invariant, it therefore follows via Hilbert 90 that the isomorphisms to the Galois-twists can be arranged to satisfy the cocycle condition, so the natural map
$${\rm{Pic}}(G) \rightarrow {\rm{Pic}}(G_{k'})^{{\rm{Gal}}(k'/k)}$$
is surjective, and hence by passing to the direct limit on such $k'/k$ we see that the natural map
$${\rm{Pic}}(G) \rightarrow {\rm{Pic}}(G_{k_s})^{{\rm{Gal}}(k_s/k)}$$
is surjective.
But this latter map is also injective. Indeed, again by limit considerations it suffices to show if $L$ is a line bundle on $G$ such that $L_{k'}$ admits a nowhere-vanishing global section $s'$ over $G_{k'}$ for a finite Galois extension $k'/k$ then $L$ admits a nowhere-vanishing global section.  For each $\gamma \in {\rm{Gal}}(k'/k)$, the canonical $\gamma$-equivariant action on $L_{k'}(G_{k'}) = k' \otimes_k L(G)$ satisfies $\gamma(s') = c_{\gamma} s'$ for a unique $c_{\gamma} \in k'[G]^{\times} = {k'}^{\times}$, and $\gamma \mapsto c_{\gamma}$ is a 1-cocycle. Thus, by Hilbert 90 there exists $u' \in {k'}^{\times}$ such that $c_{\gamma} = \gamma(u')/u'$ for all $\gamma$, so $s'/u'$ is a nowhere-vanishing global section that is Galois-invariant and hence corresponds to a trivialization of $L$ over $G$.
Now assume $G$ is a connected semisimple $k$-group. Letting $\widetilde{G} \rightarrow G$ be the simply connected central cover over $k$, with central kernel denoted $\mu$, we have ${\rm{Pic}}(\widetilde{G}) = 1$ by the above injectivity applied to $\widetilde{G}$ because ${\rm{Pic}}(\widetilde{G}_{k_s})=1$.
To see this latter triviality, note that for any split connected reductive group $H$ over a field $F$, the "open cell" relative to a choice of split maximal $F$-torus and Borel $F$-subgroup containing it provides a dense open subscheme that is $F$-isomorphic to a direct product of copies of $\mathbf{A}^1_F$ and $\mathbf{A}^1_F - \{0\}$. Using such an open subscheme enables one to show that the group ${\rm{Pic}}(H)$ is identified with the group of central extensions $E$ of $H$ by ${\rm{GL}}_1$ as $F$-groups by adapting the proof of the Weil-Barsotti formula describing the dual abelian variety in terms of extensions by ${\rm{GL}}_1$ -- see section 4 in the paper "Local Properties of Algebraic Group Actions" by Knop, Kraft, Luna, and Vust for that argument (presented in the setting over algebraically closed fields, but via completely general methods that work for a split connected reductive group over any field). If the $F$-split $H$ is connected semisimple and simply connected then there are no such nontrivial extensions $E$ since necessarily $E$ is connected reductive and hence $\mathscr{D}(E) \rightarrow H$ is a central isogeny (so an isomorphism when $H$ is simply connected). This shows ${\rm{Pic}}(H)=1$ in such cases, so ${\rm{Pic}}(\widetilde{G}_{k_s})=1$ as claimed (and from the consequence ${\rm{Pic}}(\widetilde{G})=1$ we obtain the non-obvious fact that $k[\widetilde{G}]$ is a UFD).
The result VII 1.5 that you refer to in Raynaud's thesis provides an injective homomorphism $\mu^*(k_s) \rightarrow {\rm{Pic}}(G_{k_s})$ (this map assigns to any $k_s$-homomorphism $\chi:\mu_{k_s} \rightarrow {\rm{GL}}_1$ the $\chi$-pushout of the central extension $1 \rightarrow \mu_{k_s} \rightarrow \widetilde{G}_{k_s} \rightarrow G_{k_s} \rightarrow 1$), and it is Galois-equivariant by design. Hence, as long as this is an equality, which is purely a counting question (due to its injectivity), it follows by the preceding arguments that passage to ${\rm{Gal}}(k_s/k)$-invariants gives that the natural map $\mu^*(k) \rightarrow {\rm{Pic}}(G)$ is an equality. In this way, we see that the result asserted without proof in Remark VII 1.7(a) of Raynaud's thesis (basically the affirmative answer to the question posed in the split case) gives the desired result over $k_s$ and hence over $k$. This doesn't answer the question of providing a literature reference with a complete proof, but it "confirms" that a complete proof should have been known to experts in Paris since the 1960's.
Comment: Many thanks @nfdc23! It seems to me that there exists no published proof of the "triviality" that Pic of a connected, semisimple and simply-connected algebraic group over a separably closed field is zero. All the references I'm aware of address this problem over an algebraically closed field (Iversen, Popov, etc). So I think some version of your answer above ought to appear in print somewhere for ease of reference. Can I include it in one of my papers? (with due credit to you, of course)
Comment: For that triviality over a general field, I think it is fine to say "we give a proof due to lack of a convenient reference" and not go give anyone credit for it, since this has been known for a long time and I'm sure the argument has been rediscovered many times (I only tried to prove it after hearing the result from someone else who didn't know a reference).
Comment: Dear @nfdc23, very good! I'll include your proof in one of my papers and refer my readers to it as often as I need to. BTW, if you look into https://mathoverflow.net/questions/96987/, you'll see that quite a few people "know" the result is true over any field, but nobody can point to an adequate reference.
Comment: @CristianD.Gonzalez-Aviles: the discussion in that link looks entirely focused on the case of an alg. closed field aside from one comment by Jim Humphreys (and nobody else commenting there seems to be claiming to "know" that fact).  Anyway, this is all a moot issue now.


Two-way secure communication using two pairs of public/private keys?

Question: Let's say I want to create a protocol to securely communicate between two endpoints - each of the two endpoints know the other's public key and all data exchanged is encryted using one's public key and decrypted using the recipient's private key. My question is aside from man in the middle attack which can be avoid by using a PKI(?),  what other kinds of attack is this protocol vulnerable to? And how is it compared to SSL as we have removed the initial handshake step?
Comment: It will be much much slower compared to SSL.
Answer: This protocol is vulnerable to a replay attack.
In common notation
A -> I_B: {m}_PK(B)
I_A -> B: {m}_PK(B)
I_A -> B: {m}_PK(B)

If m was a message saying loan me $10 and B was a little naive ...
This protocol is also vulnerable to message reordering attacks e.g.
A -> I_B: {m}_PK(B)
A -> I_B: {m'}_PK(B)
I_A -> B: {m'}_PK(B)
I_A -> B: {m}_PK(B)

If we assume RSA, then if there is no padding then such a protocol would be weak to homomorphic encryption attacks.
Various other attacks are obvious but uninteresting (such as denial-of-service by the intruder blocking all messages, dictionary attacks letting the attacker verify a guess at the message, dictionary attacks letting the attacker detect repeat messages, message truncation attacks etc.)
Comment: SSL uses public key cryptography to exchange a secret session key and uses random numbers from both sides to prevent a replay attack. All further communication is encrypted with the session key. The communications under the session key are encrypted with a block cipher in some useful mode (usually GCM or CBC). This means that the decryption of each message depends on the previous message (or in counter mode the number of previous messages). Thus replay attacks give gibberish and dictionary attacks lack the proper key.
Comment: I can't see an obvious attack, but that doesn't mean there isn't one. The main reason people don't do this is public key cryptography is horribly slow. However it definitely won't be as secure as SSL, because SSL has been studied intensively and has fixed implementations that have been rigorously bug-checked. There are hundreds of subtle ways to leak information, timing attacks, power attacks (both active and passive), etc.
Comment: Thanks, but then how is it different with SSL?
Comment: let's say I decide to implement the same security on per-message basis in my protocol (with the use of timestamp, sequence number etc..), but instead of using a shared secret session key, I opt to use the recipient's public key to encrypt the message - by this I eliminate the need to do initial handshaking, if so then is my protocol as secure as SSL?
Comment: I see, thanks. I know that it definitely has flaws, I'm just curious what are they might be though. The only one I could think of was that if the private keys are exposed then all the previous communication between one endpoint with all the other would be cracked, SSL avoids this problem by using a unique key for every session.
Comment: As it so happens both systems fall to that problem. Because SSL is a key exchange protocol the session key is only protected by the master key. This means that if the master key is compromised all sessions can be read. The problems with unstudied protocols can be incredibly subtle and not related to the protocol at all. Look at [side channel attacks](http://en.wikipedia.org/wiki/Side_channel_attack). Formal model checking can help you find structural vulnerabilities. Look at Casper or BAN logic, or if you're feeling really ambitious go for Bigraphs.
Comment: If you just want to transfer messages then use s/mime or pgp or gpg. It's already built into off the shelf apps (e.g. mozilla since the late 90's IIRC) as well as all sorts of command line tools. More importantly, if you care about security, they have been well scrutinized for years by field experts and as such are more stable than something you are likely to cobble together. So better, faster, cheaper - rare that you get all three :)
Answer: A PKI is a system to allow safe distribution of public key. The certificates issued by the PKI allow the various systems to know each other's public keys with some strong level of guarantee that the keys are genuine. In your case, you already assume that each of your two endpoints knows the public key of the other endpoint, i.e. that the problem that which PKI strives to address has already been solved. No need for a PKI in your case, then.
This mutual knowledge of public keys can then be escalated into a two-way protected channel for data, but that's not an easy thing to do; you cannot evacuate it with a simple "we encrypt the data with the other system's public key"; as others have pointed out, this will suffer from replay attacks (at least). There are many details to worry about. A protocol where all these details have been painfully dealt with, along a course of two decades of breakage and fixes, is, indeed, SSL. So far, most people who thought they could do better have failed, sometimes hilariously, often spectacularly. SSL includes all kinds of features which keep track of individual data chunks ("records" in SSL parlance) and reliably detect external alterations, including reordered, dropped or duplicated packets; it also ensures verified termination (when the connection is closed by one machine, the other machine has some guarantee that this was indeed triggered by the other machine, not by an attacker inserting a fake RST packet).
Note that in SSL, the client and server send their public keys to each other as part of certificate chains. This supports the PKI model in which a client (respectively a server) learns a server public key (respectively a client public key) through certificate validation. However, nothing forces client and server to process the certificates in a pure X.509 PKI way. What matters is that the client (resp. the server) uses the correct public key of the server (resp. the client). If the client already knows the server key, then the client can simply use it in SSL and disregard whatever blob the server sent as certificate. Thus, SSL is not intrinsically tied to X.509 or to any other type of PKI.
Answer: In addition to the replay and ordering issues identified by jhoyla, there is no entity or message origin authentication in this protocol.
Any party with the public key of either peer can send arbitrary messages to the peer, and the peer has no way of authenticating their origin. Indeed, they could even fake a conversation between two peers, especially if they can block outbound messages from the participants or the details of the sequence number scheme you implemented allowed the attacker's messages to 'get in first'.
As it's a public key, you can fairly safely assume your attacker has access to it.


How to calculate Orbital Inclination knowing the launch azimuth and launch latitude?

Question: A new spaceport is proposed for Camden County, Georgia (USA). The latitude is 30.56N and the only available launch azimuth is 123 degrees.  What is the resulting LEO without mid-course maneuvers? Can show me how you calculate this?
Answer: It's just a matter of some spherical trig.
$$
\cos(inclination) = \cos(lat)*\sin(azimuth)
$$
So in your example, the inclination would be equal to:
$$
\arccos(\cos(30.56)*\sin(123)) = 43.77\deg
$$
To simplify the calculation, I assumed that your given azimuth was an inertial one.  The calculations that take into account the rotation of the Earth and what the compass onboard would measure as the azimuth are in the link above.
Comment: should be the accepted answer..
Answer: To amplify on the correct answer of @M.A.H.:
To apply this general spherical triangle (https://en.wikipedia.org/wiki/Solution_of_triangles) to the particular problem of orbital inclination:

Point $C$ is the geographical North Pole;  Point $B$ is the launch point, so the arc $C-B$ is the co-latitude of the launch point;  $A$ is the point where the orbit track crosses the equator, so the arc $C-A$ is $90^o$ and the orbital inclination is $\alpha$.  Once the launch azimuth is related to the angle $\beta$ (depending on the exact geometry) the triangle can be solved for $\alpha$, and also $\gamma$, the longitude of the ascending node of the orbit.
Comment: If my understanding of your description is correct, the orbital inclination in your diagram is 90 degrees, making this a polar orbit; even graphically, an orbit that passes directly over the poles will be a polar orbit. It would be nice to see how a non-polar orbit is mathematically related to the position B and the azimuth beta.
Comment: The arc A-B  (yellow) is the orbital track...
Answer: Orbital inclination will be equal to the latitude. The reason is simple - you just need that orbit plane will pass through the center of the Earth and your launch point
See explanation here: Of inclinations and azimuths
Comment: This is incorrect.  The only limitation on launch inclination is that you cannot launch directly into an inclination less than your latitude.  You can certainly launch into higher by changing your azimuth.
Comment: I understand from the referenced article that a due east azimuth would provide a 30.56 degree orbital inclination. But how does launching to a different azimuth, like 123 degrees for my example, change the OI?
Comment: You need to make your launch in the orbital plane - i.e. you can't launch with another azimuth
Comment: M.A.H., exactly as they do at Kennedy. From satobs.org: "Cape Canaveral is located at approximately 28.5 degrees North latitude.  Launch azimuth is constrained at the Cape between 35 and 120 degrees due to land mass overflight restrictions.  All launches from Cape Canaveral are therefore restricted in inclination between 28.5 and 59 degrees."  So what I don't understand is how the orbital inclination is calculated knowing the azimuth.
Comment: @stevew my apologies, "This is incorrect" was in response to this answer.  In my answer and the answer of DjohnM, I think we covered that calculation pretty well.  The cosine of the inclination is equal to the cosine of the latitude multiplied by the sin of the azimuth.


Is it possible to cultivate cheek epithelial cells in a non-CO2 incubator?

Question: CO2 is important for maintaining constant pH in cell culture. Unfortunately, I do not have access to such incubator and buying a new one is expensive. I found a cheap incubator online, but it doesn't support CO2. I'd like to ask if I can cultivate cheek epithelial cells in such incubator and if it won't negatively affect my cell culture. Another option is building a small CO2 generator inside the incubator. I made some calculations - I know how much CO2 I need to generate, how many grams and mL of solutions I need, moreover the build-up pressure is so small, it should not negatively affect the incubator.
Comment: Are you familiar with CO2-independent growth media? (I don't know anything about culture of that cell population specifically, though)
Comment: Thank you very much. I am not familiar with CO2-independent growth media, but I will take a look. I planned to buy a cheap DMEM from eBay. I hope, there are some inexpensive media you mentioned, or at least a method to convert DMEM to such medium.
Answer: L-15 media does not require a CO2 atmosphere and according to Sigma-Aldrich this media is suitable for primary explants of adult human tissues.
Comment: Please take the [tour] and then consult the help pages for additional advice on [Answer] effectively on this site and [edit] your post accordingly. ———  Answers are much more likely to receive a favorable response if you include some details and supporting references (primary literature is best, but at a minimum a link to a description of this media). Without that support, your answer is indistinguishable from opinion. This is a good example of how to [format references](https://biology.stackexchange.com/questions/59695/how-do-trees-communicate-in-the-wood-wide-web?rq=1). Thank you!


Validate a link to check a user login are not

Question: In a website by clicking a link, if the user login in that website ,the page redirects to another page otherwise it redirects to login page  how can we validate that page .can u give any solution for that.
Comment: Welcome to StackOverflow! Please show us what you have tried.
Comment: i have no idea how to so pls can u help me
Answer: you can done this with session. more detail about session : LINK
<?php
  if(isset($_SESSION['login'])) {
    header ("Location:dashboard.php");
  }
  else
  {
    header ("Location: login.php");
  }
?>

in this check if session is set then a user is login then redirect it to dashboard.php or if session is not set then it redirect to login.php page.
in login page set the session $_SESSION['login'] with 1 or 0 value. or also you can store a username .
Answer: In a website a user login is most of the time defined as a PHP-session. The answer for your question is to check if the session exists on the pages that need a login. If the session doesn't exist the user gets redirected to the login page
Example:
if(!isset($_SESSION['login']))
{
   header('location: login.php');
}
else
{
   //Do nothing because the user is logged in.
}