How can I get my three-way switches working as they should?

Question: I have two sets of three way switches. Two of the three way switches run to the same box. It appears that the power source is coming into the box to power both three way switches, but I can't seem to get the power to power both switches without having the lights always stay on or somehow not being able to power both. I have wired one switch in and I had it wired around to power both sets of lights. I have thought that I might need a four way switch, but I'm not sure.
Comment: i am sure that there is a simpler way to say this, so that it is actually clear what you mean `but I can't seem to get the power to power both switches without having the lights always stay on or somehow not being able to power both` ..... you also forgot to ask a question
Comment: I don't believe you need a 4-way switch.  The line hot (black) goes to the common of each of the two switches (two pigtails, one to each switch,  and the line hot are in one wire nut). The line neutral (white) connects to the two neutrals (three white neutrals in one wire nut). The red and the black in the two 12-3 or 14-3 cables are the travelers which go to the other two contacts on each switch.
Comment: Can you post photos of the insides of all boxes involved?
Answer: There are really only two possible scenarios (with minor variations):
Power to a switch box:

Power to light box:

If you have one of these and still can't make it work, update your question with some useful detail.
Answer: Harper's yellow tape is here to rescue you.
All these horrible wiring diagrams are spaghetti. Red here black there AARGH!
3-way circuits are actually pretty simple.  It's just they use 4 functions of wire (aside from ground), so color code them with electrical tape and life is better.
Harper's law of marking wires: mark both ends at the same time!

neutral (white)
always hot (black)
switched hot (red)
2 travelers (yellow) they do the same thing and are interchangeable.

Wire one at a time.
First wire neutral through from the power source to the lamp.  Done.  It must use the native white wire.
Second wire always-hot from the power source to one of the switches to its black screw.   Use black.
Third wire switched-hot from the other 3-way switch's blsck terminal,  to the lamp.   Use red and remark any wires that aren't natively red.
You now have left: 2 brass screws in each 3-way and 2 wires in the same cable.  These are travelers. Mark them both yellow (really) and attach them to the brass screws.
Or mark them blue or green or whatever color you have.  The point is mark them both the same.


How do I use array and curve modifiers, without bending?

Question:
I want the bricks to align to each other while keeping somewhat of their shape. Even when I add more edge loops they start z-fighting.
Answer: Here are the sequence of steps I followed for getting the arrayed objects to follow the curve without distortion in Blender 2.82a:

I began by adding a Bezier circle object to the scene. Then I added a polygon cube to the scene. Both remain at World Space 0,0,0 (and this may actually be significant).
In Edit Mode for the Cube, I scale it along the Y axis.
In Object Mode, with the cube still selected, I create an Array Modifier. I choose Constant Offset and enter a value for spacing between the cube instances which looks good (in my case, 0.22). I do not apply the Array Modifier.
Still in Object Mode, with the cube still selected, I create a Curve modifier. I point it to the Bezier Circle as a target. I enter Y for the Deformation axis, which is the depth axis in my scene. I do not apply the Curve modifier.

Below is my result, and as you can see, there is no distortion between the edges of cubes. I do not know how you are getting distortion. I tried changing the order of my modifiers as a test, and it did not produce your results.


Is it harder to sneak when carrying a heavy load?

Question: In Skyrim, does the weight I carry (other than armour worn) affect sneaking?
Comment: At one point when I was over my carrying capacity, I thought I was noisier and having a harder time sneaking. I'll have to do some testing to confirm.
Answer: From the Skyrim manual:

How stealthy you are is affected by many factors:

Your Sneak skill only helps you when you are crouching  The higher your Sneak skill, the easier  it is to remain undetected. Increase
your Sneak skill by staging successful stealth attacks, or by sneaking
within range of a target. There are a number of Sneak perks that grant
additional stealth bonuses.

Line of sight: An enemy is much less likely to detect you if he can't see you.

Darkness: You are harder to see in darker areas.

Movement: You are hardest to detect when motionless, and easiest to detect when running.

Sound: Two-handed weapons make the most noise. One-handed weapons are quieter; daggers and bows are  silent. Casting spells makes both
sound and light. Heavier armor makes more noise when
moving.

So, the amount you're carrying doesn't make a difference, the stuff you have equipped does make a difference.
Answer: it does not. the only thing it would affect would be the amount of loot you can steal from people.
keep in mind, how fast you are moving while sneaking does affect how well you can go undetected
Answer: Do not wear heavy boots while sneaking. Boots affect sneaking a lot. The overall armor as well. How much you're carrying only affects your movement speed. And your sneak skill improves while you are sneaking , or doing a sneak attack. This link ought to give you a lot of information regarding anything elder scrolls.


How to resolve too many connections and fatal error in mysql running on vps

Question: I am running an application PHPlist on my linode server, simultaneously running 12 PHP scripts, each of which opens a MySQL connection.  Now when I access PHPlist it often shows this error:

Fatal Error: Sorry, the server is currently too busy, please try again
  later.

When I am trying to access phpMyAdmin, it shows me a #1040 error.
Output of my PHP scripts which run through cron jobs shows:

PHP Warning:  mysqli_connect(): (HY000/1040): Too many connections

I am using the LAMP stack on the server with phpMyAdmin; the top output in terminal shows mysqld using 100-130% CPU. When I am trying to troubleshoot this problem I got some clues:

Increase max_connection variable : I am using 200  (100 by default)
Open table cache: 512 (400 by default)

There are lots of variables to set but I can't determine what specific ones, I am getting some reference from:
too many connections
and http://dev.mysql.com/doc/refman/5.5/en/table-cache.html
But according to my usage how to increase memory and what is the maximum memory difficult for me.
On my server I am using around 12 PHP scripts, PHPlist application for sending emails, and a major database for user registrations.
Kindly help me to resolve this problem.
Answer: First you need to do is run this query:
SELECT user,host FROM mysql.user
WHERE super_priv='Y' AND
CONCAT(user,'@',host) <> 'root@localhost';

This will list all users that have SUPER privilege. Most users that do application-related DB processing do not require this privilege. According to the MySQL Documentation, those with SUPER privilege can do the following:

Run CHANGE MASTER TO for controlling replication coordinates
KILL or mysqladmin kill to kill threads belonging to other accounts
PURGE BINARY LOGS to systemically delete binary logs
Make configuration changes using SET GLOBAL to modify global system variables
mysqladmin debug command
enabling or disabling logging
performing updates even if the *read_only* system variable is enabled
starting and stopping replication on slave servers
specification of any account in the DEFINER attribute of stored programs and views
HERE IS THE MOST IMPORTANT ONE FOR YOUR PROBLEM: : Enables you to connect (once) even if the connection limit controlled by the max_connections system variable is reached.

You will need to login as root@localhost and revoke SUPER privilege as follows:
UPDATE mysql.user SET super_priv='N'
WHERE super_priv='Y' AND
CONCAT(user,'@',host) <> 'root@localhost';
FLUSH PRIVILEGES;

Once you do this, whenever all users flood mysql connections, only root@localhost can login. After all, if everybody and his grandmother had SUPER privilege, this would bar root@localhost from ever connecting ahead of everybody else. If max_connections is at 200 and you need to raise it to 300 without having to restart mysqld, you can dynamically increase the max_connections with this command:
mysql> SET GLOBAL max_connections = 300;

That will allow more connections effective immediately, but don't just arbitrarily increase the number on whim. You have to make sure mysql has enough RAM to accommodate the increase.
CAVEAT : If you change max_connections dynamically to 300, please put it in /etc/my.cnf
[mysqld]
max_connections=300

You can run mysqltuner.pl on your MySQL DB Server. If you do not have it, then run the following:
cd
wget mysqltuner.pl
perl mysqltuner.pl

The 3rd line under Performance Metrics has this
-------- Performance Metrics -------------------------------------------------
[--] Up for: 8d 20h 46m 22s (8M q [10.711 qps], 129K conn, TX: 90B, RX: 19B)
[--] Reads / Writes: 4% / 96%
[--] Total buffers: 2.1G global + 5.4M per thread (2000 max threads)
[OK] Maximum possible memory usage: 12.6G (80% of installed RAM)

See the 5.4M per thread? That is multipled by max_connections. In this example, that would be a maximum of about 10.8G of RAM. Therefore, each time you bump up max_connections, you should run mysqltuner.pl and check if you are pressing the OS for too much memory.
In any case, limiting who has SUPER privileges give such users opportunity to mitigate flooding mysqld with DB Connections.
Comment: i get this error while trying perl mysqltuner.pl " Attempted to use login credentials from debian maintenance account, but they failed."
Comment: I am trying this on my local ubuntu server, it shows maximum memory usage, but on my vps, it shows failure and i can't login in phpmyadmin but login successfully in mysql terminal
Comment: This cmd `wget mysqltuner.pl`, downloaded index.html, but it was a perl file, so I renamed it to mysqltuner.pl and the next cmd `perl mysqltuner.pl` worked.
Answer:
The global variable max_connections determines the maximum number of concurrent connections to MySQL. Make sure that you have a high value for this variable. You can increase this value to 300 or 400 and try restarting MySQL after this settings.
Design your application such that a MySQL connection is kept open for a very short period of time.
You should also check that client code is not using persistent connections  (such as mysql_pconnect()) improperly.

Also execute Flush status; command on MySQl server to reduce this value.
I hope these suggestions helps.
Answer: Check if your disk is full, this can cause the same error:
df -h

will show you the remaining space on each partition, you probably have to check the root partition / (or /var/ in case you have an extra partition for this):
df -h /


Book about shape-shifting dragon men and a girl named Summer

Question: I read this book somewhere between 1997 and 2002; found it in my high school library. The main character was a girl named Summer (I'm pretty sure), but I don't remember much about the early story. She falls in love with a dragon somewhere along the way, and carries a dragon egg in her bellybutton, I think? And maybe the dragon dies?
Comment: [Dragonborn](https://www.goodreads.com/book/show/2574397-dragonborn) by Jade Lee? The heroine does carry a dragon egg in her navel (disguised as a jewel) but it was published in 2008 and it's a bit spicy for a high school library!
Comment: It was definitely before 2008, and it wasn't spicy? A bit of romance between the MCs, but it was for sure high fantasy.
Comment: Definitely not _Dragonborn_ then!
Comment: Although it seems a strange coincidence that in both the girl carries the egg in her navel. Can you remember how the girl manages this in your book? Bellybuttons are pretty small and I would have guessed dragon eggs are pretty big. I couldn't put even a small egg in my belly button without considerable discomfort :-)
Comment: @JohnRennie - Worth posting as an answer, at the very least.
Answer: Could this be The Unlikely Ones by Mary Brown?

The Ring's the thing...
Thing was a young girl who hid beneath a mask. Her companions included a crow, a toad, a goldfish, and a kitten. Never had a more unlikely band of unheroic heroes set off on a difficult and dangerous quest. But Thing had a ring with unusual powers...
Summer was an orphan who only wanted to find a husband and settle down. But first she had to help out a blind knight with amnesia and a winged pig. But how to get those two, as well as a raggle-tail assortment of other creatures in distress, to the far-distant place where they belonged? Summer owned almost nothing except a certain magic ring...
Sophie was cast adrift in London by the untimely death of her parents. Then an uncle left her a legacy that would lift her up from poverty if she took a dragon's egg into uncharted Asia

Summer's 'magic ring' is a red gem that she wears in her navel. It doesn't  give her any significant powers, but it does mean that she doesn't age.
Comment: I would love that insignificant power.
Answer: The series is actually called "Pigs Don't Fly", which is also the name of the second book, in which Summer appears. https://www.fantasticfiction.com/b/mary-brown/pigs-dont-fly/
Comment: Unless I'm mistaken, she appears in the first book and the references to her belly button dragon ring all seem to come from the first book also.
Comment: No, the first book is The Unlikely Ones. All the protagonists (one girl and a load of animals) have jewels embedded in various parts of their anatomy; but the girl is just called "Thing" for most of the book.
Answer: The Unexpected Dragon (1999) by Mary Brown is the book the OP is looking for.

Includes "Pigs Don't Fly", "Master of Many Treasures", and "Dragonne's Eg".

It is the Pigs Don't Fly series, it looks like, but The Unexpected Dragon seems to have compiled books 2-4 together, and left The Unlikely Ones on its own.
This was confusing for me as well, as I owned it, but never knew it was a series pushed together into a single book or had another book to add on to the beginning!
Comment: The word you're looking for is "omnibus".


how to get data from Note 3 broken screen

Question: I have a Samsung Note 3 and the phone went black due to me dropping it. I have since got a new phone but want to retrieve my photos from the old phone with the broken screen. The problem is that I have a passcode on my broken phone and I am unable to see or use the screen. I know the code but just don't know how to retrieve the photos. Any suggestions would be greatly appreciated.
Answer: Link the phone to a PC with cable and then it should load up the storage data if it is set automatically and then it should be under 'My Computer' as an external memory, your photos should be under DCIM.


Gear 5 and 6 got slower in bike?

Question: Yesterday I pedaled reverse (one circle) while getting on my bike, I heard a sound at the chains and after that the bike speed on my 5th and 6th gear got slower. Before I used to pedal less and the bike would go faster but now I have to pedal alot faster for the bike to move ahead. What is the problem? Should I visit the cycle repair shop for fixing or can I fix it by myself?
Comment: Do you have a derailleur style bike, or one with a geared hub???
Comment: I assume that you're talking about rear mech. So, that seems that it's not working properly and needs to be adjusted. Be sure that it can switch through all the cassette. This can be caused by loosened cable (easy to fix by yourself) or bend mech or hanger - in that case I'd go to the service. So try to adjust it and see what happens
Comment: Could you describe the sound you mention in a bit more detail please?
Comment: Is it the case that when you back pedalled the chain shifted to a smaller chainring without you noticing? As others mention, check park tool website for guidance on front or rear derailleur ( or hub gear) maintenance. It sounds like your skill level means you should visit your lbs, possibly a very quick and cheap adjustment is needed?
Answer: Sounds to me like your derailleur is not properly shifting (to the smaller cog) in those gears you mentioned.
First thing to check (imo):
Put the bike in a bike stand or position it upside down, shift onto smallest rear cog.
Watch the cassette/chain whilst pedaling with one hand and shifting with the other hand. Check if the chain properly shifts each time you press the shift button with your hand. Do some shifts require more than 1 'click' of the shifter before the chain moves? Are any cogs being skipped? Are the outer most cogs (biggest/smallest) on your cassette ever reached by the chain (if you cannot shift into these (biggest/smallest cog) your derailleur limits will be improperly adjusted or (for biggest cog) cable tension may be too low.
Probably a cable issue (a cable in bad condition (even though it might look like nothing is wrong with it) can cause issues similar to the one you are describing). Especially when downshifting (to a smaller cog) this can cause issues since when up-shifting you 'pull' the derailleur to the next cog using the cable (you can determine the force on the cable with your thumb so even with a little more cable friction you'll likely be able to up-shift just fine) and when downshifting you are relying on the derailleur spring to move the derailleur into the desired position.
The issue could be with your shifter also but it's less likely in my experience.
A few things to check:

Remove cable from rear derailleur by undoing the cable clamp bolt, then pull the cable taught with one hand whilst shifting with the other hand. See if the cable moves smoothly through all the gears (both in up-shifting and in down-shifting). If the cable is not moving smoothly in either direction, remove the cable housing from the shift cable and check again, if the problem (cable not moving smoothly) is gone without the cable housing you know the issue lies with said cable housing.
Check the cable housing for any exterior damage (cuts, sharp bends etc.). If you have a lot of spare length (cable housing) and if the damage is near the ends of the housing you could consider shortening the housing to remove the damaged length. If that is not the case replace the entire piece of housing which shows the exterior damage. If the cuts are not deep enough to cut through the plastic/rubber of the cable housing then the cuts might not be a problem. As soon as the cuts result in exposed metal they will rust (if they are not stainless steel) which could very likely cause (undesired) extra cable friction.
Remove the shift cable from the housing and check it for any fraying/rust/loose wires sticking out etc. If the cable is rusty you could clean it with for example steel wool and lubricate it but your best option is to replace it (preferably with a stainless steel variant). If the cable is frayed or damaged in another way definitely replace it.
Check the condition of the cable housing end caps, are they bent/deformed in any way? If so definitely replace them.
Check (without shifter cable attached) the rear derailleur, check how smooth it moves (by pushing it from side to side with your hand), lubricate the linkage pins.
Whilst the shift cable is removed from the rear derailleur, move the derailleur from one side to the other side of the cassette by hand (whilst turning the pedals with your other hand), check if the chain can reach all the cogs (if the limits are set incorrectly the chain might A: not move far enough to reach the biggest/smallest cog or might not move onto said cogs far enough causing it to 'fall off' (jump to the cog next to it) when putting any pedaling force on the chain or B:move too far causing the chain to fall off the cassette (in between frame/cassette or in between hub/spokes and cassette). You should be able to move the derailleur by hand (when the chain is on the biggest/smallest gear) such that the center of the upper jockey wheel of the derailleur is approximately 1-2mm further than the biggest/smallest cog itself. (please check the Park tool video -linked below- on derailleur adjustment for more info on this)

Cable end caps:

I would personally suggest replacing the following:

inner shifter cable
shifter cable housing
shifter cable housing end caps

The cable housing and end caps shouldn't cost much, especially when bought in bulk (10+ meter). You can also buy sets which are meant to replace the cables on just one bike, but they are much more expensive and I have not personally noticed a difference in quality.
There are special pliers for cutting cable housing which are great but you can work with normal side cutters also, just have to make sure the cable is cut straight and when cutting brake housing cables make sure the 'spiral' (metal spiral that runs through the core of the cable housing) doesn't have any sharp pieces sticking out after cutting (you might have to cut a few times to get it perfect).
You can definitely do it yourself. Derailleur will have to be readjusted (cable tension) after you've replaced the cable, there are a lot of tutorials online on how to do that.
Some tutorials you might find useful:
Replace shift cables:

Adjust derailleur:
Note: when replacing the cable you'll only have to re-adjust the cable tension after having installed the new cable (assuming all (other) prior adjustments were correct), it can't hurt to check the other adjustments whilst your at it (how to do that is shown in the video :) )
https://www.parktool.com/blog/repair-help/rear-derailleur-adjustment
Adjusting derailleurs is very doable as long as your cables are in good condition, if they are not then you might be adjusting for an hour and you won't be able to get it to shift correctly (similar to your situation now).
Alternatively:
Your derailleur or derailleur hanger could be bent. You can check this with a derailleur alignment gauge (or in very severe cases it can be seen with the naked eye). On steel frames you can usually bend the derailleur hanger back if it's bent. On aluminum frames you'll have to replace the derailleur hanger (separate piece) if it's bent. This seems quite unlikely based on your description of the cause (backpedaling) but I thought I'd mention it just in case..
Here is some info on derailleur alignment:
Derailleur hanger alignment: https://bit.ly/2TVoYUJ
DIY derailleur hanger alignment tool: https://bit.ly/2RRvbyz
Align derailleur hanger without special tools: https://bit.ly/2TTF6Gj
How to straighten a bent derailleur: https://bit.ly/3aL3VdQ
Some more useful info:
https://www.parktool.com/blog/repair-help/front-derailleur-adjustment
(thank you for the suggestion @Argenti Apparatus )
Hope this helps, let me know if you have any questions.
Comment: Lots of info but I think answers like this with many large embedded graphics and YouTube videos are a bit overwhelming (why the huge pic of cable end caps?). Also you don't have to describe a fix to every possible problem, the OP can look up cable replacement and hanger straightening questions and answers.
Comment: +1 for a great detailed answer on RDs but we don't know for certain it's an RD problem yet
Comment: @Maarten-Monicaforpresident You can link to existing questions that deal with issues, Park tool has articles with videos embedded in them you can link to (see [this answer](https://bicycles.stackexchange.com/a/66012/24228) for an example
Comment: @DanK True we don't know for certain, but I think it's a reasonable assumption. If it turns out not to be an issue with the RD I'll make sure to update my answer.
Comment: @ArgentiApparatus is there a way to only show the links for the youtube videos instead of the current way they are displayed (to make it less overwhelming) ?
The question (OP) was not completely clear to me (not a lot of details) so that's why I tried to think of all the issues that might be able to cause this kind of problem :)
Comment: @ArgentiApparatus end cap image size has been fixed :)
Comment: @ArgentiApparatus should be fixed now. Thank you for the suggestions  :)
Comment: @Maarten-Monicaforpresident Thanks a lot for a detailed answer :) I finally found out the problem. My bike is "Bulls mountain bike" which has 3 gears on the left handle and 6 gears on the right handle. The problem was with the 3 gears. It automatically got set to 1 which was the reason for the slower speed, when i change it to gear 2, there was a sound with the chains, the chains do not move to the upper gear. This was the problem. I will probably take it to a bike repair shop.
Comment: @Saif Good to hear that you found the problem! Before you go to the repair shop you might want to try tightening the little cable adjuster  (attached to the shifter corresponding to the front derailleur), this (front derailleur not shifting into 2nd/middle gear) might be enough to fix the issue.
Comment: @Maarten-Monicaforpresident What you just told me sounds greek to me :( I am unfortunately not very keen on this. If there is a video for dummies like me it would be helpful.
Comment: @Saif please check the video on parktool's website regarding front derailleur adjustment (it's the link at the end of my answer). I'll write some more info in approx an hour when I have more time...
Comment: @Maarten-Monicaforpresident Thanks so much I will check it out.

Gear 5 and 6 got slower in bike?


Packet radio (modem)

Question: I would like to build a long range (10s of kms) wireless link in the unlicensed spectrum (like amateur radio - maybe 27 MHz, ideally with variable frequency setting). The transfer speed requirement is at least 1kB/s (9600 bps). I have no experience with HAM radio or packet modems (TNCs etc.).
Comment: Are you sure you can legally use this frequency with out a ham license in your country?
Comment: Amateur radio bands absolutely require a license. Unlicensed bands–like the ISM band–typically have power limits of 1 watt. 1 watt will not carry tens of kilometers.
Comment: If you get an amateur radio license you can do this easily and legally
Answer: It seems you are going to build some sort of packet radio system on CB-frequencies. I think it is perfectly legal in many countries, although you should consider local laws.9600 bps is not easy to get at distances you are thinking, but it is not impossible. Depending of terrain you might need quite tall antennas.
If you are going to send/receive email, pictures, or other "human data" you could consider some other options like PskMail or Fldigi -software, both usable at raspberry.
Take a look of this example: http://kissactiongroup.wikispaces.com/PImp
it is my project in amateur freqs, but principle should works on CB also.
If you are going to take your idea further, I hope you contact me via my facebook profile. There is also another radio amateur who is currently working with Pi/datamode over radio-subject. Also you can contact us by joining this FB-group:https://www.facebook.com/groups/1519431578386685/ (do not worry about language...)

Packet radio (modem)


Do I retain right to my extension's logo if I use MIT Licence in my Firefox extension?

Question: I created a Firefox extension and put its code on GitHub. The code includes the logo of my extension for use as its icon. I created the that logo myself.
I want to build my portfolio and thus want to add an Open-Source Licence to it. But I also want to retain my rights to that icon.
Is it okay if I just put the MIT Licence in the readme.md file?
Comment: Licenses are about copyright, but logo uses is best dealt with under trademark law.
Comment: I would also advise you use a license that explicitly states it grants no rights under trademark law, e.g. the Ms-PL or Artistic License 2.0.
Comment: @EMBLEM Mozila Public License 2.0 also restricts use of trademarks. Ms-Pl looks perfect for my use though.
Answer: When you explicitly want to exclude your logo from the license, you can write so in the copyright file.
It's also not uncommon for larger open source projects to trademark their logos and names. This is not completely uncontroversial in the open source community (it's why Debian is shipped with "Iceweasel" and not "Firefox") but still quite common. While the open source license gives away control of your program, trademark law means you still retain control of the brand.
Comment: How do I write it? As -"The logo of this project does not come under MIT License. I retain full rights to it." Or should I simply use Mozilla Public License 2.0 or Ms-Pl?
Comment: @harsh989 You should do the first, and you *could* do that and nothing else: because you haven't granted any copyright license to the logo, anyone who uses it will infringe your copyright on it. But it's also advisable to register the logo (and maybe the program's name) as a trademark.
Answer: It is somewhat common for project to handle graphical assets and code differently, and you can release your code under the MIT licence, but not your logo.
It's important to differentiate between copyright and trademark. Both are forms of intellectual property
Copyright protects the artistic expression of a work.
Trademark protects the association of expression with some entity.
For example, the CocaCola Company has a trademark on the name CocaCola. You may not use name CocaCola to refer to your drink. It also has a trademark on its logo. You may not use their logo for your drink.
But you may use their name and their logo to refer to them. There is no possible confusion arising from you using the labels.
It's worth noting that many logos are not eligible for copyright in the US and many other jurisdictions at all: geometric shapes and logos that consist entirely of letters in some font for example are often not. That doesn't change your situation much; attaching a copyright license to something that's not eligible for copyright effectively does nothing, it'll neither help nor hurt you.
When you licence your code under the MIT license, you have a choice to license your logo under the MIT license as well.
Independent of that choice, you may have trademark rights on your logo, and you may have registered that trademark.
When you say

I also want to retain my rights to that icon.

it's pedantry time, and ask which rights to that icon you want to retain exactly.
If you don't want anyone using it, you should not provide a copyright license for it.
If you don't mind people using it, but want to keep it as a trademark, connecting you to that image, you can release it under the MIT.
In either case, you can use and defend it as a (registered or unregistered) trademark.
In either case, you want to mention in a notice or readme file what the copyright status of the entire project is. What the MIT license in your project refers to exactly - the code, some/none of the graphical assets, and explicitly (not) the logo - and who the copyright holders are.


Different ways of creating an instance of class

Question: What are the different way a bean can be created in web development? I know we can use <jsp:useBean />, <bean:define />, or JSON format. Are there more choices? What are their advantages or disadvantages?
Answer: I know that this may sound harsh, but if you are creating beans in a jsp page, you're doing it wrong. jsp:useBean and friends are holdovers from the bad old days.
If you aren't already, you should be using a sever-side MVC framework - Spring is good, Struts will work. The 'controller' or 'action' of your framework should then expose the required beans to the jsp page. The jsp page can then access them via jstl.
By no means should you be writing any Java code in a jsp, and that includes invoking methods of a bean defined with jsp:useBean.
Also, JSON creates javascrript objects, not java objects.
This is a fundamental and very important difference. If you don't understand the difference, I urge you to go back and read a bit more until you do understand the difference.


S3 to Swift middleware proxy

Question: We have an application which is ready for AWS S3 Storage. Recently we had an requirement to write also on a Swift Object Storage. I know that Swift stack has an option to enable S3 compatibility but unfortunately this cannot be achieved on this server due political restrictions.
So I would like to use a simple proxy which converts a S3 request into an Swift one. Note that I dont own the destination server so the comunication would be like that:
<code>File Upload --S3Protocol--> S3-SWIFT-PROXY --SwiftProtocol--> Swift Storage Destination
</code>
Trying to achive that, I've went through several options but I didn't manage to make it work.
For example, the swift-plugin seems to be a solution to install on the Swift server but not act as a proxy middleware to just forward the request to a third swift server.
Another lib I've went through is swiftproxy which does exactly what I need in the oposite way: forward a swift requests to S3.
Is there any way to solve this without changing the application layer?
Answer: There's s3proxy which does what you want to do

S3 to Swift middleware proxy


Open VLC in background

Question: I have a program that opens VLC to play a sound, but I don't want that other people see the VLC player, since I mirror my screen on a TV. Is it possible that I can make VLC open in background or minimalized?
Answer: The command line parameter for opening VLC minimized(in system tray) is --qt-start-minimized. Example usage:
"C:\Program Files\VideoLAN\VLC\vlc.exe" --qt-start-minimized

Answer: On windows 10, using vlc 2.2.4:
Using vlc -I null --play-and-exit [arguments], vlc opens in the background without appearing in the taskbar or system tray.
However, it can be seen when 'more details' is clicked in task manager.
For example, when you want to play audio while vlc is hidden:
vlc -I null --play-and-exit "C:\Windows.old\Users\Public\Music\Sample Music\Kalimba.mp3"

Comment: Great answer! But vlc will stay running after the file is played.  To auto-exit after the file has finished playing you can add the `--play-and-exit` flag
Answer: -Incurse Also works, shows only in task manager.
Answer: If you are on Linux, you can use the command cvlc instead of vlc. And then add --play-and-exit. It will run a single process that will exit after playing the file.
Example usage :
cvlc --play-and-exit ./my-audio-file.wav
I was not able to make -Incurse or -I null work, and --qt-start-minimized called a notification in Plasma6 which is undesirable for my use-case.

Open VLC in background


Draw from the top or draw from the bottom?

Question: From day one I've always had my spool so that filament comes off "the top", but recently I wondered if it mattered, or there were any advantages/disadvantages to which side of the spool the filament came from. I did find this, but it proved inconclusive. So, does it matter which side of the spool the filament comes from. Are their any pros/cons to either side? Or is this just a matter of personal preference?
Comment: This is completely setup-dependent. Post a photo.
Answer: It just depends on your set-up. Ideally, you don't want to have the filament entering the extruder at too great of an angle, so depending on where your extruder is and how filament is fed into it will determine which way your spool should go.
Answer: As Echo has said, it's not really that big of a deal. I usually just stick to having the filament coming over the spool and I've rarely seen it another way. It's what made sense to me with the fact I have a stand for the spools attached to the frame of the printer along the top. It's really just personal preference.


Forecasting consumption data

Question: I am working on consumption expenditure data for 5-6 different years but there are 5 years of missing values in the in between those years. For example, I have data for 2004-05 and 2009-10, with 5 years data missing, and so on. And I am forecasting for 2019-20. Can I use moving average for forecasting? Can I impute the missing value or just forecast with the missing values present?
Answer: You can forecast if you have missing values in the data, but the forecast might not be a good one. You can read this link to understand time series.

Forecasting consumption data


Listening to a tcp port in iphone

Question: I need to listen to a  TCP port and collect the binary data from the port in my iphone how this could be done . I had searched a lot for the same but did not find anything worth, please help me any links, or sample code be greatly appretiated
Comment: http://www.raywenderlich.com/3932/how-to-create-a-socket-based-iphone-app-and-server ?
Comment: Can you accept any answer?
Answer: The only thing you need to do is open a socket, you have two options:
Create the socket in pure C:
Sockets in C
Or use the classes that Apple provides to work with sockets:
Introduction to Stream Programming Guide for Cocoa
If you are going to do something simple, the first option is the easiest
Answer: There is a very useful socket library called GCDAsyncSocket on github that can be used to make both TCP/UDP sockets and comes with delegate methods for reading and writing data
GCDAsyncSocket

Listening to a tcp port in iphone


How to resolve the Following Error.?

Question: Command failed: transaction build  Error:
The following scripts have execution failures:
the script for transaction input 1 (in the order of the TxIds) failed with:
The Plutus script evaluation failed: An error has occurred:  User error:
The provided Plutus code called 'error'.
Caused by: [ (force (builtin headList)) (con list (data) []) ]
Script debugging logs:

Answer: It appears you ended up calling head on an empty list []? That can not work as there is no element to take from an empty list. head only works on lists with at least one element, and fails for the empty list.

How to resolve the Following Error.?


Share Folders in Peer to Peer Network

Question: I Have a Peer to Peer Network with 6 Computers. In Some Computers Windows 7 And In other Install Windows xp.
I shared Some folders in Some Computers.When I want go to other Computer with "\ComputerName" , System Request a Username And Password.How Can I Solve this Problem?
Answer: It also helps to have the same username and password information on all computers. When you connect to a share on another computer in a peer to peer network, windows first checks to see if there is the same credentials on the pc you are trying to connect to, If not, you will get the username / password screen. If you don't like all of the computer accounts showing on the welcome screen you can hide them using the registry. Look on the elder geeks website, http://www.theeldergeek.com/create_hidden_user_account.htm  he would have a lot of info concerning this!!!
Danbo
Answer: This sounds like an access restriction.  On the computers you shared folders, make sure the permissions are set so that everyone, including Guests, are allowed at very least read access, or read/write if that's what you need.

Share Folders in Peer to Peer Network


url in atom feed-builder behaves different to erb-template with nested resource

Question: I have the following nested resource:
resources :categories, :only => [:show], :path => "" do
resources :games, :only => [:show], :path => "" do
end

To retrieve all items i do:
 @feeditems = Game.all(:include => [:categorygames => :category])

To show them in an .erb template:
<%= category_game_path(feeditem.categorygames.first.category, feeditem) %>

This works fine so far. Now i wanted to use the same way to include the url in a
atom feed. I have to specify the url, so i did the following:
@feeditems.each do |feeditem|
feed.entry(feeditem, :url => category_game_path(feeditem.categorygames.first.category, feeditem)) do |entry|
  entry.title feeditem.name_de
...

Unfortunately i always get a "NoMethodError"-Error, and "undefined method `category_game__path' #<#:0x007fa7c96c3090>"
Why does builder behaves different to a .erb-template? Any idea, how can sort this out?
EDIT
I got one step further, since someone else had a similar problem.
I changed it to this:
 feed.entry(:url => url_for(:action => 'show', :controller =>'games', :category_id => feeditem.categorygames.first.category, :id => feeditem, :only_path => false)) do |entry|

Now i get this error:
     undefined method `id' for {:url=>"http://localhost:3000/sport-games/wizard-game"}:Hash

Still, i do not have an idea so solve this.
Answer: I'm not sure why, but after restarting the server and a cold reload, it works this way:
feed.entry(feeditem, :url => url_for(:action =>'show', :controller =>'games',:category_id => feeditem.categorygames.first.category, :id => feeditem, :only_path => false)) do |entry|


Rank of a linear combination of matrices

Question: Suppose you have $q$ matrices $M_1,M_2,\ldots,M_q$ of the same dimentions $(p\times m)$, with $p\geq m$. Is there a necessary and sufficient condition on the $M_1,M_2,\ldots,M_q$ matrices such that the linear combination
\begin{equation}
M = \lambda_1 M_1+\lambda_2 M_2 + \cdots + \lambda_q M_q
\end{equation}
has full column rank, for some scalars $\lambda_1, \lambda_2,\ldots,\lambda_q$?
Answer: A $p \times m$ matrix with $p \ge m$ has full rank $m$ if and only if at least one of its $m \times m$ minors doesn't vanish. The $m \times m$ minors of $M$ are polynomials in $\lambda_1, \dots \lambda_q$ of degree $m$, so the condition to check is that these polynomials are not all equal to zero. Whether that's useful to you depends on what you're trying to do.


increasing density of beam light in volume rendering

Question: I am simulating in animation a film projector with a light beam in volumetric.  On the pic attached you can see that the beam is quite light.. I want to densify the beam more like an intense light coming from the lens..  I attach the blend file http://pasteall.org/blend/index.php?id=45259 and a pic showing my current state..
I have tried to balance volume scatter and  absorption but with no satisfactory result.. Can you suggest something
Thanks
Comment: Hi. Please use http://blend-exchange.giantcowfilms.com/ for blend uploads.
Comment: Try https://www.blenderguru.com/tutorials/make-atmospheric-lighting-blender/  Start a new file and make a simple setup work. You'll see you don't need the "domain" object or volume absorption.
Comment: Thanks.; did not think about increasing the light intensity..
Answer: When you are using scattering you need increase the intensity of the light.


Half-wave rectifier- How does the supply line current affect a transformer

Question: i Have this half-wave rectifier circuit. i have placed a current probe on the input in order to measure the waveform of the supply current. The waveform is shown below. My question is what effect does this waveform have for example on a step-down transformer?
Comment: Please show where the transformer would be connected in your circuit. If you open the edit window for your question, there is a tool for creating schematics.
Comment: @MathKeepsMeBusy The transformer would be connected before the diode
Answer: No simulations, I've not attempted to simulate transformers with saturation yet, but Measurements! Unfortunately the measurements are into a diode + resistor, not the diode, capacitor of the OP, but the results are interesting anyway.

simulate this circuit – Schematic created using CircuitLab
I am using a fairly cheap 50VA transformer, 240v to 24v, so turns ratio N of about 10, and the nominally 50 watt load of a Weller soldering iron on the secondary. The input voltage is measured via a 1000:1 resistive divider. The input current is measured through a 1 ohm shunt in the neutral, into a unity gain diff-amp to drive the scope safely. The secondary load voltage is measured by a standard 10:1 scope probe. All oscillographs show mains input voltage in light blue, primary input current in yellow, and secondary  voltage (and so load current as the load is pure resistive) in pink. The nominal mains voltage is 240v rms, about 330v peak.
The first picture if of the transformer off load. The core is being run somewhat into saturation by the input voltage, drawing a roughly 100mA blip around the zero crossings, which is where the core runs to maximum flux. This is in quadrature to the input voltage, so little real power is being drawn.

The second picture shows the situation with the rated 50 W load connected.

The load voltage follows the input voltage, via the scale factor N. The input current substantially follows the load current, but the core saturation current draw can still clearly be seen as a lump around the zero crossings. I chose polarities such that the input voltage, input current and load current were all in phase. The input current is peaking to about 300mA, 1/Nth of the load current peak as expected.
The third picture shows what happens when a silicon diode is placed in series with the load.

During the first positive half cycle, the load diode is blocking. There is no load voltage, and initially no significant primary current. While the input voltage is still at its peak, the primary input current starts to grow. This indicates that the core is going into saturation. It is being saturated earlier than it was off load, which indicates that the core did not start the cycle at maximum negative flux.
As the input cycle continues, the magnetising current builds to more than 500mA, larger than the normal load current was, but still a long way short of being dangerous. In this particular case, the rms input current when using the rectified load is about 2% higher than for the normal load, the input fuse and primary winding won't even notice. The secondary rms is lower, so overall, the transformer will run cooler.
As the negative half cycle starts, the output voltage goes negative. For a substantial part of this cycle, the primary current is still positive, whereas the load current is negative.
Finally as the cycle continues, the primary current comes into phase with the load current. If you look in detail at the primary current at the end of the load conduction phase, you will see it follows the shape of the secondary current closely. The saturation bulge that was visible in the normal load case is not present here. This confirms that at this point in the cycle, the transformer core has not reached maximum negative flux.
Let's see some simulations recreating that behaviour.
Comment: I just replied to Math Keeps me Busy above, before you posted this, and the current you show seems faaaairly close to the black trace, only up-side down. But I doubt the values.
Comment: @aconcernedcitizen The shape of the BH curve will strongly affect how a transformer saturates. Trying to match traces without knowing the core parameters is unlikely to be too successful. I'm using a different load to the OP anyway.
Comment: I know, that's why I tried to use Magnetics' data for 48 Alloy (magnesil is too squarish, and LTspice does not allow same Br/Bs). Even so, the link from which I used the numbers says it should sustain 240 VA, and this one saturates for a load as low as 5 VA. Still, it's interesting to see that the curves agree, in general.
Answer: With a circuit like this:

simulate this circuit – Schematic created using CircuitLab
The current in the primary will look something like this:

The exact waveform will depend upon the characteristics of the transformer (for example, the magnetization current, the leakage inductance, the winding resistance etc.).

The voltage across the primary is fixed by the power supply. The voltage induced in the secondary is proportional to that induced in primary. In this model, the two are nearly exactly proportional.

However, the voltage at the terminals of the secondary will not be exactly the voltage induced at the primary because the current in the transformer causes resistive voltage drops in the windings as well as inductive emf in the leakage inductance.
Here is a slightly more complex model which accounts for these effects, and the associated secondary terminal voltage.

simulate this circuit
The components were chosen to make the distortion of the secondary terminal voltage easily visible. An actual secondary terminal waveform may show more or less distortion due to the non-sinusoidal transformer current.
Comment: Is your simualtion handling tranformer saturation? Please plot the voltage waveform along with the current. WHen I can, I'll dig out my actual scope measurement pics.
Comment: @Neil_UK Unfortunately, I don't know how to model core saturation effects in CircuitLab.  However, I have added the primary and secondary voltage waveforms, both a set corresponding to the original circuit, and also one with exaggerated resistance and leakage inductance to make their effects more visible.
Comment: A quick setup for the Chan core based on [this](https://energie.ch/dimensionierung-von-transformatoren/) shows [this](https://i.stack.imgur.com/80exl.png), but I don't vouch for the choices of `Br=1.2 Bs=1.1 Hc=40`, because the trafo ends up [well saturated](https://i.stack.imgur.com/IyrZf.png).
Answer: The Transformer current has a big DC component as well as lots of harmonics .The DC can cause transformer saturation because mains power transformers have only a very small effective air     gap  and use high pearmability iron .
Comment: A DC component in the applied _voltage_ will cause a mains power transformer to saturate. However, I don't believe that a DC _current_ will cause saturation. The magnetic flux in the core is approximately equal to the net current through the windings. Current in the secondary "induces" an equivalent, but opposite current in the primary. The _net_ current in a transformer that determines the flux is just the _magnetizing_ current in the primary.


SharePoint Online exceeding library view threshold

Question: I have a library with over 10k items. We are migrating from 16 to Online. I created a template from the library, did not include content. In Sharepoint Online i indexed the necessary columns for filtering, went so far as indexing 20 total columns, but it still isn't working. It still shows I am exceeding the threshold. Even on views that I know should only have 5-10 items it still shows this. Any ideas why this is happening?  Thank you.
Comment: It may have something to do with the view definition. Do you specify any special conditions in view?
Comment: Just filters and sorting. Nothing else.
Answer: List view threshold is a known issue in SharePoint online, try to follow the below :

Set filters through "Modify list view" and limit the number of items
in the view to less than 5000 to mitigate this issue. You can
categorize your list items based on metadata whichever present in the
list such as category, department, business function, etc.
Archive old list items either by moving to a new list or a folder
inside the same list.
Try adding Indexed columns.

More details how to deal with threshold issue :

List View Threshold in SharePoint Online - FAQs

List view threshold error(5000 items issue) in SharePoint On-Premise/SharePoint Online
Comment: It looks like it works in modern view, but no classic view...go figure.


Why does Openssl 0.9.8g suddenly changes to 0.9.8b?

Question: I have a weird problem in which I try to use cryptodev in Openssl version 0.9.8g, but then if an error occurs or the system logs out, the version for Openssl rolls back to 0.9.8b.I have also tried reinstalling, but no dice. The version stays 0.9.8b Anyone know of a fix for this problem?
PS: I am using Intel Tolapai with RedHat 5
Answer: The answer is encoded below:
sudo find / -name 'libssl*'

Chances are there is more than one libssl on your machine. You can find the version number by doing something like strings - /usr/lib/libssl* | less and then search for the version number by typing /0\.9\.8 followed by ENTER.


Phone restarting again and again

Question: I am having samsung galaxy ace GT-s5830i.
The phone is restarting again and again after installing a game from 4shared.com.please help me out.
Phone is rooted one.
Comment: Did you try to uninstall the game and/or unrooting?
Comment: Related: [LG Motion Keep Rebooting (Boot Loop) After Installing Beat Audio Installation](http://android.stackexchange.com/questions/38847/16575). One more hint: Hover your mouse over the `boot-loop` tag, and follow the '[info](http://android.stackexchange.com/tags/boot-loop/info)' link: Many of our tag wikis already contain general help, as in this case (always worth a look ;)
Answer: Yeah, I had a similar problem with my Samsung Galaxy Nexus after downloading some apps I had developed without testing them on an emulator first (whops). Take a look at this question:Phone restarting over and over after rooting Samsung Galaxy Ace S5830i. I know there is not an accepted answer but you might have some luck with it. I had to reset mine and that seem to do the trick but if not I would recommend the safe reboot described in the linked question. The actual problem is probably caused by an over load maybe of to much memory required for the graphics (as it was in my case). I would just be careful when downloading apps not from Google Play, especially any sort of game that uses a lot of ram and CPU. Hope this helps. Cheers.

Phone restarting again and again


How can The expression $dH = TdS + Vdp$ hold for non-reversible process?

Question: From what I have found online the equation $dH = TdS +Vdp$ holds as all the variables are state variables and the derivation of this just requires $dU = TdS - pdV$ which is valid in all processes (assuming that the number of particles is constant). If we assume that the pressure is constant then $dH = TdS$ (1). However, I can see that there is an apparent contradiction with equation 1. I have also been taught that Gibbs free energy is $G = H -TS$ so assuming constant temperature and pressure $dG = dH -TdS $ Now, we know that $G\leq0$ for a spontaneous change and $G= 0$ for a reversible change only, then $dG\leq 0$ so $0 \leq dH -TdS$, as equality holds only for reversible processes, for a non-reversible process $0<dH -TdS$ which leads to $dH < TdS$, which contradicts (1).
Answer: If you are keeping your system at constant pressure and temperature (as usually assumed when someone claims that $\Delta G<0$), and the change of Gibbs free energy is
$$
dG=-SdT+VdP+\sum_i\mu_i dN_i,
$$
then the Gibbs free energy can change only by changing the number of particles of different species, which you neglected.
Comment: Ok I get that part, so continuing on the part of the question that asks how can this hold in all cases$dH=TdS+Vdp$, if the pressure is constant then $dH = TdS$, am I right to assume that this differential equation cannot be solved trivially ($\Delta H = T\Delta S$) as the temperature is not constant?
Comment: The Helmholtz free energy is just defined as $H\equiv U+PV$, and that's why your equation $dH=TdS+VdP$ always holds. You are right about not being able to solve the equation because temperature is a function of entropy at constant pressure. As a side note, sometimes it is also useful to know that $U=ST+\mu N -PV$


What movie has this virtual reality scene in it, of an office worker whose fantasy was to be a success at work?

Question: It was one of those earlier movies that featured paying for a virtual reality experience/fantasy and this clip wasn't the main part of the movie, but rather an example of a fantasy you could get, or a brief flash into a fantasy that a back ground character was having.  It was a seemingly unsatisfied office worker having a fantasy about being a success at work, where everyone was cheering him on and praising him.  Any idea which movie had this clip in it?
Comment: There was a bit in *Minority Report* where something like this was going on in one of the hologram booths.  Not able to find a source clip quickly however.
Comment: Any other details you can think of? Where you watched this (country, medium)? What was the language? How old was it?
Comment: That clip in Minority Report is very similar, thank you - the fantasy I'm looking for was taking place in an more realized office setting though, and might be from a movie older than MR.  We saw it in English in the US in a theater.  I'm unsure of the date however.
Comment: @Markstarr - when did you see it?  That alone could help cut out a bunch of false positives like mine.
Answer: Minority Report
This scene, where a man in a commercial VR establishment fantasizes himself being congratulated by a group of people while feigning humbleness.
Comment: here is a youtube clip of the scene.  Really short. https://youtu.be/8tjOVOSqdQ0?t=24s
Comment: Oh good. I was vague because I didn't have the facilities to find a video, and it's been a few years since I've seen it


How to join these edges to make a 90 degre pipe

Question: These two edge loops at the end of straight pipes are identical and I am trying to join them to make a 90 degree pipe. I select the two edge loops and then from edge menu I select bridge edge loops but it gives error and says I must select atg least two edge loops. Why? I already selected 2 edge loops. BTW the bridge should make the 90 degree turn as a curve, not just straight. But first I wanted to create edges between these two  edge loops.
Comment: Hello maybe the 2 pipes are 2 different objects? In that case you need to join them in object mode with Ctrl J
Comment: See this post: [Bridge edge loops - select at least two edge loops](https://blender.stackexchange.com/questions/130881/bridge-edge-loops-select-at-least-two-edge-loops).
Comment: Best to use Blender's Spin tool to create something like that. Quick tutorial [here](https://youtu.be/klyAQYBNH6E).
Comment: yes it seems that they were two separate objects thats why. Now i was able to do it. And spin tool is great, I did with that, thanks John.
Comment: Please help me with this :( https://blender.stackexchange.com/q/313691/184148
Answer: You need to join the two pipes or you wont be able to bridge the edge loops

Once they are joined, you can bridge the edges and increase the strength and segments to make the joint. However with this method and the pipes being very close to each other, the topology isn't optimal as you can see at the angle the polygons stretch a lot

But you can easily make a cleaner pipe joint
First, add a cube, subdivide it two times, remove and extrude the bottom

then make a 45 degrees cut starting from the center point. You might need to change the angle constraint to get the knife to snap to 45 degrees. Then delete the top left part

Once thats done, duplicate in object mode, rotate by 180 degrees on the Z axis and delete the top part

then rotate the newly created part so it fits with the first part, join them and merge by distance

Add support loops and a subd modifier and thats it, you've got a clean 90 degrees pipe joint that you can use in any project
Comment: Very nice alternative, thanks. The topology looks better for sure... one question... how do you bring the pipes together in the beginning? Since snapping sucks in blender I had to move them manually so that they are close to each other, but they cannot be as good as perfect snap. Or were you able to snap them to touch at 90 degrees (before even joining them I mean) ?
Comment: @upstream the cylinders were 1M long and wide, so the grid snapping worked just fine. I'd advise you to lookup the new snapping tools that were added in 4.0, it made snapping much more efficient
Comment: I have 4.0 and I spent days on snapping but it just behaves as it pleases although  lets say i am trying to snap faces and i select face. For example, I tried to snap bottom face of a cone to top face of cylinder and even though i select center and face it is not doing it... go to my profile and see my previous question please.. not even the experienced users could do it. Can you do it? All I want is to snap bottom face of a cone to top face of cylinder, center to center.


Norm Property of a symmetric positive definite matrix

Question: Let A be symmetric and positive definite. Show that $||a_{ij}|| < \sqrt{a_{ii}a_{jj}}$
Comment: What is the norm of a complex number? Do you mean its modulus?
Comment: Yes, that's how it's dealt with in linear algebra. Isn't it? @user1551
Comment: @Rama For just a single number, $|z|$ is used for the modulus of $z$.
Answer: of course. Every two by two principal subform must also be positive definite
Answer: Since $A$ is positive-definite and symmetric, you have that $A=B^TB$ for a certain $B$. Then, using Cauchy-Schwarz,
$$
|a_{ij}|=\left|\sum_k b_{ki}b_{kj}\right|\leq\left(\sum_k |b_{ki}|^2\right)^{1/2}\left(\sum_k |b_{kj}|^2\right)^{1/2}=\sqrt{a_{ii}a_{jj}}
$$

If you want to "start from scratch":

Considering the matrix as a complex matrix, show that it always has an eigenvalue.
Using that $A$ is symmetric, show that the orthogonal subspace of an eigenvector is invariant for $A$
Show inductively that $A$ admits a basis of eigenvectors.
Using said basis of eigenvectors, show that $A$ admits a positive-definite, symmetric square root $B$.
Write $A=B^2=B^TB$.


What's the definition for mole before Avogadro's constant?

Question: I have been searching for about 3 days how Avogadro's constant is found, and as all of us know the value is determined by division of charge of one mole of electrons (Faraday's constant) by the charge of one electron.
What confuses me is that, Faraday's constant is 96500 (it's not accurate value)
and its unit is C/mole. If the mole is defined by Avogadro's Constant
and Avogadro used Faraday's constant to determine his constant,
what was the definition of mole for Faraday?
Comment: did you look here? https://en.wikipedia.org/wiki/Avogadro_constant#History Not sure what you're really trying to figure out. It would take a book to discuss how weight/mass and the understanding of atoms developed scientifically. It wasn't a direct line of thought.
Comment: A gram equivalent times the stoichiometric coefficient contains the same amount of substance as a mole. To define the mole, you don't need Avogadro's constant, just atomic weights and a balance.
Answer: These constants have been named in honour of these people. They did not even know the existence of mole concept.
In order to search how early precursors to Avogadro's number's were found, read about Loschmidt constant and then move to Avogadro's story. There were many $independent$ methods to determine Avogadro's constant. Loschmidt was trying to estimate size of the "air molecule" in 1865.  Number of particles in air in a given volume.
The determination of Faraday's constant does not require the knowledge of Avogadro' ideas or his laws. This is a modern misconception. However, it does require the concept of gram equivalents (precursors to atomic mass or formula weights). In Faraday's time, measuring current/voltage and masses of substances was not a big deal. By electrolyzing a solution of silver salt, you can deposit a known mass of silver on the electrode. I am showing a page how Faraday's constant was found. As you can see we never needed to invoke Avogadro's law or numbers and constant. Faraday did such neat experiments! Clever and simple.
Electro-chemistry: General theory, Volume 1, pg 4, By Robert Alfred Lehfeldt, T. S. Moore. Longmans, Green and Company, 1904.


Name for a part of a charity?

Question: Is there a word like subsidiary for a charity owned and controlled by another charity? Or would the word subsidiary be used?
Comment: @JohnClifford neither could I, that's why I posted the question.
Comment: I can't think of anything better than subsidiary.
Comment: Haha, touché, my friend.
Comment: A [google search](https://www.google.co.uk/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=subsidiary%20of%20a%20charity) for the term seems to support this; there are several pages referring to a "trading subsidiary" of a charity, though an interesting point to note is that one page states that the charity constitution must specifically provide the charity the powers to set up such a subsidiary.
Answer: Branch is used to refer to a part of a charity:

A division of a business or other organization.

The Free Dictionary

Organisations with branch structures and the Charity Regulatory Authority

Does your organisation have a branch type structure, with strong, well organised and operationally independent local units/committees/groups in a relationship with a national office or "HQ"?
The Charities Regulatory Authority requires that the trustees of all charities demonstrate that they are in control of all resources raised and managed under an organisations charity number, and that annual reports and annual accounts are complete in this regard. For organisations with branch structures as outlined above, this can pose a dilemma: should the HQ of the organisation tighten controls and produce consolidated accounts, or should the HQ encourage branches to apply for a charity number of their own, with local committee members becoming trustees in their own right, and facing the full requirements of conforming with charity law themselves?

(www.youth.ie/nyci/Organisations-branch)
Comment: Does branch still count when the other part is owned by *another* charity, Josh? I would have thought branch would imply ownership/control by the charity it's a part of.
Comment: Branches that belong to different charities may interact among them, if that is what you mean.
Comment: I was more asking if the term was still applicable when the branch is owned by a charity other then the one running it, but you've just indirectly answered the question for me anyway.
Answer: I'd suggest, chapter

: a local branch of an organization
: the people in a certain area who make up one section of a large organization
M-W
From its origins in the world of show business, Variety often uses carnival and circus terminology. For instance, a local or national chapter of the charity is known as a "tent", and the main board of trustees and others of a particular tent is called the Crew. This is named after those who erected the old circus tents or nowadays provide the various technical experts to make a film or stage a live production. The chairman of the board is called the Chief Barker, after the man who drummed up customers at the fairground. (emphasis is mine.)
Wikipedia
The San Diego/Imperial Counties chapter of the American Red Cross is part of the largest and most diverse service organization in the United States. We serve more than 3.6 million people and cover nearly 10,000 square miles in the two counties. American Red Cross
All funds donated to your local Chapter remain here to support the local Red Cross programs. ARC
Ngram chapter leaders
Comment: not quite what I mean.

Name for a part of a charity?


Free web image management

Question: I am looking for free web image management system/script/...
I was using and still use photobucket service, but my account is free and has limited space and bandwidth. Now I am approaching the limits. On another side I have web hosting account and want to use it for image hosting instead or in addition to my photobucket. Sounds good. I can use ftp to upload my images and I am fine with it. What I miss is photobucket's web interface to my images. I am talking about photo galleries or portfolio like or something. But basic list of thumbnails, so I can see my images and easy get link to specific image in different formats to past into forum posts or into other web pages referring to that specific picture. Besides, I need easy way to organize pictures in albums/subalbums (like in file system). I see gazillion of image gallery systems, but have hard time to find for what I need. Oh, and I do not want database, just flatfiles/directories.
Anything come to mind?
Answer: There's Coppermine Gallery.
Answer: I was just looking for something similar.
I know Coppermine pretty well (I run a site powered by it): it is very flexible, with tons of options, and relatively easy to mod to your needs if you know a bit of php. It also reads and displays EXIF data if you configure it to do so. There is a lively community of developers for Coppermine. There is also a plugin that displays BBcode (http://forum.coppermine-gallery.net/index.php/topic,74043.msg356623.html#msg356623), unfortunately only image by image (not in bulk like the ImageShack Uploader). The drawback is that Coppermine is a pretty bulky script and does not perform super fast, especially on slow servers.
Bravenet seems to be a service more than a script.
I'm also checking out Lightbox 2 (http://lokeshdhakar.com/projects/lightbox2/#example) which seems nice and tiny, but not a chance of getting the EXIF file into the displayed image or getting the BBcode.
Will keep an eye on this thread

Free web image management


What do you mean by the phrase David vs. Goliath?

Question: While watching the hit TV series Suits I noticed a headline "David vs. Goliath" published in the newspaper when the show's protagonist gets in an altercation with a common cab driver What does it mean?
Comment: It is a reference to the Biblical story: http://en.wikipedia.org/wiki/Goliath
Answer: The phrase 'David vs Goliath' is generally used to refer to a situation in which a small person or organization defeats a larger one in a surprising way.

The story of David and Goliah can be found in First Samuel 17 of the Bible. It tells the story of the giant Goliath, a nine-foot soldier from Gath, who boasted he could beat any individual soldier in the Israelite army. Nobody in the army dared to take him on -- except David, a shepherd boy who believed strongly in God. "The Lord who delivered me from the paw of the lion and from the paw of the bear, will deliver me from the hand of this Philistine," David said.
King Saul wanted to arm David with a sword and armor, but David refused, saying his strength came from God, not from weapons. All he brought to the battlefield was a sling and a stone. Of course, David's expertly flung stone nailed Goliath in the head and killed him.
As far as what kind of literary form this story is, most would say history, but Bible skeptics would argue there is no historical basis for this event, that it is nothing more than fiction or a myth.
The literary meaning of the story is that great odds can be overcome by underdogs if the motivation is strong enough. If God is on your side, you will win, regardless of the odds against you.
Answer: If you've ever read the Biblical tale of Goliath, like Sel said, you'd see the connection immediately.
David vs. Goliath usually refers to a situation where two parties clash, with one party with an overwhelming advantage, typically in veterancy or size. In addition, the lesser party typically wins in a "David vs. Goliath" situation.
For instance: two technology companies are competing in selling a certain product, where one of them was Google and another was just a start-up company. The start-up company somehow manages to outperform Google by a massive margin. That's a "David vs. Goliath".
This is in reference to the real story, in which a small boy named David manages to kill a giant named Goliath.
Comment: Doesn't necessarily need to *outperform*, a match-up could also be a David vs. Goliath.


How to copy one directory to another with window command prompt?

Question: I read alot of guides about to copy directories. On SO also read the posts

Commmand line command to copy entire directory (including directory folder) to another directory
copying all contents of folder to another folder using batch file?

but nothing is working for me. I am using Window 10 Pro 64bit version. My directory looks like
myfolder
   |
    ---folder1
    ---folder2
         |
         ---sample.txt

The expected output is
myfolder
   |
    ---folder1
         |
         ---folder2
             |
             ---sample.txt
    ---folder2
         |
         ---sample.txt

At command prompt, my present working directoy is
C:Users\MyName\Desktop\myfolder>

When I tried with belows
robocopy folder2 folder1 /COPYALL /E
xcopy folder2 folder1 /s /i

only sample.txt was copied to folder1. What's I am wrong ?
Answer: Only sample.txt was copied to folder1
You need to properly specify the target directory name.
Use one of the following commands:
robocopy folder2 folder1\folder2 /COPYALL /E

Or:
xcopy folder2 folder1\folder1 /s

Further Reading

An A-Z Index of the Windows CMD command line
A categorized list of Windows CMD commands
robocopy - Robust File and Folder Copy.
xcopy - Copy files and/or directory trees to another folder.
Answer: xcopy copies only content of folder2 to folder1. You should try this, as now you are under myfolder:
cd folder1
 xcopy ..\folder2 folder2 /S /I

Answer: Either of the above would work.
My preference is to user wildcards, where appropriate.
xcopy /s folder2\* folder1\


Tbill Rollover Interest

Question: I am buying 52 week t-bills with one rollover through Treasury Direct. Being OID interest based, when I reinvest, will I be investing the full maturity t-bill value in my reinvested t-bill or will I buy the same denomination as the maturing t-bill with the earned interest going to my linked bank account?
Comment: Reinvest usually means "reinvest it all" as distinct from "roll over the principal and pay out the dividends/interest."
Answer: My experience is with 4 week and 13 week products on treasury direct.
When I purchase  let's say $5,000 worth of 4 week tbills, the treasury pulls $4980.03 from my bank account. The $19.97  delta is the interest I will earn. If I didn't  reinvest I would get $5,000 back in my bank account in 4 weeks.
But because I am reinvesting, in 4 weeks they put let's say $19.42 into my bank account. That represents the interest I would have earned in next 4 weeks. The number changed because the interest rate changed.

Tbill Rollover Interest


What is the difference between "vorgezogenen" and "früh"?

Question: When I read an article, I saw a word "vorgezogenen" which means early. I remember that "früh" means also early.
What is the difference between "vorgezogenen" and "früh"?
Thank you.
Answer: "Vorgezogen" means that something that was scheduled for a time now happens earlier. "Früh" just means that something happens early.
Answer: In order to develop an understanding for the different meaning (or usage) of these words you need examples.
Here are sentences where "vorgezogen" und "früh" appear in a typical way:

Als wir aufbrachen, war es noch sehr früh.
Am frühen Nachmittag kamen die ersten Gäste.
Am Sonntag finden vorgezogene Neuwahlen statt.
Tagungsordnungspunkt 3 wird vorgezogen und findet somit früher statt, Tagungsordnungspunkt 2 wird dafür nach hinten verschoben und findet somit später statt.
Früh übt sich, was ein Meister werden will. [Popular proverb]
Vorgezogene Prüfungstermine erlauben es, die Ausbildung früher abzuschließen.

For a descriptive definition of the meaning of the two, see Retat's answer, which is satisfactory.
Or simply use a better pair of English expressions: früh --> early; vorgezogen --> preliminary
Answer: Vorgezogen is the Partizip II of the verb vorziehen. Such participles can be used as adjectives and describe the result of the action applied to the noun then.
Vorziehen means to pull to the front and to prefer. So e.g.

vorgezogene Wahlen

are elections that "have been pulled to the front", elections that would have taken place later by the regular order but held now because of circumstances.
Answer: "Vorgezogen" means "pulled to the front of the timeline." That implies early (at least relative to other events).
"Early" explicitly means early.And in the "absolute," not relative sense.


Confusion regarding the completeness axiom

Question: Why would we use square root of 2 in our example to show that the rationals don't have a supremum when square root of 2 is not an element of the rationals? Wouldnt the supremum be the element of the rationals that is greater square root 2 or less than square root 2?
Answer: We can still talk about the set of rationals less than $\sqrt 2$ without making direct reference to $\sqrt 2.$ Write it as $$\{q\in\mathbb Q: \mbox{$q^2<2$ or $q<0$}\}.$$
As to your second sentence, I'm not sure I understand... any element of the rationals is greater than or less than $\sqrt{2}.$ Maybe you meant greater than or equal to and less than or equal to  $\sqrt 2$? But this just means it is equal to $\sqrt{2},$ and the usual proof that $\sqrt{2}$ is irrational shows that this is impossible.
Showing the set has no least upper bound in the rationals requires one more step than showing there is no rational $q$ with $q^2 =2.$ We also use the fact that the rationals are dense. We know that any upper bound must have $q^2 > 2,$ and then we can show that there is a slightly smaller rational that still squares to greater than two.
Answer: You don't use the square root of $2$ directly, rather you look at the set of rational numbers $q$ such that $q^2 < 2$, so the definition of that set does not refer to anything other than rational numbers and multiplication of them.


Cell Fracture Causing Squares

Question: I am trying to use the cell fracture addon to make tiny, pointy shards from a plane. I will have objects flying through the ground and shattering it. The original plane looks like ice when it is textured. When I turn the quantity up in the cell fracture settings, the pieces look like rectangles. Like I stated I wanted to make many tiny, uneven, pointy shards. What am I doing wrong?
Comment: Increase the noise amount to 1. If you want the fractures much like splinter you can under Scale increase the scale for the first one (x-axis)
Comment: thanks, @vadar but how would i make really small pieces. The new pieces are rather large.
Comment: increase the count, known as Source Limit.
Answer: You will want to modify certain parameters of the cell fracture tool. To change the numbers of fractures increase the Source Limit. To avoid all fractures looking like squares increase the noise. I would increase is all the way to 1, this will look the most natural.

Cell Fracture Causing Squares


Single DAO & generic CRUD methods (JPA/Hibernate + Spring)

Question: Following my previous question, DAO and Service layers (JPA/Hibernate + Spring), I decided to use just a single DAO for my data layer (at least at the beginning) in an application using JPA/Hibernate, Spring and Wicket. The use of generic CRUD methods was proposed, but I'm not very sure how to implement this using JPA. Could you please give me an example or share a link regarding this?
Answer: Here is an example interface:
public interface GenericDao<T, PK extends Serializable> {
    T create(T t);
    T read(PK id);
    T update(T t);
    void delete(T t);
}

And an implementation:
public class GenericDaoJpaImpl<T, PK extends Serializable>
    implements GenericDao<T, PK> {

    protected Class<T> entityClass;

    @PersistenceContext
    protected EntityManager entityManager;

    public GenericDaoJpaImpl() {
        ParameterizedType genericSuperclass = (ParameterizedType) getClass()
             .getGenericSuperclass();
        this.entityClass = (Class<T>) genericSuperclass
             .getActualTypeArguments()[0];
    }

    @Override
    public T create(T t) {
        this.entityManager.persist(t);
        return t;
    }

    @Override
    public T read(PK id) {
        return this.entityManager.find(entityClass, id);
    }

    @Override
    public T update(T t) {
        return this.entityManager.merge(t);
    }

    @Override
    public void delete(T t) {
        t = this.entityManager.merge(t);
        this.entityManager.remove(t);
    }
}

Comment: Great answer. Just a few comments: I rather pass the Class as a parameter in the constructor method (instead of a unchecked cast); the parameter t in the delete method should not be reassigned and the class would preferably be abstract.
Comment: How would this fit in with slsb's and pojo entities (representing the db tables) ?
Comment: I tried to follow this example but the `ParameterizedType genericSuperclass = (ParameterizedType) getClass().getGenericSuperclass();` code is throwing `java.lang.ClassCastException` with the following message: `java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType` Do anybody know how to fix this? Thanks anyway.
Comment: @Woland If using JTA you do not need to all those methods, in fact IIRC it will throw an exception if you try to call those methods in a JTA context.
Comment: Why there is no transactions? I mean  `entityManager.getTransaction().begin();` and `entityManager.getTransaction().commit();`.
Answer: Based on the article Don't repeat the DAO we used this kind of technique for many years. We always struggled with problems with our patterns after we realized that we made a big mistake.
By using an ORM tool such as Hibernate or JPA you will not have to think DAO and Service layer separately. You can use EntityManager from your service classes as you know the lifecycle of transactions and the logic of your entity classes there.
Do you save any minute if you call myDao.saveEntity instead of simply entityManager.saveEntity? No. You will have an unnecessary dao class that does nothing else but will be a wrapper around EntityManager. Do not afraid to write selects in your service classes with the help of EntityManager (or session in hibernate).
One more note: You should define the borders of your service layer and do not let programmers to return or wait for Entity classes. The UI or WS layer programmers should not know at all about entity classes only about DTO-s. Entity objects have lifecycles that most of the programmers do not know about. You will have really serious issues if you store an entity object in a session data and try to update it back to the database seconds or hours later. Well you may would not do it but a programmer of the UI who knows the parameter types and return types of your service layer only would do to save some lines of code.
Comment: Annotated transaction management in EJB?! Though you probably need much more sophisticated DAO, which will not be generic anymore, but anyways. I still find this method can be useful in specific cases.
Answer: I was looking for this same thing.  I found what appears to be exactly that- the Spring-Data JPA project provided by SpringSource.  This is a code port from Hades and has now (Early 2011) been swallowed by Spring and better integrated.
It allows you to use a single dao (SimpleJpaRepository) with a static create, or extend the base JpaRepository class to create any object specific dao with ready made CRUD+ methods.  Also allows grails like queries just by using params names as the name of the method- in the interface (no implementation required!) i.e. findByLastname(String lastName);
Looks very promising- being part of Spring projects will certainly ensure some future for it too.
I have begun implementing this in my upcoming project now.
Answer: if you are looking for a third party implementation , you can check
http://www.altuure.com/projects/yagdao/ . it is a nnotation based generic DAO framework which supports JPA and hibernate
Answer: You may also have a look at http://codeblock.engio.net/data-persistence-and-the-dao-pattern/
The related code can be found on github https://github.com/bennidi/daoism
It has integration with Spring and configuration examples for Hibernate and EclipseLink


Insert Form with gauge in Canvas J2ME

Question: I want to know if it is possible to somehow show a gauge in a canvas? I want to make a custom alert with a spinner.
But I want to reduce the height of the form to let's say 1/4th of the screen size. Could anyone tell me if its possible?
Answer: If you want something like a spinner in a Canvas you need to draw it yourself using graphics primitives, and animate using Display.callSerially().
Instead of drawing it yourself you could include each frame of the spinner as an image.  You'd still need to animate them somehow.  Or you could use animated GIFs if your device supports them.
Answer: There is no way to get that with MIDP 2 API.
Form class simply has no methods allowing application developer to specify its size.
That's the way it generally is with high level MIDP UI objects like Form, Alert, Gauge etc. You write a little code and specify desired behavior in general and you get it, but "in exchange" MIDP allows device manufacturers to decide on lower level details (like Form size or Gauge looks) and display them any way they want.

Since you want the Gauge look like you've seen at particular Nokia device, you should better know that on some other device, this Gauge may look completely different. So can Alert and Form.
If you really want to guarantee such kind looks of UI elements on different devices, you would have to use Canvas and other kind of low level graphics API - but that would require a lot more coding and much more complicated application design, with threads, animation, proper scaling to device screen size etc etc. I would think twice before diving into that.

Insert Form with gauge in Canvas J2ME


Why can't I create a fork of BTC that has no difficulty changes so I can premine the rest of the coins?

Question: I don't want to necessarily do this, but what prevents this scenario from being possible? [just timestamps and a difficulty modifier alone? - if that's the case then why can't I modify the client to be set at a much higher difficulty to mine stuff in anticipation of a harder target as opposed to simply using network difficulty?]:  How come I cannot make a modified version of Bitcoin QT and all historical transactional data re-utilized to mine all past stale blocks and simply premine all remaining bitcoin without difficulty?
Answer: Depending on what you meant to ask, the answer is one of the following:

If you run a Bitcoin-qt fork which is incompatible with the rest of the network, you're running a separate currency which has no value (because no one else accepts it).
If you ignore blocks and forge historic timestamps to create a branch with more blocks of low difficulty, it will not be chosen over the main branch because the choice is made based on total difficulty, not number of blocks.
Answer: You'd then have to force everybody to download your forked version. And nobody would do that because it contains malicious behavior.
Comment: Additionally, Bitcoin-QT has checkpoints at various block positions, and I believe some other clients do as well. So you couldn't try to get new users either.


How to read input from excel and write to UI application

Question: In our application we are using JIRA as defect tracking tool. So we want few inputs to be reading from excel and write it certain fields and dropdown in JIRA
For example:
Priority which is a drop down in JIRA should take values entered in excel (2-High) and enter the value in JIRA
similarly URL is a field in JIRA we should be entering in excel and same should be entered in JIRA.
Is there any sample macros we can use for this?
Answer: JIRA provides the REST API so you can write a simple program in any language which will be parsing your Excel file and create a ticket in your instance of JIRA and fill ticket fields with values from Excel. Here is the link to API which shows the basic example of creating JIRA ticket thru their REST API https://developer.atlassian.com/display/JIRADEV/JIRA+REST+APIs#JIRARESTAPIs-TwoSimpleExamplesofCreatinganIssueinJIRA
Also you may find several plugins in Atlassian Market which may be helpful for you or write your own one. At first sight this one https://marketplace.atlassian.com/plugins/pl.com.tt.jira.plugin.excel2jira is what you are looking for.


Microservices: REST vs Messaging

Question: I heard Amazon uses HTTP for its microservice based architecture. An alternative is to use a messaging system like RabbitMQ or Solace systems. I personally have experience with Solace based microservice architecture, but never with REST.
Any idea what do various big league implementations like Amazon, Netflix, UK Gov etc use?
Other aspect is, in microservices, following things are required (besides others):
* Pattern matching
* Async messaging.. receiving system may be down
* Publish subscribe
* Cache load event.. i.e. on start up, a service may need to load all data from a couple of other services, and should be notified when data is completely loaded, so that it can 'know' that it is now ready to service requests

These aspects are naturally done with messaging rather than REST. Why should anyone use REST (except for public API). Thanks.
Comment: hmm maybe use cases where REST should be used and where messaging should be used, or a combination.. why this and not that kind of
Comment: HTTP,REST are specifications . RabbitMQ/Solace are message brokers. Is your question that "what are the applications of services based on HTTP/REST" ?
Answer: A standard that I've followed in the past is to use web services when the key requirement is speed (and data loss isn't critical) and messaging when the key requirement is reliability.  Like you've said, if the receiving system is down, a message will sit on a queue until the system comes back up to process it.  If it's a REST endpoint and it's down, requests will simply fail.
Comment: +1, You may want to think about the coupling implications of synchronous communications (REST), if one fails all its dependents will fail, so in addition to losing the data it can cause a chain reaction that could bring the whole system down.
Comment: Generally, messaging applications are easier to integrate because you can decouple application logic from your messaging endpoint, which makes applications easier to maintain and more reusable. However, developing a messaging endpoint can be blood and tears. If you only want to build a single purpose application you are better off with REST.
Comment: Sometimes you may want this behaviour. For example if you expect a fast synchronous response and you get a time out or some other server error, you can deal with it accordingly. Some processes are not tolerant of waiting. I'm sure there are other similar use cases to this.
Comment: @SeanFarmar this is what I call the Domino Effect. A related issue is the Ripple Effect, where changes in one service can necessitate changes in downstream services.
Comment: REST is not faster than MQTT, a popular messaging protocol.
"As per the analysis and test reports, MQTT data transfer can transfer data at a rate 20 to 25 times faster than REST Calls. ... MQTT Broker can process up to 40,000 messages per second on a commodity server." -- https://www.bevywise.com/blog/mqtt-vs-rest-iot-implementation/
Answer: REST API presumes use of HTTP only. it is quite stone age technology and does not accept async. messaging. To plugin messaging there, I would consider  WebSockets Gateways
-sorry for eventually dummy statements
Comment: **This is plain up wrong:**
HTTP is a contract, a communication protocol. REST is a concept, an architectural style which **MAY** use **HTTP**, FTP or other communication protocols. HTTP is one of the most commonly used communication protocols by REST, which is where you misconception stems from I guess.
Comment: so why many minuses? Actually, REST based on HTTP methods!
And yes, REST is sync!

Microservices: REST vs Messaging


Is Bayes' theorem necessary in this question?

Question: The probability of rain during a winter day is 0.58, the probability of rain during a spring day is 0.38, the probability of rain during a summer day is 0.25 and the probability of rain for a fall day is 0.53. Each season is 1/4 of the year. What is the probability of rain on a randomly chosen day?
In this question I got a 0.435... But I'm not really sure if I used the Bayes' theorem. I know, however, that I used the general multiplication rule and the law of total probability because in order to get the probability that it rains for any given season, I have to use the multiplication rule. And then to get the total probability of rain on any given day (in all four seasons), I have to use the law of total probability.
Once more, is Bayes' theorem necessary/is used here? Thanks!
Comment: You don't need Bayes here.
Comment: Bayes's theorem is used for finding certain conditional probabilities. That is not involved here.
Answer: It is enough to calculate the average
$$\frac{58+38+25+53}{4}=43.5\%$$


Excel cell value needs to be updated in a SharePoint List using Power Automate

Question: I have a document library in which there are different folders which contains excel files. Excel file has name SA_0012ABCD_201901_Report. So here the 0012 is the folder name. So we Match the excel file name with the folder name and move them inside folders using flow. After that the properties needs to be filled to the columns. The excel file inside contains a cell which has value of amount. That cell value need to be updated to the Column Amount outside. So whenever a file is uploaded, the excel cell value k39 needs to be updated to the column amount of the list. I want this to be done using a Power Automate flow.
Comment: Not sure I understood the requirements correctly; could you show an example of **Column Amount outside**? Possibly show the structure of the Document Library. It's possible to update Excel Table using Power Automate, but not sure about where the outside value is located at? Are you uploading Excel files manually or using Power Automate?
Comment: We are uploading them manually. I meant the files we upload is excel . The excel has a cell k39 that cell value has to be uploaded into the column amount . This functionality shuld be done using power automate.
Comment: That means - flow needs to read Excel value from cell k39 and then update the meta data column of the library named as [Amount] with value in k39, right? I think flow reads from a [Table] in Excel. Do these Excel files have tables in them?
Comment: No they don't have tables in it .
Comment: Please see my response. Let me know if you have any questions.
Answer: I'm providing a Power Automate sample that can be used to do:

Read value from a cell in the Excel file uploaded to a SPO library
In order to read values from an Excel file in Power Automate, the Excel file needs to have a table. The Power Automate first checks for a Table (Table1), if it doesn't find it, it creates it for a specific range containing the data.
Update Document meta data, in this case, [Amount], with the value read from the Excel Cell.
To avoid File Locked For Shared Use for recently created files in SPO library, a delay mechanism implemented when updating the meta data of the excel file. You can read details at here

Row Excel File

MS Flow (Power Automate)

Detail 1

Detail 2

<code>outputs('List_rows_present_in_a_table')?['body/value']?[37]['K']

Note: Table Rows' index starts at 0 and header row is deducted.
(39-2)=37, the desired row index. ['K'] is column header (property name).

</code>
Detail 3

Final Output


Whirlpool refrigerator with water on the bottom

Question: I have a whirlpool refrigerator that gets water leaking down below to the crisper drawers, I'm wondering what this is due to and how could I fix it from happening? I'll put a photo to the model number of the refrigerator I have.
Comment: Spending the minute to type the model number into your question would be helpful instead of making everyone else squint at it to go do some research...
Comment: I greatly apologize about this . I will definitely know better next time.
Answer: In general, when there's water leaking in or around a refrigerator+freezer combination unit, it is from one of two sources:

the ice maker/water dispenser
automatic defrost

Based on my hasty search of your model number, it appears you have a unit with no ice maker or water dispenser, and a freezer compartment on top. I think a plugged drain for the automatic defrost is the most likely cause of the water you're seeing.
The evaporator (cooling) coil in this type of unit is usually hidden behind a panel at the rear of the freezer compartment. Unload the freezer and look for fasteners; figure out how to remove that panel. Behind the panel you should find a scene that looks something like the still image below (captured from YouTube).

From time to time a heater element in that area is switched on to melt the ice that accumulates on the evaporator. The resulting water is supposed to drip down onto that shiny metal foil pan and exit the freezer compartment through a drainage tube at the bottom. From there it travels outside the cold compartments to a pan in the bottom of the unit near the compressor and/or condenser coil. Heat and air movement from these components evaporates the water into the room air.
It's likely that the drainage tube in yours has become blocked. Some have a "duckbill" check valve that looks like the photo below (source). This is a likely place for debris to accumulate; when it does, eventually the water backs up and freezes and leaves the drain fully blocked. Defrost water follows gravity and finds another way out -- into the refrigerator compartment below!

So.. your task is to disassemble, melt out the ice, find the drainage tube, check for and clear obstructions. Doing it for first time I'd plan on it taking 2-4 hours to get all sorted out.
Comment: To add, depending on the diameter of your drain tube, various items to clear it can range from a trombone cleaning brush, to weed-whacker line, to coax cable.
Comment: @Huesmann I unplugged the refrigerator for a couple of days then cleaned up the water, there hasn't been water since , so you think this solved the issue ?
Comment: @BrockNeill I'd expect the trouble to recur, between a couple weeks and a couple months from now. How soon depends mostly on the indoor humidity where you are and how frequently you open the freezer door.
Answer: If you can get at the drain use a turkey baster with hot water and flush it out. Be sure you have something to catch it as it will come out at the bottom of the appliance.