How do you have Mutual Assured Destruction in space politics

Question: Space is VAST, and many country occupied only a part of it. They do trade and make war just like we do on Earth. On Earth, we have our "peacemaker" between powerful nations in the form of nuclear missiles stationed on land, on submarine, and in aircraft. These tools can deliver death in about 30 minutes to any location on Earth with no real way to stop them for sure. City target and some military target can be targeted beforehand because it is easy to ascertain their location. However, how could we do this for a galactic setting? Unlike Earth, it is possible to keep your home planet hidden and have trades happen on remote planets of no importance. And since planets are far away, all information on a planet would have to be sent using hyperspace links--almost like the underwater telegraph tables of old. This ensures all data coming and leaving a planet can be monitored to ensure no compromising information gets sent out. Not to mention that planets are far away from each other, and even travelling at speed of light, things still take years to arrive. The hyperspace is not faster than light travel, but rather going into a non-euclidean 5th dimension that links two points in 4D space together so it seems the ship arriving destination an instance after they leave their original spot. The warp system jump a vessel very far, nor are the speed of the vessel after leaving the warp faster than the speed it enters warp. In this case, it almost seems impossible that nations in space can effectively deliver unstoppable death in 30 minutes to ensure mutual assured destruction. But what did I miss that could allow this to happen?
Comment: "even travelling at speed of light, things still take years to arrive." or "so it seems the ship arriving destination an instance after they leave their original spot"?
Comment: there are two kinds of travel methods for a ship, 0.99c and warp
Comment: The hyperspace is not faster than light travel, but so it seems the ship arriving destination an instance after they leave their original spot. Those two don't go together
Comment: I mean the actual time spent in travel. A normal sublight engine brings a ship to 0.99c, but the ship still travels within our dimension. The hyperspace jump bridges two point in space and almost like opening a wormhole that allows a ship to go through at slower speed--keeping a ship at 0.99c wears the engine down fast.
Comment: It'd be easier to explain warp if you had gone with the direction of that from an outside perspective they seem to arrive from A to B in an instant but from an inside perspective the time traveled was equal to if not greater than the time it would have taken them to travel the same distance via sub-light speeds. Using this kind of warp would require two life-extension technologies to ensure the crew survives the trip though, cryogenics or negligible senescence via cybernetics. But, this aint my sci-fi so you do you :D
Comment: *"The hyperspace is not faster than light travel":* if a ship can go from A to B faster than light would go from A to B then the ship has travelled faster than light. *It doesn't matter how the ship does it.* The consequences of faster than light travel (such as it being equivalent to time travel) are not dependent on the mechanics of how exactly the ship travels from A to B faster than light.
Comment: @AlexP I mean the speed of the ship at the start and end of a travel interval. Let's say a ship is travelling from A to B, with its initial speed being 0.1c. If using hyperspace, the initial and final speed of the ship--when it exit hyperspace--is still 0.1c. But If it just use normal engine and just pedal to the metal, the ship's final speed is going to be 0.99c. However, the time it takes the ship to travel from A to B, at general reference frame, is 0.0000001 sec for hyperspace travel, and Distance (A-B)/0.99c  for sublight travel
Comment: Destroy the source of the "Spice."
Answer: Given the two types of spaceship travel you have mentioned there is already the capacity to destroy worlds wholesale, especially if a ship keeps going at the same speed it entered hyperspace and can jump at 0.99c. What you have there is an RKV that can certainly wipe out all life on a planet if not reduce it to molten slag wholesale. RKVs are quite cheap in most settings, it's not starship, it's not even a drone, it's just an engine system strapped to a trigger with a preset destination, it jumps in-system at speed acquires its target and rams home in a flash of hard radiation, run time of the engines should be less than 15 minutes. Price is important because the key to MAD is having enough munitions to kill everyone, everywhere, at any time, to have a MAD scenario in the proposed situation you need at least one RKV for every planet in range of the trading post(s) you use (as well as the trading post worlds themselves) to make sure you get everyone who might be responsible for your overthrow. Make sure you include one for the homeworld too, those closest to you are in the best position to betray you after all. If you know the spectrum of the home star of your trading partner/enemies then you need less weapons to get their homeworld but you still need saturation to make sure you get them all.
Comment: Wouldn't RKVs tend to get blown to smithereens by collisions with asteroids and other such space dust before they reach their destination though? Not knocking the weaponized engines, they're sound for obliterating things, but pre-destination collisions would be something to consider.
Comment: @Lemming You're not wrong; it really depends how accurate the jumpdrive is, if you could jump the RKV to a range that would be inside the orbit of the moon for example then impacts before the big hit are going to be minimal and still bathe the target in radiation when they do happen, on the other hand if you're looking at having to come in from cisMars space then yes that becomes a major concern.
Answer: Think On Equivalent Scale:
Given a faster-than-light system, I seriously question that an enemy couldn't simply teleport to thousands of star systems and scout out to see who might be located in those systems. Then any piece of equipment that can't be moved (antimatter factories, for example) can be targeted with teleportable weapons. Once you know where your enemy is, game over. And telescopes alone might be able to tell you where big, permanent equipment is located.
I suppose your advanced civilization can live like nomads, constantly wandering throughout space, endlessly rebuilding all their assets for fear of being obliterated. But eventually even the Mongols settled down in the lands they conquered, because ownership of stuff (planets & systems) is still the fundamentals of wealth. If you had a modern empire somehow composed of nomads on ships, nuclear deterrence wouldn't work either. But then, the nomads wouldn't have a base or fixed assets.
While you MIGHT be able to conceal exactly what planet your home world is on, you can't hide the rare habitable planets from interstellar telescopes. ALL habitable planets are hugely valuable real estate, and every one is precious. Unless your empires have completely dissociated distance from interstellar geography, your empire controls a region. Every habitable planet in that region is yours, and a valuable target. So the enemy can simply target every habitable planet in the region you control, and get your home world through process of elimination. The near-light missiles are pre-accelerated and your instantaneous hyperjump allows them to be gated into targets anywhere, even though they aren't pointed at those planets beforehand.
Ah, but what if you've moved your whole civilization into habitats? While you control the region, the people are orbiting stars that don't have planets. The loss of those worlds will be a blow, but not the complete loss that a total nuclear war would be, right? RIGHT?!!!??
The future's equivalent of nuclear weapons are star destabilizers - strange matter, gravity-pulse collapsar bombs, or whatever. It's not thirty seconds, but still just as inexorable. The economy of your empire is ruined quickly by dropping 0.95C bombs (already sped up, cruising through uninhabited space, to teleport to targets on command) on all the habitable worlds, but now an artificial supernova has been set off in the heart of your territory. You can sit back (once you figure out where) and know THIS colony will die in two years, THAT in 15, and within the next century, every star in your empire will be rendered a burned, blasted wasteland. Your entire populous is turned into refugees.
But like nuclear weapons, you eventually have enough planet killers and star killers that you can simply destroy EVERY large body and star within the radius of your enemy empire. Ant the weapons can be easily concealable. Of course, if you know who did it to you, you have near-light bombs and supernova weapons of your own to kill ALL the enemy planets (regardless of value) and stars to render the enemy systems just as desolate as yours. MAD.
Comment: But nuclear attack on Earth are only ordered after a given scenerio. If an attack is only going to arrive after two years, the other nation could just move their people and government around. Not only that, situation might change after two years so that you may not want to nuke them.
Comment: @FaitoDayo You don't get to recall nuclear weapons once they go off, which is why you're careful with them. The first wave of devastation (planet-killing) can actually be delivered within seconds (warp attacks w pre-accelerated projectiles) to smash any planet or large fixed asset. The nova bomb is just to clean up the enemy empire afterwards.
Answer: Warp the payload
Since you have tech that makes it seem like things arrive at their destination a moment after leaving, you could just load up a ship with an appropriate payload that is capable of going into warp and conveniently arrive on top of their heads before setting off every explosive device you've packed for the journey, effectively instantly nuking everything in sight.
Everyone(as far as I understand your universe) has warp tech so everyone would be able to do this. Possibility of MAD achieved.
Edit: Serial warp the payload
Since warping has a distance limit before needing to cool down, all you need to make the near-instant arrival from essentially any distance possible is to have a stage-based system of warping and shedding the overheated warp engine or whatever is the thing that warp engines need that overheats in the process, similar to how we send rockets up today, only the reason for the shedding will not be because of spent fuel tanks but because shedding mass is the quickest way to get rid of heat in space. Warp, overheat, shed, warp, repeat, kablammo on top of the enemy's head.
If warp engines are too expensive for this to be viable, then simply devise a shedding system where you shed the heat sinks(that have already captured or are capturing the heat) instead of the overheated engines themselves.
Comment: It is the distance. Hyperspace travel can't go very far before it needs to return to normal space for cool down. And since there would be a huge distance between country A's WMD base and country B's capital, you can't warp a WMD directly to another country's capital in one jump
Comment: @FaitoDayo What, exactly, needs to cool down after the warp?
Comment: I'm going to go ahead with my modification anyway
Comment: The hyperdrive needs to cool down
Comment: @FaitoDayo Then the edit to my answer still applies. Have more than one hyperdrive, only use one per warp, string X(however many warp drives you need for Y distance) warps together and badabing badaboom you have near-instantaneous travel to essentially anywhere in the universe, assuming you can fit enough warp drives for whatever distance on a single craft/payload delivery device. If you can't have more than one on a single craft then establish 'warp stops', a highway of stations that swap out the overheated warp drive with a fresh one the moment you arrive and then you can warp again.
Comment: hmmm, never thought about that. Still, there is going to be an issue of cost problem. Having so much expensive hyperdrive on a one-way trip weapon is just...wasted?
Comment: @FaitoDayo If cost is a concern then warp stops would be the solution. You'll only waste one warp drive per weapon in the very end when they explode, with the still cooling ones sitting where the stops are and could be re-used for whatever purpose.
Answer: Cosmic inflation, redux.
It is frustrating that one cannot immediately wipe out the universe.  The speed of light and all.  Those people in distant locales will die of lumbago long before my killer deadliness gets to them.
What is real and can affect the whole universe, faster than the speed of light?  I can think of only one thing: cosmic inflation.
https://wmap.gsfc.nasa.gov/universe/bb_cosmo_infl.html

Inflation was both rapid, and strong. It increased the linear size of
the universe by more than 60 "e-folds", or a factor of ~10^26 in only
a small fraction of a second!

This speed is possible because it is space/time itself that is expanding, not something moving within space / time.
It has been proposed that the inflation or creation of the universe was an instance of false vacuum decay.
https://en.wikipedia.org/wiki/False_vacuum_decay

If our universe is in a false vacuum state rather than a true vacuum
state, then the decay from the less stable false vacuum to the more
stable true vacuum (called false vacuum decay) could have dramatic
consequences.[5][6] The effects could range from complete cessation of
existing fundamental forces, elementary particles and structures
comprising them, to subtle change in some cosmological parameters,
mostly depending on potential difference between true and false
vacuum.

In some scenarios the new lower energy vacuum state could bring with it new physical laws etc.  That is exactly what happened with cosmic inflation.
It is usually asserted that a false vacuum decay bubble will propagate with the speed of light.  I do not know why that needs to be true.  If the first false vacuum decay (cosmic inflation) expanded to fill the cosmos in less than a second, why not this second one.  I asked this on the astronomy stack if anyone else is curious.
https://astronomy.stackexchange.com/questions/47708/cosmic-inflation-was-faster-than-light-why-would-a-false-vacuum-decay-bubble-on
For this fictional scenario I assert that false vacuum decay would occur as fast as it did the first time with the cosmic expansion.  Everything in the universe would be reset in a tiny fraction of a second, again.


Does nginx have worthy attributes?

Question: In my particular case, I'm using nginx on a group of machines I inherited that are no longer running their own mail servers and all of our web traffic is either static or fastcgi. I had never used nginx before, and now I'm left with the decision of taking the effort to replace it with something I'm more familiar with or learning something new, but I don't know enough about it to know what benefits having it under my belt would hold.
Comment: I should I mentioned my normal choice is Lighttpd, not Apache.
Answer: I am currently using nginx on a single web server. It hosts mainly static content, some PHP, some Python, and some Ruby. The reason I chose it was for the lightness. I find it to use significantly less memory than Apache and I have had no problems with it thus far. My page load times have even decreased slightly.
I think the main benefit is the lightweight factor. If you are looking for a simple and clean web server, nginx offers a great option.
Comment: your load time has increased or decreased?
Comment: Sorry, decreased. Typo :P
Answer: nginx usage in the Internet is increasing. It's a very lean and fast server, often used as a reverse proxy for e.g. load balancing, but it does a great job on its own. It has great community support and is actively developed by the original author.
I think it's worth to know this tool.
Answer: I can't recommend nginx enough, combined with php-fpm and xcache its excelled in performance compared to every other web server I've ever tried (Apache, IIS, Lighttpd).
Extremely flexible, extremely fast, only downside is it takes a while to get setup.
Answer: We've been using nginx as a reverse proxy at work for a long time, and I've recently started using it for php and python projects at home. So +1, definitely worth knowing.
Things feel blazing fast, even on low-end hardware.
Answer: I use it due to it's light weight, but I keep Apache around to handle any pages that absolutely require it (such as those dependant on dynamically updated .htaccess files).
I found a nice way to share a PHP process between the two of them: see my answer at stackoverflow here: https://stackoverflow.com/questions/574690/sharing-php-cgi-between-apache-and-nginx

Does nginx have worthy attributes?


I grabbed and used wrong oil on my 2014 Chevy Silverado

Question: I put 0W30 in my 2014 Chevy Silverado instead of 0W20.  Do I need to change the oil right away or will that be fine ... I live in Massachusetts if that matters.
Comment: Welcome to Motor Vehicle Maintenance & Repair!
Answer: It shouldn't damage anything, however, you're going to want to get it changed as soon as possible. The reason for this being, it has the propensity to mess with the variable valve timing aspect of your engine. The computer is expecting a certain weight of oil to be used and how it will behave. Thicker oil will run differently, which could cause it to throw a code. Since you have oil in your truck and it's (at least I take it it's running, lol), it shouldn't cause a big issue, because oil does what oil does (you know, lubricate, cool, etc.). You just need the required oil to ensure it will continue to do it.


Changing Models in a Minecraft Resource pack

Question: As I have said in previous questions, I make resource packs for Minecraft. I am working on a new one, and after seeing others, I would like to change the shape, to make them 3D (e.g. Sword is not flat, Trees have indentations for the bark). I know you need to use the models file of a resource pack, but when I go in to change it, I don't understand what to do. Thanks!
Comment: To my knowledge, the model files are json files saving the raw data how the model looks like. You can't just edit these files directly. There are some resource pack "maker" programs which are able to edit these files and present you with a WYSIWYG (what you see is what you get) 3D editor.
Answer: Actually, you can edit .json files. You just need to use something like Notepad++ and know how codes work. When you "save" I'm pretty sure it stays a .json
Or, if you want to "save as", you have to change to "all files" and rename it with .json
If you don't do that, the file will just save as a .txt
Your computer should understand what you're doing and make it a .json
This is for windows though, I'm not sure how Mac works.
Answer: I use Mr. crayfish's model creator (http://www.mrcrayfish.com/tools.php?id=mc) to create models and resorce pack workbench (http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-tools/1265199-tool-resourcepack-workbench-resource-pack-creator) to import them.


Warning image in Gparted

Question: Suddenly I have got a warning symbol (at /dev/sda2 partition) in my gparted display.

What does it mean? What's wrong with my HDD? Help me correct it.
Comment: right click on the drive and click properties
Comment: you can't do nothing with that until you remove the exclamatory mark. Just check for bad-blocks.
Comment: @sbergeron: You should write your comment as an answer.
Answer: Generally that symbol just means there was a problem accessing the data within the partition, either because of an unsupported filesystem or some other issue. Try right clicking on the partition and then clicking on "Information"
Comment: Just an extra tip, I recently backed up my hard drive, and got this error. What helped me is reconnecting the drive.
Answer: An exclamation mark beside a partition means that GParted encountered a problem when reading the partition.  With NTFS the most common problem is that Windows was not shut down properly and that the NTFS file system is in an inconsistent state.  An inconsistent NTFS file system can be fixed often by just booting into Windows (Windows should automatically run "chkdsk" on the partition) and then using the menu option Start -> Shutdown.  If that doesn't work, you can also run "chkdsk /f /r"  on the drive letter for the partition from a Windows command prompt and then reboot into Windows twice.
Comment: It is not working for me.
Answer: What you are seeing is just an indication that this partition does not yet contain a filesystem. Right clicking on the line that shows the exclamation point in a red circle will bring up a context menu that allows selection of a filesystem to format the partition with.

Warning image in Gparted


Enable comments option

Question: I have tried ticking comments and discussion but still don't seem to have a comments box. Even went through and ticked individually for each post. Help!
Answer: Try to follow this steps and create a new post.

Settings > Discussions > checked to allow comments
Post > Screen Options > Discussions are checked

Let me know incase of any query/concern.
Answer: Try temporarily switching to another theme(f.ex. TwentySixteen) and see if the comment box shows with that theme activated.
If so, the theme you're using might not have included commenting in the first place. Then you should(preferably) make a child theme, and add the following code below the content code:
<code><?php comments_template(); ?>
</code>
Usually inside single.php

Enable comments option


Appstore Flutter App Rejection Because of In app purchuase

Question: My app is rejected because of in app purchase. I am using in_app_purchase 0.3.0+2. How can I put "Restore" button for ios?

We found that your app offers in-app purchases that can be restored but does not include a "Restore Purchases" feature to allow users to restore the previously purchased in-app purchases, as specified in the "Restoring Purchase Products" section of the In-App Purchase Programming Guide:
Users restore transactions to maintain access to content they've already purchased. For example, when they upgrade to a new phone, they don't lose all of the items they purchased on the old phone. Include some mechanism in your app to let the user restore their purchases, such as a Restore Purchases button.
Next Steps
      To restore previously purchased in-app purchase products, it would be appropriate to provide a "Restore" button and initiate the restore
  process when the "Restore" button is tapped by the user. Note that
  automatically restoring purchases on launch will not resolve this
  issue.
Comment: You just need to add a "Restore Purchase" button in the iOS part. So when user click that button, the previously purchased items will be unlocked.
Answer: you can use login/signup method for save all purchased account in your own server and the user can login with another device and login and then can restore purchased service. or you can just use apple id [queryPastPurchases] to get past purchases.


Are composite REST (or composite graph) subject to rate limits (in addition to the API request limits & allocations)?

Question: In additions to details given in API Request Limits and Allocations & Composite Resources, are the composite REST (or composite graph) requests also subject to rate limits (i.e. per hour & per user; considering the requests use a session ID from Salesforce). Couldn't find any definitive documentation around this.
Answer: The first link you posted is the general rule for all API calls, no matter what type, including the Composite, Composite Tree, and Composite Graph API calls. Each API call counts as one call towards the daily limit, which is metered over a 24-hour rolling window. Note that Lightning, Visualforce, and Aura server calls are not considered API calls for the purposes of these limits.
Some APIs do have additional restrictions, such as the login method (limited to once per second), and Chatter (limited to one polling call per minute), etc, that will be called out on those specific documentation pages. If no other restrictions are listed, the global API Request Limits and Allocations rules apply.
Comment: I believe the [Chatter Rate Limits](https://developer.salesforce.com/docs/atlas.en-us.232.0.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_chatter_rest.htm) are applicable for composite APIs as well. Will update here if I'm able to confirm the same.


Why do I earn more experience than my co-op partner?

Question: My boyfriend and I started playing Diablo 3: Reaper of Souls on our Xbox and noticed that something is wrong with how we gained experience. Even when he killed the monsters and I just stood by and "watched", I was the one leveling up very fast. Has anyone had the same experience?
Comment: Everyone in the area should get the +XP from the yellow pools. I'd check for +XP on your equipped gear.
Comment: Are you a lower level than the are?
Comment: Have you clicked on any yellow pools? Do you have any additional +XP gear equipped?
Comment: No, i took away every +XP equipment ... But the weird thing id that he clicked on the yellow pools and i got all the experience... And we are the same level or better put we were the same level when we started
Comment: @Adeese only if they were present on the map when the pool was clicked on. I'm not sure if it's possible to be on different maps at same time on the console version though.
Comment: [Related question](http://gaming.stackexchange.com/q/69938/61395)
Answer: Everyone within a certain radius of a kill gets XP, so it doesn't matter whether you're 'putting in the work' or not. How much XP everyone gets is dependent on a number of factors, but the most likely culprit is gear. Have a look at your equipment and see if anything is giving you 'bonus XP on kill'(which is not necessarily 'bonus XP on your kill'!).
As @Timelord64 notes, Diablo level curve is exponential: each level requires more XP than the one before it. So if you're significantly lower levelled than your partner, you may find that you gain levels more quickly. Generally the level curve means that the level difference will shrink if players are earning XP at the same rate.
Comment: Perhaps you could go into it a bit more then the comments do? provide insight in to what OP should look for, how this would effect the experience gain etc. It might also be of interest to note that OP will level quicker then a higher level with the same experience, due to higher levels requiring more experience then earlier levels.
Answer: This should not happen if you are playing on PC.
Since patch 2.3 experience gained, including all sources of Bonus Experience, is now averaged across all players in a party that are eligible to receive experience.
This might be a bug if you keep receiving different XP amounts.
Diablo 3 Patch 2.3 notes for PC
Comment: Please note that OP is playing on Xbox. I could not find detailed change log for 2.3.0 on consoles, have you?
Comment: @OrcJMR, http://us.battle.net/d3/en/forum/topic/18704213359. Very easy to find with a quick google, but doesn't list the XP changes. That said, this does answer the question for PC. Remember, we answer questions for the community, not just OP. While this will not be the approved answer, it will help other users.
Comment: @Timelord64 Yes, I saw that too, but I can't call detailed a list that has items like "and more", "several skill updates" and even a straight up "including (but not limited to)".


Can gamma rays pass through Geiger-Muller counter?

Question: Im trying to build a custom Geiger-Muller counter with an argon tube ( i'm still choosing to use wether argon 36 or 40 ) . The fact is that the counter will be made of multiple tubes which are all on the path of the radiations .
So my question is :
Can a single or a couple of gamma rays travel through multiple tubes of this kind ? How much energy will they approximately lose by doing so ?
Comment: gamma rays are charge-neutral.
Comment: sorry i meant energy
Answer: This will depend on the energy of the gamma, the size of your tubes, and the density with which you fill them. For typical values the answer is yes. Get the basics e.g. from this old but valid pdf or your favorite book on the subject matter. You can find absorption coefficients e.g. from NIST. And please don't get a heart attack when you compare the prize of isotopic argon to natural argon :) I bet there is no reason for you to go with the expensive solution.
Answer: In the mid-1960s, the US and Soviet nuclear arsenals were being populated with increasing numbers of hydrogen bombs. In the US, this meant that the civil defense units had to switch from Geiger counters (that look for alpha and beta particles) to ionization chambers that could be designed to be particularly sensitive to high-energy photons instead.
The second-generation radiation detectors had high-voltage (~300 volt) sensor chambers filled with air at atmospheric pressure and were made out of aluminum, which excluded charged particles but readily admitted gamma rays.


Are elementary particles ultimate fate of black holes?

Question: From the "no hair theorem" we know that black holes have only 3 characteristic external observables, mass, electric charge and angular momentum (except the possible exceptions in the higher dimensional theories). These make them very similar to elementary particles. One question naively comes to mind. Is it possible that elementary particles are ultimate nuggets of the final stages of black holes after emitting all the Hawking radiation it could?
Comment: +1 great question, I also wondered about this
Answer: This is indeed a tempting suggestion (see also this paper). However, there is a crucial difference between elementary particles and macroscopic black holes: the latter are described, to a good approximation, by non-quantum (aka classical) physics, while elementary particles are described by quantum physics. The reason for this is simple.
If the classical radius of an object is larger than its Compton wavelength, then a classical description is sufficient. For black holes whose Schwarzschild radius is bigger than the Planck length this is fulfilled. However, for elementary particles this is not fulfilled (e.g. for an electron the "radius" would refer to the classical electron radius, which is about $10^{-13}$cm, whereas its Compton wavelength is about three orders of magnitude larger).
Near the Planck scale your intuition is probably correct, and there is no fundamental difference between black holes and elementary particles - both could be described by certain string excitations.
Comment: So does the last bit mean that a black hole could be considered as a ludicrously-excited string (e.g. quantum number $10^{50}$ or something)?
Answer: The short answer is no. Have a look at the wikipedia article on dissipation of black holes.
quote: Unlike most objects, a black hole's temperature increases as it radiates away mass. The rate of temperature increase is exponential, with the most likely endpoint being the dissolution of the black hole in a violent burst of gamma rays.
The possibility of micro black holes from extra dimensions in some string models still has them dissolving thermodynamically into elementary particles as soon as they are formed.
Edit: Herein I have been replying to the question stated clearly in the last sentence:
Is it possible that elementary particles are ultimate nuggets of the final stages of black holes after emitting all the Hawking radiation it could?
Not to the different question that people seem to be replying to: "are black holes like elementary particles."
A yes answer to the latter, does not reply to the former, i.e. whether quarks and leptons are the nugget, what is left over, from a black hole. A yes answer to this last would offer the intriguing model of the snake eating its tail, maybe quite probable in some new more encompassing theory, but not foreseen now, at least from the answers given. If after shedding innumerable quarks leptons and photons and entropy on the way, a black hole ends up as an electron (for example) in an identifiable quantum mechanical history.By this last I mean something similar to a decay chain in nuclear cascades.
Comment: No body knows for sure the final stages of black hole evaporation. There may be "likely" scenarios but hardly any mathematically rigorous answer. The final fate of a black hole is certainly an open question. BTW, I am also curious about what temperature has to do with the question?
Comment: @ sb1 The quote says that due to exponentially increasing temperature the end of the black hole dissipation will be an explosion into gamma rays. If the temperature is not increasing, no explosion? Now the answer by Daniel Grumiller covers the question of how small a black hole can be, imo.  Black holes are a classical object. They are too large to be quantum mechanically coherent as one object, imo. I might be wrong, and string theory might pull a rabbit out of the hat, but not with what we know now.
Comment: Black holes don't have any fixed size. At the final stages they are certainly very small to be treated as quantum object. In fact one must apply quantum theory to understand the final stages.
Comment: the negative specific heat that you quote does not, however, apply to all black holes; it applies to Schwarzschild or Kerr black holes in 4D asymptotically flat spacetime (which astrophysically are the most relevant ones), but not, e.g., to black holes in AdS (at least on the right side of the Hawking-Page phase transition). Also, I am not sure why the concept of temperature would be relevant for the question?
Comment: I am replying to the direct question of whether the elementary particles we know, quarks, leptons I presume can be the end result of dissipating black holes. It is interesting that at the planck scale black holes might have attributes like  elementary particles but we are not at that scale?
Answer: Yes, black holes are special kinds of elementary particles. That's how they have to be represented in every consistent quantum theory of gravity. This representation of a black hole becomes especially useful and important for small black holes - whose mass is not much larger than the Planck mass.
And indeed, a black hole evaporates, which is just a form of a decay of a heavy elementary particle, and when it becomes very light, at the end of the Hawking evaporation process, it is literally indistinguishable from a heavy elementary particle that ultimately decays into a few stable elementary particles.
However, a difference that you seem to neglect is that black holes actually carry a large entropy
$$ S = \frac{A}{4A_0} k_B $$
where $A$ is the area of the black hole's event horizon and $A_0$ is the Planck area $A_0=\hbar G / c^3$. The constant $k_B$ is Boltzmann's constant. This means that there actually exists a huge number of microstates
$$ N = \exp(S / k_B ) $$
and a single black hole, with a fixed value of mass, charges, and spin, is just a macroscopic description of the ensemble of $N$ "microstates". In reality, the black hole carries a huge information - the world distinguishes which of the $N$ microstates is actually present.
It is these "microstates" that are really analogous to types of elementary particles. But the number of particle species that macroscopically look like the black hole of given mass, charges, and spin is not one: instead, it is huge, approximately $N$.
Comment: All this is fine and good. Black holes may behave like elementary particles in string theory, but can the electron, for example, be the last stage of the dissipation of a black hole?
Comment: @anna v I understand what @Luboš Motl said as implying that there is no difference between particle "remnants" and particles emitted as Hawking radiation in the final stage of black hole decay. The planckian black hole just decays into a bunch of particles, probably including some electrons in the final state.
Comment: "String Theory *is* the real world". This statement needs justification to those of us who would expect the statement "String Theory is a *scientific theory* of the real world". There is a large gap between these statements that would require several Stack philosophy questions to get to clarification, I suspect.
Comment: Dear @anna, yes, the electron is pretty likely to be the last "remainder" of a black hole. Before it becomes an electron, the black hole may be a W boson that decays into an electron and a neutrino. Before it was a W boson, it could have been a much more excited string state. Note that I didn't use the term "string theory" in my answer. There is a confusion in between the lines of your comment: you try to pretend that the answer in string theory and the answer in the real world are 2 things: but they're the *same* thing. String theory *is* the real world.
Comment: Fine, Roy. What I meant is that "the answer to the question how XY behaves in the real world" is the same thing as "the answer to the question how XY behaves according to the best theory describing XY et al. that we have," and in the case of the character of black hole microstates, it's string theory. However, the conclusion that black hole microstates are continuously connected to (other) elementary particle species - there's no qualitative difference - doesn't really depend on specific features of string theory. It's a general fact that strings just confirm and make more specific.
Answer: The other answers here are fine.  Another point that should be stated is that if you believe in the naïve values of the angular momentum, charge and mass of most elementary particles, and plugged them into the Kerr-Nordstrom solution, you would find that almost every (and probably all of them, I just haven't checked) elementary particle would be a naked singularity, not a black hole--the charge and angular momentum of these objects would be too large to support a horizon.
Comment: @sb1: so, you're using the no hair theorem, which is a classical GR theorem to develop intuition for a conclusion, and then rejecting an argument based upon classical GR?  It's far more likely that what quantum gravity will do is eliminate singularities than it is that it will change the horizon structure so that you can super-spin and super-charge mini-black holes.  Also, what do you suppose we get an intuition from, if not classical GR?  Last I checked there was no coherent quantum theory of gravity.
Comment: Why am I bound to use classical theories? If we can describe black holes in terms of a correct quantum gravity theory, the necessary modifications might help to avoid the naked singularity. Whether the suggestion is right or wrong I don't know. What I do know is outright rejection of the idea on the basis of classical GR is not helpful.
Comment: @sb1: I have no problem with that--my problem is selectively using knowledge of General Relativity.  There is no model of a black hole with an angular momentum an order of magnitude larger than its mass.  So why call the thing a black hole at all?
Comment: What's so wrong about using a low energy effective classical theory like GR to build intuition about the nature of black holes. In physics it is always valid to hold certain principles (like N.H.T.) valid in a more general theory, in this case QG. The last time I checked there was an yet to be experimentally confirmed but very sensible quantum theory of gravity called string theory. People are using it to calculate many features regarding black holes.
Answer: The entropy of a black hole is a measure of the number of microstates, where for $N$ degenerate microstates the entropy is $S~=~k~log(N)$, which is associated with gravity.  The entropy for large $N$ is determined by the area of the event horizon $S~=~kA/4L_p^2$, where for the Schwarzschild black hole $A~=~16\pi M^2$.  The black hole is a system which holds a set of states with energy $E~=~M$ in a degeneracy $g(E)~=~exp(4\pi E^2)$ and the partition function is
$$
Z(\beta)~=~\sum_E e^{4\pi E^2}e^{-\beta E}.
$$
This partition function is divergent for $E~\rightarrow~\infty$.  The statistics for the number of degenerate microstates for a black hole is unbounded, and thus the partition function diverges. Black hole entropy is a coarse graining microstate states, which has been accomplished in string theory for large $N$.  The horizon area is a summation of these quantum numbers
$$
A~=~16\pi\alpha_p\sum_{i=1}^Nn_i,
$$
for $\alpha_p$ a Planck area.  The quantum numbers $n_i$ determine an element of the horizon area.  The energy is then counted as $E_n~=~\alpha E_p\sqrt{n}$, for $n~=~\sum_{i=1}^Nn_i$
The degeneracy for $E_n$ is the number of ways $n~>~0$ is a sum of $N$ or less positive integers $n_i$.  It is the cardinality of the set of elements $\{n_1,~n_2,~,\dots,~n_m\}$, such that $n~=~\sum_{i=1}^m n_i$ for $1~\le~m~<~N$.   The number of ways a positive integer $m$ may be written as a sum of $m$ positive integers is the same problem as computing the number of ways of arranging $n$ balls in $m$ cells in a row.  The result is a degeneracy for the energy $E_n$
$$
g(E_n)~=~\sum_{m~=~1}^N\left(\matrix{n~-~1\cr m~-~1}\right),
$$
for $N~\le~n$.  We also have that $m~\le~n$, which cuts the degeneracy further in
$$
g'(E_n)~=~\sum_{m~=~1}^n\left(\matrix{n~-~1\cr m~-~1}\right).
$$
The partition function is a summation of the two degenerate sets,
$$
Z(\beta)~=~\sum_{n=1}^N\sum{m=1}^n\left(\matrix{n~-~1\cr m~-~1}\right)e^{-E_p\alpha\sqrt{n}}~+~\sum_{n=M+1}^\infty\sum_{m=1}^N\left(\matrix{n~-~1\cr m~-~1}\right)e^{-E_p\alpha\sqrt{n}}.
$$
The two portions of the partition functions play a role at $n$ small and $n~>>~N$, and may be computed independently.  The convergence occurs for $n~>>N$ with
$$
Z(\beta)~\simeq~\sum_{n~=~N+1}^\infty(n~-~1)^{N-1}e^{-\beta E_p\alpha\sqrt{n}}
$$
This is a convergent partition function.  Conversely for a low black hole temperature $n~<<~N$, the degeneracy from the binomial theorem is $g'(E_n)~\simeq~2^{n-1}$ and the black hole entropy is $S~=~k~ln(2^{n-1})$ $=~(n~-~1)ln2$. The area $A~=~16\pi\alpha^2n$ permits us to set $\alpha~=~{1\over 2}\sqrt{{ln2}\over\pi}$.
The above calculation can be looked at according to strings.  By holography the horizon is covered by strings which define all the quantum information which entered the black hole.  A generating function for stringy density of states computes a function which is similar to the above, and in the holographic setting describes the black hole as a string sphere on a stretched horizon.  This part is a bit involved, so I will jump forwards to say that a black hole may be thought of as a statistical state or phase of strings.
These quantum numbers associated with Planck units of area of the event horizon.  This is in keeping with the naturalized units of G = [Area].  These quantum numbers can include a range of quantitites, particular mass, angular momentum and electric charge.  The horizon exists as a radius
$$
r_\pm~=~m~\pm~\sqrt{m^2~-~Q^2~-~J^2}
$$
which corresponds to the outer an inner horizons.  With the term in the square root is zero the two horizons meet and the spacelike region between them is "squashed" into an $AdS_2\times S^2$.  This is an extremal black hole, which has zero Hawking temperature.  In general these charges can be supersymmetric, or supercharges.  In the extremal case these charges are at the BPS bound.  In this case all the quantum numbers associated with those unit areas define an object which is similar to an elementary particle.
Comment: use "\sim" for $\sim$


What to do when a question is migrated here but it really doesn't belong?

Question: This question in particular caught my attention. I think it's been well established at this point that CSS questions involving code belong on SO so I am unsure why it was migrated here. What should we do when something like this occurs?
Comment: Do your moderator tools allow you to bounce it back?
Comment: It does. I'm just unsure if that's the right approach as it is my understanding that the powers that be frown upon multiple migrations.
Answer: You could bounce it back with apologies and a comment linking to this question: What is the status of HTML/CSS layout questions on SO?
Unless you're aware of a way of contacting the moderator there who bounced it here, there's probably not much more you can do.


Turning remote control signal into audio

Question: Is there a way to convert the IR signals from remote controls (for TV's, DVD players, etc.) into audible sound signals? There is a good circuit online, but it uses the CA3237E which is obsolete, so now I'm stuck. How would you demodulate the IR signals? With a 4046?
Comment: You mean something like this http://www.youtube.com/watch?v=mFx1fd06qxw ? (this is a link to the Advent Calendar of Circuits by  Alan Yates).
Answer: I am not sure why you would like to do that but a simple IR receiving diode and a preamp connected to an audio amplifier would do the trick. Be aware that most IR transmitters for TV controls transmit the codes using a subcarrier frequency that will be above the human audible range.
Take a look at a device like the TSOP-38238 (link) as an example.
Answer: You certainly can't hear the 38 - 40 kHz tone bursts. But you certainly can hear their envelope, which is about ten to twenty times lower in frequency. So if you simply connect an IR-remote receiver up to an audio amp, you'll hear a very short burst of some kind of tone. What exactly you hear depends on how bits are encrypted, and how many bits are sent.
Your ear won't be able to decode the bits, but you'll hear something.

simulate this circuit – Schematic created using CircuitLab


How do I include a port into FreeBSD distro?

Question: I want to build my own FreeBSD installation media (an .iso file to burn on a DVD) with selected ports. What I mean is: I use a DVD to install new system, and after installing it I can (for example) use git and gcc49. Is that possible? I know it's possible while compiling source code for ARM's (like Raspi or Beaglebone), but is that possible for i386/amd64 version? Googling gave me nothing and so do posting on official FreeBSD forum. Thank you in advance for your answer. Greethings
Comment: Read [this post](http://daemonforums.org/showthread.php?t=2026)
Comment: thank you for a quick response, eyoung. Unfortunately, m0n0wall's dev handbook is a bit outdated (last update was ten years ago), and FreeSBIE boots from CD. Is there anything else?
Comment: Can you not install freesbie from a FreeBSD install port?  See the [Official Website](http://www.freesbie.org/) and install the [toolkit](http://www.freshports.org/sysutils/freesbie/).  I apologize for not being clear, but I believe the toolkit can be used to "roll your own ISO", which is what you want...
Answer: I was about to answer this question with a link to the release man page and go into great detail about how to build packages and include them in releases etc.
But then I realized that your question is mixing up which packages are installed after the install. Packages are no longer included in the ISO, you can install the packages by installing them from the network post install by running pkg install packagename.
Comment: so you want to say that pre-install programs in my release is not possible? okay, then :( So another idea: you say that I can build packages and include them in my release. Do I have to build ALL packages, or can I remove those I will not use (in example games, arabic or japanese packages etc.)? If that's possible, how do I do this? Thank you in advance :)
Comment: What I'm saying is the installer no longer installs packages of things from ports. You can install them after the OS is installed. The packages the project provides will probably work for you, but If you want to build your own packages, you can. You'll just need to setup poudriere to build and a pkg repo to install. Setting all that up is more than I can explain in the space provided in comments here. See https://www.freebsd.org/doc/handbook/pkgng-intro.html and https://www.freebsd.org/doc/handbook/ports-poudriere.html


Differential Voltage Measurement

Question: I've read various posts regarding differential voltage measurements.  I'm confused as to why it seems virtually impossible to measure differential voltages that are high relative to ground (like differential between 251V vs 249V) and feed that value to a microcontroller.  The challenge appears to be due to the fact that the A/D chips have limits of the voltage you can apply relative to the Vcc.  It becomes more complicated if you want to multiplex various differential measurements to the microcontroller. I've seen various discussions on this topic and no compelling methods, but every handheld battery powered digital multimeter appears capable of performing the function with the exception of the data transfer to the microcontroller.  Does anyone know how the multimeters acheive this?
Comment: was this for DC current sensing or AC?  They have DC HV current sense IC's for this range
Answer: If you have a floating supply (battery) then there are no absolute or earth ground stresses of offsets or common mode voltage issues to deal with.
The usual limitation is that the signal must be inside the supply voltage rails or even inside 2V away from the rails. Some are design to work a bit below ground (PNP inputs) or above V+ rail somewhat (NPN inputs) but not likely 250V above the supply voltage to the chip. ( but possible at higher expense.)
It is possible however to design a custom solution to perform this task in a ground referenced system or use a positive supply reference with a small negative rail, or AC couple or attenuate within the supply range , then amplify the difference.  There is one chip I know with ADC with (DC isolated) differential inputs for high voltage measurements.
Also here is a Diff Amp with +/-270V CM linear range and  +/-500V CM protected range.
www.analog.com/media/en/technical-documentation/data-sheets/AD629.pdf
This works due to 20:1 reduction of  input signals with precision matched R's.
77 dB minimum CMRR @ 500 Hz
Comment: could you provide a link or part number to the chip you referenced?
Comment: ok I'll include in answer
Comment: was this for DC current sensing or AC?  They have DC HV current sense IC's for this range. Can you use galvanic isolation solutions?
Answer: To ground-reference and subtract two signals that are  very close to each other is difficult because you are basically subtracting two large numbers to get a much smaller difference.
If you measure a voltage of 251V with an accuracy of 0.1% and a voltage of 249V with an accuracy of 0.1% the difference could be in error by as much as +/-0.5V, which is an error of +/-25% (of  the difference). If your object is, for example, to balance battery cell voltages that's nowhere near good enough.
Now if you can subtract the two voltages before either shifting to ground or using a galvanically isolated circuit it becomes relatively easy to get high accuracy.
Multimeters are galvanically isolated. They don't know what the voltage is on their inputs with respect to ground- all they know is the difference between the input terminals (this has some complications with AC inputs). You can do the same thing as a voltmeter by (for example) using a DC-DC converter to power a circuit sitting on the 249V input and then subtract the 251V and transmit the difference to ground. It could be digitized and sent serially, or level-shifted with an analog current source, for example.
In fact, using that method it's possible to measure voltage differences that are millivolts or even lower, even when sitting on top of hundreds of volts- or even much, much higher voltages.
Comment: Thanks.  When you say "sitting on" do you mean the 249V is powering the DC-DC converter, which is powering the circuit, or can the DC-DC converter be powered from an independent source?  All the differential A/Ds I've looked at seem to require the inputs to be less than the Vcc for the chip.
Comment: An isolated DC-DC converter could,  say, be powered from a 5V source (say connected to your microcontroller ground) and one side of the output connected to the  249V input, so the ADC would be at 249V ADC GND/254V ADC Vcc with respect to ground. There are other possible approaches. Some kind of input protection would probably be required.

Differential Voltage Measurement


Expired passport with current Tier 2 General visa

Question: I have a Tier 2(General) UK visa with BRP card separately issued. My passport is expiring in 6 months time and I need to renew it soon. Do I have to inform UK immigration that I have a new passport?
Answer: From the official UK Government web site:

You don't have to transfer your visa - you can carry both your old and new passports when travelling to or from the UK instead.

You can transfer your visa to your new passport if you wish, but this costs money. Because carrying both passports is free, you might not wish to spend the money.
Remember to inform your country's passport service that you need the old passport returned because it has valid visas in it.


What is meant by "shallow density profile" in the context of dark matter halos?

Question: Evidently there is a consensus about the density profile of dark matter at large distances from the centers of galaxies, but it is not known whether their density profiles are "shallow" or "cuspy". What does this mean? Is this a statement about whether the density is getting larger towards the center, or the rate at which it is getting larger (or smaller)?
Answer: The issue here is how concentrated the dark matter density profile is near the center of galaxies, and how sharply the density falls off with distance. Cuspy profiles are peaked near the center and fall-off rapidly, and shallow profiles do not exhibit a strong peak and taper off more slowly. Here I am intentionally being vague, see the references below for more details.
http://en.wikipedia.org/wiki/Cuspy_halo_problem
http://arxiv.org/abs/0910.3538


I can't access NEI

Question: I can't Access NEI, even though I have the mod installed.  I can't find the options tab, and the items or the options tab doesn't show.
Comment: Can you give us a screen shot of your game when the inventory screen is open?
Comment: Press o when you're in the inventory.
Comment: How do I send a screenshot
Comment: @XCrafted 1 Month late, but whatever... Make sure that your MC is not in fullscreen mode, open your inv, then press the `PrtSc` keyboard key. Upload it to an image sharing site like [imgur](www.imgur.com), and send us the links.
Answer: Try pressing "O" when in your inventory
(NOTE - It doesn't show when in creative inventory)
Also, do you get a "..." button in the top right of containers (when opened)?
Comment: It does show on the survival tab of the creative inventory.
Comment: It does? Whenever I go into the creative menu it isn't there, must be a new update or something. (I'm on about item list on the right).
Answer: NEI is meant to be a survival mod (technically cheating) but can be accessed by pressing "O" in the survival inventory. From there, you can press/hold shift to get an infinite stack of whatever (as long as you open your inventory before 128 is gone). To change these, you must go to the "mods" section of the options screen. You can mess around with all the mods you have installed to minecraft. You select "Not Enough Items" and go from there
Comment: This does not cover anything new in regards to the question. Also, the `mods` section in MCF does not allow you to configure mod configurations.
Answer: First and foremost, if you use NEI you need to also have the mod CodeChickenCore to be able to run NEI.
After you've put both of them in the mods folder and started a minecraft world, if you're in creative you cannot access it unless you press the chest tab on the bottom right(as seen in image).
This tab is almost like your inventory will look like in Survival Mode, except id doesn't have the crafting grid.
Once you've opened that tab you should be able to see NEI.
If you're in survival, then the NEI will be shown.
If it doesn't show in survival, try pressing the "O".
(NOTE:the image is from Vanilla minecraft so there isn't an Options tab there. Once you have both of the mods in the mods folder it will show it though.)
Answer: Pressing O should work. If not, go into options\video settings and make sure the key under NEI is bound.
Comment: You didn't add that the key might not be bound.
Comment: This adds nothing not already said.

I can't access NEI


Bike frame identification for my giant bike

Question: I have had this bike for a while and love it. I have been told it is a Giant brand bike but I have no Clue what type it is. I wanted to get the original parts for it. Someone had painted it black and I can not find any numbers on it. Just the Giant logo.
Comment: At first glance I'd say its a mongrel - a bitser bike made from different sources.   The fork look too long for the bike and the handlebars are a different style.   Can you talk to whoever you got the bike from originally ?
Comment: Actually, a month ago you asked about the logo on the head tube, here on SE.  The question is https://bicycles.stackexchange.com/questions/77564/can-someone-help-me-figure-out-the-identity-of-my-bike-here-is-the-logo linking here for relevance.   This is a subtly different question, though related.
Answer: The frame has some distinctive features, like the bottom bracket location and the connection top tube - seat tube.
After a quick search on the internet for images of "giant bicycle cruiser urban" and "giant bicycle" I was lucky enough to strike this picture:

which indicates your bicycle is a Giant Suede. The year may vary.
Nice bike, I am glad you are enjoying it.
BUT
for peace of mind I would recommend you to have a look for the serial number if the bike is being missed by someone (I am not accusing you or who gave the bike of any crime, it could have been painted for thousands of reasons, c'est la vie, I am just a bit worried about the owner missing what it seems a great bike).
Comment: Awesome find!  Looks like even the saddle might be original, and the only things that have changed are the loss of the chain case, and the missing front brake.


allow client to upload Layers to Openlayers 3

Question: I want to allow the clients to add vector layers in form of a geojson to openlayers 3. It should look like in this fiddle . I know how to add multiple layers but I want the client to be able to add a Layer and see his added layer. The layer doesn't have to be saved for his next visit at the page.
Answer: there are two different way you can try,
1) you need to host your web server to receive the file that client uploaded. The file will be processed in your server and return the geojson file to the front-end.

here is an example (with php)

http://www.w3schools.com/php/php_file_upload.asp

then you will get a geojson file to show in ol3.

2) the other one is using File API to process the file without write the server side code, and read the file content to show in ol3.
dev.w3.org/2006/webapi/FileAPI/
i also make a pure javascript lib to convert zip file with shp, dbf to geojson,
just like user upload their file and show in ol3.

http://gipong.github.io/shp2geojson.js/

(this demo support .prj so no need to set EPSG and assign proper Encoding to show correct attribure in ol3)
Answer: I was able to upload a KML file at client side using HTML5 FileReader.readAsDataURL()
I followed this for uploading simple text file and restrict to kml files
Following the above tutorial, use reader.result as URL to set source of a vector layer to the kml file to be uploaded. Then add the vector layer on to the map object. I hope its clear if you have some experience with OpenLayers 3.


Read/Unread email option does not hold, reverts to Most Recent in Galaxy S3 4.1.1

Question: I like to sort my email by read/unread on my Galaxy S3.  I could set that option in the sort by before I upgraded to 4.1.1.  It worked great before the upgrade.  Now it just reverts back to the Most Recent (by date) option.  I have to set it to sort by read/unread everytime I read my mail now.  Any ideas how to set a sort option which will stick?
Answer: It works fine on my S3 with Android version 4.1.2 (build number JZO54K.I9300XXEMC2). It might be a bug in Samsung's email client, which they fixed in the 4.1.2 update.


Is there a list of Ethereum Dapps that have confirmed moving over to EOS?

Question: People say Ethereum dapps are moving to EOS platform. But where is this list of Dapps? And which ones are the most active that is actually moving to EOS?
Answer:
But where is this list of Dapps?

There are various aggregators of active dApps on EOSIO:

DappRadar, a website that also has a section for Ethereum dapps
EOSIndex
EOSProjects

Is there a list of Ethereum Dapps that have confirmed moving over to EOS?

I'm not aware of any resource that tracks dApps based on what platform they're moving from. There have been discussions in public forums and various comparisons, but nothing particularly organised to my knowledge.


flux on 13.04 unable to set preferences

Question: I installed flux from the Kilian PPA, which installs fine. i run the app and the icon displays in the tray.
however, when i try to set my preferences, the menu does not ever appear. i found the flux log in /tmp and am hoping someone here can decipher it for me
Traceback (most recent call last):

  File "/usr/lib/pymodules/python2.7/fluxgui/fluxgui.py", line 381, in <module>
    app = Fluxgui()

  File "/usr/lib/pymodules/python2.7/fluxgui/fluxgui.py", line 22, in __init__
    self.settings.zipcode, self.settings.color)

  File "/usr/lib/pymodules/python2.7/fluxgui/fluxgui.py", line 48, in start_xflux
    self.xflux = pexpect.spawn("/usr/bin/xflux", args)

  File "/usr/lib/python2.7/dist-packages/pexpect.py", line 430, in __init__
    self._spawn (command, args)

  File "/usr/lib/python2.7/dist-packages/pexpect.py", line 560, in _spawn
    os.execv(self.command, self.args)

OSError: [Errno 2] No such file or directory

Answer: It is missing ia32-libs dependencies.
sudo apt-get install ia32-libs

will do the trick.
The problem is that the binary file /usr/bin/xflux is is expected to run with 32 bits libs, so it doesn't work in a 64 bits Ubuntu without the explicit inclusion of the ia32-libs package.
Comment: Upvoted since this clued me in to the problem.  However, this no longer works.  See my answer below.
Answer: Just got this error in Ubuntu 13.10, where ia32-libs is no longer available.  It appears the solution today is to either manually repackage fluxgui with the new 32-bit packages, or install ia32-libs from the 13.04 repository (not recommended).  See: https://askubuntu.com/a/394156/50450.
I ended up just grabbing the pre-built 64-bit CLI daemon from http://justgetflux.com/linux.html which worked out of the box (Xbuntu 13.10).
Answer: There doesn't appear to be quite enough information here, but can you do:
ls /usr/bin/xflux

From the traceback, I assume that file is missing. If it is, run
sudo updatedb && locate xflux

if it isn't found, remove/reinstall fluxgui, if it is, symbolic link it to /usr/bin/xflux with ln -s
If that file DOES exist, then I am not sure my friend.

flux on 13.04 unable to set preferences


Getting Schengen Visa within a week of traveling?

Question: I will be studying in Spain for 81 days, then a break for 3 weeks, then to the UK to study another quarter. I leave in a week and never got a Schengen Visa because my second quarter plans came last-minute. The UK is not a schengen country, but would need a visa for travel over 8 days total outside the UK later to any other Schengen country. Suggestions for getting a schengen Visa this late in the game? Or will I not be able to visit France or Spain (again) during my second quarter (81 days) in the UK?
Comment: What is your nationality? I don't know, but it might be relevant.
Comment: I am not sure I understand, do you have a visa for the first quarter or not? If that's the case, you still have time to deal with your second quarter, right? Otherwise, your main worry should be being able to spend the first quarter in Spain, not entering again later on. Also, the Schengen country that will be your main destination should handle your visa application. Even though the rules are formally the same, it might make some difference in practice.
Comment: Finally, are you a UK resident?
Answer: I'm not completely understand your travel plan as well, but based on my experience on getting lots of Schengen visa. It usually took me about at most 3 days to get the visa, but that means you're well prepared with all the documents they need. I'm not sure what's your nationality because there's a huge difference in terms of getting a visa for certain nationalities. Also, if you're studying in the UK and want to travel to Schengen area and back to the UK again you need to have at least 3 months left on your UK visa. Otherwise, you need to show an already paid for return ticket to your home country.
Also from my experience the pain is not getting the visa, the pain is to get the appointment. Sometime if you really want it you might need to pay an agency to get the place for you.
Answer: As I am a citizen from one of the Schengen area member states, I have no personal experience to share and I don't know how well it works in practice but the Schengen visa code specifies that you should receive an answer within 15 days of your application so there are certainly no guarantees you can get your visa in a week. Best to contact the relevant consulate as quickly as possible.
Also, I am not sure I completely understand your travel plans but quick visa or not, you need to make sure that you are not going to fall foul of the 90 days in a 180 days period rule otherwise you could face serious trouble (be refused entry and have difficulties when applying for a visa in the future).
Answer: As far as my experience with this matter tells me, you need at least 14 days for a Schengen Visa to be issued.
And since you might be leaving the Schengen area and wanna come back in, you must request a 2 entry visa supported with travel and accommodation reservations for all destinations, otherwise only one entry will be granted.


How can I get the count of line in a file in an efficient way?

Question: I have a big file. It includes approximately 3.000-20.000 lines. How can I get the total count of lines in the file using Java?
Comment: Judging from your comments to answers, the word you are looking for is 'efficient', not 'effective'.
Comment: @Firstthumb: Please don't delete comments *after* people have responded to them. It makes the thread confusing for people who arrive late to the show.
Comment: Why? 20,000 lines is not big. Millions is big. Why do you think you need to know the number of lines at all? If you do, you can count them as you process them. You have to read the entire file just to count the lines. You may as well do something useful at the same time.
Answer: BufferedReader reader = new BufferedReader(new FileReader("file.txt"));
int lines = 0;
while (reader.readLine() != null) lines++;
reader.close();

Update: To answer the performance-question raised here, I made a measurement. First thing: 20.000 lines are too few, to get the program running for a noticeable time. I created a text-file with 5 million lines. This solution (started with java without parameters like -server or -XX-options) needed around 11 seconds on my box. The same with wc -l (UNIX command-line-tool to count lines), 11 seconds. The solution reading every single character and looking for '\n' needed 104 seconds, 9-10 times as much.
Comment: Inspecting every byte should be definitely faster (when using a buffer) because FileReader must decode the bytes to text.
Comment: next question? why don't you do it :D
Comment: What effeciency do you mean? Performance? In that case you will have no better way, because lines can have different lengths you will have to read the complete file, to count the line-numbers (wc does it too). If you speak about programming efficiency than I'm sure you can put it in a utility-method (or some common library did it already).
Comment: @Firstthumb. Not efficient maybe, but who cares. He's only counting 20k lines which is pretty small. This code gets my vote for being the simplest.
Comment: how about the efficiency of LineNumberReader since it extends BufferedReader?
Comment: Nobody says this is better than the LineNumberReader, at least I don't do it.
Comment: I was somewhat sure, that the BufferedReader will work at least as fast as a FileReader and inspecting every single character. I proved that through measuring the time (and actually showed that inspecting every char is far slower). But I think the LineNumberReader-solution will work as good as the one with the BufferedReader. That's why I upvoted that answer.
Comment: For modern Java, the [Answer by Augustin](https://stackoverflow.com/a/35523560/642706) should be the accepted Answer. Uses `Files.lines`.
Comment: @Mnementh: nitpicking: naming the variable `lines` is misleading given that it holds the int count, and not the actual lines. `count`, `linesRead` or `numLines` would be more obvious.
Answer: Files.lines
Java 8+ has a nice and short way using NIO using Files.lines. Note that you have to close the stream using try-with-resources:
long lineCount;
try (Stream<String> stream = Files.lines(path, StandardCharsets.UTF_8)) {
  lineCount = stream.count();
}

If you don't specify the character encoding, the default one used is UTF-8. You may specify an alternate encoding to match your particular data file as shown in the example above.
Comment: Files.lines(path).count(); should not be used directly. Instead use try with resources. Example:: long lineCount; try (Stream linesStream =Files.lines(path) ){ lineCount =linesStream.count(); }
Comment: bed solution . we can have a problem with charset
Comment: charset is UTF-8 by default
Comment: @Mikhail Pass the character encoding of your particular data file as a `Charset` object in the optional second argument. See: [`Files.lines(Path path, Charset cs)`](https://docs.oracle.com/javase/8/docs/api/java/nio/file/Files.html#lines-java.nio.file.Path-java.nio.charset.Charset-). The default is UTF-8; for other encodings pass the `CharSet`.
Comment: Take care though, `path` isn't closed. :-/
Comment: This works as long as you know the CharSet of the file. If you don't know this then it's going to fail for unknown encoding.
Comment: I don't know if this code is very efficient. Big files will use all the memory heap available and cause "java heap space" errors on `stream.count()`
Comment: If the charset does not match with the file, it throws an exception. Handle with care.
Answer: use LineNumberReader
something like
public static int countLines(File aFile) throws IOException {
    LineNumberReader reader = null;
    try {
        reader = new LineNumberReader(new FileReader(aFile));
        while ((reader.readLine()) != null);
        return reader.getLineNumber();
    } catch (Exception ex) {
        return -1;
    } finally {
        if(reader != null)
            reader.close();
    }
}

Comment: You'd probably also need to close() the reader.
Comment: you'd probably to check for reader!=null in the finally block
Answer: I found some solution for this, it might useful for you
Below is the code snippet for, count the no.of lines from the file.
  File file = new File("/mnt/sdcard/abc.txt");
  LineNumberReader lineNumberReader = new LineNumberReader(new FileReader(file));
  lineNumberReader.skip(Long.MAX_VALUE);
  int lines = lineNumberReader.getLineNumber();
  lineNumberReader.close();

Comment: the result is lines `count - 1`
Comment: actually the result is `lines + 1`
Comment: will it work for other files also ? like .csv , .xls, .xlsx ?
Comment: the result is getLineNumber() plus 1 because line index starts at 0
Answer: Read the file through and count the number of newline characters. An easy way to read a file in Java, one line at a time, is the java.util.Scanner class.
Answer: This is about as efficient as it can get, buffered binary read, no string conversion,
FileInputStream stream = new FileInputStream("/tmp/test.txt");
byte[] buffer = new byte[8192];
int count = 0;
int n;
while ((n = stream.read(buffer)) > 0) {
    for (int i = 0; i < n; i++) {
        if (buffer[i] == '\n') count++;
    }
}
stream.close();
System.out.println("Number of lines: " + count);

Answer: Do You need exact number of lines or only its approximation? I happen to process large files in parallel and often I don't need to know exact count of lines - I then revert to sampling. Split the file into ten 1MB chunks and count lines in each chunk, then multiply it by 10 and You'll receive pretty good approximation of line count.
Answer: All previous answers suggest to read though the whole file and count the amount of newlines you find while doing this. You commented some as "not effective" but thats the only way you can do that. A "line" is nothing else as a simple character inside the file. And to count that character you must have a look at every single character within the file.
I'm sorry, but you have no choice. :-)
Answer: This solution is about 3.6× faster than the top rated answer when tested on a file with 13.8 million lines. It simply reads the bytes into a buffer and counts the \n characters. You could play with the buffer size, but on my machine, anything above 8KB didn't make the code faster.
private int countLines(File file) throws IOException {
    int lines = 0;

    FileInputStream fis = new FileInputStream(file);
    byte[] buffer = new byte[BUFFER_SIZE]; // BUFFER_SIZE = 8 * 1024
    int read;

    while ((read = fis.read(buffer)) != -1) {
        for (int i = 0; i < read; i++) {
            if (buffer[i] == '\n') lines++;
        }
    }

    fis.close();

    return lines;
}

Comment: I wonder if using a pre-compiled RegEx Pattern would make it faster or slower. What it would do is work with all line endings, I believe. And, I think it might make it faster, too.
Comment: Some of the above solutions can take advantage of buffering, also, if the benefits would help. For instance, "new LineNumberReader(new FileReader(theFilePathStr), 8096)" or something.
Comment: Be careful about character encodings...
Answer: Old post, but I have a solution that could be usefull for next people.
Why not just use file length to know what is the progression? Of course, lines has to be almost the same size, but it works very well for big files:
public static void main(String[] args) throws IOException {
    File file = new File("yourfilehere");
    double fileSize = file.length();
    System.out.println("=======> File size = " + fileSize);
    InputStream inputStream = new FileInputStream(file);
    InputStreamReader inputStreamReader = new InputStreamReader(inputStream, "iso-8859-1");
    BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
    int totalRead = 0;
    try {
        while (bufferedReader.ready()) {
            String line = bufferedReader.readLine();
            // LINE PROCESSING HERE
            totalRead += line.length() + 1; // we add +1 byte for the newline char.
            System.out.println("Progress ===> " + ((totalRead / fileSize) * 100) + " %");
        }
    } finally {
        bufferedReader.close();
    }
}

It allows to see the progression without doing any full read on the file. I know it depends on lot of elements, but I hope it will be usefull :).
[Edition]
Here is a version with estimated time. I put some SYSO to show progress and estimation. I see that you have a good time estimation errors after you have treated enough line (I try with 10M lines, and after 1% of the treatment, the time estimation was exact at 95%).
I know, some values has to be set in variable. This code is quickly written but has be usefull for me. Hope it will be for you too :).
long startProcessLine = System.currentTimeMillis();
    int totalRead = 0;
    long progressTime = 0;
    double percent = 0;
    int i = 0;
    int j = 0;
    int fullEstimation = 0;
    try {
        while (bufferedReader.ready()) {
            String line = bufferedReader.readLine();
            totalRead += line.length() + 1;
            progressTime = System.currentTimeMillis() - startProcessLine;
            percent = (double) totalRead / fileSize * 100;
            if ((percent > 1) && i % 10000 == 0) {
                int estimation = (int) ((progressTime / percent) * (100 - percent));
                fullEstimation += progressTime + estimation;
                j++;
                System.out.print("Progress ===> " + percent + " %");
                System.out.print(" - current progress : " + (progressTime) + " milliseconds");
                System.out.print(" - Will be finished in ===> " + estimation + " milliseconds");
                System.out.println(" - estimated full time => " + (progressTime + estimation));
            }
            i++;
        }
    } finally {
        bufferedReader.close();
    }
    System.out.println("Ended in " + (progressTime) + " seconds");
    System.out.println("Estimative average ===> " + (fullEstimation / j));
    System.out.println("Difference: " + ((((double) 100 / (double) progressTime)) * (progressTime - (fullEstimation / j))) + "%");

Feel free to improve this code if you think it's a good solution.
Comment: From all the solutions posted in this entry, I think this is the best by far. With very large files it has proven to be a lot faster, as it doesn't make you read the whole file for getting its size at first.
Answer: If the already posted answers aren't fast enough you'll probably have to look for a solution specific to your particular problem.
For example if these text files are logs that are only appended to and you regularly need to know the number of lines in them you could create an index.  This index would contain the number of lines in the file, when the file was last modified and how large the file was then.  This would allow you to recalculate the number of lines in the file by skipping over all the lines you had already seen and just reading the new lines.
Comment: +1 this might be a suitable online algorithm.
Answer: Quick and dirty, but it does the job:
import java.io.*;

public class Counter {

    public final static void main(String[] args) throws IOException {
        if (args.length > 0) {
            File file = new File(args[0]);
            System.out.println(countLines(file));
        }
    }

    public final static int countLines(File file) throws IOException {
        ProcessBuilder builder = new ProcessBuilder("wc", "-l", file.getAbsolutePath());
        Process process = builder.start();
        InputStream in = process.getInputStream();
        LineNumberReader reader = new LineNumberReader(new InputStreamReader(in));
        String line = reader.readLine();
        if (line != null) {
            return Integer.parseInt(line.trim().split(" ")[0]);
        } else {
            return -1;
        }
    }

}

Comment: One side effect, this solution is not cross platform.
Answer: Read the file line by line and increment a counter for each line until you have read the entire file.
Answer: Try the unix "wc" command. I don't mean use it, I mean download the source and see how they do it. It's probably in c, but you can easily port the behavior to java. The problem with making your own is to account for the ending cr/lf problem.
Answer: The buffered reader is overkill
Reader r = new FileReader("f.txt");

int count = 0;
int nextchar = 0;
while (nextchar != -1){
        nextchar = r.read();
        if (nextchar == Character.getNumericValue('\n') ){
            count++;
        }
    }

My search for a simple example has createde one thats actually quite poor. calling read() repeadedly for a single character is less than optimal. see here for examples and measurements.
Comment: What's going to change nextchar here? If you're going to call read() on every iteration, I strongly suspect that a BufferedReader approach will be *much* faster...
Comment: BufferedReader is not overkill here. The code in this answer will be hideously slow - FileReader.read() will pull one character at a time from the file.
Comment: The BufferedReader handles different line-endings well. Your solution ignore Mac-line-endings ('\r'). That may be OK. Anyways, your solution doesn't actual read from the file in the moment. I think you forgot a line.
Comment: And the answer is 'Dramatic' examples given here http://java.sun.com/developer/technicalArticles/Programming/PerfTuning/
Comment: that was the idea ;-/ I wanted to write the simplest possible example. I wonder what the speed difference would be?
Comment: I measured it on my box, Jon Skeet is right, the difference is big. I added the measurements in my answer.
Comment: @nsherwin Dead link


Wrong duration of sound file on android 2.2

Question: I am developing application in which there is a list of some audio files. When I click on a item it plays the corresponding audio and also shows the duration. The problem is in android 2.1 device and emulator the duration is correct but in android 2.2 emulator it's showing wrong duration. Does anyone have idea to solve the problem. Is there a good method to get the correct duration of the sound files. The audio files are in the res/raw folder. And one thing for the same sounds iphone is showing correct duration.
Comment: Are your files in Wav/LPCM format?
Comment: all the files are in mp3 format
Answer: Yes
It is probably due to VBR files. Variable bit rates mention a rate in the header, which is probably used by Android software to calculate the duration of the MP3 from it's length.
I remember having seen a utility that can calculate a 'correct' effective bitrate and prefix a separate MP3 data frame at the start just to make it report the 'correct' (average) bitrate.
Try VBRFix

Throughout a song there are points that require high quality and points that require low quality(i.e. silence). Instead of having the whole file at one quality: VBR(Variable Bit Rate) provides us with a variable quality within the file. This allows us to more efficiently use the file space. The problem is that many MP3 playing programs estimate the time of a MP3 based on the first bitrate they find and the file size. Also, when jumping through a file the positions aren't the same - half way through a VBR mp3 may not be half way through the song. Ogg Vorbis is a more advanced free music format and uses VBR as default without problem

It is also in the repositories for Ubuntu (Debian likely): sudo apt-get install vbrfix

Comment: thank you for giving the solution. I am fixing the VBR with foobar2000.
Answer: I might be a bit late on answering this but, anyway I was able fix a problem of a similar kind using Ringdroid. This is what you'd have to do to get the audio duration in milliseconds from VBR files using Rindroid
public class AudioUtils
{
    public static long getDuration(CheapSoundFile cheapSoundFile)
    {
        if( cheapSoundFile == null)
            return -1;
        int sampleRate = cheapSoundFile.getSampleRate();
        int samplesPerFrame = cheapSoundFile.getSamplesPerFrame();
        int frames = cheapSoundFile.getNumFrames();
        cheapSoundFile = null;
        return 1000 * ( frames * samplesPerFrame) / sampleRate;
    }

    public static long getDuration(String mediaPath)
    {
        if( mediaPath != null && mediaPath.length() > 0)
            try
            {
                return getDuration(CheapSoundFile.create(mediaPath, null));
            }catch (FileNotFoundException e){}
            catch (IOException e){}
        return -1;
    }
}

Hope this helps


How to remove hot water baseboard?

Question: I have a room which is getting too hot during winter and I want to disconnect the hot water baseboard in it from the heating system. Problem is that heating system is a loop and room is in the middle.
Do I have to open the wall and rewire the pipes behind it ?
Is there a less extensive solution ?
Could a zone valve help here?
Answer: Build a nice looking wooden cover and line the inside with 1/2 rigid foam insulation. Place it over the baseboard to insulate it.   There is no fire danger because it's hydronic.
Comment: Nice! Thanks for the suggestion. Will definitely trying smth along those lines.
Comment: Good, If you liked it, please give me an up vote and accept it as an answer.  Mama needs s new pair of shoes! LOL
Answer: If you put the housing back together you will see that there is a movable damper that allows you to block airflow and reduce the amount of heat that gets transferred to the room.
If you are sure you don't want it to put heat into this room, you could remove the finned radiator part and replace that section with a straight copper pipe.  That will allow other rooms that this loop serves to continue to get heat.  A "zone" valve will affect all the radiators on that loop which is OK if that's what you want.
Comment: I have an idea: first, I remove the finned radiator part. Then, I insulate the copper pipe with a 1/2 in. x 6 ft. Foam Pipe Insulation (https://www.homedepot.com/p/Everbilt-1-2-in-x-6-ft-Foam-Pipe-Insulation-ORP05812/204760811)
Comment: Interesting! Thanks for the info. Just to confirm, the pipe which is there already (after removing the finned radiator) is not a copper pipe ?
Zone valve is a bad idea apparently.
Comment: @Lou the finned pipe IS  a copper pipe with radiating fins attached to it. Replacing it with non-finned pipe will reduce, not eliminate,  the amount of heat that is radiated into the room. This requires plumbing soldering skills, turning off the boiler, making sure there is not water or glycol in the pipe so you can get a successful solder joint. Then purging the boiler and the zones/loops of ALL air. The supply pipes may be in the wall or they may be in the floor or a combo of both.
Comment: Thanks @AlaskaMan for the clarification. That is what I was thinking: it is a copper pipe already. No need to replace it then. I will just remove the fins and put some fiber glass insulation on it and see if that cut the heat by at least half.
Comment: I believe the fins are soldered on. I have never seen ones that had removable fins.
Comment: I see. I'll double check which model I have when I get home. Was thinking about cutting them with tin snips. FYI, you have the fin clamp available nowadays (https://www.homedepot.com/p/FabTek-Logic-Fin-Clamp-Baseboard-Element-for-3-4-in-Copper-Baseboard-Piping-1-ft-Section-FCL-75CX1FT/300641178 )
Comment: I checked today. The fins are not soldered. I cut them with tin snips and removed them. I added corresponding pictures to the post.

How to remove hot water baseboard?


What is this growing on my plants and how do I treat it?

Question: What is growing on my plants and how do I treat it? See details on this photo:
Comment: where are you in the world and is this on all your plants? Or just one or two in particular?
Comment: Only on one kind and I'm in South Africa.
Answer: That's honeydew. It's a sugary thing and it is excreted by scale insects and aphids. Wipe it off and spray the plant with insecticidal soap.
Answer: Well it looks rather like a woolly aphid infestation to me - it would have helped to know what plant it's present on though, to help with diagnosis. Depending on how bad and widespread it is, you can spot treat with neem oil or insecticidal soap, or find an insecticidal spray to treat with - but if its fairly minor, you often find other insects coming into eat the aphids anyway. If this is an edible plant, be careful if you choose to use insecticide, it should be one that's suitable for use on edible plants. If it's widespread, and whatever plant it is doesn't mind being pruned, you can cut out the worst affected branches. Info here https://www.gardeningknowhow.com/plant-problems/pests/insects/woolly-aphid-control.htm. Note the insecticide recommended may not be available in your area.


Does pinning an object in the LOH affect GC performance?

Question: I've read that pinning objects in the managed heap affects the GC performance in .NET, because the GC can't compact memory if there are pinned objects "in the way". But since the large object heap isn't compacted anyway, this shouldn't apply to objects in the LOH. Are there any other hidden costs of pinning an object that's in the LOH? Or can I safely pin objects in the LOH without degrading GC performance?
Answer: Well, just because the Large Object Heap (LOH) isn't compacted doesn't mean that it's not collected.  The LOH is collected and pinning an object there will have ramification on future allocations.
Because an object is pinned, it effectively shrinks the amount of memory that is available in the LOH (the same as if you were holding a reference).  When another request to allocate a large object is made, if there are too many pinned/held references in the LOH, you can run into issues allocating more large objects.
When a mark is done during the mark-and-sweep part of garbage collection, the CLR probably marks all references that are pinned as roots so there's probably no impact during this part of collection; it would behave the same way if someone kept a reference to the large object.
Since deallocation happens the same way on the LOH (the block is simply tagged as being available), this operation isn't impacted either.
And finally, since the LOH is not compacted, this operation never takes place on this heap during a GC, so this isn't impacted here.
In summary, allocations on the LOH can definitely be impacted by pinning references to objects on the LOH, while collections on the LOH are most likely not.
Although let's not forget that allocating and holding large blocks of memory can have ramifications on systems in general, these comments are strictly about the LOH.
Comment: Thanks for answer. I'm not sure I get the second paragraph: Why does pinning shrink the available memory more than keeping a reference would? I always though allocating something on the LOH essentially meant looking for a free memory block big enough or allocating a new segment - if so, any live block should be treated the same, pinned or not.
Comment: @nikie: It doesn't do it any more, it just has the same effect (as you've stated).  I've updated my answer accordingly.  It's a small, but significant change.


How to do Question and answers with email notification in drupal 7

Question: To make question and answers for users, I found Answers or Question/Answer modules can be used. But these are only for flow of making questions and answers. If any user (Role: customer) asks question in that site, then that question should sent to the other users (Role: Support). Any suggestions?
Comment: Have you looked at the Rules module?
Answer: Well, this can be achieved using Rules module.
Also refer to this question - https://stackoverflow.com/questions/4463011/drupal-rules-sending-an-email-address-to-a-user-reference


Does nature prefer time-independent mechanical energy equations?

Question: Work energy theorem states that $$W_{total}=\Delta K_{system}$$
From this basic equation we can derive the following equation $$\Delta E_{mechanical}=W_{external}+W_{non-conservative}$$
The above equation is time independent and forms the basis of mechanical energy conservation law.I know the mathematical derivation. I am not sure but I want to know Does nature prefer time-independent mechanical energy equations?
Answer: Nature is. It does not use equations as these are mere approximate descriptions of nature. Physicists prefer to write time independent definitions since these reflect the observation that energy, momentum, charge, angular momentum, spin etc are conserved.


If I use Panels and Views, do I need to use Blocks at all?

Question: My understanding is that if I go the full panels route (i.e. every node is a panel) then I only need to worry about prepping views to populate the panels. Is this the right way to think about it? Or am I missing something in regards to where blocks are still relevant for site building under an all-panels site?
Answer: Well, it depends on what your needs are.  Panels and Views is a very powerful combination that can handle almost anything.  That said, there may still be times when you need or want a block.  For example, the Heartbeat and Revisioning modules both supply useful blocks that I use on my (mostly Panels and Views) site.  Yes, these two modules have Views integration, but their built-in blocks are already configured and easier to use than customizing views to meet my needs.
If you need a custom block and are trying to keep things in Panels, you can add a custom content pane.  As a bonus, such panes can be exported with the Features module if you have a complicated deployment.
Comment: Too simplistic.  Heartbeat blocks, for example, show users "activity streams" similar to the Wall on Facebook.  Blocks, Panels, and Views all provide different ways to display content.  Of the three, the blocks solution has been around the longest and is by far the simplest and least customizable.  However, blocks is also in Drupal core, whereas Panels and Views are contributed (add-on) modules.  The author of Panels, Earl Miles, has remarked before that he sees Panels as a replacement for blocks.  While it is an excellent general replacement, it may not replace all blocks in all cases.
Comment: Thanks Patrick. Are those blocks that you mentioned meant for publishers? Is it too simplistic to consider blocks for backend functionality and panels+views for the audience side?
Answer: I'd say blocks can be very useful when combined with panels, for instance earlier today I had to place a graphic that linked to a newsletter sign up page in a right column of a page that is controlled by panels. I simply created a new block, uploaded an image using IMCE and CKEditor then pulled that block in using panels, much easier than creating a new region in a template.
Comment: Thanks. I'm curious though, what is the difference between creating a new block to show that graphic vs creating a view? I guess I'm looking at it from a Panoply model, where every block-like element is a view of some sort.
Answer: I'm new to Drupal but I'm finding I use all three.  Four really, if you count Mini Panels.  Using all four types of content/display manipulation has let me build a really well layed out site.


Extensions of modules over universal enveloping algebra with fixed central action

Question: Let $\mathfrak{g}$ be a Lie algebra over $\mathbb{C}$, $\mathfrak{z}$ be the center of $\text{U}(\mathfrak{g})$, and  $M_1$, $M_2$ be $\text{U}(\mathfrak{g})$-modules on which $\mathfrak{z}$ acts by a fixed character, say, $\chi$. I'm wondering if there are some theories (and references) about $\mathrm{Ext}^1_{\chi}(M_1,M_2)$, the subgroup of $\mathrm{Ext}^1_{\text{U}(\mathfrak{g})}(M_1,M_2)$ consisting of those on which $\mathfrak{z}$ acts by $\chi$? For example, (vaguely) can it be calculated   by certain kinds of relative Lie algebra cohomology? If it is helpful, we can assume $\mathfrak{g}$ to be semisimple, and $M_i$ to be objects in the category $\mathcal{O}$ (but the extension groups are taken in the category of $\text{U}(\mathfrak{g})$-modules).
Answer: The question is indeed somewhat too vague, since a knowledge of certain Ext$^1_\chi$ would be enough to prove the Kazhdan-Lusztig Conjecture: take $M_1$ to be a Verma module and $M_2$ to be a simple highest weight module on which U($\mathfrak{g}$) acts with the the same central character $\chi$.
References include papers by David Vogan in the 1970s which approached the conjecure.  See also my graduate textbook GSM 94 (Amer. Math. Soc., 2008), Chap. 6 and 8, citing early work by P. Delorme in 6.14 and by D. Vogan in 8.10-8.11, plus lists of errata on the AMS page and my homepage.