IMCE: Prevent deletion if file is in use

Question: Does any one know of a way to prevent a file from being deleted through IMCE if the file is in use?  I saw this feature requested http://drupal.org/node/628246 and there is a comment to state that this feature is already in dev but I'm not finding that this is the case.
Comment: I think that this question as asked is actually a support request for the issue it points to.
Answer: I'm not familiar with IMCE but Drupal core provides a file_usage table that is for locking/unlocking files. These are the functions used to interact with it:
<code>file_usage_add()
file_usage_delete()
file_usage_list()
</code>
Drupal's file_delete() then checks the usage table before deleting a file.
Comment: I think its not related to drupal. IMCE will manipulate files which is completely separated from drupal. it means you have not drupal's file_delete() in IMCE


What is the relationship between the $t$-value of an arc and a Bézier curve approximating that arc?

Question: When an elliptic (or circular) arc is approximated with Bézier curves, for the same $t$ value (parametric time) I get almost the same point on the arc and on the curve chain. Almost, but not quite. The error decreases with increasing number of curve segments that make up the arc (i.e. the more segments I add, the better the curves approximate the arc and thus the closer the point on curve is to the point on the arc for the same $t$ value). But instead of increasing the number of segments for larger arcs, I would prefer to figure out what is the $t$ value on the Bézier curve chain (which curve and which $t$ value on that curve) that gets me the point that is closest to the point at a given $t$ value on the arc.
Comment: The man's name was Bézier. Not Bezier, and not bezier.
Comment: A brief answer below, but don't want to put more time into it until I properly understand what you mean by "synchronize".
Comment: @bubba thanks for answering! by synchronize I mean "what is the formula to get the t value on the bezier curve corresponding to a certain t value on the arc?" I'll update the answer with a better phrasing.
Comment: It's still not 100% clear what "corresponding" means, but I can guess. See revised answer below.
Answer: Let's take a quarter of a unit circle as an example.
The original arc equation can be written
$$
x(u) = \cos\tfrac12\pi u \quad ; \quad y(u) = \sin\tfrac12\pi u
$$
A good Bézier cubic approximation of this circular arc has the form
$$
\mathbf{P}(t) = (1-t)^3(1,0) + 3t(1-t)^2(1,p) + 3t^2(1-t)(p,1) + t^3(0,1)
$$
Usually, $p$ is chosen to be either $\tfrac43(\sqrt2 - 1) \approx 0.5522847498308$ or a bit smaller. Roughly speaking, this minimizes the maximum distance between the cubic and the circular arc. For more details, see this answer, or this one, or this web site.
Now, suppose we are given a parameter value $u$. This gives us a point $\mathbf{C}(u) = \bigl(\cos\tfrac12\pi u, \sin\tfrac12\pi u\bigr)$ on the circular arc.
Apparently, you want to find the value of $t$ such that the point $\mathbf{P}(t)$ on the cubic curve is "close" to $\mathbf{C}(u)$. It would be nice if $\mathbf{P}(u)$ was the closet point, but unfortunately that's not true.
Let's suppose $\mathbf{C}(u) = (h,k)$. At the closest point, the tangent vector $\mathbf{P}'(t)$ must be perpendicular to the vector $(h,k)$. So, we just need to form the equation $(h,k) \cdot \mathbf{P}'(t)=0$, and solve it for $t$. The equation is actually a quadratic in $t$, so it's easy to solve. The solution you want is the one that lies in the interval $[0,1]$.


Accessing download link from the loop with WP Download Manager Pro

Question: I'm new to Wordpress, so apologies if this is a silly question.
I am using the WP Download Manager Pro plugin to upload PDF's to wpdmpro post types. A user has to enter an email address in order to download.
In loop.php I loop through all wpdmpro post types and a specified category and tag
<?php
query_posts(array(
    'post_type' => 'wpdmpro',
    'wpdmcategory' => $category->category_nicename,
    'tag' => $cat_tag
));
?>

Now, I want to loop through each post and access the download link attached to post, but I have no idea how to do this? The docs don't seem to outline this anywhere???
<?php if (have_posts()): ?>
    <?php while (have_posts()): the_post(); ?>
        // ... how can i access the download link on the post here?
    <?php endwhile; ?>
<?php endif; ?>

I have tried...
<?php the_content(); ?>

and
<?php
$post = get_post();
$content = apply_filters('the_content', $post->post_content);
echo $content;
?>

I am at a loss here!
Any help would be greatly appreciated!
Answer: You access the file direct link this way:
<?php echo (wpdm_get_package(get_the_ID()))['download_url']; ?>


How does one programmatically press the "FN" key on a Windows Mobile 6 device?

Question: I have a windows mobile app developed using the .NET CF 3.5.  I'd like to allow only numbers to be entered in a particular text box when it has focus... I.e. programmatically press the FN key so the user can simply type the numbers on the keypad w/o having to hold the FN key.
Comment: Why don't you do the conversion to numbers yourself without pressing the 'Fn' key? Since you are talking about 10 keys to map I don't think it is a big overhead and the solution is pretty straightforward. No?
Answer: This is a blogpost in 2.0 but i strongly believe it will work for you in 3.5
http://www.ceveni.com/2008/11/programmatically-press-keys-in-windows.html
It doesn't list the FN key but you can catch it in your application read it's event code and use it.
A problem you may come up against is the case where pressing the FN key multiple times takes you to different states, ie toggle back and forth to alpha and numeric modes.
Answer: I code in C, so I'm not 100% sure about NET CF, but if you are using a standard windows control, you need to set the attribute ES_NUMBER for an input field and this will allow only numerical input.  On phones with number keys overlaid on top of letter keys, this will cause those keys to produce only numbers without having to explicitly press the ALT button.


If Naruto loses the ability he used on Kakashi and Guy after Kaguya's seal, what did Sasuke lose?

Question: In the episode of Naruto Shippuden where Naruto received the power from the Sage of the Six Paths, he did a lot of things, like saving Guy from the Eight Gates aftereffects, restoring Kakashi's eye, and extending the lifespan of Obito. He also mentioned to Sakura that he feels like he can do everything as of now.
Sasuke, I believe, received special Rinnegan.
After sealing Kaguya, the marks on both of their palms were gone. The same goes for Naruto's ability to do those things. I believe they should/must be equal in terms of power, so I came up with a question: what did Sasuke lose after Kaguya's seal?
Answer: My assumption would be that Naruto gained that ability in the hand he lost while Sasuke gained abilities in his eyes. Hence the reason Naruto could never fix his own arm even though  he could generate Kakashi's eyes
Answer: I'm up with an assumption. It's not really clear if Naruto lost his six paths ability, but if so, Sasuke also has some limitations on the usage of his rinnegan. His rinnegan has tomoes, and some state that it's a representation of it's charge. It doesn't seem to lose it's charge until he wields a no tomoe rinnegan in boruto series. So, his rinnegan must have lost it's ability to maintain it's charge.
Answer: Naruto did lose the seal and the power to magically heal others. Naruto basically has very little six paths chakra left and there is not enough to use to transform to it. This is why Naruto does not use it or the truthseeker orbs after the fight with Sasuke. In order to get six paths chakra mode, you need significant power of all the tailed beasts. Naruto only received very small portions of all of the tailed beasts' chakra. After the war, he used most of that chakra. The sage of six paths asked Naruto to keep a little bit of the tailed beasts' chakra so they can meet inside him. So Naruto can use six paths power, but he chooses not to because the sage of the six paths asked him to save a little bit of the tailed beasts' chakra inside him.
The power that Sasuke lost was not any abilities like Naruto, but his chakra reserves is what he lost. During the war, Sasuke could teleport many times and use the Onyx Chidori a couple of times with no expense to his fighting ability and not that much chakra used. In Boruto, Sasuke opened one portal and had his chakra completely exhausted. He did teleport once during the fight with Momoshiki, but he did not use chakra afterwords. In the war, Sasuke could use the Rinnegan abilities nonstop. But in Boruto, Sasuke can use the abilities once or twice and his chakra would be completely exhausted.
So to conclude, Naruto lost his power to heal, and Sasuke kept all of his abilities, but his chakra is drastically lower than when he was fighting in the war.


$\sin x$ approximates $x$ for small angles

Question: In physics, particularly in waves, we make use of the fact that for small angles (less than $\pi/12$-ish), the sine function value of an angle is pretty close to the value of the angle itself (in radians of course). Can anyone give a mathematical explanation for why this is?
Comment: If you draw a triangle, and limit the angle $\theta$ to zero, i.e., make it smaller and smaller, you see that the opposite side is very small compared to the hypotenuse. Therefore, $\sin \theta\to0$ as $\theta\to 0$.
Comment: You may want to see this question on the corresponding question for cosine: http://math.stackexchange.com/questions/113416/how-to-justify-small-angle-approximation-for-cosine
Answer: Hint
Any mathematical function can be, at least locally, approximated by so called Taylor or Mc Laurin expansions.
To make it as simple as possible, the tangent to a curve is, at the point where it is defined, a local approximation of the curve.
So, write the equation of the tangent to the curve $y=sin(x)$ at $x=0$ and you will obtain, for the tangent line,  $y = 0 + (x-0) = x$. So, close to $x=0$, $sin(x)$ is close to $x$.
Uisng the same approach, you could show by yourself that, close to $x=0$, $e^x$ is close to $1+x$, that $log(1+x)$ is close to $x$ and so on. For sure, the approximations can be made better and better at the price of more terms.
Answer: Hint
Consider the Taylor expansion of $\sin{x}$ about $x = 0$.
Cheers!
Comment: Of course! But now I wonder, is there a way to angle this useful behavior without such series?
Comment: I was about to show you that the tangent curve of $\sin{x}$ about $x = 0$ is precisely $y(x) = x$, so $\sin{x} \sim x$ in the neighbourhood of $x \to 0$, but... @Claude Leibovici was quicker than me, haha!
Answer: Alternative solution, if you do not want to deal with series expansion, you could calculate
$$\lim_{x\to0} \frac{\sin x}{x} = 1\quad\text{and/or}\quad \lim_{x\to0}\frac{x}{\sin x}=1$$
Thus $\sin x \sim x$ for $x$ close to $0$.
Answer: There is a very simple geometrical observation you can make. The arch in a circle with radius 1 equals the angle x (in radians), and for small x the arch is close to sin x. Draw this and you will see!


Long page receiving time reported by Firebug net tab (page loading slow)

Question: I am experiencing a problem where a page appears to be taking around 8s to load for no apparent reason.
As you can see in this screenshot, all the resources on the page load well before 8s and the large majority of the loading time is reported in the "receiving" stage of the page itself.
What could cause this?
A suggestion has been made that the content-length header might be reported incorrectly due to a faulty file encoding, but having inspected the header I can't see a content-length set, could that be the cause?
An example header follows:
<code>Date: Wed, 02 Mar 2011 09:20:42 GMT
Server: Apache
X-Powered-By: PHP/5.2.6
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Last-Modified: Wed, 02 Mar 2011 09:20:42 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
P3P: CP="NON CURa ADMa DEVa TAIa CONi OUR DELa BUS IND PHY ONL UNI PUR COM NAV DEM STA"
Set-Cookie: xid=025d2e1ac48dcb568d4dd35d79a5b726; path=/; domain=www.xxx.xx.xx; httponly
xid=025d2e1ac48dcb568d4dd35d79a5b726; path=/; domain=www.xxx.xx.xx; httponly
Vary: Accept-Encoding,User-Agent
Content-Encoding: gzip
Keep-Alive: timeout=1, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1
</code>
(domain deliberately censored in set-cookie)
I have checked another website which also doesn't have a content-length set and that appears to load without any issues.
Answer: I've seen this when requests are inspected by a proxy, especially if over HTTPS.


How do lab bench power supplies have a separate earth pin and a ground pin?

Question: I understand the use cases for having a separate earth pin and ground pin, but what I am wondering is how exactly this is achieved. Specifically, I am wondering at what part of the circuit this occurs at.
Comment: A bench power supply normally has a positive terminal a negative terminal (not a Ground terminal) and an Earth terminal.  The supply itself is isolated from Earth, but either output terminal may be connected to the Earth terminal if desired.
Answer: The simplest example: Consider a simple AC step-down transformer "power supply" with nothing but a transformer inside. AC transformers have the property of galvanic isolation, there's no direct connection between its primary winding and its secondary winding. The output is "floating", this is, the output voltage only exists only between its secondary + and - output. Connecting the + terminal to other circuits or the Earth ground has no effect (ignoring parasitic inductance and capacitance). Ideally, the circuit behaves as a battery that exists in isolation.

simulate this circuit – Schematic created using CircuitLab
Thus, this power supply can be freely connected in series with other power supplies without worrying about short circuits. When properly designed to meet relevant safety standards, it's also safe to touch the positive output and Earth ground simultaneously without receiving an electric shock.
Nevertheless, sometimes it's more convenient to use a power supply referenced to the Earth ground of the AC mains. In this case, we can intentionally defeat the transformer's inherent isolation by shorting the - and EARTH output using a piece of wire. This is usually done simply by screwing a jumper wire or metal tab between the "earth" and "DC-" output jacks of the supply. But a mechanical switch or a relay can also do the job.
After making this connection, the power supply is no longer floating, and the voltage exists between +/-, and also +/EARTH.

simulate this circuit
If you still don't see how it works, this is the equivalent circuit after closing the switch SW1 - a short-circuit across the transformer:

simulate this circuit
To create a DC version, simply adding a rectifier and a capacitor.

simulate this circuit
Practical Power Supply
For a practical DC lab power supply, if it's a linear power supply, it uses additional linear voltage regulators at the secondary output. If it's a switched-mode power supply, it rectifies the voltage from mains AC to high-voltage DC first with diodes and capacitors, then creates a square wave of perhaps 100 kHz using switching transistors, step-down this voltage with smaller high-frequency transformer, before rectifies this voltage to DC again.
But the principle of transformer-based galvanic isolation remains the same.
Furthermore, in practical power supplies, the isolation is not perfect due to parasitic capacitance between the transformer windings, and between the power supply's internal wiring and chassis. Thus, there's always a parasitic capacitance on the scale of 10-100 pF between the DC- and Earth terminals. High-frequency noise will continue to flow despite the transformer. One may even deliberately connect a tiny capacitor around 100 pF to 1 nF across the transformer to give the noise current a predictable conduction path and suppress electromagnetic interference - the leakage current is small enough to be safe for its intended applications, and the capacitor must be certified to relevant safety standard to ensure a short circuit failure is very unlikely.
AC wiring
The mains AC power distribution system is another source of confusion. For simplicity, in the previous schematics, I showed all AC power sources with two wires, and the chassis ground is attached to the Neutral side of the AC source. But the AC outlet at homes has three wires: Live, Neutral, and Earth (ground). The chassis or "Earth" ground is always connected to the "Earth" conductor, never Neutral.
Its purpose is extra safety and easier fault detection. For AC, polarity doesn't matter, Live and Neutral can be swapped. We can't safely assume the Neutral wire is always at the Earth ground potential and uses it as the chassis ground. If Live and Neutral were later accidentally swapped, dangerous voltage would exist on the chassis. Thus, it's safer to have a separate Earth conductor as a "always safe" conductor. There are other reasons that are beyond the scope of this answer.
But electrically speaking, Earth and Neutral are (ideally, ignoring resistance) electrically the same in most electrical installations. In a TN-C-S system, the Earth conductor is short-circuited to the Neutral conductor at the electrical distribution box.
Comment: I suspected an isolation transformer might be the solution, but didn't quite understand how you could "toggle" earth. From the setup you have described it seems there would need to be a switch or some manual input to short the floating ground to earth. This may be outside the scope of the original question a little bit, but could you possibly explain more about how floating ground can be shorted to earth?
Comment: @mm3psych0sis In most power supplies, the earth is "toggled" on simply by screwing a metal tab onto the its output jacks. Do you have a power supply that can control its Earth connection electronically (or in software)? It must be pretty good power supply. If it's the case, a simple mechanical relay should do the job.
Comment: I sadly do not have a pretty good power supply, or any power supply for that matter, which is partially why I am asking these questions lol. Seems like some sort of switch would be more convenient, but I can understand why safety reasons would dictate a more deliberate approach. Marking as solved, thank you!
Comment: @mm3psych0sis I'm glad that it solved your problem. Also, please check my edited answer with an explanation of the "Earth" conductor in the AC outlet, which may be another source of confusion.


Which flashes will fit an Olympus Trip 35?

Question: I am looking for an as compact as possible flash that fits my Olympus Trip 35. There is an official one, but it costs several times what the camera is worth. I read up on Hot Shoes on Wikipedia, but since the voltages and contacts don't seem to be standardized, especially for older cameras, how can I determine if a flash will work with the aforementioned camera?
Answer: Looking at images of the Olympus Trip 35, the hotshoe is a standard ISO one, with the single sync contact, so any ISO-compatible hotshoe flash (i.e., pretty much all of them) should fire correctly in sync. But they won't do anything else. You'll have to use the flash in Manual mode, and manually dial in the power level you want, or hope you find a flash that includes autothyristor technology, if you want automated power. TTL, HSS/FP, remote commanding, etc. are all features you can kiss goodbye with a manual-only hotshoe.
The main problem you're going to have is finding a tiny flash that has full manual mode on it.  Most of the very small very cheap flashes that are basically as effective as a pop-up flash are typically TTL-only, and don't offer a physical way to control the power level of the flash's output on the flash itself, but rather relies on TTL communication through the hotshoe's non-sync contacts--which the Trip 35 doesn't have.
The only real candidate I can think of would be a Nissin i40. But then, my knowledge of small-size hotshoe flashes isn't great.
Any new digital-compatible flash will have a very low sync voltage (typically less than 5V, but definitely under 10V), so I wouldn't worry about frying your camera's hotshoe--it's usually only when you put a film era speedlight on a digital camera that you run that risk.
Comment: Thanks, I actually just got a bargain on an official Olympus one. Still, good info.
Answer: This is an old post that I've just stumbled across.  I can confirm that a Nissin i40 (micro 4/3 model) definitely works with an Olympus Trip 35 (1979 model) in manual mode.  The Nissin has manual selection from 1/1 to 1/256, you will need to either manually calculate your flash exposure or use some trial and error.  Thanks to the original poster here, I've been trying to find a Trip 35 flash and had one sitting here the whole time I also use on my Pen EPL2 and EM5!  After just trying this on my Trip I can confirm it works.  Just take care it doesn't fall off as it just slides onto the Trip's hot shoe without locking in.  Happy Shooting!


What if I used Segoe UI for printing?

Question: As I understand it, they have a license that applies only to web versions, an interface, or another digital output. But what if I want to print a few books or instructions?
Answer: If you violate a license agreement you are liable for whatever repercussions that may initiate. The other party could seek restitution or a judgement.
Your question is no different than any question about breeching a contract or violating terms of an agreement. Even going so far as to say it's not any different than a question about a criminal act ... a la "I understand it's illegal, but what if I just murder a few people?" Yes, that's extreme. But the answer is kind of the same. If you're caught, you are culpable and subject to action.
Will you be caught, who knows. If you are caught, will you have a viable defense, it doesn't sound like it since you clearly understand what the license permits.
Comment: Sorry, but your answer is too broad. What exactly will happen when applying this particular font? The license does not seem to prohibit printing.
Comment: @228warrant what exactly happens if you steal just one candy from a shop? maybe nothing, maybe you get caught. Same principle, we can't know more exactly what will happen if you print _just one book_.
Comment: @228warrant Your question is too broad. What **exactly** happens is up to the owner of the product under which license you violate. No one else can answer for them. I mean, if you *really* are that interested, contact the foundry and ask them what they do when someone violates their licensing. -- What *exactly* happens if you walk on your neighbor's lawn when there's a sign telling you not to?? it's all up to the neighbor. They could yell at you, ignore you, sue you, call the police for trespassing, shoot you.... there's no way to know *exactly*.

What if I used Segoe UI for printing?


How to determine a derivative if the derivative is dependent itself?

Question: Let's suppose I've got a function $f(x)$ where I'd like to differentiate with respect to $t$, but $t$ depends on $x$: $t(x)$. Thus the whole linked derivative thing: $\dfrac{\mathrm{d}f(x)}{\mathrm{d}t(x)}$. Is this possible at all? Alternatively I had to find $t^{-1}(x)$: $x(t)$ and then calculate the derivative fairly easy: $\mathrm{d} f(x(t))/\mathrm{d}t$. But finding the inverse is not always possible. Is there another way? At all?
Comment: Example?.........
Answer: $$
\frac{df}{dt} = \frac{df}{dx}\frac{dx}{dt} = \frac{df}{dx}\left(\frac{dt}{dx}\right)^{-1} = \frac{f'(x)}{t'(x)}.
$$
Answer: Maybe this is what you're looking for:
$$ \frac{df}{dt} = \frac{df}{dx} \frac{dx}{dt} = \frac{df}{dx} \frac{1}{\frac{dt}{dx}}. $$
For example: Consider $f(x) = x^2$ and $t = e^x$.

Direct calculation of $\frac{df}{dt}$: Note that $x = \ln{t}$, so $f = \ln^2t$. Then using chain rule:

$$ \frac{df}{dt} = 2\ln{t} (\frac{1}{t}) = 2x \frac{1}{e^x}.$$

Using the formula above:

$$\frac{df}{dt} = \frac{df}{dx} \frac{1}{\frac{dt}{dx}} = 2x \frac{1}{e^x}. $$


Inboard or Outboard

Question: Quick survey:
How many tools do you use in the box and how many are actual pieces of rack gear?
What type of mixboard do you have and do you still use volume/pan automation on it?
I'm curious to what you use.
Answer: I did a huge outboard-box purge in 2004: compressors, limiters, tube pre's, DAT machine, the whole lot. I went entirely virtual except a single Waldorf Pulse+ analog synth and - ONLY for nostalgia - a single Electric Mistress flanger pedal/box. Now I'm finding that I still collect hardware, but smaller sound-making objects (Thingamagoops, Stylophones, and other objects/toys) and real instruments, usually percussive (chimes, cymbals, drums, etc.).
I think this is all because emulation, automation, and delivery made virtualization far more attractive from a workflow, space, heat, power, and clutter perspective, as well as a personal shift from synthesized sound to re-synthesized recorded sound (I still do both, but the latter has been my recent focus).
I could see buying a Moogerfooger or five, though. :-D
Comment: Wow, cool. Fan of the mini-moog?
Comment: And what Tube Pres did you have??? Wish I would have known you... That's all I use to record in my studio.
Comment: The first analog synth I ever used was actually an original Mini Moog! In terms of tube pre's, nothing special, mostly for guitar warming. Sheesh, not sure I can even remember now, old age is catching up with me..! :-) Nothing earthshatteringly nifty, though. Couldn't afford much back then!
Answer: My outboard gear consists of a mic preamp and my collection of analog and modular synths. Everything else is in the box.
Answer: I have an Focusrite Octopre,and the 8 channel mic pre for Pro Tools HD.  I also have a Rane 6 channel headphone amp and a Rane 8 channel mixer.  Apart from the Command 8 and the Novation keyboard everything else is either A/D converters or MIDI routing.
I like everything to be in the box.  You can waste so much time with analogue gear, especially sorting out tuning and earth problems.

Inboard or Outboard


Segmentation fault on Ubuntu 16.04

Question: I have a problem using screen command on Ubuntu 16.04.
I am working on a C++ project, and using servers with Ubuntu to simulate my code. Segmentation faults started to appear after updating from Ubuntu 14.04 to 16.04. When trying to simulate the same code on different servers with Ubuntu 14 and 16.04, a segmentation fault appears on the server with Ubuntu 16.04 after a certain time (usually 12 hours of simulation) knowing that no problems show up at Ubuntu 14.04. In addition, the same simulation can be conducted on Ubuntu 16.04 without any problem if the simulation command is directly operated on the shell terminal without using the screen command. I am wondering if there is any timeout option for the screen command in Ubuntu 16.04 that stops my simulations.
Comment: This would imply that your program can somehow detect the operating system version or it's mother process and in this case access an illegal memory address. This seems unlikely to me for simulation software. Are you sure this is not just coincidence? Have a look at the `sigvcatch` library to turn the crash into an exception you can debug.
Comment: Thank you for your comment. I dont think there is any coincidence since I am simulating the same code on the same input data without any problem using other OS (Ubuntu 14, and also Ubuntu 16.04 without the screen command). I will try to use the sigcatch library, thank you.
Answer: We found a solution, I post if it can help someone with the same kind of problem.
The problem was kerberos ticket expiration within the screen or tmux session. The kerberos ticket was use to mount nfsv4 folder where some file were written by the program, so after 12hrs the ticket expired and the program tried to write in unreachable file and get a segfault. nfsv4 was used for our server on ubuntu 16.04, nfsv3 on ubuntu 14.04...
The solution, in the screen/tmux session, lauch the program with the following command : krenew -K 60 ./a.out

Segmentation fault on Ubuntu 16.04


Has the Catholic Church ever excommunicated someone based on their ideology?

Question: I know the Catholic Church excommunicates Catholics who join Freemasonic lodges, as well as Catholics who the Church judges to be willful heretics. But has the Church ever excommunicated a Catholic purely for being a member of a Communist or National Socialist party? The Church has never excommunicated Adolf Hitler, and some other Catholics who belong to Marxists groups, so I'm curious.
Answer: The Church has technically never reversed the decree excommunicating communists.
More
However, it is no longer common practice to excommunicate individuals based on their political beliefs, and even directly after the decree was made, it was rarely enforced. Membership in Communist organizations or holding communist political beliefs is still considered a heterodoxy because it has been explicitly condemned by the Church, but it is no longer considered grounds for excommunication.
By the way, there were bishops who were excommunicated because they cooperated with the communists. You can read more about Chineses bishops.
Answer: Has the Catholic Church ever excommunicated someone based on their ideology?
The short answer is yes. The Roman Catholic Church has excommunicated members of her faithful based on their ideologies!
The Church has excommunicated both Communists and Nazis.

The Decree Against Communism was a 1949 Catholic Church document issued by the Supreme Sacred Congregation of the Holy Office, and approved by Pope Pius XII, which declared Catholics who professed Communist doctrine to be excommunicated as apostates from the Christian faith.
Background
Opposition to Socialism and Communism in Catholic social teaching had already been expressed in the teachings of popes since the encyclicals Nostis et nobiscum (1849), Quanta cura (1864), and Rerum novarum (1891).
In the earlier social encyclicals the criticism of Communism described it as a system violating human rights: e.g., the right to own property. After revolutions in Russia, China, and Mexico had been followed by religious persecution, a new theme of criticism was added, beginning with Quadragesimo anno (1931) by Pope Pius XI. This encyclical objected to what it considered to be Communism's professed opposition to religion, and its threat to the freedom and the very existence of the Church. In 1937, Pius XI rejected atheistic communism in an encyclical entitled Divini Redemptoris as "a system full of errors and sophisms", with a "pseudo-ideal of justice, equality, and fraternity" and "a certain false mysticism",[4] and contrasted it with a humane society (civitas humana).
After the Italian parliamentary election of April 1948, in which the Communist-Socialist coalition won 31% of the vote, the Holy Office began to study the issue of Communism in order to give guidance to Catholic lay people and clergy with questions about support for Communist parties.
An additional impulse for Vatican action against Communism arose in Czechoslovakia, where the Communist government, installed by a coup d'état in February 1948, undertook a campaign to take control of the Catholic Church by several means. Among other measures, it created an organization of priests favorable to the regime, took control of church finances, and demanded that pastoral letters to the faithful or the clergy be approved by government ministries.
On July 15, 1948, L'Osservatore Romano published a decree which excommunicated those who propagate "the materialistic and anti-Christian teachings of Communism". The document, however, did not mention the Italian Communist Party, which had changed its statutes in 1946, removing an explicit profession of Marxism-Leninism, and opening to participation by citizens, "independent of race, religious faith or philosophical convictions".
In the spring of 1949, pressure on the Church in Czechoslovakia was increasing, and, according to Cardinal Giovanni Battista Montini, then papal Secretary of State, Pope Pius XII had come to feel that there would be no effective diplomatic opposition from the West. Thus the Church had to use what means it had to confront Communism, not only in the immediate situation, but for a long-term opposition.
Form of the document
The document, as published in the Acta Apostolicae Sedis, bears the date July 1, 1949 and the heading Decretum (Decree), and is presented in the form of a dubium: that is, in question-and-answer format. It presents four questions, together with the Holy Office's replies: (1) Is it licit to join or show favor to Communist parties? (2) Is it licit to publish, distribute, or read publications that support Communist doctrine or activity, or to write for them? (3) May Christians who knowingly and freely commit the acts in parts 1 and 2 be given the sacraments? (4) Do Christians who profess, defend or promote materialistic Communist doctrine incur the penalty of excommunication as apostates from the Christian faith, with the penalty reserved so that it may only be lifted by the Holy See?
The answers in the decree were negative to the first three questions and affirmative to the fourth.

Although not named, Adolf Hitler has been formally excommunicated from the Church because he was an active member of the Nazi Party!
February 1931, the German bishops meeting in conferences in Fulda and Freising supported the action of the bishop of Mainz, but limited the excommunications to Nazi leaders and activists.

In February 1931, the German bishops excommunicated all active Nazi party members. This included Hitler. This penalty was not imposed on those who merely voted Nazi. It was hoped to persuade them by argument. The same policy was in operation against the Communists. - The Catholic Response to Nazism

Ideologies will come and go. The Church will deal with them according to their doctrine, situation and circumstances at that time in history.


How do you use a PS4 Controller for the desktop environment?

Question: I am using a PS4 controller on steam and it works a charm. How can I use it to control the GNOME desktop environment?
Answer: I did it years ago using xpadder, but I think it is just for Windows. You could try qjoypad  or joy2key . Both of these are available in the Software Center.


Emoji anime pop-quiz

Question: Found a quiz in an old dialogue of mine. First to guess all five gets the tick.
Comment: @PrinceDeepthinker I've seen puzzles on this site that remain unguessed for ages, so niche they are :D If you have a certain type of puzzles that you're into, I can make some of those so you have something to do. You can't comfort everyone, unless you make something very easy to solve.
Comment: Please don't take this the wrong way but I think these last couple puzzles are not acessible to a wide audience and are unecessarily very niche in its category of knowledge. I would advise that you make puzzles themed in a way that is more accessible to the general audience as to spark more interest in them. If you are going to make an anime themed puzzle try to make it based on more commonly known ones.
Comment: I am not asking for easy puzzles just ones whose field of knowledge is more widely known throughout the the anglophone world at least as an entry point. Some puzzles do culminate in rather odd facts and that is not a problem.
Answer: Here are my guesses:

 1. Shingeki no Kyojin (Attack on Titan)
 Explanation:
 - The black and yellow striped barrier emojis represent the walls.
 - The crying character in the middle represents Eren Yeager, crying over the death of his mother by a Titan. This results in Eren intensely hating the Titans.
 - The stone-faced men at the end represent the Titans.

 2. Code Geass
 Explanation:
 - The flags of Great Britain represent the Holy Britannian Empire, which invades Japan (as seen by the flag at the end).
 - The fist, spiral, and eyes emojis seem to represent Lelouch Vi Britannia. The fist represents Lelouch fighting against the Britannian Empire. The spiral and eyes are a reference to his power, allowing him to control and manipulate others.
 - The character next to the Flag of Japan is Kururugi Suzaku, the other protagonist of the series.

 3. Death Note
 Explanation:
 - The apples and skull emoji represent Ryuk, a Death God who loves apples.
 - The book represents the Death Note.
 - The two characters next to the fist and scissors are Light Yagami and L, the two main characters who engage in a battle of wits over the course of the anime.
 - The chocolate, cookie, and ice-cream is a reference to the fact that L loves sweet stuff.

 4. One Piece
 Explanation:
 - Bags of Gold next to a Cat emoji seem to refer to Nami, who loves gold and is referred to as a "Cat Burglar" in the series
 - Water droplets and ships emojis represent rain and ships, which are common in the world of One Piece.
 - The fist, muscle, and 2 yellow rocket-like emoji next to the smiling character seem to represent Luffy, who has the ability to elongate his arm due to the Rubber-Rubber Fruit. The smiling character also fits Luffy because of his happy-go-lucky nature.
 - The fruits seem to be a reference to the Devil Fruits, capable of granting super-human powers to whoever consumes them.
 - The other faces seem to be a reference to the Straw Hat Pirates. The skull especially seems to be a reference to Brook, who is a skeleton.

 5. Soul Eater
 Explanation:
 - The 99 pink hearts (as corrected by OP) represent the 99 corrupted souls that the main character, Maka Albarn has already collected in the first episode. The purple heart represents the soul of a witch, which is needed by Maka to turn her weapon into a Death Scythe.
Comment: I just realised that I messed it up and there were supposed to be 99, not 100 pink hearts. I'll give you the tick in a while, I suppose. But try to guess anyway.
Comment: It's pretty precise with 1-4, though you dug even deeper somewhere (cat in the 4 was just meant to be a sideways face to represent someone talking about their treasure as the first thing that happens). You probably won't guess the last one, but the important thing about this items (which represent not exactly hearts) are their color and quantity.
Comment: @ThomasBlue Updated answer. (Although I have never seen this show, so I don't know how accurate this is)
Comment: Everything is correct, you get the tick!

Emoji anime pop-quiz


Export emails and attachments to pdf

Question: I am looking for suggestions on a software or an extension to work with Outlook, primarily to export emails with attachments (bulk exports of 50+ attachments).
Comment: Just wanted to update that we are using MessageExport, it isn't 100%, but it pulls the majority of attachments out of emails, and packages them in order with their parent email into a pdf.  Must have Adobe Pro and a computer with decent processing power to handle large bulk exports.
Answer: Try Export Messages to PDF utility included in ReliefJet Essentials.
Answer: It's expensive, but our office uses PDFMaker, a plugin for Microsoft Outlook that comes with Adobe Acrobat Standard (~$300) and Adobe Acrobat Professional (~$600).

Convert from one email, multiple emails (Ctrl+click or Shift+click to select multiple messages), or an entire folder at once.
Convert to one combined PDF, one PDF per email, or a PDF Portfolio.
Auto-archive files as PDFs.

Export emails and attachments to pdf


How to set object rotation as the new zero rotation

Question: I am working in Illustrator and have created a group of wedge shapes from a pie chart, which was rotated, ungrouped, and regrouped. Given that the wedges are still placed together as a circle, and that it is rotated how can I set its current orientation as the zero-rotation orientation?
Comment: Why the downvotes?
Answer: Perhaps Object > Transform > Reset Bounding Box
I'm not 100% certain what you are referring to. But this would seem to fit with your description.
Be aware that Illustrator does not store or remember basic object transformations. There's no way to un-rotate any object back to 0° other than doing it manually.
Comment: You can return to the reset box position by setting the transform in a script to [1 0 1 0 0 0] but you can not go back to states before that.


Pump fluid down HPHT gas well - fluid remains at top

Question: Working offshore on a High Pressure / High Temperature gas well. We pumped 120 barrels of organic solvent into the well. The gas density was 0.3kg/m3. The fluid was 0.8kg/m3 & a boiling point of 85 degrees C (at 1 atm). The well is 5km long / deep. The initial surface pressure is 5,000 psi. The bottom hole temperature is +/- 180 degrees C. We pumped in fluid & saw surface pressure reduce to +/- 3,500 psi. We only pumped 2km worth of fluid. We pumped the fluid slowly & hoped it would fall to the bottom of the hole. However, it didn't. It remained suspended at surface. Can anyone explain why? Not sure if liquid is boiling & condensing at top of well. However, the closed in pressure is confusing the issue.
Comment: Help me understand. The well is full with gas at 0.3kg/m3? And the organic solvent is also a gas at 0.8kg/m3? Just checking since you call the solvent a fluid. (Would you mind sharing a phase diagram of that?)
Comment: @Strevz : Your figures do not make sense. I am not sure natural gas can have density of 0.3 kg/m3 even at 1 atm and 180 deg C, let alone at 5000+ psi. You should probably replace kg/m3 with kg/L everywhere.
Answer: This answer is wrong, will remove when we have figured this out...
Could your well be filled with water, and the solvent floats on top?
Water is liquid at these and pressures and temperatures. Liquids are nearly incompressible, so the density is just ~1kg/liter. Now you pour a liquid on top of that with a much lower density (do you really mean 0.8kg/m3 or rather 0.8kg/liter? ...anyway.) - so that will simply float on top of the water.
Comment: Thanks for answer, but no, the well is full of gas with a average density of 0.3kg/m3. I think the liquid is staying on top because the bottom of the hole is so hot. The pressure is relatively equal accept for the hydrostatic difference of the gas (more pressure at bottom - equal to reservoir pressure).
Comment: I'll remove the answer later but leave it for now so folks know that that's not it. Hmmmm... curious! :)


Sharepoint 2007 - Content query webpart formmode

Question: I have got a simple question, but the answer is hard to find. I want to put a contentquery webpart with a custom xslt on my page, but it has to render extra links if the page is opened in edit-mode. So, if (SPContext.Current.FormContext.FormMode == SPControlMode.Display) : show some extra links near the items in the xslt.
How can I achieve this? I have already overridden the default ContentByQueryWebPart, is that the way?
Thanks in advance.
Answer: Damn, how easy.

    We are in edit mode!!


Is negligible resistance a problem?

Question: Negligible resistance in a conductor is said to be a problem in many cases such as in the case of carbon nanotubes. One thing that I do not understand is that sometimes people say that low resistance is good but no resistance is not. In other situations it contradicts a lot of theories. For instance if we consider a wire with negligible resistance, it cannot mean that the current would  be very high because then it will contradict the ohm's law. Lets say in the case of CNTs why is low resistance a problem? in a way low resistance means high conductivity which should be good and in another there's the problem of impedance matching and ohm's law. Why is resistance so important? or is it so important as we have been believing as per the theories given by the scientists? Can someone answer this?
Comment: Please can you provide a reference which says that low resistance is a problem in carbon nanotubes? ... Low resistance could be a problem or an advantage depending on what the purpose is. Unless you identify the purpose, the question cannot be answered.
Comment: Without specifying an application it's not at all clear what you mean by "good". For example, if I want to build a resistor, a material with zero resistance is not good. If I want to transmit power, then a material with low resistance is good. Please be *specific*.
Answer: Actually, it would be very desirable to have zero resistance, it does not contradict laws, it only means there is no dissipation through conductors.
Which would be really good!.
That is actually a research benefit of superconductors.

Is negligible resistance a problem?


Is it possible to change the package name of an Android app on Google Play?

Question: I would like to know whether it is technically possible, not whether it is easy or not, to change the actual package name of an Android app that is on Google Play. What I mean by package name is the name that will show up in the URL. Please, can anyone tell me why this is / is not possible?
Thanks!
Comment: the name that will show up in the URL.. what is that?? give ane example
Comment: @stinepike probably the OP means this? https://play.google.com/apps/testing/com.mycompany.myapp
Answer: From Dianne Hackborn:

Things That Cannot Change:
The most obvious and visible of these is the "manifest package name," the unique name you give to your application in its AndroidManifest.xml. The name uses a Java-language-style naming convention, with Internet domain ownership helping to avoid name collisions. For example, since Google owns the domain "google.com", the manifest package names of all of our applications should start with "com.google." It's important for developers to follow this convention in order to avoid conflicts with other developers.
Once you publish your application under its manifest package name, this is the unique identity of the application forever more. Switching to a different name results in an entirely new application, one that can't be installed as an update to the existing application.

More on things you cannot change here
Regarding your question on the URL from Google Play, the package defined there is linked to the app's fully qualified package you have in your AndroidManifest.xml file. More on Google Play's link formats here.
Comment: worth mentioning, since I looked around for this - you can change the package name *of the actual package in java*, and basically everywhere else besides in the manifest. the one in the manifest is more or less independent of the one everywhere else.
Comment: @lahwran I ran into issues with Android Studio building properly when they didn't match - the issues went away when they did.
Comment: @Voicu is it possible to change the package name if we uploaded first build in beta mode and no want to change package at release mode
Comment: is there a way to change it BEFORE publishing?
Comment: Interesting, I wonder if this has changed. I wouldn't be surprised if it worked once to make them different but was never supported.
Comment: so what happens if i have a paid version along with a free version with the same package name ? both on the play store as different apps
Comment: But why doesn't Google allow this? I can see many reasons why someone might want to update the ApplicationID on Play store. This is a limitation that makes no sense. I would even pay for a change!

Also it would probably be an easy change to implement for Google. Just redirect any requests in the Play Store to the new app ID, + handle updates on Android device.
Answer: Nope, you cannot just change it, you would have to upload a new package as a new app. Have a look at the Google's app Talk, its name was changed to Hangouts, but the package name is still com.google.android.talk. Because it is not doable :) Cheers.
Comment: you'd think google would have realized the problem themselves with this
Comment: It is possible to change single letter from capital to small case in andorid app package name exist on play store?
Comment: @KaranHarshWardhan thats so fair Google suffering his own rules
Answer: As far as I can tell what you could do is "retire" your previous app and redirect all users to your new app. This procedure is not supported by Google (tsk... tsk...), but it could be implemented in four steps:

Change the current application to show a message to the users about the upgrade and redirect them to the new app listing.
Probably a full screen message would do with some friendly text. This message could be triggered remotely ideally, but a cut-off date can be used too. (But then that will be a hard deadline for you, so be careful... ;))
Release the modified old app as an upgrade, maybe with some feature upgrades/bug fixes too, to "sweeten the deal" to the users. Still there is no guarantee that all users will upgrade, but probably the majority will do.
Prepare your new app with the updated package name and upload it to the store, then trigger the message in the old app (or just wait until it expires, if that was your choice).
Unpublish the old app in Play Store to avoid any new installs. Unpublishing an app doesn't mean the users who already installed it won't have access to it anymore, but at least the potential new users won't find it on the market.

Not ideal and can be annoying to the users, sometimes even impossible to implement due to the status/possibilities of the app. But since Google left us no choice this is the only way to migrate the users of the old apps to a "new" one (even if it is not really new).
Not to mention that if you don't have access to the sources and code signing details for the old app then all you could do is hoping that he users will notice the new app...
If anybody figured out a better way by all means: please do tell.
Comment: While this is the best one can do to get the new app installed, one must remember that old app will still reside on the device - since this is a not really an upgrade, but new install (unless user manually uninstalls previous one). So you will have old app as well as new app on the device and probably with the same launcher icons - confusing the user about - old vs new one.
Comment: You are right, unfortunately it is not possible to remove the old app as part of the install process of the new app. However, it might be possible to detect the presence of the old app and warn the user to remove it. This can be done either on startup of the new app or in the post install event handler (http://developer.android.com/reference/android/content/Intent.html#ACTION_PACKAGE_ADDED).
Comment: Also, the old app could detect the presence of the new one and simply show a toast or so, then start the new one, and exit.
Answer: No, you cannot change package name unless you're okay with publishing it as a new app in Play Store:
Once you publish your application under its manifest package name, this is the unique identity of the application forever more. Switching to a different name results in an entirely new application, one that can't be installed as an update to the existing application.
Android manual confirms it as well here:
Caution: Once you publish your application, you cannot change the package name. The package name defines your application's identity, so if you change it, then it is considered to be a different application and users of the previous version cannot update to the new version.
If you're okay with publishing new version of your app as a completely new entity, you can do it of course - just remove old app from Play Store (if you want) and publish new one, with different package name.
Answer: If you are referring to com.example.app, no I understand you can't it would be considered a new app
Answer: Never, you can't do it since package name is the unique name Identifier for your app.....
Answer: Complete guide :
https://developer.android.com/studio/build/application-id.html
As per Android official Blogs :
https://android-developers.googleblog.com/2011/06/things-that-cannot-change.html
We can say that:

If the manifest package name has changed, the new application will be
installed alongside the old application, so they both co-exist on the
user's device at the same time.
If the signing certificate changes, trying to install the new
application on to the device will fail until the old version is
uninstalled.

As per Google App Update check list :
https://support.google.com/googleplay/android-developer/answer/113476?hl=en
Update your apps
Prepare your APK
When you're ready to make changes to your APK, make sure to update your app's version code as well so that existing users will receive your update.
Use the following checklist to make sure your new APK is ready to update your existing users:

The package name of the updated APK needs to be the same as the current version.
The version code needs to be greater than that current version. Learn more about versioning your applications.
The updated APK needs to be signed with the same signature as the current version.

To verify that your APK is using the same certification as the previous version, you can run the following command on both APKs and compare the results:
$ jarsigner -verify -verbose -certs my_application.apk

If the results are identical, you're using the same key and are ready to continue. If the results are different, you will need to re-sign the APK with the correct key.
Learn more about signing your applications
Upload your APK
Once your APK is ready, you can create a new release.


Is "earnt" a real word?

Question: Is the past tense for the word "earn" "earned" or "earnt", and does the word "earnt" even exist?
Comment: As an aside, I came across this Q. because I was writing an answer to another question and (as a Brit) I automatically wrote *earnt* - the spell-checker didn't like it, so I investigated and came across this Q.
Answer: According to the Wiktionary, "earnt" is correct but not common:

This is an uncommon (<0.5% as common
  as earned in the British National
  Corpus) but entirely acceptable
  alternative form of the simple past
  and past participle earned. Still
  considered to be incorrect by many,
  who are largely unaware of the
  historical development of the English
  language.

"Earned" is much more common. The Merrian-Webster online dictionary doesn't even have an entry for "earnt". The entry for "earned" is here: http://www.merriam-webster.com/dictionary/earned
According to the same Wictionary page,

Other verbs which can be
  conjugated in this way are: learn
  (learnt), dream (dreamt), spell
  (spelt).

But it should be noted that "learnt", "dreamt" and "spelt" are more common  than "earnt". See comments below.
Comment: Er, "learnt and "spelt" are still perfectly common in non-American usage.
Comment: Indeed. I agree that "earnt" is uncommon (and the passage is right); I was just afraid someone may think "learnt" or "spelt" were uncommon or considered incorrect. (BTW: According to the [British National Corpus](http://corpus.byu.edu/bnc/), "learnt" occurs between one-third to one-half as often as "learned", while "spelt" is about twice as common as "spelled".)
Comment: In the U.S., they are often pronounced as spelled, with 'd'.
Comment: @ShreevatsaR - yeah, but notice that this doesn't contradict  what the Wikitionary says. It says that "earnt" is uncommon.
Comment: The interesting thing about these is that the more common spelling with '–ed' reflects the way in which they SHOULD BE pronounced according to the phonetics, but that the less common spelling with '–t' reflects the way they ARE pronounced.
Comment: This covers the basics, but worth noting that Wiktionary isn't a reliable source any more than Wikipedia is.
Comment: How reliable is M-W as a source about variants that would be associated with British English?
Answer: Yes, "earnt" is common in Australian English (and is probably common in other areas as well).
Comment: @Wayne, 'nothing' is the original meaning of 'nought'. A literal zero is a later sense. The word is a contraction of what was in Old English _ne ā wiht_ 'not aye (a) whit' ('aye' here in the sense 'ever' still common in Scotland, as in _for aye_ 'forever').
Comment: No offense meant, but to add perspective: in American English it sounds quaint and hillbilly-ish. Probably because some very old English constructs are still used in the Appalachian mountains. Just like using "naught" to literally mean "zero" (as opposed to using it rather poetically to mean "nothing", as in "We did it all for naught.")
Answer: "Earnt" clearly exists, both as a spelling and as a corresponding pronunciation that is distinct from "earned".
The formation of "earnt" is irregular, but not randomly so: the past-tense/past-participle marker takes or may take the form -t after /n/ in some other words, such as burnt, learnt, or after the phonologically similar sounds /l/ (felt, knelt) or /m/ (dreamt). The exact development of these kinds of irregular past-tense forms seems somewhat unclear (there was a separate question about it Why does the preterite of verbs such as "deal", "feel" and "dream" have a devoiced dental suffix?), but that doesn't change the fact that standard English includes many irregular past-tense/past-participle forms in -t.
Whether something "exists" in the sense of "is accepted as a word" is a matter of opinion. Sometimes, there is widespread agreement; sometimes, there is disagreement.

There is no simple principle that will allow you to objectively determine whether something "is a word". For example, "syllabus" is widely considered to be "a word" even though etymologists think that it originated as a mistake.
At most, you could determine whether some specific person or organization accepts the use of some particular word or word-form (such as "earnt").

"Earnt" seems to be uncommon, not only in American English but also in standard written British English.
Comment: Not to mention *met, meant, wept, slept, kept, knelt, crept, leapt, lent, blent, rent, left, lost, sent, lit, blest, smelt, spelt, spilt, spoilt* and all the many more, not excluding the *eat > et* pronunciation for *ate* by some speakers.

Is "earnt" a real word?


Why is there a Damaru attached to Lord Shiva's trishul?

Question: Why is a Damaru attached to the Trishul that Lord Shiva carries? What does that Damaru signify?
Comment: You may be interested in [this](http://wingsforall.com/blog/how-shiva-s-damaru-explain-origin-of-indian-vowels-consonants-alphabets-lan/) scientific explanation of how **Damaru explains origin of Indian vowels**.
Comment: Har Har Mahadev, Damru is the creation ,followed by the destruction of trisulastra.So creation or destruction are interlinked in the whole system of trisula.The supreme of all lord Shiva destroys all the sins and recreats again.
Comment: Damru is a symbol of infinity,the endless time. It represents that the universe is expanding and collapsing. from where it is expanding , it is collapsing there only. its an endless process.
Comment: Damru represents recreation, enjoyment while Trishula represents fear.....Damru represents reproduction as it symbolises yoni while Trishula represents death.... This means positivity and negativity are linked with each-other...there is nothing unidirectional and all is controlled by the Lord..
Answer: Shiva is often described as cosmic dancer and a great musician. Shiva's Tandavam is the cosmic dance and his Damaru (a small hourglass shape drum) represent the cosmic sound. It is said in Shiva Mahapurana that

the sounds from the damaru beats the the rhythm of the cosmic vibrations and the energy is activated by the divine Mother or Shakti.

The sound from damaru often is interpreted as the Pranavam and represent the *Shabda Brahma*n. Pranavam or OM is supposed to the precursor to all human languages.1
There's a very beautiful strotam which mimics the sound produced by damaru called Shiva Tandava Strotam by creating a rolling effect. The first couplet is —

जटाटवीगलज्जलप्रवाहपावितस्थले
  गलेऽवलम्ब्य लम्बितां भुजङ्गतुङ्गमालिकाम् |
  डमड्डमड्डमड्डमन्निनादवड्डमर्वयं
  चकार चण्डताण्डवं तनोतु नः शिवः शिवम् ||१||

Jatatavee gala jwalapravaha pavitha sthale  Galae..valambya
  lambitaam bhujanga tunga malikaam  Damad damad damad
  damanninaadavaddamavaryam  Chakara chandatandavam tanotu naha
  shivaha shivam.
Answer: This is how Swami Shivananda has explained about Lord Shiva in the book Lord Siva and His Worship, who himself was big Shiva worshipper

Lord Siva represents the destructive aspect of Brahman. That portion
  of Brahman that is enveloped by Tamo-Guna-Pradhana-Maya is Lord Siva
  who is the all-pervading Isvara and who also dwells in Mount Kailas.
  He is the Bhandar or storehouse of Wisdom. Siva minus Parvati, Kali or
  Durga is pure Nirguna Brahman. With Maya (Parvati) He becomes the
  Saguna Brahman for the purpose of pious devotion of His devotees.
His Trisul (trident) that is held in His right hand represents the
  three Gunas—Sattva, Rajas and Tamas. That is the emblem of
  sovereignty. He rules the world through these three Gunas. The Damaru
  in His left hand represents the Sabda Brahman, It represents OM from
  which all languages are formed. It is He who formed the Sanskrit
  language out of the Damaru sound.
The wearing of the crescent moon on His head indicates that He has
  controlled the mind perfectly. The flow of the Ganga represents the
  nectar of immortality. Elephant represents symbolically the Vritti,
  pride. Wearing the skin of the elephant denotes that He has controlled
  pride. Tiger represents lust. His sitting on the tiger's skin
  indicates that He has conquered lust. His holding deer on one hand
  indicates that He has removed the Chanchalata (tossing) of the mind.
  Deer jumps from one place to another swiftly. The mind also jumps from
  one object to another. His wearing of serpents around the neck denotes
  wisdom and eternity. Serpents live for a large number of years. He is
  Trilochana, the three-eyed One, in the centre of whose forehead is the
  third eye, the eye of wisdom. Nandi, the bull that sits in front of
  Sivalinga, represents Pranava (Omkara). The Linga represents Advaita.
  It points out "I am one without a second—Ekameva Advitiyam."
Answer: The Damru symbolizes the expansion and collapse of the universe, the cosmic vibration. This is also related to the cosmic sounds:

Damru symbolizes the Universe which is always expanding and
  collapsing. From an expansion it collapses and then it re-expands,
  this is the process of creation. If you see your heartbeat, it is not
  just one straight line but it is a rhythm that goes up and down. The
  whole world is nothing but rhythms; energy rising and collapsing to
  rise again. So the damru signifies that. Look at the shape of the
  damru, from expansion it collapses and again expands.
The damru is also a symbol of sound. Sound is rhythm and sound is
  energy. The whole universe is nothing but a wave function, it is
  nothing but rhythms. What does quantum physics say? It says the same
  thing – the whole universe is nothing but rhythms. It is just one wave
  (Advaita). So the damru signifies the non-dual nature of the
  universe.

Excerpts from a talk by Sri Sri Ravi Shankar: https://xa.yimg.com/kq/groups/17184919/.../understandingshiva.pdf


DHT11 + ESP plus Arduino

Question: Someone could help me?
I want to use dht11 with arduino and esp. Both will read data from dht11
the problem is that simultaneously cannot be done. So the solution will be to set one as a master and the other one as a slave.
the control will be done like so...
another wire from arduino pin->set as output ->esp pin->set as input.
if wire == 1 then dht11 will be read by arduino
if wire == 0 then esp will read dht.
with some delay ofcourse. but the problem is that i dk how to stop the communication between one board and the sensor when the other board will read it. so does it not exist any conflict
Comment: Please add your sketch (so far).
Comment: I've added it already
Answer: Also.. i would see a problem there. Lets say so..
Sensor data.
Gnd.
Vcc
uC 2560
uC Esp
If sensor data is linked to both uC
And  use a line dht_available btween 2560 and esp to handle the uC reading.. then..
If dht_available == HIGH then 2560 read after switch dht line to Low
If dht_available == LOW then esp read after reading dhtline》 HIGH
But the sensor wil continue to send data to both.. regqrding the dhtline is high or low.
I dk how to say to sensor.. if dhtline is LOW stop sending data to 2560 because is esp time to read.
Answer: Disclaimer:
I've never used an ESP chip based board I know almost nothing about them. I am going to assume that it works, in software terms, like an Arduino, and base my answer on Arduino code. If the esp chip works differently, you'll need to adapt my suggestion.

Try something like this:
Connect a GPIO line between the microcontrollers. Also connect that line - through a 10K resistor - to +5V.
Have both microcontrollers set up it's GPIO as an input.
(We'll call the GPIO pin on both microcontrollers the "DHT_available" line. It will be HIGH when the DHT sensor is not being used by the other controller.)
When one of the microcontrollers wants to read the DHT11, have it check the GPIO line. If it's HIGH switch the GPIO line to an output and pull it low, then take a reading. When the reading is complete, switch the GPIO line back to an input.
If the GPIO line is LOW, wait and check again.

Alternately you could attach each of the microcontroller's GPIO lines to interrupt handlers on a rising edge. Then have the interrupt handler set the GPIO line to an output, pull it to LOW, and set a flag that means "begin reading".
Have your loop function check the "begin reading" flag, and if true, trigger a read from the DHT, and once it's complete, set the GPIO back to an input.
With the first option, each microcontroller would need to poll the "DHT_available" line continuously until it goes HIGH before beginning reading.
With the second option, as soon as one of your microcontrollers is done taking a reading, it would stop pulling the communications line LOW, the other one's rising edge interrupt would fire, and the other one would immediately begin reading.
Comment: I don;t know how to write code for all of that stuff. i am a beginner in microcontrollers
Comment: So use 2 separate DHT11 sensors, one for each microcontroller. They're cheap.

DHT11 + ESP plus Arduino


How do I add permission to a sharepoint 2010 group that has no access?

Question: When I go to "site permissions" I can see groups that have some permissions and modify their permissions level, but groups without any permissions set do not appear in the list. I can see them in "People and groups" but even if I edit their properties I don't see a way to add permissions. I can delete them and recreate them with permissions, but there has to be a way to just add permissions to a group without any right?
Answer: I am assuming that you are setting permissions for a subsite that has chosen not to inherit permissions from the parent site.  In which case, merely go to the permissions for the subsite and Add the group that you want to have access to the site and then grant it the permission that you want for the site.
Comment: How does one accomplish that last part through the sharepoint? I can add users to a group, but the "site permissions" page only shows groups that already have some relevant permissions. How do I add permissions to a group that has none already?
Comment: go to Site Permissions for the site and click on Grant Permissions in the ribbon.  Type the group name in the Users/Groups box and click 'Check names' to make sure it finds the right one.  Then click G'Grant use Permission directly' in the box below it.  You probably want to uncheck the 'Send E-Mail' box to avoid spam.
Comment: For some fool reason I thought you could only add users in that dialogue and not groups. It even says otherwise and I missed it.
Comment: This option is hidden underneath the "Options" section on Sharepoint 2013, after the message you might want to send to people. I overlooked it half a dozen times.


Any Way to Use zRAM on Mac?

Question: My friend has an old Macbook that doesn't have much RAM. I am mostly a Linux person, and I don't know that much about Mac, though I did grow up using older ones. I know that on Linux, it is possible to make a system with less RAM faster by installing zRAM, which overrides the swap going to the hard drive in favor of merely compressing memory that isn't being used at present. I know Mac has Kernel Extensions available. This tells me that it might be possible to install zRAM on a Mac. After some googling around, I couldn't find any software. I was wondering if any of you guys knew any safe Kernel Extensions that enable zRAM. For reference, both my friend's Mac and the Mac I will test it on to verify that it works are running High Sierra.
Comment: macOS is based on freeBSD not linux so linux technology is not compatible.
Answer: I can't find a zram app for the mac but there are sites with info on speeding up the ram by adjusting the swapping actions of a mac. This site talks about the same topics you refer to and how to change the swapping for RAM space and how to speed up the performace of your mac.
What Mac does your friend have? It may be possible to upgrade the ram in that machine. Some Macs can be upgraded to twice the max amount given by Apple.
Here is a paper which describes the advantages of compressed memory over swapping. And here is an article talking about compressed ram in a mac. it sounds like the Mac already does what Zram reported to do. You can probablty tell by reading the article yourself.
Answer: Okay a little while after I posted this the first time, but I do have an answer for anyone looking for this in the future. Both Mac and Windows have some form of advanced memory compression built-in already that's enabled by default. Natsfan's article does point out how to force it, however, that would be unwise as I tried it and it only slowed things down.

Any Way to Use zRAM on Mac?


How to find the capacitance at a point?

Question: I wanted to find the capacitance at X,Y,P and Q in the diagram given below. Idea was to find the dynamic power consumption of the circuit and for that we need the capacitance(I got this idea from a IEEE paper 'StrongARM Latch'). Is there any method to get the capacitance using simulation and also get the capacitance using some formula or calculation? I know the dimension of the transistors used. It would be great if you can suggest a method that I could use for this circuit as well as any general circuit. I am sorry if the question is vague, please lemme know if any more information is needed.
Answer: Capacitance, like voltage, is not defined "at a point"; it is defined between two points.
In a VLSI circuit the capacitances include parasitic capacitances to all of the surrounding structures as well as junction capacitances and gate capacitances. Some of these vary with applied voltage.
The right way to do this is to create an actual layout and use your design tools to extract the capacitances for each node.
Comment: You need to use a VLSI layout tool, such as Cadence or Silvaco. Your SPICE schematic does not contain all of the capacitances in the circuit, so there is no way that SPICE can determine their value. These capacitances must be extracted from the actual physical layout of the transistors and wiring, then added to the schematic. And how can capacitances charge or discharge if the voltage across them remains constant?
Comment: How can I do that? I am using LTSPICE, is it possible in that? Oh I think I got what you meant by two points. But then I think working of this latch is such that capacitors are charged when CK=0. At that time M7 will be OFF and thus will the capacitance remain constant ? then can I say Cx ,Cy etc ? will that make sense @Elliot
Comment: Can you please check the new image I added? In the paper he just said that the capacitance will be charged when CK=0. and this will be the reason for  dynamic power consumption
Comment: I'm not sure if you are using "charged" as a verb or an adjective here, but that's beside the point. You don't know the **values** of the capacitances. You need a physical layout from which you can extract those values. SPICE can not do that. If you want to use SPICE without the extracted parasitics that's your decision, but it won't be as accurate.
Comment: For example, there is capacitance from the source/drain to the substrate. This is a PN junction capacitance (unless you are using SOI) that depends on the voltage between the source/drain and the substrate but also on the physical **area** of the source drain region. Do you know the area of your sources and drains?
Comment: yes I know the area of source and drain. please check the new image in the question
Comment: Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/126956/discussion-between-hari-krishna-and-elliot-alderson).

How to find the capacitance at a point?


Does the Refilling Charm contradict Gamp's Law of Elemental Transfiguration?

Question: Half-Blood Prince shows us a charm that can refill drinks, neatly called the Refilling Charm. Does this contradict Gamp's Law of Elemental Transfiguration, which tells us that you can't transfigure food? The line between food and drink is quite blurry. For example, you can drink soup and custard.
Comment: Could it be that instead of transfiguring food the charm is instead teleporting it from a convenient source in order to refill the cup/glass/whatever?  In that way it would seem to match the appearance of food at feasts.
Answer: Gamp's law states that one cannot create certain 5 objects from nothing, one of these objects being food. However, one can multiply, increase, summon or transfigure certain food he has, as Hermione explains:

"Your mother can't produce food out of thin air," said Hermione. "no one can. Food is the first of the five Principal Exceptions to Gamp's
Law of Elemental Transfiguration."
"Oh, speak English, can't you?" Ron said, prying a fish out from between his teeth.
"It's impossible to make good food out of nothing! You can Summon it if you know where it is, you can transform it, you can increase the
quantity if you've already got some"
Comment: Hermione explains that there isn't a contradiction-  multiplying food isn't considered as making it appear out of thin air
Comment: How does stating Gamp's law address if there's a contradiction with it?
Answer: Hermione's own statement of the law has two clauses that could work

Summon it if you know where it is,

Possible in both cases where we see it:  Harry might have seen where the original wine bottle was, and certainly at a wedding, they would have champagne.

increase the quantity if you've already got some

All you have to do here is specify that the glass was not left absolutely dry when "empty" and the refilling is increasing the traces of the drink left.  Perhaps this is why it is a refilling, not a filling, charm.

Does the Refilling Charm contradict Gamp’s Law of Elemental Transfiguration?


How does training work?

Question: So let's say I take a gym, and I place a CP 100 Charmander to hold it. Then, I do a friendly battle, picking my Pinsir to battle against Charmander. What happens if I win/lose? Is the XP that I gain used to level up my Charmander or increase its CP level? I got an achievement for training 10 Pokémon, but their CP levels are still the same. I don't get how it works.
Answer: Carl's answer covers the basics but misses some details.
You don't have to win a battle to affect prestige. As long as you defeat at least one defending Pokémon, you'll have an impact on the gym's prestige. This makes it easier to impact a gym with low-levelled Pokémon. You'll have a bigger impact the more opponents you defeat. I don't know if this is modified based on your/your Pokémon's levels.
When training at a friendly gym, you battle all defending Pokémon with a single attacker, and your prestige modifications are added to the gym. When attacking an opposing gym, you battle all defending Pokémon with a squad of six, and your prestige modifications are deducted from the gym.
When the gym levels up due to prestige, an extra defender slot becomes available for other players of the reigning team. When a gym levels down, defenders will be removed if there isn't a slot for them, starting with the lowest CP defender.
When a gym is reduced to 0 prestige, it becomes available to claim. Newly claimed gyms start at level 2 (with 2000 prestige), with room for 2 defenders. Placing defenders will raise the prestige. I don't know if this depends on the player level or Pokémon CP, but I think it's a flat 2000. As such, 3 defenders can go down and leave the gym at 6000 prestige.
Comment: @felipeek In this regard, training is pointless on a newly claimed gym that isn't being attacked. However, the prestige requirements go up for each level, but each defender adds the same amount. The first defender brings the prestige to 2000, or level 2. The second raises it to level 3 at 4000. The third raises it to 6000, which isn't enough for level 4 (8000). As such, you don't need to train a gym to raise it to level 3 if there are 3 team members, but you do if you want it to go any higher.
Comment: Hey, I don't get it when you say that "placing defenders will raise the prestige". Based on what you've said before, I thought that to place defenders you need first to raise the prestige! And to raise the prestige you need to train the gym... If placing a defender gives 2000 prestige to the gym, and supposing that 2000 prestige is enough to open another defender slot, then training is useless... Could you explain better? What am i missing here?
Answer: When you battle against a gym that belongs to your team (training), if you win, you get an XP bonus for yourself, and a Prestige (reputation) bonus for the gym. Enough of the latter and the gym levels up. Higher level gyms can hold more Pokémon (one per trainer), which makes it harder for opposing teams to take over the gym. If you lose against your gym, no bonus for either you or the gym. The Pokémon you initially put in the gym stays there until it's bumped out by the gym losing enough Prestige to drop one or more levels (the lowest CP Pokémon drop off the lower end of the ladder, essentially). The gym loses Prestige by having opposing teams win against it.
If your gym Pokemon is returned to you as a result of the gym losing enough Prestige, your returned Pokemon is returned fainted, with no health, requiring healing via a Revive and Potions before another battle.
In your example, I don't think either of your Pokémon (Charmander left at gym to train, or the Pinsir you bring in to challenge) gain anything (it'd make sense if they did, but I haven't seen it).

How does training work?


Why are bilabial lateral sounds deemed impossible?

Question: On the IPA consonant chart they are greyed out as impossible to occur. But I can easily clamp my tongue between my lips, or I can close only the center of my lips, either way leaving a narrow hole on both sides. So they seem very possible.
Comment: I haven't checked the official documents, but I have seen people online say that the IPA define lateral consonants as those where airflow is split either side of the **tongue**, rather than the closure in general. Such a definition would indeed make bilabial laterals impossible even if pseudo-lateral bilabials certainly are possible
Answer: The Handbook of the International Phonetic Association says (p. 9):

Shaded cells occur where the intersection of a manner and a place of articulation define a sound which is thought not to be possible, either by definition (a nasal requires an oral occlusion combined with lowering of the velum, and so a pharyngeal or glottal nasal is ruled out), or because the sound is impossible or too difficult to produce, such as a velar trill or a bilabial lateral fricative.

So bilabial laterals apparently fall under the "impossible or too difficult to produce" category. I think I agree with you, in that the shading seems a bit overreaching, or "impossible or too difficult" needs clarification. Other sounds that are physically possible but shaded in the IPA chart include pharyngeal laterals and velar taps. It looks as though whether the sounds would be acoustically distinct, or how likely they would be used distinctively in a language, is also taken into account in deciding which cells to shade.
Peter Ladefoged discusses the difficulty of determining what can and cannot be a speech sound in an interview by Victoria Fromkin (Fromkin 1985: 11):

PL: It's awfully difficult to say why a particular sucking or popping noise is or is not a speech sound except to say that it is comparatively unnatural, which means that it's a little more difficult to make in some kind of way. But think of all the speech sounds that are difficult to make, which shows that the difficulty criterion is not very helpful. [...] Anybody can make a sound consisting of putting the tongue between the lips and moving it rapidly from side to side. It seems to be very easy to do. But no language—or none that has yet been found—has the sound produced in this way.
VF: Isn't that what we used to say about bilabial trills?
PL: Exactly.

(I suspect the "clamping" articulation you mention would be considered linguolabial, by the way.)
Comment: I agree that bilabial laterals are absolutely not difficult to produce. I sometimes use them for /v/ and /f/ in humorously affected speech, and they certainly cause me no trouble.


How is ResNet different from FPN?

Question: I'm learning more about different variations of deep CNNs. Based from my understanding, ResNet makes use of skip connections that's also somehow shaped like a pyramid or triangle? How is this different to Feature Pyramid Network then?
Answer: Typically people use FPNs for segmentation/detection tasks (dense pixel-wise predictions), with skip connection between different levels^1 of the network, while ResNet is used for classification/regression tasks (sparse, image-wise predictions), with skip connections within a residual block (between different layers of the network).
Another difference is, typically, in FPN you do perform some kind of upsample of feature maps (in a form of deconvolution or a interpolation followed by convolution), while ResNet consist of sequence of downsampling transformations (convolutions and poolings).

Schematically, FPNs could consist of ResNet (which transform spatial width x height into features), followed by a "reversed ResNet" (which transforms features into spatial width x height), with skip-connections between corresponding spatial levels, forming a pyramid, hence the name.

How is ResNet different from FPN?


C# working with decorated members

Question: Take this class for example:
public class Applicant : UniClass<Applicant>
{
    [Key]
    public int Id { get; set; }

    [Field("X.838.APP.SSN")]
    public string SSN { get; set; }

    [Field("APP.SORT.LAST.NAME")]
    public string FirstName { get; set; }

    [Field("APP.SORT.FIRST.NAME")]
    public string LastName { get; set; }

    [Field("X.838.APP.MOST.RECENT.APPL")]
    public int MostRecentApplicationId { get; set; }
}

How would I go about getting all of the properties that are decorated with the field attribute, get their types, and then assign a value to them?
Answer: This is all done with reflection. Once you have a Type object, you can then get its PropertyInfo with myType.GetProperties(), from there, you can get each property's attributes with GetCustomAttributes(), and from there if you find your attribute, you've got a winner, and then you can proceed to work with it as you please.
You already have the PropertyInfo object, so you can assign to it with PropertyInfo.SetValue(object target, object value, object[] index)
Answer: You'll need to use Reflection:
var props =
   from prop in typeof(Applicant).GetProperties()
   select new {
      Property = prop,
      Attrs = prop.GetCustomAttributes(typeof(FieldAttribute), false).Cast<FieldAttribute>()
   } into propAndAttr
   where propAndAttr.Attrs.Any()
   select propAndAttr;

You can then iterate through this query to set the values:
foreach (var prop in props) {
   var propType = prop.Property.PropertyType;
   var valueToSet = GetAValueToSet(); // here's where you do whatever you need to do to determine the value that gets set
   prop.Property.SetValue(applicantInstance, valueToSet, null);
}

Answer: You would just need to invoke the appropriate reflection methods - try this:
<MyApplicationInstance>.GetType().GetProperties().Where(x => x.GetCustomAttributes().Where(y => (y as FieldAttribute) != null).Count() > 0);

C# working with decorated members


All warning lights came on, the odometer did not.

Question: I have a 2008 F150 160k miles and all of the warning lights came on (Check engine,  ABS, low tire, parking brake, 4x4 Hi and 4x4 Low from what I remember). The odometer was just a blank green screen.  I turned the truck off and the radio didn't turn off like it normally does when I open the door.  After turning it on and of a few times it was fixed.  This is the first time it happened sobe I bought it a month and a half ago from a big dealership,  but it has so many miles they sold it "as is." I did get them to replace the catalytic converter 2 weeks after I bought it.  It's been almost a month since then and this happened. Also, I don't know if this is related, but I noticed recently my front windows are starting to be difficult when rolling up,  not down.  What could be the issue with the dashboard? I tried providing as much information as I could.
Comment: Does it start and run okay?
Comment: Yeah. I didn't Dobie it like that because I turned it on and of a few times and then it went away
Answer: It sounds to me like the fault is within the instrument binnacle or associated wiring as opposed to the lights being genuine warning lights.  It sounds like a classic "shorting out" problem.  This could be caused by a loose connection or poorly installed accessory (immobilizer, aftermarket radio, etc...)
I'd be inclined to start checking wiring plugs are firmly fixed in place.  Also look for signed of water ingress as rain water leaking onto the circuits could cause a short.
Comment: It happened again for the third time. I smacked the dashboard right above the gauges and it started working properly.
Comment: I haven't installed anything.  I'm thinking it has to do something with the ignition because when it's doing it and the key is out and the doors are open the windows and radio still works as if the key was in.
Comment: @kingcobra1986 That's great that you've somewhat identified the problem and a quick fix!  But plan (and save money) for when the smack no longer fixes because that time will come sooner than expected.
Answer: This can be the key cylinder switch or the harness connector at the other end. These are known to come loose. Find the large harness coming off the key cylinder and follow it all the way to the firewall. Check any connector you come to by opening it, checking for moisture and corrosion, and reassembling it. Check the large firewall connectors as well.
If your in the US check your local laws for implied warranty of merchant-ability. AKA lemon law or implied warranty. Most states have 3 years but some have limits on used vehicles.
Comment: @DucatiKiller  Ignition switch is a bit of a misnomer. In a 2008 all of the ignition switching is handled by relays. The Key switch is a multi-function switch. Controlling Ignition Relays, Accessories, and Starter.
Answer: Alternator may be going bad. Low voltage or wrong voltage will cause gauges to misread data and the slow windows indicate low voltage.


Ubuntu 18.04 server failed grub install

Question: I am trying a fresh install of Ubuntu 18.04 server, without an internet connection (not Live) on my Dell PowerEdge R640. The machine came with a Boot Optimized Storage SSD (RAID 1), which is where I'm trying to install to. I've wiped the partition clean and chosen "Guided - use entire disk". However, when the installer attempts to install the grub boot loader, I get "Unable to install grub in dummy 'grub-install dummy' failed" and I am unable to progress. Has anyone encountered this and/or know what my issue is?
Answer: Since you finished your installation(Please correct) and only pending thing was grub installation, with above error I think it is UEFI system, try to boot from rescue disk and install grub from there.
Hope this will help.

Ubuntu 18.04 server failed grub install


Find coordinates of fallen items in minecraft

Question: In my single player world, I landed my airship (pchan3's mod) to kill a few endermen, instead, I got killed by some mobs and lost a bunch of stuff. My spaceship is still out there (and probably my loot too). Is there a tool/mod with which I can process my world to find the location of the airship (and the dropped items) ?
Answer: Another tip for the future for vanilla players who still use F3:
When you die, do not respawn.  Instead quit to the main menu.  Now open up a different world and hit F3.  Now quit that different world, and go back to your main world.  You'll still be dead, but now you'll be able to see your coordinates.  Hit F2 to take a screenshot and you can then respawn and run to the coordinates that you've screenshotted.
Note that the items you've dropped will not despawn until they're in a loaded chunk for five minutes (cumulatively).  So, if you're a LONG way away, take some time to gear up properly; you don't need to hurry until you're close enough that those chunks are loaded again.
Comment: One little addition - when you're at death-cam, the despawn-timer is still ticking, so try not to make a pause at that moment; check your coordinates and respawn ASAP. Moreover, timer doesn't reset when the chunk is unloaded, it's just paused.
Comment: This doesn't seem to work anymore,
Answer: This is a tip for the future. I've noticed, that you are OK with playing non-vanilla, so I recommend you to install the Rei's Minimap. It's an awesome map mod, with all kinds of useful utilities, including the automatic death point logging (don't forget to turn it on) - it will put a cross on the place, where you died the last time.
However, these crosses accumulate pretty fast, so try to remember to delete them from the map, if you don't need them anymore. Otherwise, some day you will run a couple of thousands of blocks just for nothing.
Comment: yeah I stopped playing at 1.7 . Just bringing myself up to speed on the new stuff. airship lets me travel faster without feeling guilty about using fly mod :)
Answer: You can use the tool itemfinder. It lists all dropped items in the world, sorted by age and last chunk update.

(Disclaimer: I'm the developer.)
Comment: Link no longer works (if the mod has been discontinued I would appreciate if it were noted, if not just update the link)
Comment: This Project seems dead. You can find his Github easily, but unfortunately his app can't handle recent NBT files. I had the same problem as OP and MCEdit doesn't work well on Wine. (I'm on Linux.) So I ended up using Minutor ( http://seancode.com/minutor/ ) which is available on Windows/Mac/Debian (to my relief it's also available on the AUR).
It shows a Map and optionally entities like dropped items.
Answer: You should be able to look around your world using an map editing tool such as MCEdit to find your airship and items.
Answer: All the answers here either show tips that can't be used if you are beyond the death screen or link to 3rd party apps that are either outdated or not available on all platforms.
This is why I recommend Minutor (Official Website).

It's available for Windows/MacOS/Debian here.
And also for Arch Linux here.
Others probably work if you compile it from source

It shows you a map of your world where you can optionally display entities like dropped items (See View|Entity Overlay|Items or press Ctrl+i). You'll find your inventory in no time.
Answer: This is a small improvement to Scindix answer. Minutor make it hard to see where you exactly died.
Change Minutor::jumpToLocation in minutor.cpp to this (adding textbox with the location), so you get a popup which shows you the location of your last dead (only x,z coords, not the height).
void Minutor::jumpToLocation() {
  QAction *action = qobject_cast<QAction*>(sender());
  if (action) {
    Location loc = locations[action->data().toInt()];
    if ((loc.dimension == "minecraft:the_nether") && (m_ui.menu_Dimension[0].isEnabled())) {
      // dimMenu[0] defaults to Overworld
      loc.x *= 8;
      loc.z *= 8;
    }
    mapview->setLocation(loc.x, loc.z);
    //qDebug() << "Jumped to " << loc.x << " " << loc.z;

    QMessageBox msgBox;
    msgBox.setText(QString("Location: ") + QString::number(loc.x) + " " + QString::number(loc.z));
    msgBox.exec();

  }
}


Any alternatives to Google Apps for your domain?

Question: I'm specifically interested in a webmail service, but I will appreciate suggestions to replace other components too.
Comment: You can add additional domains to your existing Google Apps account as a separate domain to enjoy the same Google email service as that for the primary domain. See [here](http://www.kavoir.com/2014/02/you-dont-need-a-google-apps-alternative-for-email-hosting.html). So if all you want is Gmail for your own domain, just add it as a separate domain. No need for a separate apps account or any alternatives.
Answer: Zoho offer a pretty comprehensive range of products, most of which are free for a limited number of users/projects/whatever...

Calendar
Challenge
Chat
Creator
CRM
Discussions
Docs
Gadgets
Invoice
Mail
Meeting
Notebook
Office for Microsoft Sharepoint
People
Planner
Polls
Projects
Recruit
Reports
Sheet
Show
Viewer
Wiki
Writer

Even though the functionality overlaps, they integrate with Google Apps in some places, so you could have a hybrid solution.
Comment: I like but don't love Zoho. They seem to be rather over-extended, and they're substantially buggier than Google Docs. This said, they have a lot more features, and if you're OK working around their quirks, they can be a great solution.
Answer: Microsoft officelive has web pages, email, etc. for your domain.
Answer: Yahoo is still alive, at least as for webmail. See this.
Comment: But the title states "For your domain"
Comment: This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post.
Comment: I'm specifically interested in a webmail service. How is suggesting a Webmail service not an answer ? I
Answer: Zimbra is a good alternative. You can find people that propose to host Zimbra for you on Zimbra Hosting Providers.


Can you play Fornite on PS4 without PlayStation Plus?

Question: Can you play Fornite on PS4 without PlayStation Plus?
If so, how do you do it?
Answer: The majority of the time most online/multiplayer activity on PS4 games requires a Playstation Plus membership. Same thing applies for Xbox Gold membership for Xbox games.
But not always the case as the Battle Royale does NOT require PS Plus. Source here.
Answer: Yes, You first need to download the game from PSNetwork Using your psn id just after installing game game will ask for a account sign-up for fortnite, that is the last thing you need to set up an account with the fortnite, have Fun :) yup I get that and it should be better if they could change and until you get game and then pay the guy can do it
Comment: Your answer's a bit late so I've already had 2 months of fun playing Fornite.
Answer: You require only the system, a usable network, the app, and a PSN account.
Comment: You need the account for a few things but you do not have to make it.


Why do the dipoles in dichloroethane point in opposite directions?

Question:
I understand why the dipoles would align in a polar solvent to maximise dipole-dipole interactions but wouldn't the replulsion due to like charges destabilise the molecule? Is it a MO effect instead? An undergraduate level response would be appreciated.
Comment: Suppose you just have H-Cl molecule, can you draw the dipole moment directions?
Comment: Yes, they're aligned, in the same direction.
Comment: No, what is the direction for H-Cl's dipole moment? There is only one dipole moment so the question of alignment does not arise. Just think about H-Cl. What is the direction of dipole moment arrow? It is a vector, right?
Comment: Yes it starts at H and ends at Cl
Answer: When dipoles are free to move, all else being equal, they will tend to align "tail-to-tip". That is the case, for example, when the dipoles belong to different molecules in a liquid. But the two polarized bonds within a single molecule of dichloroethane are not free to move to arbitrary positions. The two carbons are stuck together by a bond, and the only degree of freedom is rotation around that central carbon-carbon bond.
This rotation doesn't change the distance between the two positive carbon atoms. It also doesn't change the distance between either carbon atom and either chlorine atom. So the only relevant effect of this rotation is to change the distance between the two negatively charged chlorine atoms.
Therefore, the most stable conformation is the one where the negatively charged chlorines are furthest apart, since that minimizes the repulsive force.


Rails: aggregate multiple models into single view (think dashboard)

Question: I have a Rails 3.1 "blog" type app and my Post#index has become a sort of overview (or dashboard or sorts)  into the whole system. The main content is pulled from the Post model but a sidebar contains info from an Event model, there are other snippets from a News model, etc…
Post#index is a busy action that has to populate many instance variable before /view/posts/index.html.haml gets a call to render and then the many layouts and partials go to work.
Being as some of these other areas are self-contained, so to speak, I'm wondering if there's a better "Rails way" to approach this? Perhaps I should be looking at encapsulating the Event sidebar (which is effectively Event#index) into some kind of entity that can be re-used perhaps in other views? And, if so, how?
What are the options?
Answer: You might checkout
http://cells.rubyforge.org/
Answer: I would look into widgetizing it.  A framework that I looked into in the past was: http://apotomo.de/ This provides a nice clean way to widget"ize" as well as callback functionality (Ajax) for specific widgets.