What is a namespace alias?

Question: What is a "namespace alias" in C++? How is it used?
Answer: A namespace alias is a convenient way of referring to a long namespace name by a different, shorter name.
As an example, say you wanted to use the numeric vectors from Boost's uBLAS without a using namespace directive. Stating the full namespace every time is cumbersome:
boost::numeric::ublas::vector<double> v;

Instead, you can define an alias for boost::numeric::ublas -- say we want to abbreviate this to just ublas:
namespace ublas = boost::numeric::ublas;

ublas::vector<double> v;

Comment: No offense taken... Just to explain why I did this: It was my understanding from Joel's comments in the podcast that even "entry-level" questions were fair game on SO, and that it was acceptable to ask a question and answer it yourself if that content wasn't on SO yet in an accessible form. But apparently, this is frowned upon?
Comment: I've been programming in C++ for several years, my textbook is an ocean away (literally), and I don't remember the syntax of namespace aliases. Thanks to this question, the answer was a click away. So independently of the author answering their own question, it is a good question, and a good answer. Thanks :)
Comment: To possibly explain the downvotes, SO is not and never will be a replacement forv a good C++ textbook. The question you posed will be answered by any such book. And the SO "feature" of answering your own questions should not be used to provide paraphrases of such books.
Comment: @Martin B:  I don't agree that this is an entry level question - in fact there have been far more obvious questions asked in the past now with many votes.  Having said that, people might feel you're simply trying to gain reputation for yourself.  A way round this is to mark one or both of the question/answer as "community wiki".  Personally I'd go with question as you and answer as community.  If the question has merrit then you'll get ROI.
Comment: There is certainly an etiquette to answering your own question, to avoid irritation; in this case, it is pretty obvious that it never **was** a real question. For example, http://stackoverflow.com/questions/494927/stack-overflow-etiquette-for-answering-your-own-question
Comment: I think the important question is whether the question is real" -- is it something that you have been asked? Is it something that people want to know? Is it something that hasn't already been asked and answered on SO?

If you read the SO blog post about the R community posting and answering questions here, note that they picked the top X questions which their community *actually kept asking*, so it had real-world relevance. Taking random snippets of language-specific knowledge and posting them here seems less useful.
Comment: My recollection is that Spolsky specficically encouraged this type of question & self-answer (even if the answer was known when the question was posed).  However, a quick search has left this as only a recollection.  In any case, the community has apparently decided otherwise.
Comment: The answer in Marc's link (ie. putting your answer into the question) is a good alternative too.
Comment: Thanks -- didn't intend to offend or siphon off reputation. For what it's worth, at least I learned something, and the answer is in community wiki now.
Comment: but when that is said, a significant part of the community simply sees red when they see someone answering his own question. I don't think it's such a bad thing (again, the R thing was a great idea), but *some* people think it's cheating.
Comment: A problem with this question might be that you'd only ever find it if you already knew the answer. If you don't know what a namespace alias is, you're not likely to find this question in the first place.
Comment: " SO is not and never will be a replacement forv a good C++ textbook." - why not? accessible worldwide, searchable, copyable, referenceable. These arguments are outddated.
Answer: Quite simply, the #define won't work.
namespace Mine { class MyClass { public: int i; }; }
namespace His = Mine;
namespace Yours { class Mine: public His::MyClass { void f() { i = 1; } }; }

Compiles fine.  Lets you work around namespace/class name collisions.
namespace Nope { class Oops { public: int j; }; }
#define Hmm Nope
namespace Drat { class Nope: public Hmm::Oops { void f () { j = 1; } }; }

On the last line, "Hmm:Oops" is a compile error.  The pre-processor changes it to Nope::Oops, but Nope is already a class name.
Comment: What #define? Perhaps your answer refers to a previous version of the question?
Answer: More on this topic http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stephan-T-Lavavej-Core-C-1-of-n
It is all about choosing an alias for a looong namespace name, such as:
namespace SHORT = NamespaceFirst::NameSpaceNested::Meow
Then later, you can typedef
typedef SHORT::mytype
instead of
typedef NamespaceFirst::NameSpaceNested::Meow::mytype
This syntax only works for namespaces, cannot include classes, types after the namespace NAME =
Answer: Also note that namespace aliases and using directives are resolved at compile time, not run time.  (More specifically, they're both tools used to tell the compiler where else to look when resolving names, if it can't find a particular symbol in the current scope or any of its parent scopes.)  For example, neither of these will compile:
namespace A {
    int foo;
    namespace AA {
        int bar;
    } // namespace AA
    namespace AB {
        int bar;
    } // namespace AB
} // namespace A
namespace B {
    int foo;
    namespace BA {
        int bar;
    } // namespace BA
    namespace BB {
        int bar;
    } // namespace BB
} // namespace B

bool nsChooser1, nsChooser2;
// ...

// This doesn't work.
namespace C = (nsChooser1 ? A : B);
C::foo = 3;

// Neither does this.
// (Nor would it be advisable even if it does work, as compound if-else blocks without braces are easy to inadvertently break.)
if (nsChooser1)
    if (nsChooser2)
        using namespace A::AA;
    else
        using namespace A::AB;
else
    if (nsChooser2)
        using namespace B::BA;
    else
        using namespace B::BB;

Now, a curious mind may have noticed that constexpr variables are also used at compile time, and wonder whether they can be used in conjunction with either an alias or a directive.  To my knowledge, they cannot, although I may be wrong about this.  If you need to work with identically-named variables in different namespaces, and choose between them dynamically, you would have to use references or pointers.
// Using the above namespaces...
int& foo = (nsChooser1 ? A::foo : B::foo);

int* bar;
if (nsChooser1) {
    if (nsChooser2) {
        bar = &A::AA::bar;
    } else {
        bar = &A::AB::bar;
    }
} else {
    if (nsChooser2) {
        bar = &B::BA::bar;
    } else {
        bar = &B::BB::bar;
    }
}

The usefulness of the above may be limited, but it should serve the purpose.
(My apologies for any typoes I may have missed in the above.)
Answer: Namespace is used to prevent name conflicts.
For example:
namespace foo {
    class bar {
        //define it
    };
}

namespace baz {
    class bar {
        // define it
    };
}

You now have two classes name bar, that are completely different and separate thanks to the namespacing.
The "using namespace" you show is so that you don't have to specify the namespace to use classes within that namespace. ie std::string becomes string.
my resource: https://www.quora.com/What-is-namespace-in-C++-1
Comment: However it is not recommended to use "using namespace" in your code. It can generate confusion if a file with `using namespace` will be included in different file of the application. Suddenly different file starts to use this namespace as well. Then a developer may not know from which library the function has been used. (he thought it was from std but it was some other namespace in fact)

What is a namespace alias?


Tuning MySql on Solaris?

Question: We are running MySql 5.x on Solaris 10.  Are there any good MySql options, or system options that we can use to optimize performance on an x86 Solaris 10 box with 16GB of RAM, running ZFS?  For example, with UFS, people recommended mount the filesystem with the directio option.
Answer: Diet version:
ZFS:

recordsize=16k
logbias=throughput
atime=off
compression=lz4
primarycache=metadata

InnoDB:

innodb_doublewrite=0
innodb_log_write_ahead_size=16384 (if your version has it)

There are a few other options you may want to look into. I wrote an article based on a talk I gave a while back about running
MySQL on ZFS which you may find helpful.
Answer: I'd recommend using the MySQL from Sun's Glassfish Web Stack which is Sun's tuned version of MySQL for Solaris. Web Stack used to called Cool Stack, and both are supported in this forum.
Answer: There is article about optimization of ZFS, but it's dedicated for InnoDB: MySQL Innodb ZFS Best Practices

Tuning MySql on Solaris?


ASP.NET: Rendering flash with jquery load not working

Question: I have an ASP.NET page where I have a div.I have another ASP.NET page where I have embedded a flash file (.swf) .When I executes the second page.It will come correctly.Now I want to load the out put of the second page to be rendered on the first page.I checked the load method in jQuery. But its not working when in am rendering a flash movie in the second page.When I use a simple h2 tag like This is response from my server , Its working fine.But instead when I try with a flash movie ,Its not coming. I am using jQuery flash pluggin too.
I am ready to switch to some other best method to render a flash movie , if there is some other best method to render flash.
Answer: i use swfobject for embedding SWFs which has a function swfobject.addDomLoadEvent() that provides a means to handle load event...


Is it possible to extend Booking.com Free Cancellation timeline to buy time for visa decision?

Question: I'm a first-time traveler to the Schengen area. I did a lot of research when putting my documents together and I used a Booking.com (Free Cancellation) booking to support my  visa (short-stay) application, which I submitted to the Embassy yesterday; securing Schengen visa (tourism) appointments in my city of Dublin, Ireland is very, very difficult and challenging. I was searching for months to find an appointment and yesterday was the earliest date available to book.  Unfortunately, I was told to return for passport collection at the Embassy on July 28th, which is just a couple days before my travel date (August. 1) and several days after the Booking.com Free Cancellation deadline. I'm anxious and facing a dilemma because I've learned that that particular Embassy has been denying visas a lot recently and this is my first Schengen visa application. If I don't cancel my hotel booking on July 23rd, I will be billed € 1,400 for my full stay at the hotel but I won't find out whether my visa application is approved or rejected until July 28! I can't cancel the hotel booking on the 23rd (just in case my visa will be rejected) because the Embassy might call the hotel and deny me a visa on the basis that I don't have a valid booking. I don't know what to do - I've saved up for a couple of years for this holiday and I can't afford to lose € 1,400 if my visa isn't approved. Please advise
Comment: Are you indeed told to come for the passport on Jul 28, or is just the maximum possible processing time? I'd assume that usual processing times should be shorter.
Comment: Also, I don't know about Ireland, but where I live insurance companies offer insurances against failed trip, that may include compensation of hotel cost in case of visa refusal.
Comment: Try to contact the hotel, or just do a second booking and cancel the previous one. Considering "free cancellation", you can imagine that such booking have not much weight on overall decision for the visa.
Comment: Thanks Giacomo. If I cancel that booking and then go on to make another booking at the same hotel, will this not put my visa application at risk? I don't know how Embassy staff confirm that hotel bookings are valid but isn't there a risk that they'll deny my visa if they find that the booking reference of the first booking has been canceled? Am I overthinking?
Comment: I very much doubt you can extend the free cancellation period; you might be able to *amend* the booking (keeping the existing reservation reference) to one that allows you to cancel up to/including the arrival date but I'm pretty sure there'd be a fee. What did Booking.com say when  you contacted them?
Answer: If you need a hotel reservation to get a visa best book with the hotel and make sure they agree that you can cancel till after the date you are sure you have your visa, (or do not get it,) which might well be the date you fly to the country.
Booking sites, including booking.com, mostly work with automated systems which do not allow for extended cancellation periodes.
Do read the information about hotel bookings before you apply for a visa, some countries insist on you having a reservation for the hotel you are going to stay and at times that is checked during the visa application process and/or during or after your stay, other countries do not want you to book hotels and even flights till you have the visa. At this time the Schengen countries seem to insist on having a reservation at the hotel you are going to stay.
Answer: I don't think Embassy staff call up individual hotels for each application and verify bookings. Happy to be corrected on this fact though!
As a foolproof alternative, you can make a fully flexible booking directly with the said hotel, as these are usually cancellable up to the day of arrival. So in case the Embassy does call them, your name and reservation will be genuine.
Comment: I've read reports on embassy contacting the applicant after a booking was cancelled during visa processing. Moreover, I've read reports on embassy cancelling an _already issued_ visa after tourists cancelling a booking used in the applications. So it seems that they can indeed check.
Comment: Contacting a hotel directly is a good suggestion though.
Comment: Thanks for your inputs all. I called the hotel directly and was told that since I made the reservation via Booking.com, I'd need to send the hotel an email through Booking.com which I did a few days back - received no response. I'll try to call them again (making no mention of the Booking.com reservation and ask for a fully flexible booking, cancellable up to the day of arrival as suggested by "TheYoungMunk". I might also try Traveller's suggestion even though Booking.com hasn't been of much help thus far.
Comment: I called Booking.com and was told that since this is a fully automated prepayment, the charge will go through as scheduled on July 23 if I don't cancel the reservation beforehand. The customer service agent gave me his name and told me that in the unfortunate event that my visa is denied, he'll "look into" securing me a refund retroactively. That statement didn't give me much confidence though. @Petr, I was told to come on the 28th to collect my passport and given a collection slip with that date on it. I'll look into the insurance angle as you've suggested


Bar bell shrugs difiicult

Question: I am doing barbell shrugs as dumbbells has maxed out, but i am finding doing same weights with barbell is bit difficult as compared to dumbbell as my hands are in front. Is there any science behind it?
Comment: Not strictly an answer to your question, but if you're looking to combine the heavier weights afforded by a barbell, but keep the posture you're used to with dumbbells, a good solution might be using a *hex bar* (also called a *trap bar*).
Answer: Friction between the barbell and your thighs effectively increases the bar's resistance to movement.  I assume that the dumbbells do not rub appreciably against your thighs when you shrug them.  So, you must work harder to shrug a barbell weight than to shrug dumbbells of the same nominal total weight.
Because the barbell is in front of you, its center of mass (COM) is horizontally displaced from your COM, whereas the dumbbells' COM does (very nearly) coincide horizontally with your COM.  The barbell's COM's horizontal displacement requires you to to lean backward to balance the barbell's COM and your COM on a virtual lever about your ankles and above your mid-foot.  Otherwise, you will tip forward, out of balance.  This increases the balance challenge, and increases the friction between your thights and the barbell.
Comment: couldn't have explained better COM concept is cool

Bar bell shrugs difiicult


Irritating auto brightness adjustment

Question: I have a new windows 8 that when looking at dark colors, the screen will dim.
I've turned off adaptive brightness, checked the Intel graphics and media control panel and NOTHING helped. This stupid sh*tty "feature" is getting really annoying. How do you get rid of this?
Answer: You're turned off adaptive brightness ?
So what do you have Laptop or Desktop PC ?
Maybe you have some kind of Light Sensor that changes you display brightness, and maybe is not working properly :) You sould set him off ...
Answer: This most likely sounds like you have an adaptive brightness sensor on your screen itself. I have had this exact problem with using TVs as monitors for conference room setups. I have a SHARP LCD television screen that has an 'Eco' auto-brightness adjust.
To stop this from happening you need to use your remote to enter into the menus on the TV and turn off the adaptive brightness setting.

Irritating auto brightness adjustment


How do I slow down file transfer between drives?

Question: I recently got a 2tb drive and I made the mistake of assuming the drive was working fine and moving a lot of my files onto it. I tried to move some of the files back to my original drive, but I noticed when the file transfer speed stays around 200 mb/s for too long, the drive starts making weird noises before unmounting and remounting itself and stopping the transfer. I think I got a bad drive, but if this sounds like a different issue, like power draw, let me know. When I was transferring different files, which transferred at a slower speed of around 16 mb/s, it was able to transfer them without any problems. I want to slow the transfer speed between these drives so that way I am able to recover all of my files back onto my main drive. Is there any program or windows setting that lets me do this? Everywhere I looked was either people complaining about slow transfer speeds or a guide showing how to increase your transfer speed, but I wasn't able to find anything about deliberately slowing the transfer speed. This is really important to me because if I don't find a way to slow down the speed, I won't be able to ever recover any of my larger files
Comment: I'm voting to close this question because it seems as a typical X-Y question. Slowing down the copy does not avoid disk read errors.
Answer: There is no windows setting for this. You'll have to use programs to accomplish this.
In your case, choosing Free File Sync is your best option. The free version has only 2 files asynchronous transfer, which is not too fast. Should aid well in what you want to achieve. The donation option allows you to change this, so you can set it to 1. Which would be more optimal.
Your transfer speed is so high because by default it will transfer many files at the same time.
Comment: Thank you so much for replying, I downloaded FreeFileSync and I think I figured out how to use it to copy files, but I don't see any options to limit speed. Where are they?
Comment: Nevermind, I found a workaround where I used 7zip to zip all of my files into 300 megabyte packages, and its able to transfer the full 300mb without crashing so I'm just moving each file over, waiting a few seconds, and then moving the next


What's the closest thing to a slime block in Hexxit?

Question: Is there any block that moves other blocks around it when being pushed by a piston, like a slime block in the latest version of vanilla Minecraft in Hexxit?
Answer: There are mods with the "slime block" function, the first one was Redpower with its Frames. However as RedPower was not updated, there was a lot of small mods to update some parts of it.
You should look for some Frame mod, Redstone in motion or similar, there is a lot of them around, I was not using any, so I cannot tell which suits the best.
However - You will need to alternate you modpack by adding that mod, so be sure both server and clients will have it properly installed.
Answer: Unfortunately, no. The newest version of Hexxit is for Minecraft 1.7.10, while slime blocks were added in the 1.8 prereleases. You will have to use more sticky pistons to push blocks around the way you want.
Comment: This doesn't answer the OP's question.


Install CentOS 7.8 minimal into existing encrypted LVM with EFI boot failed

Question: Install CentOS into existing encrypted LVM with EFI boot failed.
I'm about to set up a laptop with both Kali Linux + CentOS.
First I installed Kali Linux and created a LVM with LUKS encryption. I used 50% of the space for Kali partition. I also create a centos partition with the other 50%.
In the CentOs graphical installation, the partition part finds and unlocks the LVM correctly, sees the centos partition and I can choose it+pick to reformat it and use as mounting point /
But I cannot end the step because CentOS DEMANDS to write EFI boot too. I tried to point it to the existing EFI partition which is formated for EFI but installation process shows me "cant install into LVM, cant install into ext2" and such bullshit. There is no ext2 partition present.
Any idea if i can skip the EFI installation part somehow ?
Answer: CentOS likely requires a simple (none-LVM, unencrypted) /boot partition and from what you're saying you just have a EUFI system partition and the rest of your space is taken by LUKS+LVM which cannot be used for /boot.
Edit: I've just confirmed it.


Rolling on frictionless inclined plane

Question: Will a body executing pure rolling motion on a smooth frictionless inclined plane continue its pure rolling or not?
According to my knowledge the torque due to friction acts on the body which helps it to continue its motion. But now since the friction itself is removed hence it should start slipping. The gravity will keep on try to increase the velocity and there won't be any torque to increase it's angular momentum hence there will be a time when this pure rolling motion will cease.

(The body is moving down the inclined plane)
Comment: Yes, your reasoning is correct.
Answer: Imagine an incline with constant inclination. A sphere or cylinder is rolling down it due to gravity:

Imagine also that the top half of the incline provides enough friction so that the object rolls without slipping.
And the bottom half of the incline is completely friction-less.
Rolling without slipping means simply:
$$v=\omega R$$
where $v$ is velocity, $\omega$ angular velocity and $R$ radius.
By extension it also means:
$$\frac{{\text{d}v}}{{\text{d}t}}=a=\alpha R$$
where $a$ is acceleration and $\alpha=\frac{{\text{d}\omega}}{{\text{d}t}}$ the angular acceleration.
When the object enters the friction-less part of the incline there's no more torque (caused by friction) to maintain the relationship:
$$a=\alpha R$$
because without torque $\alpha$ now no longer changes while $a$ keeps increasing. So rolling with slipping can be summarised as:
$$\boxed{a(t) > \alpha R}$$
Answer: A sphere may be rotating (in any direction) as it moves across a friction-less surface, but the term rolling generally implies an instantaneous static contact between the surface and the bottom of the sphere.

Rolling on frictionless inclined plane


Sharing multiple photos in WhatsApp

Question: How to share multiple photo in WhatsApp? I'm using a Lumia 730, and when I select multiple photos then WhatsApp is not in the share list, but if I select only one image then WhatsApp is there.
Answer: You can share multiple photos in WhatsApp as follows:

Open WhatsApp
Select the person with whom you want to share photos
Tap the "attach" icon
In "Attach media", tap "Photo" and select the album where the photos are
Tap "select" at the bottom to mark the photos which you want to share

Note: You can share a maximum of 10 photos at once).
Answer: This is something that WhatsApp has to support - therefore you should contact the Whatsapp developers directly to request this feature.

Sharing multiple photos in WhatsApp


Why does certain clear plastic have an inner glow?

Question: A type of plastic used in packaging for tamper resistant seals appears to have (what I can best describe as) a purplish inner glow under sunlight, and perhaps other bright light. In the image below, the glow is present but much more blue (rather, less purple) than it appears to the naked eye (most likely due to filters on the lens and the different spectral sensitivities of eyes vs. image sensors). What is this effect? (Scintillation, something else?) Why does it happen?
Answer: Luminesce is the most probable answer. It is absorbing uv and radiating purple/blue.
Comment: More likely fluorescence.  If blue light is emitted strongly at the edge of the film, then it's almost certainly fluorescence.


view detailed permissions

Question: Recently, Google grouped its permissions making it nearly impossible to tell what an app was asking for.  Is there anyway to tell what fine grain level permissions are being requested from an app before it's installed? What about after?
Comment: Yes, they are much "simpler" now but what they've done is grouped benign permissions with some pretty dangerous permissions.  So now if you ask for a benign permission it gives the entire category, making the permissions listed meaningless since you can't distinguish from say read-only storage access and the ability to format your phone.
Comment: Well, I would say those permissions are way more simplified now once you tap install button over the app all the permission that an app requires in order to work is shown. I guess before installing the application you can hover through then individually. Looking over your question really shocked me because previously I am finding difficult to have a close look over it ! But now its way more simplified then previously it was, just try going through once more over it and you will get an idea about what I am talking about.
Comment: Well, @user1816847 I guess then I don't think we can do much about it ! I haven't users Avast to see permission so can't talk much about it !  Anyway maybe other users have something to help you out with it !
Answer: I waved Good-Bye to the Google-Play website right after their last relaunch already, as it became pretty inconvenient: slow to load, and lacking important details. Luckily, there are some good alternatives available:
For my "research", I prefer AppBrain, which is an "alternative front-end" to the playstore one could say offering a "retro design" – as if it were the Playstore-a-while-back. Not only do you find all permissions listed separately again, they also place a "red triangle" on the permission tabs if an app requests permission (combinations) possibly raising concerns. Only draw-back I recently noticed is their dropping of the app-developers website link.
If you want to check directly on your device, for one AppBrain also has their own app. But as I haven't checked that lately I don't know how it lists permissions – so I rather recommend you Galen's StripSearch app. This not only shows you permissions, it also lets you filter your search by them:

StripSearch (source: Google Play; click images for larger variants)
The app comes with some pre-set filters to use straight away. You can modify them, or even create your own (as the one in the second screenshot). The app works pretty well, I'm using it myself.
As a quasi-companion I might mention my own site, which offers app listings by real-life categories as well as an app search similar to that of Galen's app – with the difference that my site only covers about 10.000 apps (corresponding to about 1% of the amount GPlay has). But my listings also link to reviews and other related information for its apps, so it might be worth a look still :) And if you click on an app's name there, it also reveals all its requested permissions – additionally linking each permission to detailed explanations of its meaning.
Answer: You can just install Avast antivirus to see all the permissions of apps
And for the uninstalled apps you can click read more on the description

view detailed permissions


Where does Sora dissapear to in KH3?

Question: In KH3 at the end Sora disappears. I have heard he goes to "The world ends with you" but I don't know for sure. Where does he go?
Comment: I'm curious what sort of answer you're expecting.  It's the end of the game, and I'm not aware of any additional information that would help answer that.
Comment: Its funny how many views I get on here, but I don't get any on my YouTube channel haha XD
Answer: At the time of writing, we do not fully know where Sora vanishes to. The ending of Kingdom Hearts 3 was very vague on this information.
It is speculated that Sora ended up the game's version of Shibuya, as shown in the secret ending. This is only information we currently have as to Sora's whereabouts. However, it is unclear if it is Shibuya from the game The World Ends With You or the in-game world of Verum Rex since the secret ending also shows Yozora.
Kingdom Hearts 3 Re:Mind is set to release early 2020, so we have to wait and see on what will be revealed in the new story content. Until then, any answer will be speculative

Where does Sora dissapear to in KH3?


How do APM systems monitor and collect machine interactions?

Question: So I generally understand how things like New Relic instrument a .NET app -- the CLR Profiler API makes perfect sense. But what I can't figure out is how things like AppDynamics understand correlations between servers and instrument things that aren't actually .NET based.. Can anyone shed some light on how these things work internally?
Answer: Then you also have non-intrusive monitoring that helps you proactively exercise your applications via recorded scripts and monitor response time to get alerted of problems and slow downs. Many APM tools in this space (Gomez now AppDynamics, Catchpoint, SolarWinds APM, Ipswitch APM, etc.).
If you have Citrix or Microsoft-hosted environment where an image of the application is delivered to the client UI, you should look for scripting with image recognition capabilities that uses the actual client connection UI. Then the monitoring is done by comparing the screen to baseline response images created during test script development. Might want to take a look at http://www.tevron.com/load-testing-citratest-vu-load-testing-methodology.aspx
Answer: APM products instrument each language differently, they use a combination of APIs (such as profiling APIs) and also injection of code into the app using other methods. This provides all kinds of metrics and you can observe the connections (entry point and exit point) of the application so you can determine if the application is connecting somewhere else. You can also intercept and store things like SQL or HTTP calls, etc based on your protocol decoding in the code.
Now to your main question, how does AppDynamics work. Each APM tool does this differently if they do this at all. Dynatrace and AppDynamics each have different models for tracing. Each has upsides and downsides. AppDynamics injects a transaction ID into the protocol payload, this is done in an innocuous way but the downstream connection if it has an agent can take that data and correlate it back to a transaction. If there is no agent it doesn't break the app. Dynatrace sends a lot more data about it's traces to an upstream collector which stitches the transaction together in a different manner. One is distributed (high scale, but difficult to reverse engineer the protocols) and the other is easier to stitch, but requires a lot of processing and network bandwidth.
Answer: APM monitoring is using to measure the response times. We all know from firsthand experience that nothing irks end users more than unexpectedly slow response times. In fact, slowness is arguably a bigger problem than application downtime and unavailability. Research on ecommerce websites shows that slowdowns occur ten times more often than outages, and those cumulative slowdowns add up to twice the impact to an online store's bottom line. This means that ensuring that your application is up and running is important, but it's not enough. In addition to basic availability monitoring—such as testing IP protocols and network services with automated software, which can issue real-time alerts as soon as functionality breaks down or dips below established thresholds—a comprehensive approach to APM should take a number of additional factors into consideration, as explained in the previous section, in order to help improve your application's overall reliability and speed.
I known applications using Selenium to check this response times and get information when the transaction is not correct.


Why do martians look Asian?

Question: Mars is inhabited by what I assume are humans that migrated to the planet, but why do they all look Asian? Did they evolve that way over time or was the population that migrated there largely Asian?
Answer: The native Martians actually appear more Native American (Indian). It's an obvious pastiche.
Are you mistaking Leo and Inez Wong for Martians? They live on Mars (and own half of it), but they are clearly of Asian descent. Probably Chinese, since Amy occasionally speaks Cantonese.
Answer: The people from Mars that are constantly seen are Amy Wong and her family.  Her dad is extremely rich and own half of Mars.  If you remember the episode where Fry goes back to college you will notice that there are a variety of cultures on Mars.  So to answer your question it is just the population that moved there not really an evolution.

Why do martians look Asian?


Medieval town built on the desert side of a mountain range?

Question: Could a medieval town have been built on the desert facing side of a mountain range? Not a Himalaya size mountain, but definitely at least Rocky Mountain size. It's a big desert and is one of the reasons that a nearby empire stopped pushing that direction. I want the town to be somewhat of a border town/outpost, but I want its existence to be practical and not just random.
Comment: The questions you should ask yourself, because your readers will, are: why would it be built there? Where does water and food come from?
Comment: this may sound like a strange question but how does a town "face" something?
Comment: Yes of course. For example if it holds religious significance- even if it has no economic benefit and can't produce a lot of food because it's right next to a desert. The real question is how big it can get. More information is needed about the location and so on. Btw if you've got mountains and a desert, where is the empire?
Comment: [Samarkand](https://en.wikipedia.org/wiki/Samarkand)? It's ancient, it still exists, and it's situated at the foot of the Pamirs...
Comment: As well as trade and an outpost as people mentioned, there are all the normal reasons a town may be built (e.g. a mine nearby? Strategic reasons?) as for how to get water to it: aquaducts (coming from the other, wetter side of the mountain)!
Comment: [Kashgar](https://en.wikipedia.org/wiki/Kashgar), [Taraz](https://en.wikipedia.org/wiki/Taraz), [Peshawar](https://en.wikipedia.org/wiki/Peshawar), [Herat](https://en.wikipedia.org/wiki/Herat), [Isfahan](https://en.wikipedia.org/wiki/Isfahan), [Dire Dawa](https://en.wikipedia.org/wiki/Dire_Dawa), [Tinghir](https://en.wikipedia.org/wiki/Tinghir), [Lanzhou](https://en.wikipedia.org/wiki/Lanzhou), [Salt Lake City](https://en.wikipedia.org/wiki/Salt_Lake_City), [El Paso](https://en.wikipedia.org/wiki/El_Paso,_Texas), [Mendoza](https://en.wikipedia.org/wiki/Mendoza,_Argentina)...
Comment: @John In this case, "facing" is referring to the side of the mountain, not a direction the town is pointed, it can probably just be removed
Answer: Your city can be an oasis on a trade route.  Travelers going one direction are about to brave the desert after making it through the mountains.  Travelers having made it through the desert need to get through the mountains next.  Either way these travelers need someplace to rest and change up their gear for the next leg of the trip.
On the ancient Silk Road, the city of Kashgar was this place.  https://www.britannica.com/place/Kashgar

http://antiquity.ac.uk/projgall/gilad321/

Kashgar lies at the western end of the Tarim Basin, in a fertile oasis
  of loess (silt deposited by the wind) and alluvial soils watered by
  the Kaxgar (Kashgar) River and by a series of wells. The climate of
  the area is extremely arid, with variable precipitation averaging
  about 3 inches (75 mm) per year (most falling as rain during the hot
  summer months).  Kashgar's historical importance has been primarily as
  a trading centre. Situated at the foot of the Pamirs (mountains) where
  the ranges of the Tien Shan and the Kunlun Mountains join, Kashgar
  commanded historical caravan routes—notably the famed Silk Road
  westward to Europe via the Fergana Valley of present-day Uzbekistan,
  as well as routes going south to the Kashmir region and north to
  Ürümqi (Urumchi) and the Ili (Yili) River valley.

Kashgar is in the rain shadow of 2 different mountain ranges but has water, probably ground water originating in the mountains.  That fact and its site on the confluence of trade routes are the reason for its location.
Comment: food can come in large from livestock that forage in the mountains and farming the little fertile land near rivers. Put a tradable mineral deposits in the mountains and it will help sustain them.
Answer: Absolutely possible. Really do need to know how many people you want to support. A typical Medieval town can range greatly in population, but this could certainly support a few hundred people. Take a look at the answers to this question right here on stack exchange.
As long as you have the basics, food, water, and all that it's certainly possible.
Because it's right by a mountain range, water might actually flow through this area, and it's even better if you have a spring.
Just because an area is desert doesn't mean that there isn't a water supply present. They should be able to grow or trade for food.
The mountains are really the only difference between your question and the other (which is actually marked Medieval in the tags).
To answer the population question, take a look at this question, which is about how far apart Medieval cities tend to be, but my answer there covers population as well. Keep in mind that the conditions you outline would mean that it might be far from other cities/townships but the next small town could be situated in the valley through the pass. Because conditions for farming aren't as good, naturally your town is going to be further away from other places--more like the 10 mile limit in Giant Cow's answer. And there probably won't be anything out further if there's a lack of resources.
The other thing you might want is...something on the other side of the desert that people want to get to. It's a good reason for your outpost to exist. That something can be trade with another nation or something else entirely.
Desert conditions vary widely--so it doesn't have to be your classic Sahara-- or it can have a transition to different types of desert. See this link for more info.
Answer: Whyever not?   For instance places like Petra https://en.wikipedia.org/wiki/Petra which long predates the medieval era.  Or all the pioneer towns on the east side of the Sierra Nevada (North America), most of them built with tech that wasn't that much beyond medieval.
You just need to be selective in your location.  The town will need to be located on a water source, an oasis or system bringing water down from the high-elevation snowpack.  (And these can be rivers of moderate size, e.g. the Truckee, Carson, & Walker rivers on the east side of the Sierra.)  Then for any sort of major town, you need something like trade routes and/or mineral wealth to provide a reason for more than subsistence farming/herding.
Answer: Yes. With "desert facing side" you are implying the desert is in the rain shadow of the mountains and that means it rains on the mountains. Which means there is useable amount of water running down from them. Most of the water rains on the other side, but there should be ground water available and probably even small rivers running to salt lakes or flats.
So the particular area might have enough water to support irrigation and have a fairly large population. It might have a large urban population of craftsmen as well as it would probably be the ending point of any trade routes across the desert as one of the few areas of plentiful food and water on the "near side."
Comment: Carson City, Nevada is a good example of this. It's on the eastern side of the Sierra Nevada mountains next to a desert, but there's enough water flowing from the mountains (the Carson River) to enable agriculture in the surrounding area.
Comment: I think this is the most obvious and natural answer.  If you're close to the mountain that blocks the rain, you should very believably be able to have water *from* the mountain.
Answer: Desert is defined by amount of rainfall received in a given year. (<10 inches, I believe).
Water can be quite abundant in aquifers underneath deserts. Here's one example - there are plenty more.
The answer to your question is yes.
Answer: Look at the Front Range of Colorado.  Not a desert, but it gives you good parallels.
If the mountains are RIGHT THERE, you have access to the water, vegetation, habitat for animals... traveling along the mountains on the desert side is easier, you can see for a very long way... so you have feasibility and a good reason to be there... harder to defend if invaded from the mountain side, but probably not to detrimental.  Its seems practical and reasonable.
Comment: @JeopardyTempest As someone who grew up on the leeward side of one of the tallest mountain ranges on the planet (Hawaii), let me tell you, that while on the "desert" side of the mountain, we have access to plenty of fresh water that flow both above and below ground from the mountain, even though we get little rain on "our side".
Comment: (As you perhaps allude, the big cities on the Front Range are all on the generally wetter side.  Perhaps other regions are better examples to look at)
Answer: Simply being an entrepot on the frontier of an empire is economic reason enough to support a town or even a significant city.
Just because it is on the dry side of the range doesn't mean that it has no water. Unless the range is a monolithic wall, it is easily possible that a major river flows though a gap and away down the dry side.
The desert could be like Egypt with a single river flowing through it forming a single corridor of trade and communication with your town at it's head.
Answer: The desert may well be a practical obstacle for the empire, but it doesn't mean no-one crosses the desert - it just means there's no incentive for the empire to own it.  It can still be the empire end of a trade route, and as such it's a perfectly sensible place for a city to develop.
Of course you need there to be no strong incentive for the empire to cross the desert, meaning the country on the other side should be at least neutral or ideally friendly.  It's probably a good idea for both sides to have things that each other would like, so that it's not all one-way traffic.


How can i report a user for downvote me?

Question: A user downvote me because he don't understand my question, how can i report that to the administrators of stackoverflow? The reputation points are essential to vote in another questions and i don't have enough to that.
Comment: Looking at your question, I can understand the downvotes.  You failed to fully utilize available documentation.  You should not use Stack Overflow to do research you yourself should do.
Comment: What have you already tried?
Comment: I already try help center, google, search questions ....
Comment: And note that your question received 2 downvotes.  That's not the action of a single user.
Comment: @Hot Licks See you are like him, go see the question again, i ask HOW and not what types of encoding. He like you don't understand the question.
Comment: That was for the signature, i don't realize that i couldn't do that.
Comment: The available documentation would tell you how.
Answer: The hover over text of the downvote button is "This question does not show any research effort; it is unclear or not useful". Someone found that your question is unclear or not useful. It is often also used if the question show little to no research effort, as these questions have little value to StackOverflow and usually take more effort to answer than to ask. If the majority of people that vote on your question vote that way, then that is a good indication you should probably change something in your question, or in how you ask a question.
It is not a moderator's duty to police how people vote. People are free to vote any way they want. Instead of demanding that a vote is reversed, read "How do I ask a good question?" in the help center and "Stack Overflow question checklist" on meta, then fix any problem your question might have.
Comment: Except when a user verbally (with comments) gets upset because he cannot help me, and I point him to the answer to my own question... very nicely, I might add - and then he trolls my username and starts downvoting my last 5 answers, even commenting non-sensical reasonings as to why (yeah, same username!).  But before I can flag the comment, he deletes the comment - leaving the 5 downvotes in place.  There should be a way to report abusive users.
Comment: If the same user downvotes 5 questions in a day, they will get reverted by the automated task for reversal of serial voting. In fact, considering I don't see any negative reputation on your profile, that seems to be exactly what happened.
Comment: One downvote remained (you can see it in my Superuser profile), and it was the one he actually commented on. I started to flag the comment as trolling, and then he deleted his comment.  This all happened within like 5 minutes. https://superuser.com/questions/975950/custom-windows-installation-and-recovery-partition-with-sysprep/1200599#1200599
Comment: Comments are volatile, and it is also possible the comment was removed automatically because of several flags. The vote on that answer seems normal to me. It is not a particularly good answer. There is very little information in the answer itself, but just enough to not mark it for automatic deletion. The link is to a forum and not to official documentation it seems and the information might disappear in the future, leaving only the name of the tool as possible clue where to search for more information. I would have downvoted it too.
Comment: I am all for justified downvotes. :) (But don't downvote me! I'll make it more relavent).
Answer: You could flag your own question for moderator attention.
However, it's extremely unlikely that a mod would reverse a single downvote. I'm not confident that mods even have that power. People are entitled to their own thoughts and opinions. The fact that you "need" the rep is irrelevant.
Comment: @RuiOliveira - If you're going to hang around Stack Overflow you'd better develop a thicker skin pretty fast.
Comment: Moderators cannot reverse votes, flagging wouldn't really help.
Comment: Moderators cannot even see *who* downvoted.
Comment: And how i do to that user never see my questions again?
Comment: @RuiOliveira there isn't a block feature


Why is an army of White Walkers afraid of the water?

Question: At the end of the Massacre at Hardhome in the 5th season of Game of Thrones, the army of the dead stood on the shores watching as Jon Snow and the survivors very slowly rowed away. From a narrative standpoint, it's easy to see why the show needed the ice zombies to stop here, as it delivered one of the show's most impressive and terrifying moments — the raising of the dead with a hand gesture by The Night's King. But it also raises some fundamental questions about this undead army. Are they afraid of water?
Comment: See also, similar question on the scifi site: **[Can whitewalkers swim?](http://scifi.stackexchange.com/questions/94951/can-whitewalkers-swim/94959#94959)** (though I suspect it's because their insurance didn't cover water-based activities. Arranging comprehensive insurance for an army of ice zombies is a nightmare - when you put "death" under Pre-existing Conditions, most insurers won't touch you)
Answer: What makes you believe they stop out of fear?
or to put it another way; why would the White Walkers/Undead try and swim through the water? what would they possibly hope to achieve?
Any effective assault against a boat by an attack force that is in the water, swimming, is pretty implausible. The strongest swimmer would struggle to catch even a leisurely paced boat, and the army is without projectiles. There would have been no point in the White Walkers 'swimming after' the boats.
Comment: An effective assault by way of jumping off a cliff is pretty implausible too. The undead army have been shown to do implausible things for the slimmest chance of success.
Comment: who knows might white walkers fear from water......
Comment: They might be scared of seaweed, they might be scared of boats... it's all conjecture. It's an assumption to say it was fear that compelled them to cease pursuit.
Comment: Well, for the undead, I'd say jumping off a cliff was actually a great advantage. The fall didn't kill them, just like drowning wouldn't 'kill them' The difference is, jumping off a cliff lands you in the middle of an enemy camp, jumping into the sea lands you... at the bottom of the sea? There's not a huge amount you can do from there, unless enough WW ran into the sea to make a floating land mass for the rest of the army... ; )
Answer: One thing that should be mentioned: if white walkers/whigts can easily swim or even perhaps build boats in time, then what's the point of THE WALL in the first place? It is unlikely that first man & children & giants pulled such enormous physical and magical effort, without occurring to anyone that undead can swim or build boats.
More likely wall was built with advises from children. Perhaps magic that allows White Walkers life (or whatever that is called in their case) is either dispelled under lot of water, or they are to heavy to swim due to no air in lungs. In this case they would be able to walk on sea bottom if water pressure is not too much. I think at the end of battle we see some weigths touching the water, so it's surely not fatal for them, although we don't see Walker in water.
I support the fact that swimming against the ships will be no use even if 100k of weights attacked together. Furthermore, why would Walkers be hasty to catch them while running? Living can't hide anyway, it's just a matter of time for the dead. Plus any survivor seeing such scene of tens of thousands simply rising with light blue eyes is surely more devastating for the living south of the wall when they hear about what happened, than catching few more survivors. Walkers are not mindless zombies, quite opposite as we know, and won't perfomr rushing or foolish attack because of hate or bloodlust. We see Night King actually savoring the moment of showing horror and supremacy, and since he is self-conscious and intelligent, that might not be just his ego at work but also attempt at psychological warfare. Like "You think you killed a Walker with Valyrian steel so you have something on me? Look what I have".
So not pursuing ships and boats might have multiple reasons. They surely don't fear the water, even if it is harmful they simple know to avoid it. But this question was on my mind more than once. Why would it be mandatory for walkers to break the wall? It is harder for them to attack south of the Wall by swimming and then landing on shore, but there is too many of them, they can attack by night, simply makes no sense that Wall would be built if they can swim or mind-control the weights into boat building. That would be a huge hole for Martin. Hmmmm..... unless undead need allies too >:D That would be a schock :D
Answer: There is not clear indication that they are afraid of water. However, it may be possible as we know very less about that.
It seems to me that they simply because White Walker and their army of Wight had no chance of swimming and reaching the boats. Lets assume they swim and reach near boat, then also as soon  as they try to ride on boat, Jon snow and wildlings will kill them. Simply see the possibility of them trying to climb on boat ,swimming at same time while wildlings already on boat hitting them with swords and axes.
One more thing to consider, white walkers are very less in count (2-3) , they mostly rely on Wights for this task. Who may or may not know how to swim.
On similar note, we see the gaint swimming in water, it means its having depth like sea or something, there is lot chance that Wight will get drowned in water.
Comment: echo...echo....echo.... ;)


Download every nth node overpass turbo

Question: I would like to download OSM Data of admin borders and highways for a very large area. This would produce a very large file and is way too much for the osm overpass (I used overpass turbo but am happy to use another program (such as QuickOSM in QGIS) if that is the solution). I therefore wanted to only query for every n-th (example: 1000th) node of an object. How to I specify this in my query? I tried n%1000, which gave me an error.
Comment: Do you absolutely need to use Overpass Turbo?  If you just want "simplified boundaries" then some other combination of tools may work better to get that data from OSM, or even the (non-OSM) Natural Earth data,
Answer: Unfortunately, this is currently not supported by Overpass API. You can try to create a feature request on https://github.com/drolbr/Overpass-API

Download every nth node overpass turbo


How can LibreOffice forbid me to paste from clipboard?

Question: I have a rather interesting problem.
I've been having an issue with LO for some time now, sometimes
it does not allow me to save documents, giving me a warning saying
"Cannot Save File: locked by 'unnknown user'" or someting similar.
Now when I want to save the text in the document and paste it into a
new file to workaround the issue [this has worked two or three times]
I cannot paste to the new .odt file I created. I also cannot paste
into any other application, be it gedit or a browser using Google Docs.
I am sort of lost here, as I really need the text from my clipboard.
What can I do?
Answer: Try this.
With the document closed, look in the folder which contains it. If there is a lock file associated with the document, delete it.
Also, there may be one in  ~/.config or ~/.libreoffice/X
Replace the X with your libreoffice version.  Make sure that you're able to view hidden files, to be able to find the one you're looking for.


Merge multiple raster from subsequent folders

Question: I have 100 folders and in each folder, I have 50 dem tiffs. I want to merge the tiff from each folder and save it inside the master folder. I tried using Raster as an input in graphical modeler but it doesn't pick all files.
Comment: Test from Processing Tools, GDAL Merge algorithm, this allows you to select folders
Comment: Nope! It does not allow. Tried.
Answer: I assume you want to mosaic the different raster "tiles" into a main thing. You can do this easily with gdal on the shell:
<code>for fich in `ls my_folder/*.tif`
do
    cat ${fich} >> file_of_files.txt
done

gdalbuildvrt -input_file_list file_of_files.txt mosaic.vrt
gdal_translate -of GTiff mosaic.vrt, mosaic.tif
</code>
You can also do something similar using the GDAL Python bindings. In fact the last line just converts the virtual mosaic into a GeoTIFF, but QGIS will read the VRT file reasonably well (it has issues if you change paths, so probably safer to convert to GeoTIFF).
Comment: I want to merge raster from each folder and want to save the merged master inside the same folder, So if I have 100 folders consisting of tiff images, want to save 100 merged tiff inside each folder. Can this be done in Graphical modeler QGIS?


"To God Be The Glory"

Question: "To God Be The Glory" is a common phrase I see in many places, but when I type it on Word, it suggests it to be "To God Is The Glory". Is "be" in the phrase grammatically incorrect?
Comment: I think most native speakers would agree that all grammar checkers are not perfect. (I don't personally use Word.) You phrase also seems to have been appeared since 1872 in a [lyric](http://en.wikipedia.org/wiki/To_God_Be_the_Glory), so I believe that this is perhaps not a typical usage in modern English.
Answer: In this context, I think be is the preferable word over is.
The phrase means, essentially, "May all the glory be ascribed to God."
One could use is and still be grammatically correct – as in, "All the glory is ascribed to God" – however, humankind seems to have trouble doing that on a consistent basis. That's why we usually say the former (which expresses a hope for a desired state) rather than the latter (which expresses a seldom-observed statement of fact).
Comment: `May there be peace.` We use similar construction in a prayer and such use is often referred to as the **subjunctive mood**.
Comment: This reminds me of the phrase "God Save the Queen". You answer help me to understand the phrase as *(May) God Save the Queen*.
Comment: And to me this reminds of one of the greatest poems in English, "Pied Beauty" by Gerard Manley Hopkins. `Glory be to God for dappled things..`

“To God Be The Glory”


Reveillark death trigger

Question: If I control a Reveillark and a few other creatures of power 2 or less and my opponent uses Wrath of God, can I get back creatures that are dying to the wrath or do they have to have been in the graveyard before the wrath was cast? I'm unsure how the stack should work here
Answer: It's not necessarily the stack that you need to figure out, it's triggered abilities and abilities resolving.
Here's what happens.

Opponent casts Wrath.
Wrath resolves, placing your creatures in the graveyard.
Reveillark's ability triggers. Since it and the other creatures are already in the graveyard, they are legal targets (well, not the Reveillark itself)
Reveillark's ability resolves, returning the other two creatures.

Reveillark death trigger


Need help with a transform

Question: I want to create the following transform by transforming the BLACK layer of the attached gif. I know how to transform the white part (that's how I created the gif). Is this possible? In my production version, the white part is actually an image of the moon which I want to progressively hide, simulating the phases of the moon. The reason I can't transform the white part is that it distorts the image of the moon. The other 3/4ths of the cycle I have figured out, but this one has me stumped.
Comment: Long black layer with half circle right side... moved to the right.
Comment: @Scott what shape would the "long black layer" be to always intersect the white half circle at the top and bottom?
Comment: If I made 2 long black layers - both approximately double the width of the half circle - one of the black layers has a transparent half circle cut out of it and overlays the white. The second (a rectangle) sits to the left of the 1st black layer. Then, transforming the first to the right while moving the 2nd to the right took care of it. Not sure if that is what you meant (or makes sense), but it gave me an idea anyway.
Comment: The transform of the black is exactly the same as for the wite. But this leads to other problems.
Comment: I might be missing something here, but just want to make sure you think about the possibility of simply working "inverted". Create a black fill with a white circle on top which you transform. Then multiply the whole thing on top of the moon which will then be visible in the white parts.
Answer: My solution
Based on inspiration from @Scott.
Made a layer the same size as the circle.
Filled it with black.
Moved it 1/2 way to the left (1/2 off screen, 1/2 overlap half circle)
Cut out the half circle from the black layer
Made 2nd layer, filled it with black and moved it fully off screen to the left.
Transformed first black layer using left most middle handle all the way to the right.
Moved second black layer to the right simultaneously (needed because the first layer eventually revealed the white circle underneath it since it shrunk toward 0 width.
UPDATE The following gif incorporates the solution above. It is not accurate for the reasons @user287001 points out, but it is sufficient for showing to my class of Sixth Graders.
Figuring out how to transform the rotating moon (while keeping the white part always facing right - toward the sun) was another problem I couldn't solve. I could rotate it perfectly around the center point with the white part always facing in. What is posted has a 3d moon that is manually transformed about 70 time to the approximate position - that is why it is slightly jumpy.
Answer: To get it right geometrically and in time, too, you can work with Illustrators or Photoshop's 3D. The next example is in Illustrator, A half-circle is revolved to sphere with 3D revolution effect and a half-black rectangle is mapped onto it. The other half is cyan to make it visible against my white artboard without shading:

In the next image the mapped "art" is scaled to fit. The viewing angles can be changed to fit with all possible views.

Your example view with apparent poles on the top and bottom needs only one angle to be other than zero. You can change it say 12 degree steps from 0 to 360 to get one full cycle as 30 snapshots. You can copy and paste every version to a different Photoshop layer.
Reopen the view setting dialog by clicking "3D Revolve" in the Appearance panel
I said "right in time, too". If you make the frames with uniform rotation angle steps the apparent velocity of the light-dark edge changes right. It's fastest at half-moon and slowest at full and new moons.
Scientifically this is only a coarse approximation because it doesn't take into the account the full complexity of moon's orbit, not even the orbital motion of the earth. But it's more realistic than any linear movement or scaling with a constant speed.
I'm sure people who use advanced video editors would make this directly as video in their program with the same 3D effect + by defining the rotation. It's out of the scope of this answer.
ADD: This was not asked, but Illustrator can also produce exact orbital motion diagram. Object > Transform > Rotate makes exact and easily repeatable (=Ctrl+D) rotations.

The magenta circle is only for the convenience. It's actually colorless and strokeless, it only is there to make the shape symmetric for consistent rotation without a need to set the center.
The original black shape is duplicated (=Alt+Drag) and placed on each rotated version. It snaps exactly in Illustrator if there's Smart Guides ON.
Comment: I have read through your post and it seems that it offers the correct solution. However, I am not versed in Illustrator and I have not even come close to mastering Photoshop 3D. My solution is indeed inaccurate - especially in the lack of constant speed as you point out. This animation is for 6th Graders, so perfection, fortunately, is not required as it would be for a college level presentation. Thanks for laying this out.
Comment: @mseifert Just saw your completed animation. Seemingly you are one of those who put things to happen when the direction is clear.  Congratulations. You can well accept your own answer.
Comment: Your post hopefully will inspire me to take on learning Illustrator once I have any spare time. Thank you again.
Answer: Using a simple black circle, moved to be off the canvas to start. Simply add key markers for Position at the start and end....

Or.. if you need the opposing, half-circle, sort of mask, create a long shape and a half-circle cut out of the right side, then animate it the same way... (Note the above image is actually more correct as to how the moon phases would appear/hide, but I included this to match your question.)

You could feasibly do either of these with a mask on the Moon layer and then animate the mask. You would simply need a background layer in that case.
And, of course, if you want to merely animate the moon moving right, all you need to do is animate that layer and add an appropriate static background layer which gets "uncovered" as the moon moves...
Comment: It looks like all the comments that were posted have been removed. It appears you go some flak for this post. Unfortunately the 3 effects you've posted didn't address my challenge. I did however gain inspiration from you comment and I appreciate all the time you put into coming up with alternatives.
Answer: Although this is already answered by the user. Let's follow logic.

The moon does not change in shape.
The one thing that changes is the illuminated part.

The answer, use a mask.
Use the animation you already did as a mask over the full illuminated moon over the dark moon.
Comment: This was exactly what I attempted to do, but have not been able how to figure out how to apply a moving mask created from transformed smart objects. Is there a link anywhere you could share that gives a tutorial? I spent well over an hour trying to find one.

Need help with a transform


How long could a modern oil tanker last without maintenance?

Question: After the apocalypse, In Baja California, off the coast of Tijuana, there is the wreckage of the oil tanker, Exxon-Cazador, which was run aground and abandoned by its crew while the first bombs started hitting their targets. It's cargo, oil, was already delivered, so no oil spill. The local tribal communities in San Diego and Tijuana see it as sort of a quasi-religious figure. They think it was a sea monster that burned up the world during the apocalypse, and when they fish, they give the second largest to the "Sea Beast" and pray to it for good weather. Sometimes, the tribes take scavenged transistors and radio parts and die from ingesting them. Anyway, the Sea Beast remains unmaintained, so how long could the Sea Beast actually remain before being unrecognizable or at the bottom of the sea?
Comment: Your question fails to take into account that when the tanker runs aground, it will spill it's **massive** cargo of crude oil into the sea and shore.  It'll destroy sea and shore life for **many** miles and for **many** decades.  Possibly centuries. https://www.scientificamerican.com/article/environmental-effects-of/
Comment: @RonJohn: It's cargo of crude oil had already been delivered
Comment: "It's empty" should be added to the question.
Comment: The cargo might be shipped, but such a ship is not a paddle boat. Will have tons of fuel for propulsion which is as pollutant as the cargo.
Comment: @L.Dutch: They fuel didn't leak out. Suspension of disbelief
Answer: I think it would be fair to say that your local tribe might get a good decade or so out of their mighty god of steel and oil. After that, the ship will surely begin to collapse, and they may not see that as such a mighty god after all. Certainly by the second generation, kids will be laughing at their grandfathers for worshipping a lump of rust!
Let's take a look at the wreck of the SS America, which is probably the most well documented wreck online. She ran aground in 1994 in relatively good condition, being towed for restoration.

By 2004, only the prow and bridge were left, and they were in poor shape:

By 2011, she had almost completely deteriorated:

As of earlier this year, there is not much left of her:
Comment: keep in mind this is largely affected by where it is, and how far inland. If it is beached during a storm surge and is above the tide line and not getting pounded by waves it could last a very long time. Aral sea wrecks are more than 50 years old and still largely intact, in protected waters like bays ships 50 years old are still recongizable.
Comment: That is a good point: above the tide line will mean it could last a century or more.
Comment: I wonder if the rising sea level is breaking down wrecks today faster than is probably normal?
Comment: Wow, that blue paint really held up.
Answer: You have said it was intentionally run aground - so the concept of disappearing to the bottom of the sea is a bit nonrelevant to your question I think.  This leaves primarily weather as any destructive force.  The only other mechanism for damage would come from some form of creature, with the most likely being human.
Because the weather in that area very rarely is extreme, this is likely to last for a very long time. Potentially decades.  It is very conceivable this would become a quasi religious location.
The weather is only very rarely extreme, because of a cold ocean current that flows in that region.  This means that any Hurricanes/ cyclones that head in for landfall there, lose a great deal of energy right before landfall.
Some information about the climate of San Diego
At some point you are likely to have an oil spill coming from it - once that begins, it will be devastating to any fishing based economy in the entire region. Possibly for centuries from that point on.
Some information about the Exxon Valdez Oil SPill and it's effects
The greatest risk to the integrity of the fuels tanks will come from human damage.  Even a quasi Religious site can have people being people, trying to take artifacts for example...  Or possibly a heretic of some kind, or another group who recognise it for what it is and attempt to remove the oil for their own use.
Comment: I think you underestimate the effect of salt water on steel. Without constant upkeep of the paint, it gets rusted pretty fast.
Comment: @kiltannen You raise a good point about the spill, the ship ran aground if it was in near perfect condition, and moreover ran aground on sand or silt rather than rocks (therefore limited damage to the underside) would probably last a couple of decades, if the "tribe" were too young to remember the before, then it may give rise to myths, which could turn into a small religion, then after 1 or 2 decades an oil spill devastation the fishing, could easily lead to people thinking it was angry with them, leading to a religion even long after the wreck is rusted down below the surface
Comment: Having seen some of the other answers, and looked a bit at their information I think you may be right.  Although it is likely to be around for some time - once it breaks up it will go pretty fast.  Either way - the oil spill is going to be significant...
Answer: If you look at existing wrecks, salt and rust will eat them away
The MV Sygna ran aground in 1974 and is virtually gone 45 years later
See MV Sygna
Answer: The examples in other answers of modern steel ships deteriorating within a decade or so are not encouraging for your plot.  And it is because "They don't make them like they (occasionally) used to".
The SS Great Britain, launched in 1843, was one of the most historic ships ever built.  It's great size - the largest known ship at that time, metal hull, and screw propeller made it the model and template for modern ships.
Great Britain ran aground on Drundrum Bay, North Ireland in 1846, but was re floated after a year.  She carried passengers to and from Australia from 1852 to 1881, and then was converted into a sailing coal carrier.  Damage in 1886 caused her to be sold as a floating coal bunker in the Falklands Islands.  In 1937, after 51 years of low maintenance, she was towed to Sparrow Cove, scuttled so she would never float agin, and abandoned.  Some of her metal was salvaged to repair battle damage to HMS Exeter in WWII.
In 1970, after being partially submerged in Sparrow Cove for 33 years, Great Britain was re floated and taken back to Great Britain and restored as a museum ship.
Yes, they don't build ships like they sometimes used to.  For economic reasons modern ships aren't built as sturdy as some old time ships were.
The S.S. Atlantus was one of twelve concrete ships built in the World War One period, launched in 1918.  In 1926 it ran around at Sunset Beach, Cape May Point, New Jersey.
It slowly crumbled over many decades until today only small parts are above the water at high tide.
https://en.wikipedia.org/wiki/SS_Atlantus1
http://www.concreteships.org/ships/ww1/atlantus/death.html2
Because the Atlantus was built out of five inch thick concrete it withstood the weather, salt water, and waves for decades longer than most steel ships would, but was also so heavy and slow it was impractical as a ship.  Thus it would be unlikely for a ship, especially a giant oil tanker, built like the Atlantus to be available in some near future apocalypse.
A second fleet of 24 concrete ships were built during World War II; with improved concrete technology they were lighter and stronger than the earlier ones.
With maintenance, concrete ships can last for much longer than the Atlantus  did.  Nine of the WWII ships and one of the WWI ships are still afloat, though hulks, serving as breakwaters at Powell River, British Columbia.  But an abandoned ship wouldn't get any maintenance after World War Three.
So for your story to work you should have a fictional development of super strong super sturdy ships that are designed to last for centuries or millennia even without maintenance, and have them economical to build and use.
Or possibly you might have a tsunami lift the ship and deposit it on the shore and then recede, leaving the ship high and dry.  That is not good for a ship but at least most modern ships are flat bottomed and it will be safe from salt water and from waves, at least for decades, centuries, or millennia until the next  tsunami strikes.  Many boats and ships have been left inland by tsunamis,  but I don't know if any tsunami has ever been strong enough to carry and deposit a large oil tanker onto dry land.
If you search for images of "stranded boats in Aral Sea" you can see that some of them seem to still be in good condition after a few decades of being high and dry.
https://www.google.com/search?q=stranded+boats+in+aral+sea&newwindow=1&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjSg_fJsv7aAhULvVkKHemyBhsQ_AUICigB&biw=1920&bih=9493
You could have a ship built out of bronze, aluminum, or some other metal  that might not rust or corrode as fast as Iron or steel.  Bronze and aluminum and other metals are in some ways equal to, and in other ways superior to, iron and steel.  Of course they are also inferior to steel in some ways, including price.
Maybe the ship could be built with framework and plates that have steel in the inner layer and other, rust resistant, metals as the outer layer. Of course some metal combinations will actually corrode each other where they touch so the metals used would have to be carefully selected to avoid that.
And of course a large ship could be built of some new synthetic material that has various good properties including being resistant to damage for a long time.


Pandas DataFrames: how to wrap text with no whitespace

Question: I'm viewing a Pandas DataFrame in a Jupyter Notebook, and my DataFrame contains URL request strings that can be hundreds of characters long without any whitespace separating characters.
Pandas seems to only wrap text in a cell when there's whitespace, as shown on the attached picture:

If there isn't whitespace, the string is displayed in a single line, and if there isn't enough space my options are either to see a '...' or I have to set display.max_colwidth to a huge number and now I have a hard-to-read table with a lot of scrolling.
Is there a way to force Pandas to wrap text, say, every 100 characters, regardless of whether there is whitespace?
Comment: Take a look at http://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.str.wrap.html , specifically the parameter `break_long_words`.
Answer: You can set
import pandas as pd
pd.set_option('display.max_colwidth', 0)

and then each column will be just as big as it needs to be in order to fully display it's content. It will not wrap the text content of the cells though (unless they contain spaces).
Comment: What does this have to do with the question??? Where's your **wrapping**?
Comment: Just thought I'd add the equivalent context-specific way: `with pd.option_context('display.max_colwidth', 0):`
Comment: @matanster +1 !
Comment: Wow! +1 - I am amazed.
Comment: @paulo.filip3 is there a similar way to instead ensure wrapped text display? Not changing the data itself in any way like adding \n.
Answer: You can use str.wrap method:
df['user_agent'] = df['user_agent'].str.wrap(100) #to set max line width of 100

Answer: Try wrapping the text first, then execute the function below. The top-voted answer does not effectively wrap text.
By using pd.set_option('display.max_colwidth', 0), it ineffectively wraps text like this:

But, by using the following code, it will effectively wrap the text to any columns width:
from IPython.display import display, HTML

def wrap_df_text(df):
    return display(HTML(df.to_html().replace("\\n","
")))

df['user_agent'] = df['user_agent'].str.wrap(30)
wrap_df_text(df)
display(df)

Answer: For DataFrame visualization in Jupyter Notebook I would recommend to use the Styler class. It leverages CSS styling language which allows a lot of flexibility out of the box.
As you need to apply a style to all rows, you may use Styler.set_properties method, which returns the same properties for all cells.
Here is an example with CSS styles I've taken from Mozilla web docs for text wrapping.
import pandas as pd

df = pd.DataFrame(
    [['Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0; '
      'GomezAgent 3.0) like Gecko']],
    columns=['user_agent']
)

df.style.set_properties(
    **{
        'inline-size': '10px',
        'overflow-wrap': 'break-word',
    },
    subset='user_agent'
)

You can find more examples how to control pandas DataFrame styling here https://pandas.pydata.org/docs/user_guide/style.html.
Answer: You can create a new column with the first 100 characters of the data
data['new_column'] = [i[:100] for i in data['old_column']]

Answer: If you don't mind solving this before you put the whole thing into a dataframe, you can do it like described here. In your particular case, if you'd like each line to be 10 characters long,  you would have:
# Input
line = 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0; GomezAgent 3.0)
like Gecko'
n = 10

# Split
line = [line[i:i+n] for i in range(0, len(line), n)]

# The rest is easy
df = pd.DataFrame(line)
print(df)

Without the white spaces, you'll get:

And by the way, the white space at the beginning of the last row occurs because there are not 10 characters to fill the row like there is in the preceding rows. In jupyter you could remedy this by using df.style.set_properties(**{'text-align': 'left'}):
Answer: If you're only in this for ad-hoc, temporary display purposes in Jupyter, you can simply insert whitespace every 100 characters:
chunk_size = 100

data['new_column'] = [' '.join([val[0+i:chunk_size+i] for i in range(0, len(string), chunk_size)] for val in data['old_column']

Though it looks like the reason this is a problem in the first place is because multiple features are collapsed into a single column. It's hard to say without seeing your larger dataset, but if they all follow they same pattern, I'd strongly suggest splitting this out into multiple features (browser, browser version, OS, OS version, etc), which will make any additional work with this dataset easier.
Comment: 1) The whole `data['new_column']  = ` line produces syntax error
2) 'string' is undefined!
Do you check your code before publishing it ???
This answer merits 100 downvotes, but I don't like downvoting.
Comment: + to @Apostolos comment


I Need Help In Issue In My Theme Configuration: Magento 2

Question:
I think there is must be in-store and storeview the name of my store and store view ?? it was working but now when I go to edit anything in this design configuration it does not apply on my website .. I have tried the indexing and cache flush ??
Comment: Yes it worked thanks so much
Comment: Do you have enabled the Single Store Mode from the configuration?
Comment: Yes it is enabled
Comment: That's why only one configuration is showing in this area.
Answer: You have to create a store and their respective store view then set the theme. It will work.
Comment: I already have a store and its default storeview the theme is working but if i change anything in the header footer or any option in the configuration it will not apply on the frontend
Comment: Please try to run this command  php bin/magento s:s:d
Answer: Currently, the single store mode is enabled, that's why only Global theme configuration is displayed in the design configuration.
You can disable the Single Store Mode from the Magento Admin by following below path:

Stores - Configuration - General - Select Single Store Mode to No

After disabling this setting, Store and website level configuration will be displayed.
Hope it helps!!!


Why did Emily spare the life of the white haired man in the season 1 finale?

Question: I can understand why she was unable to kill him due to her conscience, but surely sparing him is an instant death sentence. I couldn't see a plausible reason why he didn't immediately have her killed, considering she knows -everything-.
Comment: I have a hard time remembering this in all detail, but the whole point of this show and *Emily*'s character development was that she got increasing doubts about the "righteousness" of her quest and the person it makes out of her. Sparing the man she wanted to kill all the time is just a culmination of this development. But I'd have so actually see it again before making any more detailed assesments about the direct consequences her mercy might have had at this point.
Answer: This is because the show wants to depict that Emily is no less than the white haired man; a.k.a. Gordon murphy; as she almost wins her fight with him (and is about to kill him) but she decides to honor her father's memory by sparing him (setting him free). Please refer to the flashback scenes shown in which Emily (when she was a little girl) sets a bird free from the cage when she is with her father.


Find the derived set of $\{\frac{1}{n} + \frac{1}{m}: m,n \in \mathbb{N}\}$ and prove it is such.

Question: It is easy to see the derived set is $A' = \{\frac{1}{n}: n \in \mathbb{N}\}\bigcup\{0\}$. To prove these are the only elements of the derived set we need to show that the shape of the derived set can only be $\frac{1}{n}$ or $0$. We can see the derived set is bounded above by $1$ and below by $0$. So we look for points between $0$ and $\frac{1}{N}$ where $N$ is the largest number and $\frac{1}{n}$ and $\frac{1}{n+1}$. I know I need to show that only a finite number of points exist between these points but I am having trouble doing so.
Answer: It is I think clear that are no negative limit points. Let $b$ be a positive real other than $0$ or a fraction $\frac{1}{n}$. We will show that $b$ cannot be a limit point of $A$. Note that either (i) $b\gt 1$, or (ii) there exists a positive integer $q$ such that $\frac{1}{q+1}\lt b\lt \frac{1}{q}$.
We deal with Case (ii) because it feels marginally harder. Let $\epsilon$ be the smaller of $\frac{1}{q}-b$ and $b-\frac{1}{q+1}$. We claim there are only finitely many numbers of the form $\frac{1}{m}+\frac{1}{n}$ at distance less than $\epsilon/2$ from $b$.
To get within $\epsilon/2$ of $b$, we must use two integers $m$ and $n$ each $\ge q+1$. Let $m$ be the smaller of the two integers. Then $m$ must be $\lt 2(q+1)$. So there are only finitely many possibilities for $m$.
For any such $m$, there are only finitely many $n$ such that $\frac{1}{m}+\frac{1}{n}\gt \frac{1}{q+1}+\epsilon/2$, so only finitely many within $\epsilon/2$ of $b$.
This completes the argument for Case (ii). For Case (i) we do the same thing, except instead of $q+1$ we use $1$.
Comment: Suppose that the smaller of $m$ and $n$ is $\ge 2(q+1)$. Then the sum $\frac{1}{m}+\frac{1}{n}$ is $\le \frac{1}{2(q+1)}+\frac{1}{2(q+1)}$, that is, the sum is $\le \frac{1}{q+1}$. But the distance of $\frac{1}{q+1}$ from $b$ is, by definition of $\epsilon$, greater than or equal to $\epsilon$.  Much more informally, if **both** $m$ and $n$ are very very large, then the sum of their reciprocals is smaller than $\frac{1}{q+1}$, and therefore nowhere near $b$. The $\frac{1}{2(q+1)}$ makes explicit what very very large means.
Comment: Very clear explanation, this got me over the last hump!
Comment: Actually, I don't understand it! I get lost during the third paragraph. I see each of $m,n \geq q + 1$. But they could be very very large. Why then must the smaller be less than $2(q+1)$ while these increase without bound?
Comment: But I thought we wanted to find exactly that, a sum $\leq \frac{1}{1+q}$?
Comment: No, recall that $b$ is between $\frac{1}{q+1}$ and $\frac{1}{q}$, say between $\frac{1}{43}$ and $\frac{1}{42}$. We want to show there are only finitely many sums of reciprocals that are "close" to $b$. We can't use numbers both $\ge \frac{1}{86}$, for then the sum of their reciprocals is $\e \frac{1}{43}$, which is not near enough to $b$. So one of $m$ and $n$ must be between $\frac{1}{86}$ and $\frac{1}{43}$. For any choice of these, there are only finitely many $\frac{1}{n}$ that have a chance of getting us close enough to $b$.
Comment: Wait.. That makes sense. I see it I think.
Comment: I had a mistake, it should be $\epsilon/2$.


Picture editor- sound designer relationship/ workflow

Question: I am a film editing student and I have never worked with a specialist sound designer before. I want to know about the relationship between a picture editor and a sound designer. In other words, I would like to know what is the workflow of picture and audio post production like.
Answer: You can discuss scenes where sound can be more descriptive than picture, for example. I highly recommend to read this book, at least the first chapters.
http://www.amazon.co.uk/Sound-Design-Expressive-Effects-Cinema/dp/0941188264
Answer: There is great info in Dialogue Editing for Motion Pictures


How to remove leading "0." in a numeric R variable

Question: How can one concisely change a numeric R variable (keeping it numeric) so that, e.g.,
"-0.34" becomes simply "-.34"?
Answer: Only when you output a numeric value do you have to choose a concrete representation (i.e., how the number should be formatted).  You cannot change a numeric variable from "-0.34" to "-.34"; both are representations for the same number.
However, when you output an expression e, you can choose how it should be formatted.  I don't know of any build-in way to leave off the leading "0", but you could always just remove it manually:
> sub("^(-?)0.", "\\1.", sprintf("%.2f", -0.34))
[1] "-.34"

You can define a function for convenience, e.g.,
numformat <- function(val) { sub("^(-?)0.", "\\1.", sprintf("%.2f", val)) }

Answer: In addition to the existing answers, I wanted to mention that the package weights has a function rd() which can be used to "round numbers to text with no leading zero". Of course, the result is not numeric but character.
library("weights")
rd(-0.341, digits=2)
[1] "-.34"

Answer: I needed to show numbers to 3 decimal places.
If you want to print to an arbitrary number of decimal places and you don't want to have to add another package (i.e., the weights package above), then this function (adapted from @stefan's answer) seems to work:
numformat <- function(x, digits = 2) {
    ncode <- paste0("%.", digits, "f")
    sub("^(-?)0.", "\\1.", sprintf(ncode, x))
}

So for example:
> numformat(-.232, 2)
[1] "-.23"
> numformat(-.232, 3)
[1] "-.232"
> numformat(-.232, 4)
[1] "-.2320"

Answer: If it's for reporting in R Markdown I use the package MOTE with the function apa() and code: apa(-0.34, 2, FALSE) this will return -.34 in my documents.
Answer: In addition to @stefan's nice answer, I stumbled upon the following code which accomplishes the same thing but prints out more decimal places:
f = function(X1)gsub("0\\.","\\.", X1)

Comment: You need to be careful about just replacing "0." with ".", as this will turn "10.12" into "1.12", which is presumably not intended.  I solved this by using the regular expression `"^(-?)0."`.  This only matches if the zero is the first character (except possibly a `-`).
Comment: Thanks for the tip, Stefan.  @Manoel Galdino - for me the variable remains numeric after using Stefan's function.


See Which User Created/Edited Block?

Question: Is there any way in Drupal 7 to view which user last made edits to a particular block, or who created the block?
Answer: STEPS:
1. Start creating a new view by clicking "Add new view" link under Admin > Structure > Views.
2.
a) Type "Other Contents by Author" in "View name" text box.
b) [Optional step.] You can check "Description" checkbox and write a description for view. If you wish, check and write "A list which contains other content by author."

Select "Content" from the "Show" select list.
Uncheck "Create a page".
Check "Create a block". You can enter any block title you wish. To limit the items shown in block, type a number in the "Items per page" text box. (You can change it later.)
Click "Continue & edit". At this stage, it is a good idea to click the "Save" button after each alteration/change to save the View.

7.
a) Click the "Advanced" link in right side of the page (if the pane is not open).
b) Click the "add" link in CONTEXTUAL FILTERS row.
c) Check the "Content: Author uid" checkbox from the "Add contextual filters" popup.
d) Click "Apply..." button.
e) Check "Provide default value" option in the WHEN THE FILTER VALUE IS NOT AVAILABLE section.
f) Select "User ID from URL" from the "Type" select list.
g) Check "Also look for a node and use the node author" checkbox.
h) Click "Apply..." button.
8.
a) Click "add" link again in the CONTEXTUAL FILTERS row.
b) Check "Content: Nid" checkbox from the "Add contextual filters" popup.
c) Click the "Apply..." button.
d) Check "Provide default value" option in the WHEN THE FILTER VALUE IS NOT AVAILABLE section.
e) Select "Content ID from URL" from the "Type" select list.
f) Scroll down to the MORE section and check the "Exclude" checkbox.
g) Click the "Apply..." button.

Click the "Save" button and save the view.

You can add different fields and filters and make changes to create solutions for different needs.
Comment: thanks for these detailed instructions! i've followed them and now have a new view/block available ... but i'm still not sure how to use this to investigate **which user created** or **which user last modified** a specific block, for example in here:
mydomain.com/admin/structure/block/manage/block **/1/configure**

See Which User Created/Edited Block?


Can 16th notes cause parallel octaves?

Question:
In another post I learned that an 8th note chordal skip can produce consecutive parallel intervals even when the parallel interval happens off the beat. But what about a 16th note descending line like this one? Would this be allowed in a 4 part harmony exercise? You see the B on the last 16th of beat 2 make a parallel octave with the tenor and to my ears it is not audible unless I play it super slowly.
Comment: To me a larger problem is the bass emphasis on F#, which puts the chord in second inversion.  Depending on which set of "rules" you are following, a better choice may be to leave the bass on B for a full quarter note and leap up to the E.  It's a hidden/direct octave but in four parts they are often permitted.
Answer: Yes, it unfortunately doesn't matter the note value; no matter how fast or how slow, two consecutive intervals of a perfect octave (or perfect fifth) between the same two voices results in unstylistic ("incorrect") voice leading.
There are multiples solutions to something like this, so to share just a few:

If the two affected voices can be solved with a voice exchange, pursue that option. On beat 1, you may want a chordal skip of B–D♯ in the bass, but this creates parallel octaves with the alto. As such, change the alto to eighth notes of D♯–B, creating a voice exchange between alto and bass.
Try another chordal leap in the voice that you changed. Here, your bass could also arpeggiate down to G♯ in beat 2 to prevent any voice-leading issues.
Create a new chordal skip in the other voice that creates the parallels. You've changed the bass, which created parallels with the tenor. So now embellish the tenor to have B–G♯ to rid of these parallels.
Consider other embellishment types. In addition to passing tones and chordal skips, what about neighbor tones, suspensions, appoggiaturas, etc.?
Answer: Strictly speaking no, but occasionally you get away with it. In this case there are more problems than this one. The notes you have there are A#,C#,E, which is characteristic for the dominant on F#. So doubling the A# has some sort of doubling-the-third character. This quite problematic, as this leading tone demands a resolution into the tonic, thus this would require parallel octaves. Also having a diminished chord like this is not really optimal.
Rather you might want to have the tenor go into the F#, filling up the F# dominant chord.
Comment: it is fine as part of a sequence if you double a leading tone, and vii does not resolve to I so it is not leading anywhere

Can 16th notes cause parallel octaves?


Using app.config with Interop Controls

Question: I have a .net project (MySolution.Common) that uses the app.config. I am using the project MySolution.Common in an InteropUserControl project called MySolution.InteropCtrl. MySolution.InteropCtrl is embedded into a VB6 project. When the MySolution.InteropCtrl is in the VB6 project, It cannot find the app.config file. Everything in the InteropControl works in VB6 except for what depends on the information in the app.config file. What do I need to change so the MySolution.InteropCtrl can see the app.config file while in VB6?
Answer: I'm not 100% sure on this.  But I'll throw out some possibilities.  First of all, app.config is not the correct name for the file.  While it is app.config in your project, it gets auto-renamed to binary.exe.config or binary.dll.config (depending on project type) where binary is the name of the project.
Secondly, I'm not 100% sure if dll.config files are always properly loaded and read by .NET when the application loads.  I don't believe it happens automatically, and that there is an extra call you have to make to read the config file if its for the dll.  If you reneame the config file to match your exe, then it will definitely load and be available to you.
Comment: I had to rename the file (vb6's binary name).exe.config and it worked. Thank you.
Answer: Beth Massi has a blog post that describes how to use a config file for an Interop Control with VB 6.0.
http://blogs.msdn.com/bethmassi/archive/2007/10/24/using-my-settings-and-wcf-configuration-with-the-interop-forms-toolkit.aspx
Answer: Two options:
1) Find your vb.exe path and put your config in there, as VB6.exe.config.
2) If you don't need to use the IDE just make your MyApp.exe an put it in your project's folder as MyApp.exe.config, then run the exe and it will find it.

Using app.config with Interop Controls


Minimizing error on unseen data

Question: The classifier aims to minimize the loss function (($F(x)$ - $\hat{F}(x)$)2), where $F(x)$ is unknown function and $\hat{F}(x)$ is the predicted function. If $F(x)$ is not known for unseen data, how do we compute this loss? Why is the training error used to estimate the error for unseen data?
Answer:
if we don't know $F(x)$ for unseen data, how does a decision tree minimize this error?

Every supervised ML method relies on the assumption that the test data (any unseen data) follows the same distribution as the training data (note that this is not specific to Decision Trees). In fact both the training data and the test data are assumed to be sampled from the true population data. As a consequence $F(x)$ is assumed to be the same for the training data and the test (unseen) data.
If one uses a trained model on some unseen data which is not distributed like the training data, the results are simply unpredictable and the performance is likely to drop.

Why do we estimate the error for unseen data using the error observed in the training data?

You seem to suggest to use the "unseen data" in the training process. You would indeed get better results on the "unseen data" if you optimized on it, but then you would lose the point of having a portion of data set apart. "Unseed data" is necessary to estimate how good your model will perform on data never seen before. If you don't keep some data set apart you may have a better model but you have no way of estimating how good it will be when put into production.
Answer: The idea of using a test set is to mimic the real-world application of using machine learning to, say, do speech recognition for people who aren't born yet.
That's the situation where you don't know the label, so you can't calculate the error or loss.
However, we mimic that (we hope) by withholding some data from the training. We fit the model on the training data and the estimate the error on unseen data by using our withheld data, since we know the correct label or value for those points, even though we didn't tell the model.
Our estimate on the holdout data might be badly wrong when we deploy the model to, say, Siri or Alexa, but some kind of error calculation on withheld data is the next-best that we can do until it goes into production and we see how the model performs.

Minimizing error on unseen data