Online, scalable statistical methods

Question: This was inspired by Efficient online linear regression, which I found very interesting.  Are there any texts or resources devoted to large-scale statistical computing, by which computing with datasets too large to fit in main memory, and perhaps too varied to effectively subsample.  For example, is it possible to fit mixed effects models in an online fashion?  Has anyone looked into the effects of replacing the standard 2nd order optimization techniques for MLE with 1st order, SGD-type techniques?
Comment: you might also look up the Workshop on Algorithms for Modern Massive Data Sets (MMDS). It's young, but draws a pretty impressive set of speakers at the interfaces of statistics, engineering and computer science as well as between academia and industry.
Comment: I think the answer is "yes". Of course, there is a bit of an issue of definitions here. What one person considers "large-scale" is sometimes very different from other's. My impression is that, e.g., many academic researchers consider the Netflix dataset "large-scale",  while in many industrial settings it would be considered "puny". As regards estimation techniques, usually with very large data, computational efficiency trumps statistical efficiency. For example, method of moments will, in many cases, perform (nearly) as well as MLE in these settings and can be *much* easier to compute.
Comment: It's only a few decades since most datasets were too large to fit in main memory, and the choice of algorithms used in early statistical programs reflected that. Such programs didn't have facilities for mixed-effects models though.
Comment: Are you able to calculate statistics for the data set? say for example the sum, or averages of data items?
Answer: You might look into the Vowpal Wabbit project, from John Langford at Yahoo! Research . It is an online learner that does specialized gradient descent on a few loss functions. VW has some killer features:

Installs on Ubuntu trivially, with "sudo apt-get install vowpal-wabbit".
Uses the hashing trick for seriously huge feature spaces.
Feature-specific adaptive weights.
Most importantly, there is an active mailing list and community plugging away on the project.

The Bianchi & Lugosi book Prediction, Learning and Games gives a solid, theoretical foundation to online learning. A heavy read, but worth it!

Online, scalable statistical methods


How to connect an industrial sensor to Arduino Uno?

Question: I want to use a sensor to read pressure in rooms. But sensor like MPX series isn't capable to read air pressure change under 100 Pa. So I want to use industrial sensor like Dwyer 607 Series, and dont have a clue how to connect it to arduino. Anyone can help?
Thanks :)
Fyi, this is the manual instruction for the sensor http://www.dwyer-inst.com/PDF_files/E_76_low.pdf
Comment: here is a tutorial which explains how you can connect 4-20mA industrial sensors with Arduino.
[How to interface 4-20mA with arduino](https://ncd.io/reading-4-20ma-current-loop-sensors-using-arduino/)
Answer: That uses the industry standard 4-20mA current loop system. For that you really need a special chip to interface it.
You can buy shields that interface to 4-20mA current loops.


Can I upgrade Unreal 4.27 to 5?

Question: I tried to get Unreal 5 directly but I couldn't, the only option on the table was unreal 4.27, can I upgrade to 5 after 4.27 or do I need to consume another 20 gigs for 5?
Comment: "I tried to get Unreal 5 directly but I couldn't" - what stopped you? This might be relevant to what obstacles may face you in your upgrade attempt too.
Comment: @DMGregory I do not know whether you believe it or not, but until last night when I left this post, it did not show any option to download Unreal 5 at all. After I downloaded Unreal 4, I realized that the option to download Unreal 5 also came, I do not know if it was a bug or not, but I have to consume about 40 gigs to download it. From where Iran's IP is blocked. I may have encountered a problem with not updating with VPN.
Comment: It's not clear to me from that message whether your problem is 1) The button is not available, 2) The download is larger than you can afford, 3) Your IP is blocked from downloading Unreal, or 4) An unspecified problem with your VPN. Please clarify. Also, if Epic has blocked users in Iran from downloading this software, it may be for legal reasons, in which case users who help you bypass this restriction could be contributing to illegal activity - that's something StackExchange cannot host for you. (I am not a lawyer and this message is not legal advice).
Comment: @DMGregory Thanks for your non-legal advice, yes the download button didn't show. But my question was whether I could update 4 to 5 after Unreal, which solved the problem last night. (off-Topic: There is no legal reason for the IP of Iran to be blocked, because the US government's problem is with the Iranian regime, not the Iranian people, such irrational laws only cause problems for the people and do not put any pressure on the regime. +The Iranian regime has also targeted a plane with Iranian and Canadian passengers. Do not worry about helping others, our lives are not safe here either.)
Answer: You cannot upgrade your installation to 5.X, as major unreal engine versions are separate installations (i.e. 4.26, 4.27, 5.0, 5.1, and 5.2 are all their own installation). You would have to download your desired 5.X version separately.
However, if you download 4.27.2, for example, if there ever is a 4.27.3 it will download the new files to the 4.27.2 installation, changing it to 4.27.3.
If you're asking if you can change your project's unreal engine version, then yes, you can freely change what engine version your project uses (if installed of course). For example, you can change your project from using 4.27 to using 5.2, but keep in mind that there are many deprecated features in newer versions from older versions.
Changing the project version is as easy as right-clicking on the project file -> switch unreal engine version context option.

Can I upgrade Unreal 4.27 to 5?


Do all wires on basement walls have to be in conduit?

Question: I need to know if, when a basement is unfinished and an outlet is on the wall, is it required to put all wires in conduit?
Comment: It is incredibly cheap and easy to buy some 1x12 lengths and screw them across multiple joists. Then you can staple wires to them. Much better than drilling holes through your joists--that's for lazy electricians and plumbers that don't care about the structural integrity of your house.
Comment: If you decide that this is actually a crawlspace, and not a basement, then the rules are more relaxed.
Comment: Given that engineered joists are not all that rare these days -- installing a furring board for the run isn't a bad idea to consider.
Answer:
2005 NEC
ARTICLE 334 Nonmetallic-Sheathed Cable: Types NM, NMC,
and NMS
334.15 Exposed Work.
(C) In Unfinished Basements.
Where cable is run
at angles with joists in unfinished basements, it shall be permissible
to secure cables not smaller than two 6 AWG or three 8 AWG conductors
directly to the lower edges of the joists. Smaller cables shall be run
either through bored holes in joists or on running boards. NM cable
used on a wall of an unfinished basement shall be permitted to be
installed in a listed conduit or tubing.

So basically if the cable is on the ceiling, it does not require conduit. If the cable is run along walls, it requires some form of protection. This protection can be conduit, or some other form of protection. You could use a scrap piece of 2x4, for example. Simply attach the 2x4 to the joist, and then attach the cable and box to the 2x4 (following proper NEC procedures of course).
When running cables on the ceiling, only 6/2 and 8/3 (and larger) NM cable can be run along the bottom of joists (perpendicular to joists). Smaller cable must run through bored holes (following 2005 NEC 300.4), or along running boards (boards that run perpendicular to joists e.g. main support beams). When installing cable on the ceiling that runs parallel to the joists, you can attach the cable to the face of the joist (as per NEC 300.4(D)).
As always, check your local codes before installing cable as your location may not follow NEC 2005.
Comment: Does this mean sheathed non-metalic cable, 12ga, can't be stapled to edge of joists?
Comment: What about running along a joist? Either on the bottom or on the side. Is that permissible?
Comment: "...on a wall...a listed conduit or tubing" Why do you say "...along walls...You could use a scrap piece of 2x4"? Is that a listed conduit or tubing?
Comment: @rcav8r: Correct, that is prohibited.  If you are still in doubt you can post a picture to show your situation.
Comment: @ChrisCudmore See NEC 300.4
Answer: OK, Tester is absolutely right and gave you the proper reference.  Now I will give you the practical solution. 14 or 12 ga romex can be run along the wrap beams or center beams. It cannot be run across joists without drilling through them.  Assuming you meet those requirements and get to the wall, you have two choices. You can run EMT down the wall and use metal boxes for outlets, or you can ramset wood 2X4's down the wall and staple the wire to it and use a proper surface mounted outlet box and GFI receptacles. Both will meet code in an UNFINISHED BASEMENT. I stress unfinished, because rules change if you are going to put up walls etc. The perfered method is Conduit, but either will work.
Comment: Can BX/AC be used instead?
Comment: Yes - BX is basically flexible conduit.
Comment: Why can you staple NM to a 2x4 running down an unfinished basement wall without protection such as conduit or EMT?  Do you consider it not subject to physical damage?  NEC 334.15 quoted in [this](https://diy.stackexchange.com/a/64003/108017) answer seems to require it.
Answer: Yes, if the wires are "exposed" then they must be protected.  Romex is fine when it is inside a wall/ceiling/floor because it is protected from puncture/cuts/etc. but if it is just running along the exposed walls of a basement that is not up to code.
That said, there are many basements that have this "problem", mine included.  If I had kids I might be worried about it but I may finish the basement eventually and just fix it then.  It is something my home inspector mentioned before we bought the house.
Answer: It is all right to run cable through holes drilled in joists.  The thing is that the hole should be drilled in the center of the joist (not near the top or the bottom) to preserve strength of the joist.
This is because the upper part of the joist is under compression, the lower part under extension.  The middle part is simply sitting there: it will weaken the beam almost not at all to have a few small holes drilled in the center.  In fact, such holes might even relieve stresses which cause cracks in the wood to propagate.


Pronoun modifying word after it?

Question:
wenn sie jemanden besser(en) finden koennte.

My question is regarding the bracketed "en" in the above sentence. Why is it there?
Comment: It would help, if would would identify the adjective and noun you assume to have found. Hint: *jemand* is an indefinite pronoun.
Answer: If you find someone "besser" than you still find the same person, but just better in a sense that you like them more.
Another example for "besser" in your example is that you find a better way to find someone in a direct sense of finding a person, as in searching for them.
But if you find a "besseren" than you find someone else you like more e.g. and its not the same person anymore.
The brackets are probably there to indicate that there are multiple possibilities to use the word.
Answer: The German verb "finden" has two meanings: (1), "find" something one looked for, (2), with an adjective, "think it is", (nothing to do with looking for something!), such as "das finde ich gut" = "I think that's good".
Therefore "jemanden besseren finden" is "find a better person" (by looking for them) , whereas "jemanden besser finden" would be understood as "prefer someone" (over someone else who was spoken about earlier).
In theory, "jemanden besser finden" could be "have less trouble in finding someone", but that's not what would be understood unless you put the stress, in speaking, on "finden" rather than on "besser".
Not being a native speaker of English, I am not sure whether "find" can be used in sense (2) as well, but I'm inclined to doubt it.

Pronoun modifying word after it?


sem_wait and signal handler

Question: Why sem_wait cannot be used inside a signal handler (particularly SIGSEGV signal which is per thread)? Can someone give me an example scenario where it will crash the application? I guess sem_wait is both reentrant and thread safe, so what is the problem here? Why is it not async safe?
Comment: I suggest you add which type of operations (threads, interrupts, exceptions,...) the semaphore should protect you from. This makes a big difference.
Comment: Related: https://stackoverflow.com/questions/14421951/guaranteeing-mutex-safety-with-async-signals/47304426 . I think `sem_wait(&x)` clashing with a `sem_wait(&x)`  on the same `x` is obviously an issue, but it should be doable with a different semaphore, even though that's technically still undefined behavior.
Answer: Async safe is a much stricter requirement than thread safe.  You can write thread safe code using primitives to protect global data with critical sections.  Signal handlers can't rely on this.  For example, you could be inside a critical section within sem_wait, and simultaneously do something that causes a segfault.  This would break the thread-safe protections of sem_wait.
Answer: sem_wait cannot be used in a signal handler for this reason:
Thread A is calls sem_wait on sem1. When thread A is done, it posts to sem1. However, before it can finish the signal is received and then handler is entered, calling sem_wait on sem1. Since A is the one that would post to sem1, the handler will never return and you will have deadlock. This is why it is a good rule to never wait on anything in a signal handler. The problem, ASFAIK, has more to do with deadlock than crashing.
Also, this violates the ideal purpose of a signal handler, which is to handle an external interrupt and then get back to what you were doing quickly.
Lastly, isn't it a better goal to rid yourself of the SIGSEGV instead of handling it?
Answer: What if the application receives a signal while the value of the semaphore is zero, and the thread that receives the signal happens to be the one which is supposed to increment the semaphore value (sem_post)? If you then call sem_wait in the signal handler, the process will deadlock, no?
Another argument could of course be that if sem_wait is not on the list of async-signal-safe functions, the implementation is free to invoke nasal demons.

sem_wait and signal handler


where is the second hard disk in my CentOS?

Question: yesterday I installed CentOS on my machine.There are two hard disk(SCSI) in my machine,but after installing,I used "fdisk -l"command to check disks only find one disk has been mounted.I also have check out the /dev directory,only find sda.Theorectically,there should exist sda and sdb under /dev.I have found some materials on the internet,maybe I must re-scan my disk,but how to re-scan? Anybody has encountered the same problem before?Or anybody could help me to use the second hard disk?
Comment: What type of disk controller are they attached to? (Don't say "SCSI." I mean brand and model.) Does the disk controller show these disks during the text phase of the boot process?
Comment: Yes,the boot process has detect both two hard disk.I don't know what type of disk controller are they attached to,where can I find this information?
Comment: Follow the disk control cable inside the computer from the disk drive to the board it attaches to. Read the brand and model off the board. If you trace it to the motherboard, this information will be in the motherboard's manual, but you could just give the motherboard brand and model instead.
Comment: The machine I used is a server,not a normal computer,so it may not be easy to open the machine and check the motherboard.Can I use some command to show this information?
Comment: You need special server screwdrivers, then? :) Well, as you wish. Try `dmesg | less`.
Comment: scsi0 : LSI SAS based MegaRAID driver ,I found this message.Does this help?
Comment: The actual drives are probably `/dev/sg[0-9]`. The drives are probably in a RAID1, so the OS only sees one usable device. Install and use `megacli`.
Comment: Excuse me,I'm newbie,could you give me more details how to install?
Comment: You said "the boot process has detect both two hard disk". Can you post an image of this, as well as the output of `fdisk -l` ?
Comment: @MarkPlotnick: I think we've got this solved already. See my answer.
Comment: The problem is solved.I have given the answer here:
[http://unix.stackexchange.com/questions/166774/use-megacli-to-add-a-new-hard-disk-to-existing-raid0-in-linux/167107#167107]
Answer: You have a RAID controller there, not a bare-disk SCSI controller. If you have it configured for a single RAID, it is going to present just a single SCSI device to the host system.
If your RAID controller is configured as RAID-0, the host OS will see a single SCSI device whose size is equal to twice the size of the smallest disk in the RAID. That is, if you have two 1 TB disks in the RAID, it will appear to be 2 TB to the host OS.
If it's configured as RAID-1 instead, it will appear to be the size of the smallest disk in the array, or 1 TB in our example configuration.
If that's what you want — that is, you want the disks to be in a hardware RAID — just set the RAID up in the BIOS, and format it in Linux as if it were a single disk. If you want to be able to configure the RAID from Linux, simply go to LSI's download page, tell it what kind of disk controller you have, and download the MegaRAID utility, megacli.
If you were hoping to be able to treat this RAID controller as a dumb SCSI disk controller, you're going to have to hack it.
Few LSI SAS RAID controllers support JBOD mode, which is what you'd need to get a RAID controller to export its connected disks individually as raw disks. (JBOD = Just a Bunch of Disks.) The best you can do with that type of disk controller is to create a single-disk RAID for each disk, which the controller will dutifully export as multiple /dev/sd[a-z] devices. This is not the same thing as JBOD, but from the host OS's perspective, it's close enough.
At the very low end of LSI's SAS RAID range, there are a few controllers like the 9201 that will run in so-called IT mode, or integrator mode. You have to reflash their firmware to do this; they will not do it out of the box. Having done so, your RAID controller appear to the host OS as a dumb SCSI controller, so your host OS will see the connected disks individually.
Comment: Thank you for your help.I have installed megacli,and used "MegaCli64 -pdlist -aALL"command to display disk information.I found one disk's Firmware state is online,but the other's Firmware state is unconfigured.Is that mean I need add the unconfigured disk to RAID,but how to add?Before yesterday,I have no idea about RAID.Could you give me more details?
Comment: @seabiscuitxf: Stack Exchange isn't an open-ended technical support forum. Ask one question, get one answer, accept one answer. If you have another question, ask it separately. RAID card configuration isn't on-topic here anyway.
Answer: You can try to run the command :
/usr/bin/scsi-rescan

(This tool is provided by the package : sg3_utils)
In order to scan the SCSI bus to see the storage
Comment: Running this command doesn't work,I still can not find the other hard disk.Any other way can I try?


Mic up a Barbershop conversation

Question: Looking for recommendations from the experts regarding a microphone.
The idea is to record a conversation during a barbershop haircut experience for a podcast idea.
To include some background noise,(clippers, trimmers, etc...) but the voices and conversation should sound clear.
I am very new at this, and am interested in setting up a recording rig for beginners. (I have a Mac computer)
Thanks for your help!
D.
Answer: I don't think you're going to be able to do this with a single mic.
Your best bet would be a lav mic on each of the talent & a hand-held boom to try pick out some additional detail.
Hair clippers are going to be about the same volume level as the speakers, so you may have to either use them only when someone else is speaking, to get some distance, or fake it & add the sound in post.
This doubles your potential to get any given line of dialog. If you can't hear it on one mic, you may be able to pick it out on another.
After other answers -
Lavs for 'drama' as opposed to 'interview' are always covered by clothing. They stick on with a little fluffy jacket [a sticky overcover, like a tiny dead cat] to prevent movement noise.
Using a hand-held boom rather than a fixed single mic means you have an experienced boom op working in tandem with your camera op, keeping it out of frame.
Answer: Another alternative might be to do a binaural recording.  This will allow you to capture all your sources and also get realistic spatialisation.  The downside is to get the spatial effect you need to playback through headphone.  Have a listen to this barbershop example to get an idea of the kind of results you can get - make sure you wear headphones:

A binaural recording is created by simultaneously capturing the sound as presented to a listeners ears and then playing the recording back to the same point, hence the requirement to wear headphones.  You can do the recording either with a dummy head and two microphones or with a pair of earbud microphones that you can wear in your ears. These are relatively cheap these days and create some good results.  More details are available here:
https://hookeaudio.com/blog/binaural-3d-audio/binaural-audio-complete-guide/
http://www.bbc.co.uk/blogs/researchanddevelopment/2013/03/listen-up-binaural-sound.shtml
https://en.wikipedia.org/wiki/Binaural_recording
Answer: The solution to this is very simple. Just put a shotgun or condenser mic on a stand above and in front of the talent in the chair. The barber will be behind the chair for the most part and this will allow you to pick up all voices and effects without having to worry about lav placement which would be exceedingly difficult in a scenario such as this.
One stand, one mic.
Sorted.
Lavalier use would not be recommended due to the following reasons:

Lav will likely be covered by clothing or sheets due to nature of the scenario.
Lav on the barber is likely to brush up against the seated talent. You would expect a lot of contact noise with the lavs and there would be significant bleed from the clippers into the lavs, outweighing any perceived benefit.

Mic up a Barbershop conversation


Tagging schema for CouchDB. Would this work?

Question: I am wondering if the following scenario would be amenable to CouchDB?  I am building a web-based flashcard application. Users can create flashcards (question on one side, answer on the other). Flashcard authors and other users can tag flashcards with keywords/phrases. Users can retrieve/generate virtual stacks of cards based on tags including support for boolean search (tagA AND tagB NOT tagC OR tagD). The DB will store cards (obviously) but also "documents" for users, tags and potentially virtual stacks of cards. I have read other SO questions concerning tagging within CouchDB but am wondering if the following would work or be to write intensive … (1) Card documents contain JSON array of tag strings assigned to that card, (2) Tag documents contain JSON array of cards using the tag, (3) tag documents also have element to store count of cards using that tag, (4) whenever a new card is created or tag is added to a card, the associated card identifier is also added to the tag document and the tag document's CardCount element is incremented. (5) Permanent views of cards indexed by card ID and of tags indexed by tag string are generated. If I know the card ID I can find the document quickly and can quickly get a list of associated tags. If I am given a tag string I can quickly find the tag document and then get a list of card IDs using the tag. For more elaborate boolean search I can retrieve a list of card IDs for each tag in the boolean search and then figure out the union/intersection/etc of these sets on the client. Does this seem reasonable?  I am aware of the fulltext indexing option using Lucene but would like to avoid this if possible. Thanks.
Answer: I don't see a good reason to make things that complicated - just create a document per card and add tags to these documents as you go along. Create a few stored views to count/show tags and their usage number when you need it.
this way you'll only need:
card document:
question
answer
tags[]
views:
show card info
show (perhaps most popular) tags
show cards per tag
As long as your documents are properly structured, you won't need full text search to handle everything.


What's the difference between a functional specification and a function model?

Question: What's the difference between a functional specification and a function model? Don't they represent the same thing - what the product will do?
Answer: A functional specification says WHAT a system or function should do. When you write a functional specification document you describe NEEDS without going into details of HOW you will achieve that.
A function model is a functional specification but now you already go into details about the HOW you will implement the NEEDS because you need to build a model. Also, the language in the function model is more restrictive and structured than what you might have available in the general functional specification concept.
To give an example, I could write a functional specification document to describe what a process should do with plain English, or I could model the same process with BPMN (Business Process Model and Notation) in a structured manner using standard symbols and conventions.
In other words, a function model is a functional specification, but a functional specification isn't necessarily a function model.
Comment: It depends where you draw the line between what and how. This allows you various depths of decomposition. But just to be clear, there isn't a clear line of demarcation between the two. It's usually a matter of "fixing down the details". If you have fixed something down, then most likely your decomposition ended up with a solution that satisfies the need or resolves the requirement. If you still haven't fixed down a solution, then you most likely need to decompose things into its components, look at them individually, reach a solution for each, and so on.
Comment: Thanks for your help, just one question, in a functional specification how do you decompose a requirement without specifying how?


How to snap the center of a face to another face?

Question: I have a sword handle and I want it centered below a completely differently object that has a face on the bottom with a vertex in the middle. I could also snap a central vertex to the other one but I don't know how. How can i do this?
Answer: You can use Vertex Snapping.

You can enable it by clicking on the magnet icon or If you wan't to use it temporarily, hold down Ctrl.
I would recommend setting the second option to active:

You use it by moving your object in edit mode Tab:
Comment: How? I need these to come together @GiantCowFilms
Comment: I rephrase: The center of the one i move meets at the vertex when doing it in object mode, how could i translate the whole thing in edit mode?
Answer: You can use a helper object as the target location agent:

Select the target face you want to snap to, CtrlH -> Hook to New Object, which will create a new empty object at the face center;
select the target part and keep the target face active, be sure to use Acive Element as Pivot point;
Turn on Snap tool, set Target Element to Vertex, and Snap Target to Active.
Press G to move the selected part towards empty, Enter when it was successfully snapped as expected.
Switch to Object mode, delete the empty, as well as the new created Hook modifier.

As shown in the GIF below:

Tip:

When creating the agent object, you can also do it by first ShiftCto snap 3D Cursor to the face, then ShiftA -> Empty. No Hook modifier will be created that way.
When snapping, you may want to turn off the Limit Selection to Visible button (as I did in the GIF), or simply press Z to switch to Wireframe display mode. in order to see through it.


solo mining payout maturity vs pool mining

Question: When I mine in pools there are unconfirmed coins, but it seems unconfirmed times are far less than immature status in *coind wallet app... Any advice how I can get my coins quicker instead of waiting for 100 blocks to pass?
Comment: "Unconfirmed" and "immature" mean [rather different things](http://bitcoin.stackexchange.com/questions/9751/what-are-the-categories-of-a-transaction-and-what-do-they-mean), and I'm having trouble understanding which you mean.  Can you edit your question to clarify?  It would be most helpful if you can be very specific about the behavior you are seeing in each case.
Comment: well *coinapp lists the coins as immature when solo-mined, whereas there are unconfirmed transaction, which I would guess require less confirmations?
Comment: To comment on your link, then why is it that pools are able to spend there coins much more quickly??? I am asking why does it take much longer to gets coins available when solo mining???
Comment: "Whereas there are unconfirmed transaction, which I would guess require less confirmations?"  I'm afraid I don't understand what unconfirmed transactions you are talking about.
Comment: As for how pools can make payouts that don't need to wait for maturity, the most likely way is that the pool operator has a reserve of coins, perhaps collected from the operator's share of previous blocks, and the payouts are made from the reserve, rather than directly from the newly mined block.  But without specifics it's hard to be sure what's going on with your particular pool.
Answer: I'm still not completely sure that I am understanding your question correctly, but let me take a guess.
As you know, when a block is first mined, the coins from its block reward are considered "immature".  They may not be spent until 100 blocks later, or in other words, until the coinbase transaction has 100 confirmations.
Now, there are a couple of ways a pool can make payouts to its miners.

When creating the block template for mining, include a coinbase transaction that pays appropriate amounts to all pool members who are due to receive payouts.
Include a coinbase transaction that pays its coins directly to a wallet controlled by the pool operator.  The operator then makes additional transactions for payments from that wallet (or another wallet he controls) to the pool members.

For a pool that uses method 1, members will receive payouts that are immature, and they will have to wait 100 blocks to spend them.
For a pool that uses method 2, if the pool operator has a sufficient balance in his wallet, he can make the payouts right away by using coins that have been in the wallet for a long time already, long enough that they have become mature.  In this case, the payouts are ordinary transactions; they confirm like any other, and the miner can spend them immediately (or perhaps after 1 confirmation, depending on the requirements imposed by her wallet software).
Method 2 is certainly more convenient for the miner members if all goes well, but it has some other problems.  In order to maintain a sufficient balance, the pool operator has to keep some of his own coins in the wallet at all times.  These coins are then tied up there, which may be inconvenient or costly for the operator.  Also, if the block reward is paid directly to the operator's wallet, there is a chance he will decide not to make the payout to members, but instead will keep the coins himself.
Comment: @JoePineda: The 3rd party lender is taking on another risk, too: the block could be orphaned which would make the immature coins he's holding valueless.  Of course, he could control that risk by waiting for some small number of transactions.  But in any case, it seems like a lot of trouble for someone to get their coins 16 hours sooner.
Comment: I can imagine a 3rd model (possible new business model?): trusted party receives the immature coins on behalf of the miner in a multisig transaction, then relays to miner 99 cents to the bitcoin in another multi-signed transaction, albeit using matured coins. When all parties are satisfied they sign both trans, so funds are unlocked: pool operator offloads hoarding risks to 3rd party, who gets a small commission, whereas miner gets spendable coins.
Comment: Good point. Might be a bit more worth for alt-coins that have a much longer maturation time (as Primecoin's 2+ days) but at that point it'd probably be easier to just ask for someone to lend you the amount in altcoins and paying interest later.


make server auto-append @domain.com to ftp account

Question: I have a client who, printed 10,000 advertisements with a specific password for an FTP account written on it lets say: horses1, for many reasons I have had to migrate her over to a new host, she chose mediaTemple, and bought an account.
The Login is now email@example.com, which is a problem, becuase of all her print ads.
I'm thinking this can be fixed with mod_rewrite and htaccess, but I'm pretty sure apache2 and ftp are different programs... I'm really screwed if I cant fix this....
EDIT:
is there a way to create an FTP user alias?
Comment: advertising ftp account information in print ads? That's a first
Answer: Apache is just a HTTP server. But maybe mod_ftp and its StripHostname option can help you.
Answer: Apache is an HTTP server (which, due to being magic, can be made to act like pretty much any kind of TCP/IP server you like, but almost never is) so won't be responsible for the FTP.
The FTP will almost certainly be supplied by a different server, and you'll need to find out what that is and what level of configuration control you have on it before you can proceed any further.
Answer: FTP sites that need @domain are almost always shared hosts.
You will not be able to make configuration changes to make it work without.


Recognise this thing found in beach?

Question:
Kindly help me identify this thing found in beach
Chennai, India . Size would be just 1.5 cm in diameter..across maximum size. It's shelled and has something inside it. It make a small noise when it is shaked completely closed on all sides. It's hard surface ( but " fine" texture ) to touch.
Comment: Thanks for the edits. Could you explain what you mean by "fine"? It's not quite clear to me what you mean in this case. Thanks.
Comment: Did you ever find out was this was? We just found one in Florida.
Comment: give us a cross section. describe the material, is it mineral or organic? is it an egg? google lens app will recognize a HD photo if there are other images of the same thing on google images. I just put that specific image through google lens and it returned "chennai, india"...
Answer: I believe it's the seed of a Guilandina bonduc shrub. The seeds are known as nickernuts or sea pearls, and can be found washed up on beaches throughout the tropics. The seeds are often used as counters in the traditional board game manuals.
Comment: Welcome to the site. Please take a [tour] and visit the [help] for more information on the Biology Stack Exchange and what we do here. Please note there is a section in the help on what makes a [good answer](https://biology.stackexchange.com/help/how-to-answer). We particularly value answers here that contain references that support the answer. To improve your answer you could provide links to the shrub and images of the plant and seeds (try wikimedia/wikipedia and iNaturalist) for these in your answer.

Recognise this thing found in beach?


Best way to determine positivity of matrix

Question: I have a matrix $$A=\frac 12 \begin{bmatrix} 1+k+c &m&0&n+b \\
m &1+k-c&n-b & 0 \\
0 & n-b&1-k-c & -m \\
n+b & 0 & -m & 1-k+c\end{bmatrix}$$ where $0 \leq b \leq 1, k=\sqrt{1-b^2}$ and $$c=\frac {v-k}{w}$$ where $v \leq w(1-k)+k$ and $0 \leq w,v \leq 1$. Here $m$ and $n$ are free parameters. I'm trying to find a pair of real numbers $(m,n)$ which ensure that $A$ is positive semi-definite. For a fixed $b,k,c \in \mathbb R$, what is the best way to determine some $m,n$ which make $A$ positive semi-definite? I've attempted calculating the eigenvalues with Mathematica but they are far too complicated.
Comment: This doesn't look fun. You can use Sylvester's criterion (https://en.wikipedia.org/wiki/Sylvester%27s_criterion) to write down inequalities and see if they are satisfied. If you are ready to settle down for positive definite matrix, you'll get four polynomial inequalities from the four leading minors. If you really want only positive semi-definiteness, you'll need to consider all the principal minors...
Comment: You can completely remove $v$ and $w$ from the problem's description because if the matrix is positive semi-definite then the third diagonal term implies $k\le1-c$ and this implies that there exists $v, w\in [0,1]^2$ such that $k = v - c w$, because $0 - c \cdot 0 \le k \le 1 - c\cdot 1$. Furthermore $v = c w + k \le (1-k) w + k$ is satisfied.
Answer: Drop the positive factor $\frac12$. By permuting the rows and columns of $A$, we see that $A$ is similar to
$$
B=\begin{bmatrix}
1+k+c &0 &m &n+b\\
0 &1-k-c &n-b &-m\\
m &n-b &1+k-c &0\\
n+b &-m &0 &1-k+c
\end{bmatrix}.
$$
Obviously,

when $1-k-c<0$, $B$ is not positive semidefinite;
when $1-k-c=0$, $B$ is PSD if and only if $m=0,\ n=b$ and $(1+c)^2-k^2\ge(n+b)^2$.

Now suppose $1-k-c>0$. Then the leading principal $2\times2$ submatrix $M=\operatorname{diag}(1+k+c,\ 1-k-c)$ is positive definite and its Schur complement $S$ is given by
$$
\begin{bmatrix}
1+k-c &0\\
0 &1-k+c
\end{bmatrix}
-
\begin{bmatrix}
m &n-b\\
n+b &-m
\end{bmatrix}
\begin{bmatrix}
1+k+c &0\\
0 &1-k-c
\end{bmatrix}^{-1}
\begin{bmatrix}
m &n+b\\
n-b &-m
\end{bmatrix}.
$$
Since $B$ is congruent to $M\oplus S$, the matrices $B$ and $A$ are PSD if and only if $S$ is PSD, i.e. if and only if the two diagonal entries and determinant of $S$ are nonnegative.
Answer: By changing the order of the coordinates $\left({x}_{1} , {x}_{2} , {x}_{3} , {x}_{4}\right) \mathop{\longrightarrow}\limits \left({x}_{1} , {x}_{4} , {x}_{2} , {x}_{3}\right)$, we see that the problem is equivalent to
the positivity of the matrix
$${A'} = \left[\begin{array}{cccc}1+k+c&n+b&m&0\\
n+b&1-k+c&0&{-m}\\
m&0&1+k-c&n-b\\
0&{-m}&n-b&1-k-c
\end{array}\right] = \left[\begin{array}{cc}K&m D\\
m D&L
\end{array}\right]$$
As $K$ and $L$ are the matrices of the same quadratic form restricted to
two dimensional spaces, it follows that a necessary condition is that $K$ and
$L$ are positive semi-definite. Reciprocally, if $K$ and $L$ are
positive semi-definite, we can choose $m = 0$ and ${A'}$ is positive semi-definite (if we only want one possible value of $m$).
The non-negativity of the four diagonal elements is equivalent to $\boxed{\left|c\right|  \leqslant  1-k}$
(because $k \in  \left[0 , 1\right]$). We suppose that this condition is satisfied.
The non-negativity of $K$ and $L$
is then equivalent to their determinant being non negative, i.e.
$$\left\{\begin{array}{rcl}{\left(1+c\right)}^{2}-{k}^{2}& \geqslant &{\left(n+b\right)}^{2}\\
{\left(1-c\right)}^{2}-{k}^{2}& \geqslant &{\left(n-b\right)}^{2}
\end{array}\right. \quad  \Longleftrightarrow  \quad  \left\{\begin{array}{rcccl}{-b}-\sqrt{{\left(1+c\right)}^{2}-{k}^{2}}& \leqslant &n& \leqslant &{-b}+\sqrt{{\left(1+c\right)}^{2}-{k}^{2}}\\
b-\sqrt{{\left(1-c\right)}^{2}-{k}^{2}}& \leqslant &n& \leqslant &b+\sqrt{{\left(1-c\right)}^{2}-{k}^{2}}
\end{array}\right.$$
We see that ${A'}$ can be non-negative if and only if we can choose $n$ in the intersection of these
two intervals, that is to say if
$$\boxed{{-b}+\sqrt{{\left(1+c\right)}^{2}-{k}^{2}}  \geqslant  b-\sqrt{{\left(1-c\right)}^{2}-{k}^{2}}}$$
Then $n$ can be any value between
$$\max  \left({-b}-\sqrt{{\left(1+c\right)}^{2}-{k}^{2}} , b-\sqrt{{\left(1-c\right)}^{2}-{k}^{2}}\right)$$
and
$$\min  \left({-b}+\sqrt{{\left(1+c\right)}^{2}-{k}^{2}} , b+\sqrt{{\left(1-c\right)}^{2}-{k}^{2}}\right)$$
Edit: Possible values of m
Assuming $K$ and $L$ are positive semi-definite by the above conditions,
the set of $m$'s for which ${A'}$ is positive semi-definite can be studied like so: let
$${Q}_{m} \left(X , Y\right) = \left[\begin{array}{cc}X^\top&Y^\top
\end{array}\right] {A'} \left[\begin{array}{c}X\\
Y
\end{array}\right] = {X}^{\top } K X+2 m {Y}^{\top } D X+{Y}^{\top } L Y \qquad  X , Y \in  {\mathbb{R}}^{2}$$
As $m \mapsto  {Q}_{m} \left(X , Y\right)$ is an affine function, the set of all $m$'s such
that ${Q}_{m} \left(X , Y\right)  \geqslant  0$ is an interval of $\mathbb{R}$ containing $0$.
It follows that
$$I = \left\{m \in  \mathbb{R} \colon  \forall  X , Y \colon  {Q}_{m} \left(X , Y\right)  \geqslant  0\right\}$$
is also an interval containing $0$, because it is the intersection of such intervals, and by remarking that
${Q}_{{-m}} \left(X , Y\right) = {Q}_{m} \left({-X} , Y\right)$ we see that $I = \left[{-M} , M\right]$ is
symetrical around $0$.
A further reasoning shows that ${A'}$'s determinant must be $0$ when
$m = \pm  M$ because otherwise the eigenvalues would all be positive and a small
change in $m$ would not change the positive semi-definitness of ${A'}$.
I used sympy to compute (using ${k}^{2} = 1-{b}^{2}$)
$$\det  \left({A'}\right) = {m}^{4}+{m}^{2} \left(2 {c}^{2}+2 {n}^{2}-4\right)+\left({-4} {b}^{2} {n}^{2}+8 b c n+{c}^{4}-2 {c}^{2} {n}^{2}-4 {c}^{2}+{n}^{4}\right)$$
It follows that $M$ must be a positive root of this biquadratic function, which leaves only few choices.
Comment: @Alex Whatever the value of $m$, $A^\prime$ cannot be positive semi-definite if $K$ and $L$ are not positive semi-definite. On the other hand when they are, the value $m=0$ always works. If $K$ and $L$ are positive definite, then at least a neighbourhood of $m = 0$ works, but my post does not study the set of possible values of $m$.
Comment: Great answer, thank you.
Comment: What about when ${-b}+\sqrt{{\left(1+c\right)}^{2}-{k}^{2}}  <  b-\sqrt{{\left(1-c\right)}^{2}-{k}^{2}}$?
Comment: @Alex Then whatever the value of $n$, one of the matrices $K$ or $L$ is not positive semi-definite. Hence $A^\prime$ cannot be positive semi-definite.
Comment: @Gribouillis But what if you take $m \neq 0$? Why do you assume that $m=0$?
Comment: @Gribouillis Thanks for clarifying!
Comment: @Alex See my edit above about the values of $m$.


Where could I find biology-specialized transcription services for my conference?

Question: I'm a conference organizer for various conferences in the field of biology. Just recently, I stumbled upon this Nature article: https://www.nature.com/articles/d41586-021-03487-2 and I have difficulties in finding biology-specific expert transcription services for my conferences. The generally well-known transcription service providers do not have people available that are familiar with the ubiquitous scientific terminology used by speakers on my conferences. Where could I find scientific experts that are capable of transcribing terminology-heavy talks across various fields of biology and willing to do so?
Comment: I'm voting to close this question because it is not about a problem in biology.
Answer: Short answer
To provide accessible conferences for the hearing impaired, automated artificial intelligence (AI) based captioning services are a good and affordable substitute to live captioners these days.
Background
I took the liberty to outsource this question to a giant in the field I work in (Auditory Neuroscience and specifically auditory prosthetics) and they wrote me the following back, and I quote (web links and comments in square brackets added by me):

'We previously used a remote live transcription service that cost
about $5000 [USD] for the [conference] week.  But the AI based automatic transcription
service is now so good we didn't think there was enough difference in
quality to justify the expense of live captioners.  The institutional
version of Zoom has AI captioning built in – there's a cc button at
the bottom of the screen, and the captioning built in to youtube is
excellent for prerecorded videos.  We used these two for the recent
[conference].'


Restore Windows Server 2008 R2 from a Windows Server Backup (.vhd)

Question: I have a crashed (BSOD) Windows Server 2008 where i luckily have a backup from the night before the crash. This backup was made by using Windows Server Backup, doing a full system backup on a NAS. This creates a backup as 2 large .vhd files and some other small files in \192.168.56.14\administrator\WindowsBackupImages\Server1\date.
When I boot up the server I can do f8 and go to system repair and get the Windows System Recovery tool. Since the backup is not on the machine, but an external harddrive, it is expected the backup is not found. I've then tried to copy the backup to an external USB harddrive, attach it to the computer, with no luck, and also specify the network location in the recorvery tool. When using the network location I'm prompted for username and password, so I'm sure the NAS is found. I would expect the backup is being listed, but nothing is on the list in any of the cases.
What am I missing or doing wrong?
Really appreciate the help.
- Soren
Comment: IF you have a BSOD you should diagnose the BSOD before you restore, otherwise you run the risk of restoring to a system that will simply die again
Answer: You can start system with Windows Server Installation DVD , choose restore a Backup and select the backup image on the NAS .
Comment: I think the OP is saying the he's tried that.
Comment: Yes, apperantly windows recovery needs to be startet from the cd and not by f8. Got it working. Thx!
Answer: Having been through this very thing myself recently I can tell you to try 3 things:

Make sure you have a DHCP server set up on the network. When trying to restore Windows from a backup located on a network drive, Windows (of course) needs TCP/IP connectivity in order to access the network and will need an ip address and subnet mask on the same network where the backup exists. In the repair/restore wizard you can bring up a command prompt (I don't remember the actual screen or option where this is available) and run ipconfig to confirm/verify that a valid TCP/IP configuration has been obtained.
After verifying a valid TCP\IP configuration, if prompted for credentials, use "anonymous" for the user name (without the quotes) with a blank password. This assumes that the NAS is running some Unix/Linux variant as it's OS.
When typing in the path to the backup make sure to type the full path to the WindowsImageBackup folder. Typing the path to the parent share is not enough as it appears that the backup routine will not traverse subfolders looking for a valid backup image.


When you replace a stage in the Opportunities section why does it remain in the active list?

Question: After I have replaced some stages with new stages they are still listed under active.  When I tried the change with a test record in the sandbox it has been updated with the new stage, so it works.  However, the old stage is still in the active list.  Can I delete it? What do I have to do so all the old stages are replaced with new ones and only the new ones are available as options when new opportunities are created?
Answer: To ensure the stage names are not used you will need to replace them. You can also remove them from being available to pick by editing the Sales Processes.
To move the Stage to inactive, simple click "Del" next to the stage...

Sales process stages, for example, Prospect, Proposal. This picklist
  also affects the Type and Forecast Category values of an opportunity.
  Specifically, changing the Type or Forecast Category for a Stage
  picklist value updates all opportunities that have that stage value.
To edit, from the management settings for opportunities, go to Fields,
  and then click Edit next to Stage.
To deactivate an active stage,
  click Del next to the stage. On the mapping page, don't replace the
  stage with another existing value; just click Save. The stage now
  appears in the Inactive Stage Picklist Values related list. The stage
  is no longer in use but may exist in older opportunity records.

https://help.salesforce.com/apex/HTViewHelpDoc?id=picklists_with_additional_information.htm&language=en


Block prescence from a user auto subscribed through Google Talk

Question: Google Talk has a feature that auto subscribes some contacts that I have been talking with. It's a ok feature, but sometimes I'm not interested in having the person view my online status. How can I prevent this? Do I need to block him or is it good enough to remove him from contacts?
Answer: GTalk in Gmail
You can't set individual available/invisible status for each user in your list. What you can do is either block/unblock individual users whenever you need to (this means they can't contact you while they are blocked), or turn off the auto subscribe feature and manage the list manually.
To turn off auto subscribe:

Log in to Gmail.
Click the gear icon at the top of any Gmail page.
Open the Chat tab, and select Only allow people that I've
  explicitly approved to chat with me and see when I'm online.
Click Save Changes.

From the man page: http://www.google.com/support/chat/bin/answer.py?answer=29795
To block/unblock a user:

Blocking a contact:

Type the name of the contact you wish the block into the Search box
  at the top of the chat list.
In the box that appears, click Chat to open a chat window with
  that user. They will not be notified unless you type a message into
  that window.
In the chat window click Actions menu.
From the menu, select the option to Block the specific contact.

Blocking a contact will block them across all of Google's network.

Unblocking a contact:

Type the name of the contact you wish to unblock into the Search
  field at the top of the chat list.
In the box that appears, click Unblock (or uncheck the
  Block option in Gmail).

Alternatively, you can unblock a contact through the
  Options/Actions menu at the bottom of any open chat window.

From the man page: http://www.google.com/support/chat/bin/answer.py?hl=en&answer=161879
Comment: Thanks for your quick answer @Alex. So if I only remove a user, he will still see my online presence?
Comment: Remove as in delete it from the contacts? No, he will not. If you just select **Never show**, which means "I don't want to see him in my list", he can still see you online.


What is the difference between shawarma and gyros?

Question: I see both of these terms used in restaurants that seem to specialize in meat on a vertical rotisserie served in a pita sandwich. I'm not clear on whether there is a difference between the two or if they are just colloquial names for the same thing.
Answer: They're rather different.
Gyros are Greek in origin. They are simply meat, tomatoes, onion, and tzatziki sauce on pita. In Greece the meat is typically pork (never had one). In America, specifically here in Chicago (their local origin), the meat is a combination of beef & lamb.
Shwawarma is Middle Eastern in origin. The possible toppings are much more diverse, and can include: tahini, tabouli, fattoush, cucumber, and hummus. Tzatziki isn't typically used, at least not in America. The meat is also never pork, it can be lamb, beef or chicken.
They owe their similarities to their common Turkish ancestor the doner kebab.
See also:

Doner kebab
Gyros
Shawarma
Comment: additionally, the spices in the meat are totally different.  Shwawarma tends to be spicier than gyros. Shwawarma also tends to be discreet pieces of meat instead of the roast loaf gyro meat.
Comment: @sarge_smith: All of the Middle Eastern shawarma I have eaten (at least in the Levant) have been of the "roast loaf". I will agree, however, that the meat is more chunky/coarsely processed than the Greek variety.
Comment: They're still tightly stacked together on a spit but it's usually marinated chunks of meat, not a mince loaf. My understanding is that doner, shawarma and gyros are all traditionally stacked meats. Tomato, parsley, lettuce, onion, tahini and picked turnips is a pretty standard set of toppings for shawarma.
Answer: As sarge_smith hinted at in his comment to hobodave, at least from the gyros and shwarmas I've had.

Gyros are made from a loaf of ground meat, onions and seasonings, spit roasted.  (this might be a regional thing, though)
Shawarmas (and doner kebab) are cuts of meat, marinated and stacked, then spit roasted.

As you slice the shawarma meat off the cone, you're cutting across the stacked slices, so it'll end up falling into lots of smaller bits, while the gyro meat is larger slices, but still tender because it's ground meat.

Gyros tend to have more "mediteranian" herbs (oregano, marjoram, thyme, rosemary)
Shawarmas tend to have more "middle eastern" spices (cardamom, allspice, cinnamon, cloves, coriander seed, tumeric)
Either one might have cumin, pepper or oregano, and they'll both have garlic.

I don't know how much of it's a regional thing (as I think I've only had shawarmas twice in the US), but when we used to get shawarmas in the Netherlands, they were served with a garlic yoghurt sauce that was similar to tzatziki, but didn't have cucumber or herbs in it.  They were also served inside pita pockets (with shredded carrot, lettuce and tomatoes) as opposed to wrapped in a flatbread.
Comment: Shawarma is traditionally wrapped in flatbread, usually served with tahini or hummus. In Australia, it's Turkish doner kebabs that usually come with the garlic sauce.
Answer: I have many times been to Greece and have had gyros there and they are not ground meat but just like the shawarma it's pieces of meat stacked and roasted. Difference is just like the others say spices and the toppings that go into the pita. Also gyros in Greece are almost always pork meat.
Answer: Greek gyros is always cuts of meat, not homogenised with herbs etc. like a donner kebab, and comes as either pork, or less commonly, chicken.
In the UK what is described as 'chicken donner' or 'chicken shawarma' is almost always very similar to what is called 'chicken gyros' in Greece in terms of the meat and its appearance, though spices etc are different and it will probably be served with different salads.
Answer: I'm a chef, trained by "off the boat" greeks, and gyro is lamb/beef..not pork, and I find it hard to believe that the Greek family that I was trained under would be making gyro wrong.. American style is typically in a "cone" meat form, and Greek style is stacked/layered meat, then sliced as the others said..souvlaki is typically pork, which is different than gyro..
Comment: Greek gyro is mostly pork. Depending on the region you might also find chicken gyro.
Answer: Gyros are not usually pork. in Greece, they are wrapped lamb and beef with proper spices skewered and roasted. In America, I have made them with ground lamb and hambburger.
Comment: I'm Greek and have yet to eat a gyros in Greece that was NOT made with pork. Now, if I was in Turkey it would be lamb/ beef but a proper Greek gyros will be pork.


TL072 supply voltage +-4.5 V vs. +-9 V

Question: I have preamp circuit from an earlier project that is based on TL072 opamps. I have been using it with a 9 V (+-4.5 V) power supply, but now I have the chance to give it a +-9 V supply. The signal that goes through it is a small audio signal, probably never larger than 1 V. Does it make any sense to bother giving it a larger supply voltage? (I know that the minimum supply voltage for this IC is 7 V (+-3.5 V) by the datasheet.)
Comment: Need a schematic with gain to answer this question
Comment: That's too small a voltage for the TL072. If the signal you are processing is small, I would use a lower voltage rail to rail op amp.
Answer: The datasheet I have for TI's TL07x series tells me that the minimum supply voltage is 10V(+-5V).
That, combined with the common-mode input range and max output swing, means that you're lucky your existing circuit works at all (and might not work if you drop in a different TL072 from a different production batch).
If you have 18V(+-9V) available I would definitely make use of it.
Comment: Thank you for the answer. It feels good to have been lucky :)
Answer: TL7x work just fine at 4.5/9V (as used in countless guitar effects for decades without problems). As per the datasheet, the 10V min refers only to packages labelled NS or PS.
Comment: Thanks for deciding to share your knowledge with others.   In your answer you provide useful information about the voltage range of the TL072 part, but it looks like that information is in relation to another answer, rather than the question itself.  Suggest you either add this as a comment on the previous answer, and extend your own answer to also directly answer the question.  Have a read of https://electronics.stackexchange.com/help/how-to-answer for some guidance.  Once again, welcome!

TL072 supply voltage +-4.5 V vs. +-9 V


Withdrawing my application for a research fellowship when getting a job elsewhere

Question: While waiting for the outcome of my application for a research fellowship, I was offered a job at a university in another country. It turned out that my fellowship application passed the first stage, but after some consideration, I decided to accept the job offer and not to pursue my fellowship application any further. My question is, should I tell the secretariat immediately that I would like to withdraw my application or should I just let the deadline for the second stage of application pass without informing them anything? Also, what should I say to my potential collaborators?
Answer: It is customary to withdraw your application(s) as soon as you have accepted a post elsewhere. By doing so you increase the chances of fellow applicants to be shortlisted / admitted to the next stage.  Also, non-attendances and late withdrawals create a considerable mess at the interview stage, and it is better not to annoy your prospective colleagues, with some of which you may need to collaborate in future.
Actually, prompt communication is typically a win-win situation, and unnecessary delays in communication usually give nothing good to anyone (despite maybe some illusion of control).
Comment: Thank you. Could you answer my second question as well, please?
Comment: @adipro - If there is some reason you are hesitating to let them know as well that you have accepted a post elsewhere, please explain.
Comment: @aparente001, I am not hesitating; I just would like to know what is normally said.
Answer:
I am not hesitating; I just would like to know what is normally said.

How's this as a starting point?

Dear [name of collaborator],
I wanted to let you know that I've taken a position at __________, and have withdrawn my application at _________.  I took this decision for a variety of personal and work reasons, and I think it's going to be a positive move for me.
I hope that we can still collaborate in future, albeit perhaps in a different way than we were hoping to do.  OR This means that I won't be able to work on any collaborations with you in the foreseeable future, but I wish you well in your project.

What will help you write this letter is the conviction that if you were in their shoes, you would want to be notified, the sooner the better.
Feel free to provide more information about your situation if this draft doesn't suit your needs.


How to create --link for 2 containers to link to each other?

Question: If I have 2 containers, "app_server" and "varnish_server", how can I create --link so that app_server will have a record in the "hosts" file that links to the varnish server, and the varnish_server will have a record in the "hosts" file that links to the app_server?
Answer: This is currently not supported by docker directly. You need to have a third party to whom the two containers tell about their existence and can ask for the other:
<code>       [service discovery/name service]
            ^                    ^
            |                    |
            v                    v
       [app_server]  <===> [varnish_server]
</code>
You start the service discovery container first, and link the app_server and varnish_server to that.
Example using etcd on linuxfiddle: http://linuxfiddle.net/f/e124aeeb-2c39-472d-932e-971f092bb6db


How to subscribe to notifications or alerts via RSS feeds?

Question: How would I go about adding the functionality of subscribing to notifications or alerts via RSS feeds for certain pages/documents or images?
Answer: You can create custom feeds using the views. This can contain any fields as you want. And use all the filters, relationships and contextual filters to get the exact feed that you are looking for. The you can place feed link where ever you want it to be seen. This would be done using blocks or may be simply by adding it to the page.
Comment: Thank you!
A new feed (sing views) would need to be created for each user, or by placing a feed link everywhere, the site users will be able to choose what they subscribe to?
Comment: it depends on the kind of setup you want. could you let me know the exact use case.


Why can't parameter types be loosened in overridden methods?

Question: This code is invalid:
interface Foo
{
    public void foo(final String string);
}

public class Bar implements Foo
{
    // Error: does not override.
    @Override public void foo(final Object object)
    {
    }
}

Because every String is obviously an Object, I would expect this code to be perfectly fine: any code that depends on giving foo() a String would stil function when foo() actually takes an Object.
It appears, though, that method signatures have to be identical to those of the methods they're overriding.  Why?
Comment: This [question](http://stackoverflow.com/questions/2995926/why-is-there-no-parameter-contra-variance-for-overriding) seems related...
Answer: What if
interface Foo
{
    void foo(String string);
    void foo(Object string);
}

Then which method is overridden by Bar?
Comment: The second one, obviously.  I'm sorry; I'm missing the point.
Comment: Let's assume compiler accepts constructions like you did in your example.
But now you added a method `void foo(Object object);` to the Foo class.

And `Bar.foo` now overrides it, instead of `void foo(String string);`. It will just break  the whole code and lead to unpredictable results.
Answer: 'loosening' as you put it should not impact on someone expecting to use your interface defined method in a particular way, as any methods you call on that object should in theory be callable on the specified object, but Eugene's point stands, becaause there would probably be a little compiler headache to deal with in determining what method you actually intended to override if you just vaguely want to stick to the interfaces specification. Also, why whould this be desireable if you are going to stick to moving up the inheritance heirarchy, because surelely you will be able to do all you want to the thing further down the hierarchy as to 'Object' for example? Possibly casting inside your method would solve your problem? If it is possible to do what you want to do, you will also probably start treading on the polymorphism paradigm.
Answer: I think this is a classical contravariance issue. Your interface requires a string to be passed as parameter, you want an implementation that accepts an object (because, after all, strings are also objects).
The problem is that if you allowed that, then you could no longer guarantee that the parameter being required by the interface is a string or any one of its ancestors. You might just as well pass any object to your implementation and you would be breaking the contract of the interface, putting in danger the type safety and type coherence of your design.
You do have options, though:
public class Bar implements Foo
{

    @Override public void foo(final String object)
    {
    }

    public void foo(final Object object)
    {
       foo((String) object);
    }
}

By this, you would be ensuring that object is actually a string, making possible to the type system to check that you are actually complying with the interface contract established in the method signature.
Is there a particular scenario in which you would consider your contravariance example to be requirement?
Answer: It's just the constructs of the Java programming language. The structure of Java programs will grow on you. So for now just try and adjust.


If I put multiple isolated DC/DC converters in series, can I add their isolation voltages?

Question: Suppose I have a DC/DC converter that's rated for 2250VDC isolation for one minute. If I put two of these devices in series, making sure to maintain proper clearances on my PCB, do I get an effective isolation voltage of 4500VDC for one minute? Am I still limited to 2250VDC? Do I get something quantifiable in between?
Answer: If the insulation on one fails, the remaining one will cop 4,500 VDC which will definitely make it fail.
There's also no guarantee the voltage will spread evenly across them - the insulation on the devices might be measured in MΩ, but if one device is 1 MΩ and the other is 3 MΩ the voltages across each will be 1,125V and 3,375V and you are in for a bad day.

It also bears mentioning that the 2,250 VDC one minute rating is a withstand rating, not an operating rating. You should not plan to apply this voltage to your device except to withstand the consequences of a malfunction.
Applying 2,000V on a regular basis is likely to cause cumulative damage. For example, "Megger" (hi-pot) testing a 440V cable using a 2,000 VDC test source is considered a good way to find cable insulation faults because it will blow through weak insulation and make minor faults into severe faults (which are easier to detect.)
Comment: For fun, here is what happens when you put two 250kV AC circuit breakers in series to get a 500 kV rating, and one of them fails: http://teslamania.delete.org/frames/longarc.htm#500_kV_Switch
Answer: In general yes. assuming your two systems have same impedance, then the voltage drop across each will be 1/2 for same series current. this is ohms law.
More specifically, there is a lot more to consider, the least of which is if your system will still operate properly if it is floating (only one of the two systems will be referenced to ground!).
Comment: "Assuming the two systems have the same impedance" is the problem. The insulation resistance is specified to be "high" - megohms - but the *exact* value of the insulation is not guaranteed; neither is the strength of the insulation **from unit to unit**.


Symbol for cyclic quadrilateral

Question: Is there a symbol to denote, say, $ABCD$ is a cyclic quadrilateral? (I very much doubt it.)
Answer: $\square$ denotes a square. $\blacksquare$ is used to end proofs, mostly. It's probably not standard but you could use sonething like: $$\bigcirc\hspace{-4.4mm}\raise{-0.5mm}\square$$ <code>\bigcirc\hspace{-4.4mm}\raise{-0.5mm}\square</code> to denote them, if many of them are talked about. Just present the symbol meaning first.  Just put in as a definition of a newcommand in your pdf/book/article etc., so you can refer to the symbol easier. This is more of a LaTeX stackexchange question, as far as creating it.

Symbol for cyclic quadrilateral


Can't stop Xcode app execution in simulator?

Question: Has anyone seen this before?  Ever since I upgraded to Xcode 4.5.2, sometimes when I press Command-R to run an app in the simulator, the status in Xcode says "Running", but the app never starts in the simulator.  When I press Command-., it says it is trying to stop, but never stops.  Xcode basically is hung, I have to force quit.  Hopefully there is a simple solution?
Answer: Try opening the simulator and deleting the application. Also try closing and re opening xcode. If this does not try restarting your computer. If you are still having the problem then you will have to uninstall xcode and reinstall it. (I have had that problem multiple times)
Answer: Strange, but works. Click on the 'iOS Simulator' icon in the Dock (https://stackoverflow.com/a/10277189/1514970).
Answer: This tends to work.  I use Serge's find to click the icon in the dock - this then "wakes up" XCode to the fact that it needs to attach to the app in the simulator.  Even though the attach never happens, a Command-Period at this point stops XCode without hanging it and having to do a Force Quit.  Then, I can close down the Simulator, and do Command-R to run from XCode.  This relaunches the simulator and attaches to the app process.


What are some resources for writing professional philosophical research articles?

Question: I am a philosophy graduate student. I have written several papers, but I've never been able to publish them, and they all got rejected. Therefore, I started to think that my skills were not good enough. What is the best resource for writing philosophical research articles to improve my research skills?
Comment: It is difficult to imagine something more specific than reading papers and books and support from your teacher.
Comment: As @MauroALLEGRANZA says: this is the sort of thing you should talk your advisor about. We neither have your writing samples nor your reasons for rejection so it is difficult to see what there is to improve in the first place
Comment: @user466441 that sounds like a problem. of course an advisor should be busy, but they should make at least some time for you. If you can barely get their help, you should consider having a conversation with them
Comment: @emesupap I know that is the most obvious way to use my supervisor/advisor's help. But I cannot rely on them because "they are busy with something else at the moment." I asked them several times, but every time, they responded this way.
Answer: "The Chicago Manual of Style" is widely used in the humanities, including philosophy.
"The MLA Handbook" or "The APA Publication Manual" are also commonly used in academic writing.
More specifically on the subject, check these out:
"Writing Philosophy: A Guide for Canadian Students" by Lewis Vaughn and Lewis R. Gordon.
"Writing Philosophy Papers" by Zachary Brewster and Michael Brewster.
"A Beginner's Guide to Writing in Philosophy" by Thomas E. Wartenberg.


Can I upgrade to Yosemite without a credit card?

Question: I just bought a used iMac, and updated to 10.6.8 from 10.5.8.
I created my first Apple ID, and verified it. Now I am trying to update to Yosemite, so that I can install Xcode.  When I try to give my Apple ID it ends up telling me I need to give it credit card info. I do not own a credit card, for religious reasons, and I can't figure out how to update to Yosemite without it.
Comment: It's not the same one for every country, plus you managed to post here so I'm pretty sure you have the ability to type on google "apple support *your country* ". I'm willing to help, but not to do google search for you
Comment: Usually, you can choose in the payment section "none". I've always done this to avoid adding a credit card
Comment: I have no option to select none. nearest apple store is 200mi away.
Comment: Then call the support, it's free and they are very helpful
Comment: can you post their number?
Answer: maybe the information in this link will help?
https://support.apple.com/en-us/HT204034
Comment: Hi Res, please summarize the contents of the link.
Comment: Since you already created an AppleID, I believe you DO have to add a card, but can then remove it.  The other option is to create a new Apple ID.

You'll want to sign out of your current account, and then go download a free app or song or anything out of iTunes.  Then hit Create ID when it asks, and then proceed to choose 'None" when it asks for payment info.
Comment: While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.
Answer: You have a couple of options that I can see:

You can create a second Apple ID for the "purchase" (and any other free apps you want). All you need is another email address to link the second account to. Apple generally recommends using a single Apple ID for both iCloud and App Store, but it's not required, and since all you're "buying" is a free upgrade, it doesn't matter much which ID you use for the purchase.
In order to get the "none" option for payment, you need to create the Apple ID while "buying" a free app (such as Yosemite). The full process is given in Apple support document HT204034, but here's the short summary:

Open the App Store, and make sure you're not already signed into an Apple ID (if the Store menu has a "Sign Out" choice, use it).
Find a free app (e.g. Yosemite), and click Get.
In the Sign In dialog, click Create Apple ID.
Follow the prompts to create the Apple ID; as long as you're creating it at this point, you should get the "none" option for payment.
A verification email will be sent to the address you used for this ID. You need to click the "Verify Now" link in the email and sign in again before you can use the ID for the App Store.
After all that, you have to go back to the App Store application, sign in with the new ID, and "Get" Yosemite.

The other option, which might or might not be workable for you, is to borrow a friend's credit card for the setup process, then go into iTunes and change the payment type to "none" (see Apple support document HT201266). Note that while the card won't be charged (unless you buy something on it), a temporary authorization hold will be placed against it to verify its info.
Comment: Actually, I borrowed a friends AppleID. Hurray team work! Thanks for the assist @Gordon Davisson


I am trying to renew my NJ Drivers License

Question: I am trying to renew my NJ Drivers License but have problems regarding proof of address. I am  a Catholic Priest who belongs to a Religious Order, ( the Franciscans) and I do not have a credit card or have a bank account and my housing is provided by my religious community. I pay no bills so I do not have these for verification of my address- I meet the 6 point ID verification with my current NJ License (4points) and my DD 214 military discharge papers (2points) The problem is proving where I live - I am unable to renew my license by mail as the renewal form says I need to renew at the DMV. Any help or suggestions greatly appreciated
Comment: A letter from the top official of the Franciscans at the address where you reside on official letterhead (if you have it) clearly noting his title and explaining your situation might work. You might also ask the same person how other members of your order have handled this in the past. Surely, you aren't the first Priest to have to deal with the NJ DMV.
Comment: thanks so much for that suggestion - We are going that route with a official letter from my superior - most priests in religious orders do have at least a credit card and a checking account if they are in leadership positions, pastor, religious superior, etc - My situation is not unique, but rare these days when you need a credit card for almost everything -airline, car and hotel rooms etc... I will continue to keep checking - I stumbled on this site and am grateful to have found out - thanks for taking time to respond -
Comment: This is a very interesting question that I do not know the answer to.  This raises the question in my mind - how are homeless people supposed to get a drivers license? My state has recently implemented "RealID".  We can continue to get a non-RealID compliant license in the old way - including renewing by mail.  To get a ReadID compliant license, we need additional proofs.  Is it possible for you to renew your drivers license without upgrading to a "RealID" compliant license and avoid triggering these additional requirements?
Comment: That is unfortunate.  I know that many poor people have trouble assembling the documents required for the non real id license.  The real id license will be oit of reach for so many people.
Comment: @emory the last time I checked (a year or two ago), New Jersey did not have a non-Real-ID option.
Comment: Semi off-topic: Maybe it really _is_ time for a national ID card? It's a politically sensitive topic, but it does make things easier (speaking as a German, where ID cards are mandatory).
Answer: The current New Jersey MVC website lists the following options for proof of address:

Utility or credit card bill issued in the past 90 days that shows your name at your current address
Checking or savings account statement from a bank or credit union, issued in the past 60 days
High school or college report card or transcript containing your address, issued within the past two years
Original lease or rental agreement showing your name as the lessee or renter
Property tax bill, statement or receipt from the past year
Any letter or correspondence (including tax bills) received from the IRS or state tax office in the last year
First-class mail received from any federal, state or local government agency in the past six months

As you describe your situation, the first five don't apply, but if your driver's license renewal notice was sent by mail, that counts as "first-class mail received from any federal, state or local government agency in the past six months".
The website also notes that this list is not comprehensive, and other methods of proving your address are possible.  If all else fails, you can contact them for suggestions.


Difference between UART and RS-232?

Question: Most of the time RS-232 and UART come together in serial communication theories. Are they both the same? From my readings I concluded UART is a hardware form of the RS-232 protocol. Am I correct?
Comment: It looks like your link no longer exists.  Here's a Wayback machine archive of the latest version I could find: https://web.archive.org/web/20181225120315/http://www.ni.com:80/white-paper/11390/en/
Comment: The above answers have given insights about the differences. But I would like to add to those answers by adding a link from National Instruments that discusses this topic in good detail. Following is the link: [RS-232, RS-422, RS-485 Serial Communication General Concepts](http://www.ni.com/white-paper/11390/en/)
Answer: No, UART and RS-232 are not the same.
UART is responsible for sending and receiving a sequence of bits.  At the output of a UART these bits are usually represented by logic level voltages.  These bits can become RS-232, RS-422, RS-485, or perhaps some proprietary spec.
RS-232 specifies voltage levels.  Notice that some of these voltage levels are negative, and they can also reach ±15V.  Larger voltage swing makes RS-232 more resistant to interference (albeit only to some extent).
A microcontroller UART can not generate such voltages levels by itself.  This is done with help of an additional component: RS-232 line driver.  A classic example of an RS-232 line driver is MAX232.  If you go through the datasheet, you'll notice that this IC has a charge pump, which generates ±10V from +5V.

(source)
Comment: The RS-232 definition I have read does not talk about a sequence of bits or timing at all. I fact I have never found an official standard that describes the asynchronous NRZ start-stop protocol.
Comment: Apparently, the development of UART character format was so dominated by the Bell telephone company that no variants sprang up. As a result, the start/data/parity/stop bit format was never the subject of an independent standard. Industry-wide usage was so uniform that no "official" definition was required. This was not true of the physical links, and so RS-232 was developed.
Comment: The UART character formats predate Bell's modems, it was in Teletype hardware (eight bit with parity) in ASCII, and Baudot before that.
Comment: RS-232 does not specify sequence of bits.
Answer: UART (or USART) - Universal (Synchronous) Asynchronous Receiver/Transmitter
This is, essentially, a serial communications interface.  The "universal" part means that it can be configured to support many different specific serial protocols. The term is generic, and does not represent a specific standard.  At minimum it means that it has a TX and an RX line, which sends a serial data stream and receives a serial data stream.
RS-232 - A standard defining the signals between two devices, defining the signal names, their purpose, voltage levels, connectors and pinouts.
This is a specific interface standard that allows for equipment interoperability.  While two pieces of hardware may have UARTs, you don't know that they'll connect without damage, or communicate properly unless you know they have the same pinout and voltage standards, or include a converter or specially wired cable specific to the interconnection of these two specificl devices.  To avoid the need for special converters or cables, the manufacturers may choose to follow the RS-232 standard.  You know, then, that a standard RS-232 cable will connect the two.
However, neither the UART, nor the RS-232 standard define what is sent on the TX and RX lines.  Generally, when people use RS-232, they use a simple 8 bit NRZ encoding with one start bit and one stop bit. Most equipment today manufactured uses this encoding, but there's no requirement to do so.  You can find older equipment that includes parity bits, or uses 7 or 9 bits. The UART can be configured to support these various protocols on its TX and RX lines.
UARTs do not typically interface directly with RS-232.  You will need to convert the output of the UART to the +/-12V standard that RS-232 requires.  A complete RS-232 interface will typically involve both a UART and an RS-232 level converter.  Further, the RS-232 standard includes the definition of several other signalling pins besides TX and RX, which you may need to use depending on the equipment you need to connect to. These will also need to be level converted, and your UART may, or may not, support these signals.  If it does not you will have to control them with your software/firmware directly.
So while a UART may help you implement an RS-232 interface, it is not an RS-232 interface itself.
Comment: Just for the record: I think the 'S' in USART stands for "Synchronous", not "Serial". See [here](http://en.wikipedia.org/wiki/Universal_asynchronous_receiver/transmitter). USARTs are "estensions" over the older UARTs chips which allow also synchronous communication modes.
Comment: The only "standard" RS-232 connector is the 25-pin D-shell connector, but compliance to that standard is rare.  As @hildred wrote, computers and peripherals have used a wide variety of connectors over the years.  In general, I would pretend that there is no standard connector and only assume that RS-232 means the voltages and signals will be compatible.
Comment: Standard RS-232 cable? There is not any such thing. In my equipment bag I carry about a dozen adapters for RS-232. RS-232 specifies a DB-25 connector, but I have seen DD-9, RJ45, din8 and other connectors, and other than hooking a modem to a pc I have never been able to use a COTS cable for any rs232 project. Fortunately 90% of the time a couple adapters will do or a custom cable, they are easy to make.
Answer: The UART functions to convert parallel data from PC bus lines to serial data for transmission via line drivers to RS-232, RS-422, and RS-485 devices. The clock pin of the UART chip is feed by a programmable clock source. The clock speed is determined by the baud rate configuration that the device will be using. The clock speed is 16 X the baud rate. Placing an oscilloscope probe on the clock pin of a UART chip and determining the frequency, then dividing by 16 is one way to determine an unknown baud rate.
Comment: +1 for "converting parallel data to serial data", no other answer here mentions this.
Answer: RS-232 is a specification only. It defines the signalling requirements for serial communication, by laying out rules and guidelines regarding:

Physical wiring, the interconnections between RS-232 compliant devices. Some RS-232 variants also specify which types of connectors and cable you must use.
Electrical characteristics of the signals carried by those interconnections (voltage levels, slew rates, impedance etc)
Purpose and meaning of those physical lines, such as TX, RX, DCD, CTS etc.

RS-232 does not cover anything to do with the digital electronic hardware you use to implement and comply with those specifications, and importantly it does not cover data framing or error correction or any "datalink layer" type aspects. In other words, RS-232 is closest to a "physical layer" specification, in the OSI model.
You sometimes hear the term "RS-232 protocol", but it is not a protocol, it's a signalling standard.
The actual hardware you use to implement RS-232 compliant communications falls broadly into two categories, neither of which form part of the RS-232 specification (except in the sense that if they do anything that violates RS-232, you can't legitimately call your system "RS-232"):

Line transceivers. These are the devices that will translate between the RS-232 compliant signals, which are robust, bipolar (voltages going both negative and positive with respect to ground), and the sensitive digital logic circuitry inside the communicating device, which is usually a UART operating with standard 3.3V or 5V logic levels. Line transceivers also fall under the "physical layer" of the OSI model.

UART. This is complex digital logic, usually operating with standard 5V or 3.3V logic levels, and which is responsible for encoding and decoding parallel data into and from serial form. It takes care of framing (start and stop bits), error correction (parity bits), data rate (baud rate), flow control (controlling signals like DCD, CTS, RTS etc.) and many other aspects. As such, it could be viewed as part of the "datalink layer" in the OSI model.
Comment: Yes, "physical layer" and "data link layer", those are better words.
Comment: Don't you think it would be more accurate to say "RS-232 is a specification that defines the signalling requirements for serial communication...".  It's more than just a specification.
Answer:  RS-232 is before UART.
UART is a device that can define a logical protocol for communication while RS-232 is a device that serves as a physical media for communication.
When we say UART + RS232, it actually means a communication protocol runs on some media, with the chips like MAX232 to adapt the voltages.
We can also use UART + USB (edit) We can also use USB-base chips to provide some virtual UART functionality (edit), with the chips from Prolific Technology, FTDI, Microchip, etc. where we replace the simple RS-232 media with a more complex/recent USB media. We don't even need the hardware UART because it can be implemented over USB in a pure software way.
See below picture. Note that on the right side  there's no hardware UART but only hardware USB  (edit) the hardware UART is integrated into such chips and a new USB UART driver is used on the embedded side.(edit). And with some extra drivers.

Image is from here.
Comment: @smwikipedia No I really meant you can use USB UART chip with RS-232 transceiver. You are again confusing things. The picture shows how USB can be used to provide a virtual UART with only USB CDC protocol. There is no UART or RS-232 anywhere, and even then, the RS-232 part would not make sense. Please read existing answers to figure out what each term means and how they relate to each other.
Comment: There are multiple issues with this answer. First of all UART is a circuit which implements asynchrohous communications, but asynchronous comms itself existed before RS-232, think of eletromechanical devices. Also FTDI USB chips don't replace RS-232 media with USB media. They are USB UART chips which enable you to make an adapter that allows your PC to have RS-232 comm interface. The UART is implemented by hardware by the FTDI chip, it is not implemented in software. And the diagram does not relate to using FTDI chips but the MCU implementing USB CDC and PC talking CDC with it.
Comment: @Justme "*...to make an adapter that allows your PC to have RS-232 comm interface*" I think you mean USB comm interface? And thanks for pointing out FTDI chip still has the UART as hardware. I didn't know that detail. I thought it should be possible to implement the UART protocol in software and leverage USB as a transport. The picture is meant to show how USB can be used as if it is a RS-232.
Comment: @Justme Yes. The picture does show USB is used as a virtual UART with some extra software drivers on both host and embedded sides. It replaces the hardware UART and RS-232 totally.
Comment: The rest of the problems still exist. RS-232 is not a "device" but a specification for a physical interface. And FTDI like chips don't provide virtual UART, they really provide an actual physical UART through USB interface. If you put a MCU and use CDC over USB, then it is a virtual port because there is no UART anywhere. So right side picture has CDC, no UART.

Difference between UART and RS-232?


MS Access Inner Join doesn't recognize difference between small and capital letters?

Question: As title says, this issue happens in MS Access 2003 SP1. Does anyone know what could be solution for this problem?
Pseudo query
select * from a inner join b on a.id=b.id
Comment: I think it would help if you posted the misbehaving query here.
Answer: For small data sets, there are any number of approaches using various possible string conversions.
But if your data sets are of any size at all, this will be very slow because it can't use the indexes.
You could possibly optimize by joining case insensitively and then using criteria to test whether the case is the same, e.g.:
  SELECT *
  FROM a INNER JOIN b ON a.id=b.id
  WHERE Asc(a.id) <> Asc(b.id)

This would at least allow the use of an index join so you wouldn't be comparing "a" to "b" and "a" to "c" (as would be the case with joining on string functions), but only "a" to "a" and "a" to "A".
I would suggest that if your data really needs to distinguish case, then you probably need to store it in a database engine that can distinguish case in joins and then pass your SQL off from Access to that database engine (with a passthrough query, for example).
EDIT:
@apenwarr suggests using StrComp() in the JOIN (as did @butterchicken yesterday), and this SQL raises a question for me (I've updated her/his SQL to use the same table and fieldnames I use above; it's essentially the same as @butterchicken's SQL)
  SELECT *
  FROM a INNER JOIN b
    ON a.id = b.id
    AND StrComp(a.id, b.id, 0) = 0

It is a fact that Jet will optimize a JOIN on an index exactly the same way it would optimize the equivalent WHERE clause (i.e., implicit JOIN). Stripped down to just the JOIN (presumably on indexed fields), these two SQL statements will be optimized identically by Jet:
  SELECT *
  FROM a INNER JOIN a
    ON a.id = b.id

  SELECT *
  FROM a, b
  WHERE a.id = b.id

My question is whether or not these three will optimize identically:
  SELECT *
  FROM a INNER JOIN b
    ON a.id = b.id
    AND StrComp(a.id, b.id, 0) = 0

  SELECT *
  FROM a INNER JOIN b
    ON a.id = b.id
  WHERE StrComp(a.id, b.id, 0) = 0

  SELECT *
  FROM a, b
  WHERE a.id = b.id
    AND StrComp(a.id, b.id, 0) = 0

I'm using SO to avoid work I'm supposed to do for tomorrow, so don't have time to create a sample database and set up SHOWPLAN to test this, but the OP should definitely give it a try and report back on the results (assuming he/she is definitely intending to do this with Jet).
Comment: +1 for the 'don't use the Access database engine' recommendation ;)
Comment: Sometimes you just can't choose. You got what you got. I have been working with MS SQL Server 2000/05/08, Oracle 9g,10g, MySQL. There is something in IT industry which is called legacy system...This Access is legacy.
Answer: Have you tried StrComp? Not an Access-bod, but I think the query would look something like this:
SELECT * FROM MyTable A INNER JOIN MyTable B
on StrComp(A.description,B.description, 0) = 0

The 0 argument in StrComp causes a binary compare which will catch differences between "You" and "you" (for example).
Comment: StrComp won't use indexes, so is not of use with very large data sets.
Answer: I believe that SQL in Access is not case sensitive. Try this Kb article for a possible solution.
Answer: Here's another possible solution.  As mentioned in the posting, you are sacrificing speed...
Answer: Here's a variation of the earlier suggestion to use StrComp, but this one will start by narrowing down the join using indexes, then restrict it further using StrComp.
SELECT * FROM MyTable A INNER JOIN MyTable B
on A.description = B.description
 AND StrComp(A.description,B.description, 0) = 0

This should be fast even on large data sets, as long as you don't have lots of entries that are distinguished only by case.


is creating db user defined data types best practice?

Question: Is creating user defined types instead of using existing types best practice? In my previews work place all basic types were predefined, is it best practice? what advantages and what disadvantage  it has.Thanks a lot!
Answer: In MS SQL Server - the idea is great. However, there's a BIG but to them: you can't change them once they're in use, since there's no ALTER TYPE ....  statement. This can be a major hassle.
Consider this: you have a bookstore app which has a user-defined type ISBN = VARCHAR(10) - works like a charm. Now the international committee decided to increate the ISBN field to 13 characters - unfortunately, there's no ALTER TYPE ISBNType..... so your only choice is to basically drop all the columns of that type in all of your database, then re-create the type in its new form, and re-create all those columns again.
The idea is great and I would love to use it - but in its current state, it's next to unusable, in my opinion, which is unfortunate.
Marc
Answer: A bit late, but.. my 2 cts.
The user defined types fulfill the role of a domain in the conceptual and logical models, so if you want to implement your logical datamodel in the physical database, the use of user defined types would be the closest approximation. This will provide benefits such as using a graphical model that can be transferred to an implementation automatically, better than it could be done without using UDTs.
Using domains makes it possible to detect attempts to store a postal code in an SSN field and have them caught by the database at run time (or even compile time). This will enable you to enforce company wide business rules where they should be enforced: at the point where the data hits the storage. Anywhere else is a courtesy to the user, but this is where they absolutely HAVE to be enforced to make sure noone goes around them.
Also, UDTs as defined in ANSI SQL:1999 encapsulate methods, and can be subtyped. That means that certain changes in business rules that deal with constraints can be changed in the database, without ever having to touch an implementation.
However... as currently implemented UDTs leave a lot to be desired. I'm not even sure SQL Server implements the standard as described, even less sure about Oracle. And even if they do, the disadvantages of using UDTs will become obvious right away as you use BI tooling, ETL tooling or other rather simple-minded tools: they don't usually understand UDTs and even if they do, they won't be able to use them because the majority base themselves on basic types (int, char and date/time).
As for reporting tools, let's consider a UDT that has a combination of fields. Now, how would a database-agnostic ETL-tool be able to understand the type? It would have to be able to understand the structure in order to display it, or use it for calculations. And that for every supported database - a difficult task. And since noone uses UDTs, they won't do this. It's a vicious circle, but we still have to live with it.
Apart from that, UDT support in most databases isn't all that hot either. Changing types can be quite hard. While the syntax should be the same everywhere, their administration is undefined in SQL:1999 and therefore different everywhere. Try changing the owner of a UDT in sql server for an example. That used to be pretty difficult - not sure about SQL Server 2016, but given that UDTs don't look like a focus area, I'm not expecting major improvements in that area.
Lastly, if you add really complex code to UDTs, you run into the old problem that you are programming in an environment that has a lack of good debugging options. That doesn't help either.
So: if you have full control over your database and all interaction goes through your software, UDTs can be extremely helpful. If not, they can be a huge pain the neck. Which one is the case in your scenario, is something only you can tell.
Answer: How cool are User Defined Data Types in MS SQL Server?
Personally, I don't use them but I've seen them. One problem is that client code recognises the base type only, IIRC, for MS SQL Server at least. And portability/behaviours across versions.


Change taxonomy slug in database

Question: I am using Events Calendar Pro and due to a bug multiple Venue taxonomies were created. For example, I have museum, museum-2, etc. I would like to delete the duplicates but assign the event associated with the duplicate venue to the 'main' venue.
Is there a find/replace I can use that would do this for me?
Other suggestions are welcome.
Thank you.
Answer: You could just run DELETE FROM wp_terms WHERE slug LIKE "museum-%" on you MySQL server, but that would probably leave some orphan rows in wp_term_taxonomy and potentially in wp_term_relationships if you have used the terms. While being a bit more complicated I would recommend deleting them using the WordPress API. Something like this might work (from memory, so I'm not 100 percent on the usage of the term_ prefix in $term->term_slug and $term->term_id):
$terms = get_terms(array('your_term'), array('name__like' => 'Museum'));
foreach ($terms as $term) {
    if (term->term_slug != 'Museum') {
        wp_delete_term($term->term_id, 'your_term');
    }
}

It's apparently not possible to search for terms by slug, so be carful not to delete terms like "Museums" or "Museum of Natural History" which will happen if you run the above code.

Change taxonomy slug in database