Is disabling padding integrity check in CBC implementations a good way of overcoming / mitigating padding oracle attack?

Question: Given that CBC mode has a padding oracle attack, would disabling the padding integrity check be a good way of overcoming the vulnerability (this may result in frustration among existing users with regard to troubleshooting initial vector mismatches, but this will at least not render the mode itself vulnerable)?
Comment: @RavindraHV CBC does have a uniqueness requirement: if you repeat an IV, you lose some confidentiality. CBC+HMAC is less fragile than GCM wrt IV uniqueness because HMAC doesn't require an IV at all, whereas GCM with a repeated IV badly breaks authenticity. CBC+HMAC is worse than GCM because GCM is perfectly fine if used right (no repeated nonce) whereas CBC+HMAC is very hard to get right at all. If you're worried about IV uniqueness, use a SIV mode (AES-SIV or AES-GCM-SIV); they are nonce-misuse-resistant at the cost of not being streaming modes (the whole message must fit into memory).
Comment: Why not Just MAC the ciphertext or use an AEAD mode?
Comment: Thanks. Think this is exactly what I was looking for. Was not aware of an already existing approach to [this](https://en.wikipedia.org/wiki/Authenticated_encryption#Encrypt-then-MAC). If you can post that as an answer then can accept same.
Comment: Also, encrypt-then-mac appears to be a different technique involving distinct hash and encryption keys. Guess I was also looking for a solution that uses the same key for encryption as well as integrity (on the lines of GCM but without the strict requirements on nonce).
Comment: @RavindraHV GCM is less strict about nonces than CBC! CBC requires a uniformly random nonce (not a counter, not something the adversary can influence…) that is not revealed until the whole input is committed (as opposed to, sending the nonce at the beginning of the message and allowing the adversary to embed some content into the message). All GCM needs is for the nonce to be unique.
Comment: @Gilles'SO-stopbeingevil' - The uniqueness requirement for `GCM` appears to be a more stringent and fragile a requirement than for `CBC`. If we use CBC along with a MAC scheme, its bound to be stronger than `GCM` is it not?
Answer: The problem
The problem with the CBC is the existence of the oracle that returns information about padding. It is called the padding oracle. If there is no padding, there is no padding oracle to use. And, if CBC is used to encrypt data at rest, then there is no padding oracle, too.
Is padding integrity?
Padding is not integrity, it is necessary for the encryption of a full block in CBC mode. There are block cipher modes of operation like CTR that don't require padding since they are streaming modes that even enable encrypting one bit.
IV mismatch during decryption
Keep in mind that, If the IV doesn't mismatch in the decryption of the CBC mode, only the first block is affected. The IV inconsistent users may only lose the first block. One can see this either considering that each block uses IV as the previous or by looking at the decryption
\begin{align}
P_1 =& D_k(C_1) \oplus IV\\
P_i =& D_k(C_i) \oplus C_{i-1},\;\; 1 < i < nb,
\end{align}
So, IV only affects the first block during the decryption ( or see it on the CBC bit flipping attack).
If we are talking about the IV is not same during the encryption, the recipient may first try with their IV and if they see garbage then removes the first block and accept it IV and decrypt. This can be problematic since this is also an attack point where an active attacker can remove the initial blocks on their behalf. Integrity is the key here.
Padding oracle is a decryption oracle
The padding oracle attack, on the other hand, step by step decrypts each block with the help of the oracle. That is why it is dangerous.
Mitigation
CBC mode is removed from TLS as of TLS 1.3. In TLS 1.3 all cipher suites are Authenticated encryption modes like AES-GCM and ChaCha20-Poly1305 and all modes don't require padding since they are based on the CTR mode.
It is better to use either the modern cipher suites. Keep in mind that one has to be careful to use each one like never let (IV,key) pair used again. AES-GCM-SIV is the mode to mitigate this problem.
If you have to stick to CBC use the Enc-then-MAC fashion so that when the adversary modifies the block the MAC will notice the change and the server will only return the MAC error-tag. This is due to the fact that MAC is calculated on the ciphertext. You should use HMAC as your MAC since HMAC is the beast.
Using a single key for Enc and MAC
We don't prefer to use the same key for encryption and integrity. We learned that is dangerous from CBC-MAC. It can be, however, derived from the encryption key like GCM mode derives GHASH key with encryption a full zero block $H = CIPH_K(0^{128})$ (NIST 800-38d page 14). ChaCha20-Poly1305 had a similar way to generate the authenticator key.
A common method is deriving multiple keys and IVs using the HKDF and if your key is generated uniformly randomly then Expand of HKDF is enough to derive them.
Comment: Forget CBC, it is an archaic work, CBC can only have Ind-CPA. Use authenticated mode like AES-GCM or Chacha20-Poly1305. They will provide you with confidentiality, integrity, and authentication in a bundle. I prefer xChaCa20-Poly1305 since it has 192-bit IVs that is safe from IV collision under the same key.
Comment: Had not delved into cbc-mac. Ended up doing that. Thanks!
Comment: My impression is (still) that it is better to patch `CBC` than end up worrying about the uniqueness of the nonce as is required for `GCM` in the long run, although in the comments above, [Gilles](https://crypto.stackexchange.com/users/214) has indicated on the contrary.
Answer: TL,DR: No. Use proper authenticated encryption, for example with a block cipher in GCM or CCM mode.
The principle of an oracle attack on a cipher is that the adversary has a ciphertext that they want to decrypt. The adversary makes some modification to the ciphertext, makes a plausible hypothesis about the corresponding plaintext, arranges for this modified ciphertext to be decrypted, and finds out whether the hypothesis was correct. The adversary then tries again with a different hypothesis.
An example of a plausible hypothesis is "maybe the last byte is this value". It's plausible because a random plaintext has a 1/256 chance of matching it, so it takes less than 256 attempts to find out the value of the last byte. An example of an implausible hypothesis would be "maybe the last block is exactly this particular string": it would take $2^{256}-1$ attempts to find the content of a block by repeating attempts of this form.
A padding oracle attack is an oracle attack where the information comes from knowledge of the padding. The system may leak this because it returns an "invalid padding" error, or because it treats valid and invalid padding differently so there's a timing difference between the two. Padding oracles may work regardless of the plaintext, although some like Lucky Thirteen leverage partial knowledge about the plaintext.
Padding validity may be a convenient component an oracle, but it's not the only one. The application that processes the decrypted data may have its own reaction to specially-crafted plaintexts which allows constructing oracles. To give a trivial example, consider two systems:

System 1 uses CBC to encrypt arbitrary-length messages, with PKCS#7 padding.
System 2 uses CBC to encrypt messages whose length is a multiple of 16. The application that generates the messages starts from arbitrary-length messages and applies PKCS#7 padding to them.

Those systems are exactly equivalent, but system 2 doesn't involve padding in the cryptography subsystem. So you could say a padding oracle attack on system 1 is an application data oracle on system 2 — moving the padding around didn't change anything.
To give another less trivial example, POODLE is a padding oracle against SSL 3.0. Even systems that don't check the padding as such are vulnerable, because the exact length of the message depends on the encrypted content, and determining the length is itself an oracle. (Arguably it can be considered a partial-padding oracle.)
There are three components in an oracle attack, and removing any of the three will defeat the attack.

The adversary must be able to inject specially crafted ciphertexts.
The system's response to different ciphertexts must have some observable difference, for example whether it returns an error message, whether it performs some follow-up action, the timing of the processing, etc.
The adversary must be able construct ciphertexts with a plausible hypothesis about the corresponding plaintext. Typically the attack is iterated: the adversary only learns a bit of information at a time, and uses each attempt to refine their knowledge of the system.

The first property is part of the security model. Either the adversary is active or passive. Oracle attacks require an active adversary. An example of a system where the adversary is purely passive is communication happening over a physically secure medium, where the adversary can observe the data through side channels such as electromagnetic radiations, but cannot send their own data. Another example is storage where the only threat is the theft of the storage media, and the system will never process tainted ciphertexts. If your threat model only has passive adversary, you don't need to worry about oracle attacks and you can use CBC.
The second property depends on the application, but it's practically impossible for it not to be true. Unless your application just discards the messages it receives, it's surely going to do something with them. And as soon as it does something that's externally visible, you've lost. So there's no hope there.
The third property depends on the construction of the cipher, on the data format, and on how the application processes the data. It's not a given that an oracle exists — but it's very hard to be sure that there's no oracle. It took years for Lucky Thirteen to be discovered, for example, and it relies on the fact that the TLS message header, which is 13 bytes long (hence the name), is just a bit shorter than an encryption block, but it's a devastating attack against efficiently implemented CBC in TLS. If padding isn't the problem, some other aspect of the data processing may be the problem.
A surefire way to invalidate the third property is to make it impossible to make plausible hypotheses about the plaintext by authenticating it. If the first thing the system does upon receiving a message is to check its authenticity, then the system's reponse is either "this message is authentic (and possibly further information)" or "this message is forged". As long as the adversary can't break the authentication, the system's response will (with overwhelming probability) be "this message is forged" unless the message is one that the adversary intercepted from a valid sender. So the adversary won't be able to learn anything.
Thus, if your threat model includes active attackers, you need to authenticate your messages. You can do that by taking a MAC of the ciphertext and sending it along. This is an "encrypt-then-MAC" construction, and it avoids padding oracle attacks. In contrast, the POODLE and Lucky Thirteen attacks are possible because SSL/TLS uses a "MAC-then-encrypt" construction and the MAC protects the application data (so there can't be oracle attacks against the application behavior) but not the padding (allowing oracles on what looks like the padding). Should we MAC-then-encrypt or encrypt-then-MAC? discusses the relative benefits of the two approaches, and notes that both have pitfalls.
To avoid those pitfalls, don't roll your own combination of encryption and authentication. Use a standard authenticated encryption algorithm. Let the algorithm designer worry about how to set up keys, in what order to do things, etc.
Comment: I guess the second point regarding the system revealing `some observable difference` would answer the question to the point. So will set this as the answer. Thanks!
Comment: PS: Rolling out one's own crypto is a tempting thought and actually have set out doing it. Never the less having established alternatives will always help save the day until its published and vetted (and patched if or as required).


Do I have to collect my checked luggage when transiting through Sao Paulo?

Question: Im looking to fly from Newark to Brazil on United airlines and then Brazil to Argentina on an Brazilian airline called Gol. Im worried that I may have to collect my bags in Brazil and then check them in with Gol...all of this in a one hour time period (layover time). Is this something that I have to do or will United make the transition for me since I booked the flight ticket all the way to Argentina and not on separate tickets?
Comment: As São Paulo is your entry point in Brazil, you will need to get your bags and check them it again.
Comment: @MarcelP. This is only correct if she has another flight within Brazil.
Answer: If you only have an international connection in Brazil (e.g. Newark-Sao Paulo-Buenos Aires), you do not need to fetch your bags or go through immigration.
If you have a connecting flight within Brazil (e.g. Newark-Sao Paulo-Rio de Janeiro-Buenos Aires), you do need to fetch your bags, go through immigration & customs, and check your bags again.


Does Blender have different languages (language as in speech language as english, not computer language as python)?

Question: Sometimes it's more convenient for me to use Blender in another language. Does Blender have different languages (language as in speech language as english, not computer language as python)?
Answer: Yes you can change the default interface language in blender.
To do so open the User preferences, go to the system tab, on the bottom right of the screen there is a checkbox that says "International Fonts" check it then select one of the translations then choose to apply it to "Interface" or "Tooltips" or both.
Comment: Also note that not everything has been translated, some languages more than others. If the language you use is not complete or is non-existant, you might want to consider [contributing](https://wiki.blender.org/index.php/Dev:Doc/Process/Translate_Blender).
Answer: In Blender 2.8x to 2.9x the language/translation preferences can be found in Edit > Preferences > Interface > Translation.
The translation can be selectively applied to different parts of the UI as explained in the manual:

Tooltips
Translates the descriptions when hovering over UI elements.
Interface
Translates all labels in menus, buttons, and panels.
New Data
Translates the names of new data-blocks.


ShapeFile or feature class to json

Question: Is there any online or desktop based tool that can convert shapefile or feature class to json and not Geojson.Is there any tool in arcgis desktop to convert shapefile or featureclass into json.
Comment: My understanding is that GeoJSON is just a subset of JSON (for example, see http://stackoverflow.com/questions/5618726/convert-json-to-geojson) so can you elaborate on what flavour of JSON you are wanting to write spatial features to instead of GeoJSON, please?
Comment: I just want construct the feature collection then feature layer out of it in arcgis javascript Api.
Answer: ArcGIS's JSON is specific to ArcGIS server. Still you have a few options:

If you can get access to ArcGIS server, publish a map service with your data as a feature service. You can then query the REST end point, and get it is JSON format.
ArcGIS Online has a 30 day trial. You can do something similar there. (I am guessing here. I personally have not used ArcGIS online so far.)
Convert your shape file to geoJSON. Convert that to ArcGIS JSON, as explained in this question. You could also look at this ticket on OpenLayers, on how it can be done in Javascript.
Comment: I think this is not the solution as Arcgis server is itself heavy application and needs Geodatabse.
Comment: If you want the answer to be a lightweight software that does this for you, you'll have to write one yourself. Currently excluding ArcGIS Server no COTS or OSS does this for you in one step.
Comment: Thanks for the prompt reply @Devdatta Tengshe I got how to do it.
Comment: @Gunner If my question has helped you, please mark it as accepted. Otherwise if you have found a better way, please consider sharing it, so as to help others in the future.
Answer: Well Open Source tools like Postgis, Postgresql and Mapserver with gdal can be used todo those kind of convertions but they are out of ArcGis.
If you known about the argis programming language, it is called AVL I guess( I not an arcgis user ) you could write a procedure to do that. But going out of GeoJSON would be strange since a JSON without Geo could not be rendered, that is why it is called GeoJSON. I guess you want a simple feature attribute translation.
Comment: AVL? Do you mean Avenue? Or Arc Macro Language? Also OP was talking of ArcGIS Server's JSON format, which is quite different from GeoJSON, but nonetheless contains Geographic locations.
Comment: I guess you write on language name avenue.

ShapeFile or feature class to json


Adobe Photoshop | Move a selection without altering marquee

Question: First off, I'm not sure if this is even possible but considering how long Photoshop has been around and how "powerful" it is, I don't see why I can't. I'm trying to edit sprite sheets with graphics that have lots of transparency on them. I want to move a selection without having the marquee crop itself around image. So for example, if I have a 10x10 pixel image and I select it with a 20x20 pixel marquee, I want to move that selection as the 20*20 box. However, photoshop will automatically crop the selection to 10x10 where pixels/image is present. I need to move the selection as a selection, "empty" pixels and all. How can I do this? Is it even possible?
Comment: I don't need to transform the selection. I can do that fairly easily. I need to move the selection, with pixels selected, as a whole instead of when I hit nudge or try to move via the mouse, having the selection crop itself to only where pixels are present. Again, I need to select something, with transparency, and move that entire selection as I originally selected it, not as photoshop wants to redefine said selection based on where pixels are or are not.
Comment: So you *want* both pixels *and* any transparency to actually be part of the selection. Is that correct?
Answer: With an active selection, choose Select > Transform Selection.
This will allow you to move, or otherwise transform, the selection without it referencing any underling pixels. In other words, it won't auto-clip to any pixels if you move it via the Transform Selection command.
I actually added a keyboard shortcut for the menu item via Edit > Keyboard Shortcuts because I use it so frequently.
Answer: So, you are not going to move only the selection. Your selected area contains some transparent pixels and also some opaque pixels. You want to move at the same time the selection marquee and all pixels - transparent or not - inside it. Especially you want to keep the dimensions of the selection intact, it only moves along the moved pixels.
Have a dummy layer. After making your selection marquee fill the selection in the dummy layer. Select in the layers panel at the same time the actual content layer and the dummy layer. Now you can move the content, filled dummy and the selection at the same time without losing the dimensions of the selection.
I guess you already know that anti-aliasing must be turned off in all tools when making pixel art.
Comment: I think I tried that earlier but was unable to get the "dummy" layer to work or something. I have preset patterns so that I can make grids so I just made a grid and set the marquee tool to select by size, now I can select things and move them a specific number of pixels based on where they were on the grid.

I would've upvoted your answer because it is what I asked, but I cant. Thanks for the help!


replacing \n with \r\n in a large text file

Question: I have a large text file with a lot of \n that I need to replace with \r\n. With small text files, I was using the ReadToEnd method to get the file as a string and then use the Replace method and then write the string to a file. With a big file, however, I get an OutOfMemory exception because the string is too big. Any help would be greatly appreciated. Thanks.
Comment: Do you need the resulting file in memory, or back on disk?
Answer: private void foo() {
      StreamReader reader = new StreamReader(@"D:\InputFile.txt");
      StreamWriter writer = new StreamWriter(@"D:\OutputFile.txt");
      string currentLine;

      while (!reader.EndOfStream) {
        currentLine = reader.ReadLine();
        writer.Write(currentLine + "\r\n");
      }
      reader.Close();
      writer.Close();
    }

This should resolve your problem. Please note, that reader.ReadLine() cuts of the trailing "\n".
Answer: DiableNoir's solution is the right idea, but the implementation is buggy and it needs some explanation. Here's an improved one:
using (var reader = new StreamReader(@"D:\InputFile.txt"))
using (var writer = new StreamWriter(@"D:\OutputFile.txt")) // or any other TextWriter
{
    while (!reader.EndOfStream) {
        var currentLine = reader.ReadLine();
        writer.Write(currentLine + "\r\n");
    }
}

You use a TextReader for input and a TextWriter for output (this one might direct to a file or to an in-memory string). reader.ReadLine will not return the line ending as part of the line, so you need to write it explicitly (instead of using string.Replace, which will not accomplish anything at all).
Also, exactly because you will never see \n or \r as part of currentLine, this program is safe to run again on the output it has produced (in this case its output will be exactly identical to its input). This would not be the case if currentLine included the line ending, because it would change \n to \r\n the first time, and then make it \r\r\n the second time, etc.
Answer: You could use Read and specify how many bytes to read each time. Such as read the file in 10 MB chunks.
Answer: Or if you need like a larger buffer you can use StreamReader.ReadBlock();


Is phys.org/space-news reliable source?

Question: I found this page: http://phys.org/space-news/ . It seems to me pretty good page with interesting news and so on and I like that it is free. But I noticed in comments people arguing about the validity of the information and so on. Are they just "trolls" or is this page really bad source of information, if that is so, how much can I trust it?
Thanks in advance!
Comment: I checked out a couple of stories - it looks ok as a source of news. Good that it publishes abstracts and gives links to actual peer-reviewed papers.
Comment: I've been reading and appreciating phys.org for years, and it's always rung true whenever it's discussing something I'm already familiar with. And of course almost all articles link to the actual peer-reviewed papers they discuss, except when they link to preprints in arXiv which are usually in the process of peer-review. In most if not all cases they also do their own "peer review" by quoting other established researchers in the same field who are not associated w/ work. After all these years I never knew there were comment sections. Had I known I certainly would not have payed any attention
Comment: ...to them. Certainly some will be trolls, many more just bored people who like to "well, what I think is..." everything they encounter on the internet. Perhaps there are a few, but don't waste your time. Instead, go read the actual papers cited in the phys.org article, and if you don't understand something, use it to start a Stack Exchange question. See [uhoh's use of phys.org](https://astronomy.stackexchange.com/search?q=user%3A7982+%22phys.org%22) and [phys.org's](https://astronomy.stackexchange.com/search?q=user%3A7982+%22phys.org%27s%22)
Answer: I've been reading phys.org for years.
It's right up there with physics.aps
and physicsworld.
All good sources that provide decent refs.
Comments are often where people who like to argue, argue. Sometimes they are useful, often not.
Answer: The problem with phys.org is that it mostly just reprints press releases from universities and other research institutions, rather than doing actual journalism. (You can tell by checking the byline; if it says something like "By Santa Fe Institute", then it's a press release.)
Proper science journalism involves, at a minimum, checking with other scientists in the field who are not affiliated with the study being reported, to provide some context beyond the sort of study-author and institutional hype that press releases tend to feature.
Comment: @uhoh Ok, I looked at the first 39 stories on their front page (skipping the "Corporate Sponsor" pieces). There were 4 actual articles by Phys.org staff, 4 reprints from other sources (The Conversation, LA Times, Denver Post) — and 31 press releases. That's about 80% press releases.
Comment: The first 20 articles on the "Astronomy & Space" sub-page include 2 by Phys.org staff, 9 from other sources (AP, Orlando Sentinal, etc.), and 9 press releases. (A lot of the "other sources" articles relate to the launch industry.) For the "Physics" sub-page, it's 1 article by Phys.org and 19 press releases. For "Chemistry", it's (again) 1 by Phys.org and 19 press releases.
Comment: Actually, phys.org's articles *frequently* quote experts who are not authors nor associated with the research published. I think if you go there now and click through several articles you'll see that they generally do indeed meet your standard for "actual journalism".
Comment: Were these about Astronomy, Physics and similar hard sciences?
Comment: I've added an answer about the "Space News" section, which is what the question asks about. I'll go look at Physics now. I'm curious have you found anything at all that you think is in any way *less than reliable* information? I think you are trying to suggest that if something is not "proper science journalism" that that makes it less reliable. Yes, a university press-release about a recent Phys Rev Letter can have errors in it, all written material can contain errors, even peer-reviewed. But I am pretty certain these will be few and far-between, and since they link to the source material...
Comment: - which is what we really should be reading for accurate information in the first place - I think there is nothing wrong with considering a **carefully c8rateed** set of news items to make us aware of them. We can also turn to longer journalistic articles, or the primary sources (the papers themselves) if we want more, but few of us have the bandwidth to do that several times a day.
Answer:
Is phys.org/space-news reliable source?

Yes.

...in comments people arguing about the validity of the information...

Well the question does not quote any of those arguing comments, so we can't investigate any specific claim, but comments from non-science and anti-science people, and cranks, trolls and conspiracy theorists are an uncountable noun, like muddy water.
I've looked through the most recent 20 articles in phys.org/space-news, and didn't see any comments that seriously called the article's facts into question.
What I see is that (as has been my experience over the last 10 years) the articles strive to be fact-driven and well-sourced. They do accumulate news from other news outlets by letting those journalists publish in this collection (e.g. look for authors like "Universe Today" and "NASA" and "ESO" below)
I also notice that almost all articles draw from arXiv preprints or journal articles or other authoritative source. Even when YouTube videos are included, they are from well-recognized sources.
For the speed, comprehensiveness and breadth of the news covered in phys.org/space-news the information is as reliable as you are going to get, and if you find what you think is a credible comment that some information is wrong ask about it in a new Stack Exchange question!

Feb 20, 2024 New ultra-short-period exoplanet discoveredNew ultra-short-period exoplanet discovered by "Tomasz Nowakowski, Phys.org" links to arXiv preprint Ultra-Short-Period Planet Possibly Clinging to a High-Mean-Molecular-Weight Atmosphere After the First Gyr
Feb 19, 2024 Brightest and fastest-growing: Astronomers identify record-breaking quasar by "ESO" links to Nature Astronomy The accretion of a solar mass per day by a 17-billion solar mass black hole and to two ESO YouTube videos
Feb 19, 2024 There's one last place Planet Nine could be hiding by "Laurence Tognetti, Universe Today" links to arXiv preprint A Pan-STARRS1 Search for Planet Nine and to a TED talk video by Caltech astronomer and lead author.
Feb 19, 2024 Rocket propellant tanks for NASA's Artemis III mission take shape by "Lee Mohon, NASA" links to a YouTube video by "NASA's Marshall Space Flight Center".
Feb 19, 2024 NASA vows to battle 'organizational silence' as problems arise amid Artemis delays by "Richard Tribou, Orlando Sentinel" and sources members of "a panel held Jan. 31 at the SpaceCom conference at the Orange County Convention Center."
Feb 19, 2024 New or retooled Cape Canaveral launch pads considered for SpaceX Starship by "by Richard Tribou, Orlando Sentinel" and links to spaceforcestarshipeis.com a US Air Force website
Feb 19, 2024 Subglacial microbial life on Earth and beyond by " American Society for Microbiology" and links to an article in Science A Contemporary Microbially Maintained Subglacial Ferrous "Ocean" and the American Society for Microbiology's  How Extremophiles Push the Limits of Life
Feb 19, 2024 Pandora's Cluster explored by researchers by "by Tomasz Nowakowski , Phys.org" links to the arXiv preprint An improved Magellan weak lensing analysis of the galaxy cluster Abell 2744
Feb 19, 2024 Japanese space debris inspection probe launched by "Editors' notes" sources ESA and Astroscale
Feb 19, 2024 Mars samples project looms large in final spending talks by "Aidan Quigley, CQ-Roll Call" quotes US Senate Commerce-Justice-Science Appropriations Chair Jeanne Shaheen, D-N. and Rep. Judy Chu, D-Calif, whose district includes the Jet Propulsion Laboratory and the California Institute of Technology, and Mike Garcia and  a Commerce-Justice-Science Appropriations Subcommittee member.
Feb 17, 2024 Image: Hubble views a massive star forming by "NASA" sources the NASA.gov article.
Feb 17, 2024 Newborn gas planets may be surprisingly flat, says new research by "Dimitris Stamatellos, The Conversation" links to the Astronomhy and Astrophysics paper The 3D structure of disc-instability protoplanets
Feb 16, 2024 Another clue into the true nature of fast radio bursts by "Brian Koberlein, Universe Today" links to the arXiv preprint Rapid spin changes around a magnetar fast radio burst
Feb 16, 2024 NASA's final tally shows spacecraft returned double the amount of asteroid rubble by "Marcia Dunn" seems unsourced
Feb 16, 2024 Aurora borealis dynamics suggest the polar vortex is breaking up again by "University of Oulu" links to Scientific Reports Electricity consumption in Finland influenced by climate effects of energetic particle precipitation
Feb 16, 2024 Ground-based lasers could accelerate spacecraft to other stars by "Matt Williams, Universe Today" links to Laser-Sustained Plasma for Deep Space Propulsion: Initial LTP Thruster Results and Design of a rapid transit to Mars mission using laser-thermal propulsion
Feb X, 2024 Martians wanted: Apply here now for NASA's simulated yearlong Mars mission by "Roxana Bardan, NASA" is sourced to NASA
Feb X, 2024 Lab study creates artificial magnetosphere to explore spontaneous excitation of chorus emissions by "National Institutes of Natural Sciences" and links to Nature Communications Experimental study on chorus emission in an artificial magnetosphere
Feb 16, 2024 Even if we can't see the first stars, we could detect their impact on the first galaxies by "Evan Gough, Universe Today" links to the arXiv preprint How Population III Supernovae Determined the Properties of the First Galaxies
Feb 16, 2024 NASA experiment sheds light on highly charged moon dust by "Elyna N. Niles-Carnes, NASA" is source to NASA.
Answer: Because of the .org, you probably can trust it, because it's an organization. Remember, anyone can write a comment.
Comment: anyone can make an organization too, but it takes a little more effort
Comment: *Welcome to Stack Exchange!* This is a very good point and I was going to find a place to make it until I saw that you have already. Personally, I almost never, ever pay any attention to comments outside of Stack Exchange comments. However, what you've written here, "... you probably can trust it, because it's an organization." while also a good Stack Exchange comment, does not rise to the level of a proper Stack Exchange answer post. Can you add some more information to support your assertion?
Comment: Anyone can purchase a .org domain. It's no harder than .com.

Is phys.org/space-news reliable source?


Are there any methods of determining if four specified points lie on a circle other than by Ptolemy's Theorem?

Question: The idea is to avoid having to deal with numerical precision issues when evaluating whether Ptolemy's relationship holds, in a program.
For example, in determining whether three points lie on a line, one can form a reduced matrix from the data points and simply determine its rank, thus avoiding any issues of numerical precision.
Answer: I'm not a geometer, but I think you could try the following:
Let ${(x_{i}, y_{i})}_{i=1}^{4}$ be your 4 points, then we can see that for some fixed center $(p,q)$ and radius $r$ each point must satisfy $(x-p)^2 + (y-q)^2 -r =0$ now as we have 4 points we can consider the 4 functions in $p,q,r$ defined by evaluating all 4 points in the rhs of the last equation. Now consider a sum of squares of those 4 functions and minimise it using some numerical optimization algorithm (or by hand), then if a minimizer $p,q,r$ is such that the objective function is zero then we found such a circle. If not, then it doesn't exist.
Answer: Four points $ABCD$ lie on a circle (in that order) if and only if $\angle ACB=\angle ADB$, that is if:
$$
{(C-A)\cdot(C-B)\over|C-A|\ |C-B|}={(D-A)\cdot(D-B)\over|D-A|\ |D-B|}.
$$
Answer: For the four points to be on the same circle the point where perpendicular bisector of one pair of points meet the perpendicular bisector of the other pair should be equi-distance from all four points. We may check it algebraically if coordinates are given.
Answer: Attempt:
Geometrically:
Let points $A,B,C$ and $D$ be given.
$A,B,C$, and $D$ lie on a circle $\iff$
The perpendical bisectors of $\overline{AB}$, $\overline {BC}$, and $\overline {CD}$ intersect in one point.


Postal codes and city districts worldwide for download

Question: I am searching a database of all zipcodes / postal codes and the city districts (part of the cities) in the world. Is there some service like the GeoNames database? I spoke with GeoNames, but they don't have the relation between the zipcodes and the districts in their data.
Comment: It seems to me that the concept of "city districts" is far from standard enough for a global database. For example, the city of Chicago can be divided into wards (political boundaries), community areas (social/demographic boundaries), and neighborhoods (popular boundaries). Which would you want?
Answer: GeoNames does indeed provide the relationship between parts of cities and their postal codes. A few examples:

Parts of London with the postal code EC1
Postal codes of districts in Austria called Innere Stadt (Inner City)

You can either use GeoNames' Postal Codes Lookup Tool, or you can download the database dumps in text format for many countries.
The data is licensed under Creative Commons Attribution 3.0.
Comment: Dear Patrick, GeoNames has only the relation between zip code and city, but not the parts of the cities. Even their premium service has not this feature. I have already spoke with them. Here an example to see it: http://www.geonames.org/postalcode-search.html?q=50670&country=DE - it should come the district of Cologne and not only Cologne as city.
Answer: The GADM database of Global Administrative Areas could be a good place to start.
Answer: If you saw a map of for example districts, and zipcodes, you would notice that they are more likely than not to have different borders.
For example my city shares a zipcode with another town (same county).
It shares a school district with a completely different town, in a different county.
The high school also hosts some classes for another town, that is in yet another county (mostly).
All three of those other towns are about the same distance away from my city, in almost completely opposite directions.
There was also an occurrence where a bunch of houses were in two school districts at the same time, in a nearby city.
( I know you weren't asking about school districts, but they are similar enough to hopefully get the point across )

So the problem you are facing is that the two pieces of data have almost no relation to one another.
The boundaries were most likely created by different governing bodies, at different times, who had different ideas about where to draw an arbitrary line.
You may get some overlap of lines, at a river for example, but such obvious places to put a line will be few and far between.
The best that you could do is find a high correlation between a set of places' districts, and their zipcodes. Also note that both can change over time.
Another option would be to get the coordinates of the boundaries, and figure it out that way.
There will however never be a definitive correlation.
Comment: Zip codes are even more complex, as there can be overlap -- zip codes are assigned to postal routes, and  in some areas, you might have two routes overlap.  (one carrier's handling east/west streets, the other north/south ... but this tends to be rural roads where it's miles between turns)


What to do if a company goes bankrupt after I short the stock

Question: If I short a stock and then the company goes bankrupt, what obligation do I have to fulfill to my broker? I can no longer buy the stock back because the stock (i.e. the company) no longer exists, so what can I do?
By bankruptcy, I mean something like Lehmann brothers that does not exist any more.
Comment: Yes, shares are not publicly traded any more, that is what i meant
Answer: When you take on a short position you have "borrowed" those shares to sell on the market. To counter that position you would buy back those shares but if the company you shorted is no longer listed then those shares would be significantly devalued. (In many cases this means that the shares no longer have any value at all.) This essentially means you do not own any obligations.
Comment: "no longer listed" does not equate with "worthless".
Comment: True. I was generalizing for the purpose of answering the question but to clarify "no longer listed" does not always mean worthless.
Answer: For some reasons you don't have to worry about buying to cover shares.
This is because when you short, you are borrowing from a stockholder and paying an interest rate to the stockholder. This interest rate is also based on the demand, if shares are hard to borrow yet there are people that want to short, then interest rates can be higher. When a company goes bankrupt, their shares aren't even worth charging an interest rate for. And you can borrow forever if you aren't paying dividends and interest, bankrupt companies are not paying dividends.
Basically, you don't have to give it back.
There generally is not a giant short squeeze in the pink sheets market of a bankrupt company.
Answer: When you short you are borrowing shares and are charged for doing so.  If a company files bankruptcy you will be paying  interest on those shares till the courts decide what happens.  Say you have a position of 10 000 value of shares short. You may be paying 5.5 percent yearly rate  of but  compounded daily.  A three or four year wait time for the courts to decide may prove to be costly on the amount you pay for borrowing those shares.
Comment: Welcome to Money.SE. Do you have any reference to support this? If true, I'd imagine we'd have heard of this issue, at least those of us who obsessively reading multiple professional journals on finance and investing.


Can we reverse engineer binlog with row format to make MySQL AES_ENCRYPT visible?

Question: Suppose if I am using the mysql database based encryption using AES_ENCRYPT function & insert records, is it possible to decode the row formatted binlogs generated by MySQL to obtain the actual statements consisting of AES_ENCRYPT?
Comment: Function AES_ENCRYPT() in MySQL is insecure because it operates in ECB block mode. Furthermore, it doesn't assure authenticity.
Answer: There is a description of what MySQL does here. It takes the key almost as is and applies AES in ECB mode, which is weak since it leaks which blocks are identical to each other in data encrypted with a given key. You should not assume that data which was encrypted with MySQL's AES_ENCRYPT() is really "secure".
That being said, whether your key and data will make it to the binary log depends on how it was configured. If using statement-based formatting, then the binary log will contain the SQL statements which were issued (at least those which entail modifications), and your data and key may be revealed that way. If you use row-based formatting, then the log contains the results (alterations to actual rows), and your cleartext data and key won't appear in the log. See this question for pointers.
Comment: I too agree its not secure & I know about row-based formatting. My question is can we reverse engineer the row-formatted binary logs to extract the data out. for e.g. as mentioned in http://www.mysqlperformanceblog.com/2010/05/06/debugging-problems-with-row-based-replication/


Mapbox iOS Mutable RMPolylineAnnotation

Question: I am wishing to use the RMPolylineAnnotation object to draw a path behind the user, I have this working presently, but I am currently creating a new RMPolylineAnnotation in didUpdateUserLocation, and this seems to cause issues with lag and jaggyness. It also does not seem to show the users' path when travelling in a downward direction on the map.
Here is the code in my didUpdateUserLocation Method:
<code>CLLocation *location = [[CLLocation alloc] initWithLatitude:[[[mapView userLocation] location] coordinate].latitude longitude:[[[mapView userLocation] location] coordinate].longitude];
    [locations addObject:location];

path = [[RMPolylineAnnotation alloc] initWithMapView:mapView points:locations];
[mapView addAnnotation:path];
</code>
Does anyone know of a better way to create this path, and avoid the lag and jaggedness?
Answer: Are you removing the old annotation(s) each time you do this? That could be affecting performance.

Mapbox iOS Mutable RMPolylineAnnotation


RealmDb : Clean architecture in Android

Question: I am evaluating RealmDb, I feel RealmDb is tightly coupled with model layer. Which makes me feel if tomorrow I need to replace with some other local database than it will be a huge refactoring effort.
My question is how to achieve clean architecture with RealmDB? Any examples I can follow?
Answer: Realm just makes it easier to re-use your database models as your view models if you want. But there is nothing stopping you having data layer entities and view layer entities and then doing the mapping on the boundaries.
E.g.
<code>// Data layer
public class FooEntity extends RealmObject {

  // Realm fields and methods...

  public static FooEntity fromViewModel(FooViewModel viewModel) {
    // Convert to entity
  }

  public static FooViewModel toViewModel(FooEntity entity) {
    // Convert to view model
  }

}

// View layer
public class FooViewModel {
  // Standard POJO used by the View layer
}
</code>
In many cases that is most likely overkill, but it will give you the seperation you want.
Comment: I am not sure if my understanding is correct, does that mean my data layer entities need to inherit from RealmObject?
Comment: Yes, since it would be your data layer what would be responsible for saving and storing Realm data
Comment: With that approach, what is best practice **updating** an already persisted model? Can I just call `fromViewModel` and perform a `realm.insert(fooEntity)`? Or do I need to perform first a `findById` and than call the setters on the retrieved object inside a transaction?
Comment: It depends entirely on your use case. You can either do `realm.copyToRealmOrUpdate(DBModel.from(viewModel))` or make the view layer create small action messages that the model layer will translate into only calling setters on a few fields. Personally, I like smaller actions as it makes the intent of the code more readable and allows you to merge changes from the UI and network, but it is also is slightly more work.
Comment: @einsA you'd have to call `realm.insertOrUpdate(fooEntity)`, `insert()` wouldn't work for update.
Answer: There are different architectures where the main objective is to isolate the domain of our application of the frameworks as Clean Architecture, Onion Architecture, Hexagonal Architecture.
To achieve this isolation, the implementation details are hidden as the data layer. A boundary or port is defined in the domain layer defining how the stored data is accessed but without knowing how they are stored, the repository pattern is usually used to implement this architecture requirement.
With these requirements we will generally have a persistence model and a differentiated domain entities. Persistence models can and should be coupled to the framework we are using for example Realm.
I leave a diagram where you can better understand it graphically.

RealmDb : Clean architecture in Android


How might I overcome settling air in a superdeep tunnel?

Question: So, in this scenario, people are living in an Earth-sized planet, with an atmosphere. They travel via ultrafast train that carries them to the solid core of the planet, where they then transfer to other lines that take them back to the surface. However, an issue is that in the deeper parts of the tunnel, air gets denser and denser as there's more air pushing down, and I'd prefer to not have hundreds of airlocks. How else might I simply solve this?
Comment: You might want to reconsider your tunnel-to-the-core concept.  Most of the interior of an Earth-like planet is REALLY hot.
Comment: The pressure would massive.   The energy to pull the vacuum would be massive.
Comment: As Paparazzi and John Feltz said, the pressure and temperature at the core of a rocky Earth-size planet are overwhelming, making any kind of material to have very strange properties.  AFAIK there is no way to have a hole in a planet's core. Air getting denser and denser is by far the least of the problems.
Comment: As others have noted - if they're tunneling through immense heat and pressure that melts metal - and the densest materials on Earth - while defying the entire planet's gravity for thousands of miles of sustained transport - air pressure is the least of their concerns.
Comment: A solid core and an atmosphere are generally not compatible.
Answer: Just have your ultrafast trains travel in a vacuum. When a train docks at a station, airtight connections will allow passengers to get on or off. When the train is ready to go, the connections will be closed and withdraw, leaving the train in a vacuum tube.
This will also allow your trains to travel much faster - with no air in the tubes, there will be very little friction, and you don't have to worry about the shockwaves you get when you approach the speed of sound.
Now you only have to worry about keeping the air in the central station fresh. However, seeing as you have the technology to send trains to the center of the planet, keeping air fresh should be a fairly simple task.
Comment: Only way to do it.


Filter specific to a panel in grafana

Question: My requirement is to create two or more panels in a dashboard and the column names in the select statement must be chosen from variables displayed.But since variables are common across the dashboards, the variable chosen in one panel, the same is getting reflected in other panel as well.
this is the query i'm using-->SELECT
"time" AS "time",$parameter FROM sample
WHERE $__timeFilter("time") and deviceid='$deviceid' ORDER BY 1
here $parameter is the variable i'm passing and this need to be specific to a panel.
for eg: I can choose temperature for one panel and humidity to another panel
Answer: Short answer: No.
Long answer: Maybe there is an add-on for that

Filter specific to a panel in grafana


Playing sounds only for specified player entities

Question: I'm making a game mode for Garry's Mod, and I'm trying to write a system in which I play sounds only for certain players.
The problem I'm running across is that doing so from server-side would take a lot of bandwidth, but I'm not sure how I could reliably do it from the client side.
None of the Garry's Mod sound functions seem to take player entity arguments, and surface.playsound would resort back to the method of server telling the client what sounds to play for every sound played.
Answer: Only took 5 years, but to answer your question:
hook.Add("PlayerDeathSound", "DeFlatline", function() return true end)
local noise = Sound("death.wav")
hook.Add("PlayerDeath", "NewSound", function(vic,unused1,unused2) vic:EmitSound(noise) end)

Here is a link to a video tutorial: https://youtu.be/UPtKeJmLmoA


Why do Bramha sutras say that Shudras cannot listen to Vedas?

Question: Bramahasutras mention that it is forbidden for Shudras to listen to Vedic Mantras.
Any specific reason for this?
Comment: Whatever knowledge Vedic mantras impart, the same can be obtained through Itihasa-Puranas. Different varnas should take different paths to the same knowledge. If everyone tries to take the same path, it leads to disastrous results. To read Vedas, one must have extreme level of self-restraint (no meat,alcohol,porn,gambling), purity (constantly washing hands, feet, mouth), rituals (prayer, puja) etc. But these restrictions are not needed for reading Itihasa-Puranas. Since Shudras' occupation makes it hard to follow those restrictions, they're forbidden to read Vedas. @SethuSrivatsaKoduru
Answer: The specific sutras you reference have always been controversial. All the arguments, on all sides, narrow down to one question - who is sudra, who is not; is varna from birth, or from conduct. The specific verses are Brahma Sutras 1.3.34-38. Before quoting these verses and some commentary in both Shankaracharya and Ramanuja, it is best to first reference Chandogya Upanishad as both reference it. The Chandogya Upanishad IV.4.3-5. These verses read (https://www.wisdomlib.org/hinduism/book/chandogya-upanishad-english/d/doc239072.html):

Verse 4.4.3
स ह हारिद्रुमतं गौतममेत्योवाच ब्रह्मचर्यं भगवति वत्स्याम्युपेयां भगवन्तमिति ॥ ४.४.३ ॥
sa ha hāridrumataṃ gautamametyovāca brahmacaryaṃ bhagavati vatsyāmyupeyāṃ bhagavantamiti || 4.4.3 ||

Satyakāma went to Gautama, the son of Haridrumata, and said: 'Revered sir, I wish to live with you as a celibate. I have come, revered sir, to be your disciple'.

Word-for-word explanation:
Saḥ ha hāridmmatam gautamam etya, he went to Gautama, the son of Haridrumata; uvāca, [and] said; brahmacaryam bhagavati vatsyāmi, revered sir, I wish to live [with you] as a celibate student; upeyām bhagavantam iti, I have come to you, revered sir, [as a disciple].
Verse 4.4.4
तं होवाच किंगोत्रो नु सोम्यासीति स होवाच नाहमेतद्वेद भो यद्गोत्रोऽहमस्म्यपृच्छं मातरं सा मा प्रत्यब्रवीद्बह्वहं चरन्ती परिचरिणी यौवने त्वामलभे साहमेतन्न वेद यद्गोत्रस्त्वमसि जबाला तु नामाहमस्मि सत्यकामो नाम त्वमसीति सोऽहं सत्यकामो जाबालोऽस्मि भो इति ॥ ४.४.४ ॥
taṃ hovāca kiṃgotro nu somyāsīti sa hovāca nāhametadveda bho yadgotro'hamasmyapṛcchaṃ mātaraṃ sā mā pratyabravīdbahvahaṃ carantī paricariṇī yauvane tvāmalabhe sāhametanna veda yadgotrastvamasi jabālā tu nāmāhamasmi satyakāmo nāma tvamasīti so'haṃ satyakāmo jābālo'smi bho iti || 4.4.4 ||

Gautama asked him, 'O Somya, what is your lineage?' Satyakāma said: 'Sir, I do not know what my lineage is. When I asked my mother, she said to me: "I was very busy serving many people when I was young, and I had you. As this was the situation, I know nothing about your lineage. My name is Jabālā, and your name is Satyakāma." So, sir, I am Satyakāma Jābāla'.

Word-for-word explanation:
Tam ha uvāca, he [Gautama] said to him; kim gotraḥ nu somya asi iti, O Somya, what is your lineage; saḥ ha uvāca, he [Satyakāma] said; na aham etat veda bhoḥ, I do not know this, sir; yat gotraḥ aham asmi, of what lineage I am; apṛccham mātaram, I asked my mother; sā mā pratyabravīt, she said to me; bahu aham carantī paricāriṇī, I was busy serving many people; yauvane tvām alabhe, I had you when I was young; sā etat, for this reason; aham yat gotraḥ tvam asi na veda, I know nothing about what your lineage is; jabālā tu nāma aham asmi, but my name is Jabālā; satyakāmaḥ nāma tvam asi, your name is Satyakāma; saḥ aham satyakāmaḥ jābālaḥ asmi bhoḥ iti, so I am Satyakāma Jābāla, sir.
Commentary:
Jabālā told Satyakāma the truth and, should anyone ask him, she told him to tell the truth also—irrespective
Verse 4.4.5
तं होवाच नैतदब्राह्मणो विवक्तुमर्हति समिधं सोम्याहरोप त्वा नेष्ये न सत्यादगा इति तमुपनीय कृशानामबलानां चतुःशता गा निराकृत्योवाचेमाः सोम्यानुसंव्रजेति ता अभिप्रस्थापयन्नुवाच नासहस्रेणावर्तेयेति स ह वर्षगणं प्रोवास ता यदा सहस्रं सम्पेदुः ॥ ४.४.५ ॥
॥ इति चतुर्थः खण्डः ॥
taṃ hovāca naitadabrāhmaṇo vivaktumarhati samidhaṃ somyāharopa tvā neṣye na satyādagā iti tamupanīya kṛśānāmabalānāṃ catuḥśatā gā nirākṛtyovācemāḥ somyānusaṃvrajeti tā abhiprasthāpayannuvāca nāsahasreṇāvarteyeti sa ha varṣagaṇaṃ provāsa tā yadā sahasraṃ sampeduḥ || 4.4.5 ||
|| iti caturthaḥ khaṇḍaḥ ||

Gautama said to him: 'No non-brāhmin could speak like this. [Therefore, you must be a brāhmin.] O Somya, go and get me some fuel [for the sacrificial fire]. I will initiate you [as a brāhmin by presenting you with the sacred thread], as you have not deviated from truth.' After the initiation, he selected four hundred feeble and famished cows. Addressing Satyakāma, Gautama said, 'O Somya, take these cows away [and look after them].' As Satyakāma was taking them away, he said, 'I will not come back until there are a thousand of them.' He lived away for many years until they had become a thousand.

Word-for-word explanation:
Tam ha uvāca, he [Gautama] said to him; na etat abrāhmaṇaḥ vivaktum arhati, no non-brāhmin could speak like this; samidham āhara, get some fuel; somya, O Somya; tvā upaneṣye, I shall initiate you; na satyāt agāḥ iti, you have not deviated from truth; tam upanīya, having initiated him; kṛśānām abalānām catuḥśatāḥ gāḥ, four hundred thin and famished cows; nirākṛtya uvāca, having chosen, he said; somya, O Somya; anusaṃvraja iti, take these away; tāḥ abhiprasthāpayan, as he was leaving with them; uvāca, he [Satyakāma] said; na āvarteya asahasreṇa, I will not come back until they are a thousand in number; saḥ ha varṣagaṇam provāsa, he lived away for a long time; tāḥ yadā sahasram sampeduḥ, until they were a thousand. Iti caturthaḥ khaṇḍaḥ, here ends the fourth section.
Commentary:
The point is, no matter what Satyakāma's birth was, he had the qualities of a brāhmin—love of truth and learning. Though he had to suffer much hardship living in the forest looking after the cows, he was more concerned with keeping his word than with seeking physical comforts.

Now, Shankara's Brahma Sutras read, Swami Vireswarananda translator (Chapter 1, Section 3, Adikarana IX - https://www.wisdomlib.org/hinduism/book/brahma-sutras):

Chapter I, Section III, Adhikarana IX
Adhikarana summary: The right of the Sudras to the study of the Vedas discussed
Brahma-Sutra 1.3.34: Sanskrit text and English translation.
शुगस्य तदनादरश्रवणात्, तदाद्रवणात्, सूच्यते हि ॥ ३४॥
śugasya tadanādaraśravaṇāt, tadādravaṇāt, sūcyate hi || 34 ||
śuk—Grief; asya—his; tat-anādaraśravaṇāt—from hearing his (the Rishi's) contemptuous words; tat—that (grief); ādravaṇāt—owing to his approaching; sūcyate—is referred to; hi—because.

His (King Janasruti's) grief (arose) from hearing the contemptuous words (of the Rishi in the form of a swan); owing to his approaching (Raikva overwhelmed with) that (grief) (Raikva called him Sudra); because it (the grief) is referred to (by Raikva, who could read his mind).

In the previous Sutra it has been shown that the gods are entitled to the Vedas and Knowledge. This Sutra discusses whether the Sudras are entitled to them or not. Since, like the gods, the Sudras also are possessed of a body, strength, and desires, it naturally follows that they too are entitled. In Chhandogya 4.2.5 Raikva at first calls Janasruti, a Sudra, when he comes for instruction with presents, which are refused. But when he appears a second time, Raikva again calls him a Sudra, but this time accepts his presents and teaches him. So it is maintained that the Sudras also are qualified for Knowledge.
This Sutra refutes the view and denies the right to the study of the Vedas for a Sudra by caste, since the word 'Sudra' occurring in the text referred to does not denote a Sudra by birth, which is its conventional meaning, for Janasruti was a Kshatriya king (Chh. 4. 1 . 3). Here we must take the etymological meaning of the word, which is "He rushed into grief" or "He in his grief immediately approached Raikva." The following Sutra also shows that he was a Kshatriya.
Brahma-Sutra 1.3.35: Sanskrit text and English translation.
क्षत्रियत्वगतेश्चोत्तरत्र चैत्ररथेन लिङ्गात् ॥ ३५ ॥
kṣatriyatvagateścottaratra caitrarathena liṅgāt || 35 ||
kṣatriyatvagateḥ—(His) Kshatriyahood being unknown; ca—and; uttaratra—later on; caitrarathena liṅgāt—by the indicatory sign (of his being mentioned) along with a descendant of Chitraratha (a Kshatriya).

And because the Kshatriyahood (of Janasruti) is known later on by the indicatory sign (of his being mentioned) along with a descendant of Chitraratha (a Kshatriya).

Janasruti is mentioned with the Kshatriya Chaitraratha Abhpratarin in connection with the same Vidya, and so we can infer that Janasruti also was a Kshatriya, for as a rule equals alone are mentioned together.
Brahma-Sutra 1.3.36: Sanskrit text and English translation.
संस्कारपरामर्शात् तदभावाभिलापाच्च ॥ ३६ ॥
saṃskāraparāmarśāt tadabhāvābhilāpācca || 36 ||
saṃskāra-parāmarśāt—Purificatory ceremonies being mentioned; tat-abhāva-abhilāpāt—its absence being declared; ca—and.

Because purificatory ceremonies are mentioned (in the case of the twice-born) and their absence are declared (in the case of the Sudras).

Purificatory ceremonies like Upanayana etc. are declared bv the scriptures to be a necessary condition of the study of all kinds of knowledge or Vidya; but these are meant only for the higher castes. Their absence in the case of the Sudras is repeatedly declared in the scriptures. "Sudras do not incur sin (by eating prohibited food), nor have they any purificatory rights" etc. (Manu 10 . 12 . 6).
Consequently they are not entitled to the study of the Vedas.
Brahma-Sutra 1.3.37: Sanskrit text and English translation.
तदभाव
tadabhāvanirdhāraṇe ca pravṛtteḥ || 37 ||
tadabhāva-nirdhāraṇe—On the ascertainment of the absence of that (Sudrahood); ca—and; pravṛtteḥ—from inclination.

And because the inclination (on the part of Gautama to impart Knowledge is seen only) on the ascertainment of the absence of Sudrahood (in Jabala Satyakama).

That Sudras are not qualified is known also from the fact that great teachers like Gautama made sure before imparting Knowledge that disciples like Jabala Satyakama were not Sudras. See Chh. 4. 4. 5.
<code>Brahma-Sutra 1.3.38: Sanskrit text and English translation.
</code>
श्रवणाध्ययनार्थप्रतिषेधात् स्मृतेश्च ॥ ३८ ॥
śravaṇādhyayanārthapratiṣedhāt smṛteśca || 38 ||
śravaṇa-adhyayana-artha-pratiṣedhāt—Because of the prohibition of hearing, studying, and understanding; smṛteḥ—in the Smriti; ca—and.

And because of the prohibition in the Smriti of hearing and studying (the Vedas) and knowing their meaning and performing Vedic rites (to Sudras, they are not entitled to the knowledge of Brahman).

Sutras 34-38 disqualify the Sudra for the knowledge of Brahman through the study of the Vedas. But it is possible for them to attain that knowledge through the Puranas and the epics (Ramayana and Mahabharata).
The digression begun from Sutra 26 ends here and the general topic is again taken up.

In Ramanuja's Sri-Bhasya, we see essentially the same verses and meanings. However, we see a slight difference here as the Sri-Bhasya has one more verse that reads (Brahma-Sutras Sri Bhasya, translation by Swami VIreshwarananda):

And on account of Smriti texts (which prohibit hearing and studying of the Vedas by Sudras).

Smritis also prohibit imparting Vedic knowledge to Sudras. 'He is not to teach him (a Sudra) sacred duties or vows.' (Manu IV. 80.).

Who is Sudra? Who is not Sudra? Is Sudra by birth? Or by conduct?
Answer: As you may know it is forbidden to recite Vedic mantras near a corpse.

Manu Smriti 4.108. In a village where a corpse lies, in the presence
of a (man who lives as unrighteously as a) Sudra, while (the sound of)
weeping (is heard), and in a crowd of men the (recitation of the Veda
must be) stopped.

Now, in some scriptures a Sudra is compared to a Shava or a dead body. Hence Vedic mantras mustn't be recited near him. Although this might sound to some as discriminatory and offensive, this is one reason being given in scriptures.
For example, from Vashishta Dharma Sutras Chapter16:

[Children] begotten by Brahmanas, Kshatriyas and Vais'yas on women of
the next lower, second lower and third lower castes become Nishadas.
[The son of a Bramhana] by a S'udra woman [is] a Parasava.
They say that the condition of a Parasava is that of one,, who, albeit
living, is a corpse. The designation of a dead body is S'ava.
Some say that a S'udra is a corpse ; therefore, the Veda must not
be recited near a S'udra.
Now they quote the following verses as an example from Yama-Gita.
These Sudras, who are of sinful deeds, are manifestly a cremation
ground. Therefore, the Veda shall never be recited near a S-'udra.

But I don't understand the Yama Gita verse being quoted. It assumes that any Sudra is of sinful deeds but which might not be the case. Vidura, for example, a counter example from the scriptures.
Comment: I think example of Vidura cannot be take because he is mix caste, Bhishma in shanti parva said duties are prescribed for four varnas only and for mixed castes texts are silent hence they have some freedom when it comes to choosing.
Comment: "Vidura said, 'I am born in the Sudra order and, therefore, do not venture to say more than what I have already said. "  @AnubhavSingh Vidura himself says this in Mahabharata.
Comment: Sir its symbolic right?Not literal?
Comment: Occupations and duties for the mixed castes are prescribed in scriptures too for e.g. in Manu. So scriptures aren't silent on that @AnubhavSingh
Comment: May be not literal because after all they are living beings @SethuSrivatsaKoduru
Answer: Sudras are majority 85% of society and they were Engineers, Metal Works, Potters, Carpenters, Artisans, Craftsmen, Tradesmen, Peasants, Weavers, Cart-builders and other Service Professions . If they stopped all works to build society and study Vedas how will society run? Study of each Veda takes 12 years with lots of restrictions on food, wealth etc. The special duty of a Brahmacarin is begging for alms, service to the preceptor, study, sacrificial rites, and renunciation." (Garuda Purana 1.49.5). Does this sound appealing to everyone? Who can't wait to spend their entire childhood living a hand-to-mouth existence, begging for food, carrying out menial tasks just to learn something you can never make money doing? The Bramhin path was never a materially lucrative one. Who wants to live 12+ years as a celibate student, tonsured, begging for food? Our Rishis were always compassionate to give the same knowledge in form of Epics and Puranas. One can happily obtain Jnana from them. Narada Muni, Suta Goswami, Vidura, DharmaVyadha, Kapinjalada, Matanga obtained Jnana in similar way. Narada Muni was a Sudra, but by serving acharyas and obtaining Brahma Jnana, Narada Muni meditated and got darshan of Lord Vishnu. Suta Goswami was from Mixed Caste but Rishis still bestowed knowledge upon him.
In Gita Mahatyama, Adi Shankaracharya says "Because Bhagavad-gita is spoken by the Supreme Personality of Godhead, one need not read any other Vedic literature. One need only attentively and regularly hear and read Bhagavad-gita. In the present age, people are so absorbed in mundane activities that it is not possible for them to read all the Vedic literatures. But this is not necessary. This one book, Bhagavad-gita, will suffice, because it is the essence of all Vedic literatures and especially because it is spoken by the Supreme Personality of Godhead. All the Upanisads are like a cow, and the milker of the cow is Lord Shri Krishna, the son of Nanda. Arjuna is the calf, the beautiful nectar of the Gita is the milk, and the fortunate devotees of fine theistic intellect are the drinkers and enjoyers of that milk."

All the four orders, therefore, have always the right to the performance of all pious duties and of sacrifices (MB Santi CLXXXVII)
Sufficient liberty of action is left to them in consequence of which
all individuals may attain to an equality of condition. (MB Anu
CLXIV)
Maheshwara says to Umadevi: Brahma himself has said that even though
a Shudra, if he has pure inner soul and is Jitendriya, then he should
be treated as a Brahmana.(MB Anu Parva 142,Shl 49)
If satya, daana, karunya, lajja, daya and tapas are found in a Shudra
then he does not remain a Shudra. Similarly if Satya etc qualities
are not there in a brahmana then he will not remain a Brahmana.(MB
Shanti 198)
O ruler of the Videhas, Brahmins learned in the Vedas, monarch,regard
a (virtuous) Sudra as equal to a Brahmin himself. I, however,O king,
look upon such a Sudra as effulgent Vishnu of the universe,the
foremost one in all the worlds." (MB Shanti 302,Shl 12-18)
Lord Krishna says "The person who bestows transcendental knowledge
upon the members of all the spiritual orders of society is one's
ultimate spiritual master. Indeed, he is as good as My own self." (SB
10.80.32)
Yajnavalkya says By obtaining brahmajnana from a brahmana or
kshatriya or vysya or shudra or even a person of low caste, person
with faith should constantly practice the same.(MB Shanti 378,Shl 87)
Because people of all varnas are born from Brahma, they are all
Brahmanas. All are all the time reciting the name of Brahma. I am
telling the correct shastra by the buddhi given by Brahma. Entire
universe and this visible world is nothing but Brahma. Therefore
whatever be the varna, they should not be considered as being
different from Brahma(MB Shanti 378,Shl 90)
He continues" I have already told you that people of all varnas can
remain in their ashrama-dharmas and obtain jnana. Therefore, whether
a person dedicated to jnana of any varna he will surely get moksha;
this is the opinion of scholars."(MB Shanti 378,Shl 91)
Hanuman says that "For all four varnas meditation (dhyana) was the
main karma. Paramatma who shines like a lamp in all hearts will be
the Adhishtana-Murthy for all varnas.'Omkara' alone was their main
mantra. All four varnas followed only Upanishad Dharma.They all
worshipped only the Jyoti-Swarupa Paramatma who resides in all
hearts"(MB Anu 149)
Comment: The key part is that Shudras need not read (and should not) Vedas to obtain Jnana. They can get it from Itihasa-Puranas.
Comment: That's all I wanted to say @ram Ji -  Whoever is interested-Rishis teach and bestow them Jnana. Bhagavata itself tells that Narada Muni and Suta Goswami were Sudra and Mixed Caste respectively but Rishis accepted them. Vidura Dharmavyadha Sanjaya etc all aquired Bramha Jnana without Vedas. Yajnavalkya and Bhisma say this path of Moksha is accessible to all Humans. Even in Anu Gita Krishna said Brahma Jnana can liberate everyone. So there's no loss if Sudras cant read Veda and indeed its a previlage for them. I agree for 100%. I wonder why my answer is downvoted so much??Any idea sir??
Comment: @Rickross Who is he sir?Why is he doing it??SE subtracted 140 of my points simply yesterday!
Comment: Sure @Rickross Ji!


Razer keyboard and mouse

Question: I've recently wanted to try out Ubuntu, but when I enter the desktop, I can't use my keyboard or mouse. My keyboard is a razer blackwidow and my mouse is a razer deathadder. They both work when I'm on Windows and even works on the boot up menu when I have my usb plugged in to run Ubuntu. So it doesn't seem to be my hardware, but it's having trouble detecting my keyboard it seems. Anyone else encountered this problem? (I have my legacy options on in the BIOS)
Comment: Can you start a terminal window (using another keyboard/mouse) and post the output of the command 'lsusb'?
Comment: @ph0t0nix so strangely enough after restarting it like 5 times I was able to get the keyboard and mouse to work. However after I restarted it one more time it stopped working again. It seems like a hit or miss. Anyways I got to run the lsusb and both my razer devices appear BUS 001 Device 004: ID 1532:0037 and the mouse has a different id
Answer: So both are found (as lsusb shows), but don't seem to react (most of the time)... Maybe you can have a look at this page on the ArchLinux Wiki.
Over at Phoronix the mouse seems to work without problem, so maybe give it a try without the keyboard connected (if you haven't already done so).
Comment: okay so I hadn't actually tried to use the mouse without the keyboard yet. However once I started Ubuntu without the keyboard connected it worked like a charm. Once it was reconnected it froze the mouse and the keyboard. So I was curious and tried it the other way around with the mouse disconnected and the keyboard connected. However this time the keyboard worked and once I reconnected the mouse, they both worked. I mean it's a temporary solution, but it's better than  no mouse or keyboard haha

Razer keyboard and mouse


Making my own 38kHz remote

Question: The issue I am having is it appears many modern remotes don't have a 38kHz carrier frequency for the infrared signal. I would get inconsistent readings using an TSOP 1738. Since the remotes you can buy as a kit are always cheap and ugly, how hard is it to replace the circuitry with an attiny device to generate the correct frequency?
Comment: @PhilFrost considering OPs mentioning 38khz, standard IR remotes for TV/Stereos/Cable boxes, etc
Comment: Indeed, many remotes are wired, or use IR, or any other means of sending information between two distant points. What are we talking about?
Comment: Ageis, you do realize that common TV IR frequencies range from 32khz to 40khz, right?
Comment: You can buy universal remote controls in the checkout line of the local Walmart store for $5.  These will use 38kHz carrier and can generate lots of different codes.
Comment: @Ageis Did you measure the carrier frequency with an oscilloscope?  You can use a phototransistor as receiver, or just scope out the LED on the transmissions side.
Answer: How hard is it to send IR data using a 38KHZ carrier? Pretty easy. Could you easily strip out the internals of a remote and replace it with your own? Probably just as easy. Have a look at the TVBGone code here:
http://learn.adafruit.com/tv-b-gone-kit/download

An ATtiny85 controlling IR LEDs for remote TV control
It turns on/off the PWM generated based on code structures stored in the flash, pretty easy to understand.
See design notes
Comment: This is not a great example design.  There is no current limiting for the LEDs, or the base current of the '3904.  It works with the right combination of LED and power supply, to keep the LEDs from overcurrent, but don't use it as a general design for this kind of remote control circuit.
Answer: How hard is it to replace the circuitry - Not hard at all.

Here's a circuit for the sender unit capable of 16 unique single key presses.
The uC has three basic jobs to do.
(1) Scan/read the keyboard and determine which key is pressed.
(2) Convert the 'keypress' to a particular code value (see standard codes e.g. RC5) with various start and stop bits
(3) Send out a stream of bits with the 38kHz carrier (internally generated) to the output pin.
You'll find the necessary software in most libraries or other uC projects. From a power saving point of view you should use the key press to wake up the processor.

Making my own 38kHz remote


Transforming data with positive, negative, and zero values

Question: I have a multiple linear regression model with several dependent variables that have positive, negative, and zero values, and are not normally distributed. I can't do a natural log transformation because of the 0 and negative values, can't square or cube it due to 0 values, and the Box-Cox transformation works only for positive and 0 values. Is there a transformation I can do that works for all of these? I've seen log(x+minimum value) as one option, but not so much here on this forum—is this a valid transformation?
Comment: Squares and cubes of zero are perfectly well defined; the problem is different with squares, namely that $-x$ and $x$ produce the same square so the transformation is not one-to-one. Cubes are often a bad idea because they will typically increase (the magnitude of) skewness and exaggerate outliers.
Comment: Would something like sign(x) * log(1 + abs(x)) work? It's a one-to-one transformation that has a log effect on both positive and negative values. It doesn't have issues handling x=0 either.
Comment: Concerning your actual problem of multiple regression, please investigate the threads on this site related to transformation of variables in multiple regression: there [appear to be hundreds of them.](https://stats.stackexchange.com/search?q=multiple+regression+transform*)  You might begin by reviewing the [highest voted and answered questions](https://stats.stackexchange.com/search?q=multiple+regression+transform*+answers%3A1+score%3A1).
Comment: You can certainly do a log transformation by adding a constant, but why do you want to transform these data ?
Comment: @RobertLong some of the variables are positively skewed.
Comment: When you say _dependent_ variables do you mean _independent_?
Comment: Following Nick Cox's comment above: a cube *root* transformation could address your problems. But keep in mind that there's **no need for your variables themselves to be normally distributed** - it's the *residuals* of the model that need to be.
Answer: Yes, you can add a constant and then take a logs.
There are many ways to transform data.
There is nothing inherently invalid about doing this, but very often such transformations are misguided. It is not necessary for the dependent variable to be normally distributed. The assumption about normality concerns the residuals, not the response variable itself. If the residuals are not plausibly normally distributed then of course some transformation may be warranted.
One major downside of such transformations is that it makes sensible model interpretation much more difficult.
Comment: That is not a good reason to transform them. Fit the model first, with untransformed data and do the usual regression diagnostics, including an evaluation of the residuals.
Comment: There is some positive skewness to some variables, which is why I wanted to transform them. But I understand that such methods may not be the best way—so is it not absolutely necessary to transform them, and to run the values as they are in the regression?
Answer: In principle, transformations possible with variables that may be negative, zero or positive include

$\text{sign}(x) \log(1 + |x|)$,  which conveniently preserves the sign of its argument (including mapping $0$ to $0$) while behaving like $\log x$ for $x \gg 0$ and like $-\log(- x)$ for $x \ll 0$.

Inverse hyperbolic sine $\text{asinh}(x)$ or more generally $\text{asinh}(kx)$ for some $k > 0$, which also preserves the sign of its argument

cube roots $x^{1/3}$ or more generally odd integer roots, such as also fifth roots, seventh roots, and so on, which also preserve the sign of their arguments. In practice, you may need to compute this from the product of $\text{sign}(x)$ and the chosen root of its absolute value $|x|$. Depending on your software, the root of a negative or even a zero value may be returned as missing, NA, or NaN if in practice the routine for general roots depends on first pushing the argument through code for a logarithm.

As already pointed out, whether any variable is normally distributed it is not itself important for regression, or even an ideal condition (often described as an assumption). However, pulling in outliers may be helpful for analysis of highly skewed or heavy-tailed distributions, at least for exploratory data analysis. Practical examples may include profit (negative values meaning loss) of many firms or any variable that is a change or difference.
The psychology and sociology of what a readership knows about can be important in practice in choosing one of these transformations, assuming that one such is a good idea. Thus many readers should have learned about cube roots in secondary school but inverse hyperbolic sines are more likely to seem exotic or mysterious.
Answer: In the case of negative values, you can use the PowerTransformer(method='yeo-johnson') method from sklearn. It is capable of handling positive and negative values, also values of zero. The skewness (measure of normality) of the data should decrease substantially. As with any transform, you should use fit and transform on your training data, then use transform only on the test and validation dataset.
pt.fit(X_train)                    ## Fit the PT on training data
X_train = pt.transform(X_train)    ## Then apply on all data
X_test = pt.transform(X_test)
X_val = pt.transform(X_val)

Example showing skewness of data decreases using PowerTransformer:
from sklearn.preprocessing import PowerTransformer

...

# find numeric features in your dataset to transform
numeric_feats = X.dtypes[X.dtypes != "object"].index

# calculate skew of all numeric features
skewed_feats = X[numeric_feats].apply(lambda x: skew(x.dropna())).sort_values(ascending=False)

# convert to dataframe for easier processing
skewness = pd.DataFrame({'Skew' :skewed_feats})

# print performance before transform
print("Pre: There are {} skewed numerical features to Box Cox transform".format(skewness.shape[0]))
print("Pre", abs(skewness.Skew).mean())

# transform data
pt = PowerTransformer(method='yeo-johnson').fit(X)
X = pd.DataFrame(pt.transform(X), index=X.index, columns=X.columns)

numeric_feats = X.dtypes[X.dtypes != "object"].index
skewed_feats = X[numeric_feats].apply(lambda x: skew(x.dropna())).sort_values(ascending=False)
skewness = pd.DataFrame({'Skew' :skewed_feats})

# print performance after transform
print("Post: There are {} skewed numerical features to Box Cox transform".format(skewness.shape[0]))
print("Post", abs(skewness.Skew).mean())

Example results:

Pre: There are 17 skewed numerical features to Box Cox transform
Pre 3.514581911418132
Post: There are 8 skewed numerical features to Box Cox transform
Post 1.977383868458546

This method was also designed to handle heteroscedastic data, which is data that has a non-uniform variance across x/y values.
Example:

Reference: PowerTransformer from sklearn
Answer:
I've seen log(x+minimum value) as one option, but not so much here on this forum—is this a valid transformation?

Yes and no. It depends on what you mean by "minimum value." Is there actually a minimum value for your variable? If so, this is valid. As an example, if you have counts as your data, e.g. "number of customers" or something else that's always a natural number, thenlog(1 + x) is a perfectly valid transformation for your predictor that prevents the log(0) problem. Or you could do something like say
But is it valid to take the sample minimum when there is no minimum value in the population? Emphatically no. Just think about what happens when the sample size is very large--the minimum value will approach infinity, and trying to take log(infinity + x) just doesn't make any sense. (If nothing else, it makes the log transformation basically useless, because the log can be approximated by very well using a straight line when you're far from the origin; note that the curvature goes to 0 as x goes to infinity.)
In those cases, you should instead use an inverse hyperbolic sine transform, defined as x->arcsinh(x / 2 / scale) * scale, where scale can either be estimated from the data or set to be some known value. (As a rule of thumb, setting it to 1/3 of the interquartile range will usually give appropriate behavior.) This transformation behaves like the logarithm far from 0, but behaves like a straight line close to 0.


How to convert a Crystal Report file (RPT) from Access to Microsoft Sql Server?

Question: I have taken over support of an application that was originally written in VB.Net net and has now been ported to C#. The application originally made use of an Access database which I have now migrated to Microsoft SQL Server 2008. Everything is working fine except for the reports which were built with Crystal Reports. I have never worked with Crystal Reports before and I am struggling to get the .RPT files converted to work with Sql Server instead of Access.
I am using Visual Studio 2010 and have installed Crystal Reports 13.0.1 for VS. Now when I open one of the RPT files I see "Field Explorer" with "Database fields" tree item which I can expand to show a single table. If I right click on "Database fields" and select "Verify Database" a window popups up with the title "Access/Excel (DAO)" and fields "Database Name" showing the path to a .mdb file and "Database Type" with "Access" shown here. If I dropdown "Database Type" I see only file based databases listed here, such as "dBase 5.0", "Excel 8.0", "Paradox 5.x", etc.
So how do I change "Database Fields" to read my Sql Server database rather than Access?
UPDATE:
Ok. I am most of the way there now. I have managed to connect to the database with Database Expert (Right clicking on "Database Fields" and then selecting "Database Expert" from the context menu). I then expanded "Create New Connection" then "OLE DB (ADO)" and was able to select "SQL Server Native Client 10.0" from the provider list. In this way I was able to add a link to the Sql Server database.
Then I tried going to "Set Database Location.." and updating the provider from the .mdb under "My Connections" to the Sql Database which is now listed there and then selecting "Update". This works fine if only tables are linked and these are present in the Sql Database (which they are). But if the report has a command (sql query) then the update fails because the syntax of the command is not correct for Sql Server. I can delete the command and recreate it under the Sql Server connection with the correct syntax, but then I lose all the fields on the report that were linked to the original command. This is not too much of an issue cos I can manually recreate these, but I am wondering if there is a way change the syntax of commands when setting the database location to the Sql Server?
Answer: rem the lines of the sql code, then do the db update, then update the sql code.


How to match brightness between two different images using GIMP (Mac OSX)?

Question: I took two pictures with my iPhone, one during the day and one at night. How do I make it such that the two images look like they were taken at the same time of day?
Is there a compare two images feature? Or do I need to match some value(s) on each image?
Comment: Even if answered for lab images this procedures may help you too: http://graphicdesign.stackexchange.com/questions/18831/normalizing-hematoxylin-and-eosin-stained-histology-images
Answer: It will never be a perfect match, due to the change on the nature of the light sources themselves.  (Daylight coming from the Sun is a point light - from a window is a directional soft light - nighttime photos will tipically  have multiple, point light sources + wall reflection and so on) - you can't compensate for these changes in the raster image.
But for adjusting overal tone and shadow curve, you might want to use the "curves" tool. Switch GIMP to multiple window mode (uncheck Windows->Single Window Mode , have each of your images open in a window and place them side by side, and then use curves (Color->Curves) on the image you want to change. Fiddle with the curve until you are happy. You might want to change the channel to "red" while at it to compensate for the color casts in artificial lightning (although the camera does much of that already).


I am connected to Wifi but I can't access the internet

Question: Very simply put. I am connected to the internet. Applications Cus as Telegram Work. However I can't seem to be able to browse the net. I have tried restarting my computer, renewing my winsock and resetting my dns. I can't seem to connect.
Comment: try ping 220.127.116.11.
Comment: @AungMyat I have tried it. It is successful
Answer: Might be an issue with your ISP DNS service. Configure your network settings to use Google Public DNS by adding IP addresses 22.214.171.124 and 126.96.36.199 as your DNS servers.
Answer: Run Windows built-in network troubleshooter tool.

Please boot into your Windows 10 check the wireless network driver:

Right click the device manager.
Expand the Network adapters.
Check that wireless network driver status.
If it's not working fine, right click it to uninstall it.
Click Action-> Scan for hardware changes to reinstall it again.

If the issue persists, run these commands with administrator to reset the TCP/IP:
netsh winsock reset catalog
netsh int ipv4 reset reset.log
netsh int ipv6 reset reset.log
Answer: Check if you are connected to other internet sharing devices.
This problem arises very often in situations where two internet providing devices are connected to the laptop. They may not be providing internet, but your device will get configured to use both of them, which ends up causing a clash.
For example, your laptop may be connected to a router via an Ethernet cable, but then, it may be connected to a wifi hotspot too, and that will definitely cause a problem.

I am connected to Wifi but I can’t access the internet


What alternatives for animated GIFs are there?

Question: Why are those pesky GIFs still dominating when it comes to animated pictures? I'm sure there are better alternatives nowadays, but why aren't any of them gaining traction?
Comment: animated PNG (which is no different than gif and less supported), number of javascript animations: scrolling an image built of sprites, drawing on canvas and other tricks. But I believe that GIF is most compatible and failsafe
Comment: It has been almost 9 years since this question was posted. I would like to know the current status of animated (raster) image formats. Is there a "reasonably" supported format now? Are GIFs still our best bet? Should I ask a new question on this topic?
Comment: @venimus animated PNG support alpha channel, which makes them VERY different from GIF.
Comment: GIF still dominating is largely due to lack of general consensus about what should be the replacement. There are multiple competing animated image formats, and also some debate on whether we need them at all (leaving animation to video formats).
Answer: Animated png or APNG (http://en.wikipedia.org/wiki/APNG). They can be made in GIMP with the APNG Plug-in
But animated Gif's really are the main one out there - flash kinda took over though, but that isn't really an image per se.
Also, other alternatives from the same wikipedia page: The MNG file format is a more powerful alternative to APNG, although is a more complex format and has less web browser support.
The GIF file format has better application and browser support than APNG, but it is limited to 256 colors per frame and supports only 1 bit alpha transparency, by mapping one of the palette colors to transparent.
SVG combined with scripting or SMIL can animate vector graphics and can incorporate raster graphics. (See SVG animation.)
Dynamic graphics created with HTML 5 canvas Object can also be animated.
An alternative method for animations in web pages is to use conventional static images and animate them using JavaScript,[22] Adobe Flash, Microsoft Silverlight, Java or other plugin based technologies.
Comment: The story is basically that there are two animated PNG formats: one is officially endorsed but too complex to have been widely implemented (MNG), and one which is simple to implement but is not officially endorsed (APNG). Both have fatal flaws, and it seems the existence of each has prevented the other from fixing those flaws.
Comment: @TomAnderson: What are the fatal flaws of each?
Comment: As of 2020 APNG is supported by modern browser engines such as WebKit, Blink, and Gecko.
Comment: Chromium recently added support for APNG, so even without support added via an extension (which we have had for years), it'll be in Chrome soon. That leaves IE and Edge as the only holdouts.
Answer: WebP is an image format employing both lossy and lossless compression.
It is currently developed by Google.
Advantages of animated WebP compared to animated GIF

WebP supports 24-bit RGB color with an 8-bit alpha channel, compared to GIF's 8-bit color and 1-bit alpha.
WebP supports both lossy and lossless compression; in fact, a single animation can combine lossy and lossless frames. GIF only supports lossless compression. WebP's lossy compression techniques are well-suited to animated images created from real-world videos, an increasingly popular source of animated images.
WebP requires fewer bytes than GIF1. Animated GIFs converted to lossy WebPs are 64% smaller, while lossless WebPs are 19% smaller. This is especially important on mobile networks.
WebP takes less time to decode in the presence of seeking. In Blink, scrolling or changing tabs can hide and show images, resulting in animations being paused and then skipped forward to a different point. Excessive CPU usage that results in animations dropping frames can also require the decoder to seek forward in the animation. In these scenarios, animated WebP takes 0.57x as much total decode time2 as GIF, resulting in less jank during scrolling and faster recovery from CPU utilization spikes.

Disadvantages of animated WebP compared to animated GIF

In the absence of seeking, straight-line decoding of WebP is more CPU-intensive than GIF. Lossy WebP takes 2.2x as much decode time as GIF, while lossless WebP takes 1.5x as much.
WebP support is not nearly as widespread as GIF support, which is effectively universal.
Adding WebP support to browsers increases the code footprint and attack surface. In Blink this is approximately 1500 additional lines of code (including the WebP demux library and Blink-side WebP image decoder). Note that this problem could be reduced in the future if WebP and WebM share more common decoding code, or if WebP's capabilities are subsumed in WebM's.

https://developers.google.com/speed/webp
Comment: As of 2020 APNG is supported by modern browser engines such as WebKit, Blink, and Gecko.
Answer: I would like to propose the use of video for animated pictures. There is now broad support for the video tag in HTML5 and nearly equal support for MPEG4.
<video autoplay loop src="sample.mp4">

With the autoplay and loop attributes, it is easy to replicate the behavior of an animated GIF.
I will concede that transparency in video is still an issue.
Comment: well, they'll just have to fix that then, won't they?
Comment: except on iOS video forces full-screen.
Answer: As answered by Nathan and others earlier, there are many ways to animate graphic.
Personally I prefer
(1) creating the graphic in Illustrator or Inkscape etc.
(2) save the graphic in .SVG format
(3) embedded the SVG code (ie. everything between  and ) in your web page and
(4) use snap.svg (javascript libary) to animate the embedded svg graphic. Most modern browser supports SVG
Answer: With jquery, I am able to rotate 6 jpgs of a lenticular sequence back and forth to attain the same result of an animated gif; for example, http://www.vicgi.com. The total file size for 6 image is only 233KB. Had this been an animated gif there will be 11 frames and the file could have been over 1MB. Not to mention the number of colors is limited to 256 for a GIF.
HTML

Javascript:
Add this code before end of body tag, assume you have linked to jquery cdn or download.
var images = [
"first_image.jpg",
"second_image.jpg",
"third_image.jpg",
"forth_image.jpg",
"fifth_image.jpg",
"sixth_image.jpg",
"fifth_image.jpg",
"forth_image.jpg",
"third_image.jpg",
"second_image.jpg",
];   // add the images if necessary

numImages = images.length,
index = 1;  // start from the second image because first image is already in the HTML

function cycleImages() {
    image = "images/" + images[index];   // assume all the images are store in the images sub-directory
    $("#banner").attr("src", image);     // set the src attribute of the <img tag to the image to be shown
    index++;                             // advanced to the next image
    if (index == numImages) index = 0;   // recycle to the first image
}

$(function() {                          // start the rotation when document is ready
    setInterval("cycleImages()", 800)
});

Answer: This was obviously quite a long time ago, but times change and .webm seems to be a good contender.
In short, it is a media format that is meant to be royalty free.  It would be used with the HTML5 video tag (see the answer from @KeithShaw) and would require a browser that supports the appropriate codec.  However, YouTube is one of the adopters, as well as, a number of other industries that I will not mention here.
This is the project's site: WebM Project
Answer: MNG format is a PNG-like format for animations, but it doesn't seem to have gained much popularity. So it's just a question of adoption - as animated GIFs work fine (and are free of former patent restrictions), why not use them? Why repair what's not broken?
Comment: Because they're limited to 256 colors without alpha transparency.
Comment: It's the lack of alpha transparency that's broken - it means you can't use a single animated GIF across all backgrounds, because you have to composite separately with each background colour to make it look okay.
Comment: @SLaks don't see how "limited" becomes "broken". And note "animated GIFs work fine". They do for most people. For those who are not satisfied, Flash works in most cases.


working with drupal project with team

Question: Till this date i was working all alone on drupal projects.  Now i am into a team of 10-15 members. They are using common DB on a machine and different code base on each machine. So was wondering which is the best way to manage and work on drupal project when in a team ?
Comment: For us, facing the same problem as you. Have not thought of a good method to sync database between DEV and Staging except manually done using tools like Navicat. Each developer has its own DEV environment, and working on different parts. When its time to commit their part into the staging, changes in the Drupal config are manually repeated into the Staging site. :(
Answer: Any control version tools: GIT, Mercury, SVN and etc for controlling team source.
Also drupal have prepared version of drupal installation for team working for tracking timelines, bugs, etc:
Drupal used as a project management tool
More version controlling tools reviewd here: http://www.smashingmagazine.com/2008/09/18/the-top-7-open-source-version-control-systems/

And there's many ready services (free or usually payment) for working with team in internet, try this search: http://www.google.ru/search?q=project+management, there I see basecamphq.com for example.

More hard thing is DB synchronizing, because it's depend on your tasks, for example, sometime merging portion of content and users are needed, sometime aren't. Some of system variables should be synchronized, some of these not. Some content type or fields are required, some just for test.

Hard solution is writing script (manual) in any language that have access to DBs and track changes.
Other solution is using Features module with some contributed, like Strongarm and etc. This module create module that have changes, where developers export their changes, so it can be controlled via Version control tools as usual plain file. You will just enable it, and their changes will applied to central site. Also with this (and not only) cool tool used: Drush, for me this is the best solution.
Also there's tools of synching depend on DB engine, Best tool for synchronizing MySQL databases for example.
Comment: we are using SVN. But see all things in drupal get stored in DB, So this is where all problem comes. DB has to be maintained in sync with all systems of developers if we are not using common DB ..
Comment: ok, I am make changes about it.

working with drupal project with team