Resistor cube problem solving method

Question: I was solving problems from Irodov when I came across the method called point of symmetry method. I cant find this method anywhere. So what is this method? Here is the link to the problem solution http://irodovphysicssolutionrks.blogspot.in/2013/12/problem3150_16.html
Comment: For symmetric networks one can simplify by removing branches that carry no current, which is probably what he does here. Please note, though, that all of these symmetric problems are just brain-teasers with very little practical value. You should instead focus on understanding how to solve general circuits without any symmetries by using Kirchhoff's laws and linear algebra (assuming that this is for a EE degree?).
Comment: In general cases, when using known transformations wont help you, you can add a test generator of arbitrary emf between points you're calculating resistance. You can do that in this example but its not necessary since its easy to spot nodes on the same potential ( hence no current flows between the edge connecting them. )
Answer: The idea of the linked page is this: you can often find the equivalent resistance of certain highly symmetrical assemblies of resistors by adding "phantom" wires between points with equal potential. This has the advantage of giving quick, near-automatic answers without the use of Kirchhoff's laws, but it is very limited and works in very few cases.
This page explains it in (much!) better detail than the page in OP's link.
Comment: This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - [From Review](/review/low-quality-posts/127732)
Comment: @JonCuster  I think that you are being a little too harsh about this comment which does answer the question.  The answer given by ritvik1512 assumes that the current through each of the resistors connected to node $A$ is the same.  What Soham is saying is that the other ends of those resistors are at the same potential and so they can considered to be in parallel ie connected together with "phantom" wires.  Repeating the process from node $B$ gives you a series arrangement between nodes $A$ and $B$ of 3 parallel resistors then 6 parallel resistors then 3 parallel resistors.
Comment: @JonCuster I've expanded my answer. I think the question specifically asked for an explanation of the nonstandard method given in the link, so I believe this is an appropriate answer.
Answer: I'm not too sure, what you mean by  "Point of Symmetry" method, and the link doesn't make much sense as well.
Anyways, I'll list the approach, I usually use, see if it is of any help to you.
Suppose the cube is:

Kirchhoff's current law, which states that the sum of the currents entering and exiting a node is zero, is essential in the analysis.
The first step is to recognize that at a node where equal resistances exist, current entering the node will be distributed equally between the number of output branches - in this case, three. For convenience sake, I assigned an input current of $3$ amperes at the corner labeled "A," so that 1 amp will flow through each output branch. Note that $1 A$ flows through each branch.
On the far side of each of those branches is another node with two output branches. Again, due to symmetry, the input current will divide evenly so that $\frac{1}{2}A$ flow into each branch. Looking at the cube's output node labeled "B," it is apparent that the same situation exists as with "A."
Now that you know the current through each branch, and you know that each branch has a single $1 \Omega$ resistor in it, Ohms law allows you to calculate the voltage across each resistor.
The next step is to sum the voltage from input node "A" to output node "B." Any path you take travels along three edges, and you can find the total potential difference.
Finally apply the Ohm's Law to get the resultant resistance.
Finally, I agree with the comments above. You must learn how to deal with any type of circuits in general.
Hope it helps!
Answer: Your friends for this problem are the laws of Ohm and Kirchhoff. Both laws are linear and you can build a system of linear equations that you solve. In the end I get 5/6 times the resistor along the sides of the cube. Other answers are also possible because of the boundary conditions of the system. An article on my blog https://pa1ejo.wordpress.com/2018/01/27/resistor-cube/ describes how to code it in MATLAB, the model values are compared to measurements of a soldered resistor cube.
Ejo Schrama
Comment: please format properly
Comment: And how do you do that with code?
Comment: I moved the code to my blog.
Comment: Ok, this is my final version for now

Resistor cube problem solving method


Is there any supplement for improving lung health?

Question: Is there any supplement or natural remedy for improving lung health? i have been a smoker for 15 years and i have been off of it for 3 months. and i am wondering if there is anything that could help with the recovery. (Mostly past all the withdrawal symptoms)
Answer: According to this study Dietary antioxidants and 10-year lung function decline in adults from the ECRHS survey apples, bananas and tomatoes offer a benefit.
Answer: Unfortunately you've no doubt damaged your lungs. Fortunately, you should be able to heal most of the damage given time and healthy living. Because smoking causes inflammation in the lungs, you might try taking some Omega 3s (clinically effective dose of 2-3 grams) given that they have anti-inflammatory effects along with plenty of other health benefits. You'll also want to start challenging your lungs. Go for a walk or go for a hike. When those things aren't challenging anymore, start jogging, try doing sprint intervals. Your lungs didn't get to where they are overnight, and they won't heal overnight either. Be consistent and give it time, you'll improve.


Is the relation between expenditure and indirect utility in the Mascolell's diagram wrong?

Question: In page 75 of Mascolell's microeconomic theory, there is a diagram showing some relations. In particular, there is a relation saying $e(p,u) = v(p, e(p,u))$. I wonder if this is a typo? If not, how to interpret it so that it reconciles with the usual relation $v(p,e(p,u)) = u$?
Answer: We can say that $v(p,w)=e(p,v(p,w))$ (or, equivalently, that $e(p,u)=v(p,e(p,u))$ if we are using the "money metric" indirect utility function. You can read about this in section 3.I of MWG. I guess that is what the authors had in mind when they drew figure 3.G.3.

More generally, the relationship between $e$ and $v$ is one of inverses: $e(p,u)$ tells us the mapping $$\text{target utility}->\text{money spent}$$ while $v(p,w)$ tells us the mapping  $$\text{money available}->\text{attainable utility}.$$
So $e$ maps from money to utility and $v$ maps from utility back into money.
In words: if we take a given $w$ and feed it into $v$, we will get an answer to the question "what is the most utility I could ever achieve, $\bar{u}$?" Now, if I take that $\bar{u}$ and feed it into the expenditure function I get an answer to the question "what do I have to spend to achieve utility level $\bar{u}$. That answer will be exactly $w$ (so $e$ 'undoes' the transformation applied by $v$, and vice-versa).
That's just a long-winded way of saying that you can obtain the expenditure function by inverting $v$ in its second argument, or obtain $v$ by inverting $e$. This is made explicit in equation 3.E.1 of MWG.


Are signing bonuses common place in Australia?

Question: Signing bonuses: are they utilised by Australian companies regularly enough, that to ask for one when negotiating salary for a new job, would be considered 'ok'?
Comment: In 17 years of IT work in Australia, I've never received one, never offered one to a candidate when making a job offer, and never heard anyone ever speak of having gotten or offered one. Make of that what you will.
Comment: This is probably industry dependent.
Answer: I've heard of it occurring, but certainly not commonplace.
The cases where I've heard it occurring are to offset a bonus. For example, if someone is due X as a bonus the hiring company may match this.


Listbox events in HTML

Question: I want to call 'onclick' event on listbox. There is 'onchange' event which is called whenever the displayed options changes but I want to call a function when the list box is selected or the displayed option is selected again. Any help is appreciated.
Answer: I think by using HTML listbox you cant find Click event. It is Having only change event.Refer This
But You can Do it by some other way Using JavaScript. I found one interesting link Refer This
good Luck.
Comment: The first link is dead.

Listbox events in HTML


Why is my mint plant growing new leaves that appears web like

Question: I recently bought this mint plant from walmart and I repotted it in my own pot. it had been doing good until I accidentally left it in the sun too long and it all shriveled. however just after 8 hours of watering it revived and has been doing well. two/three weeks later (now) i'm noticing new leaves growing but very spongy or web looking. does anyone know? I googled and saw stuff about possible mites/spiders but i'm not sure that it's what it is.
Answer: From what's visible in your photo, the newer upper leaves look fine and your plant's prospects look good.  It's possible the damage on the lower leaves is from lack of water but it looks more like some insect had a meal.  If the plant is outdoors the lineup of potential suspects is long, but any stressed plant is more likely to be attacked than a thriving one.  Spider mites are bright red, often on the underside of leaves, tend to move around energetically, and while tiny, are visible to the naked eye.  Seen from the top, the damage they leave is very fine speckling (google spider mite damage images).  So I don't think they are eating the mint.  I'd keep an eye on the plant and see if maybe with regular watering it will simply outgrow the rough last couple weeks it has had.
Answer: This is most likely leaf miner damage. The adult lands on a leaf and pierces the leaf surface to lay eggs inside the leaf among the soft tissues between the top and bottom hard layers of the leaf. The larvae emerge inside the leaf and start tunnelling their way through the soft material. Once the inside is destroyed the top and bottom layers dry out and collapse leaving holes. Note how the leaf miner larvae have a problem passing through the leaf veins so parts of the leaf remain functional.
Leaf miners are known to attack mint plants. The best we can do is to put the plant in good high light conditions to harden off the leaves so the adults can't lay their eggs, and moderate the fertilizer for the same reason. Pick off any signs of new tunnelling as you see it to interrupt their life cycle.


Manga where the main character is summoned by a king of a kingdom, then kicked out to live in a forest infested by an army of the demon

Question: I forgot the description, but it's about the mc being summoned by a king of a kingdom, then kicked out to live in a forest infested by an army of the demon. He later purifies the whole Forest. I read this about a year ago, and the last time I checked, it had more than 10+ chapters, probably 15-30.
Comment: Ahh honestly I think about a year ago, the main character was summoned by a king of a kingdom
Comment: Welcome to the site. When did you read this manga, and who/what was the main character summoned by?
Comment: That extra bit of info helped me find what looks to be a perfect match. If my answer below is correct, please [upvote](https://scifi.stackexchange.com/help/privileges/vote-up) it and mark it as [accepted](https://scifi.stackexchange.com/help/accepted-answer) by clicking on the check mark beneath the voting buttons. Or if it's incorrect, please indicate that with a [comment](https://scifi.stackexchange.com/help/privileges/comment) so we know to keep looking. Thanks.
Comment: That's correct! Thanks alot for the help :D
Comment: In that case, please mark the answer as [accepted](https://scifi.stackexchange.com/help/accepted-answer) by clicking on the check mark beneath the voting buttons. It will reward me with some [reputation](https://scifi.stackexchange.com/help/whats-reputation), and helps with the administration of the site. Also, please consider [upvoting](https://scifi.stackexchange.com/help/privileges/vote-up) the answer as well, if you haven't already. Thanks.
Answer: Might this be Lv2 kara Cheat datta Motoyuusha Kouho no Mattari Isekai Life / Chillin Different World Life of the Ex-Brave Candidate was Cheat from Lv2?

Banaza, who got summoned to the magic kingdom of Cryroad as a hero candidate, due to having only the abilities of only a regular citizen, got treated as a disqualified hero. He, who originally was supposed to be returned to his original world, due to the magic kingdom's mistake, was inevitably forced to live in this new world. That kind of person, the moment he became level 2 after defeating a single slime, acquired all sorts of skills, and transcended into a super cheat with all status abilities broken through the limit! Even so, he does things at his own pace with an easygoing smile.

The main character, Banaza, is summoned to the Kingdom of Cryroad as a "hero candidate", but upon being evaluated, it's determined that he has low stats and "no trace of God's power". He is subsequently rejected in favour of the next candidate to show up, who happens to have very high stats. Banaza then winds up in the Forest of Delavaza, where he unknowingly wipes out the first unit of a demon army using purification magic.
The series currently has 22 chapters.


Does our VPS have its kmemsize limit set too low?

Question: Short Version:
Are there any official guidelines on what the kmemsize
barrier and limit should be set to for a container in
Virtuozzo/OpenVZ intended to be used as a Web server?  We've found
posts in blogs and forums that
say that kmemsize should be at least 10% of vmguarpages (after they
are converted to the same units).  Sadly, nothing we've found cited an
authoritative reference (or even a reason) for this 10% assertion.
Any idea where that 10% idea comes from?
Long Version:
A client of mine has a website on a 1and1 hosted VPS running CentOS
5.9 64bit.  The site is extensive, but of particular note is an online
survey that is typically done by groups of people at the same time
from the same location (picture a classroom).  Sometimes (but not all
the time) when a group all starts the survey process at about the same
time, we see a huge spike in the kmemsize "held" value on our VPS.  At
first this was causing us to exceed the kmemsize limit, increase our
kmemsize failcnt, and send errors to our users' browsers.  By
adjusting Apache's MaxClients I can keep us from exceeding the
kmemsize limit.  However, if we peak just below the limit, http
requests get queued and the site slows to a glacial crawl, pages
literally take minutes to load, it's arguably no better than crashing.
It seems quite clear that we need a higher kmemsize barrier/limit.
That's the background.  My real question is about whether our current
limit is reasonable.  We are supposed to have 1G of RAM "guaranteed"
(vmguarpages barrier is set to 262144), with possible bursts up to 4G.
But I've noticed that even when we are near or at the kmemsize limit,
free still reports that we're using less than 600,000k of memory.
/proc/user_beancounters reports our kmemsize barrier at 31457280 and
the limit at 34603008.  As referenced in the Short Version above, we
found sites claiming that the kmemsize should be set to at least 10%
of the "guaranteed" memory set by vmguarpages.  Doing the math I'm
showing that we're at
kmemsize barrier = 31457280 B = 30 MB = about 3% of the vmguarpages barrier of 1024 MB
This seems consistent with the idea that (according to free) we never
seem to use much more than half of our total memory "guarantee".  So,
we want to just call 1and1 and say "wow, this service you're offering
doesn't meet the minimum recommendations for VPS's, and as such it's
practically impossible for us to actually use the amount of memory
that you are guaranteeing us".  And, if they won't listen to reason
and fix it, move to another provider.  However, both to make my point
with the provider and to justify the move (if necessary) to the
higher-ups at my client's organization, I'd love to be able to cite a
more authoritative source for this "kmemsize should be at least 10% of
guaranteed memory" idea.
Comment: Did you get any reponse from 1und1? I am using their VPS and their `kmemsize` sucks big time, still. And that's with using 1.3G memory.
Answer: Look at the kmemsize entry on the Parallels knowledge base.
Comment: Welcome to Server Fault! We really do prefer that answers contain content not pointers to content. Whilst this may theoretically answer the question, [it would be preferable](http://meta.stackexchange.com/q/8259) to include the essential parts of the answer here, and provide the link for reference.


Unless invited, he won't attend the show

Question: "Unless getting invitation, he won't attend the show." Is this sentence correct? How to omit the adverbial clauses of condition in a sentence?
Comment: Which is your actual question? The one in the title or the one in the body of the question?
Answer: unless invited
K. Izzo & C. Marsh Fabulous Girl's Guide to Decorum (2002)    Never send scripts, showreels or audio cassettes unless invited to do so.
Your sentence modified:

"Unless invited, he won't attend the show."
Answer: It is incorrect, even though it can be understood.  The reason is not altogether clear.  However, it has nothing to do with adverbial conditional clauses (whatever they are).  The obvious and simple expression is:

Unless he gets a ticket, he won't attend the show.

This is a simple conditional sentence, with a protasis, introduced by the subordinating conjunction 'unless', followed by the main clause protasis.  Protasis and apodosis could be written in the opposite order without changing the meaning.
If you want, for some reason, to avoid having a subordinate clause, you could use an adverbial phrase 'without getting a ticket', or, better still, 'without a ticket'.  The adverbial phrase sits better after the main clause than before it:

He won't attend the show without (getting) a ticket.
or just He won't attend the show without a ticket.

Or you can say these things the other way round.
In at least one dialect of English, descended from Yiddish, you can even say:

Without he gets a ticket, he won't attend the show.


Accordion Feature Not Working

Question: Hello—the dropdown accordion feature on this linked landing page on our site is not working. When you click the dropdown button, the accordion feature only stays open for a split second. This is a new glitch! Does anyone have any feedback on what may be causing this issue and how we may troubleshoot it? Thanks!
Comment: This isn't specifically an ExpressionEngine question, so I am closing this, but see the helpful answers below. Feel free to edit your question or ask a new question focusing more specifically on ExpressionEngine.
Answer: If you are not a developer, you need a developer's help. Here is what is going on:
On the drop-down container elements, you have a class called visually-hidden, and the combo looks like this:

    ...hidden drop-down

So it is hiding a block element by positioning it very far off of the visible area of the rendered document. When you initiate the drop-down expanding, the JS/library you are using removed the visually-hidden class from the drop-down container element, and the animation occurs as we would expect. But when the animation finishes, the visually-hidden class gets reapplied to the the drop-down container element, essentially re-hiding it and causing the drop-down visual area to re-collapse.
So whatever JS/JS library/jQuery library code you are using to script that UI interaction is incorrect.
I think this is a little broken past that from an engineering prospective (the path to allowing the container to be visible, enabling the animation, and then reverse in some manner).
Can you post the related code to how this accordion feature works? This will help us help you. It isn't clear how this is even ExpressionEngine related, but I still want to help.
Answer: you might have asked this question in the wrong user group. https://expressionengine.stackexchange.com/tour
Apart from that, your dropdown works as expected in Chrome. Mac Version 69.0.3497.100 (Officiell version) (64 bitar)
Answer: It is hard to know for sure what is going on - but I can see the error using Firefox 62 (Mac).
I would suspect that part of the problem is that the site is using jquery 1.12.  This version of jQuery is quite old, and not being developed.  It is quite possible that recent changes in some browsers (say Firefox) have caused it to respond to the old jQuery script in unexpected ways, while in others (e.g. chrome) different development paths mean that these changes in behaviour have not shown up.
It may be that you can find a rearrangement of the jquery / javascript driving your accordion that will side-step this problem, but a better long-term fix would be to begin thinking about updating your site to work with a newer (and supported) version of jQuery.  The latest version is 3.3.1
HTH
Comment: jQuery 1.12 is quite old, but still very stable in modern browsers. It is also still quite widespread https://w3techs.com/technologies/details/js-jquery/all/all . We'd have known if this was a major bug. Most likely a plugin, custom code, or the template outputting wrong.
Comment: A problem with `a plugin, custom code, or the template` would not explain why it has only recently stopped working in some browsers, especially when it looks like the code driving the accordion has not changed.  On face value, the only thing that appears to be changing here is the browser code - but what / when / where how remains a mystery.

Accordion Feature Not Working


Massachusetts State Tax: Can one at the same time apply a FICA deduction on the state tax return and ask for a FICA refund?

Question: I am J1 nonresident for tax purposes using the Sprintax software and I ran into a bit of a conundrum. The software is applying a FICA deduction for my MA state tax return but I am claiming a refund of said FICA from my employer... In this situation does the FICA deduction still apply or is it a bug in the software?
Comment: How quickly do you expect to get the FICA tax refunded? Will your employer be issuing you a corrected W-2?
Comment: Not before the tax deadline. They will be issuing a W-2C but their NRA office told me to proceed with filing the return with my original W-2. Can I just add the FICA refund as income for the 2023 MA state tax return?
Answer: Because you know you will be getting a corrected W-2, I would recommend waiting to file your actual return to both the IRS and the state and instead file the request for an extension to both agencies.
This will put your new filing deadline out to October, but it does not move the payment deadline. So what you need to do is calculate your tax returns based on the numbers you believe the corrected W-2 will show. If you are expecting a refund, then there is no problem, but if you are expecting to owe any tax, you'll need to send that payment in along with your extension request form.
Then when your corrected W-2 arrives, you can doublecheck the numbers and file your tax returns with the right numbers. This is easier, in my opinion than filing now with numbers you know are incorrect and amending later.


General Grievous' cough

Question: Was his cough explained in the canon Clone Wars? I know in the 2003 version it was, but I'm unsure of the CGI Clone Wars. I was unable to find it on Wookieepedia.
Comment: Possible duplicate of [Why does General Grievous seem to have a persistent smoker's lung?](http://scifi.stackexchange.com/questions/6350/why-does-general-grievous-seem-to-have-a-persistent-smokers-lung)
Comment: That question talks about Tartakovsky's non-canon 2D clone wars.
Comment: Related:  http://scifi.stackexchange.com/questions/3522/general-grievous-what-is-he-actually?rq=1
Comment: @DVK - That's why I retracted the VTC and left the message.  That question asks about SW in general, but the answer focuses on the noncanonical CW.  I'm not sure if it's really a dupe.
Comment: maybe it's an homage to Gollum from LotR
Answer: He more or less obtains it in the episode "Lair of Grievous"
In the 10th episode of Season 1 of the The Clone Wars (the CGI canon series), Grievous has his legs chopped off by the Jedi Master Kit Fisto.
Grievous' horrific injuries are repaired by his medical droid A4-D, but he isn't the same afterwards — in particular, he develops a noticeably persistent hacking cough.
Truth be told, he seems to have a mild cough from the beginning of The Clone Wars (with no explanation), but it is clearly far worse after episode 10.  It seems to be something that accumulates with his injuries.

(Thanks @WadCheber for the video.)
Comment: https://www.youtube.com/watch?v=EfJgbqz_xxM

General Grievous' cough


MinGW Library not Included with Irrlicht

Question: I'm currently working with MinGW compiling C++ programs. I downloaded irrlicht-1.8 and am trying to do the first tutorial. It is finding the header file, but when I try to compile I get the following error:

C:\Users\E5DC9~1.MAR\AppData\Local\Temp\ccfR3pSv.o:LightSpacePrototype.C<.text+0xb12>: undefined reference to '__imp__createDevice'
collect2: ld returned 1exit status

I should note that this a public computer on which I have a private account on their network. I have no administrator privileges. This is the only windows computer I have access to. Where do I begin? I have no idea what that error means. My .c file isn't even in the C drive. It's on the H drive. When compiling, I give the following command in a .bat file:

H:
CD H:\Desktop\MinGW\Bin
G++ H:\Desktop\MinGW\SOURCE\LightSpacePrototype.C -o H:\Desktop\MinGW\COMPILED\LightSpacePrototype.exe -L H:\Desktop\MinGW\irrlicht-1.8\lib\Win32-gcc -I H:\Desktop\MinGW\irrlicht-1.8\include
CMD

the -I to specify the header file directory to search, as I said above, works fine. I am confused by the library directory though, as the tutorial is for Visual C++, not MinGW. So the tutorial said to specify the path as H:\Desktop\MinGW\irrlicht-1.8\lib\Win32-visualstudio rather than H:\Desktop\MinGW\irrlicht-1.8\lib\Win32-gcc like I have it. I assume I'm supposed to use gcc, as that seeems to be the MinGW version. However, in the tutorial it said I needed "#pragma comment(lib, "Irrlicht.lib")" But in the Win32-gcc there is no Irrlicht.lib file, just two other files called libIrrlicht.a and libIrrlicht.def, however there is a Irrlicht.lib file in the Win32-visualstudio folder. I have tried  removing the pragma comment and switching the library directory, but neither that nor any combination of that works. My friend tells me that the error means that the compiler cannot find a file it needs, but I have no idea what file that is. I only assume that it is Irrlicht.lib.
Source code:
<code>#include "irrlicht.h"

using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;

#pragma comment(lib, "Irrlicht.lib")

int main()
{

IrrlichtDevice *device = createDevice(EDT_SOFTWARE, dimension2d<u32>(512, 384), 16, false, false, false, 0);

device->setWindowCaption(L"Hello World! - Irrlicht Engine Demo");

IVideoDriver *driver = device->getVideoDriver();
ISceneManager *smgr = device->getSceneManager();
IGUIEnvironment *guienv = device->getGUIEnvironment();

guienv->addStaticText(L"Hello World! This is the Irrlicht Software engine!", rect<s32>(10,10,200,22), true);

IAnimatedMesh *mesh = smgr->getMesh("H:Desktop\MinGW\irrlicht-1.8\media\sydney.md2");
IAnimatedMeshSceneNode *node = smgr->addAnimatedMeshSceneNode(mesh);

if(node)
{

    node->setMaterialFlag(EMF_LIGHTING, false);
    node->setFrameLoop(0, 310);
    node->setMaterialTexture(0, driver->getTexture("H:Desktop\MinGW\irrlicht-1.8\media\sydney.bmp"));

}

smgr->addCameraSceneNode(0, vector3df(0,30,-40), vector3df(0,5,0));

while(device->run())
{

    driver->beginScene(true, true, SColor(255,100,101,140));
    smgr->drawAll();
    guienv->drawAll();
    driver->endScene();

}

device->drop();

return 0;
}
</code>
Comment: looks like you're linking visual c++ files. anyway, do provide link to the tutorial.
Comment: Just a suggestion... post your problem in the question section, and your solution as an answer, then select your answer.  Then this won't show up in SO's "unanswered questions".
Answer: Solution from OP.
Let me first say that while what I did allows it to compile, it does not execute due to some 32 bit/64 bit error, but that's another topic.
There were two problems:
-Compiler was not compiling a library
-Compiler was not including a library
For the first problem, I had to add -c to the start of the compiling command, t tell it to compile the library files. For the second, I had to use -l and specify the library file to include.

H:
CD H:\Desktop\MinGW\Bin
G++ -c H:\Desktop\MinGW\SOURCE\LightSpacePrototype.C -o H:\Desktop\MinGW\COMPILED\LightSpacePrototype.exe -L H:\Desktop\MinGW\irrlicht-1.8\lib\Win32-gcc -l H:\Desktop\MinGW\irrlicht-1.8\lib\Win32-gcc\libIrrlicht.a -I H:\Desktop\MinGW\irrlicht-1.8\include
CMD

For the pragma comment, I just did this:
<code>#pragma comment(lib, "libIrrlicht.a")
</code>


DevDemon Credits decode_date deprecated

Question: DevDemon Credits v2.5.3a includes a deprecated method decode_date which was removed in #eecms v1.9.2.
Comment: Hey Leevi - bug reports should go straight to devs, not here.
Answer: In ajax.credits.php line 193:
<code>$this->EE->localize->decode_date('%d-%M-%Y %g:%i %A', $row->date))
</code>
should be replaced with:
<code>$this->EE->localize->format_date('%d-%M-%Y %g:%i %A', $row->date))
</code>
Answer: Credits 2.5.4 fixes this issue.

DevDemon Credits decode_date deprecated


Google Visualization Gauge dynamic update with jquery ajax - from json feed

Question: I had a REQ from a client that wanted to see a graphical representation of the sysInfo data on a LAMP server. For those of us who prefer a visual there's live demo here.
I found the gauges on google charts and in their demo the graph was moving. That's what I showed the client, so that's what they wanted. It's just that after poking around under the hood, I quickly realized that they were just updating it with random numbers. so I attempted to do it myself. I scoured the internet and I even posted my issues here but no-one replied.
So, here's what I did...
Initially, I was trying to get my google visualization gauge chart to update via ajax. my json feed returned:
[
{"key":"label1","value":"50.25"},
{"key":"label2","value":"99.43"},
{"key":"label3","value":"4.47"},
{"key":"label4","value":"7.06"}
]

I got it to initially render a static image, but it never seemed to update. it took me a while, then I figured out that my values had quotes around them. That was problem #1: the API was looking for numeric data.It was my 1st time with a json service. I wasn't sure if I needed to somehow add the status:"ok" or if I needed to do an eval() like so many other posts told me. Well, I didn't need either...
My script was as follows:

I was thinking maybe I needed to create another DataTable object, or if declared it outside the function, maybe I can use setInterval(data.setValue(i,1, serverDatai),1500) to update the element directly. Either way, the 1st step was accessing the json data. I knew I must have been be doing something stupid... At the bottom of my post (on this page, before I re-re-edited it) I added:"any help or even a nudge in the right direction would be greatly appreciated..." I came back every day for a week and re-re-re-edited. I thought I was just being unclear or that it was a stupid question. "I've seen stupid questions get answered", I thought, "maybe mine was really-really stupid?" None-the-less, I still needed an answer. Although I'm not the best programmer - I'm a pretty good googler. I read everything I could get my eyes on. No luck. nada, non, zylch, niet, nothing...
Well, it was driving me nuts, so here's what I figured out:

As I mentioned before, I had quotes around my numeric values. That's what made my chart bomb... and since jQuery doesn't give you any errors I was kind of blind to the fact that I was stuffing character data into my new array until I called the .draw() method and my pretty picture disappeared.
Another problem that I didn't think to check was the version of jQuery I was using. It was old & didn't have json parsing built into it. so, I would have had to eval the server data, parse the data stream & build the data structure from there.
Both #1 & #2 caused the data row updates to fail and my fields WERE all coming back undefined.
I also had some variable declarations out of scope - namely the class that added the .Guage and incidently the .DataTable() - which came along for the ride.
data.setValue(i,1,serverData[i].value) should have been looped in the success callback of the AJAX() call - and this completely eliminated my refreshChart() method.
The last problem I was having was figuring out how to access the json data & stuff it into my existing array. That was a little more tricky than I thought. a more experienced programmer probably would have just known better... but, I was stubborn. You can see where I was trying to do a chartData.push() into the existing array. I was calling possible every combination of arrayName[][] for several nights. It turned out that I COULD just re-use google's .setValue() method. As you will see below, using the success() callback method I was able to loop it once stuff the 1st few elements into the gauge and the rest into the other places it needed to go, using:

for (var i = 0; i < data.length; i++) {
        if (i<4) {
            dashData.setValue(i, 0, jsonData[i].k);
            dashData.setValue(i, 1, jsonData[i].v);
             } ...

I re-wrote the whole thing from scratch. In the next few days, I will probably re-write it again, several times. Eventually this will evolve into full blown drupal & wordpress plug-ins and a how-to article. I will post it on my blog LogicWizards.NET b/c the jQuery documentation is vague and the example demo on google's site isn't very straight forward, either.
To make a long story even longer, here's what I came up with:

You will see that the bulk of the heavy lifting is done via the updateJSON() function. and now it works pretty nicely. I figured that if I was having this many problems then somebody else might benefit from a quick edit of my original post - with me answering my own questions as I went along. I think that the process of writing my questions out for StackedOverflow helped me to tell the difference between the problems and the symptoms, and also to find the answers. Even though nobody else had an answer.
If anyone would like to see a live demo go to http://LogicWizards.NET If you need this presentation layer stuff, please feel free to steal it from the 'view source'. The guts of the application are all on the back end... Now, it took me the better part of a week to put all the pieces together. Forgive me for rambling. I will edit this when I have more time. I've just taken so much code from THIS site and the rest of the community, over the years, I feel good about giving a little bit back... just remember to vote this article up, if you use it.
I hope it helps someone who needs it.
Happy Hacking,
Joe Negron ~ NYC
Comment: this is very similar to http://stackoverflow.com/questions/3411854/ajax-google-visualization-api-gauge-with-jquery but on steroids...
Comment: Did you ever get an answer for this?
Answer: According to the project issues tracker, upgrade to 1.1 should fix the issue.
instead of
google.load('visualization', '1')

use
google.load('visualization', '1.1')

Comment: Another thought: after receiving your data, make sure the value you received is number.  If it's not, parse it with parseFloat


Is there a higher alaya in Vajrayana?

Question: Is there a higher alaya in mahamudra that is separate from the lower alaya the vijnana skandha?
Answer:
Is there a higher alaya in mahamudra that is separate from the lower alaya the vijnana skandha?

Vajrayana is a term used to denote Tantric Buddhist schools.
Practitioners of those schools might have somehow different views.
For example, Gelugpa School is based on teachings of Atisha, who was a legendary teacher of 11th century, famous due to his outstanding practitioner's skills, modest and kind personality, and deep understanding of unity of Buddhist Sutric and Tantric teachings.
Atisha wrote a "Lamrim" ("Steps of the Path"), explaining all the Buddhist theory and practice, including Tantric practice, as a unified system.
Later Tsongkhapa based his larger treatise on Atisha's works.
According to their views, Tantric Buddhism means using specific (Tantric) methods for realization of usual (Sutric) concepts.
So in terms of teachings, there is no essential difference between Tantrayana and "Sutric" Mahayana.
Mahamudra is just practical realization of the wisdom of emptiness, expounded by Mahayana teachers such as Buddha Shakyamuni, Vimalakirti, Nagarjuna etc. In Mahayana, those teachings are classified as "Maha Prajnaparamita" class teachings, i.e. teachings about The Great Perfection of Wisdom. They include "Vimalakirti sutra", "Diamond sutra", "Heart sutra" etc.
Madhyamaka school, stemming from Nagarjuna works, is the most focused on prajna paramita teachings.
The model of Eight consciousnesses, where Alaya vijnana is the eighth, is considered belonging to the Vijnanavada school. See "Lankavatara sutra".
Though there were Buddhist teachers criticizing Vijnanavada views, e.g. Chandrakirti, their criticism actually does not refute Vijnanavada views; only primitive ways to understand Vijnanavada views.
So both Vijnanavada and Madhyamaka views are useful and are studied in some Vajrayana schools.
I don't know any specific interpretations of Alaya vijnana by any Vajrayana teachers which would differ from views of those Mahayana schools.
There are some practitioners who would deny the unity of Sutra and Tantra, and could even claim that "Sutric Buddhism" is inferior, but upon investigation such views never hold water.
Such views actually come from lack of prajna, from absolutization of notions, for example, categorizing Buddhism into different parts and levels. Such categorizations are just concepts, relatively true in particular regards and particular limits, nothing more.
So those people may claim that they represent, for example, Nyingma school views, or even something that goes beyond the limits of Buddhism (Dzogchen), but in fact "Sutric" Buddhism is well aware of limits of words and concepts, and goes beyond them itself.
As far as I know, Padmasambhava, from whose teachings and activities Nyingma school has developed, did not contradict or modify usual Mahayana teachings.
With all that in mind, my answer is:
I don't know of any ideas of "higher alaya separate from the lower alaya".
That would be a strange idea, because the concept of alaya represents the highest level of inseparability and non-conceptualization.
Let's examine your expression, "the lower alaya the vijnana skandha".
Vijnana skandha is a concept that describes the reactive nature of mind.
We can talk about my personal mind, your mind, and minds of other beings. Also, we can notice that all things in the material world exhibit the quality of reactivity. We could generalize and say that all the world has a nature of reactivity, and it goes beyond and in between of sentient beings. In other words, reactivity does not belong only to sentient beings, but it's a nature of everything.
We can see everything as reacting and happening beyond limits of individual minds. Thus the notion of the all-encompassing, universal mind, alaya, can be roughly understood.
But it's just our notion. We take various phenomena, we group them and create notions. That's how our notion of mind appears, for example.
In the direct perception there is no "mind". The mind, or consciousness, is a concept created by dualities like perceived and perceiving.
Trying to liberate our minds from the slavery of absolutized notions, we can try to see our concepts as relative. We can say that in the original perception phenomena just appear; they aren't divided into the perceiving and the perceived.
That original non-divided phenomena can be viewed as the reactive space, and conceptualized as vijnana skandha or Alaya.
But there is no actual "vijnana skandha" or "Alaya" in the original direct perception; those terms are concepts or images we use to understand.
The actual reality isn't grasped by such concepts, or any other concepts; concepts are, in the best case, pointers at the experience.
So we use terms like "vijnana skandha" and "Alaya" in order to get close to the truth, but they never actually encompass it.
It's like using items on your boat in order to point at something in the surrounding ocean; they don't actually exist there in the ocean.
So speaking about some higher alaya or higher vijnana would be like trying to add more things to the things that can't capture the ocean.
Our items on the boat can't capture the ocean, and if we therefore try to add more such things, it's of no benefit.
To get closer to the truth we should instead try to grasp how concepts are relative; how pointers at the reality aren't what they point at.
Then we could understand and use concepts properly, and manifest Mahamudra in practice.

Is there a higher alaya in Vajrayana?


Google "Play Music" app constantly running!

Question: Why is Google Play Music constantly running on my galaxy s4? I don't use any music app.
Comment: @HenriSweers sure we shall ask in those cases -- but not in the answers :) Pat: "Why" questions of this kind are hard to answer. I took your question to really mean "how can I stop that". If I was right with this, see my answer below :)
Comment: None of the answers below answers the question. WHY is GPM contantly running? The question does not requests "How to disable it" but WHY.
Comment: I know we're not supposed to ask for clarification, but we need more details. Where is it running? If it's in your notification bar, there's an 'X' you can press to close it. If it's in your recent apps you can swipe it away. If it's taking up your battery usage, it might be syncing in the background for some reason and you can turn off sync for it in your google account settings (Settings -> Accounts -> Google).
Comment: In my case the  Play Music app leaves an icon **permanently in the notification bar**.  I can't get rid of it by stopping the music, nor by triangle-backing out of the app, nor by square-X closing the app.  Annoying because I try to keep the notification bar clear so it means "stuff I gotta do."  I have a Moto X 2nd Gen with Android Lollipop.
Answer: If you don't use any music app (especially not the one in question), there's an easy cure:

Go to Settings→Apps→Manage Apps
Go to the All tab
Scroll the list until you find Google Play Music
Tap the entry
On the screen which opens on the tap, you'll find a button labeled Disable -- push it.

If the Disable button is grayed out (and cannot be pushed), you might need to first Force Stop the app, and Uninstall updates. If you later decide you want to use the app, and enable it again, updates will be applied once more -- so no worries for that.
Done: You've successfully disabled the Google Play Music app. It will no longer be available in your apps drawer, and should no longer run automatically either. Works fine for me, also for Google Play Books and Movies. Another nice side-effect: Your device will no longer bother you for any updates of those (disabled) apps -- which might even help you saving your data plan for better things :)
Comment: I searched this kind of solution for months ! Thanks for the 'uninstall updates' tip.
Comment: I had to unistnall the updates, but then I was allowed to disable it.
google play music crashes other apps I was running at the same time.
Great post.
Answer: And for a long term solution, please consider leaving a review of the app (play store link).
Certainly, some of the very short, thoughtless reviews that we see on the play store are of no use, but if you've made a decent attempt to resolve your concern (e.g. by reading the description provided for the app  ) and are still not satisfied, then voice your concerns.
And I think the bar should even higher for a pre-installed app.
Answer: I have a galaxy s2 with sprint as provider. The Google Play music app came pre bundled with the phone. After noticing that it was regularly opening itself and showing up in the "applications running" widget, I began to research the issue. First I attempted (as advised) to remove updates. This doesn't work, as the app just auto updates itself again with no option to disable this. The app CAN NOT BE UNINSTALLED. I called sprint and was told that since it came bundled with the phone, it could not be uninstalled because other features of the phone rely on parts  the google play music app. They essentially told me that there was nothing I could do about it, and to keep updating it in the hope that they will eventually fix the auto starting bug. I also tried installing other music players in the hope slim hope that this may fix the problem, but this (as expected) didn't remedy the issue. In summary, after extensive internet research on the issue, and a call to my provider, my conclusion is as follows: It still opens itself, it cant be uninstalled, and the update rollback just re updates itself without the ability to stop this (on the galaxy s2 anyway). Looks like we're stuck with this one and can only wait and hope that google fixes the issue in one of the updates. Call me a cynic , but I tend to doubt google is in any hurry to PREVENT the running of one of their apps. The Sprint Samsung galaxy s2 comes completely inundated with bundled google software. I have been a loyal sprint customer for over 5 years, and this, in addition to the sudden and drastic decrease in sprint's signal and gps strength is just another indicator that they are going down the tubes. Hopefully sprint & google get their collective acts together and fix these issues. I'll keep researching, and post if I find a solution.
Comment: This would be a decent answer if it were a little less "rant-y".
Comment: Agreed, it was a combination of factual info with an overtone of "rant" included for the purpose of insuring readers that there at present is nothing they can do to solve this save pressure the provider to fix this. I never post on these sites and am not familiar with the etiquette


Why are the leading edges on the Boeing 787 made from aluminum?

Question: Why are the leading edges of the wings, horizontal stabiliser and vertical stabiliser and the engine's inlets made from Aluminium?
Comment: Because those surfaces are usually heated for anti-ice.
Comment: Because gold would be too expensive, too soft, and too heavy?
Comment: @mins:  And, of course, having a metal radome would defeat the purpose of a radome.
Answer: There are probably many factors in choosing aluminum vs. composites.
A big one is bird strikes. The leading edges are at the highest risk for this. Metal tends to absorb the impact better while retaining its strength, while composites would tend to delaminate and become much weaker. Resistance to in-flight hail must also be considered.

(Source Left, Right) Comparison of bird strike effect on aluminum and carbon fiber.
Anti ice was also mentioned. These areas are heated with bleed air (or, for the 787, electrical elements) to melt or prevent any ice formation. Metals do much better at high temperatures than composites, which would tend to melt or lose strength. Metals are also able to conduct the anti ice heat better than composites.
Another factor could be manufacturing. These surfaces have a lot of curvature. Composite panels are often reinforced with honeycomb core, which is best on relatively flat surfaces. Of course composites could be made into these shapes, but the shape would limit material and configuration options. Metal is also easier to work with or repair than composites.
As far as choosing aluminum over other metals, it tends to be very light and cheap for its strength, has decent temperature capability for anti-ice, and when properly used is fairly resistant to corrosion or fatigue.
The nose does not have anti ice and must serve as a cover for the weather radar. Composites can be made relatively transparent to radar, but metal would tend to block the waves.
Comment: WRT anti-ice, metals also conduct heat much better than typical composites, making your anti-ice heating more effective.
Comment: Use [overexpanded Nomex cores](http://www.hexcel.com/Resources/DataSheets/Honeycomb-Data-Sheets/HRH_10_eu.pdf), and curvature is not such a problem anymore. Don't let that distract you; the answer is absolutely correct.
Comment: @DavidRicherby: But do bicycle frames use sandwich shells? The ones I know are either tubes with a single solid wall, or they use a light wall with a foam core over the full diameter. Curvature is a real problem for sandwich structures, especially when you have curvature in two directions.
Comment: The ease of repairing aluminium is also a lot easier than composites. Composites work best when the whole structure is made from a single piece and you don't want to replace such large sections every time you have a bird strike.
Comment: Curvature isn't an issue when making bicycle frames out of composite materials, and bikes have much tighter curves than the leading edge of a large airliner.
Comment: @Notts90: May I disagree? The experience from the Beech Starship was that composite structures are much easier to repair than metal structures. All it needs is a skilled person doing the work (NC-35 crash in Denmark). Also, with much less corrosion or fatigue problems there is much less to repair in the first place. Only impact is worse; that's why leading edges are made from metal.
Comment: @PeterKämpf the joy of the internet is the that you certainly can! I completely agree regarding fatigue and rust. For impacts though, I was lead to believe that composites meant always replacing the whole panel where metal had other options (not 100% what they are).
Answer: There are a few reasons, the first is that the leading edge of the wing will be eroded in service by flying through dust, sand rain, hail etc. Metals are always typically used on such surfaces (termed an 'erosion shield') to reduce this effect, and also because minor damage can be polished out to keep the aircraft looking nice. Aluminum isn't the hardest waring material in this environment, but it is the lightest. Rotor blades would typically use Titanium or Nickel instead, as these harder metals work better in this more extreme environment.
The second reason is lightning strike; the leading edges of wings are common attachment points for lightning, so they are grounded to the airframes lightning return network. Making them from highly conductive metals can reduce the immediate damage caused as a result lightning attachment.
Comment: To make composites lightning-proof, a copper mesh is added to the layup. The real reason for metal leading edges is indeed impact tolerance. Once a leading edge is painted, erosion of that paint will not differ between metal and composite structures.
Answer: Aluminum is used for erosion prevention. There is no composite solution which can withstand the erosion caused by water/rain or FOD (sand/grit). In addition, aluminum leading edges transfer heat better than composites, which allows for improved anti-icing.


Which trusted root certificates are included in Java?

Question: Which trusted root certificates are included in Java, specifically Sun Java and IBM Java? How can I get the list myself? Does Java on Windows use certificates from operating system?
Answer: Go to the "Java Control Panel", "Secure" tab and click on "Certificates". Go to "System" tab and select "Secure CA" or "Secure Sites CA" from the drop down.
IIRC, the certificates are stored in a Java serialised file in jre/lib/security/cacerts.  This is a standard Java keystore that can be manipulated with the keytool utility:
keytool -keystore "$JAVA_HOME\jre\lib\security\cacerts" -storepass changeit -list

I believe Mac OS X now uses the OS to handle certificates.
Comment: @Pacerier No, Java maintains its own list of trusted CAs.
Comment: Does this has anything to do with the system's own root certs? (E.g. Windows' `certmgr.msc`.)
Comment: I get `Warning: use -cacerts option to access cacerts keystore`. Adding `-cacerts` didn't resolve the warning.
Comment: The command becomes `keytool -storepass changeit -list -cacerts`
Answer: Although the Oracle JRE (formerly the Sun JRE) comes with a range of certificates as Tom mentioned,  on Windows the JRE will also use certificates associated with the current browser by default for applets and Web Start apps (as long as you're using "Internet Explorer 5.0 or higher or Mozilla 1.4 or higher").
It should "just work" if you want to do signature signing verification, HTTPS server authentication or HTTPS client authentication (e.g. signing Web Start applications with a corporate certificate that has already been installed on your machine). For more complicated use cases you might find this document more helpful.


Is it possible to switch an electrical machine several times from motor to generator and vice-versa, within one revolution of its rotor?

Question: I would like to find out how quickly and frequently a reversible electrical machine (EM) can be made to switch functions from a motor to generator and vice-versa - and what are the parameters of the EM that determine this.
Comment: Not sure what you mean, but a rotating motor generates EMF anyway, to drive it electrically the driver overcomes it with higher voltage. If you want to instantly take energy from the motor- no problem, just stop diving it. Takes few microseconds at most. This is well implemented in hybrid cars.
Comment: Welcome to EE.SE! Keep in mind that *"Is it possible ...?"* is a yes/no question. In this case, the answer is "Yes". If you're asking us to design it for you, that would be too broad. You would need to specify something about the level of performance you expect as well as what constraints you have on the implementation. What is your specific question?
Comment: How quickly can you do the mechanical switching, between driving the shaft or loading the shaft?
Comment: Apply PWM and you're doing exactly that. The angular velocity can be measured via the back-emf generated during PWM off-periods.
Answer: This sounds like an x-y problem.
There are two main timeconstants associated with an electrical machine

Mechanical \$\tau = \frac{J}{b}\$
Where J is the rotor+system inertia and b is the damping coeficient
Electrical \$tau = \frac{L}{R}\$
Where L is the inductance of the stator and R is the resistance of the stator.

Likewise it is highly dependant on the two sources of power. The electrical source to permit motoring and the mechanical source to permit generation. Likewise the ability of both domains to absorb the power flow from the other.

how quickly and frequently a reversible electrical machine (EM) can be
  made to switch functions from a motor to generator and vice-versa

Well what do you class as rotating? Different disciplines may have a different requirement of the minimum definition of rotation... conceptually any arc movement is rotating and thus "how quickly" then is dominated by the electrical time constant and the ability to change the direction of the stator current
What about a +-10degree twitch?  359degree? With an ever larger arc being considered, the mechanical time constant become more and more important. If you define "rotation" as a 180degree movement then the load torque as well as the ability of the motor to generator torque will drive the time needed to switch between the two quadrants.
So besides the limitations being within the electrical domain to change between sink & source and the mechanical domain to change between sink and source, one limitation on electrical machines is the spline and at which point it begins to exhibit signs of plasticity.
Comment: Good formulae to compare (+1), but comes down to frequency response and attenuation of freq depending on n Poles per Rev within 360 deg at some Hz x60 =RPM
Answer: It depends on the motor characteristics.
Mainly, the coil inductance, ( core type and permeability),  coil resistance, flat wire wound, low L; shunt or series, synchronous or not, Reluctance, Induction or BLDC, etc.
Time Constant of Current Step response
Basically, the response time to current is T=L/R and the rotational time depends on the number of phases per revolution, RPM and moment of rotational inertia vs torque that affects acceleration.
So, in theory, it could respond within a rotation or may not swing much compared to full scale. It is not something you choose to do carelessly.
Shoot-thru
Shoot-thru is a fault condition when drivers are active in both directions at the same time. This is avoided with dead-time on the order of 1us.  But for changing directions twice the max current can be created due to doubling the PP voltage swing and thus power limits may be exceeded.
So dual half bridges must have a dead-time for commutation in one direction and another dead-time for changing current flow directions dependent on VI product losses in the so-called Safe Operating Area SOA) limits.

e.g. you have a choice of reversal;

shunting to Vbat to regenerate quickly if needed
shunting to ground to brake harder
shunting to opposite Vbat voltage to brake twice as hard and 2x more heat.
oscillating back and forth at some frequency within a range of RPM for some reason within 1 cycle?
then one can ask,  why? commutate the load, generate frequncy faster than the pole frequency.
There may be nearly zero effect of change of angular momentum, in reponse unless very low mass high pole count.

Analogy
It may be possible in theory, but in practice is like expect a large voltage change from a 1Henry inductor in 1 microsecond. with a negative pulse.
Loads can have 0 step rise time, but current will be L/R=T. The question ought to define the "dead time" and/or hysteresis between full bridge commutation forward and reverse in terms of phase at max RPM.
Mechanical issues
Motors have bearings that operate at some harmonic of RPM due to diameter ratios. Stimulating higher frequency step functions on current and thus torque generate harmonics of the step or a square wave of change in torque.  Thus bearing resonance can be stimulated by harmonics or RPM and high frequency now of load within 1 cycle thus making bearings vulnerable to excess wear from the vibration.
Historical examples
Massive generating stations are power factor corrected to compensation for grid loads with for power factors instead of racks of plastic caps or oil filled tank caps for passive PFC.  However modern Grid-tied Inverters produce pure sine waves now with active PFC inverters so the current generated is always sinusoidal in-phase with the voltage.
Recently there are papers to do this in motor generators.
Comment: If you dont like (-1) the answer, explain why
Answer:
I would like to find out how quickly and frequently a reversible electrical machine (EM) can be made to switch functions from a motor to generator and vice-versa - and what are the parameters of the EM that determine this.

simulate this circuit – Schematic created using CircuitLab
Figure 1. A simple peramanent magnet DC machine can be switched from one mode to the other as quickly as you can toggle the switch.
The inertia of the motor and load will determine the amount of energy available. The resistance of the load will determine how quickly this is used.
Comment: What is the  dI/dΦ of a light bulb?  (-1)
Answer: Not sure what you mean, but a rotating motor generates EMF anyway, to drive it electrically the driver overcomes it with higher voltage. If you want to instantly take energy from the motor- no problem, just stop diving it. Takes few microseconds at most. This is well implemented in hybrid cars.


Move only jQuery UI Tabs load in footer in Drupal 7

Question: I need jQuery UI Tabs to load after Token renders values. I see the simple method being to move jQuery UI Tabs script to the page footer. Please show me how to do this.
Comment: To add script at bottom see this http://drupal.stackexchange.com/questions/3171/add-javascript-at-the-bottom-of-a-page
Answer: Try using the following code.
<code>drupal_add_js(drupal_get_path('theme', 'youthemename').'/js/jquery.easing.1.3.js', array('type' => 'file', 'scope' => 'footer'));
</code>


Tilemap is rendering all tiles as black squares

Question: I'm trying to render a 2D tile map.  I've placed a Tilemap object in the scene from the create 2D object context menu, set a reference to it to one of my script objects, and tried to render.  It's definitely placing tiles, (I can see it go from transparent to drawing something,) but instead of the tiles I'm giving it, it creates a pure black square in every cell.
My tiles are coming from a tileset image, comprised of a 16x16 grid of tiles of 64x64 pixels in size.  The tile setup code is as follows:
public class GameLevelView : MonoBehaviour
{
    private Tilemap _grid;
    private Tile[] _tiles;
    public MapData Map { get; set; } //supplied in code by an external source

    void Start()
    {
        _grid = GetComponent<Tilemap>();
        _tiles = Resources.LoadAll<Sprite>("tiles").Select(s => new Tile { sprite = s }).ToArray();
    }

    void Update()
    {
        Map.PaintTo(_grid, _tiles);
    }
}

The PaintTo routine simply loops over every cell, gets a tile index, and calls tilemap.SetTile(new Vector3Int(x, y, 0), tiles[idx]);.  This seems simple enough that nothing could go wrong... and yet all the tiles are rendering black.
In case it's relevant, using Unity 2020.3.26f1 with the 2D URP.  Things I've already verified:

The tileset image has been imported as a sprite sheet correctly.
The tile array loading code is working as expected.
The tiles produced by the tile array have their values set up as expected.  For example, their Color property is (1,1,1,1) rather than somehow being black.
The GameObject holding the tile map is active in the scene and positioned correctly on the camera.
MapData is being set up correctly.

At this point I have no idea what else to look at to try and make this work.  Has anyone seen this before and might know how to fix this?
Answer: Found the problem.  For whatever reason, Unity was creating the Tilemap with a Lit material by default, and I didn't have any 2D lights in my scene.  I can't help but wonder when this changed; I've done tilemap-based stuff before and never had to care about lighting.
Comment: I think it changed when separate 2d lighting was added.


Will Sodium Polyacrylate (SAP) absorb the gas from liquid ammonia?

Question: I'm considering using sodium polyacrylate grains to absorb spills of a relatively strong Ammonium Hydroxide solution. Will the SAP (super absorbent polymer) only absorb the water, and in effect make the remaining solution a higher concentration of NH4OH? Or would some of the dissolved gas also be held by the SAP? I am a mechanical engineer by trade, so I can research any terms you use, but my chemistry background is limited.
Comment: Since NH3 is held *very* tightly by H2O (700 volumes of gaseous ammonia can dissolve in one volume of liquid water), at a guess, *most* of the NH3 would stay with the water. That said, does NH3 chemically adversely affect SAP? If you can't find that in the literature, perhaps a small-volume experiment would help. You might also include a mild acid, such as citric acid, mixed with SAP, to make a non-volatile salt.
Answer: The available literature is conflicting. On the one hand, a website claims that its SAP is unsatisfactory for absorbing ammonia, acetone and isopropanol (Ref 1).
On the other hand, there is a patent that claims an SAP polymer specifically for absorbing ammonia (Ref 2).
The monomers that are used to make the super absorbent polymer may be sodium or ammonium acrylate, or acrylic acid itself. It has been reported that multivalent cations inhibit the swelling of the SAP by tying separate chains together, and it could be that even monovalent cations in large quantities could inhibit swelling.
It does seem that an SAP polymerized from an acid monomer could react with NH3 or NH4OH to give the ammonium salt, which should swell the SAP just as if it were polymerized from the ammonium salt itself.
Since there are so many grades of SAPs, several are surely acid-containing, and would be useful for containing ammonia spills. Other grades, based on polymers of salts of acidic monomers would be unsuitable.
The preferred course of action, then, would be to contact manufacturers or distributors of SAPs and state your requirements.
Ref 1. https://recycphp.com/en/absorption-domestic-liquids-sodium-polyacrylate/
Ref 2. https://patents.google.com/patent/WO2017209339A1/en


Does using "Energy Root" to restore HP have any negative effects on Pokemon?

Question: I've been starting to buy from the herb shop in Lumiose city, because the price per HP is much better there. However the description of the "Energy Root" notes that it is very bitter, does this have any negative effects on my Pokemon, or does it not matter?
Answer: Herbs are indeed generally cheaper and you also have access to the Revival Herb which is an equivalent for the Max Revive, which you might find more worthy than a simple Revive (which recovers only half of the max HP of a fainted Pokemon), but there is indeed a side effect. These herbs affect the happiness of Pokemon.
According to the last generations, herbs reduce the happiness of Pokemon by a certain amount (contrary to fainting which decreases the happiness points by 1 each time):
<code>Happiness of Pokemon |  0 - 199 | 200 - 255
---------------------+----------+----------
Using EnergyPowder   |       -5 |       -10
Using Heal Powder    |       -5 |       -10
Using Energy Root    |      -10 |       -15
Using Revival Herb   |      -15 |       -20
</code>
Table sourced from bulbapedia and assumed to be similar in Pokemon XY.
What happiness points mean in-game are:

Some Pokemon evolve when their happiness points reach a certain minimum of 220 happiness points. You can see a simple table containing such Pokemon here.

Return and Frustration are moves that are affected by happiness. Return's base power increases with higher happiness whilst Frustration's power increases with lower happiness. Both have a maximum of 102 base power.

From the last point, some might even argue that reducing happiness has some advantages. It's just that it's more difficult to decrease the happiness points of a Pokemon than to increase it.
Lastly, happiness does not have any relationship with affection.
Answer: Herbs make Pokemons unfriendly towards their trainer, the equivalent of having your Pokemon faint many times while battling with it. In practice this means that the move Frustration will have higher power when used by the Pokemon in question, while Return will have less power. In addition, this will make it harder for Pokemon that evolve on friendship to evolve.
Note that friendliness is a different value from affection (gained from Pokemon-amie minigames), and that herbs will not reduce affection.
Answer: Herbs are usually great status restorers, but they decrease the friendliness of your pokemon by a little. If you have a pokemon that evolves by friendliness or knows return, don't use herbs.


Unicity of the closest point on a planar curve

Question: I'm interested in using curvilinear coordinates to represent points of a subregion $R \subset \mathbb R^2$, and I'm trying to determine conditions on $\gamma$ and $R$ to ensure that the representation is unique. Use case: represent the position of a robot on a track defined by a reference curve and positive and negative bounds on lateral dimensions.
Mathematically, $\gamma(s)$ is a $C^2$ curve with $s$ a curvilinear abscissa with arbitrary origin and $\gamma$ is injective. At point $s$, we have the unit tangent vector $\mathbf T = \gamma'(s)$ and we let $\mathbf N$ the unit normal vector such that $(\mathbf T, \mathbf N)$ is positively oriented. For a point $X \in R$, I want to define the curvilinear coordinates of $X$ as $(s,r)$ such that $X = X_\gamma + r \mathbf N$ with $X_\gamma = \gamma(s)$ the point of $\gamma$ closest to $X$.
However $X_\gamma$ may not be unique, for instance if $\gamma$ is a circular arc with center $X$. Requiring that \begin{equation}R \subset \left\{ \gamma(s) + r\mathbf N \ :\ |r| \leq \frac{1}{|k(s)|} \right\}\end{equation} where $k$ is the local curvature seems to avoid the issue "locally".
My problem is finding a condition to avoid the non-local issue: for instance, if $\gamma$ is shaped like a $\cup$ (ie, with parallel lines), there is an infinity of points for which $X_\gamma$ is not unique. However, also requiring that $r < \frac d 2$ where $d$ is the width of the $\cup$ gets rid of the issue.
I'm pretty much convinced that such a $d > 0$ can be found for any curve with finite length. However, I'm having trouble formalizing a demonstration. Any thoughts?
Precision: I'm only interested in finding a good enough sufficient condition on $R$ and $\gamma$ for $X_\gamma$ to be unique, I don't need it to be necessary.
Thanks for any help
Comment: See https://arxiv.org/pdf/1705.04565.pdf and references therein.
Answer: Thanks to the article pointed out by Moishe Cohen, I was able to (learn a lot about the reach of a manifold and) confirm my initial thought.
From Proposition 14 of http://www.utgjiu.ro/math/sma/v03/p07.pdf:

Compact $C^2$-smooth submanifolds of $\mathbb R^n$ have positive reach

The reach of a manifold (in $\mathbb R^2$) is exactly $\frac d 2$ in the original question.


Does String Theory explain wave-particle duality?

Question: Does string theory explain the weird things that happens at the quantum level, especially wave-particle duality?
Comment: Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.
Comment: Actually, too broad.
Answer: I do not think so. As a matter of fact strings must be "quantized" to produce "quantum" physics. So the quantum structure (including all apparently weird things) is assumed a priori even dealing with strings. It is deeper than string theory.
Answer: No. You quantize strings using the same methods as for other classical theories, but these methods are postulated, so you can't use this to explain anything. There is also no such thing as wave-particle duality, that's a terribly out-of-date term. We have neither particles nor waves, but instead wave-functions and operators that correspond to observables.


$\lim_{n\rightarrow \infty}(3^n+7^n)^{1/n}$

Question: I was trying to solve this problem about limit and I have some problems.   $$\lim_{n\rightarrow \infty}(3^n+7^n)^{1/n}$$ I need some help with this limit please.
Comment: To add some colloquialisms to @user17762's answer: for really large $n$, $3^n$ is going to be incredibly small compared to $7^n$. So for large $n$, you can somewhat neglect the $3^n$ part, which is why you get $7$. The appropriate mathematical justification for this is exactly as user17762 has explained. I just wanted to provide some way for you to intuitively arrive at the answer (which can help guide you to figuring out the right argument).
Comment: http://math.stackexchange.com/questions/1079634/how-to-compute-the-limit-lim-n-to-infty-1-2n-3n-4n5n1-n/1079643#1079643
Answer: HINT: We have
$$7^n < 3^n + 7^n < 2\cdot 7^n$$
Answer: $$
(3^n+7^n)^{\frac1n}=\left[7^n\left(\frac{3^n}{7^n}+1\right)\right]^{\frac{1}{n}}=7(1+q^n)^\frac{1}{n} \quad \forall n\in \mathbb{N}
$$
with $q=\frac37<1$. Taking the limit we get
$$
\lim_n(3^n+7^n)^{\frac1n}=\lim_n7(1+q^n)^\frac{1}{n}=7.
$$
Answer: The sandwich lemma states that for any sequence $(a_n)$ with $(b_n)$, $(c_n)$ such that $b_n < a_n < c_n$ for any given natural number $n$, then for any $x$:
$$b_n \to x \text{ and } c_n \to x \implies a_n \to x$$
If for any given $n$, $a_n$ is $(3^n + 7^n)^{1/n}$, you need to find suitable sequences for $(b_n)$ and $(c_n)$ with the same limit as $n \to \infty$ which "sandwich" $(a_n)$.
Answer: $$\lim_{n\rightarrow \infty}(3^n+7^n)^{1/n}=7\lim_{n\rightarrow \infty}\left(\left(\frac37\right)^n+1\right)^{1/n}.$$
The limit on the right is $1$ as
$$1<\left(\left(\frac37\right)^n+1\right)^{1/n}<\left(\frac37\right)^n+1.$$


MVC Code First: App_Data Folder Not Being Created

Question: I'm using the MVC Code First approach to create a SQL Compact database (from WebConfig: data source=|DataDirectory|MailBoxDB.sdf).  The .sdf file should get created automatically, and it does if I manually create the App_Data folder on the web server (Windows Server 2008).  However, I'm trying to automate the deployment process and I want to eliminate this manual step.  I'm using MSDeploy to create the deployment package. Is it a permissions issue that prevents IIS (7.5) from creating the App_Data folder on its own? If so, which settings should I be focusing on? Any ideas?
Answer: I had a similar scenario (generally more complex, although without a database in App_Data).  I pieced together several SO questions and found a solution which I've posted on my question on the same topic.  Take a look at my answer and hopefully it helps.


Can a program/browser detect the usage of vpn to bypass international restrictions?

Question: Can a program or a browser script detect that I am using a VPN to bypass international restrictions if I use the "create new network VPN" on windows 7?
Answer: If you go through a public VPN service the website could feasibly maintain a list of the IP addresses associated with that VPN service.  They can't detect the fact that you're using a VPN specifically.


When is the expected stable release date of Ubuntu Phone and Ubuntu Tablet?

Question: Is there an expected stable release date of Ubuntu Phone and Ubuntu Tablet?
If so, what are their dates?
Answer: More robust versions of Ubuntu for Tablets will likely be available for the Nexus 7 and Nexus 10 tablets by the end of the year. However, Ubuntu tablets won't ship until the UI layer is folded into the fully unified Ubuntu 14.04 in the spring of 2014. Canonical expects to integrate a stable Ubuntu Phone with Ubuntu 13.10 ("Saucy Salamander") this October, making it available for Nexus 4 and Nexus Phone users, prior to a native Ubuntu-based phone launch in 1Q 2014.
You can see more informations at: http://www.linux.com/news/embedded-mobile/mobile-linux/702049-ubuntu-for-tablets-joins-canonicals-convergence-crusade
Answer: Just confirmed by a developer over at the mailing lists. Ubuntu Touch 1.0 will be ready around the 17th of October.

To: ubuntu-phone@xxxxxxxxxxxxxxxxxxx
From: Loïc Minier <lool@xxxxxxxx>
Date: Tue, 17 Sep 2013 17:20:37 +0200
In-reply-to: <firstname.lastname@example.com>

    Hi all!

Only four and a half weeks to go and phone 1.0 will be a reality!
Obviously we're all trying to finish or fix lots of things in the
remaining time, but that might include hard-to-track-down and painful
regressions.

We've got quite a bit of a backlog of things to land right now.  This
email is to ask everyone's kind cooperation in helping us land
everything that is ready while maintaining high quality for the images.

...

...

  Thanks for your help with this.
--
Loïc Minier

Source: https://lists.launchpad.net/ubuntu-phone/msg04142.html
News article on the subject: http://www.paritynews.com/2013/09/19/2851/developer-confirms-canonical-ubuntu-touch-launch-date/

(Full disclosure: I am the author of the article and founder of ParityNews)
Answer: From ubuntu.com

Find out when it's here
We are all excited about Ubuntu for phones, but it will take some time
  to get into the marketplace. If you leave us your email and country
  details, we will let you know when there is any news. We expect to
  only email you a couple of times and promise not to spam you.
Your email: _____________

http://www.ubuntu.com/phone/register
last checked mid-February 2014
Comment: Received no email inspite of apparent news of release here: http://www.ubuntu.com/phone
Answer: Apparently it is out there for sale (in Europe) already, released a few hours slash days ago:

http://www.engadget.com/2015/02/06/ubuntu-phone-launch/
http://www.pcadvisor.co.uk/news/mobile-phone/3503217/ubuntu-phone-release-date-price-specs/
http://www.bq.com/gb/products/aquaris-e4-5.html

 The all-new BQ Aquaris E4.5

Slots for two micro-SIM cards so you can use your phone on more than one network
Dragontrail glass for scratch and impact resistance
8 megapixel camera with autofocus and dual flash
Full HD (1080p) camera for super-sharp video recording
8 GB internal memory with MicroSD slot for extra storage (up to 32GB)
Dimensions: 137 x 67 x 9 mm
Weight: 123g

Only 169,90€
Answer: Ubuntu tablets and phones most likely wont be shipping until early 2014 when ubuntu v14.04 is released. There should be a stable version by october if you are an advanced user of a nexus 10 and know how to unlock it so that you can follow the directions to flash it to your tablet. I hope this helps. This information was all from Ubuntu's site about their plans.
Answer: Shuttleworth said earlier in February that devices running Ubuntu Touch will actually ship in October, but that seems unlikely now given that we have had no announcements of that sort to date... unless he has a surprise in store for us!
More realistically, a first-time consumer-ready version (lets say Ubuntu Touch v1.0) should be ready in October 2013 (and released along with Ubuntu 13.10 desktop version). The version for tablets and the overall phone-tablet-PC convergence features are not expected to arrive until April 2014 (when Ubuntu 14.04 LTS for desktops is released).
All of the above is my conclusion based on currently available information as of early August 2013. :)


File Permission In www/html Directory For Security

Question: How can I give  permission to directories and files in www/html  for security. This files have an  .js , .php , .sh extensions.They execute in www/html by apache's user(mine is www-data). When I give 777 permission to this file and directories , the others which are the same network can see the file content. This is weak security.I want to make strong security. When I give 644 the some of files can't execute.This permission should make strong security and at the same time it is enough to execute file. Which permission must be  given to directories and files for this state?
Answer: Files that are served by Apache (i.e. requested via HTTP) don't need executable permissions to be run, they only need to be readable by Apache.
What I usually do is, set the group to www-data and the permissions to 640 for files and 1750 for directories, so no one else can read them besides the web server.
Comment: I gave permission to files and directories as you said,but I couldn't execute .php files on browser with apache user www-data.Are you sure that files don't need executable??In both I couldn't see the php files and directories while the file and directory's permissions were as you said....
Comment: You must have a problem with your Apache configuration then. PHP/HTML files should *not* have `+x` permissions, that would be a security hole. Also, you can't see the files with these permissions unless you're the owner or in the www-data group. That's the whole point.
Comment: How to configure the apache to execute files in directory which has a permissions as you said. And How am I root in www-data group. Should I use 750 or 1750 permissions for directories.
Comment: Shouldn't .sh and .js files have +x permission. Can permission which you said( 640 for files 1750 for directories) execute this files (.sh (shell script), .js (java script)).
Answer: I usually use the following permissions under /var/www/virtualhost:
<code>chown -R www-data:www-data *
chmod -R 640 *
</code>
This ensures that only the HTTP server can see the files.
No execute permission is needed for .js and .php files. Shell scripts (.sh files) probably need them if you want to run them as CGI scripts (I've never tried it, so I don't know how to set it up.


efficient way to grayscale a frame without using OpenCV

Question: i was capturing live video from my web camera to Mat objects.
is their any efficient way to convert a MAT object in to gray scaled image frame without using any API such as openCV...
I have tried it using openCV.
but i like to implement in to c++...is their any way to do it?
Comment: OpenCV is C++. Do you mean to do it from scratch?
Comment: I just want to implement a method which convert Mat object to gray scaled image in c++ language.
is it possible to do that? i mean more faster than the openCV.
Comment: Do you think you can do it faster than openCV? The only way to do it faster is probably go with CUDA implementations.
Answer: I would recommend you use OpenCV. OpenCV already contains optimized implementations for converting between various color spaces (i.e. even between RGB (actually BGR for OpenCV) to greyscale).
See for more details: http://docs.opencv.org/modules/imgproc/doc/miscellaneous_transformations.html.
OpenCV is allready implemented in C++.
If you really want to implement you own for didactical purposes (I don't see any reason why you would do it otherwise) then the simple way to do it would be to iterate the R G B values in the Mat and apply the formula:
resultingVlue =  0.299 * R + 0.587 * G + 0.114 * B
(See also Stack overflow Question Converting RGB to grayscale/intensity for a more detailed discussion on why the R G B  components typically get weighted differently)
Assuming here you want to convert RGB to gray. For other color space conversions, please look at the OpenCv documentation that also details how the transformations are done (see link provided above).
More so, OpenCV is open source. This means if you want to see how a optimal implementation might look like, you can download the source code and take a look.
Answer: Google tells me that you have to average the values of the R,G and B values of each pixel. Some algorithms are discussed here
http://www.johndcook.com/blog/2009/08/24/algorithms-convert-color-grayscale/
The simplest is to convert each color R, G and B values by the average (R+G+B)/3. Check the above links for the results of a few different averages.


Function not working in contextual filter

Question: I have a function in my custom module that return the nids for drafts in array.
<code>function get_all_drafts(){
    $query = db_query("select bid from kom_draft");
    $res = $query->fetchAll();
    foreach($res as $bid){
        $output[] = $bid->bid;
    }
    return $output;
}
</code>
and following code is used in contextual filter nid ( php code text area )
<code>$nids = get_all_drafts();
return implode('+',$nids);
</code>
and checked the multiple value checkbox but its not working, i checked the query and there in not value to compare.
when i use the same code on tpl file i am getting proper output that is + separated nids.
Comment: Could you add some devel call for getting value of $nids before you return the imploded string? E.g. $nids = get_all_drafts(); dpm($nids); return implode('+',$nids);
Answer: I just get it done by enabling validation criteria, I selected content validation with node content type and its working fine.


How can I display my machine's IP address on a TTY login screen?

Question: The server I administrate has a dynamic IP address assigned by DHCP, which is inconvenient. When I want to SSH into it, I have to first log in by hand and use ifconfig to find its current IP address. Thankfully, it lives about two feet from where I sit.
I know how to edit /etc/issue to show different values before the login prompt is delivered to the display, but I'd like to know if it's possible for /etc/issue to display the current IP address of eth0 (re-evaluated at boot time) so that I can see it and then ssh in without having to log in to run ifconfig.
Comment: Can conky be used in the login screen? If so you could make all sorts of info handy.
Answer: As of Debian 8/jessie you can use the \4 and \6 escape characters to output the IPv4 and IPv6 addresses. So the /etc/issue file:
Debian GNU/Linux 8 \n \l

eth0: \4{eth0}

Would output something like the following at the login console:
Debian GNU/Linux 8 myserver tty1

eth0: 192.168.1.100
myserver login:

I imagine Ubuntu would provide similar functionality (at least in newer releases)
Comment: This can be abbreviated further: `eth0: \4` will give the IP address of the first non-loopback interface.
Comment: This worked for me in Ubuntu 16.04 LTS, the answer marked as correct didn't, probably an issue with the grep comment, in any case, thanks for posting this.
Comment: It still works on Debian 9 :)
Comment: Tested on Debian 10 and still works, but changed a little: `\4{enp2s5}`
Answer: /etc/issue is unfortunately a plain text, it has some options you can add to it (see man agetty) but not the IP address of eth0.
If you put this in /etc/rc.local:
IP=$(/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}')
echo "eth0 IP: $IP" > /etc/issue

Then you will see something like this:
eth0: 192.168.0.2
myServer login:

Comment: Please note for anyone running this, this will overwrite the contents of /etc/issue. You could add steps to grep out the previous "eth*" lines and then append them.
Comment: This solution worked on Alpine
Answer: Building on Alex's answer and Rebs' comment, this is what I have for my /etc/rc.local file (only relevant lines):
PRE_MSG="Ubuntu 14.04.3 LTS" # this is from the original /etc/issue

IP=$(/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}')

IP_MSG="Server IP Address:"

printf "%s %s %s\n\n%s %s\n\n" "$PRE_MSG" '\n' '\l' "$IP_MSG" "$IP" > "/etc/issue"

The printf command does the magic. Unfortunately putting the '\n' and '\l' inside the format string ended up replacing the first one with the new line character and the /etc/issue file was messed up.
So long story short, these 4 lines keep the original info displayed by /etc/issue file and add the Server IP Address: message.
And as Rebs' said, keep in mind that every time you reboot the server, this script will override the /etc/issue file, so maybe try it inside a different script and on a different file and once it's working, transfer the changes over...
Good luck and happy BASHing :)
Answer: With systemd you can do systemctl edit getty@ with something like:
[Service]
ExecStartPre=-/bin/bash -c '[ ! -f /etc/.issue.orig ] && cp /etc/issue /etc/.issue.orig; int=`ls /sys/class/net|grep enp|head -1`; sed -r "s/\\\\\\n/[\\\\\\4\{$$int\}]/" < /etc/.issue.orig > /etc/issue'

Then systemctl daemon-reload && systemctl restart getty@tty1
Answer: For Ubuntu 19.04, I followed these steps:
I created the file: /etc/network/if-up.d/update-issue with the following contents:
#!/bin/sh
PREFIX="Ubuntu 19.04 - dev"
IPADDRS=$(hostname -I | tr " " "\n" | grep -v "^$" | sort -t . -k 1,1n | head -1 | tr "\n" " ")
echo "$PREFIX\n\nIP: $IPADDRS\n" > /etc/issue

I then marked the file as executable: chmod 0755 /etc/network/if-up.d/update-issue
Works great!
Answer: Building on Nurchi, Alex and Steve's answers & the comment from Reb,
The following will grep the old IP out and add in any non local (127.) IP addresses.
My server is a VM and doesn't have eth0.
Testing on Ubuntu 18.04
Place in /etc/network/if-up.d/update-issue
#!/bin/sh
MSG=$(cat /etc/issue | grep -v IP)
IP=$(/sbin/ifconfig | grep 'inet' | grep -v '127' | cut -d: -f2 | awk '{ print $2 }')
printf "%s\n%s\n\n" "$MSG" "IP: $IP" > /etc/issue

Then chmod 0755 /etc/network/if-up.d/update-issue
The only difference between my answer and Steve's is the addition of the grep lines to remove the IP line, capture the message and readd it along with the new/updated IP
Answer: This works for ubuntu 20.04 LTS as well.
Just make sure you're using the right interface. The output of ifconfig will show all interfaces, update the same interface in /etc/issue


What permission level is required for a user to sync a document library?

Question: My users have the default 'Read' permissions set on SharePoint online, but the option to sync a document library is not available for them.  What is the minimum required permission level to be able to sync a document library?
Answer: According to this blog:
http://nickheylen.com/2014/05/15/sync-error-we-cant-connect-to-the-specified-sharepoint-site/
You must either give the following persmission:

Use remote interfaces
Use Client Integrations features
Open

or

If you disable the 'Limited-access user permission lockdown mode' feature via 'Manage Site Collection Features' at the site collection level, the problem is also solved.
Comment: Thanks for the quick response.  The permissions were set correctly, but I am testing the second step.
Comment: ok, hope it works out
Answer: Make sure synchronisation is enabled at the site level:

Go to site settings.
Go to search -> search and offline availability
Select YES for option: availability offlineclient


Is there any difference between the 2D continuous and discrete Gabor filter when it comes to MATLAB implementation

Question: I want to know the difference between the 2D continuous and discrete Gabor filter when it comes to Matlab implementation. I found many files related to 2D Gabor filter on Mathworks File Exchange but I am unable to find any file related to 2D continuous Gabor wavelet. I want to use continuous Gabor filter to enhance blood vessels in retinal images. Please guide me.
Answer: The CWT & DWT implementations differ in how they discretize the scale parameter used to stretch or shrink copies of the basic wavelet.
The finer grain scale parameter in the CWT can be useful for applications that require a very high fidelity signal analysis, for example, where localization of transients or precise characterizations of signal periodicities are critical.
Taken from Continuous Wavelet Transform vs Discrete Wavelet Transform by ruoho ruotsi.
Answer: I think you are interested in the difference between the discrete wavelet transform and the continuous wavelet transform. Try looking up those topics.
Answer: I came to know that technically there's no difference between the 2D discrete and Continuous Gabor filter when it comes to MATLAB every thing is discrete


Is "Get it me" a grammatically correct sentence?

Question: A friend of mine was telling me he was hungry and so I said he should get food. He then said "but you're not here to get it me". At this point I told him that it didn't sound like an actual correct sentence but he argued it was. I tried to tell him how weird it sounded but he just said that since he's the British one and I'm Swedish, he'd know the language better than me. So is it actually a legit working sentence or not?
Comment: Can you explain what your friend meant by the phrase "to get it me"?  Did he mean *to bring him to the food* or *to bring the food to him* or something else about which I can't even guess?
Comment: It's entirely possible that it's a legit slang phrase from where he lives in Britain.  It would get you funny looks if you said it here in Southern California.
Comment: He meant it in the way that he wanted me to go get the food for him and give it to him.
Comment: This wouldn't be grammatical or a widely familiar slang phrase in AsE. If I heard this in the U.S. I would assume that it was a foreign speaker -- or perhaps a subculture that I didn't know.
Answer: This construction is, I think, restricted to British English (and possibly British-derived Englishes—I don't know what Ozzies and other colonials say). I can't remember ever hearing it (or the parallel Give it me) in the US; we'd say "You're not here to get it for me".
What's involved here is actually a collision between two 'rules'.

The first is that a semantic Recipient cast as a nominal indirect object rather than as the oblique of a preposition is supposed to lie between the verb and the semantic Received, the direct object—it's that sequence that informs the hearer/reader which nominal is the indirect object and which the direct object.

Get/give Joe a sandwich, not *Get/give a sandwich Joe.

The second is that the 'new information' in the construction should occupy the last, stressed place in the clause. Consequently, if it is the Recipient which is the new information, it will follow the Received and be cast as the oblique of the appropriate preposition.

Get a sandwich for Joe (not Sam).
  Give the sandwich to Joe (not Sam).

But in your example, neither the Recipient nor the Received is new information—not only in this particular context but virtually by definition, since both are expressed as pronouns—and neither should occupy the stressed position.
So whaddaya do?
If you're American, you might just say Gimme (or, more minatorily, Give); but that's usually too peremptory for civil conversation. So we compromise: we use the oblique construction, but emphasize the verb and put secondary stress on the preposition, which de-stresses both pronouns.

You're not here to get it for me.

But BrE speakers have the option of employing the object construction, with no emphasis on either pronoun: everything falls away from the verb.

Get me it. or
Get it me

If it makes you feel any better, it sounds just as odd to me as to you; but us foreigners don't get a vote.
Comment: In colloquial BrE, ***Give it me*** is quite common, and I wouldn't normally pay it any attention unless the speaker didn't seem like the kind of person who'd normally use such a highly idiomatic construction. But I don't think there would be many if any speakers who'd use ***Get it me*** to ask for something. But I speak as one [who disagrees with John Lawler](http://english.stackexchange.com/a/90531/2637) on the limits of acceptable usage in this area, so what do I know?
Comment: (The fact of the "misplaced" indirect object being a *pronoun* is definitely significant though. No-one says, for example, *Why don't you give it John?* except in some weird context like *The monster is demanding a human sacrifice! Why don't we give it John?)*
Comment: @FumbleFingers Oops, I left off the relevant example--fixed now. But yeah, *get it me* still sounds odd to me even in transatlantic mode; I think it's the *give* construction transferred, licensed by being an embedded clause.
Comment: Maybe us Brits are particularly prone to play fast and loose with /t/ and neutral vowels. I'm sure we use far more glottal stops, and once you've committed to ending ***it*** with ***ʔ***, it's both logically and anatomically awkward to continue with a "real" /t/ for ***to***. To a typical lazy speaker such as me, the easiest way to deal with that is to just "swallow" the schwa too - effectively, underenunciating the word to the point where it simply disappears (which we then hear so often it ends up sounding "grammatical" anyway).
Comment: @FumbleFingers Yous guys also have a much wider variety of stresses to play with than we do. General American speakers use a pitch range of about a third; the first thing you learn as an actor dealing with RP accents is expand that to a sixth.
Comment: Fascinating! I didn't know that before, but as soon as I read it I thought *That does seem to accord with my perceptions*. Until relatively recently, much of my exposure to spoken AmE had actually been from relatively low-grade "entertainment / trivia for the masses", and I therefore tended to associate AmE accents with attention-grabbing "bread and circuses" contexts. Now I listen to quite a lot of "serious" talks / discussions on Youtube, and it often seems to me the BrE speakers have a more pronounced "lilt" even in "relaxed" contexts.
Comment: ...apropos which I just watched [this Youtube clip](https://www.youtube.com/watch?v=qnGNfz7JiZ8) about creating a new "voice" for Google speech output last night. It's fascinating to see how carefully they build their database of "phones". So each "phoneme" may have a range of "alleles" with different characteristics in terms of absolute pitch, rising/falling intonation, etc. And the software that stitches them all together to construct complete utterances just gets better and better.


How to make marshmallow ice cream topping without it hardening in the icecream

Question: My favorite flavor icecream is chocolate marshmallow swirl but the only brand I know of that makes it is Turkey Hill and I can't find it outside of Pennsylvania. I live in California now so that's a problem. I've tried to add my own kind of marshmallow topping but it always hardens in the icecream. Does anyone have a remedy for this? Thank you
Comment: Interestingly, The Perfect Scoop (the only ice cream book I have which includes topping recipes) gives no swirl-in recipe for marshmallow, but a sauce recipe which is meant to be prepared and spooned on the ice cream right before serving. If it turns out that a swirl-in  is difficult to achieve, you might decide to go the sauce route.
Answer: I've seen this mentioned on the internet a couple of times...it's not a topping, so you won't get the "swirl", but a way to add marshmallow into your ice cream, like in rocky road.
Take regular sized marshmallows and knead them between your fingers until you get a soft pliable mass.  Reserve on a plate until you have enough for your batch.  When the ice cream is almost frozen, mix them in.  Sounds like it takes a bit of work, but supposedly they don't freeze solid after this point.
Comment: I wonder if heating them briefly in the microwave and mashing with a spoon would work similarly? Mushing them with your fingers deflates them more than anything, and also makes them sticky and stretchable if you continue. Which is all to say that a swirl is still doable, I think.