How to determine on which side of a line a polygon feature falls?

Question: I have parcel data intersecting line data.  In the parcel data there are some parcels that don't intersect the line.  How could I programmatically figure out if the non-intersecting parcel is on the Right side or the Left side of the line?  Thanks.
Answer: Use the IHitTest interface. Your query point will be the polygon centroid and the input geometry will be the line. One of the outputs will be a boolean (bRightSide) which will tell you what side of the line you're on.
Answer: You can use the dot product for this
<code>/// <summary>
/// Used to indicate the orientation of an object in space
/// with respect to another object
/// </summary>
public enum OrientationType
{
    Left,
    Right,
    Coincident,
    Unknown
}

/// <summary>
    /// Determines if a point is oriented left, right or coincident with
    /// a directed line.
    /// Line direction is determined by its From and To points.
    /// </summary>
    /// <param name="p">The point to test.</param>
    /// <param name="segment">The line dividing the space</param>
    /// <returns>An OrientationType indicating the orientation.</returns>
    public static OrientationType GetPointOrientation(IPoint p, ISegment segment)
    {

        OrientationType result = OrientationType.Unknown;

        double Ax = segment.FromPoint.X;
        double Ay = segment.FromPoint.Y;
        double Bx = segment.ToPoint.X;
        double By = segment.ToPoint.Y;
        double Px = p.X;
        double Py = p.Y;

        double nDotV = ((Ay - By) * (Px - Ax)) + ((Bx - Ax) * (Py - Ay));

        if (nDotV < 0)
        {
            result = OrientationType.Right;//opposite direction to normal vector
        }
        else if (nDotV > 0)
        {
            result = OrientationType.Left;
        }
        else if (nDotV == 0)
        {
            result = OrientationType.Coincident;
        }

        return result;
    }
</code>
Comment: I think it's worth pointing out that this technique requires the input line to be a line composed of only 2 vertices as it is accepting an ISegment object.
Comment: This works fine for a proper Euclidean line (the whole thing, not just a segment or ray), but I'm pretty sure the OP used "line" and "line data" as loose synonyms for *polylines,* where the dot product approach fails.
Answer: Algorithm to get desired result:

Take the Line in focus
Add some buffer (0.0000005) at Right (or Left) side of the Line geometry.
Check whether buffer geometry is 'Inside' the Polygon geometry or 'Overlap' with Polygon geometry.


Why activity makes me material & full of desires?

Question: I am in very dilemma- When I am inactive or lazy I meditate well, read good religious books etc. But whenever I come into action like studies or useful work I become very material & also get desires to earn a lot of money, respect or other material desires by which I stop doing meditate & completely become indulgent. Can anyone tell me the way to be active & meditator simultaneously. In this current globalized & dynamic world it is huge requirement to be active but that activity makes me material & forget to work for this birth to cross Sansara or Dukkha. So how can I be active & aspirant to dissolve Dukkha/future births simultaneously?
Answer: What really matters for a lay person as per Buddhist teaching is whether you are at least a Sotapanna which assures you the enlightenment withing seven births. As far as you have the right livelyhood you do not have to worry being materialistic and being rich.
Comment: I can't wait for 7 births.
Comment: At least seven. It could be in this life it self. Sotapanna is almost 99% close to Nibbana.
Answer: Sometimes during meditation, a noisy drill or something will start up from outside. Those times are great because you really get to see whether you are able to meditate or you just like the pleasure of tranquil sitting (I am not lazing! I am meditating!).
As long as the job itself conforms to right livelihood (samyag-ājīva / sammā-ājīva), it does not in of itself contradict the dharma.
It is not a problem to want to earn a lot of money. It takes a lot of smarts to be able to do so and you can do a lot of good for a lot of people with a lot of money. The answer lies in your motivation, what you want the money for. Engineers like to solve problems and make things work. Sales people genuinely like interacting with other people. You will have your own vocation.

Let a man, after he has discerned his own duty, be always attentive to
  his duty.
  Dhammapada XII.166

To study, to work, to make a difference, to "light up a corner of the world", these are all admirable things. To please yourself with temporal goodies of all kinds maybe not so much, although:

He who, though dressed in fine apparel, exercises tranquility, is
  quiet, subdued, restrained, chaste, and has ceased to find fault with
  all other beings, he indeed is a Brahmana, an ascetic (sramana), a
  friar (bhikshu).
  Dhammapada X.142
Answer: I have never read anywhere in the Pali scriptures where the Buddha threatened lay people with continuous cycles of rebirth or urged lay people to end rebirths. In the Pali scriptures, I have only read the Buddha teaching the path to 'heaven' for laypeople.
The Buddha taught lay people to work with initiative & energy; to make enough money to support themselves, their family & others.
In this current globalized & dynamic world, you must be efficient. Discipline & non-attachment can help.
Answer:
"So how can I be active & aspirant to dissolve Dukkha/future births
  simultaneously?"

You cannot do it simultaneously.
If you're active, you must think. With thinking, there is no meditation. Thus, no dissolving of Dukkha/future births.
If you're not active, you can stop thinking. Without thinking, there is meditation. Thus, yes dissolving of Dukkha/future births.
Ask yourself what is more important to you? Then do just this one thing and let the other not be a priority.
Whatever you choose, either being active or not being active, you will come to not being active.
Why is this so?
By choosing being active, sooner or later you will get all your desires satisfied.
If not in this life, it will be in the next. Or the next. Or the 100th.
In this satisfaction, no happiness will be found. In satisfying your desires, you will find only happiness that leads to suffering. Constantly circling and going from suffering to happiness and vice versa. This is what satisfying desires leads to. This is the result. This is the truth of satisfying desires.
Once you realise the above truth, you'll let go of desires. Thus, you'll let go of materialism.
Then, you'll live your life modestly, without aquiring to much nor to little and do what is left to do: become not active.
Meditation will happen. Whatever you choose.
Answer: It appears you may not be meditating while you are active, therefore not actually seeing the material desire as it arises in the moment, only knowing about it retrospect, which produces regret, guilt and suffering. If you can see how your mind constructs these material desires in the moment, you will be better equipped to let them go over and over every time they arise. Stop thinking about meditation as an adjunct to life. It is life. Develop mindfulness at all times.
Answer: Meditation involves withdrawing from sense desires. Being active and being mindful is possible, if you develop sufficient base level of mindfulness and equanimity by practicing it ardently so that you are not taken over by your desires when interacting with the world.
But your question is not that, is it? It seems to me that while you in principle accept that meditation is the way forward, you cannot bring yourself around to give up the worldly pleasures. So your question in essence is "Do I do the boring meditation or get excited about the world and the riches it offers? One way there is an end, but the path appears to be boring while the other is exciting but without any end in sight"
Its not easy to give up on pleasures, or the process of becoming, identification. What you can do is develop insight into this, and see for yourself what these drives are made of. When you feel the excitement, ask yourself what is it made of? Is it permanent or transient? Will it bring me the promised pleasure or will it leave me high and dry, in want of more like an addict needing another fix? Will attending to these desires bring any satisfaction, release or will I be perpetually a slave to it?
See for yourself that these drives are transient, unsatisfactory and without any essence. That in essence is mindfulness. And that leads to unbinding from the samsara and dukkha.
Answer: Because you have not dissolved the Hindrances, Afflictions, and not attained Awakening. These fires are active in all people.
Instead of taking the restrictive and simpler path: the Theravadin path of becoming a monastic.... most of us have to choose to take the Mahayana path--the path of attaining Awakening within the world of Samsara which has become more complex in nature.
This is the path of Bodhisattva and produces a superior class of Enlightened beings as compared to the Theravadin path whereby such people cannot keep their peace within the world. But unfortunately, in some ways this path is harder than ever (more desires).... In other ways this path is easier now than ever (technology, facilities, conveniences, GTD).
Keep practicing and learn to not add attention/energy to fires.


3 prong range outlet

Question: I wired a 3 prong range outlet using 8/2 wire. I had a black insulated, white insulated, and a bare single strand copper wire. In the outlet I wired the black wire to one hot side and the white wire to the other hot side. I wired the bare copper wire to the neutral prong. For the breaker I used a 2 phase 40amp breaker and wire the black wire to one side and the white wire to the other side. I then wired the bare copper to the ground bar ( not the neutral). Is this correct or should I redo it in a different manner?
Comment: Why did you even wire up a 3-prong range outlet in the year 2019 to begin with? *blinks*
Comment: Don't forget to tag your country! It's very important with electrical questions.
Comment: @ThreePhaseEel, possibly because of the presence of a three-prong range?
Comment: @Mark -- then you swap the range to 4-prong and put the proper outlet in. (It's not that hard!)
Answer: For an old installation, there are some "shortcuts" grandfathered in, but even those are based on "no ground but have a neutral". You have the opposite - and much worse - problem of "no neutral but have a ground".

Rip out the 8/2 and put 8/3 in place. That will give you two hots (typically black & red), neutral (white) and ground (bare or green).
Replace the 3-prong outlet with a 4-prong outlet NEMA 14-50. This has connections for 2 hots, neutral, ground.
Replace the 3-prong cord with a 4-prong cord. You will likely have to make a small change inside the range to separate ground and neutral.

What you have right now is unsafe on many levels. It happens to work because on a typical range the neutral carries relatively little current most of the time. But it violates code in several ways:

White should not be hot.
Ground and neutral should be separate.
Neutral should be white or gray, and definitely never bare.
New installations should always use a 4-prong outlet.
Comment: @JimStewart Doesn't matter if the wiring is easy or not. 8/2 just will not work here safely or code-compliant. If it were "2 hots + neutral but no ground" then retrofit ground would be a safe and possibly legal solution. But that isn't the situation here. Rewire is the only practical alternative.
Comment: Thank you. I appreciate the response.
Comment: So at present are the walls open so the wiring can be easily redone?
Answer: You can't do that.  That's been outlawed since 1989.
You need to redo the circuit using 8/3 cable (or 6/3 if you aim to breaker it for 50A).
You need to wire a separate neutral/ground and bring it into a NEMA 14-50 receptacle (if you use receptacles, that's not required).
You also need to jumper the oven for a 4-wire connection, which means removing a jumper between neutral and ground.
Why?
The pre-1989 wiring was a throwback to the 1960s before any grounding was done at all. Appliance manufacturers argued that big appliances don't need grounding because it would ruin appliance sales if everyone had to rewire their house to replace an appliance.    When asked "How do we ground the appliance, then", the manufacturers said "To the neutral" (i.e. bootlegging ground; which was never allowed anywhere else).  Their logic was that ranges and dryers were rarely plugged in and were unlikely to fail.
Of course, if the neutral wire does fail, this neutral-ground bootlegging guarantees the chassis becomes electrified the moment you open the oven door or start the dryer.   And yeah, this kills people.
It's usually put in the newspapers as "faulty wiring" but that's not true. Faulty wiring is when you connect it wrong from the start.  There's nothing faulty about a wire that merely breaks. Electrical wiring is meant to be resilient, and a simple wire break is normal enough that it shouldn't create a hazard. The NEMA 10 style wiring you just did violates that principle.
If the inspector doesn't fail this inspection, he or the buyer will getcha when you try to sell the house.  Might as well fix it now when you have access to the route.   Also for safety.
Comment: @trognanders The original outlets were wired for 240+120V, meaning the three wires are **hot hot neutral**. The receptacle is "NEMA 10".  The appliance uses 240V for the big stuff (range: everything, dryer: heat), and 120V for the little stuff (range: oven light; dryer: everything else.)   That is why it needs neutral.    The thing you're thinking of is **hot hot ground**, used by water heaters, A/C, compressors welders etc. The receptacle is "NEMA 6".
Comment: @trognanders not today!  And not even back in the day... *unless* it was a particular type, SE I believe, that Code authorized.  It had a webbed ground wire.  Of course lots of installers used NM illegally...
Comment: Were you ever allowed to use an earth ground wire for the neutral leg of a three wire circuit? This seems very wrong, like the original outlet was wired for a 240v only outlet with earth ground.
Comment: Right, the "hot-hot-neutral" is what goes behind a stove, but are you allowed to use a bare copper conductor for neutral?
Comment: @Harper -- yeah, Code authorised /2 SE for use for NEMA 10s back in the day because there was no NM bigger than 10AWG back then
Comment: @ThreePhaseEel Okay, I figured that the failure mode of a broken neutral is so dangerous, they wanted a "ground" wire unlikely to break.  Are you saying they revised it later to allow any sort of /2+ground cable?
Answer: Electric ranges use a three wire 220v/110v circuit with a neutral wire splitting the voltages between the hot legs. There is also supposed to be an earth ground, which is a fourth wire.
The old code allowed the ground wire to be omitted, but that is ancient history. Not acceptable for new work. Pulling 8/2 wire was incorrect.
Wiring the bare copper grounding conductor to the neutral prong is incorrect. The neutral must be an insulated wire. When you have the correct neutral wire, it should be connected to the neutral bar of the breaker box, not the grounding bar. In the current configuration, you are running current through the ground bar, which is not great.
Connecting the white wire to the hot leg of a circuit is not safe, someone might think it is neutral and electrocute themselves or cause a fire. Your wiring will also look like 110v but be energized with 220v. Hopefully whoever works on it next will notice they had to turn off a 220v breaker, but they might not!

3 prong range outlet


How do I get rid of "On Behalf Of" from my sent Gmail messages?

Question: I have a Google Apps account with 1 primary domain and a secondary alias domain (let's say example.co.uk and example.com). When I send emails from the alias domain, the receiving person sees the sender as "firstname.lastname@example.com On Behalf Of email@example.com", which is a bit messy. How do I get rid of this?
Answer: To do this, you need to set up Gmail to send emails via an "external" mail server. However, since the alias domain is already registered with Google, you can in fact set this "external" server to their servers and have it work just fine!

Google Workspace Admin -> Apps -> Google Workspace -> Gmail -> End user access -> Enable Allow per-user outbound gateways in Domain admin.
Gmail -> Settings -> Accounts -> Edit Info (on alias account) -> Next Step -> Send through example.com SMTP servers (recommended for professional domains)...
SMTP Sever: smtp.gmail.com, Port 465
Username: firstname.lastname@example.com (Note: not the alias domain login, but your main Gmail login)
Password: (Password for the above account)
Select Always use a secure connections (SSL) when sending mail.

If you don't have this other domain added as an alias and are just sending from an additional email address you'll have to send via the email servers of this other domain.
(Yes, I know I answered my own question, but it took me an age to figure this out, so I wanted to share it!)
Comment: Answering your own question is totally fine! Thanks for sharing.
Comment: Doesn't work, the parent domain is still visible in the email headers: `Return Path`, `Recieved-SPF` and `Authentication-Results` all have parent domain details in it.
Comment: It looks like Google have got it wrong. Once I set the SPF field properly for my domain, the "via" field started appearing. I would imagine this would be the other way around.
Comment: If you are usign G Suite you need to turn on this setting in Domain admin first `Allow users to send mail through an external SMTP server when configuring a "from" address hosted outside your email domain`
Comment: Yup, that's how I do it.
Comment: Do you still get the On Behalf Of message then? If so, is the parent domain registered as an alias with Google Apps?
Comment: I followed your instructions above and the email was sent succefully. The alias domain is set up in Google Apps, but I still get the "on behalf of" message. Any other tips?
Comment: Sorry, no... it works that way for me, so I've never needed to try another way. Have you got the domain authentication / SPF stuff set up? I do, but no idea if that affects this or not...
Comment: This is very odd. I have two separate Google Apps installations on two domains. I followed this guide on both, one displays the "via" and one doesn't. The headers for both emails are identical, except that the one that shows the "via" passes its SPF. I'll change the SPF headers now and retest, although I don't think it's related.
Comment: So what if you don't have this option?
Comment: This does not work in 2021.
Comment: @Pie - What part of it doesn't work? Mine is still working fine after all these years, but interestingly I don't see the option under Edit Info on the alias to specify an external SMTP server any more. When I saved my settings for my alias it removed the "Mail is sent through smtp.gmail.com" detail but it still appears to work OK and doesn't show On Behalf Of... so it still appears OK to me.
Comment: @x3ja Are you able to post a few screenshots on how exactly you have yours setup?
Answer: You can use gmail's send-through feature. Under settings -> accounts and import, edit the email address in question, and when prompted, choose to "send email through example.com SMTP servers". After configuring the SMTP server settings, you should be good to go.
Comment: The only thing you can do currently is change the "reply to" address, in regards to a gmail address, in 2021.
Comment: Because this was an alias domain (configured to have Google as its mail servers), there were no external mail servers. It took me a while to figure out that I could just set the servers to Google's ones... see my answer below :)
Answer: Here's my writeup on why the accepted answer both works and doesn't:
http://www.stavros.io/posts/how-properly-configure-google-apps-email/
Basically, you need to set both the SPF and DKIM fields for "via" to go away. There's a bug that removes "via" if you have neither set, but that's just a bug, and you really should set both for deliverability anyway. That should allow you to properly remove the "on behalf of" display in Gmail.
Comment: Doesn't work I'm afraid. Even with SPF, DKIM and DomainKeys configured you still get "on behalf of". The only solution that worked for me was setting up Gmail to use itself as an external SMTP server.
Answer: What Stavros suggested vastly improves the reliable delivery of our emails to any outside domains and will cause it to not go to spam.
However to finally clinch it, I turned ON an important option of "Allow Per User External Gateways" in Gsuite Admin found under "https://admin.google.com/ac/apps/gmail/ enduseraccess"
What this does is under the Email that we add, after Clicking Next Step, instead of just refreshing it as a Saved option, it takes to a next screen of providing the SMTP server login details of the outbound domain and there you can again give the userid@aliasdomain name and password.
This finally ensured that the mails always go out as user@aliasdomain without the receiving outlook clients showing On Behalf of or Via.
I guess the steps Stavros advised are also needed at the DNS level but he may have assumed that this step is already turned on and despite giving SMTP details the On Behalf shows up.
So what is missing in your case could be the enabling of "Allow Per User External Gateways"
Comment: I have "Allow per-user outbound gateways" enabled but have the same issue. When I attempt to add the secondary address, it does not prompt for SMTP credentials unless it is a non-Gmail/Google Workspace account.


BigCouch all_nodes vs cluster_nodes

Question: I have a BigCouch cluster that I'm spinning up in EC2. I've launched the instances correctly and set the proper constants, but when I try to let the nodes know about each other, their "_membership" lists all the nodes I've added in "cluster_nodes" but not in "all_nodes". Any ideas?
Answer: I just heard from Robert Newson on IRC that BigCouch nodes are connected lazily.

BigCouch all_nodes vs cluster_nodes


roasting potatoes at low temperature

Question: Has anyone successfully roasted potatoes at the same time as slow-roasting meat? I usually par-cook my potatoes then roast them for an hour at 180 degrees C to finish/crisp, but when I'm slow roasting meat at 150 degrees C I'm never sure how to do the potatoes.  Any suggestions that would allow me to finish the meal at the same time?
Comment: When I do my roasts on a slow cook, I generally sear the outside in the pan, then cook at 350 or so for an hour before turning the temp down for a slow roast. Throwing the potatoes in at 350 would certainly crisp them up...
Comment: Are you roasting the potatoes whole? If so, what is the approximate weight of each potato?  What type of potato (I need this info, even if they're not being roasted whole)?
Answer: Actually did this last night while roasting a chicken, made some schmaltz from the fat I trimmed off the quarters, large diced them and coated them with the clarified chicken fat, S&P on hot cast iron and into the oven @ 375 with the chicken about 20 minutes before the chicken was done. Raised the temp to 475 and took the chicken out to rest. Raised the rack to the top for another 15 mins+/- finished under the broiler. Nice and crispy outside and fluffy but not mushy i.e., over cooked. Very similar to cooking FF or Pommes Frites 2x in 2 different temps of oil
Answer: You could try tossing the potatoes in at the same time as the meat and then take them out ten to fifteen minutes before the meat is done. Then, brush the potatoes with some oil and go over the surface with a blowtorch to crisp it up. I've also found that coating potatoes in sugar (brown sugar in particular) and melting the sugar with a blowtorch forms a wonderful sort of glaze over potatoes, which when cooled turns crispy and adds a nice sweet touch to them.
Comment: No need for a blow torch -- large hunks of meat generally require a bit of resting time, so you can pull the potatoes once they're cooked through, then once the meat's done, crank the heat up to get a bit of a crust on the potatoes.
Answer: I put the potatoes in at some point while the meat is cooking, depending on how long the meat needs to cook, so that they cook through and then crank the heat while the meat is resting to crisp up the potatoes.
Another option would be to par-boil them first and then put in the oven once the meat is cooked.
Either way, make sure you have a good bit of fat in the pan to aid in crisping (I almost always go with bacon fat), and don't over crowd the dish that the potatoes are in, otherwise they are basically just steaming each other instead of roasting.

roasting potatoes at low temperature


Finished Kriat Shema after the deadline

Question: If I start the Shema before the zman but I finish the 1st 3 paragraphs after the alloted time, what is the halacha?
Comment: What is the question?
Comment: Do you mean to ask if that is a violation of the deadline? If you fulfilled your obligation correctly?
Comment: There's the issue that we don't know exactly when zmanim are-- most zmanim charts are +/- 2 minutes. If you're starting close enough to the zman that this is an issue, you might want to say that because of doubt, the blessings aren't made, but the shema is still recited, because there's no point where it's prohibited to recite shema.
Comment: What else besides the 3 paragraphs is there?
Comment: the mishna regarding a person in a mikva seems to say you're yotze with the first verse.
Answer: There is a machlokes haposkim what portion of Shma is min hatorah (Aruch hashulchan 58:16:
1. First pasuk
2. first parsha
3. First 2 parshios
4. All 3 parshios
Thus, if the sof zman krias shma arrived during Shma, at least you fulfilled the mitzva min hatorah according to so opinions.
There is a fascinating Aruch Hashulchan 110:5 based on Tosfos (who writes that Bilaam only started to curse Bnai Yisroel when Hashem was angry but concluded the curse afterwards) who holds that if one starts during the zman one can finish after the zman. His opinion is probably limited to Tefilah whose time limit is derabanan and does not apply to Shma whose time is min hatorah, but his proof from Bilaam might imply otherwise.
Comment: Not everyone agrees that what we call sof zman krias shma is a biblical time limit.
Comment: But does anyone hold the opposite of the _AHS_'s view?
Comment: @msh210 AH is a huge chiddush not mentioned AFAIK elsewhere which is an indication that his view may not be shared.
Comment: @AA minchas cohen claims it's not min matorah but most poskim disagree. If time limit is not min hatorah then the AH logic would likelier apply.
Comment: Apparently, the Ben Ish Chai holds the interesting view that the majority of the amidah must be recited before the z'man ("כדי שתהיה תפלת המנחה רובה בתוך בין השמשות"). See [this answer](http://judaism.stackexchange.com/a/56327).
Comment: added the Aruch Hashulchan its Haveneinu
Answer: If the question was regarding fulfilling one's obligation to recite Shema' in the morning, Qizur Shulhan 'Arukh - Yalqut Yosef (Orah Hayim 58:2) states (my translation):

Within Zeman Qeri'at Shema' one must read all three paragraphs and not just the first.

Finished Kriat Shema after the deadline


What's the best way to machine LEGO pieces on a mill?

Question: Does anyone have experience with modifying LEGO pieces on a mill? Any suggestions on cutting speed?
Answer: I don't have any experience modifying a brick with a mill but I have had success using a drill press, knife, and dremel. I can't imagine there being any problems while using a mill.
If you're looking to clean out the pipes inside a brick, I've found higher speeds with a drill work better. At a lower speed, the bit cuts into the pipe but doesn't remove any of the plastic. When the bit is spinning faster, it doesn't cut into the pipe but shaves the plastic off.
Lego is ABS plastic, I believe, so doing some research on working with ABS, rather than specifically Lego, might give you more answers too.


Why muslims are not allow to touch dogs?

Question: My neighbour has a dog and it's very playful. I really want to touch & play with him. But my mother told me Muslims do not touch dogs. I asked her why & she said because it's in the Quran. She didn't say exactly why are we not allowed to touch it. Is it a sin to touch it?
Comment: This is related [Are dogs impure?](https://islam.stackexchange.com/questions/12189/are-dogs-impure)
Answer: It is not a sin to touch a dog.
The saliva of a dog is impure. So if dog licks your utensils, then the utensils must be washed 7 times and 1 time with soil.Similarly if a dog licks your clothes, then you need to wash it the same way - 7 times and 1 time with soil.

It was narrated from Abu Hurayrah (may Allah be pleased with him) that the Messenger of Allaah (peace and blessings of Allaah be upon him) said: "The purification of the vessel of one of you, if a dog licks it, is to wash it seven times, the first time with soil." Nararted by Muslim, 279.

Dogs can't be kept as a pet. Dogs can be kept as a guard, hunter etc.

It was narrated that Ibn Umar (may Allaah be pleased with him) said: "I heard the Messenger of Allaah (peace and blessings of Allaah be upon him) say: 'Whoever keeps a dog, except a dog that is trained for hunting or a dog for herding livestock, his reward will decrease each day by two qeeraats.'" (Narrated by al-Bukhaari, 5059; Muslim, 2941).

So you can see the hassle of washing if a dog licks something. Maybe because of this Muslims stay away from dog.
Again, it is not a sin to touch a dog, you just need to follow the hadith if a dog licks your clothes or utensils.


Monero GUI goes from connected to still downloading?

Question: I am having fits with this monero wallet.. got the right program so that is not the issue.  It will show me connected, but no balance.  then it will go back to downloading blocks.  What the heck..this is day 4.  Is there another way to get the blockchain downloaded.  Trying to use  monero-gui-win-x64-v0.11.1.0.  I have an older computer and low internet speed. Plus I am not that computer talented.
Comment: You could try importing the blockchain to speed up the process
Comment: Also you could consider using a remote node instead of downloading the blockchain yourself
Comment: Possible duplicate of [My blockchain is stuck, how do I "unstuck" it?](https://monero.stackexchange.com/questions/4462/my-blockchain-is-stuck-how-do-i-unstuck-it)
Answer: Part of the problem is the size of the blockchain. As each new block is solved and added to the chain, it grows in size. You are caught in somewhat of a (winnable) race condition: The Monero blockchain is set to dynamically adjust difficulty such that a new block is minted approximately once per minute. Each minute that goes by while you're downloading the blockchain, another block has been added to the chain. In essence the finish line is moving slowly and steadily away from your computer, as it runs to catch up. The biggest factors in how long it takes to catch up is your download speed, and the upload speed of the node you're syncing your wallet or daemon with. One thing you can do to speed up the process is to download a copy of the blockchain, and import it, giving your wallet client a "head start" in essence.
Answer: So there is the thing: It really takes a lot of time to download the whole blockchain. But that's needed, so there is no way around it.
After the blockchain was downloaded completely, you will see the status connected but after some time it will start downloading again because in the meantime new blocks got generated from new transactions that came up on the blockchain.
So to have the whole blockchain again, the wallet will need to download these new blocks again. That's why it will start downloading again after some time.
If you don't want to mess around will all that, you could use an online service to store your Monero. You will still get the private key and you will have the benefit that you don't need to download anything.
See the MyMonero website


Which four kingdoms are represented in the statue of Nebuchadnezzar's dream in Daniel Chapter 2?

Question: Question is straightforward: Which four kingdoms are represented in the statue of Nebuchadnezzar's dream in Daniel Chapter 2?
Comment: I remember preaching a sermon about this in which I had to remind both my church and myself - this vision is not about the statue - it's about the rock!
Comment: (Not to say this isn't a great question - just, I get so wrapped around the axle on the earthly kingdoms, that it is easy to neglect the point - the ROCK (aka the Church or heaven) makes everything crumble!)
Comment: If memory serves, the Word Biblical Commentary says the Iron is Greece, which was interesting to me. I had always been under the impression it was Rome. It might be worth considering both perspectives before drawing conclusions.
Comment: FOUR KINGDOMS - The four kingdoms of Babylon, MediaPersian, Greek, and Roman fit not only the prophetic scheme, but the manifest history of the ancient world.  It is also confirmed by the correct use of metals to describe those empires: Babylon's splendor was golden..the Persians were inferior economically...the Greeks were known for their bronze armaments...and the Roman  mastered the use of iron, which they used to stomp all over the Mediterranean!
Answer: Text critical perspective:

The Four Kingdoms Sequence
The concept of dividing the world into a sequence of four eras, and even associating those eras with four metals, did not originate with the book of Daniel.
In the post-exilic period we find at least one Israelite text specifically using the same four metals in the same order for poetic or symbolic value:
Instead of bronze I will bring gold,
instead of iron I will bring silver;
instead of wood, bronze,
instead of stones, iron.
(Isaiah 60.17, NRSV)
The premise here is that, on each line, the former material is replaced by another material of greater value (e.g. bronze replaced by gold, wood replaced by bronze).
The most well-known parallel in any ancient literature is from the Greek writer Hesiod (c.750-650 BC), who categorized five eras of history, each worse off than the previous one. Hesiod symbolizes four of the five eras with the same metals as Daniel 2, in the same order:1
Golden was the first race of articulate folk Created by the immortals who live on Olympos
. . .
Later, the Olympians made a second generation, Silver this time, not nearly so fine as the first, Not at all like the gold in either body or mind.
. . .
Father Zeus created a third generation Of articulate folk, Bronze this time, not like The silver at all
. . .
Then the fifth generation: Broad-browed Zeus Made still another race of articulate folk To people the plentiful Earth.] I wish I had nothing to do with this fifth generation, Wish I had died before or been born after, Because this is the Iron Age.
But despite this recognition of a Greek source, it has been shown the four kingdoms / metals imagery may actually have originated in Persia.2 In any case, the point is that such a sequence of eras / kingdoms / metals was not unusual in literature throughout the first millennium BC, so the author of Daniel was drawing upon a common motif.

Possible Early Form of Daniel 2
Because of the nature of the book of Daniel (its mix of Hebrew and Aramaic, its anachronisms, and its apocalyptic flavor), most scholars date it to the Hellenistic era of Israel; usually about 170-164 BC because of the many clear references to Antiochus IV Epiphanes in chapters 8, 9, and 11.
But despite this late date for the overall form of Daniel, it is still thought its 'court tales' about Daniel go back earlier, when such stories were passed on orally and had variants.3 In this case, it is speculated the Daniel 2 story may have originally been about four kings of Babylon (the four metals), with the fourth king's reign being weakened (iron mixed with clay), eventually leading to Babylon's downfall:

Gold = Nebuchadnezzar (605-562 BC, stated explicitly)
Silver = Amel-Marduk (562-560 BC)
Bronze = Neriglissar (560-556 BC)
Iron = Nabonidus (556-539 BC)

mixed with clay = Nabonidus' coregency with Belshazzar, weakening the kingdom

Here, the statue originally represented all of Babylon, with its destruction by the stone representing the kingdom's collapse:4
The stone that became a great mountain could then be understood as a messianic Jewish kingdom or conceivably, in a non-Jewish context, the Persian empire.
Whichever the case may be, this would imply the court tale originated shortly after (or perhaps just before) Persia conquered Babylon, in 538 BC.

Final Form of Daniel 2
Unity of the Book of Daniel
The author of Daniel lived during the period of the Maccabean Revolt, and has incorporated the dream-vision of Nebuchadnezzar into his story. Regardless of whether the story existed before this time, or if this author wrote the story as inspired by loose pieces of earlier 'four kingdom' material, it now serves the purpose of the narrative it has been embedded into.
Namely, the overall premise of the final form of the book of Daniel is that God is sovereign over the kingdoms of the world, in which case the Jewish people suffering under the conflict instigated by Antiochus IV Epiphanes need to remain faithful to their covenant with God. This is most explicit in the apocalyptic portion of the book, Daniel 7-12.
These chapters can be divided into four units: chapter 7, chapter 8, chapter 9, and chapters 10-12. While these units each may, in turn, have been influenced by earlier material,5 their final forms are likewise tied together with the book's overall purpose and content. Specifically, the dream-vision from chapter 7 is directly based on the pattern of the dream-vision from chapter 2.
Hence, for the author, the dream-vision of Daniel 2 is about the same thing as the dream-vision of Daniel 7: the four metals of the statue equate to the four beasts of the sea, so that the statue's destruction is analogous to the judgment that comes on the four beasts, especially the 'little horn' of the fourth beast.
Each of the four apocalyptic units of Daniel 7-12 climaxes with the persecution by Antiochus IV Epiphanes. He is the 'little horn' of Daniel 7 and 8, the 'desolator' of Daniel 9, and the wicked 'king of the north' who comprises the bulk of Daniel 11.21-45.
The Kingdoms Involved
In this final form of the book of Daniel, the four kingdoms' identities are all but stated directly for the reader: they are, from the perspective of the author, four kingdoms that held power over Israel, beginning with the Babylonian exile.
The details attached by the author to the beasts in Daniel 7, the animals in Daniel 8, and the extremely specific series of kings in Daniel 11 help us narrow down which kingdoms and kings the author considered relevant to the book's message:

Nebuchadnezzar and his kingdom
Media
Persia
Alexander's unified Greece
Alexander's successors, the Diadochi
Antiochus IV Epiphanes

There is some debate over exactly how the author made his four divisions; you'll frequently find scholars separating Media and Persia (as the second and third kingdoms, respectively), while combining Alexander, the Diadochi, and Antiochus (as the fourth).
I will provide a final listing below, but first...

Later Interpretations
Of course, if Daniel was an easy book to understand, we wouldn't have this question in the first place. It's unsurprising that later readers would interpret it according to their own contexts, due to the hefty and somewhat ambiguous symbolism of the apocalypse.
Although Josephus provides only a surface-level interpretation of a few select passages, and understood at least some of Daniel as describing the Maccabean era, he does explicitly state:6
Daniel also wrote concerning the Roman government, and that our country should be made desolate by them.
The key word here being 'desolate', implying an identification of Rome's 70 AD conquest of Jerusalem as being the 'desolation' so mentioned in the later chapters of Daniel. Accordingly, Josephus' count of the four kingdoms may have been as follows:

Gold = Babylon
Silver = Media-Persia
Bronze = Greece (Alexander and the Diadochi)
Iron = Rome

One apocalypse written contemporaneously to Josephus' Jewish Antiquities and John's Revelation (discussed below) was that of 4 Ezra. One passage in 4 Ezra foresees the arrival of the messiah and his kingdom during the rule of the twelfth Roman emperor (4 Ezra 11-12), while the next passage clearly combines elements from Daniel 2 and 7 to again prophesy about the messiah's arrival (4 Ezra 13). Together, these suggest the author held to the same Roman sequence found in Josephus.
Jesus' usage of Daniel also implies the Roman sequence — especially his Olivet prophecy, which grabs both the 'abomination of desolation' (Matthew 24.15) and the 'son of man coming on the clouds of heaven' (24.30). Like Josephus, Jesus applied them to the 70 AD destruction of Jerusalem by Rome.
And, of course, the author of the Revelation incorporated images from Daniel all throughout his book, where Rome is cast in the role of a 'beast of the sea' based directly on all four beasts from Daniel 7.
Later Christians writers frequently identified Jesus with the 'stone' that struck down the statue in Daniel 2 (e.g. Ignatius,7 Tertullian,8 Irenaeus,9 Hippolytus10), easily enabling readers to infer their agreement with the Roman sequence.
John H. Walton gives a somewhat deeper look at Jewish, Christian, and miscellaneous interpretations, up through the present.11

Conclusion
Setting aside the possibility of pre-existing source material, and later interpretations of the final, unified text...
For the author of the book of Daniel, writing during the Maccabean Revolt, the original intent was likely for the four kingdoms to be identified as the following, according to the common critical view:

Gold = Babylon
Silver = Media
Bronze = Persia
Iron = Greece (Alexander through Antiochus IV Epiphanes)

mixed with clay = the Antiochene persecution and subsequent revolt in Judea

Footnotes
1 Hesiod, Works and Days (Stanley Lombardo translation), lines 129-204. Hesiod doesn't equate the fourth era with metal, or any material substance, only calling that generation a 'divine race of Heroes' and 'Demigods'.
2 John J. Collins, The Apocalyptic Imagination (1998), p.92-94.
3 It was long speculated the court tales concerning Nebuchadnezzar may originally have had to do with a later Babylonian king, Nabonidus. Eventually, the Dead Sea Scrolls were discovered; one of the scrolls, 4Q242, bears uncanny resemblance to the story of Daniel 4, but with Nabonidus in place of Nebuchadnezzar; cf. James H. Charlesworth, The Bible and the Dead Sea Scrolls: Scripture and the Scrolls (2006), p.104ff.
4 Collins, The Apocalyptic Imagination, p.95.
5 E.g. the vision of a monster and a cloud-rider in Daniel 7 seems to have loosely borrowed common cultural elements seen in the Anzu myth, the Baal and Yamm combat myth, and the Enuma Elish (cf. The Book of Daniel: Composition and Reception, Volume 1 (2001), p.69ff), combined with a throne-judgment scene that possibly existed independently (The Book of Daniel: Composition and Reception, Volume 2 (2001), p.390ff).
6 Josephus, Jewish Antiquities (Whiston translation) 10.11.7.
7 Ignatius, Magnesians 6 (long recension).
8 Irenaeus, Against Heresies 3.21.7; 5.26.1-2.
9 Tertullian, Against Marcion 3.7.
10 Hippolytus, Commentary on Daniel 2.13.1-3.
11 John H. Walton, 'The Four Kingdoms of Daniel', JETS 29/1 (1986), p. 25-36.
Comment: This answer (which many scholars support if not most) does seem not to be on Paul's radar since he sees the arrival of the arrogant king to be yet future:  2Th 2:3  Let no man deceive you by any means: for that day shall not come, except there come a falling away first, and that man of sin be revealed, the son of perdition;
2Th 2:4  Who opposeth and exalteth himself above all that is called God, or that is worshipped; so that he as God sitteth in the temple of God, shewing himself that he is God.
Answer: The Kingdoms as Often Understood
The majority consensus would say:

Babylon
Media-Persia
Greece
Rome*

The Reasoning
The first is identified in the text, Nebuchadnezzar is called the head of gold in Daniel 2:38.
Following this, the second and third Kingdom, would be the kingdom of the Medes and Persians, followed by the Greecian Empire, with Alexander the Great as its first ruler.
The Issue With Rome -- Past or Future or Neither?
The only caveat, (*) is that Rome is often interpreted as either completely historical (in the Preterist view), or that it continued in some form (some make the claim the Roman Catholic Church is still 'Rome' today, such as certain historicists), or in some way to signify a future, rebuilt Rome as the fulfillment.
The future fulfillment folk would be most of the modern interpretations that are generally mainstream these days, which would be pointing towards a future fulfillment of much of Daniel and most of Revelation.  Some would say that there will be a 'Revived Roman Empire', that it will come back in some way, while some say that the original Rome was only a foreshadowing of the real fourth-empire that is yet to come, but that historical Rome itself was not it.  Some also attempt to differentiate between iron section and the iron/clay section, and make five Kingdoms.
A minority group of opinions consider the second Kingdom as the Medes, the third as the Persians, and the fourth to be the Greeks, putting the whole thing back even further.  Others posit a Islamic Caliphate as the fourth kingdom, completely bypassing Rome.
Support for Rome
Substantial support for the Rome-ending sequence can be found throughout the sequence of the book, however.
In Daniel 8:20, the kings of Media and Persia are grouped together, and they are together seen fighting what is identified as the King of Greece.  Further, since many consider Daniel 2 & 7 to be parallel, Daniel 7:17, reading, "These great beasts, which are four...", clearly identifies the number of beasts to be four, not five (some do not agree to this parallelism).
References Within Daniel
Still further evidence within the book of Daniel that points to a historic Rome solution for the fourth Kingdom is found in Daniel 11.
As Daniel 8 established the conflict between the Ram (Media-Persia) and the Shaggy Goat (Greece), Daniel 11 begins with the kings of Persia (Daniel 11:2), and goes on to describe the king of Greece (Daniel 11:3), which, historically is seen to be Alexander the Great.  When he died in his early thirties, he left his kingdom to his four generals, "parceled out toward the four points of the compass".  These four kings then, are the King of the North, South, East and West.  For the passage following, these all refer to the Greecian Kingdom, in its four parts.
Following the throne(s) of the Greecian Kingdom (not the kings, but the king-ship), the history of the Greek Kingdom is fore-told.  The progression lays out the lineage of kings of Greece.
In Daniel 11:21, it gets interesting, as the character Antiochus Epiphanes is discussed.
Daniel 11:21-35 then detail the reign of Antiochus and his desecration of the Jewish Temple with the Abomination of Desolation in Daniel 11:31.
A fulfilled Daniel 11?
A great number of scholars hold that the historical fulfillment of Daniel 11 stops here.  There claims to be no great concensus within those that would interpret Daniel beyond this point. Some claim that Antiochus only fulfilled a "type" of Daniel 11:21-35, but that the real fulfillment will be a future anti-christ. While not necessarily a popular viewpoint, the case for a more-fulfilled Daniel 11 can be made.
In Daniel 11:36, the "willful king" is considered by some to be one of the four, or to be a third entity.  When we consider the rest of v36, we read this, in Daniel 11:36b,

and he will prosper until the indignation is finished, for that which is decreed will be done.

This would indicate, if Rome is the last kingdom, that this kingdom will be the last kingdom of the four.
Octavius as the Willful King
Looking at beginning of the end of the Greecian Empire and the beginning of the Roman Empire, then, we see that Octavius, one of the Second Triumvirate, went to war with Marc Antony (also one of the three) and Cleopatra.
Reading Octavius as the willful king, Marc Antony as the king of the North (in the region of Syria), and Cleopatra as the King of the South (in Egypt), we see that most of the reading of Daniel 11 comes forth straightforward.
Octavius, also Caesar Augustus (the first ruler of the Roman Empire), regarded no other gods, but on legions of their army, they honored "forces", signs of the Zodiac.  He attacked the fortress a Phillip with many legions of Roman soldiers and conquered it, and actually displaced whole towns to honor his retiring soldiers after the war.
v40-43 depict the Battle of Actium in 2 September 31 BC, between Marc Antony and Cleopatra, both in scope and in composition of military forces.  The battle was comprised much at sea, and the large infantries were not engaged.  He also left out Edom, Moab, and Ammon, as in v41.  And, after conquering Cleopatra in Egypt, he then took hold of the wealth of Egypt.
The last two verses, then, while not directly seeming applicable to Octavius, could then look forward again, to the same throne, but a different individual king reigning on it.
If the above holds true, then the introduction of Daniel 12 falls in the beginning of the Roman Empire, and the time of great trouble prophesied in Daniel 12:1, with Michael the great Prince, would most likely be looking towards the First Century (i.e., the fall of Jerusalem in 70 AD), the same time that most Preterists readings of Matthew 24:14 would put the "Great Tribulation".  Which, of course, doesn't work at all for a futurist reading of the text.
Futurist Readings
If one took a similar logic for the "willful king" of v36 and applied it to a yet-to-come individual, however, you could reach the same result as regards the four kingdoms.  By understanding that the Kings of the North/South are referring to the Greecian Kingdom (by v4), the "willful king" who must "prosper until the indignation is finished", this is interpreted, still, as the fourth, but yet-to-come, Kingdom.  Regardless, they typify it as Rome, either as "like Rome", or a "revived Rome".
Others make contentions such as that Rome did not control the ancient city of Babylon, and therefore could not fulfill the prophecy.  However, this does not hold strictly true, as Wikipedia points out,

There was a brief interlude of Roman conquest (Roman Assyria, Roman Mesopotamia; AD 116 to 118) under Trajan, after which the Parthians reasserted control.
Wikipedia Article on 'Babylonia', accessed 11/21/2014

Certainly other views are around, and this is not exhaustive or complete in disproving alternate views.  This view is obviously coming from a largely fulfilled interpretation, but is at least an attempt to represent the noted variations.
Answer: Daniyy'el describes the image as follows (Dan. 2:32-33),

32 The head of that image is of fine gold, its breast and its arms of silver, its belly and its thighs of brass,* 33 its legs of iron, and its feet, part of iron and part of clay.
הוּא צַלְמָא רֵאשֵׁהּ דִּי־דְהַב טָב חֲדֹוהִי וּדְרָעֹוהִי דִּי כְסַף מְעֹוהִי וְיַרְכָתֵהּ דִּי נְחָשׁ שָׁקֹוהִי דִּי פַרְזֶל רַגְלֹוהִי מנהון דִּי פַרְזֶל ומנהון דִּי חֲסַף

or "copper"

Daniyy'el then tells Nevukhadnetzar (נְבֻכַדְנֶצַּר), to whom he was speaking (cp. Dan. 2:1), אנתה־הוּא רֵאשָׁה דִּי דַהֲבָא׃, that is, "You are that head of gold."
Nevukhadnetzar was the king of the Babylonian kingdom.
After the Babylonian empire came the Mede/ Persian empire (cp. Dan. 5:31). The Mede/ Persian empire is "its breast and its arms of silver."
After the Mede/ Persian empire came the Greek empire (cp. 1 Mac. 1:1). The Greek empire is "its belly and its thighs of brass."
After the Greek empire came the Roman empire (the NT was written during the reign of the Roman empire). The Roman empire is "its legs of iron."
As for the mixed feet, part iron and part clay, this is a bit more mysterious.
I'm going to go out on a limb here and say that the "clay" mixed in with the iron refers to the Arab/ Islamic empire that began after the birth of Islam and Muhammad.
Admittedly, I'm not absolutely certain about this interpretation, but I'm quite certain about the interpretation of the kingdom of Babylon, Mede/ Persia, Greece, and Rome.
If you look in Dan. 2:41 and 2:43, you'll find the word "mixed" in English. If you look at the actual Aramaic word, it's derived from the verb עֲרַב (arav). It's based on the root ע-ר-ב. While this root signifies the meaning of "to mix," it is also the same root used in the Hebrew word עֲרָבִי (aravi), meaning "Arab." This is a cognate of the Arabic word عربي (ʿarabiyy), also meaning "Arab."
I'm going to say that it's a play-on-words. Daniyy'el was prophesying long into the future when the Arab empire would feud with the Roman empire. The "clay" (Arabs) would mix with the "iron" (Romans), but they would not cleave to one another (cp. Dan. 2:43). As you know, both the Roman empire and the Arab empire still exist today, albeit not in their original form.
Final note: Again, this is a theory, not something I'm absolutely certain of. Prophecy is notoriously difficult to understand, but one thing I am certain on is the identity of the Babylonian, Mede/ Persian, Greek, and Roman empires in Daniyy'el's image. The clay is the unknown variable.
As you know, there are many commentaries on Daniyy'el's prophecies, but allow me to suggest one for examination. It's a tafsīr (commentary) from the Karaite scholar יפת בן עלי הלוי (Yafet ben Ali ha-Levi). See p. 12-14.
Comment: (+1) Think this is the correct answer but as there are hundreds of commentaries out there, mostly split over the Grecian versus Roman view on the legs/feet, a reference should be cited to strengthen the position taken here. By the way I will probably ask a seperate question about the toes and clay/iron as this is more difficult and less agreed in the Roman school.
Comment: For the cool commentary, thought I would tip you to the one that's got my attention at the moment.  http://archive.org/details/criticalcommenta00arth
Comment: @Mike: Supplied one commentary just to support my view.
Comment: Hey - thanks for the commentary link its a interesting verynold one. I will undoubtedly check it out.
Comment: The Clay Mixed in with Iron, can be interpreted as the fall of the Roman empire, with many "Transient" states popping up, in the midst of the Roman Empire.  This can be seen as the Dark Ages.  But--This is prophecy/allegorical/mystery.  I think we would need to ask a Prophet to be certain!
Comment: IRON MIXED WITH CLAY - A study of the eventual fall of Rome reveals that the practice of "slavery" was a crucial factor.  Consider that the clay refers to the fact that there were more slaves in Rome than citizens! And consider that the Legions consisted of mercenaries from outlaying districts whose main allegiance was not toward Rome.  This was detrimental when the barbarians attacked Rome.   It was during this era that the Kingdom of God became a force to be reckoned with, spiritually speaking.  Christ overcame Caesar, and has established an Eternal Kingdom!
Comment: @ Mike - For **several References** to confirm the interpretation of my previous comment, see BH SE # 66581,  written by credentialed historians and scholarly biblical commentators.  Historical fact  has confirmed Daniel's prophecy.!
Answer: Which Hermeneutic

It should be enough for any Christian that our Lord, the infallible
  Son of God, mentioned Daniel by name in His prophetic discourse
  delivered on Olivet (Matthew 24:15). When He uttered the words "Daniel
  the prophet," He at once put His unimpeachable seal on both Daniel and
  his book.(taken from here)

Arno C. Gaebelein, in his introduction to H.A. Ironside's Commentary on the Book of Daniel, decisively narrows the controversy over how to interpret the Book of Daniel. He further states,

There can be no question that at least twice more He referred to the
  book of Daniel: When He spoke of Himself and His coming again in the
  clouds of heaven as the Son of man, He confirmed Daniel's vision in
  7:13. And when He spoke of the falling stone in Matthew 21:44, He
  confirmed Daniel 2:44-45. How does the critic meet this argument? He
  tells us that our Lord knowingly or unknowingly accommodated Himself
  to the Jewish views current in His day. In other words, he denies the
  infallibility of our Lord.

Therefore we must concur with Gaebelein, that Daniel in fact was the author of the Book of Daniel, and that any "70AD" fulfillment of Christ's physical reign on earth does not correspond to the simultaneous "stone without hands" smashing the feet of the Statue of Nebuchadnezzar, therefore we must look at these events through a Futurist lens, and not a "preterist/text-critical" one that imagines Jesus's Physical Return to Earth as happened.
The Interpretation
To summarize John Walvoord's exposition on Dan. 2, he states the following:
Head of Gold=Babylon
This is clearly stated by vs 38, any other meaning is to deny the plain meaning of the text.

Daniel mentions only in the briefest way the second and the third
  kingdoms represented by the upper and lower parts of the body. Brief
  as is the reference, critics have lost no time in taking exception to
  the normal interpretation that Daniel has in view here of Medo-Persia
  and Greece, empires which he later identifies by name (5:28; 8:20-21;
  11:2). The statement that the second kingdom is "inferior" means
  inferior in quality but not necessarily in every respect(taken from here)

The 2nd kingdom therefore is the Medes/Persians, and the 3rd is Greece.
What is noted with Greece is "

another third kingdom of brass, which shall bear rule over all the
  earth.(vs39)

It is further witnessed by the 3rd Beast of Daniel (7:6),

After this I beheld, and lo another, like a leopard, which had upon
  the back of it four wings of a fowl; the beast had also four heads;
  and dominion was given to it.

In both instances, the word "שְׁלֵט"(shelet-to bear rule), from which "וְשָׁלְטָ֖ן"(ve·sha·le·tan-dominion) is taken, and in both incidents, special emphasis is made to denote rulership to an otherwise inferior metal, or lesser entity than we thought otherwise. Keil and Delitzsch refer to this point made by saying,

The universality belonging to a world-kingdom does not, however,
  require that it should rule over all the nations of the earth to its
  very end, nor that its territory should have a defined extent, but
  only that such a kingdom should unite in itself the οἰκουμένη, i.e.,
  the civilized world, the whole of the historical nations of its time.(taken from here)

It is very important that we take note of this understanding, all future understandings of the kingdoms is derived from it. The passing away and rising of another kingdom does not diminish the influence of the previous one, and indeed, the Greek kingdom was the template by which the following kingdom, Rome, was based. Walvoord makes the following case for Rome,

The first aspect of interpretation of the fourth kingdom stresses the
  strength of the iron legs and their power to break in pieces and
  subdue all that opposes. This, of course, was precisely what
  characterized ancient Rome. As Leupold states it, "The Roman legions
  were noted for their ability to crush all resistance with an iron
  heel. There is apparently little that is constructive in the program
  of this empire in spite of Roman law and Roman roads and civilization
  because the destructive work outweighed all else, for we have the
  double verb 'crush and demolish ["break in pieces and bruise"],

It is significant to note that this kingdom is divided, and that the "Feet of Iron and Clay" come from this kingdom, of which the "stone without hands" which was earlier referred to as Christ, smashes, and the entire statue comes down.
As to the mixture of the Iron and Clay kingdoms, numerous commentators have described as the Holy Roman Empire, in which the Eastern Roman Empire(Byzantine), sought unity with the 'revived'(holy) Roman Empire of the west. In Keil and Delitzsch's Dan. 2 commentary,

The mixing of iron with clay represents the attempt to bind the two
  distinct and separate materials into one combined whole as fruitless,
  and altogether in vain. The mixing of themselves with the seed of men
  (Daniel 2:43), most interpreters refer to the marriage politics of the
  princes. They who understand by the four kingdoms the monarchy of
  Alexander and his followers, think it refers to the marriages between
  the Seleucidae and the Ptolemies, of which indeed there is mention
  made in Daniel 11:6 and Daniel 11:17, but not here; while Hofm. thinks
  it relates to marriages, such as those of the German Kaiser Otto II
  and the Russian Grand-Duke Wladimir with the daughters of the Kaiser
  of Eastern Rome.(Taken from here)

Another idea, worthy of consideration is that the 'clay' represents democracy,

Another common interpretation of the meaning of the mixture of clay
  and iron is that it refers to diverse forms of government, such as
  democracy as opposed to dictatorship. H. A. Ironside, for instance,
  defines it as "speaking of an attempted union between imperialism and
  democracy."(from Walvoord)
  A. C. Gaebelein has a similar interpretation, "But what does the clay
  represent? Clay is of the earth. It stands for that which does not
  belong to the great statue at all, a foreign ingredient brought in.
  The metals represent monarchies, but the clay stands for democratic
  rule, the rule by the people.

Conclusion
These kingdoms, given in a dream to Nebuchadnezzar, and revealed by Daniel constitute the kingdoms making up the "composite" man. At this present time, the "toe kingdoms" are currently in place; awaiting the smashing by the "Rock" who is Christ,(1 Cor. 10:4)

And did all drink the same spiritual drink: for they drank of that
  spiritual Rock that followed them: and that Rock was Christ.

who will come down from Heaven in the manner in which He ascended(Acts 1:11), and usher in the Millenial Reign.

References:
Commentary on Daniel by H.A. Ironside-http://servantsplace.org/wp-content/uploads/2012/10/Commentary-on-Daniel-by-H-A-Ironside.pdf
John F. Walvoord Commentary on Daniel (Chapter 2)http://www.walvoord.com/book/export/html/243
Comment: FOUR KINGDOMS - The basis of Ironside's and Walvoord's commentaries is the recent Darby/Dispensational jewish viewpoint (1828).  That has opened the door to all sorts of speculative interpretations that are not considered orthodox or classical. For clarification , it is recommended that other commentaries be consulted, that point to a Gospel without distinction between Jew and Gentile.  And that find major fulfillments in Christ, since the "Testimony of Jesus is the spirit of prophesy" (Revelation).
Answer:
Which four kingdoms are represented in the statue of Nebuchadnezzar's dream in Daniel, Chapter 2 ?

 Nebuchadnezzar was the second king of the eleventh dynasty of the Neo-Babylonian Empire,
whose capital was Babylon. His kingdom, together with that of Ancient Egypt, were offshoots
of the former Neo-Assyrian Empire, which splintered shortly before Daniel's time, and among
whose capital cities we find Assur, Nimrod, Nineveh, and Harran, all of biblical fame (see Genesis  10:8-12). By the mid-sixth century BC, they, along with the Median Empire, were part of Cyrus'
Persian Empire, which, in its turn, was swallowed up by Alexander's short-lived Macedonian  Empire. After his untimely death, mentioned along with the wars of the Diadochi in Daniel's  eleventh chapter, the latter becomes known as the Seleucid Empire, named after one of  Alexander's generals, and then as the Parthian Empire. Simultaneously, we witness the rise
of Rome, whose help the five Maccabeean brethren, founders of the Hasmonean dynasty,
employed in their fight against Antiochus IV Epiphanes (see 1 Maccabees 8), whose sacrilegious
actions were also prophesied by Daniel (see Daniel 11 and 1 Maccabees 1).
Comment: A [related](http://hermeneutics.stackexchange.com/questions/66581) question.


How detect version of VMProtect

Question: I have a binary with VMProtect. Some tools giving info that this is 2.x, some that 3.x. How I could check it? Thanks.
Comment: Which tools are you using?
Comment: Could you show some disassembly of a vm handler? You can recognize you're in a vm handler if you step and see a push xxxx; call yyy where yyy is in one of the vmp sections.
Comment: @SYS_V I used Protection ID v6.90.
Comment: @mrexodia at birany only some function at VMProtect and code is long with big cound of jmp something like that:
cmp     [esi+ecx*2+0BAC1C45h], bl
mov     bh, 0EEh
adc     [esi], ebp
pop     esp
mov     eax, ds:5E830102h
db      26h
or      eax, 0BA322563h
xor     [edi], esp
push    eax
rcl     dword ptr [edx], 1
Answer: Unfortunately there's no easy answer here.
Most of these tools employ different types of heuristics to determine the version used. Often times just applying binary signatures which could be inaccurate. Without gaining a decent understanding of VMProtect to recognize the differences this will be quite difficult.
If tools used are open-source or well-documented, you can go over the signature used to detect the version, and validate it manually once you have a good understanding of the rational behind it.

How detect version of VMProtect


In Adobe Illustrator, I need to combine multiple compound paths and paths into a single object or shape

Question: I have a floorplan diagram which consists of over 100 different paths and compound paths.  I need to combine all of these elements into a single shape layer.
I have tried selecting all of them and using both the "Unite" and "Merge" options in the Pathfinder window.  This didn't work.  I have also tried "Make Compound Shape."  Not only does this not create a single shape layer, it also messes up the drawing by creating blocks of color where there were none before.
I have even tried a hack workaround by copying all of these paths and compound paths in Illustrator, pasting them into Photoshop, and creating a single shape layer out that, which I could then copy back into Illustrator.  The trouble is, as soon as I click "combine," Photoshop freezes and crashes.  I guess the shape just has too many points for it to handle.  It's too large a file.
What can I do to create a single shape layer?
Comment: is this related to scripting illustrator or simply using it's interface ?
Comment: Just using its interface.
Comment: StackOverflow is for questions about programming. Perhaps you could ask this question on the SuperUser stack exchange site?
Answer: A picture would help but I would try the Shape builder tool. It's very useful for complex shapes.


CSV file generation failing

Question: I'm using a plugin for a client (that i modified to some degree) that creates and maintains a database of organization members (using a new wp table to do so).
There is a nice feature that does a csv import and insert, that works great. There is also a feature to download the contents of this table as a csv, that works fine on my local system, but fails when running from the server. I'm, frankly, at a loss as to why.
The php file that contains the logic is simply linked to. The file:
<?php
    //include some files
    include('../../../wp-blog-header.php');

    //DIAG: phpinfo();

    function fputcsv4($fh, $arr) {
        $csv = "";
        while (list($key, $val) = each($arr)) {
            $val = str_replace('"', '""', $val);
            $csv .= '"'.$val.'",';
        }
        $csv = substr($csv, 0, -1);
        $csv .= "\n";
        if (!@fwrite($fh, $csv))
            return FALSE;
    }

    //get member info and column data
    $table_name = $wpdb->prefix . "member_db";
    $year = date ('Y');
    $members = $wpdb->get_results("SELECT * FROM ".$table_name, ARRAY_A);
    $columns = $wpdb->get_results("SHOW COLUMNS FROM ".$table_name, ARRAY_A);
    //DIAG: echo 'SQL: '.$sql.', RESULT: '.$result.'
';

    //output headers
    header("Content-type: application/octet-stream");
    header("Content-Disposition: attachment; filename=\"members.csv\"");

    //open output stream
    $output = fopen("php://output",'w');

    //output column headings
    $data[0] = "ID";
    $i = 1;
    foreach ($columns as $column){
        //DIAG: echo '
'; print_r($column); echo '
';
        $field_name = '';
        $words = explode("_", $column['Field']);
        foreach ($words as $word) $field_name .= $word.' ';
        if ( $column['Field'] != 'id' && $column['Field'] != 'date_updated' ) {
            $data[$i] = ucwords($field_name);
            $i++;
        }
    }
    $data[$i] = "Date Updated";
    fputcsv4($output, $data);

    //output data
    foreach ($members as $member){
        //DIAG: echo '
'; print_r($member); echo '
';
        $data[0] = $member['id'];
        $i = 1;
        foreach ($columns as $column){
            //DIAG: echo '
'; print_r($column); echo '
';
            if ( $column['Field'] != 'id' && $column['Field'] != 'date_updated' ) {
                $data[$i] = $member[$column['Field']];
                $i++;
            }
        }
        $data[$i] = $member['date_updated'];
        //echo '
'; print_r($data); echo '
';
        fputcsv4($output, $data);
    }
    fclose($output);
?>

So, we have a routine wherein a query is run, $output is established with fopen, added to via foreach statements, and finally fclosed.
The error that I'm getting (from the server) is
Error 6 (net::ERR_FILE_NOT_FOUND): The file or directory could not be found.

But it clearly is getting found, its just failing. If I enable phpinfo() (PHP Version 5.2.17) at the top of the file, I definitely get a response - notably Cannot modify header information (because phpinfo() has already generated a header). All the expected data does get printed to the page, however, so that much, at least is working correctly.
I am guessing there is something preventing the fopen, fclose functions from working properly, but I don't have enough experience with this to identify exactly what the problem is.
I'll note again that this works exactly as expected in my test environment (localhost/XAMPP, netbeans).
Any thoughts would be most appreciated.
Comment: No ideas? perhaps I should repost this at stackoverflow...
Answer: Try this:
<?php
   header("Content-type: application/csv");
   header('Content-Disposition: inline; filename="export.csv"'); // change this filename
   include ('../../../wp-load.php'); // may need to change number of "../" depending upon location
   global $wpdb;
   $rows = $wpdb->get_results ("SELECT * FROM {$wpdb->prefix}table_name"); // change the table name
   echo strtolower(implode(',', array_keys((array)$rows[0]))) . "\r\n"; // fixes an Excel bug if the first column is "ID"
   foreach($rows as $row) echo '"' . implode ('","', array_values((array)$row)) . '"' . "\r\n";
?>

This will automatically format the entire contents of the table as a CSV and stream the download straight to browser, raising a dialog prompting the user to save the file.
Comment: Hey - thanks for the reply. This question is getting a bit dusty. I did end up reposting this question on stackoverflow (http://stackoverflow.com/questions/6846405/csv-file-generation-error), where I go into greater detail about the circumstances of the error. At any rate, I will give your solution a try asap. Cheers!

CSV file generation failing