How can attackers bypass firewalls?

Question: I have read the Wikipedia article on firewalls but don't understand firewall security and how an attacker from the outside can bypass the firewall to hack target system.
We all know it happens but what methods make it possible to do that?
Comment: As it stands I feel like this question is too broad to adequately answer. I think it would be better to break it down to several more specific questions that might be more reasonably answerable.
Comment: Ted - this is a different question. Is this what you really want to ask? The thing you need to know is that a perfect firewall is still a collection of holes - it is **designed** to let traffic through. That is its job - the problem is the applications behind it!
Comment: Wikipedia hardly constitutes a source for detailed information about how firewalls work.
Comment: Keeping this open for @Polynomial's answer and the fact that I still here people going around talking about how good their firewall is, that they have 3 of them, etc. Thanks, Hollywood.
Comment: I think the question is poorly researched (the wikipedia link actually has a large amount of info about firewalls, and google is your friend) but as Jeff says, Polynomial's answer is good.
Comment: Ted, welcome to [security.se] - but it does seem as if your question is all over the place. The specific things you mention are orthogonal to each other (e.g. email and firewall) - I think you should do some basic research on what "security" is in this context.
Comment: the question is there are people who do not open email attachments (at least not @main machine) so how actually they hacked ? i don't know you herd about 1 trillion$ recently government said about cybercrime damage yearly which is mostly information theft like industry documents from manufactories etc. we use firewall but still system get owned (i don't talk about SQL injection or malwares). the answer i herd i think is about even on closed ports with perfect firewall rules still good unknown exploits works
Answer: Firewalls aren't "bypassed" in the sense Hollywood would have you believe. They operate by checking incoming and outgoing traffic against a set of rules. These rules might be based on metadata (e.g. port number, IP address, protocol type, etc) or real data, i.e. the payload of the packet.
For example:

Drop all incoming packets from IP address 220.127.116.11
Drop all incoming TCP packets on port 22, unless they're from IP address 188.8.131.52
Drop all incoming TCP packets with the RST flag set, when the sequence number does not match that of a known connection.
Drop all incoming and outgoing NetBIOS packets.
Drop all incoming packets on TCP port 80 that contain the ASCII string 0x31303235343830303536.

Modern firewalls are usually comprised of the following rule sets:

Base rule set - usually "block all" followed by a list of exceptions for commonly used services / protocols (e.g. outgoing HTTP requests)
Custom rule set - a set of user rules designed to override / complement the base rule set.
Signature rule set - a set of signatures to prevent against known exploits. The last rule in my list is an example of this - it detects the Havij SQL injection tool. These usually override all other rules. This set is analogous to an anti-malware database, and must be updated frequently.

Bypassing a firewall isn't really something that can be done. All traffic that goes through it is filtered according to the configured rules. However, a firewall only does what it is told - a misconfigured or out of date firewall might allow an attack through.
Ways I can think of to get round a firewall:

Literally go around it. Find another entry point to the network that does not pass through the firewall. For example, send some malware or an exploit to an internal user via email.
Exploit a misconfigured firewall by crafting packets that don't trigger the rules. Difficult, but potentially possible.
Send custom exploit payloads to the target on an open port. Firewalls can only identify known exploits.
Comment: @Ted your assumption about the military not opening an email attachment is dead wrong. And, at least one firewall port has to be open for the computer to be participating on the network.
Comment: @Ted I've never heard such claims, but what proof is there that the attack *wasn't* done via social engineering in an email or similar communication? The Pentagon is, after all, just a building with a bunch of politicians, personal assistants, secretaries, military staff, cleaners, IT tech guys, security guards, etc. inside it. They communicate via email and other methods. It's an important building, but it's little more than an office space in reality. There's always a way to contact these people externally, which means there's a potential for email attachments or bad links.
Comment: +1 for good explanations and good examples, nice!
Comment: If you're talking about military networks like SIPRNet and JWICS, it's very difficult to identify potential attack vectors. The networks themselves are (as far as we know) isolated, and the protocols used on them are unknown. However, analysts and intelligence officers in the field may have access to these networks. A foreign power might exploit any form of vulnerability in the communications, or simply steal the equipment and credentials. At this point, the firewalls aren't involved at all. They simply steal the data from a legitimate connection.
Comment: Simplest solution for national espionage is the people angle - it is relatively cheap, and not that difficult - which is why vetting is taken so seriously.
Comment: The point is that the firewall is *not* a catch-all. If you try to send traffic through it, it'll block, filter or accept that traffic based on the rules it has been configured with. Secondly, if an attacker can talk to your network through an entry point that *does not* use a firewall, they can attack your network. Finally, even if you use a firewall on *every single network entry point* and *every single machine*, it still cannot identify dangerous payloads that it doesn't know about, e.g. an email with a link to a phishing site.
Comment: The question is when a military network computer hacked... they probably didn't opened an exe file in email and your other example on sending 0-day exploit on open port looks not working too because they will close all ports perhaps. So how it really happen?
Comment: @schroeder Not necessarily on the firewall angle. It could be a stateful firewall, at which point it doesn't need any ports open. Only time you need a port open is if you're offering a service, and even then you might limit the source address range for incoming connections. Other than that, though, I agree with you. The military are just people like any others. They still sometimes open email attachments and click on links without thinking. Or get their devices infected and accidently pwn the internal network on [BYOD](http://en.wikipedia.org/wiki/Bring_your_own_device)-day.
Comment: @Polynomial well those happy face departments maybe but when we say pentagon network hacked by china there is no email attachment ... so a good exploit work even on closed ports and firewall can't do much about it..?
Comment: so firewall work well to filtering and do not fail , the problem is we can't filter unknown exploits and they will work even if we close all ports as i understood ...
Comment: To add to the list of ways to get around a firewall there is social engineering. Trick the user into believing they need to disable their firewall or something they want won't work.
Answer: The easiest way to get around a firewall is what is known as 'client-side' attacks. If a computer on the protected side of the firewall makes a valid connection to an attacker, there is nothing to trigger a typical firewall rule. For example, if a firewalled computer makes an HTTP connection on port 80 to a website designed to exploit browser (or Java) vulnerabilities, there is little for the firewall to recognize as malicious: web traffic over a web port.
Once a foothold is gained within the network, the attacker can set up encrypted tunnels that pass through the firewall on allowed ports, which is another kind of 'bypass'.
On the topic of direct firewall attacks, tools exist to map out how a firewall is configured for various ports. With this information, traffic can be configured to pass through the firewall. At the simplest level, fragmenting packets can be effective in not triggering various firewall and IPS rulesets because each packet does not contain enough data. The firewall has to be configured to store the entire fragmented packet set before inspection.
Comment: Also check out this page: http://ericjang.tumblr.com/post/22807430775/thursday-hacking-adventures-xxxss-and-creepy and the link in it to Samy's DEFCON 16 talk. Punching inbound holes into an outbound NAT router is doable.
Answer: The answer really depends on your definition of "bypassing".
The most important factor in ensuring a firewall provides maximum protection is to ensure it is configured appropriately. A firewall is a dumb device in the sense that you must configure what you'd like it to allow through/block. A poorly configured firewall will leave gaping holes in your attack surface. If an attacker gets in, it's not the firewall's fault; it was just doing what it was told. One could argue that the firewall hasn't technically been "bypassed" because it was never told to restrict the relevant traffic in the first place.
Depending on the feature-set of the firewall, it will only allow you to restrict access in certain ways. Although some penetration techniques might try to exploit a vulnerability or weakness in the firewall's software - which I guess you could class as "bypassing" - the majority of techniques are focused on exploiting poorly configured firewalls (see point above), or systems that are behind the firewall. As an example, if you have a poorly configured SSH server behind the firewall, then it's not the firewall's fault that the attacker was able to authenticate as root with "password" as a password. The firewall was configured to only allow access via port 22 (SSH), so it's done its job. Again, one could rightly argue that the firewall hasn't been bypassed in this situation, but someone's still got into your network.
Some firewalls offer more advanced features such as intrusion prevention and application layer filtering. IPS firewalls make an attempt to understand the content of the traffic that's flowing and block some common methods of exploiting weaknesses in systems hosted behind it. Again, this relies on careful configuration to be effective. If you haven't enabled the correct IPS protections, then it's not the firewall's fault if someone successfully exploits that vulnerability. Some penetration techniques exist which try to slip traffic past these protections in a form that doesn't trigger the block, but still exploits the weakness. It's a cat-and-mouse game similar to anti-virus. I guess you could call these "bypassing" the firewall.
In short, a firewall is only as good as the admin who is configuring it, and it can only be expected to restrict traffic based on its capabilities. It's no substitute for hardening the systems behind it, which is where most attacks will focus.
Answer: Firewalls are core elements in network security. However, managing firewall rules, especially for enterprise networks is a complex and error-prone task. Firewall filtering rules have to be carefully written and organized in order to correctly implement the security policy. In addition, inserting or modifying a filtering rule requires thorough analysis of the relationship between this rule and all other rules in order to determine the proper order of this rule and commit the updates. Identifying the anomalies in Firewall rule configurations is a much heated research topic and there is a lot of research on it some of which i find interesting is.
The goal of the attacker is to expoilt these anomalies in firewall configurations and it is done through firewall fingerprinting in which he send benign packet to guess firewall rules and find loopholes in them .To prevent such sort of exploitation most firewall are deploy behind IPS in a pattern call DMZ where IPS tries to prevent firewall fingerprinting through heuristics or statistical measurement (entropy) i.e. port scanning .

How can attackers bypass firewalls?


MOSS 2007 SP3 update recovery

Question: We are planning to update our MOSS 2007 Enterprise SP2 environment to SP3. I wanted to know a rollback strategy that we should plan just in case our update fails. Although we will doing this update in test environment first, but still. Can we just take the DB backups of all content, my sites and central admin DBs and restore them just in case we face any issues?
Answer: Backups are probably your best option, given that there isn't a way to uninstall a SharePoint patch, but you should keep a few things in mind:

Make sure you know what version your farm is on when you take the backups, and that you have the files available to rebuild a replacement farm to exactly that patch level. You may be able to restore older backups into a newer farm but that's getting more and more difficult as the products evolve.
Keep in mind that you'll need to do a full rebuild of the farm and then restore those content databases to the new farm, so it is important to capture how you have the farm configured so you can build a new farm to match the old one.
The content databases are the main thing you'll want to target for backups. If you're doing SQL Server database backups, Microsoft does not support restoring configuration databases from SQL Server backups.

John
Comment: So if I understand correctly for your last point, rather than taking a SQL DB backup for your SP farm, you probably should take the stsadm/CA backup way for backing up your farm databases.

MOSS 2007 SP3 update recovery


Can I promote my own products here?

Question: Can anybody tell me if a person is allowed promote (advertise) their own software to do with cooking on the site? I can't seem to find that answer.
Comment: Welcome to the site! Thank you for asking this question. Things can get confusing here, and it helps to know ahead of time what's expected.  Check out our [tour] and [help] for more explanation. We do hope you'll stay and contribute, or even just read the questions and answers. The information may even help you with your software project!
Answer: There's a page in the help center entirely about this: "How not to be a spammer"
Essentially, if mentioning a given product will genuinely help answer a question, then you may do so, but you must disclose your affiliation.
However, thinking of this site as a way to advertise is a really, really bad idea. It's a cooking Q&A site, and if you are here to do anything other than constructively answer questions, you're not in the right place, and things may go poorly for you.
Comment: Thanks for the answer.

Can I promote my own products here?


Dornbusch Sticky Price (Overshooting) model

Question:
Stupid question: What do the phi and lambda from the equations above represent?
Answer: The equations you have are equilibrium conditions, while derivation (of course) starts with the demand equation and sets demand equal to supply. Then:

$\varphi$ ($0<\varphi<1$) is the income elasticity of money demand - the responsiveness of demand with respect to income
$-\lambda$ ($-\lambda <0$) is the interest rate semi-elasticity of money demand - the responsiveness of demand to the change in interest rates.

Semi-elasticity means that we care how much Y changes in percentages when we increase $X$ by one (increase by one, not by one percentage point).
Answer: To my understanding, $\phi$ and $\lambda$ are simply positive parameters in the Dornbusch model used to represent the linear (in logarithms) equilibrium condition in the money market.
$$
m - p = \phi y - \lambda i
$$
is also known as the LM curve, in logarithms.


What are the different approaches of the levels of language analysis as introduced in structural linguistics?

Question: The levels are as far as i ve been told:
discours,syntax,morphology and phonology.
What is the unique approach towards language of each of them?
Are there further levels?
Comment: I'm not sure what you're asking. If there are multiple schools of thought within structuralism that deals with these levels of language?
Answer: I think most people would want to start with phonetics which is the functionally undifferentiated substrate of phonology (to generalize greatly).
Of course, on the other end, you'd also want to include things like the lexicon or semantics and pragmatics (which some people - myself included - would consider to be the same thing). There's also the paralinguistic level (gestures, etc.).
But much more importantly, the whole concept of levels is highly problematic in linguistics.  Language does not operate in those straightforward lines. So there are people studying 'morphonology' or the relationship of phonology and syntax.
The fundamental problem is one of disciplinarity. For example, there are people who would consider phonetics to be a 'science' distinct from linguistics. And while it is true that phonetics requires different skill sets, it's not immune from the interests of language as a whole.  In the same way, syntacticians have their own approaches and theories that are often quite difficult to grasp for the uninitiated linguists from other disciplines.
The very idea of linguistic levels of distinction can be a useful heuristic but there's also a very strong case for rejecting the notion as reflecting the fundamental nature of language. Look to cognitive / construction grammar and usage-based theories of language for a critique. However, even those people (like myself) who do not believe in 'levels' as the key organizing principle of language, will refer to them as shortcuts when talking about certain areas of description, so it's certainly worth learning more about them.


Razor mv3 web sites on IIS 7.5

Question: I've been trying to set a razor web site on iis 7.5 default web site. but when I try to navigate I always get HTTP Error 404.0 - Not Found.
I deployed the site via publish
I have set runAllManagedModulesForAllRequests= true.
I have have Application Pool in .net 4 integrated mode.
Do I need to install something specific on the server to be able to run razor sites on IIS ?
And the server tells me that this update is not acceptable http://support.microsoft.com/kb/980368 -> "A update is available that enables certain IIS 7.0 or IIS 7.5 handlers to handle requests whose URLs do not end with a period"
I am running win server 2008 R2 64 bit.
I am no expert with IIS, the site works perfect in the development server, so any help would be greatly appreciated.
Thanks
Sushibite.
ps. here is RegisterRoutes in Global.asax
<code>public static void RegisterRoutes(RouteCollection routes)
    {
        routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

        routes.MapRoute(
            "Default", // Route name
            "{controller}/{action}/{id}", // URL with parameters
            new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
        );

        routes.MapRoute("Suppliers", "Areas/Suppliers{controller}/{action}/{id}", new { area = "Areas", controller = "Dashboard", action = "Index" });
        routes.MapRoute("Administrator", "Areas/Administrator{controller}/{action}/{id}", new { area = "Areas", controller = "Dashboard", action = "Index" });

    }
</code>
Comment: @sushiBite: did your problem solved? I am having the same issue.
Answer: I had a similar problem on our deployment server. After some searching I just installed the MVC 3 tools on the server and the website worked perfectly.
Edit
Small note on the side,, put the different maproutes above the default one. Else every route will take the default one. It works from top to bottom and every url would fit in the default route.
See: ASP.Net MVC route mapping
Comment: Hi, do I need to do anything after I install the tools ?
Comment: Nope, if you already have .net 4 installed you're good to go (atleast we were).

Razor mv3 web sites on IIS 7.5


How do I send Ether using geth on Windows?

Question: I've mined Ether and it has gone into a wallet that I created using geth. When I look online, people say to use eth.sendTransaction({from: 'address', to: 'address', value: web3.toWei(1, "ether")}), however I'm not sure how to use this command on Windows.
Answer: The line you mention comes from the JavaScript library web3.js. If you want to use geth you first need to sync it to the blockchain. For this do. the following:

Start geth from the windows console
wait about a minute, then start geth attach from a second windows console.
on the second console, enter eth.syncing. As long as you see numbers here, the sync is still in progress. When the sync is finished, you see false.

When the sync is finished enter eth.sendTransaction(from, to, value) to send Ether. Note that prior to using this line, you need to unlock your account using personal.unlockAccount(address).
Comment: When I call `eth.sendTransaction` in that fashion, I get the following error:

"Error: invalid address
    at web3.js:3930:15
    at web3.js:3756:20
    at web3.js:5025:28
    at map ()
    at web3.js:5024:12
    at web3.js:5050:18
    at web3.js:5075:23
    at :1:1"

The syntax for sending a transaction looks like this:

    `eth.sendTransaction({from:eth.accounts[0], to:"0x005080F78567F8001115F1eee835DD0151BEA476", value: web3.toWei(1, "ether")})`


Table Stats gathering for Oracle

Question: When and how should table stats gathering be performed for Oracle, version 9 and up? How would you go about gathering stats for a large database, where stats gathering would collide with "business hours".
Answer: I don't agree that you should always rebuild your statistics after there have been lots of deletes or inserts. As ever, it depends. In a data warehouse situation, when re-building your materialized views you will be doing lots of deletes and inserts but the base structure of the data will not change.
You only need to re-calculate statistics on a table if there has been a significant change in its content. This does not necessarily mean after lots of deletes or inserts, but rather when deletes, inserts, or updates materially change the content with respect to possible execution plans.
If you are truncating tables and rebuilding (which will reset your statistics), instead of an expensive statistics calculation, you're often better off storing the statistics before truncating and restoring them once you've rebuilt the table.
For saving the current views of statistics you use:
dbms_stats.export_table_stats

and to restore them afterwards you use:
dbms_stats.import_table_stats

(There are corresponding procedures for schema and database.)
Answer: Gathering stats should be done whenever there has been large changes to the data content, for example a large number of deletes or inserts.  If the table structure has changed you should gather stats also.  It is advisable to use the 'ESTIMATE' option.
Do this as an automated process out of business hours if possible, or if you have to do it during business hours then choose a time when there is minimum access to the tables you wish to gather stats for.
Comment: I would disagree with using estimated stats. In my (albeit limited) experience, where table statistics are concerned, "estimated" is synonymous with "meaningless".
Answer: Make sure when using the estimate (sample_percent) that you gather at least 10 percent.  Below that can yield very questionable results.
Answer: Consider backing up current stats when gathering -- that way you can compare them (if you're interested) and possibly restore them if your new stats cause problems.  Keep in mind that stats are used to determine execution plans -- you may only want to gather them if you want execution plans to change.

Table Stats gathering for Oracle


Link "On Battery" and "Plugged in" screen brightness together?

Question: Suppose I was in a dark room using my laptop plugged in. I set the brightness to a low value like 25% because the room was dark. Then, I unplugged the charger because the laptop is completely charged. I also set the brightness to 25%. Now I turned the light on and the room became bright. I change the brightness to 100% because the screen was not visible in a bright room. After a while, I connect the charger again, and the brightness turns to 25% again. Logically, this makes no sense because I connected the charger and the laptop has more power to spend and still the laptop tries to save power by lowering the brightness.
This happens because Windows simply remembers the last brightness by the two "On Battery" and "Plugged in" states, not adjusting the other when one changes. Is there any way to link the values together? I mean, when I increase the brightness of "Plugged in", I would also want the brightness of "On Battery" to increase, so that I will not have to adjust the screen brightness each time I connect or disconnect the charger.
Ideally, I wish "On Battery" brightness should be set relative to the "Plugged In" brightness, for example, "On Battery brightness is -25% of Plugged In brightness".
Comment: Possible duplicate http://superuser.com/questions/266684/how-to-disable-brightness-intensity-switching-by-power-plans-and-ac-battery-mode but it doesn't have good answer..
Answer: I created my own program doing that behaviour. It changes the other when one changed.
https://github.com/HubKing/LinkBrightness


FEA software for Orthotropic materials

Question: What FEA software is capable of simulating static studies on orthotropic materials such as wood? I must be able to define mechanical properties in X,Y and Z. I would also like to have access to failure criteria such as tsai-hill or tsai-wu and probably even other custom criteria. My company uses solid edge simulation at the moment but i have not found a way to account for orthotropic materials, I also tried solidworks simulation on my side and I was able to perform most of what i need but i want to consider any additional options before i make a recommendation to my company to shift to a new software.
Any hints or advice would be greatly appreciated.
Cheers!
Answer: I would suggest Abaqus Standard or Abaqus Explicit (depending on the type of problem you are trying to solve).  Ansys Workbench should also have the features you need.
Cost will be around $20000 per year.
Comment: Thanks for your response. It is indeed very helpful. I've seen a couple of demos and Abaqus seems to be everything one could ever wish for in an FEA software, however I will be running simple static load tests on structural frames made of solid timber and engineering woods so probably Abaqus is an overkill (not to mention unaffordable). I will probably be ok with solidworks sim professional for now.
Answer: Any of the major FEA systems (Nastran, Abaqus, Ansys, Adina, Comsol, etc) can do this. If you have a fairly limited requirements (e.g. only linear statics), look for the vendor with the cheapest entry-level or student-level version of the code which includes orthotropic material models.
Comment: Thanks, I will look into these.  Regards

FEA software for Orthotropic materials


Urchatz Pesach Meal

Question: At the Pesach Seder the Urchatz is the washing of hands without a bracha.
At the Pesach seder our table is like the altar, so since the Kohanim should wash their hands and feet in order to serve or make offerings, is the Urchatz symbolically referring to this washing? Or does it refers to another temple ritual? I wonder how it was established and by which basis we keep the urchatz ritual at the Pesach meal. Why don't we do Urchatz at for example the weekly Shabbat meal?
Comment: Our table is always like an altar.
Answer: Good try, but no, not that washing.
In the late Second Temple period, it became common practice for most Jews, even non-kohanim, to try to keep all food as non-tamei as possible, as if it were terumah or a sacrifice. (Terumah -- not just bread, but even wine or oil -- would require hand-washing before consumption.) Thus, they would wash before any vegetable-dipped-in-liquid.
Over the next few centuries, we wound up in a situation where everyone is tamei anyhow, but the practice of washing stayed around for the staple -- bread -- while it was relaxed for all other foods. However on Seder night, we are reenacting what it would be like in Temple times, so we wash before eating vegetables-dipped-in-liquid.
(A carrot growing in the ground can't become tamei because it's attached to the ground. Pull it out of the ground, still can't become tamei hence no washing required. It can only become tamei once you rinse it.)
Comment: Washing for דבר שטיבולו במשקה also applies year-round according to most poskim (e.g. *Mishna B'rura* 158:20, הרבה אחרונים החמירו מאד בדבר וכתבו דהעיקר כרוב הפוסקים דצריך נטילה מדינא אף בזה"ז).
Comment: Can you source that טיבולו במשקה is related to כי יותן? Dry fruit that is huchshar already doesn't need washing

Urchatz Pesach Meal


How do I force yum to download from a specific mirror?

Question: In a Fedora system, I can access only ftp and not http. When I try to install a package with yum, it usually tries to download from http mirrors. How do I force it to download from a ftp mirror(listed here http://mirrors.fedoraproject.org/publiclist/Fedora/17/i386/) ?
Answer: If I recall correctly, YUM should retry from different mirrors until one works, as mine would keep trying at school since the http ones were all blocked, though this could help: http://fedoranews.org/tchung/yum-mirrorlist/
Comment: One good use of forcing a single repo mirror is that a caching proxy is more effective since it only needs to cache one mirror rather than many.
Comment: Mirrors are _usually_ up to date, but not always...


How to use smarty in Drupal 7

Question: I have some prior experience in PHP programming but I had used Smarty as my template engine, and found it easy to use. I read that Drupal is making use of PHPTemplate as template engine. So, I just wanted to know how to implement Smarty template engine in Drupal?
Comment: Drupal 8 will include [Twig](http://twig.sensiolabs.org/), together PHPTemplate.
Answer: While there is a Smarty module, it has no release for Drupal 7 and I doubt there will be one.
For Drupal 4 and 5, there were various efforts made to use different template engines.  However, nearly all contributed themes for Drupal 6 and 7 are done in PHPTemplate and almost all documentation and available support are for PHPTemplate.
Even if you're already familiar with Smarty, if you're going to use Drupal seriously for more than one project I would highly recommend learning PHPTemplate.  At this point, you would have to do work to integrate Smarty into Drupal 7 on your own, which would almost certainly be harder than just learning PHPTemplate.  Going with Smarty will also limit your support options.
Comment: thank you! I will look into PHPTemplate, as I want to go with latest version of Drupal. I think this is going to be exciting!!
Comment: Still no release for 7.x and 8.x :( ??

How to use smarty in Drupal 7


Can a mark be maintained when the target is invisible?

Question: Can a mark from a Fighter, Battlemind, etc. be maintained when the target goes invisible?
Comment: Remember, Invisible is not the same as Hidden. Even if someone turns Invisible, everybody on the battlefield still knows where s/he is unless he successfully becomes Hidden to them.
Comment: Yeap, appreciate that there is a battlefield awareness so the target is still known to be "there".
Answer: An attacker takes a -5 penalty to attacks against an invisible target. Invisibility has no special effect on marking, just that if the marking attack requires a hit it would be harder to achieve.
Turning invisible while marked does not remove it from you. Marks last either until the specified duration on the effect or until the marked target dies or falls unconscious.
Comment: @stevec - The jury is [still out](http://meta.rpg.stackexchange.com/questions/1483/is-there-a-functional-purpose-to-putting-things-in-code-text-here) on formatting of special terms, but I definitely frown on highlighting of non game defined terms like marking or invisibility.
Comment: Small addend: Marks also disappear if the creature that placed the mark goes unconscious or die.


Lm393 output oscillation

Question: So I have designed this circuit to operate a relay in an off grid circuit. When the solar panel charges the battery over 12.9 V the relay is supposed to kick in. But from 12.8 V to 13 V the relay buzzes on and off. I have tried a few times to fix the issue but the best I have gotten is slow the buzz down with a capacitor in parallel with the relay. Any thoughts?
Comment: Might be nice if you could draw the schematic so we can read it without mental acrobatics. You have no hysteresis. The datasheet for the comparator should have examples.
Comment: As well, D1 is backwards.
Comment: Look here for some hints to help you draw a more accessible schematic: https://electronics.stackexchange.com/questions/28251/rules-and-guidelines-for-drawing-good-schematics/28255#28255
Comment: Something like a 555 or a TL431 might be a better choice. Even a zener diode and the relay might just do the job.
Answer:
But from 12.8v to 13v the relay buzzes on and off.

The problem is likely this; when the relay is activated the current drawn from the solar panel causes a drop in its supply voltage and this then causes the LM393 to deactivate the relay. That deactivation means less current from the solar panel hence the voltage rises a bit and, the LM393 then retriggers and you are going round in a circle until the voltage rises sufficiently on the panel that it doesn't drop below the LM393 threshold voltage when the relay gets activated.
As others have pointed out, D1 appears to be the wrong way round in your schematic: -

I've also added a resistor that creates hysteresis and the value of 100 kΩ might be enough to avoid the problem of the relay buzzing in that when the output of the LM393 switches, it adjusts the target threshold for the comparator a bit.
Please try and use the right symbol for the LM393 rather than just a box with connections and no pin numbers. It would also help if you positions BJTs so that they were more logically drawn (Q2 for instance).
Answer: When the inputs of the comparator are close in potential, any noise appearing on those inputs (including power supply noise due to the relay switching) can change which input is greater, and that of course will cause the output to change state.
I think this is what is causing your relay to chatter.
Part of the solution is to ensure that the inputs are as noise free as possible, with power supply decoupling capacitors and wotnot, but the go-to solution in most applications is to employ hysteresis:

simulate this circuit – Schematic created using CircuitLab
As you seem to do in your circuit (which is very difficult to understand from that terrible schematic), I provide a threshold voltage \$V_{TH}\$ by setting the position of VR1. This voltage defines some "centre" to be compared against \$V_{IN}\$. If TH were tied directly to the non-inverting input of the comparator CMP1, then its output would be dependent only upon \$V_{IN}\$ and \$V_{TH}\$.
Here, though, I've inserted a potential divider consisting of R1 and R2 between TH and OUT, which superposes onto \$V_{TH}\$ a small adjustment dependent upon the current state of the output.
This feedback causes the switching threshold to be reduced slightly when the output is low, and increased when the output is high. It is positive feedback, which creates input hysteresis, and the circuit is a form of Schmitt Trigger.
A couple of advantages of hysteresis are:

Improved immunity to input noise. The dynamic threshold means that input fluctuations must exceed the change in threshold levels, to cause a change in output state.

Output transition is faster. When some input condition causes the output to begin to change state, this changing output also causes the difference in comparator input potentials to increase, reinforcing the condition that began the transition in the first place, and driving the output harder towards its new state.

It remains to choose suitable values for R1 and R2, to obtain an acceptable degree of hysteresis for this application.

Lm393 output oscillation


On a single table, how is an indexed view different from a non clustered index?

Question: Assuming that no joins are involved, and the PK of the view (the UNIQUE Clustered Index) is the same as that of the base table, is there a difference between how a nonclustered index (NCL) and an indexed view is treated by SQL Server?
Answer: See this article: Resolving Indexes on Views for detail on how the query optimizer treats indexed views.
The normal use case for indexed views is aggregations (eg COUNT_BIG, SUM with GROUP BY etc) or complex formulas / calculations you want to keep in one place but do not want to use a computed column.  Basically the indexed view would look different to the base table, or to put it another way, you can do things with indexed views you can't do with a base table.
If you created an indexed view that is simply the base table and a unique clustered index (which is compulsory for an indexed view), then conceptually it is a duplicate of the base table and you may have missed the point of indexed views as described above.  You have also incurred a considerable index maintenance overhead for no reason.
Indexed View matching, the feature by which the Query Optimizer will use an indexed view even if it is not referenced in the query, (provided that view can 'answer the question') is harder than normal index selection so you also incur a risk of this not happening.  Although in your case where the view is a duplicate of the table it is irrelevant.  Indexed view matching is also an Enterprise edition feature, although you can override this with the NOEXPAND hint in Standard edition.
None of this is a concern for a conventional non-clustered index which may or may not be used depending on a large number of factors, although selection is probably more straightforward than for indexed views.
In summary, an indexed view implemented as you describe is simply an unnecessary duplicate of the base table.  I would be very careful about implementing them, unless there was a specific use case/example where it was shown to be significantly faster using an indexed view, and/or you can live with the overhead having trialled it extensively with your other workloads.
Indexed views do have their uses and there are some interesting discussions on them recently here, here and here.
HTH


What is the meaning of the ` cya` and `gng`?

Question: When I chat with a India friend in the Colloquy.
He said to me:

ok dude i am gng out cya and all the best..

I don't understand the gng and cya, I know it should be a shorten statements. But I don't know what is that.
Comment: Could you suppose what they mean by trying to say them as written?
Answer: You can probably find a definition for cya online.  Here's Wiktionary's, for example:

(Internet slang) Alternative spelling of see ya

But gng might be harder to find.  It's a simple non-standard abbreviation of going, created by removing the vowel letters.

With full spelling and punctuation, your message might look something like this:

Okay, dude.  I am going out.  See you and all the best.

It's a simple farewell message.  See you (later) is a way of saying goodbye, and they were saying goodbye because they were going somewhere.
Answer: There are various abbreviations, substitutions, and acronyms that have become common first with instant messaging and later with texting, in order to send texts more quickly without having to type as many letters.  It's a very long list and constantly changing, but for example:

LOL = "laughing out loud"
OMG = "oh my god",
substituting 4 in place of "for" (4ever),
2 in place of "to" or "too" (me 2)
8 in place of "ate" (l8r)
r in place of "are" and u in place of "you" (r u coming?)
c in place of "see" (I c u)

The easiest way to figure these out is from context.  You know it's either an abbreviation for something, or a substitution for something.
"CYA", spoken out loud, sounds like "See ya", short for "see you later".  "GNG" sounds like an acronym (Got No G?) but apparently it's just short for "going".
If you're curious there are many websites with lists of common English texting slang.


Relaying Party application not working when shifted to another machine

Question: I have a ASP.NET Relaying Party application that is configured to authenticate through ACS. The Web Site runs fine on my local host. The problem is that when i copy the website to another machine, it doesn't work and throws the following exception:
**Server Error in '/Website' Application.
Access is denied.
Description: An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL.
Error message 401.2.: Unauthorized: Logon failed due to server configuration.  Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server.  Contact the Web server's administrator for additional assistance.**
Another interesting point is that when running on the new machine the URL of the website has changed,for example on my machine it was "http://localhost/Website/" while on the new machine it is "http://localhost:51975/Website/".
Any Ideas??
Answer: Is this an ACS v2 configuration?
You should change the Realm and the Return Address in the Relying Party application to match the URL of your development website (including the port).


Patent application file on arxiv

Question: Is it wise to upload the published patent application file on arxiv?
what will be the consequences of copy right?
Comment: I'm not sure if your typical arXiv reader would appreciate reading a patent application, which uses a different style and language and has a different purpose from an academic paper. Is there an academic paper/abstract associated with the patent application? If so, perhaps that would be a better candidate for arXiv? You can then cite your patent application in that paper.
Comment: Why are you interested in many people reading a patent application? Is this a form of marketing?
Comment: Won't the patent application be published by the patent office, and become publicly accessible anyway? Is there a difference between that publication and the file you intend to upload to arXiv?
Comment: Doesn't publishing it make it prior art that then stops you from obtaining a patent?
Comment: Yes it will be available to public but I want to increase the readership base.
Answer: You can't upload your patent application materials to arXiv, because they simply don't accept that kind of submission.
https://arxiv.org/help/moderation:

arXiv accepts only submissions in the form of an article that would be refereeable by a conventional publication venue.

Your file isn't an article, and "conventional publication venues" (journals, conference proceedings, etc) don't publish or referee patent applications.    If you submit it, it will probably be rejected in the moderation process.
Whether it would be legally advisable to make your file publicly available some other way, or to write and publish an article about your invention, and how any of this might affect the validity of your patent, are questions that you need to ask your patent attorney.  It would be very unwise to rely on the advice of random Internet strangers for something like that.

Patent application file on arxiv


How to monitor all exceptions occuring on behalf of the CLR?

Question: I want to monitor all exceptions that are occurring on a server. The server runs various apps and websites. I am not the writer of these apps and websites and web services. Is there any way I can write an application that will monitor the managed code that runs on the system and log all the un-handled exceptions that occur on the system. I was thinking this should be possible because the OS is the one who generates exceptions. So is it possible for me to log all exceptions that are generated by the OS.
Answer: One could inspect all process, inspect all appdomains with mscoree.CorRuntimeHostClass and then bind to all the unhandled exception event handlers (http://msdn.microsoft.com/en-us/library/system.appdomain.unhandledexception.aspx).
An other option is to use al the debug api's.
There is however Avicode, a product of microsoft product which does that (and is/will be part of scom).


Can polynomials have solutions other than numbers?

Question: We have learned in our previously classes that whenever we have a polynomial function then it has values of $x$, which satisfy . Are there other structures like Matrix, Vectors or something else which satisfy a polynomial? If so then kindly tell.
Comment: If $f(x) = a_m x^m + \cdots + a_1 x + a_0$ is a polynomial with coefficients in a field $F$, you can plug a square matrix $A \in F^{n \times n}$ into this polynomial to obtain the matrix $f(A) = a_m A^m + \cdots + a_1 A + a_0 I$.
Answer: A very famous theorem is the Cayley-Hamilton theorem about the characteristic polynomial. It states that a square matrix $A$ does fulfil its own characteristic polynomial for the eigenvalues.
Comment: Thank you so much ...
Comment: Yes this is really good example. It shows that the field of matrices over *any* field always have larger set of solutions than their scalar field.
Comment: And , let me ask something more , are there other than matrices as solutions if so please make me know those too
Comment: It is possible to show that any algebraic group can be written as matrices of elements from less complicated fields (if matrix multiplication is to "do the same thing" to the group element as the group operation does). So in some sense you can build arbitrarily complicated "numbers" with matrices.
Answer: Sure there is. Whenever you have a structure with a multiplication operation and an addition operation that interacts relatively nicely ("ring" is the archetypal definition of "nicely", but you can go somewhat further with less strict requirements if you want), you can make polynomials.
For instance, it is a known result that each matrix is a root of its own characteristic polynomial.
An important part of modern number theory concerns solutions to polynomial equations in the integers modulo prime numbers. For instance, the modularity theorem, famous for being the last building block in the final proof of Fermat's last theorem, was first conceived because it was noticed that the number of solutions of certain types of polynomial equations modulo any prime $p$ was tightly related to the degree $p$ coefficient in the expansion of certain (previously unrelated) functions.
Comment: Wow !! I have been unaware of these things thanx , I would like to learn more from you if possible .
Answer: In my opinion polynomials are defined on symbols and we can relate values to these symbols. But they are still symbols nonetheless. Look at this for an example where the point is not to solve the polynomial for a ceertain number rather just to look at how the coefficients work together, in this situation $x$ behaves only as a placeholder. So sometimes there are no solutions at all, we only use the properties of the polynomial.
Comment: The input variable $x$ of a generating function (your example) is a "formal" variable in the sense that its value isn't really related to the problem we're trying to solve; but it usually seems to be treated as a real number, since we often take the derivative or integral of the generating function. If the generating function has a finite number of non-zero terms, I would consider it a polynomial with solutions; we just might not _care_ what those solutions are.
Comment: I just wanted to give an other perspective of polynomials, still I consider them as symbols which can possibly take a value but not necessary.


Shaving Of Pubic Hairs

Question: I wanted to know, I shave my pubic hairs, I don't want to shave scrotum because I always cut it. will it be acceptable in Islam if I just shaved pubic hairs but not scrotum.
Answer: Bismillah Hir Rahmaan Nir Raheem
As Salaamu 3laykum,
I hope you are doing well. So there are ahadith (Prophetic sayings) that tell us about shaving the pubic hair and to do so within 40 days time.
Hadith #1
ALLAH Messenger (ﷺ) said, "Five practices are characteristics of the Fitra: circumcision, shaving the pubic region, clipping the nails and cutting the moustaches short." (Bukhari in the book of dress)

Hadith #2
"[The Messenger of ALLAH (ﷺ)] fixed the time for us paring the mustache, trimming the fingernails, shaving the pubic hairs and plucking the underarm hairs - that we not leave it for more than forty days."
(Tirmidhi in the chapter of manners)
Sahih (Darussalam)

Now we need to define what is the pubic hair. According to Medical News Today (https://www.medicalnewstoday.com/articles/326578) it states: "Pubic hair typically grows on the area between the belly button and the penis, but it may also develop on the penis and the testicles"

Conclusion
So in my opinion we have to shave the hair above the penis (usually darker and bushier), on the penis and the scrotum as these are all considered pubic hair. I do not know if there are accounts from any other hadith or Sahabah (companions of the Prophet) that states the exact region. There maybe something out there but I do not know of it. What I have answered is based on what I have stated above.

Have a nice day!

Shaving Of Pubic Hairs


Lower bound on number of zero columns in matrix

Question: I've been looking for an algorithm to tell the number of non-zero rows (or columns) in a row reduces matrix $A\in \mathbb{R}^{m\times n}$. A simple approach would be to check it, row by row, which would take $O(m\cdot n)$ time and I believe would be linear. It seems to be the lower bound, but I am not sure, could there be a more efficient deterministic algorithm for this?
Comment: I don't see how you can answer the question without inspecting all $mn$ entries at least once, and your proposed method uses constant space and exactly $2mn$ memory accesses. The best you can do is reducing the constant factor below $2$.
Answer: You can't.
Consider a matrix that is nearly all zeros.  Consider what happens if you have an algorithm that starts inspecting entries, keeps finding a zero in each place it looks, but halts without having looked at all entries.  Consider any entry it didn't look at.  The output needs to be different if the matrix is all zeros except for that entry, vs if it is all zeros.  (Both matrices are in reduced row echelon form, so both are valid inputs.)  However this algorithm will output the same thing for both inputs.  Hence this algorithm cannot be correct.


GPO installation (office add in)

Question: I created Outlook add in and installer (using Installshield LE 2013). My msi package has dlls in a separate folder, but this package works fine when I try to install add in local.
I have problem with installation via GPO. I created test security group in AD with one user, and I was trying to set GPO object like here. GPO was succesful applied, but my add in wasn`t install. I have not found any warnings or errors in event viewer or Policy events in group policy results wizard. Maybe someone had similar issue?
Answer: Turn on MSI logging. Then run the package again. Just to see if the MSI actually actually ran. If the MSI log does not exist, then the MSI never launched. This is a good first step in problem-solving before deciding whether there is a problem in the actual MSI.
There are many ways to enable MSI logging. You can probably find in stack overflow or Microsoft. Here is one link - http://support.microsoft.com/kb/223300. Alternately you can enable in the launch command in msiexec or /v command line.

GPO installation (office add in)


Idiom for "totally watered down"

Question: Is there an idiom in English for cases where something is so watered down (figuratively or literally) to the point there is no substance left, just the "bare" water?
Comment: Homeopathed....
Comment: Watering something down can never, by itself, make it disappear. For nothing but water to be left, some other process would have to be involved, such as distillation.
Comment: People do use "totally" as an intensifier, often in circumstances where totality is out of the question - e.g. *I was totally exhausted*. Presumably that would mean "dead".
Comment: 'Hyperattenuated' already has a useful sense.
Comment: Obligitory [Monty Python](https://www.youtube.com/watch?v=JbxfFOdp-bY)  Not safe for work.
Answer: Something may be faded out, literally or figuratively.

fade out 1. PHRASAL VERB
When something fades out, it slowly becomes less noticeable or less
  important until it disappears completely. [Collins CoBuild]

.........

fade out ...
to diminish and go away altogether.  [McGraw-Hill Dictionary of
  American Idioms and Phrasal
  Verbs]

Macmillan licenses the transitive usage:

fade out  [PHRASAL VERB] intransitive/transitive ...
Answer: Actually, "Homeopathed" isn't that far off.  In theory a "homeopathic" preparation is one where the original drug/herb/whatever is so diluted that there may not even be a single molecule of the stuff in the resulting preparation.  The argument is that the water "remembers" the presence of the stuff, even after it's gone.
Comment: But the verb doesn't exist. In almost 71 years in the American Southwest, there's been a drought of 'homeopathed'.
Answer: You've so phrased your question that it conveys more than one interpretation. In Chemestry you might be looking for the word "solution" or "dissolved"?

solution a liquid mixture in which the minor component (the solute) is uniformly distributed within the major component (the solvent).
dissolve (with reference to a solid) become or cause to become incorporated into a liquid so as to form a solution.

and, therefore, you often see only the major component.
Comment: A solution of something can be highly concentrated; the OP seems to be seeking a term for a very weak solution.

Idiom for "totally watered down"


Is it possible to make money from futures premium decay?

Question: A futures premium decays as expiration nears (eg contango). Say I short West Texas Intermediate (WTI) crude oil futures. If the spot price has even odds of going up or down, do I (on average) profit through premium decay? Or is that not counted if you're shorting?
Comment: Yes there is, contango...
Comment: Do you mean options on futures? There is no premium in futures.
Answer: As Drew mentioned in the comments above, "there is no premium in futures." The higher forward price is representative of things like cost of capital, insurance, storage, etc.
The most pure example I can think of would be on S&P futures (due to high liquidity and lack of insurance/storage considerations):
<code>Spot - $3140
1 mo future - $3144.25

You sell the futures contract and wait 1 month with no movement in the S&P.
You will have made $4.25 (times the contract multiplier, removed here for simplicity.)
</code>
However, the way to look at this is that the buyer of the contract essentially 'borrowed' money from you at the risk free rate of ~1.62%.
Now extrapolate that concept to oil where there are extra costs associated with the physical good that you would essentially be lending the purchaser of the contract funds for. (Since they are not paying for it now, but some time in the future thanks to your contract.)
So, in short, on average you come out exactly even.
Comment: "So, in short, on average you come out exactly even." - this is a very confident statement for an answer that doesn't even begin to look at any data!
Comment: For example, I don't think anyone would dispute that you expect to make money on average by going long S&P 500 futures, or short VIX futures.
Comment: The point I'm trying to make is that the theorem of no-arbitrage true in futures. There is no average gain or average loss. This isn't an answer of specific data, but of principal.
Comment: You're confused - the no arbitrage principle applied to futures says that you cannot make a risk-free profit by selling futures and buying spot, or vice-versa. That has nothing to do with whether you expect to make a profit by buying or selling futures based on the sign of the basis (i.e. without the spot leg) which is a question that needs data to answer it.
Comment: Perhaps we interpret the question differently then. I see that you are probably correct in your interpretation of @user43510's ask, whereby he/she is looking for average absolute return without consideration of the spot leg. I agree that data would need to be present in order to actually answer that version. I also would not feel comfortable providing research/data on the topic. Not to mention that if I found an arbitrage opportunity for average gain in said research, I would not share it here. :)


Are social media websites a security risk? If yes, how do we go about making them safer for users?

Question: Generally speaking, I'm looking at a business environment. I know that Facebook Ads are not vetted and can contain malware, also users can share files on some social media sites. But what else is there? And are there any practical solutions to these problems?
Comment: Its difficult to say, I can say yes it is a security risk I often like to refer to facebook as "the hackers database" as its a perfect point to start with any social engineering, why go through peoples trash and spend hours researching someone when they have facebook? Any idiot will post on facebook their pets, family, birthdays, old schools, pictures, friends, likes, dislikes. You might as well just tell me your password? trail through their posts and you will most likely find their email or phone numbers..
Comment: Yes social media websites are a security risk.  They are abused more due to the popularity and the masses that are on the service.

The real question comes down to your environment.  If your information and data is of extreme sensitive nature, they should be all blocked.

Let users use there phones and there own cellular network.

If you are going to allow it at work, users must be trained on spoofing, hyperlinks, spearfishing,  what an executable file is etc, and be added to a white list per managements approval to allow past the firewall.
Answer: As you said, the main threats on Facebook are the ads and malicious links/files users can share between each other. In terms of Ads, you can use an ad-blocker such as uBlock Origin or AdBlock, which as the name suggest will remove any side-bar ads.
In terms of not clicking malicious/suspicious links, well, that's down to the user, as long as they are well informed then there's not too much else you can do - it's assumed they don't open spam e-mails and click those links, so perhaps explain to your users that they should treat suspicious Facebook links in the same manner.
As already mentioned, the real, and perhaps most dangerous threat is one that you cannot prevent or guard your users against, which is social engineering. It helps to keep your private life private but unfortunately not everyone considers that, which makes Facebook a real goldmine for anyone with time on their hands and a malicious intent.


Help for Batch Apex Running

Question: I want to know how to bypass the trigger in Batch apex code.Actually problem is when we are trying to run the batch apex we are facing some errors i think some triggers are firing.Please help me to stop the triggers when batch is running. Please check my below BatchApex class.
Comment: Did you remove your code from your post for a reason? You should at least include a self contained example, for answer's to use for reference.
Comment: Why wouldn't you want triggers to run in a batch?
Answer: You have two options:

To stop triggers from running during ALL batch contacts add
if(system.isBatch()) return;

to your triggers. NOTE This is the hammer method and will stop any trigger with this from running during ANY batch job.
2. Find out where the errors are and fix them. The issue is not that the batch is running it is that the triggers/code is not written properly
You could also add a static property in the batch you provided and for the problematic trigger check that variable and not run if set to true.
Comment: @Siva - Maybe someone else will be able to help you hack this in. I do not wish to perpetuate the problem by providing an out. You really need to review the code causing the issue and resolve it there. Bypassing the trigger just because it is not working properly is not the best practice. And without knowing your entire instance any direct solution I could provide could have dangerous side effects to the business
Comment: please check below bit of code

Help for Batch Apex Running


Google maps MarkerManager containsPoint() method use?

Question: i am using a marker Manager to display the markers on the map at different zoom level.. here i am displaying only the markers with in the bounds of the viewport when the user pans the map dynamically it sends ajax request and adds markers to the markermanager .It is working fine but what i want from marker manager is it should only allow us to push unique marker points to the markerManager class ...can anyone give me the suggestions?
Answer: I'm not familiar with MarkManager but I'm pretty sure you can use the Proxy Pattern detailed here on the jQuery website http://docs.jquery.com/Types#Proxy%5FPattern so you can intercept calls to MarkManager functions
Comment: as i am using prototype in my project...can u suggest in this library?


"Neandertal"? Have English-speaking scientists now adopted the modern spelling?

Question: In the 19th century the name of the valley in Germany was spelled "Neanderthal", and now it seems to be "Neandertal", with exactly the same pronunciation.  But as far as I knew before tonight, the name of the extinct species was always "Neanderthal" when writing in English.  But now I find this article.  Have Anglophone scientists now finally adopted the modern spelling?  And in English, this might change the pronunciation.  Is that happening too?  What's the story behind all this?
Comment: In common usage I think the 'th' spelling still prevails. In fact I often don't hear it pronounced as anything other than 'nɪˈandəθəl.' However, the OED also lists another British pronunciation as 'nɪˈandətɑːl.'
Comment: The common spelling is with a 'th'. The correct pronunciation is /tʰ/ (aspirated alveolar stop). Keep in mind the author of the linked article is a "contributing correspondent," not a researcher. Source: I am an anthropologist.
Answer: According to the Grammarist both spellings are correct but the original one "Neanderthal" still remains the more common:

Neanderthal is the more common spelling of the noun denoting the species of robust humanlike creatures that went extinct around 30,000 years ago. Neandertal is preferred by a few scientific publications.

Neanderthal, the original spelling, was derived from the German valley where Neanderthal fossils were first discovered in the 19th century. In 1901, however, the German name of the valley was officially changed to Neandertal. Some scientists and scientific publications have extended the change to the name of the species. Most have not.

Nonscientific publications show a similar trend. Neanderthal is preferred, but Neandertal appears about a quarter of the time  Neither spelling is inherently correct or incorrect, but some scientists do have strong feelings on the matter. If you're writing for a professor, find out what he or she prefers.

Also Ngram shows a clear preference in usage for Neanderthal.


PHP using prefix tags to linkify text

Question: I'm trying to write a code library for my own personal use and I'm trying to come up with a solution to linkify URLs and mail links. I was originally going to go with a regex statement to transform URLs and mail addresses to links but was worried about covering all the bases. So my current thinking is perhaps use some kind of tag system like this:
l:www.google.com becomes http://www.google.com and where m:firstname.lastname@example.com becomes firstname.lastname@example.com.
What do you think of this solution and can you assist with the expression? (REGEX is not my strong point). Any help would be appreciated.
Answer: Maybe some regex like this :
<code>$content = "l:www.google.com some text m:email@example.com some text";
$pattern = '/([a-z])\:([^\s]+)/'; // One caracter followed by ':' and everything who goes next to the ':' which is not a space or tab
if (preg_match_all($pattern, $content, $results))
{
    foreach ($results[0] as $key => $result)
    {
        // $result is the whole matched expression like 'l:www.google.com'
        $letter = $results[1][$key];
        $content = $results[2][$key];

        echo $letter . ' ' . $content . '<br/>';
        // You can put str_replace here
    }
}
</code>
Comment: Thanks I will have to test this when I actually get some time :-)
Comment: I don't understand why you chose this particular method, would something like preg_replace("/l\:([^\s]+)/", "$1", $string) be better? I'm thinking '^\s' is a string that is terminated by a white space character?
Comment: Yes, but you want to do something like `m:email@example.com` and transform it to a mailto, so you need to get the first letter too. and `[^\s]+` is a string without blank caracter (\s) (space, tab, line feed, etc...).
Comment: I didn't use this solution but it did lead me down another way of thinking--so I'm going to consider this closed. Thanks.

PHP using prefix tags to linkify text


Printing Image from Document Library

Question: I am attempting to print an image from a picture library. I have tried the following methods:

click the thumbnail to display the full image in the browser.  Use the browser print function. This method does not shrink the image to fit on a single page even though it has that option available in the menu for scaling size.
Using the Name menu, choosing Edit Document.  I get an error stating no compatible software is installed.  Yet, when I right-click on a .jpg file located on my desktop and choose Edit, the Microsoft Office Picture Manager software opens.

I would prefer to use option 2 as it would also give us the ability to edit the image as well as print it properly, but I'll take any method that will print the image on a single page no matter what the native image size actually is.
Thanks in advance for any assistance.
Answer: Use option 1 with Firefox as your browser. It has the option to shrink the image so that it fits on one page.

Printing Image from Document Library


Do actors get paid more for sexual/explicit scenes?

Question: Do actors that take part in nudity/sex scenes get paid more for those scenes? I would think for an ordinary person such scenes might impose a different level of discomfort and stress, so are those rewarded specially?
Answer: Generally this varies by actor or actress. Sex scenes get a very high level of negotiation, specifically detailing how much skin is shown, how long, what, when, etc. If they have a scene it's part of their negotiation.
Background actors (aka extras) tend not to be paid more. SAG rules and industry standards do not pay extra for nude extras. But one recent example of them being paid more was Westworld, which had an abnormally explicit basically X-Rated scene in October:

But extras on "Westworld" — as many as 50 of them — were said to have pocketed up to $600 for the steamy session because of the unprecedented amount of simulated sex the extras were being asked to perform, sources said.

Noted by another source:

Still, if any of those "assorted acts" verge on stunt work — as seems within the realm of possibility — the union contract may entitle the actor to be upgraded to principal performer, which brings with it residuals and a boost in pay.
The union agreement also requires additional payment when a background performer is asked to bring specified wardrobe. However, no additional payment is required when the performer is told to bring no clothing whatsoever.

An SAG background actor doing nudity wouldn't be paid more than normal. A nude body double though is supposed to get at least the principal performer day rate (funny enough, same stipulation as any extra that has a squib, an exploding blood back.)
In comparison, Adult Actresses do get paid more, the more explicit the scene, not including top performers.
Comment: Ironically, background actors DO get paid extra for being in water or getting rained on.  It's called a "wet bump". They also get paid extra for smoke. That one's called a "smoke bump".
Comment: While SAG doesn't **require** additional pay for background nudity, that doesn't mean they don't **get** it... if a production isn't managing to find people willing to be nude, they will likely pay more than SAG minimum. Remember, SAG rates are simply the least you **can** pay. You can always offer more.
Comment: Yea, the Westwood example is that. SAG wasn't requiring them to pay more than the standard rates, just that they couldn't require the extras to agree to it. First two links.


Is this email for toll violations from CVM (Citations and Violations Management) a scam?

Question: I got an email from CVM stating that I didn't pay a toll. I was told the bill was $106.  When I logged onto their website there was an administrative fee attached to it of $50 making the total $156.  I tried calling the number provided but nobody picked up.  I emailed them stating that I wanted to dispute the ticket but only received emails back stating that I needed to pay.  As I was traveling in California I did log onto THETOLLROADS.COM and pay my toll usage manually as was instructed by the car rental agency so that is what made me very skeptical of the email.  Anyway, I'm still trying to figure it out.  Anyone have any suggestions?
Comment: Who or what is "CVM?"
Comment: [This](https://www.bbb.org/us/ca/san-diego/profile/traffic-consultants/citation-violation-management-1126-172018630/customer-reviews) suggests it is a scam, where the rental company passes toll notices to a 3rd party company who tries to extort from you.
Comment: Welcome to the site! Could you upload a scan of said letter with personal details blacked out? This would help us give you a better answer. If not, would it be possible for you to add more details such as their website or phone number?
Answer: Car rental companies contract with private companies to collect tolls and tickets for traffic and parking violations.  There is commonly outrageous pricing related to this and the companies often have official sounding names.  For example, Avis/Budget uses Highway Toll Administration which has a official looking logo and official sounding name but is just a regular for-profit company.  CVM is just another of these companies.
It's possible whatever pre-payment you made for the rental vehicle didn't properly associate with your rental, or for whatever reason wasn't exactly correct, and now you're being billed & possibly fined for non-payment.  It's also possible the vehicle had a toll transponder which was billed and your payment didn't apply because it was based on the license plate.  If that's the case, you'll need to see if there are specific terms that cover this situation.
The bill from CVM should include information about specifically what you're being charged for so you should be able to confirm it matches whatever you actually drove.  Assuming it matches the time you had the rental car, the only way I can see getting out of the payment is if you can prove that you properly prepaid and successfully dispute the bill with the toll road operator (The Toll Roads of OC).
Answer: Cvmsd is a third party company that works with ace rent a car to scam you. They add an administration fee to the actual cost of your violation they scare you and lie to you for you to make the payment through their company. If you want to resolve this matter you need to call the toll company that you are being charged from and give them the liscense plate number to check what the actual violation cost is. You can pay them and keep proof of payment if you want . Tbh you don't even really need to pay jus leave it alone
Comment: Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).
Comment: I upvoted this answer because, though needing some improvement, it addresses the actual issue experienced by the OP.


Protective shell for Nikon 200-500 f5.6 lens?

Question: The Nikon 200-500 f/5.6 lens has a zoom mechanism that makes the lens physically longer or shorter depending on the zoom level, but is there an enclosure that will accommodate the lens across its entire zoom range? I understand this will make the unit the size of at least the lens's 500mm physical length, but I wanted to make the lens more weather proof as I'm not comfortable with water getting on the zoom mechanism at its full extension if I am shooting in rainy conditions.
Answer: I use a rainsleeve. But in really rainy weather a long zoom isn't very usable, think of all the water between you and the target.
Comment: true, but sometimes we're using long lenses in between downpours. Perhaps at a sporting event where you have to take the risk of being in the rain, especially in regions where rains are quick and frequent all day, with lots of opportunity for sunshine in between rains (which makes for some great shots, often).
Answer: Back around eight or nine years ago I bought two bags of OP/TECH 18" rainsleeves. There are two rainsleeves in each bag. The largest lens I use them with is a 70-200mm f/2.8 with plenty of length to spare. There are other sizes available, with the "mega' size for lenses up to 25" in length.

The front end of the rainsleeve has a drawstring that pulls tight around the lens hood and the back end is held in place by the way it wraps around the camera. As a lens is zoomed in and out the flexible plastic acts as a sort of bellows to adjust for the varying length.
They are inexpensive, but they hold up surprisingly well if proper care is taken when putting them on and taking them off the camera and lens. I've used the first two of them sporadically as needed, probably 2-4 times per year, usually on two cameras at the same time. The first two are still in great shape and protect my cameras/lenses from heavy rain when needed. They fold flat and take up almost no space when stored in my camera bag or when placed in one of my pockets if it looks like rain and I'm not carrying my bag with me.
I have yet to open the second bag.
There are many other similar products, some of which have larger 'tails' for use with tripods. I've never used these, so I can't say how well they'll hold up, but at these prices they are more or less disposable.

There are also many other rain covers that are supposed to be more "permanent" in a wide variety of designs in a very wide range of prices. But unless one also needs thermal protection, such as when shooting in extremely cold climates, or shoots outside for long hours daily and will use them fairly often, I don't see the point of spending so much on a rain cover when the cheap ones do just fine.
Answer: There is NOTHING worse than a plastic bag on anything, especially for condensation
If you can afford proper covers than I use these
https://www.thinktankphoto.com/collections/camera-rain-covers
And ignore anyone who says long lenses in the erain a not a good idea, as a sports photographer with a well known magazine I shoot in all weathers


is it possible to login on a remote machine when the ssh service has been stopped?

Question: i have the root password for a machine in the lab. the ssh service has been stopped on the machine. is it possible to login to the machine. this is not for doing any damage. i have physical access to the machine. just to test if it is possible.
Answer: When a service is "stopped", it does mean that "it doesn't run".
So except if you have another application that can be used to login (telnet, X Windows, rsh) you will have to go in front of the screen/console and start the service (or ask someone to do it for you).
Comment: X windows is running
Comment: how do i use x server to log on to that machine.
Answer: Yes, If telnet is there, its possible to login to that box using it even when ssh is not available. Try using putty to connect using telnet. The default port for telent is 23. If you use putty, it will show default ports whenever you select an option.
If telnet is not there, you can see if rlogin is there. The default port to connect to is 513. The remote machine should be running a rlogind daemon for this to work.
Comment: what port should i connect to?
Comment: i am on a linux machine, but putty is for windows.
Comment: it is 23. check my edited answer
Comment: putty is there for both. For unix you need to build from source. Please check the link i mentioned in the answer
Comment: telnet is not running on that machine.
Comment: also on most linux flavours you can just "telnet $IP_ADDRESS" and it'll telnet there - no need to build putty from source.
Answer:
X windows is running
  how do i use x server to log on to that machine.

There's only a very small chance you can. Just running X is not enough; it also needs to have been configured to allow remote login (such as XDMCP). And any firewall or router needs to have the ports configured well (TCP 6000-6005 for X11, UDP 177 for XDMCP, and optionally TCP 7100 for the xfs font server), for otherwise it will only work using ssh -Y after all. A sane administrator would probably only allow access through SSH anyway.
But, you could try Xephyr (or the older Xnest, or XWin.exe in Cygwin), using something like:
Xephyr :1 -query name-or-ip-of-remote-machine
XWin.exe -query name-or-ip-of-remote-machine
As you actually do have physical access, you might be able to set up the machine to your needs, but I assume setting up some VCN to some existing GNOME or KDE session is easier. Or set up something like monit to auto restart SSH when it dies. (See Monit: Monitor SSHD Server and Auto Restart SSH If It Does Not Respond, and to install use something like sudo apt-get install monit if applicable.)
Comment: i get it now. i have to physically make some changes to the machine. if telnet, xdmcp etc are not configured.
Comment: Yes, or better yet, make SSH auto-restart using `monit`: http://www.cyberciti.biz/faq/monit-sshd-server-configuration/
Answer: Other login possibilities include:

telnet
rsh
rdesktop
xrdp
vnc

Another possibility is to use ftp. It can be tedious, but if you can manipulate the filesystem, you might fix the problem.
Answer: If you can't figure how to log into the x server
type ctrl-alt-f1 and log into the console there
Comment: Ctrl-Alt-F1 on the *remote* machine, that is, to which you have physical access. So, no "@.." part.
Comment: there i get the localhost login prompt. when i try root@ipaddress and password, it says login incorrect.


How to find out which key was used for public key authentication?

Question: Several developers using a shared account on a test server, using public key authentication.
Is there any way to find out which key was used for authentication (e.g. the keys comment)?
Answer: Are you wanting to find this out after something that has already happened (forensics) or are you wanting to make it so that you can log who does what?
For forensics: On my Fedora system, /var/log/secure contains records of each public key authentication and username, but doesn't say which key was used. You're probably out of luck here
For future auditability: You can use the authorized_keys file to set the commands each login is restricted to, and then run a program that logs the authentication (and possibly subsequent commands, using something like sudoscript):

If the options phrase at the beginning of a line contains the keyword command="string", then any ssh connection that authenticates using that particular key will only run the command specified, even if the command line it was given specified another command.

It must be said though, it probably makes more sense to set up multiple accounts, and then set up a shared access area...
Comment: Thank you for your answer.
Fortunately I need it for the future.
Will this command run instead of the login shell?
How can I find out which login shell is configured for the user and launch that after doing the key specific stuff?
Comment: A trivial bit of `getent` and `cut` will solve that for you.
Comment: Yes it will run instead of the login shell - and womble's answer should help you there: `getent passwd $USER | cut -d: -f 7`
Answer:
...using a shared account...

Thanks for giving us a perfect example to point to when explaining why this is a bad idea. ;-)
Seriously though, want you want cannot be done afaik. And if by "keys comment" you mean the comment that is in the id_rsa file after the key, that's a no-go too. It is a comment, it is not sent to the server on the other side.
Really. Set up multiple accounts.
Comment: Its not ok to switch to multiple accounts.
Please check the linked comment for a secure shared account setup:
http://serverfault.com/questions/14012/is-ssh-logging-capabilities-equivalent-to-su-logging-for-private-public-key-authe/14062#14062
Comment: That comment says how to do some extra secure stuff with AuthorizedKeys, not with at shared account.
Answer: If you set sshd to log at a verbose enough level, the fingerprint of the key used to login is printed.  Fills your logs awfully fast, though.
Answer: For auditability and if your people are using ssh-agent, you could put this in your .bashrc:
SSH_KEY_NAME=$(ssh-add -L | cut -d' ' -f 3 || 'unknown')
if [[ ! $SSH_KEY_NAME ]]; then SSH_KEY_NAME="no agent"; fi
echo `/bin/date` $SSH_KEY_NAME >> ~/.login.log


Should I take turns during a skill challenge?

Question: I'm trying to use 4e's skill challenges in Pathfinder, but I have a question: should I ask my player to roll for initiative and take turns to Win the challenge, or just the best PCs should play it?
Answer: As others have said, it's mostly personal preference. One of the problems with 4e's take on skill challenges is that it doesn't always give equal screen time to each PC.
In the early drafts of 13th Age and in some of the 13th Age organized play documents, they have a concept called the "montage" in which, during travel scenes, investigation scenes, or exploration scenes players describe a challenge they faced and a way they were able to get past the challenge. It takes place around the table.
I'd probably combine these two ideas and go around the table. It's faster than rolling initiative and gives each player some screen-time. Each result can lead to the next scene and so on. This also helps ensure you "fail forward" and not have a bad roll lead to a simple failure but instead to an interesting if difficult resulting situation.
Answer: Depends on the level of involvement and whether it makes sense in the fiction they would be going in order.
For instance social skill challenges might not make sense since not everyone can meaningfully contribute. A physical skill challenge that is required due to impending doom? That might make more sense to keep organized.
Comment: I dont jump into conversations outside my area of expertise unless I can add things to it. Why would a social event ingame be different? If there are skill challenges that only challenge a small subset of the group...try and gear other ones to get the others involved, or give them some other concern to worry about.
Comment: Still, should everyone act or just the PCs that suit the situation?
Answer: Having played a number of 4e Skill Challenges under Living Forgotten Realms, in many different ways, I can say I've seen different DMs do both.
Some DMs just let whoever is best at a task go for it, particularly when the challenge at hand only has a narrow set of skills available.
Other DMs don't want any one player to hog the spotlight, especially when the challenge allows a wide array of skills, and so will just go around the table one at a time, rather than roll Initiative.


Why is it only electrons that take part in chemical reactions?

Question: I learnt that only electrons take part in chemical reactions and the protons do nothing (neutrons are electrically neutral, so they do nothing). Why is this so if the protons are positively charged and without them, electrons in the other atom won't be attracted (and since electrons are like charges I do not think they would interact with each other)?
Comment: It is wrong to say that protons do nothing. Take just a bunch of electrons without any protons, and you won't have any chemistry.
Comment: Well, it's often better idea to describe acid base reaction as transfer of proton (H+ cation).
Comment: All those protons in a nucleus have a little influence over what electrons want to do around them...
Answer: The nature of an electron is more complex than a single charged particle. Once you get down to the quantum level, our intuition about how matter interacts with other matter fails.
A simple answer to your question is that electrons occupy a much larger volume than nuclei. When two atoms get in close proximity to one another, their electrons will "bump into one another" and interact far before their nuclei will.
You are also correct that the nucleus of a neighboring atom is essential for the electrons to interact with one another. If there was no positive charge to attract another electron, a bond would not be formed. The point your instructor was trying to get across is that in most (excluding nuclear reactions) chemical reactions, electrons are the species moving around and forming/breaking bonds.
If you would like a more in-depth discussion on the true quantum nature of electrons and their interactions, you should check out Mulliken's Nobel Lecture from 1966. It is a great introduction.
Comment: link is dead @Vice Chemistr
Answer: Because chemistry is all about bonds and bonds are made from electrons
A reasonable definition of chemistry is the science of how substances change and react. Most of those changes and interactions are caused by changes in bonds (rearrangements,breaking and forming new bonds). So, since most chemistry is about what happens to bonds, most chemistry is about electrons.
But the number of electrons and the way they organise themselves in space is determined by the nuclear charges in the atoms involved in the bond(s). It isn't that protons are not relevant to the bonds, but they don't get close or involved when the electrons are rearranging themselves in chemical reactions.
And electrons do interact with each other not least because of the Pauli interactions that prevent more than two electrons occupying an orbital (orbitals are a way of describing the cloudy electron distribution in space and bonds are, to oversimplify a little, made from orbitals that span more then one atom).
In an atom, electrons also occupy orbitals and fill them up as more are added to a "naked" atom in order of the energy levels. Higher energy orbitals tend to be further from the nucleus than the lowest energy ones but electron interactions of a different sort matter here too as the "lower" orbitals shield the higher ones from some of the electric charge in the nucleus. Molecules are a bit more complicated, but the shielding still matters. Most chemistry happens with the outer orbitals/electrons and the inner ones in one sense "protect" the nucleus from any of the chemistry that is happening as electrons skip about to break or create bonds.
Also, in spatial terms, most of the "action" is happening a long way away from the nucleii, so they mind their own business and don't get involved.
Comment: "since most chemistry is about what happens to bonds" is it actually the _premise_ or the _conclusion_? I mean to say, one could always ask, why do only electrons form bonds in the first place?


Mapping homotopic to the identity map has a fixed point

Question: Suppose $\phi:\mathbb{S}^2\to\mathbb{S}^2$ is a mapping, homotopic to the identity map.  Show that there is a fixed point $\phi(p)=p$.
Answer: Have you seen homology and degree of continuous mappings? If so, this is pretty short:
Since $f$ is homotopic to the identity, $\deg f = \deg \text{id}_{S^2} = +1$. On the other hand, if a continuous map $g:S^n\to S^n$ has no fixed points, then $\deg g = (-1)^{n+1}$. This shows that $f$ must have a fixed point, since otherwise $\deg f = (-1)^{2+1} = -1$.
Alternatively, you can prove that any map $S^n\to S^n$ with no fixed point is homotopic to the antipodal map. (This is used to prove the statement about $g$ in the previous proof.) Note that if $f$ has no fixed points, then $$h(x, t) = (1-t)f(x)-tx$$ is nonzero, so $h(x,t)/|h(x,t)|$ defines a homotopy from $f$ to the antipodal map. (This proof is in Hatcher, Algebraic Topology, section 2.2.) And the antipodal map is homotopic to the identity if and only if $n$ is odd, so this proves the claim by contraposition.
Answer: Alternatively, this follows from the Lefschetz fixed point theorem. As $\phi$ is homotopic to the identity map, the Lefschetz number of $\phi$ is just the Euler characteristic of $S^2$, which is 2. As $2 \neq 0$, it follows that $\phi$ has at least one fixed point.
Answer: Here is an idea: for each point $p \in S^2$, let $v_p$ be the result of orthogonally projecting $\phi(p)-p \in \mathbb{R}^3$ onto the tangent plane at $p$. If $\phi$ has no fixed point, this would given an everywhere nonzero continuous section of the projection $T(S^2) \to S^2$, which we know can't exist ("hairy ball theorem").
Edit: Of course the idea above is botched, as Harald pointed out. A possibly flaky second idea is to consider a homotopy $H(t, -)$ from $\phi$ to the identity. Assume that $\phi$ has no fixed point. For each $p$, let $t(p)$ be the least $t$ such that $\|H(t, p) - p\| = (1/2)\|\phi(p)-p\|$. Then define $\psi(p) = H(t(p), p)$. This $\psi$ has no fixed point either, and $\psi(p)$ is never antipodal to $p$. The remaining thing to check is that $p \mapsto t(p)$ is continuous.
Comment: I had that thought too, but it breaks down if $\phi(p)$ is antipodal to $p$.
Comment: @HaraldHanche-Olsen Thanks! I tried a second idea, and I invite you to poke a hole in it. :-)


How to save a Java FloatBuffer (or any Buffer) to a file

Question: I have a FloatBuffer of known size and just want to dump the data to a file (in binary) for inspection outside my app. What's the easiest way to do this?
Answer: UPDATE FOR BINARY OUTPUT:
// There are dependencies on how you create your floatbuffer for this to work
// I suggest starting with a byte buffer and using asFloatBuffer() when
// you need it as floats.
// ByteBuffer b = ByteBuffer.allocate(somesize);
// FloatBuffer fb = b.asFloatBuffer();
// There will also be endiance issues when you write binary since
// java is big-endian. You can adjust this with Buffer.order(...)
// b.order(ByteOrder.LITTLE_ENDIAN)
// If you're using a hex-editor you'll probably want little endian output
// since most consumer machines (unless you've got a sparc / old mac) are little

FileOutputStream fos = new FileOutputStream("some_binary_output_file_name");
FileChannel channel = fos.getChannel();

channel.write(byteBufferBackingYourFloatBuffer);

fos.close();

TEXT OUTPUT:
Since you want this to be viewable I assume you want a text file. You'll want to use a PrintStream.
// Try-catch omitted for simplicity

PrintStream ps = new PrintStream("some_output_file.txt");
for(int i = 0; i < yourFloatBuffer.capacity(); i++)
{
   // put each float on one line
   // use printf to get fancy (decimal places, etc)
   ps.println(yourFloagBuffer.get(i));
}

ps.close();

Didn't have time to post a full raw/binary (non-text) version of this. If you want to do that use a FileOutputStream, get the FileChannel, and directly write the FloatBuffer (since it's a ByteBuffer)
Comment: Thanks, although actually I did want to write it all out in binary. Sorry to not be specific about that, I'll update the question.
Answer: Asusming you want the data as binary:
Start with a ByteBuffer. Call asFloatBuffer to get your FloatBuffer. When you've finished doing your stuff, save the ByteBuffer out to a WritableByteChannel.
If you already have FloatBuffer it can be copied into the buffer from step 2 with a put.
A low performance but easier way would be to use Float.floatToIntBit.
(Watch for endianess, obviously.)
Answer: This iterates through the array backed by your buffer and outputs each float.  Just replace the text file and floatBuffer with your own parameters.
PrintStream out = new PrintStream("target.txt");
for(float f : floatBuffer.array()){
  out.println(f);
}
out.close();


What are the tools needed to produce good quality videos on Youtube?

Question: I always see good videos on Youtube. I mean that they are good in quality and in the presentation. So, what are the tools or programs which helps in that?
Comment: Welcome to AVP!  This is a very broad question.  As it is currently written, it may be put on hold for being too broad.  Please take a look at the [help section for tips on writing a good question](http://avp.stackexchange.com/help/how-to-ask).
Answer: What you need is no different from what you need for any video production effort.  You need a decent camera and camera work, which likely involves a decent tripod, decent lighting, decent scripting, decent acting, decent editing and decent compression.
The camera and camera work ensure that the video is clear and that it isn't distractingly shaky and that angles and shot composition look good.  Decent lighting ensures that the camera can get good color and that there aren't weird or distracting shadows and helps things look pleasing to the eye.
A very wide variety of cameras could do the job, starting with cameras like entry level DSLR video or cameras like the GoPro.  Lighting can be done with any set of similar type lights, though specifically made studio lights will output the whitest light which is helpful for filming, but isn't a necessary expense for starting out.  It is important to make sure the color of the lights match though or you will get weird looking issues.
Decent scripting and acting ensure that there is interesting content that is well performed.  Decent editing ensures that the source material is pieced together in a way that flows nicely and tells the story that is visually interesting and properly paced.
Editing generally is done with a piece of software known as a non-linear editor or NLE for short.  Adobe Premiere Pro is a popular NLE, though in a pinch, cheaper alternatives can be used to produce satisfactory results, though they are generally more difficult to work with.
Finally, decent compression of the final video ensures that it looks good on Youtube, even at the limited file sizes that Youtube displays.  This simply involves the use of a video compression software.  Many good NLEs include a video transcoding and compression package (such as Adobe Media Encoder) and there are also free ones available, such as FFMPEG.  VBR 2 pass, H.264 is the general compression of choice for Youtube, but some fine tuning of the bitrate, resolution and keyframe interval can make a big difference on the overall quality of the video.
Overall, to pull off a top notch video requires a fair bit of preparation, gear, knowledge and experience and it isn't going to be possible to detail everything you need to know in a single question and answer, but hopefully this gives you an idea of the key components involved in the process of making such a video.


The healing of Aloe plant

Question: Our daughter has stabbed the aloe plant about three different times on each stem with a pen.. will it heal itself ? I don't know how she got the time or what she was thinking but each stem has little holes in it & I need to know if there is something I can do to save it or not
Answer: Yes, if left alone they will heal.  You will always be able to see the scar, but they will heal.  Just like a cut in a human it takes a little time, but not that long. Make sure you keep them clean and avoid getting any water near the damaged parts.   Also like a human, a cut can later lead to a infection, but that is unlikely.

The healing of Aloe plant


How to create a pile of tokens like this?

Question:
Hello,
I am new to graphics design and this is my first post here.
I would like to create an image as this one below. I have already made a nice logo with text, the sunburst effect and ...
Now, what I want is to create the pile of tokens. What can I do? Can I use a 3d software such as blender (model, texture a token, and then duplicate it) to make the pile or is there an easy way to do this with photoshop?
Your help is really in need.
Thank you very much ..!!!!!!
Comment: This question is waaaay too broad.  To answer your question, yes. You can create the tokens with any method you listed...and then some
Answer: You can create the tokens/coins by setting up a custom brush. I would recommend doing this in Illustrator as a custom scatter brush because doing so gives you more flexibility in creating and modifying your artwork. In Illustrator, each coin is "painted" by the brush tool as a separate object and can easily be modified as a group and then expanded and further edited individually. In Photoshop the coins would be painted on a single layer which can make it more challenging to separate and edit.
Here's how to create a custom scatter brush in Illustrator...

Create/draw a token/coin (group any separate elements together), then open the Brushes panel.

Select the coin art and drag it onto the Brushes panel.
When the New Brush dialog appears, select Scatter Brush.
In the Scatter Brush Options dialog, name the brush and use the following settings (click OK when done):
size: fixed
spacing: fixed
scatter: fixed
rotation: random; -29 degrees / 32 degrees (adjust this until you like it)

The custom scatter brush will appear in the Brushes panel.

To add variety, follow steps 1-5 to create additional versions of the coin. In the second version I repositioned the dollar symbol and set the brush rotation to -38 degrees / 50 degrees, to make the dollar symbol differ from the first coin.

Using the Brush tool, switch between your different custom scatter brushes and paint the tokens/coins. Each object will be created as a separate object that can be individually moved and arranged. If you want to edit the individual coins (to adjust shape, add color, alter the symbol, etc.), you'll need to Expand Appearance, then make the edits.