How can NSNotification be used to check a the status of an NSTask

Question: How can NSNotification be used to check a the status of an NSTask?  I know there are a couple of class methods inside the NSTask but don't really understand how to implement them in a Cocoa application.  Can somebody help me?
Answer: This blog post, Better way to read from an NSTask, describes how to use NSNotification to recieve notifications from an NSTask.
If you know that your task is not long-running, there is a simpler solution.  My answer to another SO question, Execute a terminal command from a Cocoa app, has an example of using NSTask that includes returning the status of the task w/o NSNotification
Answer: Thanks Gordon, I have tried out the solution you gave but what's confusing me is when I write the code:
NSPipe *pipe;
pipe = [NSPipe pipe];
[task setStandardOutput: pipe];

NSFileHandle *file;
file = [pipe fileHandleForReading];

[task launch];

NSData *data;
data = [file readDataToEndOfFile];

What is the output data can be return from the task?for my case the console window jus get stuck there and nothing have returned
Answer: Task will be stuck when you won't read what it is sending on stdout/stderr. That's why you need to create pipes and set them using setStandardOutput.
Use [NSFileHandle readToEndOfFileInBackgroundAndNotify] and wait for NSFileHandleReadToEndOfFileCompletionNotification. It will give you all data in the callback.


How do I prevent shoelaces from slipping through the holes when getting out of the shoes

Question: I have shoes which go over the ankles and require to untie the laces to get out of the shoes. Often the laces then slip through the holes which requires to redo more than just the knot when getting into the shoes again. Is there a way to prevent the laces from escaping?
Answer: One can put a small knot at the ends of the laces. One can still tie the laces as usual but since the knot is a bit thicker than the rest of the laces, they cannot slip through the holes anymore.
Answer: Edit:
I have recently adopted corset lacing, which is a continuous lacing method, for my two year old daughter's shoes to stop unlacing when putting shoes on a struggling toddler. I use a standard reef knot instead of the method described. There are two benefits to using a simple reef knot, (1) the result looks very much like a standard bow, (2) it can't get caught or pulled and untie, which is critical in my situation. The drawback (bonus for me) is it's not a slipping knot and requires slightly more doing to untie.
Original:
As has been suggested, your laces are essentially too short. There are a couple fundamental options, (1) longer laces, (2) a lacing technique that results in longer ends.
In my opinion, Ian's Shoelace Site is the go to site for tips and tricks to help with shoelaces. Ian literally has "Tips for Everyone."
Speaking directly to your issue Ian provides says this:

While the obvious solution for excessively short shoelaces is to
  replace them with ones of the correct length, here's some great
  emergency measures, especially if one lace end has broken at short
  notice and there's no ready replacement.

In his comparison of lacing techniques there are currently nine methods he suggests to "Lengthen" lace ends significantly, assuming replacing your laces isn't a option.
Replacing your laces with longer ones is probably a better solution and provides information about shoelace lengths saying this:

The rhetorical question: "How long is a piece of string?" is a serious
  question when it comes to shoelaces. Too long and the ends can drag or
  get stepped on. Too short and it can be difficult to tie a knot.

Your concern about longer laces being too long is absolutely legitimate and you'll find methods for shortening your laces by changing your lacing technique in Ian's veritable treasure trove of tips and techniques about shoelaces. Ian also provides links to other shoelace sites in case you don't find what you need at his site. His YouTube channel, Professor Shoelace, is also a great related source.
It turns out that lacing your shoes can be complicated and personal and I think trying to provide a single definitive answer would be folly; I hope you'll be able to find a solution that really works for you now.
Answer: The laces aren't long enough- the reason the lace slips through the top holes is because you need more room to get your feet in and out, and the laces aren't long enough to give you sufficient room. Usually, high tops come with extra long laces fitted, which enables you to slacken them and take them off without their coming out of the holes, but maybe you need more room or they weren't supplied originally. Not a hack, but buy longer laces...
Comment: I have the problem with the original laces. When I slacken them far enough to get out, there are only 1~2cm left, which is enough to slip away. Longer laces would do the trick, I assume, but wouldn't I then have rather long laces hanging around from the knot when wearing them?
Comment: @pseyfert I always like to tuck my laces into my shoes so I prevents from getting dirty/getting hooked onto objects. It works especially well if you have flat laces so you don't feel them which seems to be the case with your shoes in question.


Where is a teaming file that gives the runner type stored?

Question: If you create a bond using modprobe bonding then a file is stored in /proc/net/bonding/ giving the details of the bond. Is there any equivalent file, giving the runner type, for teamd?
Answer: I haven't been able to answer this question exactly. /etc/sysconfig/network-scripts will often have this information for the bond but I have been able to create situations (using teamd, teamdctl and ip link to set up the bond) in which this isn't the case.
The solution I settled on to find the runner type was running teamdctl dev <team> config dump. However, I didn't manage to find out where the config produced by teamdctl was stored. Finding where that is kept is probably the best answer to this question.
Answer: Apparently the team kernel module does not provide a similar /proc/net/ status file as the bonding module does. Instead, you must use the teamdctl command to query the current configuration.
In RHEL and distributions related to it, if you use the default runner type roundrobin, there will be no mention of the runner type in the /etc/sysconfig/network-scripts/ifcfg-<team> file, because the JSON configuration displayed by teamdctl <team> config dump is actually generated dynamically from default values whenever the team is started, so no JSON needs to be stored.
Other distributions that don't have the /etc/sysconfig/ directory will be using some other NetworkManager configuration storage back-end. In that case, check under /etc/NetworkManager/system-connections/: that's the storage location for NetworkManager's distribution-neutral configuration storage.
If your distribution is not using NetworkManager, but instead some other mechanism to store the network configuration (like Ubuntu's /etc/netplan or a minimal Debian installation's /etc/network/interfaces, then you'll need to investigate how they'll handle teaming. (If you have done that, feel free to edit this answer to add information.)
The most user-friendly way to change the runner type is probably using NetworkManager, e.g. with nmcli:
nmcli c mod <team> team.runner activebackup

This will cause the minimized non-default part of the teamd configuration JSON to be stored in TEAM_CONFIG variable of the /etc/sysconfig/network-scripts/ifcfg-<team> file. For example, the command above applied to a team previously created using default values will result in this line getting added to the team's configuration file:
TEAM_CONFIG="{ \"runner\": { \"name\": \"activebackup\" } }"

If you want to check the current state of the team, teamdctl <team> state view should output something that is more human-friendly than JSON.
If you are looking for something that could be easily checked by a monitoring system, then in /sys/devices/virtual/net/<team>/ directory, the operstate file says up if the team as a whole can pass traffic, and down otherwise. In the lower_<interface>/ sub-directories, there are similar files for individual team members. The carrier and/or carrier_changes files might be good candidates for monitoring too. But there does not seem to be anything that would clearly identify the runner type.


How do I display designs in second floor museum?

Question: I just got the second floor to the museum in New Leaf and I hung a bunch of designs on the wall and a few dresses standing up.  I went to the able sisters to get some more qr posters online.  I came back and the ones I'd replaced in my designs (which I have saved with mabel but I assumed I wouldn't need them any more for now) have all disappeared from the room. Does this mean you can only display designs that you have on your person? Because what's the point of being able to display your artwork if it's going to disappear if you want to have new designs? Otherwise the rooms are basically just going to be museum versions of your own house surely? Help?
Answer: Yes, you can only display designs in your town that are currently in the 10 active slots on one of your characters.
You can save designs via displaying them in the Able Sister's Shop and/or by talking to Mabel and asking her to save a design for you. However, if you move Design 1 in Slot 1 to Mabel's save, then put a Design 2 in Slot 1, Design 2 will be the one that shows up in the game. Design 1 will still be accessible, but will show up in-game only if you go back to Mabel and place it back in one of your active slots.
In order to get around this limitation, you can create other residents in your town and use them essentially as "design mules". Making a total of 3 other residents will give you another 30 active slots to play around with.
Otherwise, yes, you are correct, the other rooms can be essentially used as museum versions of your house (which won't be graded by the HHA, obviously). Given that you get special carpets for turning in X amount of Bugs, Fish, and Fossils, I'm personally going to be using those rooms to display extras of those things that I think look neat. I'm also making a Nintendo room. It's mostly extra space to give you opportunities to show off your collections.
Comment: There are a few places you can put designs that are not restricted to the ten in your inventory. I'm certain this includes your town flag and the signs outside the museum exhibits. I believe it also includes PWP signs and reupholstered furniture, but I haven't tested yet.


How does Krita compare to Corel Painter?

Question: I am new to painting and in the process of learning. I would like to know what advantages and disadvantages Krita and Corel Painter have. If you have used both of these Software and finished a painting using them, what are your positive and negative views on each Software?
I am only a beginner, so I cannot compare the two apart from preferring the Krita's user interface.
Comment: Get Krita for free, and Get Painter for a free 30 Day Trial. Before it looks ome tutorials to maximize the trial period.
Comment: My fav artists back in a day were all using Painter but I hated working in it so much: its quirkiness, brush settings overcomplexity — which was never an issue for others. Rafael is right: try them both and see what works _for you_
Comment: Also, why only Painter or Krita? No SAI, no Clip Studio Paint?
Comment: One big con of Corel Painter is that even very recent versions stop working with OS updates. As soon as the next year's version is out, Corel stops supporting the earlier versions, so you end up having to spend a lot of money -- sometimes yearly -- just to keep the software running even if you don't care about the new features. Just because they can't write software that doesn't break with each OS update, customers end up spending a lot of money. Something to keep in mind. (I've had it enough, and won't be updating anymore. Also there are lots of alternatives now.)
Answer: I am more familiar with Corel Painter than with Krita, but I will give it a shot
Expense
This is an obvious one for a lot of people. Corel Painter Essentials costs about $40 minimum. Getting the latest annual version of Corel Painter will set you back around $200, and the upgrades are about $99. Krita is free.
Similarly, brush packs for Corel Painter retail for about $30 each (and are generally not available for Essentials). I don't know if there's a corresponding version of sold Krita brushes. Both programs have many people giving brushes away for free and (outside of Painter Essentials), you generally have the ability to build any brush you might buy as long as you learn how to adjust brush parameters.
Brush Types/Expression
This is where the Corel Painter lines pull ahead in my opinion. While the gap is narrowing, Corel Painter is still probably one of the best pieces of software for replicating the look of traditional artwork. Their Thick Paint, Real Oil, and Real Watercolor brushes look and act like traditional media. As best I can tell, the Krita brushes act more like regular digital art brushes with a few small tweaks.
I am honestly not certain how the Krita and Corel Painter particle brushes compare, although a fair amount of the premium brush packs from Corel Painter are variations on particle brushes that do some pretty amazing things. The default brushes are a bit more underwhelming, although again, you can replicate all of the premium brushes with the right tweaks.
Stability
I have yet to see Krita crash when I was using it. Corel Painter has some persistent issues with application stability, with a running joke being that, much like Star Trek movies, the even-numbered ones are better.
Overall
If you have a lot of spare cash, or can get a good deal (they apparently sell pretty cheap educational copies for students, and Humble Bundle has offered it at a great discount twice), Corel Painter is probably slightly superior overall. However, it does come at a premium.
Comment: Thanks. How do you find the painting process different between these two software? How or why do you find Corel Painter easier to use? For example, does it have a better selection tool?
Comment: Honestly, I don't use Krita enough to really comment on that. One minor problem I have with Krita is that it doesn't work well by default with dual monitors. I have my Wacom tablet set to only map to the primary monitor (I use the second one for videos and reference) and Krita interprets that as that my tablet should only map to half of the monitor, something Corel handles smoothly. I suspect there are settings I can change, but that is one mark against it not working automatically.


Why is a niqab not allowed in Hajj but allowed in daily life?

Question: To the reader of the question, I have been thinking of wearing a niqab but the disallowance of the niqab by the Prophet Muhammad (S.W.) during Ihram at Hajj, is creating inconsistency with the choice of my wearing the face veil. Can you please provide me a solid answer in regard to the question given? Thank you!
Comment: The same applies to prayers (see [Is it forbidden to put cloth on ones mouth while praying](https://islam.stackexchange.com/questions/56395/is-it-forbidden-to-put-cloth-on-ones-mouth-while-praying)).
Answer: It is not allowed to wear a niqab (face veil) in the state of Ihram because the Prophet ﷺ forbade it.

ولا تنتقب المرأة المحرمة ولا تلبس القفازين
A woman in ihram should wear neither a veil nor gloves
— Bukhari 1838

The Hikmah for this is not mentioned in any hadith, rather it is simply a ritual like many others. For example the following are also forbidden in ihram while being permissible or even recommended outside of it:

wearing sewn clothes (shirts, trousers, socks etc.) or turban \ cap for men — Bukhari 1842
use of perfume — Bukhari 1842 , Bukhari 1839
shaving or trimming hair and nails — Quran 2:196
hunting  — Quran 5:96
marriage, sexual intercourse and other intimate acts — Quran 2:197, Muslim 1409

So it is a very weak argument to think that niqab is undesirable in daily life just because it is not permitted in Ihram.
Further in Ihram the use of a niqab is forbidden (i.e. touching the face with cloth) but it is still permissible for women to hide their face from men using other methods. This is virtually agreed upon by the jurists (Mawsoo'ah al-Fiqhiyyah: وإذا أرادت أن تحتجب بستر وجهها عن الرجال جاز لها ذلك اتفاقا بين العلماء ) and there are traditions that some of the Sahabiyat practiced it:

عن عائشة، قالت كان الركبان يمرون بنا ونحن مع رسول الله صلى الله عليه وسلم محرمات فإذا حاذوا بنا سدلت إحدانا جلبابها من رأسها إلى وجهها فإذا جاوزونا كشفناه
Narrated Aisha: Riders would pass us when we accompanied the Messenger of Allah (ﷺ) while we were in the sacred state (wearing ihram). When they came by us, one of us would let down her outer garment from her head over her face, and when they had passed on, we would uncover our faces.
— Abu Dawud 1833 - classed as Hasan by al-Albani in his grading of Mishkat but weakened elsewhere

المحرمة ... ولا تتلثم وتسدل الثوب على وجهها إن شاءت
Aisha said: A lady in Ihram ... can not wrap a veil but if she wishes she can  lower part of her garment over her face.
— Sunan al-Kubra Bayhaqi - classed as Sahih by al-Albani

عن أسماء بنت أبي بكر، رضي الله عنهما قالت: كنا نغطي وجوهنا من الرجال، وكنا نتمشط قبل ذلك في الإحرام
Asma bint Abi Bakr said: We used to hide our faces from men in the state of Ihram
— Sahih Ibn Khuzaimah and Mustadrak al-Hakim - classed as Sahih by al-Albani

عن فاطمة بنت المنذر، أنها قالت كنا نخمر وجوهنا ونحن محرمات ونحن مع أسماء بنت أبي بكر الصديق
Fatima bint al-Mundhir said, "We used to veil our faces when we were in ihram in the company of Asma bint Abi Bakr as-Siddiq."
— Muwatta Malik - classed as Sahih by al-Albani
Answer: In the narrations, not going under the shadows and not covering the face - both for men and women - is justified with this view:

Abdullah Ibn Mughirah asked Imam Kadhim (AS) about the shadow for Muharram. Imam (AS) in response considered it forbidden.
He said: I am heat and the heat is unbearable for me. Are there any solutions for me?
Imam (AS) said: "Did you not know that the sun sets due to the sins of the Muharram?"[1]That is, do you not know that the sun erases the sins of those who have become Muharrams?
Imam Baqir (AS) said: "A woman in ihram should not wear a niqab or veil; Because a woman's ihram is on her face and a man's ihram is on her head. "[2]
Regarding the wisdom of a woman's open face, Imam Sadegh (AS) said to a woman:
"If you dug in, your color would not change."[3] Indeed, if you wear a mask and veil, the color of your face will not change.
Therefore, the secret that the shadow and the canopy and the covering of the face are forbidden for the Muharram is that the scorching sun shines on his head and body to cleanse him of his sins and melt him. [4]
[1]. Kelini, Muhammad ibn Yaqoub, al-Kafi, investigator, corrected, Ghafari, Ali Akbar, Akhundi, Muhammad, vol. 4, p. 350, Tehran, Islamic Book House, Chap Chaharm, 1407 BC.
[2]. Hmann, p. 346.
[3]. Hmann, p. 344.
[4]. Darbarah Asrar Rituals and Rulings of Hajj Manand: Faali, Muhammad Taqi, Asrar Irfani Hajj, Tehran, Mash'ar Publishing, Tehran, 1386 A.M.; Rahbar, Muhammad Taqi, Ethics and Etiquette, Dar Hajj and Ziarat, Tehran, Mash'ar Publishing, 1383 st.


Linux equivalent for Windows shadow copies

Question: In Linux is there an equivalent for Windows shadow copies? I would like to use this for a small setup nothing big but it would be nice to have some type of functionality like shadow copies.
Answer: LVM snapshot(1,2) not full equivalent, but work fine. Also btrfs support snapshot.
Answer: You could look at R1Soft's free Hot Copy or commercial CDP solutions. The Hot Copy is a kernel module that allows you to take copy-on-write volume snapshots of mounted filesystems.
See their tips page: http://www.r1soft.com/tools/linux-hot-copy/hcp-tips/#c852
Answer: You could set up a mirror using LVM or md then break the mirror to get the snapshot, or use an overlay filesystem
Answer: Another possibility could be to use rsnapshot. But LVM snapshot is probably the better solution if you have a large amount of data.
Answer: I wouldn't recommend using BTRFS right now (as of this writing, it is still a rapidly developed product). But it is in a usable state, given the recent enough (4.2+ recent) kernel.
The mature alternative to both LVM and BTRFS is ZFS, and it has a number of advantages over BTRFS, i.e. recursive operations by default. I strongly recommend it, if you don't give a crap to licensing bullshit.
Comment: This answer is wront: using LVM snapshot, writing to the original filesystem will *not* affect the snapshotted one.
Comment: This answer is the most correct. ZFS is the best option PERIOD. I've been using ZFS Root with snapshots for years and its rock solid. BTRFS was ok but not as solid as ZFS. BTRFS saved my butt back in 2016 when I was playing with Suse.


What material is the LEGO laptop made of?

Question: What material is the LEGO laptop piece made of? It does not feel like their normal rubber and it certainty doesn't feel like ABS.
Comment: Probably the same as other flexible parts; i believe polyethylene.
Answer: It could be polyethylene or ABS. My guess is polyethylene because it is more flexible.
Comment: I wasn't aware thet LDD has such information. Your answer would greatly benefit from having such information posted in form of screenshot.
Comment: "It could be" and "my guess" aren't very strong arguments. Do you happen to have some data or source of the information to back up your answer?
Comment: @Alex Yes, I do. On my LDD app, it says made out of polyethylene. Also, polyethylene is more flexible than ABS. polyethylene would be used to make the "hinge" on the laptop, to make it close.
Comment: @Alex Some pieces do, some pieces don't. For example, different wall elements could be made of ABS or a variety of different plastics.


SCALA Lift - Call javascript with params from Comet actor

Question: I'm trying to get a comet class to call some javascript with params but can't seem to find the right way to go about it.
So far I have:
case class StreamItem(name: String, path: String, level: String)

class StreamComet extends CometActor with CometListener {

    private var streams: List[StreamItem] = Nil

    def registerWith = StreamServer

    override def lowPriority = {

        case v: List[StreamItem] => streams = v; reRender()

    }

    def render = {

        "li *" #> streams.map(stream =>

            ".name *" #> stream.name &
            ".stream [id]" #> stream.path.toString

        )

    }

}

object StreamServer extends LiftActor with ListenerManager {

    private var streams: List[StreamItem] = Nil

    def createUpdate = streams

    override def lowPriority = {

        case stream: String if stream.length > 0 =>

            streams :+= StreamItem("James", stream, "_1");
            updateListeners()

    }

}

What I need to do now is call a javascript function, already defined, with the newly added stream. So when the ajax form is submitted and the value sent to the StreamServer, somewhere in the StreamComet render method I need to call the javascript function with that particular item in the streams list as to update the DOM. Not sure if this is the correct way to go about it though.
Any help is much appreciated, thanks in advance
Answer: You can try
import net.liftweb.http.js.JE.JsRaw
JsRaw("myJSFunction(myParam)").cmd


Extracting data from bivariate vs multivariate analyses for the purposes of meta-analysis

Question: I have what is a very basic question about meta-analysis. If data from individual studies about the relationship of interest are presented in both bivariate and multivariate analyses, which should I use? Would it be appropriate to calculate effect sizes based on multivariate analyses (e.g., adjusted odds ratios), or should only data from bivariate analyses be used?
Comment: I should also mention that the covariates in the multivarite analyses are likely to differ across studies to be included in the meta-analysis.
Answer: You can use both types of effect sizes, but you should make sure that you run seperate meta-analyses. That is, one synthesis should be based on bivariate effect sizes; a separate meta-analysis should focus on partial effects (e.g., regression coefficients; adjusted odds ratio etc.) sizes. Here is a recommendation from Aloe/Thompson (2013: 400) (you can download the paper free of charge):

"Partial effect sizes should not be combined with bivariate
  correlations, nor should different types of partial effect sizes be
  combined. Meta-analysts should present two sets of analyses: one for
  bivariate correlations and one for partial effects. "

Aloe, A. M., & Thompson, C. G. (2013). The synthesis of partial effect sizes. Journal of the Society for Social Work and Research, 4(4), 390 – 405.
Comment: @Thomas-S-E Did you check out the paper that I posted? It adresses many of those issues... On page 396 (section "Synthesizing Partial Effects") it says "[...] when analyzing a collection of partial-effect sizes, the reviewer needs to include predictor variables that reflect differences in model complexity that are likely to influence the sizes of the partial correlation". So, I would run meta-regressions that control for the most important predictors in your field. If you find my answer helpful, please consider upvoting it.
Comment: Thanks for your response. If I am understanding things correctly, this means partial effect sizes from analyses with different covariates should not be included in the same meta-analysis. For example, if I wanted to examine the effect of diet on heart disease, it would be important to covary other meaningful predictors of heart disease (e.g., family history, exercise, stress, sex, smoking etc.). It is common for studies to covary a mix of these predictors but very rare for two studies to include precisely the same set of covariates. If I understand things correctly, this means in reality it wi


Streamlines and ideal / real fluids

Question: I was going through some basic description of streamlines in which I noticed that streamlines in an Ideal fluid where shown "equidistant" from each other at a place . whereas in the real fluid somewhere they where dense and somewhere rarer at the same place...why is it so ?? Which assumption we too while taking the streamlines equidistant from each other in a small area in Ideal fluid??
Comment: I am not sure if you are still on stackexchange. Mention explicitly the flow where you saw the difference.
Answer: The stream function is defined such that there is a constant volumetric flow rate between two stream lines of constant value. If two stream lines converge towards each other and become more 'dense', it indicates that the velocity of the fluid increases so that the volumetric flow rate remains unchanged.

Streamlines and ideal / real fluids


Which way is air flow direction in this system?

Question:
Trying to figure out which way my air filter is supposed to go- is airflow in the direction of the red arrow or the blue? Thank you!!!!
Answer: It's the red arrow. The black arrow next to the filter size also shows this. Furnaces generally draw air in from the bottom.
Answer: The air flow will be rightward in this picture. Here are several ways to tell:

The air filter is always the first thing the return air flows through when it enters the furnace. That way, the machinery doesn't get clogged with dust. Since the furnace is on the right and a duct is on the left, the air must be flowing left to right (red arrow) in this picture.

If you remove the filter, or the access panel on the furnace, and start the furnace, you'll be able to tell that the air is moving rightward (in addition to being sucked in through the opening) and then blown upward by the blower. Of course, you should not leave it running for very long like this, since it is then taking in unfiltered air.

The air will flow through the blower (fan) before it flows through the heat exchanger (tubes that get hot), so that the blower motor is not exposed to unnecessary heat. So, if you look inside the furnace and see a duct connected to the blower, that will be a duct where air is entering the furnace.

Since hot air prefers to rise, the cold return air is often, but not always, supplied at the bottom of the furnace, so a duct connection at the bottom will be an opening where air flows into the furnace, which is rightward in this picture. (But some furnaces don't follow this principle — the blower is much more powerful convection — so this doesn't necessarily tell you anything with certainty.)
Comment: Buoyancy ("hot air prefers to rise") isn't really applicable - counter-flow furnaces have the burner at the bottom, blower at the top, and blow air downward. They work just fine. The real clue is the positioning of the burner and blower. Blower always pushes air across the burner/heat exchanger. In this photo the louvers in the front cover indicate burner is on top so we know air flow is upward.
Comment: @GregHill Fair enough. I thought about mentioning blower positioning but didn't, and I wasn't aware that counter-flow furnaces specifically existed. Edited.
Answer: Others have noted the red arrow is correct, but it's worth noting how to tell what's what in your picture.
There's a fairly large insulated flex duct on the left side of your picture. If you follow it, it will run to wherever your intake filter is from inside your house. I know this is an intake because

It's flexible (lower pressure)
It's enormous. Probably 16".

A line running to a room off the exhaust side will likely not exceed 8" (the vast majority I've seen are 6"). And you wouldn't typically connect a flex line directly to the exhaust side of a blower that big. Normally you hook it to something more rigid, like a fiberglass manifold. That main trunk will then reduce over distance, and your individual rooms will get their own flex line from that trunk. Throwing your discharged HVAC air into a trunk would be a rather odd decision, since you would lose a lot of pressure by doing that, and air movement is key in HVAC efficiency.


How to Appease the Google PageSpeed Gods with regards to image optimization?

Question: I have a site with a pretty large media library. The images are mostly in JPG format. When I ran the site through Google's PageSpeed, it heavily penalized the score because the images were not optimized. I've tried a few plugins like Smush, but the PageSpeed still says the images need to be optimized. Which plugin or solution can optimize those images enough improve the score?
Comment: what's your website URL? Pagespeed recommends lossless optimisation since January, and the default version of Smush offers only Lossless, so maybe that's the reason, you didn't got enough out of it.
Comment: asking for plugin recommendations is offtopic here, but even if that's removed google optimisation isn't WordPress specific and it's a moving goal post so any answer becomes useless after a short period. At best this could be a long running discussion with general advice, but this isn't a discussion board, you need to be able to mark an answer as the factually correct answer for all, not just the most useful advice at the time
Answer: After trying a few image optimization plugins resmush.it did the trick. If you reduce the JPG quality to 70% Google should stop complaining and images still look good. The plugin is even free.
Of course your images also have to be scaled properly.
Comment: I set the JPG quality to 85% and Google's PageSpeed stopped complaining
Answer: The best way is to blatantly ignore it, unless your score is very low.
The reality of developing dedicated sites in which every piece of code is inspected, approved and controlled by you, is very different from the reality of 99.9% of wordpress sites. The reality of wordpress is that you have no control of what the core does and very little control on what the theme and plugins do.
This is a compromise that you do when you decide to use wordpress, as the maintenance of the site is not only in your hands but also depends on updates of the core themes and plugins, therefor it will be very hard to optimize any part of the code in them without risking breaking the possibility to upgrade them in the future.
In theory, you can adjust the theme, and configure wordpress core to create images in exactly the sizes that the theme/plugins/content use, but it is just not worth the effort IMHO.
Answer: There are few things to pay attention, but you need to understand the reason why Google complains.
It may be your theme is not smart. What this means it may scale big images to fit instead showing the smaller version of the images.

You will need to regenerate the thumbnails from your images you can use this plugin. You can find the author in here in WPSO.
Just let me know if you need more info.

There is another level.
A web server approach where in Linux, you have great options.
EXIF tool to remove bad meta information.
You just need to set the cron job once a day.
Since you need to optimize the existing images.

For png images you have optipng
For jpeg/jpg you have jpegtran

Typically all these can be done via SmushIt plugin, but since you failed on that try the first part of my answer.


I'm late vs I'm going to be late

Question:
I'm late.

vs

I'm going to be late.

What is the difference between their meanings?
Answer: I'm late - I'm late now, usually in case when you arrived some place, and you couldn't keep appointments.
I'm going to be late - prediction of situation. Therefore, usually used in case when you hurry up
Answer: "I'm going to be late" means "I know I have no chance of getting to my destination in time".
"I'm late" could mean that you are behind schedule in the timetable you had planned for your daily activities (also "I'm running late"). You might use it when you arrive ("I'm sorry I'm late"), but later on you would say "I was late" or "I arrived late".

I'm late vs I'm going to be late


Wanting to Erase all data for windows and install Linux but unsure about hardware complications

Question: Hey guys and gals I am in a, as one might say sticky situation, I wish to install Ubuntu onto a laptop that has a corrupt version of Windows 8 that will not let me bypass the recovery screen (Recovery and repair does not work, but BIOS does work [thanks]). Upon my decision to install Ubuntu I am having issues with the "work side with Windows" option (obviously), as I can not access my laptops data to back up, I am scared on loosing previously installed data for the hardware of my Windows 8 PC, and require information regarding weather or not the heard wear data will be preserved or destroyed. I would very much appreciate any help put forth and thank you for your time!
Answer: I think your concern is with keeping Windows hardware drivers for Ubuntu install? Don't worry- the drivers are OS-specific, and you don't need that "Drivers" folder.
You should be able to pop in the Ubuntu Live CD, and either install it directly over your entire hard drive, or (as I would prefer) use the gparted program to erase your entire disk, and then install Ubuntu there in the entire empty space.
As far as hardware issues, there shouldn't be any unless your computer is extremely old or maybe a few days old. I still think there won't be any.
I have installed Ubuntu on old Emachines, cheap HP-2000, three different IBM (woot) Thinkpads, and my current Lenovo (ew) Yoga. Never an issue; Ubuntu is super good at hardware, usually. Most problems could be a video driver issue but, generally easy to remedy.
If you need to actually explore the files and save some, I would still run the Live CD, open your Windows partition and try to get files that way. Backup to cloud storage or a USB stick, then install away.
Personally, I find a forced loss of tons of data liberating (albeit time consuming and damaging in some instances) from time to time!
Good luck, we're here to help.
Answer: For your personal data:
You can boot ubuntu live CD (DVD), choose "try ubuntu" and copy your data to another storage like USB drive or another computer or cloud. The best thing is to start with a clean (void of any data) disk when installing ubuntu.
For your device itself:
You should boot the ubuntu live CD (DVD), choose "try ubuntu" and check if your hardware works. Many devices from your laptop will just work, like: cpu, disks, video, usb, keyboard, trackpad. Some other devices might not work, like: finger-print readers, penabled touch screen (touch screens that will also work with stylus, they will work, but probably only the pen). Test your hardware and if you are pleased with your device you should install ubuntu on the clean hdd.
You can get away without using a separate storage, but this is for seasoned users and is dangerous and unforgiving.


What Is The Best Way To Kill Grape Vines?

Question: Before we moved into our new house there were grape vines everywhere. We got rid of one stump, but another one by the fence is harder to get rid of. So I want to know what would be the most effective way to kill this plant off for good?
Answer: You seem to be implying that the stump is still producing growth rather than your just wanting to get the stump out of the ground. As 'stump' usually refers to a woody trunk of varying width, the way to kill it off for good is to buy a tree stump killer - in the UK, that would be something like SBK, described as a brushwood and tree stump killer. Method of use varies according to the product, but the usual idea is to drill into the stump, making holes about quarter to half an inch deep, particularly near the outside edges, all round if it is a large stump, then fill up the holes with the stumpkiller and cover with something - a large upturned pot or a sheet of plastic, anchored down, and leave it to die.
Answer: Years ago my neighbor and I spent most of the summer cutting, pulling and digging wild grape vines. When we were done we dug down around each grape root and we put about five lb of rock salt on each, covered it with dirt and watered it each day. In Oct we put another five lb on and to this day they have never come back.  The best thing I ever found!
Comment: Has **anything** grown in that area since?


What counts as bowing and is therefore a sin?

Question: I know bowing to a human being is a sin, but what counts as bowing? All types, or just ones in Islam, like ruku and sujud?
Answer: Bowing to other than Allah isn't a sin unless you believe they're divine or you want to worship them.
Ruko' has two meanings, bending over in a position of "bowing," or kneeling down on your knees without prostrating.
Sujod isn't considered as ruko' since it's a separate action in of itself.  It's prostrating and touching the forehead onto the ground.
So the common usage when said ruko' is usually understood to be bowing and sujod would be touching our foreheads on the ground.
Comment: No it isn't. J ust look it up. I looked it up, bowing is a sin. Check up the hadith of a man who wanted to bow to the Prophet(S.A.W.), because he saw people bowing to civil officials or authorities. I don't think it said that he thought the Prophet(S.A.W.) was an angel or he wanted to worship him.
Comment: The hadith you're speaking of mentions Sujod and not Ruko.  But it's authenticity is questionable bc one of the narrators named al-Qasim ash-Shaybani had a poor memory.
Comment: Really thanks, know any reliable sunnah websites?
Comment: Well, you can go to sunnah.com for now and read the hadiths on there.  Perfectly translating from Arabic to English is difficult, hence you may find something mistranslated.  Generally, majority of hadiths in Sahih al-Bukhari and Sahih Muslim are authentic.  Then would be Sunan Abu Dawud.  But spend more time on learning Quran first and then you can read al-Bukhari and Muslim and study them. Whatever hadiths you may find a strange you can ask about.  If you want to learn about hadith science I can recommend some English books.
Answer: Bowing doesn't necessarily have to be a physical act. For example, In 44:23 we see:

Have you seen he who has taken as his god his [own] desire, and Allah has sent him astray due to knowledge and has set a seal upon his hearing and his heart and put over his vision a veil? So who will guide him after Allah? Then will you not be reminded?

In this verse, Allah has stated that your own desires can be your god although we know that it is not possible to [physically] bow to it.
However, in 18:50 we see that angels, did physically bow to Adam under the command of Allah:

And [mention] when We said to the angels, "Prostrate to Adam," and they prostrated, except for Iblees. He was of the jinn and departed from the command of his Lord. Then will you take him and his descendants as allies other than Me while they are enemies to you? Wretched it is for the wrongdoers as an exchange.

This is not considered a sin because the intention of angels wasn't to bow to Adam himself but to Allah as he created Adam. This is clarified in a later verse:

[So mention] when your Lord said to the angels, "Indeed, I am going to create a human being from clay.So when I have proportioned him and breathed into him of My [created] soul, then fall down to him in prostration."


Entropy of Inverse-Wishart distribution

Question: What is the entropy of the Inverse-Wishart distribution?  I need just a reference, but derivation (e.g. using inverse property) would be interesting too.
Answer: Wishart and Inverse Wishart Distributions
The Wishart and inverse Wishart distributions are arguably the most popular distributions for modeling random positive definite matrices. Moreover, if a random variable has a Gaussian distribution, then its sample covariance is drawn from a Wishart distribution. The relative entropy between Wishart distributions may be a useful way to measure the dissimilarity between collections of covariance matrices or Gram (inner product) matrices.
A new Bayesian entropy estimator is proposed using an inverted Wishart distribution and a data-dependent prior that handles the small-sample case.
Inverse Wishart Differential Entropy and Relative Entropy
The above link explains the derivation of the entropy of Inverse-Wishart distribution

Entropy of Inverse-Wishart distribution


sqlite3: command not found Python 3 on Windows 10

Question: I installed Python 3.6.5 on Windows 10. I see that there is a sqlite3 folder in ...\Python\Python36\Lib directory. I added Python PATH to environment variable. However, I can't run the command "sqlite3" from Powershell nor Git Bash. It would say "command not found". What did I do wrong?
Answer: Python's sqlite library probably is installed. Try: import sqlite3 in the Python shell.
If you want to be able to use sqlite's CLI program, you need to install it.
Download here. Use the Windows version obviously.
Comment: I tried import sqlite3 it produced no error. I assume the library is installed. I thought sqlite3 CLI program is included with Python 3. I will try to install the sqlite-tools-win32-x86 tool from the link provided. Thanks!
Comment: @JohnFisher It did
Comment: I have sqlite3 already installed on mac, but it doesn't have all the dot commands, and I need .load to follow a tutorial. How can I get .load command for my sqlite3?
Answer: Check the permissions of the folder where python3 is installed, it may be that when using powershell you do not have the necessary permissions to access them.
It is always highly recommended to install python3 in a route WITHOUT SPACES
like a:
C:\python36

Comment: My python path is C:\Python\Python36 . Permissions are good. I've been running pip, virtualenv, python and other commands. However, when I try to run the command "sqlite3 database.db < schema.sql", I got error that command is not found.
Answer: So, apparently Sqlite3's CLI does not come installed with Python (Python 3.6). What comes pre-installed is Python's Sqlite3 library.So, you can access the Sqlite3 DB either through the library, or by manually installing Sqlite3 CLI.
Answer: I had an issue with installing brotab, and I always got the message that sqlite3 was not found. I had just installed python beforehand, and in list of modules, I saw sqlite3. When I started py.exe console, I also could import that module. It turned out that I had a entry in my Path to c:\Program Files\LibreOffice\program, which contained an older version of python.exe.
I ran python.exe -m pydoc -b inside that program folder to see the Index of modules, and there was no mention of sqlite3. I removed that entry from my Path, and kept the newly installed python.exe, and it fixed the issue


How to change the default username of mysql?

Question: I have just installed Mysql server and Mysql workbench in my Ubuntu 14.04. Now I want to change the default username(root) in the setup connection wizard. Is that the username for mysql server? Is the password in wizard is different from the password given during the mysql server installation?
Answer: Open a terminal ctrl+alt+t and run following command
GRANT ALL PRIVILEGES ON dbTest.* To 'user'@'hostname' IDENTIFIED BY 'password';

If you are running the code/site accessing MySQL on the same machine, hostname would be localhost.
Now, the break down.
GRANT - This is the command used to create users and grant rights to databases, tables, etc.
ALL PRIVILEGES - This tells it the user will have all standard privileges. This does not include the privilege to use the GRANT command however.
dbtest.* - This instructions MySQL to apply these rights for the use onto the full dbtest database. You can replace the * with specific table names or store routines if you wish.
TO 'user'@'hostname' - 'user' is the of the user account you are creating. Note: You must have the single quotes in there. 'hostname' tells MySQL what hosts the user can connect from. If you only want it from the same machine, use localhost
IDENTIFIED BY 'password' - As you would have guessed, this sets the password for that user.
Hope it helps


How do I check how much free space is on my usb stick? (Kubuntu 18.04)

Question: How do I check how much free space is on my usb? I don't see how I can do this, although I can access the usb stick's files when I insert it through Dolphin. Preferably a UI option, not command line.
Comment: Take a look to these answers too - [How do I find the amount of free space on my hard drive?](https://askubuntu.com/q/73160/66509).
Answer: You should look in the lower right corner of the Dolphin screen after you've inserted the USB stick. In the example, my USB stick has 3.7 GiB free.

If you don't see anything like that, open Dolphin, press Ctrl+Shift+, to bring up Dolphin Preferences. In there, click on General in the left pane and then on the Status Bar tab and ensure that Show Space Information is active.

Dolphin also allows you to examine the USB stick's properties. With the device inserted, move up to root and then to media. Open media. There you'll see, possibly among other folders, a folder with your username. Open that: you should see a folder bearing your USB stick's name (as seen by Dolphin). Right-click on that folder to get the window shown below. The General tab will show you what you want.

And, I know you asked for a route using the graphical interface but you can get the basic information, somewhat quicker, using the command line. See the last line in the output below on running df -h:
dkb@kububb:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            3.9G     0  3.9G   0% /dev
tmpfs           785M  1.6M  784M   1% /run
/dev/sda6       288G   26G  248G  10% /
tmpfs           3.9G     0  3.9G   0% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/sda1       496M   34M  463M   7% /boot/efi
tmpfs           785M     0  785M   0% /run/user/118
tmpfs           785M  4.0K  785M   1% /run/user/1000
tmpfs           785M   12K  785M   1% /run/user/1001
/dev/sdb1       466G  196G  271G  43% /media/dkb/TOSHIBA EXT

Comment: Thanks @DKBose for taking the time to answer my question!
Comment: Does "filled in with colour" denote "active"? (In the UIs I'm familiar with, a filled-in checkbox denotes "active for some of the items selected".)
Comment: @MathieuK. please see https://askubuntu.com/questions/1047875/half-selected-effect-in-kubuntu


What is the biography of Rav Yitzchak Meir Morgenstern?

Question: Rav Yitzchak Meir Morgenstern is the Rosh Yeshiva of Toras Chochom in Israel. What is his background and biography? Meaning, where did he grow up, which yeshivot did he learn at and under whom (I know he was in Golders Green for some time)? I'm looking for as much biographic information as possible.
Comment: @Yehoshua I live in the US and read his weekly emails so I'd like to know more about the person who comes up with such amazing torah. I always try to readthe biography of the people I learn from
Comment: When I saw the title I thought you were referring to the Kotzker :)
Comment: @ShmuelBrin apparently he is related
Comment: Where do you live and why are you curious to know?
Comment: See Joey Rosenfeld on r itche on YouTube by his intro video
Answer: Per Wikipedia he is a Chasid of Ger from birth. He learned in the Yeshivas of Lucerne and Gateshead. He is married to the daughter of R' Yosef Lubinsky from Antwerp (known as the Chantshin Rabbi). He moved to Yerushalayim after his marriage and learned with R' Eliezer Shlomo Schick and R' Nissan Dovid Kivak. He is also close to R' Tzvi Hirsh Rosenbaum (Kretchnifer Rabbi-Siget).


Will 3/4" Outside faucet get more pressure than a 1/2" one?

Question: If I put a 3/4" outside faucet on 1/2" indoor water pipe will I have more water pressure?
Comment: "This homeowner used this one simple trick and plumbers hate him!"
Comment: @MonkeyZeus yes! I just had that on EE-SE: "Power Companies Hate this One Electricity Saving Trick" because it doesn't work, doesn't save anything, and they get the angry calls...!
Comment: Should be less pressure but more flow rate when changing from smaller to bigger pipe.  Guessing you are on city/town water, so not much you can do pressure wise.  Edit your question to explain water system and if you have a pressure reducing valve.
Comment: Pressure <--> voltage.   Flow rate <--> current.    So, which do you want?
Comment: The OP should describe the situation in more detail. What is the location and function of the current 1/2" faucet? Laundry room? Utility sink in garage? Is this a cold water only line? A hot water line? Is this a line that is being used to fill a large mop bucket and you want to fill it faster than your current faucet allows?
Answer: You probably mean "flow" rather than pressure, and no, if there is 1/2 inch pipe leading to the hose location and you just attach a 3/4 inch valve to it you will not increase flow.   You'll just spend more money on the installation.
To increase flow to the hose you should run new 3/4 inch pipe from a point very near the water meter and from there all the way to your outside tap location.  And then, of course, use a 3/4 inch faucet.
Comment: `from a point very near the water meter` - the water meter is not really relevant.  The new pipe has to run from a larger feeder.  If the outdoor 1/2" pipe runs three feet indoors to a 1" feeder then you can just run 3/4" pipe to replace that three foot run from the 1" line - no need to go all the way back to the meter, you just need to go far enough until you find a bigger pipe to take from.
Answer: Fluid speed is a function of flow divided by cross section. increasing the pipe internal diameter from 0.5in to 0.75 in increases the cross section from 0.1963 square inches to 0.4418 square inches, which reduces the speed to about 44% for the same water flow through the pipe. According to Bernoulli's principle, static pressure increases as fluid speed decreases, so you would see a comparable increase of ~2 1/4 times the pressure, assuming the flow can keep up.
To address some of the concerns in the comments: Take a hose and a hand sprayer, after turning the water on, squeeze the handle slowly and steadily. You will notice that the pressure from the sprayer increases as you squeeze the handle to a point. When the opening is sufficiently large that the flow of water is unrestricted, the pressure of the outbound water will stop increasing. In this particular case, that means that if the 1/2" faucet is restricting the water flow in absolute terms, then 3/4" faucet will result in an increase in pressure at the faucet. If you change out the faucet and the pressure stays the same, it just means that a 1/2" faucet was sufficient to keep from restricting the flow of water.
Comment: But as Jay pointed out,  unless the pipe diameter is increased all the way back to the source, this can't happen.
Comment: This is a home improvement forum.  It's not always necessary to force every question into technical perfection.  Sometimes the best result comes from just answering what everyone knows the question to mean.  In this case, "pressure" isn't even *wrong*, it's just being used colloquially in a way that is likely to help other people in future if they have the same question.  Also, even if you think this answer is an appropriate one, then the appropriate way to handle it would be in a comment suggesting we move the question to Engineering SE.
Comment: Mod notice: Please keep comments to the site respectful. See our [code of conduct](https://diy.stackexchange.com/conduct) for more details.
Comment: https://diy.stackexchange.com/a/85814/86936 is another example that perhaps explains the concept better than I did.
Answer: I replaced the worn out 1/2" faucets on our two outside faucets with 3/4" because the valve I wanted was only available in 3/4".
It did NOT increase the flow rate through the 1/2" copper piping nor did I expect it to.
To transition from the 1/2" FIP fitting sweated onto the 1/2" copper tubing (original faucet was 1/2" MIP, new one was 3/4" FIP) I used two short adaptors, on each faucet. This increased the expense, needlessly extended the pipe, and was trouble to get leak fee.


Is there any quick and easy way to make all bodies visible with Farseer physics engine for XNA?

Question: I just want to be able to see all my bodies on the screen for debugging purposes and i cant think of an easy way, for example i have make some edge fixtures with curved arcs attached and i just want to see what they look like!
Answer: Farseer does ship a physics view, and thankfully it requires very little brain power to implement and use.
If you downloaded the "Farseer Physics Engine 3.3.1 Samples XNA" recommended package on their download page, you'd see a lot of examples included.
Navigate to (or click these convenient links to the codeplex page :P) SamplesXNA/SamplesXNA/ScreenSystem/PhysicsGameScreen.cs to see example usage of FarseerPhysics.DebugViews.DebugViewXNA.
It boils down to this:
FarseerPhysics.Dynamic.World myWorld;
// initialize myWorld...
var myDebugView = new FarseerPhysics.DebugViews.DebugViewXNA(myWorld);

And then you can set flags on it to determine what's visible:
myDebugView.RemoveFlags(DebugViewFlags.Shape);
myDebugView.RemoveFlags(DebugViewFlags.Joint);
myDebugView.DefaultShapeColor = Color.White;
myDebugView.SleepingShapeColor = Color.LightGray;

Answer: Farseer comes with a debugging environment. There's two ways of doing what you want to do. The first way is reproducing your situation in the test environment they ship. It will show everything of relevance. This is the technique I used for my game.
The other way is to integrate the debugging environment they made into your game, this is slightly more complex, and I haven't tried it yet, but if I understand correctly it should be possible, have a look around in the project and see what you can mix and match :)
Update: If it really is so simple as michael says then you should definitely do that, looks a lot better than what I did.


A grand split fairly

Question:
My prefix says it's only a letter,
  my infix with mas, gravel travelling,
  my primefixes crushed orange into green,
  I'll see it through, to make it get better.
Comment: The infix is fine, but I missed a letter in line 2 and not sure how to fix. Will leave and add bounty for correct ans or a fix for line 2.
Comment: Weirdly, I think I know the answer but cannot fit the second line.
Comment: @hexomino, I will accept without line 2 explanation. I made a change to it just before posting as I thought saw a nice fit, but my spelling of a word which has over two trillion hits in google was incorrect. There is some switching and double-duty going on I think, and I omitted a word which would have made this line easier.
Answer: Okay, so I think the answer is

 D:Ream

Title

 D is the Roman numeral for 500 and a ream is 500 sheets of paper so the answer could be read as 500:500 - a fair split of a grand (1000)

My prefix says it's only a letter,

 Dre - possibly a reference to Dr. Dre who has a song title "Nuthin' but a 'G' Thang".

my infix with mas, gravel travelling,

 Rea - I think this refers to Chris Rea ("mas" indicating Chris(t)mas) who is quintessentially "gravel-voiced". He also has the popular song "Driving Home for Christmas".

my primefixes crushed orange into green,

 If we take the 2nd, 3rd and 5th letters we get R.E.M. who had a song "Orange Crush" on the album "Green"

I'll see it through, to make it get better.

 These are hints to lyrics from the song "Things can only get better" by the band D:Ream.
Comment: Wonderful,one of the infix's works is popular at that time - can't believe my spelling.
Comment: @Tom Ah, okay, maybe I've got something now, I've tried to rewrite to fit a general theme.

A grand split fairly


"Red Cross" problem on MenuStrip and ToolStrip

Question: I have a piece of software that has worked fine on many machines, althoughon one machine there is a problem that appears to occur occasionaly, the MenuStrip and the ToolStrip both appear as a blank white background with a red cross over it, as a custom control would if you created a null object. This doesn't happen whilst I am debugging and I don't know how to make the problem re-occur, but it does happen. I was wondering if anyone knew what could be the problem?
Would it be the version of the .NET framework?
Thanks
Answer: This is a common occurrence when there's a GDI+ problem ("The Red X of Death"). Are you doing any custom drawing in OnPaint? Or perhaps there's a graphic resource or a glyph which is corrupt or being improperly disposed of.
Edit: I've re-read your question. You seem to have this only on one of the machines. I've googled around a bit for this, and I stumbled upon this old thread. The post at the bottom suggests that there might be an issue with Virtual Memory turned off:

We did manage to solve this - we were
seeing the problem on a device running
XP embedded. The XPe image developer
had turned off Virtual Memory and as
soon as we turned it on the problem
went away. I believe it is just a
symptom of the system running out of
memory to display the graphics (maybe
particularly if you use a lot of
double buffering)

Hope that helps.
Comment: No, I'm not doing any custom drawing, just using them as standard, I understand what you mean as i've stumbled across that when I have created custom controls in the past. Thanks for your help anyhow!
Answer: Sounds like a symptom of an Out Of Memory Exception to me.
Edit:
Which can sometimes lead onto a System.InvalidOperationException: BufferedGraphicsContext
Answer: Are you trying to update the GUI controls from a thread other than the GUI thread?  Combine the cross thread operation with an exception handler that swallowed everything and we had the behavior you describe (on a grid control, not a menustrip bar) on an app I was maintaining.
Answer: Definitively sounds like a cross-thread problem.
Make sure you use Invoke when accessing controls and/or firing events from a thread that is not the main UI thread.
Answer: Seeing this happen on just one computer of more than a 1000 that have our prouducts.
On that one computer I am seeing a .NET 3.5 program occassionally show the red X on its datagrid.  And another far simpler .NET 2.0 program got the red X on its menuStrip.  I only have source code for the simpler program but I can say that there isn't any user code at all which affects that component.  No cross-thread stuff because nothing updates it.  It's contents are set at development time with one item added to it at program load.  The Red X failure was well after program load.
I was very surprised to see the problem across two different frameworks and on one program that has no data bindings.  I am very wishfully hoping that the computer has its virtual memory turned off.
If it isn't that then any guidance on system parts that are shared across .NET 2.0 and .NET 3.5 would be appreciated.
Update:  The user with the problem retired the computer and replaced it (which solved the problem)


Is the Fourier transform of a compactly supported $L^1$ function $C^{\infty}$

Question: My professor often hints that the Fourier Transform of a compactly supported $L^1$ function is of class $C^{\infty}$. Is this always true? How can I see this?
Answer: Yes, it is. You can see this by differentiating under the integral, directly from the definition of the Fourier transform, i.e.,
$$
\partial_\xi^\alpha \widehat{f}(\xi) = \int f(x) \partial^\alpha_\xi e^{-2\pi i x \xi } dx
= \int f(x) (-2\pi i x)^\alpha e^{-2\pi i x \xi} dx,
$$
where $\alpha$ is any multiindex.
You can use a standard theorem (see e.g. Difference of differentiation under integral sign between Lebesgue and Riemann to justify the differentiation under the integral). Just use that if $f$ has support contained in $B_R (0)$, then $|f(x) (-2\pi i x)^\alpha e^{-2\pi i x\xi}| \leq (2\pi R)^{|\alpha|} \cdot |f(x)|$, which is integrable if $f$ is.
Note: Of course, you need $f$ to be integrable, but this is part of your assumptions already.
EDIT: As noted by @Julián Aguirre, the Fourier transform of a compactly supported function is actually analytic, i.e., it can be extended to an entire function on $\Bbb{C}^d$. To see this, one can use the power series expansion of $e^x$. For simplicity, I am here only giving the proof in the one-dimsensional case, but the claim is true also in $\Bbb{R}^d$. We have
$$
\widehat{f}(\xi) = \int f(x) e^{-2\pi i x \xi} dx
= \int f(x) \sum_{n=0}^\infty \frac{(-2\pi i x \xi)^n}{n!} dx
= \sum_{n=0}^\infty \xi^n \cdot \underbrace{\int f(x) \frac{(-2\pi i x)^n}{n!}\, dx}_{=:a_n},
$$
where we still have to justify the interchange of integration and summation. But for $\xi \in \mathbb{C}$ with $|\xi| \leq T$ and for $\mathrm{supp} f \subset [-R,R]$, we have
$$
\int \sum_{n=0}^\infty |f(x)| \left|\frac{(-2\pi i x \xi)^n}{n!}\right| dx
\leq \sum_{n=0}^\infty \frac{(2\pi R T)^n}{n!} \| f \|_{L^1} = e^{2\pi RT} \cdot \|f\|_{L^1} < \infty.
$$
We can then use dominated convergence to justify the interchange. Also, we get (absolute) convergence of the power series $\sum_n a_n \xi^n$. Since absolutely convergent power series are smooth, this provides another proof for the smoothness of $\widehat{f}$.
Comment: I would like to add that $\widehat f$ is not only $C^\infty$, but an entire function, when $\xi$ is considered a complex variable.
Comment: @johnmelon: I added some details. Does this help?
Comment: But why can I differentiate under the integral? Also, how does this help me to conclude?
Comment: yes perfect. thank you
Comment: @JuliánAguirre: Thanks, I expanded my answer to account for your comment :)


Automatic tnsnames.ora cleanup

Question: I've been working on a script to delete an environment including the Oracle db.  I've got everything working except for automating the cleanup of tns entries.  I was originally thinking it would be easy enough with regexp but since I've noticed different formats of the entries between different nodes I'm not sure what patterns to look for.  Is there a decent way to handle automating the cleanup of tnsnames.ora when a db is deleted on unix boxes?
Answer: For C#, I have been using a RegEx from:
http://www.codeproject.com/Articles/30962/TNSNames-Reader
If you're running the following ReGex against TNSNAMES.ORA, you get a list of the databases.
    ([\n][\s]*[^(][a-zA-Z0-9_.]+[\s])=[\s](
You use the first MatchGroup of each item and run TNSPING against it.
If it responds, you keep the entry - if it doesn't - you discard the entry.
The downside is - if a db is down just at this moment - you will clean it out of tnsnames anyway...

Automatic tnsnames.ora cleanup


What diameter of Metal Gate posts are needed for a 10' x 4' tubal gate

Question: I want to install a 10' tubular gate using a steel or aluminum gate posts.  My question is what diameter do I need to use to keep it from sagging?  I guess I should purchase a 8' length for my 4' fence but what diameter?
Answer: Any steel post of 3 or 4" (2" if it is a light weight gate) sunk in the ground 3 ft with concrete poured around will hold a steel gate and not bend. However, in my experience the real problem is, depending on your soil type and moisture, the weight will gradually pull the post over.  Two solutions:  1) On the hinge side use two posts 4ft apart with cross bracing.  2) if the area is reasonably level, buy an wheel to put on the free end.  It will take all the weight save you a lot of potential problems down the road.


Is SSH2 still vulnerable to man-in-middle attacks?

Question: With SSH using RSA public key authentication, can an attacker spoof the server IP address and connect with client to obtain client password?
Comment: Any secure connection is vulnerable to a man-in-the-middle attack. All you need to do is claim you are the other end of the connection and prove you are ( which is easy enough if the certificate is also faked ).  In some cases a secured connection might be very hard and is literally not vulerable to a Man in the Middle Attack for that reason.**The word any is used to actually say that any secured connection is vulerable to this type of attack.   Its all comes down to trust, and digital trust can be forged, happens all the time.**
Answer: There's always going to be a chicken-and-egg problem -- how do you trust the ssh key of the server you're connecting to if you've never connected to it before. Some sites publish lists of all their SSH keys, some go further and PGP-sign these lists, but it all ultimately comes back to the age-old problem of distributing trust.
The latest and most promising approach is to publish SSH fingerprints for the servers in the DNS records that are then signed using DNSSec. E.g.:
<code>$ dig +short -t sshfp fedorapeople.org
2 1 9EB13E6BEE80F5D56B4E9A029DC53CF00EF14045
1 1 5829B0460C2E9296BDBD835416C2615DCF80D22A
</code>
You can then add the following to your ~/.ssh/config
<code>VerifyHostKeyDNS yes
</code>
You have to also configure DNSSec on your resolver for it to make any difference.
Comment: It might be necessary for OpenSSH client itself to be linked against ldns, too.
Answer: If the client knows the fingerprint of the server they are connecting to or knows that the certificate should be signed by a trusted CA, then I am not aware of either SSH or SSH2 is vulnerable to a man in the middle where the client thinks they are connecting to an incorrect server after previously connecting.  What is possible on SSH1 is for a server to masquerade as a user that has connected to them when accessing another server.
Comment: Yeah, don't use SSH1. This vulnerability has been known for over 10 years -- http://www.kb.cert.org/vuls/id/684820 . Most modern systems require SSH2.
Comment: "What is possible on SSH1 is for a server to masquerade as a user that has connected to them when accessing another server." WTF. Wouldn't have expected such a mistake from such a big protocol.
Comment: @CodesInChaos - yeah, I was surprised too.  I didn't know about that until I was doing some quick research about this question.  Apparently the protocol started out as just wanting to conceal what was being exchanged on the network and didn't actual worry about mutual authentication that much.


Proving the uniqueness of the additive inverse in a field without the commutative property

Question: Someone told me that it was possible to prove that 0 is unique without using the commutative property. I don't see how, and I constructed a multiplication/addition table with elements $0_1, 0_2$, and $1$, but it is a pain to check that the table is associative/distributive. Can anyone exhibit a proof of the uniqueness of 0 in a field using only
Associativity of addition and multiplication
$x + 0 = x$ and $x \cdot 1 = x$
existence of additive and multiplicative inverses
distributive property.
Answer: So what properties do you want to show of $0$ exactly? I understand that you want to assume that $1$ is a right-neutral element for multiplication (do you also want left?), existence of inverses (left and right, or just left/just right, and do they have to be the same?) the distributive properties is clear already though. Do you want to show that $0$ is the unique two-sided neutral element for addition? In this case you need none of the above, since if you want to show that the zero of a field is unique such that $0+x = x+0 = x$ for all $x \in K$, then if $0_1, 0_2$ are two candidates, $0_1 = 0_1 + 0_2 = 0_2$ (but I used the fact that $0_1$ is a left-neutral element and $0_2$ is a right-neutral element, which proves that the two-sided inverse is unique if it exists). For existence this is another story.
Another issue : you said you assumed existence of additive inverses, but how can you assume this if you are trying to show uniqueness of the neutral element? These inverses will be inverses to what? Say you have $x$ and its inverse is $-x$, $x+(-x)$ equals which neutral element, if you have not proven unicity yet?
I hope this leaves you with stuff to think about. Feel free to ask more questions in the comments.
Hope that helps,
Comment: I would like to rule out the following scenario: There exists $n \ne 1$ neutral elements $0_1, 0_2, ... 0_n$ such that $x + 0_i = x$ for all $x$, but not necessarily that $0_i + x = x$. For all $x$, there exists $(-x)$ such that $x + (-x) = 0_i$ for some $i$ possibly dependent on $x$.
Comment: @vukov : I don't see the point in trying to prove such a thing, and the conditions you give me are kind of weak (I don't expect unicity since these $0_i$ are only *right*-identity elements). Are you in a particular situation where such an algebraic structure showed up and you are trying to prove something about its elements?


How much does a hat of disguise cost exactly?

Question: I can find two different prices for making a Hat of Disguise. Does it just cost half the material cost if all spells are accounted for or what?
Comment: Welcome to the site. Take the [tour]. Thank you for your participation and have fun.
Answer: The hat of disguise has a price of 1,800 gp. This is the amount that a vendor sells a hat of disguise for if one is for sale. If you already have a hat of disguise and sell it to a vendor, he typically pays you half this price.
The hat of disguise has a cost to create of 900 gp. This is how much a creator pays for raw materials to manufacture a hat on his own instead of just buying one. This cost usually includes the masterwork item that will become the magic item unless otherwise specified (as it is with, for example, magic armor, shields, and weapons).
In addition to the raw materials cost, however, a hat's creator must meet the hat's other creation prerequisites, like possessing the feat Craft Wondrous Item and the ability to create an effect like the spell disguise self each day he's working on the hat. It usually takes a typical creator that meets all the prerequisites 2 days in a lab or shrine to make a hat of disguise and a successful Spellcraft skill check (DC 5 + the item's caster level). You can read more about creating magic items—including, for example, how to avoid fulfilling some prerequisites and still create the magic item you want—in Magic Item Creation.

Note: Be careful not to confuse the typical hat of disguise with the greater hat of disguise on the same page! The latter is a totally different item that creates a different effect (like the alter self spell instead of the disguise self spell), therefore possessing a different cost, a different price, and different prerequisites.
Comment: So this would be 900gp and all spells with a craft check at the end correct?
Comment: @Robbot78910  Sort of. Also necessary, for instance, is the right environment for creating the magic item. Note that even then, no matter the result of the Spellcraft skill check, the creator usually can't ignore the Craft Wondrous Item prerequisite nor ignore the raw materials cost nor create any faster. Best to read the section, though, and come back with specific questions. Also, [the site has already answered a bunch of questions on item creation.](http://rpg.stackexchange.com/questions/tagged/pathfinder+crafting)


Migrate from beta version to Standard Edition

Question: We have an installation of SharePoint 2010 beta that was long forgotten until today. There is a publishing site on that installation and now we have to move that site to our Standard Edition installation but as the trial period is over we can't open the site in any way (even with SharePoint Designer). I tried entering a standard edition key but the beta doesn't accept the key as valid. How should I move the site? By moving the content database?
Answer: It was explicitly stated by MicroSoft (at the time of the beta) that there would be no way to 'upgrade' from the beta version to the final release version.
That said, you could try:

Attach the content database to the new server.
back-up the old site using stsadmin/powershell and restore in new version
set back the date of the server (it's a long shot) to gain access to it?

(no i didn't try any of those my self)
Comment: Yes I know there is no way to upgrade, I am just trying to pull out my publishing site. There is no way to connect to the site. SharePoint wants a key and the RTM keys and beta keys are not compatible so the site is locked down!


Probability of a patient receiving new treatment

Question: Five percent of patients suffering from a certain disease are selected to undergo a new treatment that is believed to increase the recovery rate from $30$ percent to $50$ percent. A person is randomly selected from these patients after the completion of the treatment and is found to have recovered. What is the probability that the patient received the new treatment?
What I attempted:-  Let us define the events
$E$= The event that the selected patient received the new treatment
$\overline{E}$= The patient didn't receive the treatment
$A$= The patient has been recovered
We are required to find $P(E|A)$. Here $P(E)=0.05$, $P(\overline{E})=0.95$, $P(A|E)=0.50$, and $P(A|\overline{E})=0.30$
Thus, \begin{equation}
\begin{aligned}
P(E|A)&=\frac{P(E).P(A|E)}{P(E).P(A|E)+P(\overline{E}).P(A|\overline{E})} \\
&=\frac{0.05\times 0.50}{0.05\times 0.50+0.95\times 0.30}\\
&=\frac{5}{62}
\end{aligned}
\end{equation}
Am I correct ?
Answer: Yes, Bayes Theorem is that $P(E|A)$ is $\frac{P(A|E) * P(E)}{P(A)}$ which is exactly what you did.


Can I see everything I have Checked Out?

Question: In SharePoint 13 is there a way for me to view every document I have checked out from one location?
Thanks
Answer:
Go to Library setting
Create new view
Give it a name
Click on filter section
Select column 'Checked Out To'
Select 'Équals to' operator
Assign value as [Me]
Go to Folders Section
Click items without folder
Click Save

Now open the library you will be able to see documents checked out to you.
Answer: If you have the proper permissions you can see what files are checked out by going to  Settings > manage files which have no checked in version on the particular document library.
You can also run a custom report if you are a site admin that allows you to search for your user and check out and check in items. Found under Site Collection Administration> Audit Log reports > Run Custom reports.


Error prompt on startup, and "Disk has a few bad sectors"

Question: I am dual booting Ubuntu 12.04 and Windows 8. Earlier today, after restarting due to some input issues, I started getting the message upon selecting Ubuntu from GRUB, "errors were found while checking the disk drive for /". I opted to ignore it, and Ubuntu loaded as normal. Upon checking the Disk Utility tool, I see the SMART status "Disk has a few bad sectors". When checking the specific information, I am given a warning for "Current Pending Sector Count". What does this mean? Should I allow an automated attempt to fix the issue? I've had further trouble caused by allowing automated fixes to run before because of conflicts with Windows 8 and UEFI, but I have no idea if there is any association between that and this issue. I can't imagine this is due to physical hard drive damage, as it is very new hardware. Thanks to anyone who can explain it.
Comment: What do you mean "automated attempt"?  And how many pending sectors are there?
Comment: On startup, I'm given the option to allow an automated fix, along with the options to ignore and continue or attempt a manual recovery. there is only one pending sector.
Comment: Yes, fix the filesystem first, then check the smart status.
Comment: After allowing the automated filesystem fix to run on startup, the error no longer shows up upon trying to boot into Ubuntu. However, the smart status remains the same as before. I'm content with not having an error on startup, but should I be concerned of the presence of one bad sector?
Answer: There are several duplicates of this question, such as:

What to do if Disk Utility shows bad sectors pending in SMART?
I dropped my laptop. SMART says there are bad sectors. Can I fix this?
I have 4029 bad sectors. Should I worry?
SMART Disk Failure 05 - Reallocated Sector Count: Creating a Partition Ubuntu 12.04

Unfortunately, the answers vary. My own opinion is that, once bad sectors start showing up in a SMART test, the disk has become unreliable. I therefore recommend replacing it ASAP.
Answer: Sometimes sudden power failure can result in one sector being reported as bad because it didn't get completely written.  You can run sudo smartctl -t long /dev/sda to ask the drive to test itself.  Check the status every once in a while with sudo smartctl -a /dev/sda and when it finds a bad sector, note the sector number, then do:
sudo dd iflag=direct if=/dev/sda count=1 skip=sector of=/dev/null

That should report an IO error, if not then something is wrong and you should not proceed.
sudo dd if=/dev/zero count=1 oflag=direct of=/dev/sda seek=sector

This will try to re-write that sector full of zeros.  This should succeed and the SMART pending_sector count should drop by one.  If the sector was physically damaged, then the reallocated_count will go up by one.  Repeat the process until you have no more pending sectors and if you have no reallocated sectors either, then it was just sudden power loss, and the drive is fine.  If you do have reallocated sectors, then then drive may be on its way out and you should replace it.
Answer: Following psusi recommendation, I succeeded clearing my "bad sector".
For more details for beginners:
 sudo smartctl -t long /dev/sda
 sudo smartctl -a /dev/sda

I obtained:
 196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -     0
 197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       1

 (...)

 # 1  Extended offline    Completed: read failure       90%     47004         2730908512

 sudo dd iflag=direct if=/dev/sda count=1 skip=2730908512 of=/dev/null

Gave me an error, but:
 sudo dd if=/dev/zero count=1 oflag=direct of=/dev/sda seek=2730908512

Succeeded and
 sudo smartctl -a /dev/sda

Gave me no more errors:
 196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -     0
 197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0

So, thank you very much psusi for your reply, years later it's still useful :-)
Kind regards,
Txvs


How do I manage a dynamically loaded php string that has both double and single quotes?

Question: I will be loading article titles into strings, and the authors of these titles may or may not use both single and double quotes. To use this imported text in a variable, how can I prevent this from breaking the code as I will not be able to escape the characters myself?
Answer: Escaping the quotes only matters if you're putting it into a string literal (or a database, of course). Simply having the string does not require them to be escaped.
Answer: You can safely use any quotes in your variables - there's no limit in this regard.
You should, however, consider escaping the characters depending on the context you are going to use these variables at. For example, if you wish to display some data on a terminal - no escaping is required, while if showing the very same data inside a web page you will have to take care of that.
For displaying characters in web context, you should use htmlentities().
For using the data to craft a URL, you will find urlencode() useful. http_build_query() might help as well.
Answer: You could use htmlentities().
See full documentation here
Answer: You can use predefined string function addslashes(). Please refer this link for more info  http://php.net/addslashes


RC phase shift oscillator : how to give positive feedback?

Question: why is negative feedback given in a rc shift oscillator although a oscillator requires a positive feedback?
as shown in this figure.
And as shown here positive feedback is given by connecting the positive input terminal to output terminal,which is contradicting to the earlier figure.
Please explain this disparity.
Thank You.
Answer: Your premise is incorrect: "a oscillator requires a positive feedback".
There are two requirements for an amplifier circuit to oscillate:

The overall ("loop") feedback must be 0 degrees ( or a multiple thereof, e.g. 360, 720 degrees).
There must be enough overall gain to start & sustain oscillation. (This is sometimes states as "The loop gain must be greater than 1.")

The prior commentor suggested: "the signal will have been inverted once more by the RCs". Not true. RC networks cannot "invert" a signal. They can only delay or phase shift it. For practical purposes phase shifting a signal by 180 degrees is nearly equivalent to "inverting" the signal because true inversion ( as thru an inverting amplifier) also results in a virtual phase shift of 180 degrees - but only for symetrical waveforms like sine waves, triangle wave and square waves, but not for complex waves like musical notes and voice signals. Be mindful of this distinction when analyzing oscillators and amplifiers.
One RC network can phase shift a sine wave by 0 to 90 degrees. In the act of phase shiting the signal it also reduces the amplitude of the signal. Since 90 degrees phase shift is at the outer limits of an RC's phase shifting ability, we can't use just two RCs. So, we stack three RC networks in series and allow each to contribute 60 degrees of phase shift, for a total phase shift of 180 degrees ( but at only one specific frequency!). These three series-connected RC networks will also attentuate the signal signifcantly at the specific frequency. That attentuation has to be made up in the gain of the amplifier in order to meet the oscillation requirement #2 of having a loop gain greater than 1.
It's also possible to make oscillators using 4,5,6 or more series connected RC's. But there's usually no good reason to take this design approach.
The inversion of the amplifier provides the other 180 degrees of "phase shift". So we have a total loop feedback of 360 degrees or 0 degrees, depending on how you look at it. Either case will meet oscillation requirement #1.
By the way, these RC oscialltors are not very good at making pure sinusoidal outputs. To get the most-sinusoidal-like output you must keep the gain of the amplifier itself low enough so it just exceeds that necessary to maintain oscillation (i.e. 1.000) . Make it too high and the output will be a clipped sine wave, often approaching a square wave in appearance. Experiment with the gain to get both a near sinusoidal output and ensure the oscillator will start reliably. The lower the amplifier's gain, the slower and less reliably the oscillator will properly start up. Power the oscillator on and off a number of times to ensure it will reliably start every time power is applied. It's also a good idea to observe the envelope of the oscillation on an oscilloscope as you apply power to the circuit. You should see a nice exponential increase of the envelope starting immediately at power application, with no drop-outs or squiggles.
Comment: I think, your premise is correct: "a oscillator requires a positive feedback". A loop gain of "+1" is possible with oberall positive feedback only.
Answer: The feedback signal passes through all the RC networks: -

By the time it reaches the inverting input, the signal will have been inverted once more by the RCs. Each RC (on average) adds 60 degrees phase shift at one particular frequency so, at only one particular frequency, will the system oscillate.
Comment: This circuit looks a bit uncommon - however, it works. Explanation: In a "classical" C-R phase shift oscillator the last R is NOT connected to ground but at the invereting opamp input - thus enabling normal inv. amplifier operation. In contrast, in the present circuit this resistor between the inv. input and ground can be OMITTED (remember the principle of virtual ground). In this case, the opamp does NOT work as an inverting amplifier (with a gain of -29) but as an inv. differentiator (phase shift -90 deg). That means, the total phase shift of the remaining two C-R sections is only +90 deg.
Comment: @lvw I totally agree dude that's why I said average phase shift is 60 degrees because I considered that a slightly dumbed down answer is more useful to the op. AFAIK, I've never seen this modified version of this oscillator either and yes, the final resistor is redundant.
Comment: Yes - this modification is seldom used - however, it is not bad at all. As another example, the known RC lowpass phase shift oscillator can be modified if the last RC section - together with the inverting amplifier - is replaced by an inverting integrator. Similarly, here the last CR highpass section (together with the inverter) can be replaced by a differentiating circuit.
Answer: @user41340:
To answer your question: "Positive feedback" does not necessarily mean that the non-inv. opamp input terminal is connected to the feedback path. For example, there are opamp based circuits with negative feedback and phase inversion WITHIN the feedback path.
In the present case, we have such a phase shift within the feedback path - and because we need POSITIVE feedback we have a connection to the inverting input node.
The last circuit as shown is a modification of the classical phase shift oscillator (which needs an inverting gain of -29).
Here we have replaced the last C-R highpass section by an inverting DIFFERENTIATOR (the R between neg. input and ground can be omitted, it has no influence). This part of the circuit contributes -90 deg to the overall phase shift.
As a consequence, the remaining two C-R sections must contribute in total +90 deg. Thus, there is one single frequency for which we have positive feedback with a total phase shift of zero deg within the loop. This is the osillation frequency. Does this answer your question?


How to downgrade iOS 11 beta to iOS 10 without PC?

Question: I have iPad and I recently installed iOS 11 beta 1 on my iPad. Now I see some battery issues and I want to downgrade to iOS 10.3.2. But I checked on the internet and shows that a PC is compulsory. I don't have a PC.
Comment: Also keep in mind the data from iOS 11 won't restore - you'll need to sync or use an older backup for restore point. https://apple.stackexchange.com/questions/286346/downgrade-from-ios-11-beta-to-ios-10-3-2-and-restore-ios-11-backup
Answer: It's impossible without a PC or a Mac to initiate the wipe and also host the reinstall image download and USB control during the downgrade.
In addition to the "computer" - you need an Apple tool like iTunes (Mac or PC) or Xcode or Apple Configurator (or a third party one like Ground Control) to reload the older OS, since there is no OTA bundle for downgrading.
Comment: Well a Mac can be used - so no need of a PC :) - and yes iTunes is a must.
Comment: @bmike Thanks for the substantial edit! I didn't know Xcode can install iOS versions, I can't seem to find a reference to this online? Also I think you didn't finish that last sentence
Comment: Yes. The last bit was about to repeat the first paragraph. Xcode relies on the same underlying framework as iTunes - I should double check this with iOS 11. The OTA profiles are so convenient I use that almost exclusively now and rarely manage updates tethered.
Comment: OTA profiles work when going UP in versions, but I am pretty sure they don't work when going DOWN a version. Especially when Apple themselves say that you can not downgrade from a beta (although the veracity of this is questionable)
Answer: Need a computer. You can download ipsw file on PC or Mac from https://ipsw.me, and restore iPhone with the ipsw firmware by using iTunes. Or use system recovery tools to install ipsw without iTunes.
By the way, iOS 11 beta is only for the developer, not ready for common users now. iOS 11 beta is less buggy but still has many problems. Be patient and wait.
Answer: By now Apple already stopped signing iOS 10, so it's impossible for you to downgrade iPad from iOS 11 to iOS 10.
Answer: POSSIBLE!
Actually it is possible to downgrade from iOS 11 to iOS 10 without computer!
Firstly, you need to get the apple configuration profile I think it's called that? But you need to download the iOS 10 version of it and reboot your iPad and then you'll to software update and see that iOS 10 is there to be updated and then you will be downgraded!
Answer: you can use reiboot downgrade ios 11 to ios 10 on Mac.
ReiBoot Mac verison
http://download.cnet.com/Tenorshare-ReiBoot/3000-18546_4-76033925.html
Comment: This requires a computer, which the OP does not have


Mail for Mac will not accept my password

Question: I have an imac running OSX 10.6.8 on which Mail for Mac 4.6 is installed. I use this app to access my .mac account - this being a MobileMe IMAP account. Since midday today I have been unable to access my inbox or send mail - I am repeatedly told my password is wrong. I have repeatedly reentered my password to no avail. I am able to access my account through iCloud (web based) using my usual password, so clearly I know the password and am not entering it wrongly in Mail. I have checked all the other IMAP and STMP settings - they are correct.
I am also able to access the account through my father's iPad - but have had to set up 2 factor authentication for this to happen. I am wondering if I need 2 factor to access from Mail - but cannot find any way of generating or entering such a password. Help!
Answer: You need to set up an app-specific password, which is now mandatory on anything connecting to iCloud that doesn't support 2FA. See Apple's current instructions here, but they may change over time and so shouldn't be included in an answer.
If the link no longer works, search for "icloud app-specific password".
You will need to set up two-step (not two-factor, which your iMac doesn't support) authentication on your iCloud account.
Comment: Thanks for confirming what I had come to suspect. I was advised by Apple that this may be the case, that an app specific password may be required,  but got the impression that it only applied to 3rd party apps - i.e. apps not provided by Apple with the computer. I have now set up the necessary password and all is back to normal.
Comment: @jeremy Mail on a macOS version as old as 10.6.8 counts as a third-party app for these purposes -- it's not had the benefit of the last five years of Apple's security changes.


How to choose right category names for a programming blog?

Question: If I have a new blog with programming tutorial articles, Is it ok for SEO to have categories like "Web", "Network", "Game",... or It should be like "Web Development", "Network Programming", "Game Development"...?
Comment: @Martijn is perfectly correct about content first. Create content and do not worry too much about anything else. You will need about 300 posts before you begin to worry about anything else. This answer will help with some background regarding URIs and category structures. http://webmasters.stackexchange.com/questions/74633/well-structured-urls-vs-urls-optimized-for-seo/74639#74639 It should give you some ideas. Again, worry about this when you have content (not making any assumptions). Cheers!!
Answer: The time you're spending on this should be spent on creating good content.
Content will have a much much greater effect on your ranking than some category name. Rewriting an article to make it more interesting for the reader will be worth 10 times as much* as this. Keeping your readers interested in your page, making them stay longer and come back should be your main focus.
*Figure of speech, not an actual statistic
Comment: Thank you Martijn, I had read some articles about category/tag naming and it results on seo and I was concerned about this, But now I think you're right. ;)
Answer: If you choose to go with categories like network, web or game then these kind of categories will land in the generic terms of seo. Have relevant categories for your blog.
I think "Web Development", "Network Programming", "Game Development" will work best for your niche.
Do the competitive research to find what others are doing in your industry. You will get good idea about the terms that you can use as your categories.
Comment: Thank You Prashant Gorule, I think we can also have categories with short keywords and use long keywords in tags instead. Please tell me if I'm wrong. But according to @Martijn answer, for now I'm trying to have quality contents for my blog.
Comment: Yes, the category with short keywords will work. Also I am agree with @Martijn on quality content for your blog.


How can I upload HD video from iPhone 4 directly to web?

Question: How can I upload HD video from iPhone 4 directly to web?
Comment: I see you had ask it on webapps, but it is probably more appropriate on this site. http://webapps.stackexchange.com/questions/3486/is-there-a-way-to-upload-higher-resolution-videos-to-youtube-or-any-video-sharin
Answer: Pixelpipe
From https://webapps.stackexchange.com/questions/3486/is-there-a-way-to-upload-higher-resolution-videos-to-youtube-or-any-video-sharin

This free app allows iPhone 4 users to
directly upload their 720P videos to
YouTube, as well as Flickr, Facebook,
MobileMe, Viddler, Posterous and a
whole slew of other video sharing
sites. The app evens works via email
and FTP. The only caveat is that the
videos cannot be over 200 MB in size.

Regarding with how to use it, check out this post:
http://islandinthenet.com/2010/07/06/pixelpipe-upload-720p-hd-video-from-iphone-4-to-youtube/
I recommend that post, it gives some great information on the app and how it is used.
For example:

A "pipe" is the
connector between the PixelPipe app
and one or more destination sites
where you want your content to be
uploaded. For example, I set up pipes
for flickr, picasa, and Dropbox and
many others.
I setup some of my pipes as default
routes. This means that any media I
select to upload will automatically go
to these default pipes.
For each pipe
I created, PixelPipe created a routing
tag. The routing tag explicitly tells
PixelPipe where to upload the content
overriding any default routes. If you
want your content routed to different
photo sets you can create a routing
pipe and tag for each one.

Also, given this:

since other developers are sure to create a similar product now that they know it is possible to upload 720p videos.

If you don't like the PixelPipe app, it shouldn't be too long before another solution pops up :)
According to this page, an app called SmugMug is also 720p uploading enabled, however I couldn't find much in reference to that on their site.
http://www.tuaw.com/2010/07/01/want-to-upload-720p-from-iphone-4-try-pixelpipe/
Answer: The Flickr app will allow you to do this.
Answer: There are many apps that do this. I like the following for ease of use and design. I'll rank them in the order of the quality of the final video (and coincidentally overall usability)

iMovie - very slick, great editing, many upload options like YouTube, Vimeo and others
Posterous - very powerful blogging tool for free.
Vimeo - free but not [yet] as slick as iMovie

One last mention is a live streaming app called Ustream Live Broadcaster - I don't really use it but it's unlike the rest in that it's more of a broadcast tool than for pushing something you captured to the web once the video is complete.


Cycles — Non-translucent glass in compositing passes — Problem

Question: I have a scene that is obscured by a glass plane that has displacement.
The glass curves/bends all the objects that are behind it. << This effect is crucial here.
When I render a scene with passes so that I can edit it in Compositing, a very large portion is unusable because the glass plane is not transparent. It renders as a regular, non-transparent, obscuring object in the scene. So in passes, it is either white or black. For example, Pass AO is white. Even though it is glass the pass does not show anything behind it.
I know there is such a thing as Render Layers, Indirect Only, and Holdout, and in most situations, they can help. In this case, unfortunately, when I put an Indirect Only layer on a plane with glass that obscures everything, it stops curving/bending the objects that are behind it. This way I can theoretically render Passes where I can see the object behind the plane. But by not interacting with the bent glass, all the objects behind the glass are not bent. So I get passes that do not match the beauty pass. Such passes are of no use to me for AO correction, Cryptomate, etc. because the objects on them have different curves.
I also tried to fix the problem using Alpha. Unfortunately, it didn't help anything.
I have no idea how to solve it.
Sample Blend File (399.6 KB) that illustrates the problem:
https://www.dropbox.com/s/zox20msv5b76546/Glass_Plane_Passes_Problem.blend?dl=0
And some screens:
Answer: Under film you can switch on transparant glass