Face Recognition using Kinect

Question: I went through the Kinect SDK and Toolkit provided by Microsoft. Tested the Face Detection Sample, it worked successfully. But, how to recognize the faces ? I know the basics of OpenCV (VS2010). Is there any Kinect Libraries for face recognition? if no, what are the possible solutions? Are there, any tutorials available for face recognition using Kinect?
Answer: I've been working on this myself.  At first I just used the Kinect as a webcam and passed the data into a recognizer modeled after this code (which uses Emgu CV to do PCA):
http://www.codeproject.com/Articles/239849/Multiple-face-detection-and-recognition-in-real-ti
While that worked OK, I thought I could do better since the Kinect has such awesome face tracking.  I ended up using the Kinect to find the face boundaries, crop it, and pass it into that library for recognition.  I've cleaned up the code and put it out on github, hopefully it'll help someone else:
https://github.com/mrosack/Sacknet.KinectFacialRecognition
Answer: I've found project which could be a good source for you - http://code.google.com/p/i-recognize-you/ but unfortunetly(for you) its homepage is not in english. The most important parts:
-project(with source code) is at http://code.google.com/p/i-recognize-you/downloads/list
-in bibliography author mentioned this site - http://www.shervinemami.info/faceRecognition.html. This seems to be a good start point for you.
Answer: There are no built in functionality for the Kinect that will provide face recognition.  I'm not aware of any tutorials out there that will do it, but someone I'm sure has tried.  It is on my short list; hopefully time will allow soon.
I would try saving the face tracking information and doing a comparison with that for recognition.  You would have a "setup" function that would ask the user the stare at the Kinect, and would save the points the face tracker returns to you.  When you wish to recognize a face, the user would look at the screen and you would compare the face tracker points to a database of faces.  This is roughly how the Xbox does it.
The big trick is confidence levels.  Numbers will not come back exactly as they did previously, so you will need to include buffers of values for each feature -- the code would then come back with "I'm 93% sure this is Bob".

Face Recognition using Kinect


?corrupted iCloud calendar

Question: My iCloud calendar has started behaving very strangely.
Syncing issues, randomly changing date, but the weirdest thing is, if i login to iCloud from any browser, and enter an event it gets moved 3 days back, and always to 23:00. This behaviour only happens for events after 25th   October 2019, and before March 30th. So all my distant future events are wrong, and even entering new ones online from an external browser, the event immediately jumps 3 days back. I have tried signing out of iCloud on all my devices, but it didn't seem to make any difference?
Answer: I've been through similar issues (not the same issue ... but iCloud weirdness that I couldn't pin to any device).  Turns out it is possible to wedge iCloud even though all your local devices are ok.
The fix:

Take backups of everything you can (your computer, phone, iPad, etc.)
Go to each device you own and log out of iCloud

It is critically important you log EVERY device out of iCloud because the fix relies on you having zero devices that are logged in.

When NO devices are logged into iCloud, then (and only then) iCloud will dump it's cache for all data that it was syncing to your devices.  If even a single device remains connected to iCloud ... this will not happen.

Pick your most reliable device and log back into iCloud.  It will start syncing it's state (such as your calendar) to iCloud.
You can start re-reconnecting other devices back into iCloud one by one (I tend to do this very slowly to make sure each device has time to fully sync before I add the next device).
If the problem turns out to be corrupted iCloud cache (and this has happened to me), then this should fix it.  If the problem is with a specific device then you may need further steps.
Answer: TL;DR: call 800-275-2273 for AppleCare; otherwise:
If adding events to the calendar in iCloud.com isn't working properly, it is much less likely that the issue is coming from your devices. Signing in and out on devices re-writes local files that maintain the calendar and deal with incoming or outgoing sync data. Just in case, have you restarted all your devices? To be clear, in iOS, restarting is using the slide to power off, not the hard reset. Slide to power off does maintenance on the device before it completely powers off. If that doesn't (didn't) help, try signing out of iCloud, restart the device, then sign back in.
Another test is to create a new calendar and see if it has the same issue. If not, you may just need to start using the new calendar instead.
You can test if the issue is coming from one of your devices by turning off Calendar in the iCloud preferences/settings on all your devices, then add an event on iCloud.com. If it doesn't work as expected, skip to the second to last paragraph below. If it works as expected, turn on the Calendar in iCloud preferences/settings for one device and try again. Repeat until it fails. Backup and restore the offending device back to factory and sign in with your Apple ID, but don't use your backup to restore the device. Once back on the home screen/desktop, go back to iCloud.com and try again. If it works, you have two choices: restore the device from backup to see if starts to fail again (if it fails again, the problem is in your backup and if it doesn't you're all set); or just use the device as new and rely on other methods to load your data again (starting, of course, with iCloud sync data).
Make sure you have a backup before making any other changes, however. And I would recommend both iCloud and iTunes. Having more than one backup is never a bad idea when making changes.
If still not resolved, I recommend calling Apple (1-800-275-2273). They always support Apple ID issues. They might need your input to help resolve the issue. It is likely you're not the only one, but it may be that the number of individuals with this issue is such a small number that every Apple ID used in troubleshooting and debugging will help. They may not be able to help resolve the issue on the first contact and, if my theory is right, they will likely escalate, perhaps twice.
SSL

?corrupted iCloud calendar


Is "you've coming from" a colloquialism?

Question: In the Take That song, Never Forget, the lyrics run "Never forget where you've coming from". Was that a mistake, or is it a colloquialism (or something else) to say "you've" instead of "you're" in this context?
Answer: Aha. I've just listened to five different performances on YouTube (that's dedication) and I'm sure it's "Never forget where you've come 'ere from" at the beginning of the song, and in later choruses, it's "Never forget where you're comin' from"
Have a listen for yourself: http://www.youtube.com/user/TakeThatHD?blend=2&ob=5#p/search/8/GfKSIai0RlU
Comment: I'd go with that interpretation.
Answer: I believe that is a transcription (or perhaps a listening) error.
The lyrics sites that I checked couldn't decide whether "Never forget where you're coming from" or "Never forget where you've come here from" was the correct lyric.
"Never forget where you've come in from" would also be a grammatically proper phrase that could all-too-easily be misheard.
Edit: having re-listened to it, I'm pretty sure of the "Never forget where you've come in from" interpretation.
Comment: If you [listen to the song](http://www.youtube.com/watch?v=OtrNknhuG60#t=2m10s), it sounds *a lot* more like "never forget where you've comin' from" than like "never forget where you're comin' from." It would take access to official lyrics to know for sure.
Comment: I agree; the lyrics sites are hazy on which is actually sung. The original album sounds very much like "you've", while Eoghan Quigg sang "you're" on X Factor. I would therefore happily dismiss this as a quirk of the recording, but for the number of covers and other versions performed where "you've" is clearly sung.


text editor loading multiple large text files - multi threaded

Question: I'm fairly new to VB.NET, and I'm working on a text editor with a tabbed interface. I deal with large text files, so I'm wondering what is the best way to go about this.
Should I have each tab / text document open up in a new thread or a process? I basically want the entire application to always run fast as the text editor is just one part of it. If I have several large text files open I don't want the rest of the application slowing down a bit.
If someone can help shed light on this and maybe point me to a URL with any relevant examples, I'd appreciate it!
Answer: Should I have each tab / text document open up in a new thread or a process?
No. Definitely not a new process. The amount of Win32 to put everything back together will make you hate yourself.
Not a new thread either. The Winforms UI runs in a single dispatch thread. Trying to touch the UI from different threads will make your program explode.
I would recommend simply using the tried, true, and boring background worker approach. This can be used with threads or just using asynchronous IO (.NET handles the threading for you). Depending upon your use case you may want to just lazy-load parts of files, you can use memory mapped or random access files (e.g. only read in a very small part of the file at a time). In any case the "data" should be separate from the visualization of said data.
(Emphasis added to search terms.)
Answer: Whether you have 1 or 10 tabs open, you will only be able to type/edit 1 file at a time, the other tabs will just be taking up memory in the data structure you define, so not sure how there would be an impact on performance.
As a side note, if you are doing a large amount of string manipulation use the stringbuilder class, far quicker and memory efficient.


Unkind flag declined

Question: I flagged this comment as unkind because this to me looked to be the textbook example of newbie-biting (on top of being completely unnecessary in the first place, because another comment already asked for the same thing in a much nicer way). It even has caps aka shouting on the internet. Really curious to know why my flag was declined, so I can improve my future flagging behavior.
Comment: I'm fencing on Makoto here. Yet the capped text could have been normal but using bold instead for emphasis. So yeah, shouting doesn't help and we don't like it when OP's use caps neither and they're told about it that caps are considered as them yelling at us and probably get downvoted for it.
Comment: Honestly, I'm not sure why the 'unkind' flag exists. It's safer just to use "No longer needed".
Comment: as someone being called out *twice* for being 'unkind', i am really curious what this comment was, then, as it still has been deleted. (typiing in all lowercase just to make sure this one will not get flagged.)
Comment: fwiw I don't like the comment. It sounds impatient and the caps locks is considered yelling.
Answer: It's not unkind to ask for errors in a question.  That's all the commentator was doing.
Admittedly the tangent about the attorney and police was a bit...tangential, but there was nothing here that was unkind or mean.
Comment: @Vasan: It absolutely sounds confrontational. *Especially* when they start to go off with that analogy followed by the all caps. This is somebody clearly taking their exasperation out on the asker. We're supposed to sympathize with the exasperation but at the same time not condone taking it out on others like that.
Comment: (Alternatively they shouldn't have commented and should have just voted to close for that *very* reason...)
Comment: That's why I said that the tangent was tangential; it didn't really belong in the comment and it only served to confuse.  Reading more for context and intent rather than simply looking *at* the text, the context is simple:  the commentator wants to see an error message.
Comment: This is probably because English isn't my first language, but doesn't "how about you do X" sound confrontational? And the all-caps demand for errors..
Comment: Fair enough. My sensitivity was probably too high as a result of all the "be nice to newbies" posts from the SO team :)

Unkind flag declined


Brown and yellow orchid leave

Question: Help...my phalenopsus orchid bloomed and looked gorgeous. The blooms are now spent..and the top leaves have started to discolor. Can someone help my orchid???
Comment: While you wait, dont water the orchid.
Answer: I would suggest leaving your orchid in a bright window, out of direct light, and let her dry. If you were watering her once a week, or even every other, she's likely getting too wet.  When I lived in a very humid climate, I watered my orchids once every 4-6 weeks...they thrived on what others thought was neglect.  In drier climates, I water twice a month when it's hot, less when it's cold.  Check the roots -- in healthy roots: green is good, grayish needs water.  I would also suggest that when you do water her, soak her roots in water for a few minutes rather than giving her ice cubes. Those top leaves may fall off, just have patience :)
Comment: Thank you so much.. I have been just soaking them in my sink for 15 min once a week.. I will try to go to every 2 or 3 weeks and see how she does...

Brown and yellow orchid leave


QField operating system

Question: Does anybody know if Qfield can run on Ipad? My understanding is it was build to run on Android 4.3 or later version. Anybodu knows if it can run on with IOS?
Answer: You can try Input, which is based on QGIS and works on both Android and iOS:
https://github.com/lutraconsulting/input
Disclaimer: we develop Input which is free and open source
Answer: According to the project page and the documentation, there is no indication that QField exists for any other architecture other than for Android, as Android is the only platform listed for download for the app. Furthermore, the GitHub repository only references build components for Android.

QField operating system


When I include InsertListing in a form in admin fieldset, I get a vertical scrollbar

Question: When I include insert listing in a fieldset in an admin form, I always get a vertical scrollbar like in the image. I think it's a problem with the width of the container, but I don't know how to fix this problem.
Answer: You should add <update handle="styles"/> to layout.
The styles.xml will remove old css file:
<remove src="css/styles-old.css"/>

if you open styles-old.css you can see the css rule-set which broken you grid :
.admin__scope-old {
  box-sizing: content-box;
}

Comment: thank you for your answer. Can you tell me, which file I have to upsate???
Comment: You should update layout which handle this page. https://picua.org/image/download.xF2rbf


Noobs boot - no other systems visible internet connection through WiFi

Question: I can't see other systems than raspbian on noobs installation window. RPI  is connected through internet by WiFi - no possible connection through rj45. Is it possible to obtain network installers (other systems) using WiFi?
Comment: I think the Raspbian setup would be distinct from NOOBs itself.  I'm actually not a NOOBs user so I can't be of much help WRT that.
Comment: Are you sure the system is actually on your wifi network? Have you been asked for any wifi configuration?  If not, it is impossible for the system to be online.  Searching around a bit, I have not seen a clear statement that it will work out of the box via wifi, unfortunately.
Comment: wipi has been configured after raspbian instalation, and i have access to internet.
Answer: The reason why theres only Raspian, 512MB space partition, and boot to scratch is because you need a direct connection (Ethernet). Or you may be using the offline only files and didn't download the online only files.
Answer: Unfortunately, it is NOT possible to connect to download another Operating System using Wi-Fi. You'll have to use an Ethernet Cable.
If you cannot see all the Operating Systems you would expect, go to the Raspberry Pi website and then download the NOOBS package there, as it would be the newest version.
 Having said that, using an Ethernet Cable to download an OS is probably a reasonable idea. Ethernet connection are considerably quicker than using a wireless connection.


Installation script for python 2.7 in centos 5 without using internet.

Question: Is it possible to install python 2.7 without the internet in centos 5? Any help would be appreciated.
Comment: CentOS 5 is over 11 years old. Nobody should be using it for anything anymore.
Answer: The responsible thing to do is to upgrade the OS, as CentOS 5 is end of life. Conveniently EL 7 defaults to Python 2.7.
If you will not upgrade the distro, first find the packages you want to install. (I don't have a recommendation because the software collection for Python does not have a EL5 build.) You may present a yum repository to this system a couple ways: with removable media, or a connection to a local mirror that does have Internet.


Sharepoint 2010 databases - How to move to standalone SQL 2012 from SQL 2012 AlwaysOn

Question: We recently purchased a well known backup solution and even after assurances that it could backup SQL 2012 databases and that our SQL 2012 AlwaysOn HA solution would not be a problem, it transpires they actually don't support it at the moment.
So my only option, it seems, is to ditch the AlwaysOn facility until such time as they do support it (for reference, this company do not offer refunds on their software!!).
I should mention that the SharePoint 2010 environment we have is a live production environment, not a test one.
My question is, my SharePoint 2010 installation is currently referencing the SQL2012 AlwaysOn Listener to connect to the database (in this case, SP-SQL-AG1CA).  I've read about the way to transfer SharePoint databases from one SQL server to another, but nothing about if you want to just reference a server that hosts the existing SQL databases rather than referencing the AlwaysOn listeners.  If possible, I'd rather not have to set up a new SQL server to move the databases across as they are perfectly fine where they are!
Is it possible to effectively tear down an AlwaysOn setup, and just use a SQL Alias with the same name (e.g. SP-SQL-AG1CA) on the standalone SQL server after changing the Active Directory DNS entry to point to the now standalone SQL Server (i.e. in DNS NH-SQLSVR-01 = 10.1.10.150 so change SP-SQL-AG1CA to also point to 10.1.10.150)?
Answer: Yep, that will work fine, we use DNS cnames to migrate servers reasonably often.
What I would do is:

Remove the databases from the availability group
Delete the listener
Create a DNS cname with the same name as the old listener pointing towards the server that hosts your databases
Do an ipconfig /flushdns command on the share point servers to make sure they notice the IP address change


featured image in custom poste type (backend)

Question: I created a custom post type outside the wordpress loop. I want to integrate the featured image meta box in the backend for this post type.
$this->add_meta_box('postimagediv','Beitragsbild', array($this, 'featured_image_meta_box'), 'side');

which calls the wordpress core function:
protected function add_meta_box($id, $title, $callback, $context = 'normal', $priority = 'default', $callback_args = null ) {
        add_meta_box( 'product_db_' . Kickoff::$action . '_' . $id, $title, $callback, null, $context, $priority, $callback_args);
    }

the meta box works, but if i click on add image, it opens an iframe which calls media-upload.php but i want it to look like the normal wordpress mediagalery function like on create posts. This iframe calls the admin-ajax.php.
Does anyone have any idea what i have to change/call in addition to make the iframe work with the default ajax mediagalery?
Answer: Instead of manually adding a metabox, just add supports when you register the post type. (Since it is already registered, you may need to unregister_post_type() and then re-register it to make this change.)
For details - How come Featured Image isn't showing up in my Custom Post Type?


Host Key verification failed SSH Rsync

Question: Two days ago I started using SSH to transfer backups of two Linux servers to another one. I created a shell script to run it in Crontab.
Both servers are using Ubuntu 14.04.5 LTS
My SQL-Server works fine, it does create a backup of the database, and then it runs the SSH script to send the file to the Backup Server.
Now, the Webpage Server it's the one I'm having problems with. The script works if I use it manually, but, in cron it doesn't work. I've even did backup of the .ssh folder, and did the exact same steps as the SQL-Server, and what it puts is
Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(226) [sender=3.1.0]

The backup script is as follows named backup.sh:
#!/bin/sh
/usr/bin/rsync -e 'ssh -i /home/hostUser/.ssh/id_rsa' -avzp --delete /path/folder/ userRemote@IP:/path/to/backup/

This is how I have my Cron task
00 00 * * * sh /home/hostUser/backup.sh >> /var/log/backup.log 2>&1

I generated the rsa key with
ssh-keygen -t rsa

Where I have to input to save the key.
The way I've made the conection is as follows:
ssh 'remoteUser@IP'

And copying the key with:
ssh-copy-id -i ~/.ssh/id_rsa.pub remoteUser@IP

I've done this steps in order for me to log in remotely. Using ssh -v userRemote@IP
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to remoteUserIP [remoteUserIP] port 22.
debug1: Connection established.
debug1: identity file /home/hostUser/.ssh/id_rsa type 1
debug1: identity file /home/hostUser/.ssh/id_rsa-cert type -1
debug1: identity file /home/hostUser/.ssh/id_dsa type -1
debug1: identity file /home/hostUser/.ssh/id_dsa-cert type -1
debug1: identity file /home/hostUser/.ssh/id_ecdsa type -1
debug1: identity file /home/hostUser/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/hostUser/.ssh/id_ed25519 type -1
debug1: identity file /home/hostUser/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.10
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.10 pat OpenSSH_6.6.1* compat 0x04000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr email@example.com none
debug1: kex: client->server aes128-ctr firstname.lastname@example.com none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA 73:de:35:34:54:46:00:f1:c6:1c:8e:bf:19:50:45:bc
debug1: Host 'remoteUserIP' is known and matches the ECDSA host key.
debug1: Found key in /home/hostUser/.ssh/known_hosts:1
debug1: ssh_ecdsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/hostUser/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: key_parse_private2: missing begin marker
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
Authenticated to remoteUserIP ([remoteUserIP]:22).
debug1: channel 0: new [client-session]
debug1: Requesting email@example.com
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = es_MX.UTF-8
Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 4.4.0-31-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Fri Aug 17 10:38:39 CDT 2018

  System load:  0.0               Processes:          135
  Usage of /:   65.4% of 1.70TB   Users logged in:    0
  Memory usage: 19%               IP address for em1: remoteUserIP
  Swap usage:   0%

  Graph this data and manage this system at:
    https://landscape.canonical.com/

72 packages can be updated.
9 updates are security updates.

New release '16.04.5 LTS' available.
Run 'do-release-upgrade' to upgrade to it.

*** Es necesario reiniciar el sistema ***
Last login: Fri Aug 17 10:37:18 2018 from hostUserIP

How can I make it to work, it's weird since I can make it to work on my SQL-Server.
Thanks in advance.
Answer: As the user running the backup;
ssh  -i /home/hostUser/.ssh/id_rsa 'remoteUser@IP'

This should ensure the ~/.ssh/known_hosts is updated with the rsa key of the server.
Comment: Thanks for your reply. I solved it by using the script with sudo, prompt me the password, and today, I saw that it backup files in the log! I don't know if this solution is the best, but it worked for me :S

Host Key verification failed SSH Rsync


LVL Floor Joist Notch / Reinforcement Question

Question: Please see image attached.
I am looking to make a notch in a 11 1/2 LVL beam spanning 17ft across my basement.
Answer: The engineered lumber should be marked with the name of its manufacturer. Each manufacturer publishes information about the size and positioning of cutouts that are allowed on a "prescriptive" basis. If you can't find a cutout or notch description in those tables then you'd need a structural engineer to design something specific for you.
The steel I beam approach you proposed may work, but it may not be necessary to go that far. It may be possible to simply reinforce the joist that is to be notched, for example by attaching a plywood or steel sheet gusset to the sides of the joist extending some distance beyond the notch.
An alternative is to cut out the marked part of the joist completely. A beam may be installed crosswise between the joists to the left and the right of the marked joist so that those two carry the load of the cut joist. Doing this is likely to require those two joists to be reinforced in some way, such as "sistering" them by installing a second joist alongside the existing joists. The "sister" might be dimensional lumber, another LVL of same or different depth, etc.
A structural engineer could help you figure the loads carried by the floor above and choose the "best" approach based on material cost, practicality of carrying materials into the space and installing them, etc.
Answer: I am a structural engineer.
You can't notch an LVL since it is an engineered lumber product.
Boise Cascade doesn't recommend this. There is a good possibility the LVL might work as notched, but a P.E. would need to perform the calculations and put their stamp on this to the building inspector.
That is a very big notch!
I can't think of any reason for such a large notch in a single joist in the middle of nowhere in your basement.
Therefore, my immediate question to you is what are you really trying to accomplish here?
You can usually put a number of drilled holes in the center of the LVL in the region you indicate if this is for piping or electrical.
If it's ductwork then you can use one or more flexible round ducts that could use drilled holes to get from one side to the other of the joist.
@Greg Hill's Idea of sistering to the adjacent joists is your best option if putting in the cripple joist (or box joists) doesn't create a problem for what you are trying to do.
Alternately you could put in a short wall under the notched LVL and create a book case or some other architectural addition there.
Off the top of my head I believe any 6" deep steel beam or channel you can find will work from a strength standpoint, but will tend to bend more than you might want.
Two channels (one on each side of the LVL) could easily be bolted through the top portion of the LVL to each other. Similar to a flitch beam.
If you do the channels you would not need to make them full length, nor would they need to bear on the original steel I-beams.
Comment: You say, "You can't notch an LVL..." I'm not a structural engineer and I doubt if you are. Of course, you can notch an LVL.


How long does a pitot tube last?

Question: Aircraft components need periodic maintenance, this should be the same for the pitot tube that is an essential instrument for pilots. So do you know when should a pitot tube go into maintenance? I can't find relevant information online
Answer: The pitot tube its self (the actual metal tube) can be affected by clogging as well as direct impacts or the dreaded pitot tube cover left on before takeoff but broadly speaking are just metal tubes and a somewhat "simple" part for what its worth.
In the US if you are flying IFR your pitot static system needs regular checks, this is generally when issues with the system (and potentially the tube) can be found and lead to replacement.
While some aircraft may have maintenance life schedules for pitot tubes none of the small GA planes I fly require them to be replaced. For planes not flown all that often corrosion can be an issue since they are generally bare metal tubes. The pitot tube should always be checked in your pre-flight walk around.
Comment: What about a composite material pitot tube?
Comment: @FaitoDayo can you provide an example of one? All the Pitot tubes i have encountered thus far are metal
Comment: I am trying to design one, that's the reason behind my question. Also, what materials did they use for pitot tube? Have there ever been a incident when the pitot tube is bent by pressure difference between top and bottom surface of the wing?
Comment: @FaitoDayo They are typically metal as they often contain a heating element (which can be problematic for composite structures. As for incidents thats likely the topic for a different question, typically questions do not belong in comments here.

How long does a pitot tube last?


Is a purchase still a Schedule C expense if its paid using a gift card?

Question: I've made an Amazon purchase for my business (self-employed) solely using an Amazon gift card which I received for non-business reasons. Does this still qualify as a business expense on my tax return?
Comment: Are you declaring the gift card as income?
Comment: @Harper-ReinstateMonica Not as part of my business income at least.
Answer: Method of payment should have no bearing on whether something is a qualified business expense or not - it may make auditing more challenging, but it's not required that expenses come from a "business account" or from gift cards given explicitly to the business.
Now if the gift card came from someone you do business with, that may muddy things a bit - meaning you might have to record the gift card as income as well, or have documentation that explicitly states what the card was for (if it is not business income).
You could just as well bought something for yourself with the gift card and then used your "cash" to make the business expense, and you'd be in the same spot in the end.  Or you could have "sold" the gift card to the business and used it. All that to say that the source of funds is not relevant to make something a qualified business expense.
Just make sure you keep the receipts.
Comment: Awesome, thank you. Yes, I have receipts, etc. Thanks for the help!


Wireshark Broadcast Storm

Question: Suppose I'm using Wireshark to monitor a broadcast storm. I want to find out the exact instant of time when the capture buffer runs out of memory. How do I monitor this and obtain the exact time moment when Wireshark capture buffer runs out of memory?
Comment: Which buffer are you talking about? a switch buffer can be full during normal operations.
Comment: Hey sorry for the ambiguity. Capture buffer refers to the Wireshark pcap buffer.
Answer: If you are capturing to memory only and stopping when the buffer runs out, then in the case of a broadcast storm the last frame time will be when the buffer ran out of memory.  I'm not sure why you'd want to do this instead of capturing to disk.
Comment: Okay I'll try this and let you know if it works. I'm doing this to analyse the relation between time taken for broadcast storm and the type of the router.
Comment: @DanisFermi I use wireshark extensively, typically capturing using the command-line tool dumpcap and a rotating file buffer:  dumpcap -i 1 -B 1000 -b filesize:100000 -b files:5000 -w "D:\cap" for example.  This captures from interface 1 with a 1G RAM buffer but writes to a circular file buffer with up to 5000 files of 100M each (500GB total) files called D:\cap_000nn_.
Comment: Hey thanks a lot man. It worked exactly the way you said it will.
Answer: first of all lets clear something
 1. memory here means what??
   a. it should mean interface buffer
 2. which interface ?
   a. it can be your interface or any active device interface (switch for example)
if you need to monitor broadcast ,there will be two ways .the first is to monitor your PC interface itself which may be not efficient cause you may suffer from any malware attack cause your interface to be congested . the second is to configure you active device (the switch ) to spin copy of traffic to the port where you are connected to then try to monitor via wireshark .
any way if you decided to use any of them you must get this before.

Broadcast
  Any packet destined for all stations on a network segment is
  considered broadcast traffic. Broadcast addresses are usually used by
  ARP, DHCP, and other protocols that do some sort of discovery.
for Ethernet (and other 802.x networks)
  Ethernet has designated the
  all-ones address (ff:ff:ff:ff:ff:ff) for broadcast traffic; this is
  used for other 802.x networks as well.
for IPv4
  Similarly, the all-ones IP
  address (255.255.255.255) is broadcast. If the host portion of an IP
  address is all ones (e.g. if the address is 192.168.0.255 and the
  netmask is 255.255.255.0), that address is also a broadcast address.
  The broadcast IP address in the early days were 0.0.0.0, but was a
  long time ago, and zeroes are no longer used in the wildcard section
  of broadcast addresses.

so you easily can monitor the traffic destine to ff:ff:ff:ff:ff:ff or 192.168.0.255

other way is capture all the traffic came through your interface and then sort it by traffic size and this way is more proper to un-managed network.
here you may need to setup the proper filter to capture this broadcast.
Adding onto the capabilities of Wireshark to find top broadcasters (or multicast packets which can also affect network activity) the following can be done:

Set up a new "capture filter" as such:

Filter Name: Broadcast and Multicast
Filter String: broadcast and multicast

Select the "Show the capture options" toolbar button.
Select the "Capture Filter" button and double click on the "Broadcast and Multicast" filter.
Select "Start" and then go into "Statistics", "Conversations" and select the "IPv4" tab.
Finally, sort the list by bytes and attempt to find the culprit when stuff happens.
Comment: Hey sorry for the ambiguity, but the memory here refers to the pcap capture buffer. And I will be monitoring the PC's interface since the experiment is being performed in a controlled environment and hence, I'm not worried about any malware.
Comment: ok ,lets follow the steps . also make use of [this link](https://www.reddit.com/r/networking/comments/18yj72/broadcast_storm_how_to_find_the_cause_using/) is very useful

Wireshark Broadcast Storm


A question about the cosmic distance ladder

Question: So I have a table of data for the following stars: Vega, $\alpha$ Crv, $\beta$ CVn and $\epsilon$ Eri. I have been given their parallax, luminosity, $m_{B}$ magnitude and the $m_{V}$ magnitude. Now I'm asked to first calculate the distance $d$ of all the stars aswell as the absolute bolometric magnitude $(M_{bol})$ of the stars. Now I used the basic parallax formula for the distances: $$d=\frac{1 AU}{\tan{\theta}}$$ with $\theta$ the parallax in milli-arcsec. Now as for the absolute bolometric magnitude, I first wanted to use the distance modulus to calculate the absolute magnitude, but since I don't have the bolometric magnitude this isn't possible I think, so I used the formula that uses the luminosity given by: $$M_{bol}=M_{bol,\odot}+2.5\log\frac{L_{\odot}}{L}$$ I think I found the right values, but now there is a second question where they ask to compare the apparent magnitude in the V-band of the four stars with the observed apparent magnitudes of stars with the same B-V index in the Pleiades cluster, where they've given a figure of the HR-diagram of the Pleiades. Then they ask to calculate the distance to the Pleiades based on the mean apparent visual magnitudes. So as I said the first question I think I have, so the distance and absolute bolometric magnitude, but I don't know how we can find a distance for the Pleiades based on all that.
Comment: Also the HR-diagram of the Pleiades, the y-axis is $m_{V}$ and the x-axis is the $B-V$ index
Answer: The difference between the apparent magnitudes of two stars of the same spectral type (or colour in this case) is equal to the difference in their distance moduli (ignoring any extinction effects).
i.e. If we take two stars of the same spectral type and assume that they have the same absolute magnitude $M$:
$$ m_1 - M = 5\log d_1 - 5$$
$$ m_2 - M = 5\log d_2 -5 $$
subtracting one from the other:
$$m_1 - m_2 = 5(\log d_1 - \log d_2)\ . $$
Since you know the apparent magnitude and distance to your calibration stars ($m_1$, $d_1$), then you can work out the distance of stars in the Pleiades that have apparent magnitude $m_2$ and the same spectral type. If you have many stars to compare or a a range of apparent magnitudes in the Pleiades at the same colour (remember that some of these may be binaries) then you will need to do some averaging.
Comment: I've found the difference between the apparent magnitudes of the stars respectively: $0, 0.34, 0.61$ and $0.88$. Now if I took a look at the HR-diagram the same $B-V$ index corresponds with respectively apparent magnitudes on the main sequence between: $6-8, 8-9, 9-11$ and $10-12$ with here and there some stars that also have that $B-V$ index but lie way above or beneath the main sequence. But okay I kind of understand what you are saying, but in order to find the distance to the Pleiades with the distance modulus I also need to find the absolute magnitude of the Pleiades, or is that incorrect
Comment: Ahh I get it, although I don't seem to get the right answer, I found 411.09 ly and the correct distance is 444.2 ly, but could this be because of the way I probably chose the apparent magnitudes of the HR-diagram of the Pleaides?


markdown subset

Question: I am looking for a markdown parser, preferably Javascript, that I can customize. In particular, I would like to remove the option for using actual HTML tags.
I tried editing the source of showdown, but couldn't figure it out.
Jquery integration would also be nice, though not a must.
BTW, since I have started looking into markdown, I found a bunch of references on the SO blog/podcast to a rewrite of the markdown parser using a lexer/tokenizer/parser. I'm not really sure what that means, but I gather it will mean an easier to read and edit parser. I haven't been able to find any more details about it. Did this ever happen, or was it just toyed around with for a while and dropped?
One more thing: Is the SO markdown editor+preview+toolbar available anywhere? How about as a Jquery plugin? Are they still using the WMD-editor, or a rewrite?
Answer: According to this blog post from 2008 the creator of the WMD project is no longer taking care of WMD. If you see the source of SO, you can see that they are still using the WMD editor, it may be slightly modified though.
As for the alternatives:

markitup (using jQuery)
derobins fork of the WMD
Comment: StackExchange has an open source fork of WMD/Showdown http://code.google.com/p/pagedown/

markdown subset


set up hornet node failed

Question: I follow the guide to set up a iota node,but when I call http://0.0.0.0:14265/api/v1/tips,I got error
error: {
code: "503",
message: "Service Unavailable, error: node is not synchronized: code=503, message=Service Unavailable"
}
Answer: Not sure which guide you followed, there are several on the net. If you are using the Hornet-node software: a good place to start is the official Wiki for Iota at https://wiki.iota.org/hornet/getting_started .
For the result of the tips call: the node has first to become synced before tips can be created. A node can only be synced if it has peers, either by enabling Autopeering in the config or add manually peers, e.g. by asking in the Iota Discord channel nodesharing at https://discord.com/channels/397872799483428865/398600007378272256
Comment: +1 enable autopeering. its probably disabled.

set up hornet node failed


Poor sound quality and headphones not working

Question: I'm running ubuntu 10.10 and my soundcard is a realtek alc880, with intel HDA controller. I have a very low sound, and, when I raise the volume over 50%, it sounds "cracked".
When I plug the headphones in, it keeps on playing through the speakers (and the headphones don't play any sound). In windows, it sounds fine, and the headphones work well. Please help!
Comment: As mentioned in my comment below, first please test a daily build of the sound driver.  If you're still experiencing the problem, please use `ubuntu-bug alsa-base`.
Comment: @Stefano Palazzo I know, it's mine, but since i'm on a different user i can't edit it and i wanted to ask it clearer.
Answer: Run alsamixer -c 0 in your console and use the arrow keys to play around with the volumes.
For me: Setting Master to a value where the sound quality was good enough made it very very low. Setting Master to maximum, decreasing PCM to 81 and setting everything else to 0 fixed the problem.
UPDATE: (for Ubuntu 10.10) Click on the volume icon in the upper-right corner, then click on Sound Preferences, and make sure that the Output volume doesn't go above "Unamplified." Then, click on the volume icon again and see where the volume meter is positioned. That is the maximum volume you should set in order to hear a clear sound.
OR: (for Ubuntu 10.10) Click on the volume icon in the upper-right corner, then click on Sound Preferences, set the main volume to 100% and set the volume for each application to a more appropriate level. Each time you open an application that needs to use sound for the first time, you have to do this (because applications that don't currently use sound don't appear in that list).
You currently have to choose between annoying and complicated :(
Answer: i suggest you to use pulseaudio system wide equalizer.

Ubuntu Lucid User

PPA
sudo add-apt-repository ppa:psyke83/ppa

Then install by typing
sudo apt-get update && sudo apt-get install pulseaudio-equalizer

Ubuntu Maverick User

You have to install it manually by downloading .deb file below,
Pulse Audio Wide Equalizer ==>  for both 32bit and 64bit
Comment: alright, i've just installed it. what now?
Comment: what the? when i enable the EQ, the sound stops working...
Answer: I had exactly the same problem and this is how i made it work
http://ubuntu-ky.ubuntuforums.org/showpost.php?p=10050353&postcount=16
and here is the general link as given in the above link
https://help.ubuntu.com/community/HdaIntelSoundHowto
Comment: but, how come this does work if my computer isn't a thinkpad?
Comment: and the headphones still don't work...
Answer: I would look at the mixer first. Right click on the sound icon in the notification area. I use Kubuntu, so am not sure of the exact terminology. It will be at the bottom of the drop down. In Kubuntu it is show mixer window, but it will be similar. Then check the sliders and muted boxes. Uncheck ones that affect your headphone jack and slide the slider farther forward for your master volume.
Comment: This means your card is not supported then. Try updating alsa by adding this ppa. https://launchpad.net/~ubuntu-audio-dev/+archive/ppa
Comment: Try running alsamixer in the terminal, you might just have to mute the front channel manually when you plug headphones in. Play with those a bit.
Comment: adding this and updating will upgrade tha alsa drivers?
Comment: Well, you really only want to install linux-alsa-driver-modules as per the instructions at https://wiki.ubuntu.com/Audio/InstallingLinuxAlsaDriverModules.  Please make sure you also read the caveat at https://wiki.ubuntu.com/Audio/UpgradingAlsa.  Please don't hesitate to file a bug (`ubuntu-bug alsa-base`) against alsa-driver if you're still experiencing problems.
Answer: Gnome ALSA Mixer : reducing PCM makes quality
Comment: if i do that, the sound gets too low to be heard
Answer: There are some solutions for the Intel HDA sound controller on ubuntu community documentation. At the end of the page there is a tip about getting the driver from realtek site.
Answer: Intel HDA has a lot of problems. Getting it to work (from what I've seen and experienced) is hit or miss. The kubuntu user is right about your volume mixer, which you may have to configure to show all options (slider controls). For me it was bringing Headphone jack sense into the mixer and enabling it. (It was disabled by default.)
Answer: Have you tried fiddling with alsamixer in the terminal? If turning up the volume makes the quality terrible then your PCM values may be way too high.
Comment: yes, but that makes the sound volume too low.
Comment: I've been through that road before, too. I think it's just bugs in your alsa drivers. It's just finding the perfect balance between actual volumes and the PCM volumes.
Answer: For these types of problem there are specific steps to follow,

Obtain the full technical information of your system by following the commands at https://wiki.ubuntu.com/DebuggingSoundProblems and performing the rest of the steps. You can also obtain the information about alsa-info.sh (see previous URL for more), which will helps us to direct you from here.
Install the latest Alsa packages
according to the instructions at
https://help.ubuntu.com/community/HdaIntelSoundHowto Then reboot. In this way you will get the latest Alsa code which may include better support for your sound card. This is an easy way to try to fix if you do not want to read much.
Answer: If you have windows installed be sure this is not set to mute. I just find out this was the problem, why skype with headphones didnt work. Also set skype, in options, not to adjust the sound, and turn the input sound in sound preferenses to the highest lewel.


Indicator Menu Replacement for notification area?

Question: I'm looking for a Indicator Menu, that replaces the notification area. Any Systray Icon should be in a Identicator Menu, because on Netbooks the Application Menus and the Systray Icons overlap sometimes
Comment: Can you clarify your question? I have no idea what you're asking for here.
Comment: you know the systray, where all the application icons live, like Dropbox, Networkmanager and so on. I want to move all these Icons in one single drop down menu
Answer: If I understand your question correctly, you are not looking for a menu but for a GNOME applet that will integrate into a panel and display these icons in an expandable menu-like view. There is no such applet that I know of, but you state that you need this in order to solve space problems on a netbook. If so, I'd suggest creating a second panel, moving the "panel notification area" (aka systray) there and setting the panel to a small size and autohide somewhere on a screen edge.
Alternatively, you could also move any other elements from your main panel there -- I generally create an auto-hiding application launcher on the right screen edge where it does not take away space and is easily reachable by "throwing" the mouse to the top right corner.
Comment: It's for Unity, not Gnome


CSS3 keyframes in JavaScript

Question: Is it possible using animation keyframes in JavaScript? If your answer is no, please tell me how can I use codes like this?
I wrote my jQuery plugin but I don't know how can I use keyframes.
animate() doesn't work (translateZ...)
Comment: define classes in css and then use addClass removeClass by jquery!
Comment: use classes per http://stackoverflow.com/questions/8568623/trigger-css3-keyframes-using-jquery
Comment: I want to change keyframes values
Answer: Here is a third party library that allows for a variety of different translations.
http://ricostacruz.com/jquery.transit/
If that still doesnt so what you need you can refer to this question
Set Webkit Keyframes Values Using Javascript Variable
which will show you how to inject rules into the CSSOM dynamically using jQuery
Somewhat working fiddle for Firefox
uses
@keyframes rotate {
    0% {-moz-transform: rotate(-10deg);}
    100% {-moz-transform: rotate(-10deg);}
}

and other vendor prefix specifics. There seems to be some kind of problem where sometimes the animation will trigger but other times it wont. Haven t been able to figure out why
Comment: First link broke my styles
tnx
Comment: Did you include it properly
Comment: Yep
Before include: http://kanakh.com/upload/uploads/13780157531.jpg
After include: http://kanakh.com/upload/uploads/13780157532.jpg
Just write this:
Comment: Ahh ok i would say the problem is that the library is most likely applying translate3d(0, 0, 0) to all the elements to prepare for transitions. Look into the second half of my answer if that is not acceptable.
Comment: I don't know how remove webkit http://jsfiddle.net/russelluresti/RHhBz/2/
when remove all the webkit it doesn't work in firefox
Comment: you need to use the vendor prefix `-moz` for firefox
Answer: You first need to research css3 keyframes then maybe make a small example for yourself to get a basic understanding.
jQuery.Keyframes allows you to generate css3 keyframes and attach events on the fly with javascript.

CSS3 keyframes in JavaScript


How can I test a microphone circuit with a test signal

Question: I have a microphone circuit very similar to below but I don't have a mic which is on back order.  I would like to test the circuit (and the processing that happens downstream) in the meantime.  Is it possible to hook up the electrical signal that comes out of an MP3 player (via the audio jack) to this circuit in lieu of the mic?  What other changes would I need to make?
Answer: The LM386 has quite a bit of gain which could saturate with a line-level input, but you have R2 in the circuit to compensate for that. You can set it to be a 20:1 divider so the signal level remains approximately constant.
Make sure to remove R1 from the circuit as this bias, while necessary for microphones with integrated preamplifiers, could cause distortion (or even damage) in the output stage of your MP3 player.
Keep in mind that the output of your MP3 player might be intended to drive a headphone which could have an impedance as low as 32Ω, this is unlikely to cause a problem but, if it was not properly designed, the higher impedance of your input could create distortion. You can just add a ~32Ω resistor from the input to ground if this becomes a problem.
But with those things in mind, yes, you can use your MP3 player to provide a test signal.
Answer: A mic might put out something like nominal -60 to -40 dBV which is roughly 1-10mV. This varies a lot depending on the actual source and microphone itself, but that should give you a rough idea of the signal levels you're dealing with.
You can use the microphone's sensitivity rating to figure out how much voltage it will produce with a given SPL in the air. But for a simple test like this that's probably overkill.
Typical mic source impedance is roughly around 150Ω or so. You can also check the spec sheet of the mic you ordered.
So for your test you could send some signal out of your mp3 player, turn it down until it reads roughly in the range of 1-10mV, and add a series resistor to bring your source impedance up to around 150Ω.
You would need to remove R1 as @EdgarBrown mentioned as that could damage your player.
Hope this helps.


Continue a Civ5 game over internet that started on LAN

Question: Is it possible to start a multiplayer game of Civ 5 on a LAN connection, save the game in progress, and then at a later point, continue the game over the internet? If so, how can I do this?
Comment: Are you saying you want to have some players connect via LAN and some players connect over the Internet?
Comment: I do not know the answer to the first part so I will post here instead. Private rooms work by putting a password that your friend will need to know to get in to the room. Once he is in you can add as many AI as you want to fill out the rest of the players.
Answer: After every turn, the game is saved automatically. After you stop playing on a LAN game, you can normally restart by loading the saved game (which takes you to the lobby, so all the players can join again (or be replaced by AI if they don't want to join again)).
I imagine the process would be similar online.


Chrysler Town and Country Van Door

Question: I have a 2009 Town and Country and the automatic van door will not open. At least one problem is a broken plastic part that holds the thin wire in place which pulls the door open. I am attaching a picture of this part (obviously this is the one on the other side that is not broken; the broken one ended up in pieces). I am hoping that I can simply replace this part, put the wire back in, and be good to go. If anyone can tell me what the part number is I would appreciate it; I cannot seem to track is down online. In addition, if anyone had the same problem and has any advice I would also appreciate that!
Comment: I have the exact same problem, were you able to get the replacement part??
Comment: I have the same problem. Did you find solution for it ??
Answer: That's part of the track assembly. Unfortunately, you'll have to replace the whole assembly as that exact part isn't available by itself (maybe you can find it at a pull-it-yourself type of junkyard, but I imagine they'd want you to take the whole assembly). Most likely, that assembly will have to be purchased through Chrysler.
I've also been told that the assembly has to be programmed to work correctly once it's installed, but I can't confirm that as I've never changed one myself.
Answer: Along with that commonly broken bracket, the wiring harness for the door is known to wear inside the plastic track and stop working. Replacement door wiring harnesses are available because of the frequency of the failure, but it's not hard to just replace the failed wires individually and probably cheaper at shop rate than the replacement harness.

Chrysler Town and Country Van Door


Toilet in spare bath runs automatically for 2 seconds about every 20 min!

Question: This started a few weeks ago in the spare bath room, I replaced all internal parts in tank and problem still present. The main bath which is closer to main water source operates fine, what could be my problem?
Answer: The only possible cause is a slow leak.  There could be leaks in several places:

Flapper valve:   Did you replace the flapper?  Did you clean the flapper valve seat?  Run your finger all the way around it to feel for deposits and nicks.  Repair with light use of sandpaper.
Tank bolts:  These fasten the tank to the bowl unit.  If these were to leak, most toilets would weep water over the backside of the bowl housing onto the floor.  Check for moisture back there and all around on the floor.  Some toilets can weep here but direct water into the bowl.  The only way to discover this is by taking the bolts out and checking whether the bolt head seals are in good condition.
Inlet seal:  Where the water enters the tank from underneath is another area where gaskets prevent water from exiting the tank and weeping down the water line.  Check for moisture here.
Comment: I did replace the tank bolts and seals as well as the inlet seal. I will check the flapper valve and hopefully that's the culprit. Thank You!


Left Inverse: An Analysis on Injectivity

Question: I'm told that $g$ is a left inverse of $f$ if $g\circ f=1_X$. I'm also told that if $f$ has a left inverse, then $f$ must be injective. I'm now asked to prove the converse, namely that if $f:X\rightarrow Y$ is injective, then there exists a function $g:Y\rightarrow X$ such that $g\circ f =1_X$. Where might I start here?
Comment: If $X$ is empty, then for any $Y$ there is an unique injection $i:X\to Y$. On the other hand, if $Y\neq \emptyset$ then there are no maps $Y\to\emptyset$.
Comment: It's not true if $X=\emptyset$.
Comment: Try it with particular finite $X,Y$. In particular, pretty much all injective maps are "like" inclusions where $X\subseteq Y$ and $f:X\to Y$ is the injection map.
Comment: @ThomasAndrews Explain your $\emptyset$ comment.
Answer: One way to think about injective functions is that they preserve information in the domain. Suppose $f:X\to Y$ is injective, then we can tell whether $x=y\in X$ just by looking at whether $f(x)=f(y)\in Y$, so we see the information about points in the domain are preserved by this mapping.
Then it follows easily that such functions have left-inverses, because since all information in the domain is preserved in the image, then we can get the domain from the image. This is what a left-inverse does.
Following this philosophy, we might just define this $g: Y\to X$ on two pieces. On $f(X)$, we define $g(y)=x$ where $f(x)=y$. On $Y\backslash f(X)$, we just pick an arbitrary point $x^*\in X$ and let $g$ maps constantly to this $x^*$.
Answer: Assume $X$ is not empty. If $f:X\to Y$ is injective define $g:Y\to X$ by $g(y)=x$ if $y=f(x)$ and define it arbitrarily on the rest of $Y$. With this definition we have that
$g(f(x))=x$ by definition. so $gof=Id_X$
Answer: Since $f: X \to Y$ is an injection, it is a bijection onto its image.   Hence, there is an inverse $h: f(X)  \to X$.  Choose a point $x \in X$.   Define $g: Y \to X$ by
$$
g(y) =
\begin{cases}
h(y) & \text{if } y \in f(X) \\
x & \text{otherwise}
\end{cases}
$$


Multiple audio tracks in mediaelement.js WP plugin?

Question: I am trying to make the audio player display multiple tracks running the mediaelements.js WP plugin. I have tried to use a comma delimited list in the shortcode and this is not working. Do I need to change something in the code somewhere?
Answer: I don't think it's possible at the moment.
Check out this Player
http://wordpress.org/extend/plugins/mp3-jplayer/
Example for multiple tracks:
[mp3-jplayer tracks="myfileA.mp3, myfileB.mp3, myfileC.mp3"]
Hope that helps,
cheers!


Can't free proxies be used to create a botnet?

Question: I recently learned that there are plenty of services on the internet that offer/list free public proxies (freeproxylists.net, hidemyass.com, proxyscrape.com to name a few). Is this safe? Can't an attacker easily connect to multiple of these free proxies at once and essentially build a botnet?
Comment: Yes, they can. Any resource can be abused.
Answer: A bot (as in botnet) is something different than  a proxy. While attackers can use proxies to hide their own IP address from the target they can not actually control the proxies with small commands to mount large attacks against some target. A proxy just passes through the original traffic, i.e. an attacker would need to have lots of bandwidth by its own to mount an attack against some target with the same bandwidth.
A bot instead provides a way for the attacker to run arbitrary actions. Specifically it is possible to control lots of bots with only little bandwidth, but let these bots then mount bandwidth-intensive attacks against the DDoS target.
Comment: I would add that bot nets, like proxies, can provide anonymity to the real attacker, so in that sense there is some overlap of malicious use case.  However, as Steffen says its a totally different thing.  The proxy gives you zero computer power, only anonymity, and perhaps it does some bad things to you on the way (beware free proxies )


How can I reserve memory for pointer to an array in Delphi?

Question: I'm developing class to represent special kind of matrix:
type
  DifRecord = record
    Field: String;
    Number: Byte;
    Value: smallint;
  end;

type
  TData = array of array of MainModule.DataRecord;

type
  TDifference = array of DifRecord;

type
  TFogelMatrix = class
  private
    M: Byte;
    N: Byte;
    Data: ^TData;
    DifVector: ^TDifference;
    procedure init();
  public
    constructor Create(Rows, Cols: Byte);
    destructor Destroy;
  end;

Now in constructor I need to reserve memory for Data and DifVector class members. I use pointers to array of records, as you see. So, the main question is, how can I correctly reserve memory? I suppose I can not use something like that:
new(Data);
new(DifVector);
cause I`m loosing the main idea - to reserve memory space, as much as I want to, at run-time. Thanks for comments.
Answer: Since you're using dynamic arrays, array of, then you should use SetLength to specify the length of the array, which can be done dynamically.
ie. like this:
SetLength(Data, 100);

This will not reserve 100 bytes, but will reserve enough space to hold 100 elements of whatever type the array holds.
Change your declarations for the arrays to simple arrays:
Data: TData;
DifVector: TDifference;

and use it with SetLength, it should do the trick.
Comment: and what about Data? It`s a matrix so I need to use 2 parameters? SetLength(Data, M, N)?
Answer: Also note that In Delphi variables of a dynamic array type are stored as a pointer (in DotNet-speak you would call this a reference-type).
Unless you cast this variable to a pointer, the compiler won't let you do the allocation yourself. You should use SetLength() like lassevk mentioned already.
With a multi-dimensional array (like TData), you could set both dimensions in one go, by setting all dimension with one call to SetLength(). This results in a cube-like structure (each dimension has equal length). But it's also possible to give each index within a dimension a different length to it's next dimension. With two dimensions, this is sometimes called a 'jagged' array.
To do this, you would write it out like this :
SetLength(Data, SizeOfFirstDimension);
for i = 0 to SizeOfFirstDimension - 1 do
  SetLength(Data[i], SizeOfSecondDimensionPerIndex(i));

In this example, I use a function called 'SizeOfSecondDimensionPerIndex' to determine the size of each array in the 2nd dimension, but you could determine this size any way you want.
On a side-note, I would advise you to use the 'R'-prefix for record-type definitions. I know this not in any of the major coding-style guides, but if you look at 'P'-prefixes for pointers, 'I'-prefixes for interfaces, 'F'-prefixes for class-fields, 'a'-prefixes for arguments, 'C'-prefixes for constants, 'S'-prefixes for resourcestring's, you can follow this logic and use an 'R'-prefix for records. I know this has helped me to get a better grasp of my code!
Good luck!


Is Xinerama causing issues with my code?

Question: After trying to get a basic "Hello World"-like XServer application up and running, I've found that, no matter what I try, I keep running into the same error, which is:
X Error of Failed request: BadMAtch( invalid parameter attributes )
Major opcode of failed request: 78 ( X_CreateColormap )

At first, I thought it was my drivers, so I updated them to 290.10 (nVidia).
My (relevant) setup consists of the following:
nVidia GTX 550 Ti
Sabayon Linux
Kernel 3.2

But, after some surfing, it seems like it could be either the fact that I have dual monitors (one connected to an hdmi-mini port, the other vga/dvi), or the fact that I have Xinerama enabled, or both.
I tried to compensate for both monitors by creating two GLXContext objects in my code, which, as expected, didn't do anything (be nice: I just started learning this API). I did this because it seemed like a GLXContext had something to do with monitor input/output.
After that didn't work, I tried glXGetConfig, and that didn't work either. So, I started looking around more and found a post on a forum (written a couple years ago) about someone having issues with disabling Xinerama, and that that was causing the issue. The weird thing was that this was posted back in 2009, so one would think that nVidia had fixed this by now.
I'm at a loss as to what to do, and I believe that I'm kind of screwed some how unless I can fix this.
Anyone can view my code here (pastebin), along with my post on SuperUser here.
I could really use some help on this one.
tl;dr
setWindowAtt.colormap = colorMap;
setWindowAtt.event_mask = ExposureMask | KeyPressMask;

win = XCreateWindow( dp, root, 0, 0, 600, 600, 0, visualInfo->depth, InputOutput,   visualInfo->visual, CWColormap | CWEventMask, &setWindowAtt );

XMapWindow( dp, win );

XStoreName( dp, win, VI_UN_DEF_WIN_NAME );

glxContext = glXCreateContext( dp, visualInfo, NULL, GL_TRUE ); //error

glXMakeCurrent( dp, win, glxContext );

Comment: Please provide [Short, Self Contained, Compilable, Example](http://sscce.org/). It will be much easier to analyse.
Answer: The clue is right in front of you:
Major opcode of failed request: 78 ( X_CreateColormap )
That means XCreateColormap failed. If it wanted to tell you a GLX command had failed, it would have said something about GLX instead.
After reading the rest of your code: the visual you're getting from glXChooseVisual is probably a TrueColor-class visual, and - as the manual for XCreateColormap says - TrueColor visuals must be allocated with AllocNone, and will throw BadMatch if you don't.


Exporting Infopath Data with Structure to Excel

Question: I have layout table in infopath form. Which has text boxes in each cells of the tables. I have Named the header row of the table because Infopath does not have label control. I want to export same structure with data to Excel. When I tried to do that, infopath exports all the layout table data just in a single row in Excel. I want to keep the structure of the Layout Table intact (5 rows and 12 columns in Infopath Layout table with data) should be rendered as a table with 5 rows and 12 columns in Excel.
Answer: Only success I've had getting an InfoPath form to Excel is to  choose "Export to Web" in InfoPath (2010) to create an *mht file, and then drag the *mht into Excel.


AKS Primes algorithm in Python

Question: A few years ago, it was proven that PRIMES is in P. Are there any algorithms implementing their primality test in Python? I wanted to run some benchmarks with a naive generator and see for myself how fast it is. I'd implement it myself, but I don't understand the paper enough yet to do that.
Comment: AKS is of great theoretical importance but its performance is terrible (Miller-Rabin is much better). There are many primality tests implemented in Python.
Comment: Sorry to disappoint you but there is a little mathematical misunderstanding here! Although we haven't formally determined if `P == NP`, but even if `P != NP`, it doesn't follow that `P == Fast`!
Answer: Quick answer: no, the AKS test is not the fastest way to test primality. There are much much faster primality tests that either assume the (generalized) Riemann hypothesis and/or are randomized. (E.g. Miller-Rabin is fast and simple to implement.) The real breakthrough of the paper was theoretical, proving that a deterministic polynomial-time algorithm exists for testing primality, without assuming the GRH or other unproved conjectures.
That said, if you want to understand and implement it, Scott Aaronson's short article might help. It doesn't go into all the details, but you can start at page 10 of 12, and it gives enough. :-)
There is also a list of implementations (mostly in C++) here.
Also, for optimization and improvements (by several orders of magnitude), you might want to look at this report, or (older) Crandall and Papadopoulos's report, or (older still) Daniel J Bernstein's report. All of them have fairly detailed pseudo-code that lends itself well to implementation.
Comment: Update: Another good exposition of the mathematics,by Terence Tao, here: http://terrytao.wordpress.com/2009/08/11/the-aks-primality-test/
Comment: @Progo: More precisely, it's the first test which we can *prove* is fool-proof *and* polynomial-time. There are other tests which we strongly believe *are* actually perfectly fool-proof (e.g. because it is possible to prove them assuming strongly-believed conjectures like the Riemann Hypothesis), and there are also other tests which we can *prove* are perfectly fool-proof, and which almost invariably run fast, but which we can't *prove* are polynomial-time. The breakthrough of the AKS was doing both.
Comment: @Progo, clearly you watched the numberphile video, which is very misleading.  It is not the fastest way, isn't the first fool-proof test, isn't the fastest fool-proof test, etc.  It is deterministic polynomial time, which we didn't have before without assuming the ERH.  We had (and still use today) APR-CL which is effectively polynomial time for any input we will be computing.  We had, and still use, ECPP which is expected polynomial time (but could run slowly due to randomness).  Both are "fool-proof" methods and are much faster.
Comment: The AKS-Test isn't the fastest way, but it is a the first fool-proof test for primes.
Answer: I simplified using Binomial Expansion,
from math import comb

def AKS(n):
    if (n ^ 1 == n + 1):        # check if it's even
        if n == 2:
            return True
        return False
    for i in range(3,n//2):
        if comb(n,i)%n != 0:    # check if any coefficient isn't divisible by n
            return False
    return True

Answer: Yes, go look at AKS test for primes page on rosettacode.org
def expand_x_1(p):
    ex = [1]
    for i in range(p):
        ex.append(ex[-1] * -(p-i) / (i+1))
    return ex[::-1]

def aks_test(p):
    if p < 2: return False
    ex = expand_x_1(p)
    ex[0] += 1
    return not any(mult % p for mult in ex[0:-1])
    print('# p: (x-1)^p for small p')
    for p in range(12):
        print('%3i: %s' % (p, ' '.join('%+i%s' % (e, ('x^%i' % n) if n else '')
                                   for n,e in enumerate(expand_x_1(p)))))

print('\n# small primes using the aks test')
print([p for p in range(101) if aks_test(p)])

and the output is:
# p: (x-1)^p for small p
  0: +1
  1: -1 +1x^1
  2: +1 -2x^1 +1x^2
  3: -1 +3x^1 -3x^2 +1x^3
  4: +1 -4x^1 +6x^2 -4x^3 +1x^4
  5: -1 +5x^1 -10x^2 +10x^3 -5x^4 +1x^5
  6: +1 -6x^1 +15x^2 -20x^3 +15x^4 -6x^5 +1x^6
  7: -1 +7x^1 -21x^2 +35x^3 -35x^4 +21x^5 -7x^6 +1x^7
  8: +1 -8x^1 +28x^2 -56x^3 +70x^4 -56x^5 +28x^6 -8x^7 +1x^8
  9: -1 +9x^1 -36x^2 +84x^3 -126x^4 +126x^5 -84x^6 +36x^7 -9x^8 +1x^9
 10: +1 -10x^1 +45x^2 -120x^3 +210x^4 -252x^5 +210x^6 -120x^7 +45x^8 -10x^9 +1x^10
 11: -1 +11x^1 -55x^2 +165x^3 -330x^4 +462x^5 -462x^6 +330x^7 -165x^8 +55x^9 -11x^10 +1x^11

# small primes using the aks test
[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]

Comment: This is not the AKS algorithm; this is an **exponential-time** algorithm that implements the elementary idea behind the AKS algorithm with none of the ideas that makes it polynomial-time.

AKS Primes algorithm in Python


I need some help installing Inkscape on Raspbian

Question: I am using the latest release of Raspbian and I noticed that one of my favorite apps isn't in the software center. I can't seem to find Inkscape for Raspbian. Can someone help me install it?
Comment: `apt-cache search inkscape` - inkscape definitely exists as a package
Answer: In response to your comment:

I tried sudo apt install inkscape but it said that inkscape couldn't
  be found.

and to complete the answer from @Rishi, you definitely find inkscape in the default repositories of Raspbian. I use Raspbian Stretch Lite 2018-03-13. First make sure you have the default repositories addressed in the sources.list:
rpi3 ~$ cat /etc/apt/sources.list
deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi

rpi3 ~$ cat /etc/apt/sources.list.d/raspi.list
deb http://archive.raspberrypi.org/debian/ stretch main ui
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ stretch main ui

Then update Raspbian:
rpi3 ~$ sudo apt update
rpi3 ~$ sudo apt full-upgrade

Maybe reboot if you have many updates. And now you will find:
rpi3 ~$ apt list inkscape
Listing... Done
inkscape/stable 0.92.1-1 armhf
rpi3 ~$

Answer: Whenever you use Raspbian (or any other type of Debian/Ubuntu based Linux distro), there are two simple ways to install any package.

Download a ".deb" package and use a GUI.
Open your terminal and write the installer command this way.

"sudo apt-get install inkscape" [replace inkscape with any package you want to install]

It will ask for some permission and install for you.
Note: you need superuser permissions (sudo) to install a package.
Hope it helps!
Comment: It's probably worth mentioning to do a `sudo apt-get update` to make sure the repository lists are up to date.
Comment: I tried sudo apt install inkscape but it said that inkscape couldn't be found. I tried the .deb and it won't start because it needs a ton of dependencies. I don't want to download every dependency and every dependency's dependency. Can I add a repository that has Inkscape?
Answer: The version currently (November 2021) available via apt-get is old (0.92). You can get a modern version from the "snap store" (https://snapcraft.io/install/inkscape/raspbian). You can then launch it from the terminal. On my machine, a bunch of warning messages scroll by and then a perfect version of Inkscape 1.1 with all default extensions.


TypeError: cannot do slice indexing on  with these indexers [0.0] of

Question: I am try to classification income<=50k or >50k and write cross-validation function to get each Accuracy
X = df[['age','workclass','fnlwgt','education','marital_status','occupation','relationship','race','sex']]
y = df['income']
k_fold = 10

def k_fold_generator(X, y, k_fold):
subset_size = len(X) / k_fold
for k in range(k_fold):
    X_train = X[:k * subset_size] + X[(k + 1) * subset_size:]
    X_test = X[k * subset_size:][:subset_size]
    y_train = y[:k * subset_size] + y[(k + 1) * subset_size:]
    y_test = y[k * subset_size:][:subset_size]

    yield X_train, y_train, X_test, y_test

above are  ok
but  in
for X_train, y_train, X_test, y_test in k_fold_generator(X, y, k_fold):
        print("Error")

TypeError: cannot do slice indexing on
"class 'pandas.core.indexes.numeric.Int64Index'" with these indexers [0.0] of
"class 'float'"
Answer: subset_size is a float.
Which is exactly why slicing, which expects integers, does not work, as the error message tells you. I suggest working your way through a quick, basic Python tutorial before trying advanced tasks. :)
Presumably you happened upon some example code in Python 2, where the default division behavior is integer division and now try to execute it in a Python 3.x version. You can try subset_size = len(X) // k_fold which forces integer division. Alternatively you can do int(round(k*subset_size)) every time. I suggest the former.
Additionally, as your training data X_Train seems to be a proper pandas.DataFrame, you will probably have to resort to explicit integer slicing using .iloc.


My passport was machine washed while abroad

Question: I am on an L1b visa in the US with a foreign passport. It was machine washed, everything is readable, a little washing appearing on the visa. I don't have a US ID and I need to travel to the embassy in the US to get a new passport. Will the passport be okay to use for this trip?
Answer: I did something very similar to my (Canadian) passport. Like you, everything was readable including (importantly) the machine readable parts. I was allowed back into my country, and in fact continued using it for several years ( including to the US), although several times those checking it recommended I get a new one. When I finally did come to replace it I was told it was a damaged passport and couldn't be simply renewed, and should have been replaced.
So yes, you would probably be let into the US, and your passport should be usable as ID, but you should take steps to replace it as soon as reasonably possible. You should look into getting an alternate photo id for while your passport is being replaced.
Comment: OP is already in the US and needs internal travel/flight to the embassy where (s)he can apply for a new passport.


Advantages and disadvantages of braising a pot roast covered in the oven vs on the stovetop

Question: Obviously there are major differences if the pot roast is cooked uncovered in the oven. That aside, are there differences if it is covered?
Comment: What do you mean by "a wet roast"?
Comment: You can't roast on a stovetop.
Comment: A roast is usually cooked by radiant heat, without liquid and in an oven.  A braise is usually a protein that is often browned, then slowly cooked in liquid. A braise can happen in the oven or on the stove top, while a roast is cooked in an oven.  Can you clarify your terms?
Comment: are you talking about braising ?
Comment: Yes, apologies. I mean a pot roast or braised meat. (Using the term "pot roast" here the way Mark Bittman does in his books.)
Comment: I've updated the question accordingly
Answer: Braising can happen in the oven or on the stove top, and covered or uncovered. Covering limits evaporation. Braising in the oven provides the convenience of keeping the stove top burners free, and provide a consistent radiant heat.  This might be important if uncovered, as evaporating liquid could create an issue with burning on the stove top.    Evaporation concentrates flavor.  This can be an advantage or disadvantage depending on your desired outcome. Braises are typically low temp/long time cooks.  While covering vs. not, might impact cook time, usually with a braise, I don't find the difference to be that significant.
Answer: The difference in taste should be minimal, if everything is done right. But for completeness, here a list of the advantages and disadvantages:
Advantages of the oven:

if the piece of meat is large, you run less risk of under- or overcooked areas
if you don't have enough collagen, the results will be less terrible than on stovetop
you are not limited to narrow vessels
one less hob occupied

Disadvantages of the oven:

needs longer time
uses more energy
risk of burning yourself if you grip the handles
your oven is occupied


Bypass truncated data type error in `CREATE TABLE AS`

Question: I am attempting to recreate the code from this excellent tutorial in MariaDB 10.2 to try and build nested sets from an existing adjacency list. (The goal being to ingest changes to the adjacency list one at a time and then rebuild the nested sets at certain time intervals).
However, I've hit a snag with this bit:
SortPath =  CAST(
                    CAST(anchor.EmployeeID AS BINARY(4))
                AS VARBINARY(4000)) --Up to 1000 levels deep.

I've switched it to this:
CAST(CAST(anchor.EmployeeID AS BINARY(4)) AS BINARY(4000)) AS sort_path ## Also with 8000

I also tried CAST(anchor.EmployeeID AS Binary(4)) AS sort_path
All approaches have thus far yielded a variant of this error message:
Truncated incorrect DOUBLE value: '1\x00\x00\x00'

EDIT
The full sql statement being run is this:
##===== Conditionally drop Temp tables to make reruns easy
DROP TABLE IF EXISTS hierarchy;

##===== Build the new table on-the-fly including some place holders
CREATE TABLE hierarchy AS

WITH RECURSIVE cteBuildPath AS
( ##=== This is the "anchor" part of the recursive CTE.
     ## The only thing it does is load the Root Node.
 SELECT anchor.tree_user_id,
        anchor.upline_id,
        1 AS hlevel,
        CAST(anchor.tree_user_id AS BINARY(4)) AS sort_path ##Up to 1000 levels deep.
  FROM example.tree AS anchor
  WHERE upline_id IS NULL ##Only the Root Node has a NULL ManagerID
  UNION ALL
 ##==== This is the "recursive" part of the CTE that adds 1 for each level
     ## and concatenates each level of EmployeeID's to the SortPath column.
 SELECT recur.tree_user_id,
        recur.upline_id,
        cte.HLevel + 1,
        cte.sort_path + CAST(recur.tree_user_id AS BINARY(4))
   FROM example.tree AS recur
  INNER JOIN cteBuildPath AS cte
          ON cte.tree_user_id = recur.upline_id
) ##=== This final SELECT/INTO creates the Node # in the same order as a
     ## push-stack would. It also creates the final table with some
     ## "reserved" columns on the fly. We'll leave the SortPath column in
     ## place because we're still going to need it later.
     ## The ISNULLs make NOT NULL columns.
 SELECT IFNULL(sorted.tree_user_id,0) AS tree_user_id,
        sorted.upline_id,
        IFNULL(sorted.hlevel,0) AS hlevel,
      #  IFNULL(CAST(0 AS INT),0) AS left_bower, ##Place holder
      #  IFNULL(CAST(0 AS INT),0) AS right_bower, ##Place holder
      (@n := @n + 1) AS node_number,
      #  IFNULL(CAST(0 AS INT),0) AS node_count, ##Place holder
        IFNULL(sorted.sort_path,sorted.sort_path) AS sort_path
   FROM cteBuildPath AS sorted
   JOIN (SELECT @n := 0) n ON 1=1
   #ORDER BY sorted.sort_path
 #OPTION (MAXRECURSION 100) ##Change this IF necessary
;

What is the correct way to duplicate the desired logic in MariaDB 10.2?
Comment: I'm not sure where the `double` is coming from ....? BINARY(4) is four bytes, so can store an INT, but not a BIGINT. What is the data type of `example.tree.tree_user_id`? Maybe try BINARY(8) or BINARY(16) instead, just to be sure. (And in both the places you use `CAST`.)
Answer: After much googling, I came to realize that the error message was exactly correct though somewhat vague.
Truncated incorrect DOUBLE value: '1\x00\x00\x00' meant that somewhere in my query, my CAST BINARY was being converted back to a DOUBLE data type.
Once I figured that out, re-reading the query made me consider how this little gem was working: cte.sort_path + CAST(recur.tree_user_id AS BINARY(4)). Turns out, based on a small sample query that the BINARY value was being converted so addition could be performed.
Switching to CONCAT(cte.sort_path, CAST(recur.tree_user_id AS BINARY(8))) appears to have corrected the problem.


Easiest Google Maps API (javascript/PHP)

Question: I have an array of latitudes/longitudes and Descriptions that I want to display on a Google Map.
Does anyone know of an API (or even better a tutorial) that describes a good way to accomplish this or something similar using PHP and/or Javascript?
Answer: http://code.google.com/apis/maps/index.html
Answer: The static maps API is the simplest to use. You can use PHP and cURL to grab the map you need with the data you have (latitude/longitude).
Answer: Google labss: Google fusion tables: then make those two lat/lon fields the "location"
google for the term: google fusion table map


Farmer cheese turns out inconsistently

Question: A couple of years ago I made farmer cheese from this recipe. It turned out great: creamy and delicious. Today I made the same recipe, and it turned out dry and crumbly instead. What would explain the inconsistency? The only thing I did differently is halve the recipe this time, but I can't see why that would alter the texture of the finished product.
Comment: Years ago ... there can be many different factors.
Have you tried doing a full recipe to see if it works the same as before?
Answer: Based on lots of experience making farmer's cheese (and backed up by the book One Hour Cheese), there are three factors which control the scale of creamy to dry & crumbly:

the degree of acidity at which you set the curd;
the length of time you cook it (keep it at 180F+)
the length of time you drain it

So my guess would be that you increased two out of three of the above, or all three, without intending to.  For example, you might have added the whole amount of vinegar instead of halving it, or, because you were draining half as much, it could have dried faster. Note that all textures from gloopy to sawdust are "legitimate" farmer's cheeses, and in Russian delis you can buy cheeses with the whole range of textures, for different applications.
Also, your cheese is not unsalvageable.  Depending on what you're using it for, you can add a little cream, sour cream, or full-fat yogurt to make it creamier.  And for that matter, dry and crumbly is perfect for making blintzes.
Comment: Interesting. I did halve the vinegar, so that's not it, but I also drained it for the full time. I suspect the draining time is the culprit. And, as luck would have it, my spouse did put in a request for blintzes...
Answer: Most likely a critical mass is required.   I would recommend the full recipe.
Comment: Nope; a half-gallon is a perfectly reasonably sized batch of cheese.  Now, if he'd cut it to 1 quart or less, it would have been hard to control the ingredient ratios, but a half-gallon is still pretty easy to measure things.
Comment: Could you explain what ingredient contributes to the "critical mass" (presumably some sort of reaction?) and what that means?

Farmer cheese turns out inconsistently


Researching background on life in Finland before immigrating to Canada?

Question: My mother arrived from Finland at the port of Quebec on June 2, 1923 at 23 years old. She resided for 19 years before passing away in Sault Ste Marie, Ontario. I would like to research her life in Finland through baptism, school, employment or other documents. I have access to persons in Finland for translation, document search, etc.
Comment: Hello, welcome to G&FH.SE!  Even though you have narrowed down the time frame to a very tight window, this question is a bit broad -- entire books could be written on how to get started researching the life of an immigrant in the old country.  As it stands you may only get very general answers. If you'd like to narrow the focus of your question, you can use the edit button as PolyGeo suggested.
Comment: Welcome to G&FH SE!  As a new user be sure to take our 2-minute [Tour] that introduces you to the site, which works quite differently to any bulletin boards, discussion forums and other Q&A sites that you may have tried.  We try to ask one question at a time, and I think your first question should probably be asking how to find her immigration record.  If you already have that, then there is an [edit] button beneath your question that you can use to tell us what it says about where in Finland she came from.
Answer: Let me guess: was your mother Anna Korttilalli (Kortti) who married Henry Selin in 1924? And that her parents were Jaakko Korttilalli and Anna Mikkola? If so then she was Anna Kreeta Korttilalli, born in Ii on July 17, 1899. It seems that this Geni profile is about Anna: https://www.geni.com/people/Anna-Selin/6000000032393226242. Maybe the manager of that profile can provide more information or further contacts. The baptism record is available online at the pay site sukuhistoria.fi. You could contact the parish for further information contained in the church records.
It might help a bit that Korttilalli is quite a rare name - there are currently only 20 people in Finland having that name. Maybe your contacts in Finland might be able to find her relatives.
Answer: For generic help with Finnish genealogy a good starting point may be FamilySearch.org:

Guide to Finland ancestry, family history, and genealogy: birth
  records, marriage records, death records, census records, family
  history, and military records.

Alternatively, we currently have just a few Q&As here tagged finland that are worth reviewing for specific ideas.


Do you add your strength modifier to touch spells?

Question: I can't find anything explicit about whether a touch melee spell is considered a melee attack or not.
Answer: Yes, they are attacks.
By the book, a touch attack uses an attack roll. Attack rolls, on the other side...

Attack Roll
An attack roll represents your attempt to strike your opponent on your
  turn in a round. When you make an attack roll, you roll a d20 and add
  your attack bonus. (Other modifiers may also apply to this roll.) If
  your result equals or beats the target's Armor Class, you hit and deal
  damage.
Automatic Misses and Hits: A natural 1 (the d20 comes up 1) on an
  attack roll is always a miss. A natural 20 (the d20 comes up 20) is
  always a hit. A natural 20 is also a threat—a possible critical hit
  (see the attack action). Attack Bonus
Your attack bonus with a melee weapon is the following:
Base attack bonus + Strength modifier + size modifier
With a ranged weapon, your attack bonus is the following:
Base attack bonus + Dexterity modifier + size modifier + range penalty

So, you use Dex if Ranged, or Str if Melee.
You add this only to the attack roll, not to the damage.

A Note on Game Design
Just a few extra pointers about the game design behind of this:
A few people have argued that Str on the Attack Roll on this case would not make sense. While I agree that this can be sometimes more a thing about precision than brute power, we need to see from where "power" comes from.
In real life, when you throw an attack, the power of the blow is dependent on three things: Where (if) you hit, the weight of the weapon - heavier weapons do more damage - and how fast your attack lands. Momentum is the product of Mass and Speed. D&D and a few other RPG's use Strength as a measurement of attack power, so they implicitly tie the speed of a blow to the character muscle power. You can't do damage by moving a big sword slowly.
Dexterity, on the other hand, is about muscle precision and control. It is not about speed. A (real life) archer do have high dexterity, but if you see an archer firing you will see that the most important thing to make an arrow hit the target is how you control your hands, not how "fast" you do this.
This logic reflects itself on D&D attack rolls. Attacks on which aim is more important than the speed of the blow (like ranged attacks with arrows and spells) normally use Dex, while attacks where the speed of the blow is the most important thing (as to bypass armor) use Str.
Throw-Weapons attacks are a hybrid of this. They use both Dex (to aim, the precision) and Str (to damage, the speed of the throw). Bows and Rays are like firearms - the damage (and the power of projectile) is independent of the muscle power of the one that fires them.
That's why D&D (and it's derivatives) permits that you add your Str to your touch attacks. A low Str Wizard will throw a slow punch, and since will be easily dodged, while a better than average Wizard will be able to make a fast movement and hit his enemy before it can dodge. A Wizard that chooses Weapon Finesse to touch attacks is doing something different - he is using a well timed attack and a calculated move, not raw speed, to land a blow. But doing that is harder, so that's why it needs a feat.
Answer:
Your attack bonus with a melee weapon is the following:
Base attack bonus + Strength modifier + size modifier
With a ranged weapon, your attack bonus is the following:
Base attack bonus + Dexterity modifier + size modifier + range penalty

In short melee touch attacks use Str because it is an unarmed melee attack. If it is a ranged touch, it uses Dex for calculating bonus to attack.
This also may help clarify: http://www.enworld.org/forum/showthread.php?257525-Touch-Attacks
Answer: D&D works by exception - it states general rules, and then they apply unless an explicit exception is stated. There is no exception stated to touch attacks vis-a-vis normal attacks except in how they are defended against. Therefore a melee touch attack uses your usual melee bonuses and a ranged touch attack uses your usual ranged bonuses (most often including STR and DEX bonuses, but of course there are exceptions). The attack itself is therefore like any normal attack roll, but applying defenses can be complicated.
Touch Attacks:

Some attacks completely disregard armor, including shields and natural armor—the aggressor need only touch a foe for such an attack to take full effect. In these cases, the attacker makes a touch attack roll (either ranged or melee). When you are the target of a touch attack, your AC doesn't include any armor bonus, shield bonus, or natural armor bonus. All other modifiers, such as your size modifier, Dexterity modifier, and deflection bonus (if any) apply normally. Some creatures have the ability to make incorporeal touch attacks. These attacks bypass solid objects, such as armor and shields, by passing through them. Incorporeal touch attacks work similarly to normal touch attacks except that they also ignore cover bonuses. Incorporeal touch attacks do not ignore armor bonuses granted by force effects, such as mage armor and bracers of armor.
Answer: As a wizard in Pathfinder who frequently uses touch spells, not melee attacks, I worked out with the DM that my Intelligence modifier is best used to calculate my attack when using these spells. I think it is only logical that a caster would use their primary ability to hit with touch attacks since melee and ranged classes use strength and dexterity. While my touch spell to hit is still lower than these other classes, I still manage to keep up damage-wise with what they are doing.
Answer: While the rulebook doesn't say anything useful in that respect, common sense decidedly says: "No".
Although the book appears to say "all other modifiers, such as your size modifier, Dexterity modifier, and deflection bonus (if any) apply normally", it really only says that all defensive modifiers apply normally, in particular the dexterity modifier. Which makes perfect sense. It doesn't say anything about attack modifiers, though admittedly it doesn't explicitly say that the strength bonus does not apply either.
Applying a strength modifier to the hit roll however does not make sense (though one might allow a dexterity modifier similar to a ranged attack).
The reason why a melee attack includes a strength modifier in the first place is that by definition hitting is not just making some haphazard contact between your opponent and your weapon, but hitting the opponent hard enough as to puncture/punch through the armour, worn or natural, and do actual damage.
Now, in order to inflict damage, you normally need to act with sufficient force, so hitting someone with greater strength is quite obviously more likely to deal damage. Insofar, a strength bonus makes sense.
For a touch attack, this does not apply. Armour does not count, since you do not need to punch through the armour, you merely need to touch the target -- tapping on the breastplate is enough.
But as a logical consequence, whether you touch them gently or with great strength also makes no difference. Having great strength is no particular advantage (just like wearing armour isn't), and therefore should not give a bonus.


Width of repeating backgrounds

Question: What's best, a repeating background of 100px wide so that the actual file doesn't need to be redrawn 1000X times in width, or a 1px file that probably has smaller file size but the browser will need to redraw it a lot more?
Answer: A small file that the browser will have to repeat.  It takes almost no computer processing to repeat a 1kb file but repeating a 10-15kb file will be more taxing I'd think.  The smaller the better.
Answer: The standard image width to use for this sort of thing is 1 px. The smaller the image, the less data there is to transfer over the network, which means less time waiting for the page to load.
If you're going to be repeating some chunk of data anyway, why not make it as small as possible?
Comment: Sorry for the late reply here but to answer your question: why *not* make it as small as possible. I thought maybe, if I make a repeating image 10px wide instead of 1px, maybe the drawing process in the browser would be faster because it would only have to repeat x / 10 times.
Comment: @tdskate: you're welcome to run your own performance tests. I think you'll find a negligible difference in paint speed between repeating a 1px image and a 10px image. Also, if you're _that_ concerned about the performance difference then you should be using a 10000px wide image so the browser doesn't ever have to repeat the image. Here's what you should really take away from the discussion: **if performance is an issue, use the tools available to you** (profilers and the like) **and then optimize the objectively identified bottlenecks.** You're only wasting your time with...

Width of repeating backgrounds


Identity involving product of two binomial coefficients

Question: Emprically it looks like the following identity holds, but I haven't been able to prove it. Can anyone find a proof?
$$
\binom{m+k}{k}\binom{n+k}{k}=\sum_{i\geq0}\binom{m}{i}\binom{n}{i}\binom{m+n+k-i}{k-i}
$$
For some context, a corollary would be that the generating function for the LHS keeping $m$ and $n$ fixed is
$$
\sum_{k\geq0}\binom{m+k}{k}\binom{n+k}{k}x^k=\frac{\sum_{i\geq0}\binom{m}{i}\binom{n}{i}x^i}{(1-x)^{m+n+1}}
$$
Answer: We seek to prove that
$${m+k\choose k} {n+k\choose k}
= \sum_{q\ge 0} {m\choose q} {n\choose q} {m+n+k-q\choose k-q}.$$
We start on the RHS with
$$\sum_{q\ge 0} {m\choose q}
{n\choose n-q} {m+n+k-q\choose k-q}
\\ = [z^n] (1+z)^n [w^k] (1+w)^{m+n+k}
 \sum_{q\ge 0} {m\choose q} z^q w^q (1+w)^{-q}
\\ = [z^n] (1+z)^n [w^k] (1+w)^{m+n+k}
\left(1+\frac{zw}{1+w}\right)^m
\\ = [z^n] (1+z)^n [w^k] (1+w)^{n+k}
(1+w+zw)^m
\\ = [w^k] (1+w)^{n+k} [z^n] (1+z)^n
(1+w(1+z))^m
\\ = [w^k] (1+w)^{n+k} [z^n] (1+z)^n
\sum_{q=0}^m {m\choose q} w^q (1+z)^q
\\ = [w^k] (1+w)^{n+k}
\sum_{q=0}^m {m\choose q} {n+q\choose q} w^q
\\ = \sum_{q=0}^k {m\choose q} {n+q\choose q}
{n+k\choose k-q}.$$
Observe that
$${n+q\choose q} {n+k\choose k-q}
= \frac{(n+k)!}{q!\times n!\times (k-q)!}
= {n+k\choose k} {k\choose q}.$$
We get
$${n+k\choose k} \sum_{q=0}^k {m\choose q}
{k\choose q}
= {n+k\choose k} \sum_{q=0}^k {m\choose q}
{k\choose k-q}
\\ = {n+k\choose k} [z^k] (1+z)^k
\sum_{q=0}^k {m\choose q} z^q.$$
We may  extend $q$ to  infinity owing  to the coeffcient  extractor in
$z$:
$${n+k\choose k} [z^k] (1+z)^k
\sum_{q\ge 0} {m\choose q} z^q
\\ = {n+k\choose k} [z^k] (1+z)^{m+k}
= {n+k\choose k} {m+k\choose k}.$$
This is the claim.
Comment: Nice proof Marko. I'd not encountered coefficient extraction techniques before - very neat.

Btw, once we reach $\binom{n+k}{k}\sum_{q=0}^k\binom{m}{q}\binom{k}{k-q}$ the final step follows immediately from Vandermonde's identity, right?
Comment: Yes it would seem so.
Answer: That is known as Suranyi's formula, and you can find
a demonstration in this paper.
Also interesting is the context in which it is analyzed
in this other paper.