Will I know if my attack is modified by monster vulnerability, resistance or immunity?

Question: In Dungeons and Dragons 5th edition, when my character successfully hits a monster in combat, does the GM have to tell me whether the attack deals the usual amount of damage or not? If the monster has vulnerability, resistance or immunity to the type of damage I am dealing, is the GM obligated to tell me?
Answer: GM is not obligated but should in my opinion provide ample opportunity for the players to gather that information. A creature that is vulnerable or immune to something will react differently and this should be reflected in the descriptions given by the GM.
Examples: A Vampire shying away from sunlight, or a Troll suddenly being more cautious against the fighter with the flaming sword, a Salamander wading unhindered through the Wall of Fire as though it was fresh air to it.
Passive Perception (or in some cases Insight) should pick up a bit of this in my opinion depending on distractions but sometimes I wait for a player to declare their character looks for these things and sometimes I don't even require a roll. Table mileage varies and I would not expect to notice things on the first hit or in the first round.
Comment: "It's super effective!"
Answer: The DM is obliged to tell you
This obligation arises from the How to Play section on p.6 of the PHB, that is, the most fundamental rule in the book:

3. The DM narrates the results of the adventurers' actions.

The player has scored a hit for a known amount of damage (from the dice they rolled and their modifiers): "the results of the adventurers' actions" is different if the monster has vulnerability, resistance or immunity to the damage than if they do not and the DM is obliged to communicate that difference to the player.
How that communication takes place is up to the individual table DM: some will straight out tell the player's that the monster is vulnerable/resistant/immune and others will describe the effects ("Your blow does more/less/no damage than you expected" smart players will twig pretty quick). However they do it, it is important that they do do it.
Why it is important is simple: the sole source of information about the world comes from the DM. The players need that information so that they can make informed decisions (like switching to a different damage type). This is not to say that the players should get information their character's don't know or can't perceive, however, following a successful attack the effects of the hit are neither.
Comment: The effect of the damage is the amount of damage done. Seasoned adventurers would recognize the difference between a more effective and less effective attack without an active check. Example: If I was fighting an Orc Skeleton that was vulnerable to bludgeoning, this would be revealed when I very easily shattered most of the bones with a club, instead of requiring several more hits that would normally be required against a regular Orc. I would also argue that you'll notice something immune to an effect takes no noticeable damage at all from it, like a werewolf.
Comment: Comments removed, DV removed.  The point starting your last paragraph is (to my eye) probably the most important part of your answer in terms of supporting why the DM needs to fold perceivable information into the narrative.
Answer: No
The GM is not "obligated" to do anything.
Ideally they would describe the hits as somehow dealing less damage than usual, or having no effect, to help properly reflect the game world to you.  "Your arrows stick into the skeleton but don't appear to do much damage or impede it in any way." But unless you have an ability to actively detect the source of that issue, you don't know what it is - a spell?  Resistance? You don't know, you'll have to reason based on the information you do have (try different weapons, etc.).
Comment: I'm not knocking that Korvin. I'm just pointing out that resistances and vulnerabilities are readily apparent AFTER you've hit them with something. For example, if I swing my sword at an adamantine golem, I will very loudly proclaim," Weapons are having no effect on this thing!" as it bounces off harmlessly. By the same token, if I notice that acid is fixing the previously damage clay golem, I'm going to stop casting acid based spells at it. These aren't active check requirements because they should be readily apparent AFTER you've made an attack that reveals them.
Comment: I have elaborated, but I am saying yes, the DM would do some description, but is not obligated to tell "amount of damage done" or why it's reduced; this confuses game fiction with game rules.
Comment: This doesn't make any sense. "Hmmmm, that's 4 fireballs but the red dragon didn't flinch even once. Maybe it's just really strong?" The game is about seasoned adventurers. They would be able to recognize the difference between effective, ineffective, and no effect with various attacks. Based on the way this answer is worded, you wouldn't be able to experiment to detect strengths and weaknesses, which to me doesn't make any sense at all.
Comment: @LinoFrankCiaralli Depending on what table the game is played at, the DM may make more use of the need to use insight, lore, aracna, history, etc checks to represent the characters either knowing from having spent their lives in world, and hearing legends/teachings, or finding things out as they examine or uncover them during play.  "Seasoned adventurers" probably, in the 5e system, don't start being who the players characters are until the Tier II of adventuring (Levels 5-10).
Answer: The DM is obligated to describe what the character perceives. A level 1 adventurer is by no means "seasoned". Tagram the Great, also known as Tagram the Just, the Kraken Slayer, is not actually experienced in how to slay a kraken when he begins his adventures. You darned well cannot tell the difference between your arrow bouncing off of strong armor, or doing 1 instead of 2 damage because of damage resistance, on a monster with 300 hit points......unless you are VERY observant. Now, if a red dragon smiles when you hit it for 100 points of fire damage right after it winced at 10 points of slashing...then sure, a "seasoned" adventurer would notice that. But would a rage-filled level 15 barbarian notice that his flaming sword didn't do 2 extra points instead of just 20? These are issues for a DM to decide, not a question he's obligated to answer in a particular way. My suggestion would be to figure out an appropriate perception check DC...and drop hints to prompt requested perception checks if that DC is above passive.
Answer: The DM isn't obligated to be overt, but a good DM will give hints
First we need to recognize rule 0. The rules serve the DM and the story, not the other way around, so the DM isn't actually obligated to do anything in particular, they can shape and adjust the game however they want.
While RAW does say the DM will narrate the results of players actions (to a greater or lesser degree depending on the play group and DM's style), but this doesn't obligate the DM to be clear about how much damage an attack actually does.
That being said the DM should give some idea of some of the vulnerabilities and resistances of creatures in the game as players discover them, but just how clear that is depends on what the damage modification is and what type of damage. These should be pretty logical, like these examples of the extremes:

Immunity: a creature being immune to slashing or piercing damage should be pretty obvious - arrows bounding off their hide, blades refusing to cut, or wounds that close as soon as the blade moves through is harder to miss than a lack of bruising you couldn't even see under armor or clothing or fur from immunity to bludgeoning or force damage.

Vulnerability: bludgeoning vulnerability can be reflected as broken bones which is going to be a lot more clear (particularly in undead where the bones are often visible) than heavier bleeding from vulnerability to slashing, and most things react poorly to fire, unless they are immune - vulnerability might not make creatures react any differently to being burned than normal fire damage.
Answer: No
The DM has no such obligation.  However (and this varies with style), the experience of the character should be considered when describing such things.  For example, the conclusions drawn by a 16th level barbarian from the impact of his axe swing may be much more on-target than those drawn by a fresh level-one character who has barely ever hit anything with his axe.  I would also encourage secret-roll use of skill checks like Perception, Nature or the-like to inform you about what you would share.  Set DCs based on the experience of the character as well as how obvious the damage resistance might seem / be (example: slashing through a water elemental).  Also note how dim light or other (hazy?) conditions might hamper a character's ability to discern the effects of their attacks. This first-level character might be able to discern that the fire did less damage to his target than the well-seasoned variety that has slung his spell in the fog ...


How to figure out if someone has been using TeamViewer 8 to access my computer when I was not here?

Question: I came to my computer today and have not been here since monday afternoon. I am using windows 7. There were some error messages showing even on the log in screen about memory violations done by spotify and one more (I can't remember), and I just clicked them away, even though it is not normal on my PC. Sometimes it freezes on the login screen and I have to reboot, but this was different. But I did not take a note of the messages as I just didn't care.
After logging in, I noticed that my Teamviewer client was running (the GUI was showing). I thought this was odd, since I haven't been using it lately. I was a bit curious, so I checked the log. I will not include it here, as I don't know how to read it and I do not know what could identify me. It seems that it was an update leading to this, but I am not sure. Probably, but I don't like the fact that the GUI was showing with my ID and password showing. They could have silently updated it or have given me a message...
So, this leads me to the question: How to figure out if someone has been using TeamViewer 8 to access my computer when I was not here? What to look for in logs and perhaps the Windows 7 event logs? And a bonus Q: Is it safe to have TeamViewer 8 running in the background at all?
Comment: If you can pull it off one of the best security things you can do with TeamViewer is under the Advanced options change the "connections to this computer" setting from full access to "confirm all". This will require that someone is sitting at the computer in order for TeamViewer to allow any inbound access. Failing that if you only connect to your computer from one or two remote systems there is a blacklist / whitelist option which you can use to restrict only certain TeamViewer IDs to.
Answer: Running Teamviewer isn't very secure: read here
To determine who was logged in - look here:

C:\Program Files\TeamViewer\VersionX\Connections_incoming.txt
C:\Users\XXX\AppData\Roaming\TeamViewer\Connections.txt
Comment: Did you ever had an incoming connection? Afaik the file will be created with the first connect. But remember: the file simply can be deleted from "evil" guys...
Comment: If that article was trying to prove that teamviewer is insecure - it failed. Even the conclusion doesn't say it's insecure - it's basically saying you need a better password. Which I could have told you without 3 pages of technical information about the TV protocol.
Comment: I read the conclusion - he spends a good 2-3 sentences talking about password length. If it can be hijacked from a MITM the conclusion should just say "susceptible to MITM attacks". Then his last sentence talks about using vectors/strings to as a way to reduce the risk.
Comment: What blogger meant by "brute-force the passcode as it is sent on the wire", TV sends a challenge to the client which is then hashed with the passphrase to be tried. With MITM he can easily sniff this hashed passcode. Since it's hashed with MD5 it will take very little time to find a 4-character password (he mistakenly assumes digits). A well-equipped HPC could crack an MD5 hash, containing an 8-character password, in a half hour. But again, the real issue is the MITM.
Comment: hmm. The first file Connections_incoming.txt is not present at all. Not even when searching for it. The second is there but shows nothing suspicous. Could it be that the file is simply not created, because I have never had an incoming connection (as far as I know)?
Comment: yeah that was also my though. But I think it unlikely in this case. Thank you for the help :)
Comment: @Per-ØivinAndersen You tried looking on `Program Files(x86)` instead of `Program Files`?
Comment: yes I have. It is not there but I think it is because I have never had an incoming conn.
Comment: Or your intruder erased the file knowing the location of the files. You could install the portable version of recuva and see if there are any deleted files you can recover: http://www.piriform.com/recuva/builds
Comment: If the intruder is that smart he would only delete his own entry and not the entire file...
Comment: @NathanAdams Page 3 - MITM, a stronger password wouldn't help. Go check the papers again.
Comment: I agree with @NathanAdams here. Of the blog analysis: good analysis, strange conclusions. "Given the default weak passcode, and the flaws in Encryption, it's fairly straightforward to MITM the encryption and brute-force the passcode as it is sent on the wire." Those two have nothing to do with each other. Given TV has a built-in brute-force-detection-with-delay, the MITM is the bigger issue.
Comment: http://arstechnica.com/security/2016/06/teamviewer-users-are-being-hacked-in-bulk-and-we-still-dont-know-how/
Answer: In teamviewer 10 you can check the following files:
C:\Program Files\TeamViewer\Connections_incoming.txt

C:\Program Files\TeamViewer\TeamViewer10_Logfile.log

First one provides details about the incoming connections. Second one provides details of the actions performed
Comment: The log path might differ on a 64-bit system and/or if the directory of TeamViewer was changed on installation. To open the directory containing log files; go to the `Extras -> Open log files...` menu on the main TeamViewer screen.
Answer: On Mac OS, you will probably find the relevant logs at
/Library/Logs/TeamViewer/Connections_incoming.txt

Log *Logfile.log is also in the same directory.


Solving a Windows common login user profile security issue

Question: Our group has a number of Test Stands with PCs that are currently being accessed with a single group login.
It has been sent from on high that this is not the way to do things for security reasons and we all agree. However. Multiple team members from around the world log into these Test Stands and need to be able to access programs that have been run from what would be different user profiles if we were to no longer have a single common login.
Is there a way to have a common workspace such that when different users login, they will be able to see and interact with all running applications as if they were using a common login?
Applications that we run link to and monopolize hardware resources connected to the PC and it is time consuming to restart and reload settings every time a new user logs in. Even if the program did not monopolize the hardware many of these programs are resource intensive and require a large portion of each machine's RAM to run, so trying to run the application again when it is already running from multiple user accounts would quickly consume all system resources.
Simple Example: I open a chrome browser while logged into our pc. I then disconnect without logging out and another team member remotes in and should be able to see my open browser and be able to interact with it as if he were the one who opened it.
Any alternative process flows or solutions from someone who has gone through a similar transition would be appreciated.
This is not a request for how to give all users access to the ability to run a program, but it is the request for how to allow all users access to interact with running applications that have been started by other users and need to be interacted with as if the new user started and has control of the application.
Alternatively, is there a way to force a login verification from a second account in order to access a shared login machine? Such that if I log into the shared account, I am also forced to enter my personal login details?
Comment: If you "logout" Chrome would have been closed as part of the logoff process. Do you mean disconnect without logging out of a RDP session or perhaps locking a workstation without logging off?
Answer: No, you cant.
this is only possible using the same login


HOw to clean up and fine tune Ubuntu

Question: Are there any tools to clean and fine tune Ubuntu? My computer has become slow. I am using Chrome, Chromium and Firefox
Running an Intel NUC.
Specs:

16GB RAM
  128GB SSD
Answer: You can download ubuntu installing Lice CD.Start your computer with booting that CD.then there is a choise there to format all entire hard disc,and recover all system.You will choose Recovery mod.All your applications and installed softwares will be initialized as first time installing.but your files like photos,text files any etc. will be kept.
Answer: If it's just the browsers, you should look to clean up the cache, history, offline data, and other stuffs. The browsers offer such functionality, like for e.g. in firefox you can press Ctrl+Alt+Delete (or from menu History -> Clear Recent History...) to get the Clear All History window where you can select the things you want to delete and apply the action. You can do similar for the other browsers manually. Or you can try the tools that will handle these cleanups for you.

Cleanup Tools:
This link lists some tools offering various different cleanup functions like removing the temporary internet files, caches, history among many others. Among these you might like:

fslint
bleachbit

..:: click this link to see the installation-how-to ::..

Disk defragmentation should not be a problem for the ext* file systems, so you need not worry about that. For more visit: Why is defragmentation unnecessary?
But if you want a defrag, you could do that too with GParted as explained in this answer Use Gparted to defrag your file system.

Hope this is not the case, but when the bad block count in my previous hard disk had increased considerably the system went sluggish. You can use Disk Utility to check the disk status or S.M.A.R.T. status.

HOw to clean up and fine tune Ubuntu


How to change the Master Page in SPF 2013?

Question: I created a custom master page (based on "seattle.master" that we currently use) and uploaded it to the Master Page Gallery on our site collection. However, now I am at a loss on how to get the site collection to use my custom master page instead of the default "seattle.master" one. We are using SPF 2013, so I do not have (and cannot seem to enable) the "Master page" link under the "Look and Feel" section of Site Settings. How does one go about this in SPF 2013?
Answer: To change the master page in SPF 2013:

Install SharePoint Designer (MSFT link current as of this post: http://www.microsoft.com/en-us/download/details.aspx?id=35491)
On the machine you have installed Designer on, browse to the SP site, and on the "Page" tab, select "Edit Page > Edit in SharePoint Designer"
SP Designer launches, and connects to the site.
On the left nav bar in Designer, click on "Master Pages"
Right-click on the master page you'd like to make the default for the site.
From the resulting context menu, choose "Set as Default Master Page".
Answer: You can change the master page using SharePoint Designer or publishing feature needs to be activated to get the master page option under look and feel but not sure if you get that in Foundation version. So use SharePoint Designer(easiest option) or powershell or CSOM.
Comment: My understanding (from reading stuff on Google) is that you cannot enable "SharePoint Server Publishing" on SPF 2013... In fact there's no "Site Collection Administration" subsection in Site Settings at all (just "Site Administration" and "Site Actions", neither of which have a "Site Collection Features" link)
Comment: Correct. You need to site collection admin to see the Site Collection Administration section. As I said you should be still be able to change the master page using other option as suggested in my answer
Comment: SharePoint Designer 2013 will let you do it. Publishing won't be available in Foundation
Comment: Thanks @HarryB - that was part of the problem (I was not in fact set as a site collection admin for the site collection in question...)


Measuring voltage in a 440 V motor start capacitor

Question: How can I measure the voltage in a stand alone motor start capacitor with ratings of 440 volts @ 60 uF avoiding destroying the DVM? We were given a formula for determining the power in a cap, but were not told how to measure the capacitor without changing the out the caps conditions or blowing up the multimeter?
Comment: What in the *world* sort of DMM are you trying to do this with? One of those Horror Fright ones?
Answer: Motor start capacitors are only used on AC motors and there will be an AC voltage across it.

To measure the voltage across the capacitor use a multimeter or voltmeter with a 1000 V safety rating.
Switch the meter to the next AC range higher than 440 V.
Connect the probes safely to the capacitor with the power switched off.
Stand back, switch on, take the readings and switch off before disconnecting.

Do not try this with a $5 meter. Both meter and probes need to be adequately rated with a recognised safety mark.
Comment: No ac this is DC  and start caps exist out side of motors and ac circuits thanks though I have a friend who has a pile of DVM'S. From measuring caps .I just was trying to get a head of the problem .jim
Comment: What sort of 440 V DC motor uses a start capacitor? Please put all the information in the question.


Is ge- a prefix?

Question: I learned that brauchen means to need in English, and gebrauchen means to use.  Using and needing are relatively similar verbs, which makes me wonder if ge- is some kind of a prefix in German?  So when I see it on other verbs, might I be able to infer their meaning?
Comment: See [Wiktionary](https://en.wiktionary.org/wiki/ge-#German).
Comment: It can be one (i.e. stehen -> gestehen), but the derivation is not always trivial (we have genehmigen, but there is no nehmigen), and I don't think that you can logically infer the meaning when you know the base word.
Answer: Yes, in your example, ge- is a prefix. Be aware though that in most cases when you encounter ge- in German it will be the marker of the past participle (also called "Partizip II"), such as in essen ("to eat") - gegessen ("eaten").
Also, there are verbs which simply start with ge-, for instance gewinnen ("to win"). In current German, there is no verb *winnen, but there once has been one. Another example is gelingen ("to succeed, to work out"), where the previous existence of *lingen is not clear. Other examples are  gebären ("to give birth"), and gesunden ("to recover"), and I bet there are a lot more.
As a general rule for verb prefixes, there is often no simple rule to derive the meaning of the the derived verb from the meaning of the root verb and the meaning of the prefix. (There is a question on this matter here in German: Wie kann man die Bedeutung von Verben mit Vorsilben ableiten?). I would say this general rule of thumb holds true for ge-. When ge- actually is a prefix it often has a fortfying, strengthening meaning. One example is gedenken ("to commemorate") to denken ("to think"). But you see how this already fails in your example of gebrauchen.
In nouns, Ge- prefix often refers to a collection of things. Examples are Gebirge ("chain of mountains") to Berg (mountain), Gewässer ("water course") to Wasser ("water"), Gehöft ("homestead") to Hof ("court"), and Gestüt ("stud farm") to Stute ("mare").
This relation might be deeply buried in the etymology of the word, as illustrated by the examples of  Gesinde ("the menial staff, the servants") originally from Old High German sind ("the way, the journey") referring to "everybody who accompanies you on the way", and Getreide ("grain") to tragen ("to carry"), originally having the meaning "everything that is being carried". Both *sinde and *treide don't exist in German, so Ge- is not perceived as a prefix anymore in those words.
I would speculate that the collectivizing function in nouns and the fortifying function in verbs have "once" been related, but the examples should already demonstrate that one would have to go very far back in time (beyond the boundaries of what is called "German" anymore, in fact) to find such a relation in the actual language.
All etymological claims are backed by Etymologisches Wörterbuch des Deutschen by Wolfgang Pfeifer, as available at dwds.de

Is ge- a prefix?


No sharpening in post process! How you can achieve that?

Question: Some professionals do not sharpen their raw photos when they postprocess them and the result is still great!
How is that possible?
Quality of lenses? Different workaround?
Thank you!
Comment: Please give some specific examples.
Comment: This is probably way too broad to answer satisfactorily... But the notion of "getting it right in camera" is going to be a significant factor. Lenses, cameras, sensors and lighting all play a part in it as well, but it really comes down to knowing your equipment and knowing how to make it do what you want it to.
Comment: I bought a f/2.0 50mm fixed focal length lens and I'm totally astonished what difference it makes compared to the standard lens shipped with the camera.
Answer: Quality of lenses, stopping down a bit from the maximum aperture of lens and desired depth of field, arrangement of the scene by grouping elements to appear in focus into a comparatively "flat layer".  And not overdoing resolution.
Of course it helps if your camera is a "resolution underachiever" compared to the lens quality.  I like my ancient DSC-R1 camera from 2005: pretty good (fixed) lens, APS-C class sensor (crop factor 1.66), just 10MP, non-BSI CMOS sensor.  That means that the actual light sensitive areas are small enough to have quite lacklustre high-ISO performance given the large sensor size and small pixel count, but have considerable separation, leading to an image that is quite well-defined at the pixel level.
Of course, if you have higher sensor resolution to work with, scaling down should also work to provide images that are comparatively well-defined at the pixel level.
Sharpening comes at a cost of noise, and noise can be kept low by keeping scenes well-exposed.  For studio (and a number of other explicitly lit scenes) you can keep ISO values low enough that at least noisiness for a quite basic sharpening level is not much of an issue.  However, other image operations like local contrast enhancements or tone mapping also come at a cost in noise while providing more striking effects at larger scales.
I can well imagine that with a carefully set up scene, photographers would prefer investing their noise headroom for more global effects rather than improvements at the pixel level.


Elevation issue password always wrong?

Question: ubuntu Newbie - I install OS using one account and then later created a second account made administrator with auto login and no password, then I logged in using new account and deleted old account. Now when ever I go to do anything it wants elevation and no matter what you type in the password field wont work. Any suggestions outside of scrapping it and installing Windows?
Comment: If you're looking for something less secure that won't bother you with passwords then Windows is the way to go. Better still is give Ubuntu another try by reinstalling and go with the default setup, until you are comfortable making changes.
Answer: You are going to need add the new user to the "sudoers" file (or the admin group).  You are  probably running into a situation where this new user doesn't have permission to run the "sudo" command.
You are going to need to get to a root shell. This link will show you how:
http://www.psychocats.net/ubuntu/resetpassword/
That ^ is for resetting a password, but it describes how to get to the root prompt.
Once you have your root promt you can refer to this link:
How can I add a new user as sudoer using the command line?
More specifically (from said post):
sudo adduser <username> admin

Then reboot the machine:
init 6

Run that ^ at the root prompt.  Let it boot normally, log in as the "new" user and give it a shot.  You should be able to "elevate" (sudo) now.

Elevation issue password always wrong?


How would you PHPUnit test a Wordpress function containing get_post_meta()?

Question: I've just start learning PHPUnit with Wordpress. I have a widget that gets post data  from and metadata of it.
My Code Looks like the following:
           if ($postMeta = get_post_meta($post->ID, 'feature_news_colours_overlay')) {
                $colourOverlay = $postMeta['0'];
            }
          $items[] = [
                'title' => $title,
                'url' => get_permalink($post->ID),
                'description' => $content,
                'colourOverlay' => $colourOverlay,
            ];

The widget is getting data from a feature_news_colours_overlay custom_field for the post. In my PhpUnit test i can add the following to make it test the if conditions.
          $post = new \stdClass();
          $post->post_title = 'Some title text to test.';
          $post->ID = 1;
          $GLOBALS['post_meta'][0] = '#FFCC00';

This actually tests my Item array with an assert:
'title' => 'Some title text to test.',
'url' => 'http://something..',
'description' => 'test desc',
'colourOverlay' => '#FFoooo'

This actually testes my if condition, as i see this is not a standard way if i have to check more then 1 posts i cant actually test with a GLOBAL value.

$GLOBALS['post_meta'][0] = '#FFCC00';

Is there any way i could add a mock meta value to each post so as to check the if condition.?
Answer: If you put the post ID you're testing into $post_id, then
add_post_meta( $post_id, 'your_meta_key', 'your_test_value' );

in your testing code just before your assertions should do the trick.


Displaying a table on the Android platform

Question: Any suggestions on the best way to display this table on an Android platform? The formatting is not necessary but I am looking for a flexible way to do this because there are numerous tables with different numbers of rows and columns.
Answer: I'd either use a TableLayout wrapped in a ScrollView (or a HorizontalScrollView with a paging control of some sort, if you expect wide tables) or just code your table in HTML and use a WebView. As far as flexibility/reusability, you may want to consider subclassing TableLayout to provide shortcuts for instantiating the table with different options or to let you lay it out in XML while binding behaviors automatically; see the 2nd answer to this SO post for an example.
Answer: Should probably use a TableLayout, it'll be the easiest method. TableLayout only does columns, the TableRow elements are what do columns, so the difference in columns between rows won't matter. You don't have to use TableRow elements in it though, any subclass of View can go in, so you can easily use a LinearLayout set to flow vertically for the top row.
And unless you're going to do some sort of dragging to move to screen, you'll want to place it all within a scrolling layout too, but you've plenty of them to choose from depending on exactly how the table could turn out.
Comment: TableLayout - http://developer.android.com/reference/android/widget/TableLayout.html

TableRow - http://developer.android.com/reference/android/widget/TableRow.html

ScrollView - http://developer.android.com/reference/android/widget/ScrollView.html


Prevent Lead Owners to Transfer leads

Question: How can i prevent the lead owners to change the ownership of the lead. Why they are able to transfer ownership in the same role and not anyone else like System Admin
Answer: Consider adding a lead trigger to intercept on 'before update' and process those where ownerid field is changing. Then evaluate whether you want to allow transfer or not. If you dont use .addError method to enforce a stop on the action.

Prevent Lead Owners to Transfer leads


Cell life: division for immortality or reproduction with aging

Question: Are the two cells that are derived from one cell, 'twin sisters' or a 'mother and a daughter'?  In other words, can a cell really be divided to live an "immortal" life or is cell reproduction the reality of cell life that accounts cell age difference between two successive generations, cell aging-associated senescence in cell reproduction, and cell line survival after the death of old cells.
Answer: First of all, in eukaryotes (as far as I'm aware), older cells can be distinguished from younger cells due to telomere shortening, so there is an ageing process. HeLa cells mentioned by @Gary Chou have a more active telomerase which mitigates telomere shortening, allowing cells to continue to divide indefinitely. I think it's a very interesting question whether this immortality eliminates any sense of "older" and "younger" cells from in HeLa cell culture. I suspect not, but I am not sure on the specifics.
In general this question will depend on how an organism divides (we're going to talk single-celled organisms from now on). For example, the yeast Saccharomyces cerevisiae is a budding yeast, which means that it divides by budding a smaller cell off of the larger cell. This clearly allows for an interpretation of "mother cells" and smaller "daughter cells." Indeed, as lots of research on ageing in S. cerevisiae has shown, beyond being larger, the mother cell undergoes replicative ageing: over time the mother cell is less capable of growth and division--she gets old!
Perhaps the most interesting case of all (and maybe the one you had in mind) is when the organism divides symmetrically, like the bacteria, which undergo binary fission. For decades, as far as scientists could tell, the two cells that were the product of one bacterium dividing looked identical, and all measurements seemed to indicate that the cells were "sisters," i.e. exactly the same, both newborn. So if in the right conditions bacteria could continue to divide indefinitely, it seemed that bacteria were immortal, since each division reset the ageing clock for each bacterium.
However, a seminal study in 2005 (1) changed this view. The researchers took time-lapse microscope movies of a colony of Escherichia coli from a single cell. E. coli is rod-shaped, so when it divides it has to synthesize two new ends or poles, one for each cell, so just after division each cell has a "new pole" that was made in the process of that division and an "old pole" which had originated before. In this study Stewart et al. kept track of the old poles in the growing colony, and they defined the age of a cell as the age of its old pole. They found that older cells (i.e. cells with older poles) displayed replicative ageing, just like yeast! They grew more slowly and were less capable of dividing. This was examined rigorously by Wang et al. (2) in a "mother machine" in which bacteria were able to grow in constant nutrient conditions (by flowing fresh media across them) in dead-end channels. The cell at the dead-end of the channel always inherited the old pole, and so was a "mother" to all future cells. They found that, while a cell line was able to grow for very long periods of time completely stably, after hundreds of generations there was an increased likelihood for the cells to display signs of stress. They attributed to the accumulation of toxic factors in the mother cell over time. So even in cells dividing by binary fission, there appears to be some difference between the two cells arising from the division, depending on how old the pole that they inherit is.
These effects in bacteria are small, and require watching many generations to reveal. Even in light of these results many researchers will still call the "mother" cell the cell about to divide and the "daughter cells" the cells that result from division, implying that there is no difference between "daughters." Stewart et al. claim that on the basis of their work this conception of bacterial division must be revised, and that instead of division producing two identical daughters,

the old pole cell should be considered an aging parent repeatedly producing rejuvenated offspring.

Furthermore, they add a nice philosophical touch to their findings:

These results suggest that no life strategy is immune to the effects of aging, and therefore immortality may be either too costly or mechanistically impossible in natural organisms.

(1): Stewart EJ et al. (2005) Aging and Death in an Organism That Reproduces by Morphologically Symmetric Division. PLoS Biol. 3(2): e45
(2): Wang P et al. (2010) Robust Growth of Escherichia coli. Curr. Biol. 20(12): 1099-1103.
Comment: @StephUnna fair points. I didn't stress the growth-independence of cell age defects in the Wang paper enough; it is probably not accurate to use the term replicative ageing for bacteria, since the ageing effects are not manifested in problems with growth/replication. What I was referring to by "signs of stress" is the increased filamentation rate that Wang et al. observes in older cells. Though they may still grow with the same rate, there is a difference between mother and daughter cells due to accumulation of defects in old-pole cells over long times.
Comment: Great answer, and those are the same reference papers I would have referred to. Although the Wang et al. paper suggests that there is no difference between the mother and daughter cell, and that cell death is independent of growth (and that there is not a reduction in division rate with age). The idea being that the result from Stewart et al. was due to the older cells being in the middle of the colony with fewer available nutrients.
Comment: Also the website of the Jun group (where the Wang et al. paper came from) is excellent: http://jun.ucsd.edu/ lovely videos showing the mother machine in action!
Answer: In term of eukaryotic cells, most of them are mortal and will indeed age (the famous telomere sequence for example). However due to mutation some cells do achieve immortality such as HeLa cell line widely used in bio research.
Comment: Could you please develop a bit your answer and include in particular the OP's question. When (for what cell types) does the analogy "twin sisters" hold and when does the analogy "mother and daughter" hold?


Flex canvas resizing

Question: I have a certain behavior that i want from my screen to implement in Flex.
My screen is devided to 2 areas: Navigator pane and content pane.(from left to right)
When I shrink the browser, i want the content-pane show scroll bars and the components stay the same size originally.
When I expand the browser to right(like in wide screen), i want that components (like DataGrid) will expand to right.
How can i do it? Is it done with minWidth and minHeight?
Thanks,
Answer: I've found that the easiest way to do stuff like this is to override either the measure function or the updateDisplayList function and set the sizes manually. Sometimes min/max sizes work, sometimes they don't.
Answer: I found a solution: I replaced the mx:Canvas with mx:Panel and this works better. as i expect.
Height and Width are with percentage representation. There is also minWidth, minHeight definitions on the panel. once the frame goes under minWidth or minHeight propeties, scrollbars are opened.
important NOTE: if you compile with ANT (mxmlc), you may used another config file (i.e. other than the one Flash Builder uses).
note that each one has different parameters. also note that each one of them may generate a different .html file that embedds the swf.(according to the html template) (for example width parameter)

Flex canvas resizing


When a force is applied on a body, which point does the body rotate around?

Question: I understand when a force is applied to a body it causes moments on all points not lying on the force's line of action. So which of these points acts as the pivot point around which the body actually rotates with a specific moment as a result of that applied force?
Answer: The motion caused by an applied force $F$ can be resolved into 2 components :

A linear acceleration $a=F/m$ of the centre of mass (CM). If the force is an impulse the effect is to change the linear momentum of the CM.
A rotational acceleration about the CM. The force produces a torque $\tau=r\times F$ about the CM, where $r$ is the position vector of the point of application of the force, relative to the CM. This torque causes rotational acceleration $\alpha=\tau/J$ where $J$ is the moment of inertia.

The overall motion is a combination of these 2 motions. The result usually means that there is one point in the body for which the instantaneous velocity is zero at some instant in time. This is called the instantaneous centre of rotation.


Can German Potato Balls be frozen?

Question: Can they be frozen, before being cooked, for a week? I'm making sauerbrauten & potato balls for 25 people, and thought if I could make them a week earlier and just cook them that day, it would be a lot easier.
Answer: Yes, you can freeze them: I have done it before, and it works just fine.
They key (in my experience, that is) is to freeze the balls quickly if uncooked, and put them into the boiling water still frozen when you actually do the cooking.
I have also been freezing cooked potato balls, and that works just fine as well -> In that case, warm them up in hot, but not boiling, water.
A note due to the comment below: The recipe I use calls for half cooked, and half raw potatoes, with the raw half being pressed almost totally try of water; and they DO fall apart if I do not take that part seriously. So, except for potato-flour added again, there is not that much raw potato starch left when I freeze them.
Comment: Thanks for the comment. I added a note, because this was never really a problem for me when it comes to potato-balls, but it MAY be one depending on the recipe.. I added a notice above to reflect on the starch/sugar thing :).
Comment: What a great first post. Welcome to Seasoned Advice, Layna!
Comment: I've actually never tried, but always heard (and believed) that you shouldn't freeze raw potatoes, since the freezing process would convert some of the potato starch into sugar?
Comment: Thank you :).I have already learned quiet a bit just from reading here! Great site with great people :).
Answer: Probably. Here's a recipe that that's similar: Au Gratin Potato balls. I'd recommend that you freeze them on sheets, and then once frozen, pack in Ziploc bags. As long as your time frame is so short (anything less than a month), that should be fine.
Answer: When I cook potato dumplings, I use cooked mashed potatoes, so cooking raw potatoes is not an issue. Also I normally freeze cooked potato dumplings on a tray in the freezer when they first rise to top of pan. Next I will try freezing uncooked potato dumplings--hoping they will rise to top as normal.

Can German Potato Balls be frozen?


Priority of execution of hooks in different modules

Question: Let's say that there is a contributed module installed in Drupal 7. It alters a SQL statement from the core. Now I have a custom module of my own which alters the same SQL statement in a different way. Now, depending on the alteration, I could have different SQL strings depending on which module hook applies before the other. For example, the first hook deletes a table "field" and the other adds the same table "field". If the first hooks executes earlier, the final SQL has the field added. If it is now the second hook which executes earlier, the extra field is added and later removed, so the SQL is completely different. How can I now the priority, any other conflicting issues and is there a way to override this apparent difficulty?
Answer: The system table has a 'weight' field. The hooks are executed in that order.
You can change during install with this code:
<code>function your_module_name_install() {
  db_update('system')
    ->fields(array('weight' => your_preferred_weight))
    ->condition('name', '[your_module_name]', '=')
    ->execute();
}
</code>
Source: https://www.drupal.org/node/110238


Can't install Find My iPhone app on iPhone 4 as it requires iOS 8

Question: I reset my iPhone 4 as I gave it to a friend. I am unable to install Find My iPhone as prompt says I need iOS 8 to run this app. What can I do? I know iOS 8 is not available for iPhone 4, but apps should work for the last version of iOS released for the iPhone 4, iOS 7.1.2. What can I do to get this app downloaded or this is a lost cause?
Comment: You can download apps directly in iTunes without your phone connected. Then on your phone, launch the App Store and go to the Purchased page via the Updates tab. Try installing the app. Your device will notify you that the current version of the app requires iOS 7 or later. Then, it will offer you the option to install a previous version that is compatible with the iPhone you are holding. - taken from http://www.hongkiat.com/blog/installing-apps-older-version-ios/
Answer: When attempting to download an app that has been updated and no longer supports an older version of iOS, you will receive the following prompt:

Download an older version of this app?
The current version requires iOS 8.0 or later, but you can download the last compatible version.
Cancel | Download

Tapping Download will download the last version of the app compatible with the version of iOS you are running.
Comment: "Tapping Download will download the last version of the app compatible with the version of iOS you are running." --this only happens if the person has previously downloaded the app. If they have never downloaded the app before they will get the "this application requires iOS 8.0 or later" message.
Comment: Here is a workaround: [Switch iTunes account](http://support.apple.com/en-gb/HT201248) to one that has downloaded this older version in the past, then download the app (will get the message above), then switch back to the original iTunes account (you will not be able to upgrade this App, which is not relevant in this case anyhow).
Answer: I have tried a better way:
Use another iOS 8 iPhone to switch iTunes Store Apple ID:
Example the donor has a new iOS 8 iPhone. Log out donor Apple ID from iTunes store. Then log in using the receipient's Apple ID. Search for Find my iPhone app. If the iOS 8 iPhone has installed the app, uninstall it to make way for the "Get" process. As soon as it starts downloading, stop the process. There you have the receipient's Apple ID with the app bought.
Now the donor can log back in using own Apple ID in iTunes store and redownload the app.
Then the receipient can use his/her own Apple ID in iPhone 4 to download the app.
Both parties got what they want on their respective Apple ID and iPhones.
Answer: I just encountered this issue setting up my son's iPhone 4.
The important bit is to have an iTunes account that you've used to download an app in the past (in my case, my account, since I've had my account since the iPhone 3G days.)
On the iPhone 4, go to Settings > iTunes and App Store > tap Apple ID > Sign Out
Then Sign in with the other account (ie my account I've had for years).
Then go to the App Store and when you try to download an app, it will give you the "Download previous version" prompt. So go ahead and download it.
And don't forget to sign out and sign back in with the newer account (ie my son's).


how to make animation for a 2d game

Question: I've started working on a 2d game. I wanted to know how animation usually works in 2d games - I know one way is to make a sprite sheet with frames of the animation, but you wouldn't see big sprite sheets on an actual professional game. is this on purpose or is there a different way of creating animation?
Comment: to make animation, you should change the colors of pixels during the gameplay
Comment: There are plenty of ways. You should do more research. Start with skeletal animation. Here are some related questions: http://gamedev.stackexchange.com/questions/38427/spriting-animation-method http://gamedev.stackexchange.com/questions/35561/how-to-i-teach-my-artist-to-do-arts-for-games
Comment: Most of the time, the reason you don't see them is the textures are stored in other forms, like binary files, compressed files, or some game-engine-specialized files.
Comment: "but you wouldn't see big sprite sheets on an actual professional game."  Sure you would, I've shipped several games like that.
Answer: To understand how 2D animation works, you should understand how textures are mapped to a surface. When you pass in vertex data along with a texture to the graphics card, UV coordinates are passed in with it, to specify a (usually) normalized position on the texture that the vertex is located at. For instance, when rendering a sprite to a single billboard, you would usually pass in uv coordintes like so.
Vertex01: (0,0),   UV: (0,0)
Vertex02: (0,1),   UV: (0,1)
Vertex03: (1,0),   UV: (1,0)
Vertex04: (1,1),   UV: (1,1)
This would map the entire texture to the billboard, which is fine for a single image, but if you want to use a sprite sheet for animation, then you would want to map to a portion of it only.
So lets say you have 4 sprites of even size on a sprite sheet, and you wanted to map the first frame of the sheet to a billboard, these UV coordinates would allow you to do map only 1/4 of the texture to the billboard.
Vertex01: (0,0),   UV: (0,0)
Vertex02: (0,1),   UV: (0,0.25)
Vertex03: (1,0),   UV: (0.25,0)
Vertex04: (1,1),   UV: (0.25,0.25)
So if you wanted to change the frame on this billboard, you would update the UV coordinates based on the dimensions of the frame.
On top of this system, you would need to implement the animation framework that updates the animation, at the frame rate you want. Keeping track of the time since the previous frame update, you can ensure you are only changing frames every n milliseconds to achieve the framerate you want.

how to make animation for a 2d game


Converting binary data to percentage

Question: I've done an experiment where I recorded a positive or negative result from a cell.
My data is set in tables of counts of events and trials, but I don't know how to do statistical analysis on binary data, I need to test the significance between the groups I tested.
Can I convert to percentage and do a stats test on that, converting it to continuous data?
Comment: I gather your response is binary (positive vs. negative). What is the status of your explanatory variables? Do you have any (eg, experimental condition vs. control condition)? Are there more than 2 groups tested? Do you want to control for, or assess the influence of, any other variables (eg, number of mitochondria in each cell)? The appropriate analysis will depend on these features.
Comment: I tested two doses of a drug, and recorded the number that stained positive for what I was testing, and recorded the total number of cells I counted.
I also included a control of no drug, and a control, which included a substance that was found in the drug solution I was using.
For each variable, I had three samples.
I carried out this test on two separate cell cultures.
Answer: You could do, providing the denominator of each proportion is about the same (or you'd be treating $\frac{1}{2}$ as equivalent to $\frac{500}{1000}$). And it would probably be a good idea to use a variance-stabilizing transformation: for proportion $p$ the angular transformation gives a response $y=\arcsin\sqrt{p}$.
But all that's a bodge & not much less effort than doing it properly with a generalized linear model: look up log-linear models for contingency tables or logistic regression.

Converting binary data to percentage


Can I mix 22awg and 26awg hookup wire in the same circuit?

Question: I'm still fairly new to Arduino projects, and am only just now getting into building circuits where I want to cut and place my own hookup wire instead of using the precut jumper wires. I inherited some supplies from a friend who abandoned the hobby, and about half of the wire he gave me is 22awg and the other half is 26awg. All of it is solid core copper. Is it ok to mix wire gauges like this in the same circuit/project?
Answer: Assuming you won't ever put more current through it than the 26AWG wire can handle, you'll be safe.
Comment: It depends on how warm you can let the wire get. I wouldn't let it get above 75degC total, so assuming 20degC ambient, that's a 55K rise. You plug that and the wire gauge into a calculator, and it will spit out the maximum allowable current.
Comment: Thanks. Any tips on where to get reliable info on what 26AWG copper (for example) can handle? In searching just now, I found charts & answers that indicate everything from .3 to 6 amps.


How to Block all inbound and outbound traffic to and from an Local IP

Question: I need to block entire traffic to and from an Local IP on an
WiFi Network, I am using DD WRT Based router, So I Can use
iptables. I know the IP Of an Client on the Local Network,
Some thing like 192.168.1.X, Now I need to filter And Drop all
the Traffic Originating From and Directed away from that IP,
So that He won't be able to use The Network. How can I do
this, Using iptables, If possible ?
Comment: It's very easy for a client to change its IP or even MAC address. If you're dealing with malicious attackers on your network, you need to look into Network Access Protection.
Answer: If you're knowing the client's ip then you can use this:
<code>iptables -I INPUT -s **client_ip** -j DROP
iptables -I OUTPUT -d **client_ip** -j DROP
</code>
you can further refer here


Use Raphael to manipulate SVG

Question: Is it possible to use Raphael to manipulate an embedded SVG image? I used Raphael in the past to draw shapes, but haven't actually seen it being used to manipulate an existing SVG image. If not, is there anything else that allows me to easily change colours, add events, etc. to polygons of an embedded SVG image?
Answer: From my experience reading the Raphael.js source, I have to agree with previous posts. The only way I can think of to replace or modify the SVG is by replacing/modifying the markup/DOM itself.
All I want to add in my answer is a short, general explanation of why this is so. Raphael is designed as an SVG/VML generator. That is, Raphael makes JavaScript objects and appends their corresponding SVG/VML markup to the DOM as they are made. The objects have lots of additional properties that make them work within the Raphael framework.
It may be possible to write a plugin that can construct a Raphael object around an SVG element by reading its properties, but, I suspect that such an object may not have all the information it needs to coexist with the other Raphael objects. Certainly, no such parsing/reconstruction functionality currently exists.
Comment: the Raphael documentation regarding the 'ninja' mode supports your remarks.  the Raphael 'ninja' mode removes the global Raphael object but the documentation indicates that using 'ninja' mode might prevent plugins from working as they need to access the Raphael global obj[link](http://raphaeljs.com/reference.html#Raphael.ninja)
Comment: Ninja mode has nothing to do with my answer. I'm not referring to the global Raphael object, but rather, the individual objects that correspond to the SVG elements that are created by Raphael.
Answer: Funny, yesterday I found the glitchsvgicons page doing that.
Although in a very primitive way, just using a regex replace of parts.
It can be hint, though: apparently you can use good old search/replace of text parts on SVG icons. But it is more prone to issues than using a real Dom tree...
Comment: Judging from the lack of replies, I think there isn't any possibility to use Raphael to do this. I think I stick with jquery to manipulate the DOM tree.

Use Raphael to manipulate SVG


how to create a new workbook of excel with python getin data from other workbook

Question: how to create a new  workbook of excel with python getin  data from other workbook with python?
 I need automatically create a table, taking data from 5 other tables in a specific order know some method to this?
thanks for your answers!!
Answer: I would use a combination of the xlrd and xlwt modules.  Perhaps, the xlutils copy method can be of help.


Document center in Sharepoint

Question: Our team is using an intranet portal solution for managing the documents of the team. Last day a few corrections were made in a document that was not to be done. Actually, I would like to know how can we find the person who changed the document. I checked it by visiting the library settings followed by versioning settings and then opened document version history. But I was not able to identify the person who did it as there were privacy settings.
It will be great if you can help me with finding the edited person.
Answer: Create a view with the condition like modified greater than equal [today]  - 1 and display the column name, created, created by, modified, modified by - this will display the number documents which were modified in last two days.... it will give some ideas to locate the particular document.

Document center in Sharepoint


First order languages vs languages with infinitely long expressions

Question: What is the difference between first-order languages (where the universal and existential quantifiers are defined as infinite disjunctions and conjunctions, respectively) and languages with infinitely long expressions (which allow infinite disjunctions and conjunctions)?
Answer: There are a few differences:

Infinitary predicate logic is not compact. FOL is. See a proof on this excellent answer.
Their models are different. Practically, predicate logic doesn't even have a model, as its valuation (or interpretation) function v*(...) is always equivalent to its truth-value function v(...). This is not the case with FOL.
Since we can have unnamed objects in FOL (that is, objects that do not map to constants), we can arguably be more expressive. Keeping that in mind, ∀xP(x) can capture more "things" than P(A) ∧ P(B) ∧ P(C) ∧ ....
Answer: In formal languages quantifiers are not defined, they are basic symbols manipulated according to axiomatized rules. When language is interpreted then quantifiers are interpreted as infinite conjunctions or disjunctions, but interpretations are external to the language itself, and it does not always behave as "expected". For example, Gödel showed that there are predicates P in Peano arithmetic such that P(n) is provable for n=1,2,..., but ∀xP(x) is unprovable, so the quantifier does not reduce to "infinite conjunction". Peano arithmetic is ω-incomplete. There are even consistent extensions of it that prove every P(n) together with ¬∀xP(x), they are ω-inconsistent.
Languages that allow infinite expressions are called infinitary languages and can themselves be of first or higher order, depending on what one can quantify over. Even first order infinitary languages are much more expressive than their finitary counterparts, for example they can specify the standard model of arithmetic, which finitary Peano arithmetic can not, it allows non-standard models with "infinite numbers". However, infinitary languages usually lack nice structural properties, which makes them intractable. For example, any finitary language is compact, if a conclusion is derivable from a set of premises it is already derivable from a finite subset of it. But this is obviously false even in first order infinitary languages, an infinite conjuction is not derivable from any finite subset of its terms.
Answer: As a start, consider taking an infinite disjunction that happens to be true and adding another term at the end, that happens to be false.  In evaluation, would you ever get to that last term?  Obviously it makes the whole thing false, but you have an infinite task to exhaust before even considering it.
We want finite proofs.  So should we consider this provably false or throw it into some ambiguous category?  What if we somehow imagine replacing each term of our infinite sequence with another infinite sequence?  Things get weird.
Infinitary languages, and transfinite sequences in general, create a lot of such silly problems.  So in logic, outside of the theory of orderings itself, we generally prefer transfinite sets but only arbitrarily long sequences.  The fact that quantifiers are over sets and not sequences lets us have that.
If you want to model quantifiers as infinite statements, they are sequential.  So you are pulled down a certain rabbit hole into transfinite induction and the vagaries of ordinal representations.


How to dodge suggestions for another position when applying or interviewing

Question: Due to the experience on my resume, many potential employers feel that I would be a better fit in analytics rather than an engineering position. This is usually communicated to me either during the interview or through e-mail prior. However, I would strongly prefer to do software engineering (hence why I am applying for that job). What is the professional way to communicate this fact?
Comment: if you're sending cover letters along with your cv you could put emphasis on how interesting you find software engineering and try get across that it's what you want to be doing. this could stop it all together if employers see how motivated / interested you are towards the role you are applying for.
Comment: I agree with RyanIG - a statement like "while I have considerable experience in analytics, I am looking to focus on software engineering and further increase my not-inconsiderable experience there" - also, you need to make sure that your resume/CV focuses on software engineering experience and skills, and simply brush over the analytics.
Answer: When people suggest that you are better fit for a different position, they are generally saying one of two things:

I have a job that is harder to fill and you are qualified for it and
may not be aware there is an opening.
I don't think you are as strong a candidate as other people I have
interviewed and are not likely to get this position but I like the
way you think and There is something else you could have a greater
chance of being the top candidate for.

While the polite response, of "Thank you for considering that but I am currently only interested in engineering positions." will be acceptable to reasonable hiring officials, you are not likely to get the job if you are in the second group.
It's still the best thing you can do in the interview or pre-interview stage when faced with the suggestion.
Another tactic is to tell them that you are interested in moving to engineering, but would be willing to consider the other job to get your foot in the door if there was a specific plan for how you could make the transition in six months or so. This might be the most effective if you are truly a much stronger candidate for the position you don't want and are not likely to get offered what you want immediately anywhere.
What you also need to do is think if there is some way to improve your chances of being the top candidate for the position you want rather than the top candidate for the position you don't want. Maybe you need to stick with your current position for longer or get additional qualifications or education. Maybe you need to do a better job of demonstrating that you have what they want for the position you want. Maybe you need to weed out the things you don't want to do from your resume.
Comment: I kind of cringe at the idea of taking a job in a field you don't want with the promise of moving to a field of your interest.  There are dozens of questions on here about taking an IT job because the employer said that there would be development work that went with it then getting no experience in their desired field.
Comment: It is also effective if you really aren't qualified for the job you want. If it is the only way to get your foot in the door, you take it. I used this as a way to transition to SQL Server database work. It can work, it is not for everyone though. I threw it out as a possibility.
Comment: I like this answer save for the same issue @Myles has with it.  Yes it can work to move from what you don't want in a company into something that you do, but I don't think it's as easy to go from one discipline to a completely different one.  Also, how many years are you willing to 'hang in there' doing something you don't enjoy on a hope that they will follow through with your requests?
Comment: Thanks, this helps me too. I got recently asked this in an interview, and I politely replied that I would not have applied to the more technical position they mentioned if I had seen the vacancy, because I'm more interested in staying in management. I will definitely make sure to hold back about my technical skills in future interviews. In retrospect, I focused too much on my technical achievements. And no, I didn't get the job I wanted.


How are LIBOR rates beyond 12M arrived at?

Question: I understand LIBOR rates quoted on a daily basis upto 12 M tenors. But how are rates beyond 12M tenor estimated. I got this question from an interviewer.
Comment: Libor Futures on the Chicago Merc? http://www.cmegroup.com/trading/interest-rates/stir/eurodollar.html
Answer: If you want to estimate interbank lending rates beyond 12 months, the best you can do is look at where bonds issued by banks are trading.
Sometimes there is loose talk (even by interviewers) that may confuse this with long term swap rates, which are contracts to exchange a fixed rate for 3 or 6 month libor.  However this has nothing to do with bank lending beyond 12 months.


Can number 2 be defined as a formula in set theory?

Question: Natural numbers can be represented as sets, however there are more than one representation of natural numbers in set theory (for example von Neumann's and Zermelo's). But all the representations of number 2, for example, should have some properties in common, namely the properties which we intuitively attribute to number 2. And since there is only one number 2 (as opposed to many of its representations), my question is: could we identify number 2 with the properties that all set-theoretical representations of number 2 have in common, that is, with a well-formed, pure-set-theoretical formula that all these representations have to satisfy?
Comment: Could you give an example of a property that all set-theoretical representation of the number 2 has to have? Because I can't think of one offhand. And wouldn't any possible set-theoretical representation of the number 2 also be a possible set-theoretical representation of the number 1, and *vice versa*? It wouldn't do to identify the numbers 1 and 2 with the *same* collection of properties, would it?
Comment: What is a number?
Comment: @AsafKaragila And [can you name it](http://karagila.org/2015/name-that-number/)?
Comment: @Stefan: I'd name it Bob. So yes, ***I*** can name it. :P
Answer: There is little reason why the number $2$ - when viewed as a set - should have any property that we intuitively assign to the number $2$. We define numbers as sets in order to make them available to our theory - how exactly this is done is rarely of interest and mostly besides the point.
That doesn't say, however, that there are no 'natural' candidates to code natural numbers. In fact, finite von Neumann ordinals seem like an excellent choice (and provide some technical advantages). However, everything works (almost) equally well if we'd decide to use another coding, e.g. we could replace any ordinal $\alpha$ with $(\alpha,\alpha)$.
Comment: This sort of question comes up quite regularly, albeit in slightly different flavors. The common answer to all of them is that in set theory, we mostly don't care how we represent a certain object as sets. We mainly construct them as sets, simply to show their existence, i.e. to show that a set with desired properties exists which may be regarded as a representation of the object that we were looking for.
Answer: There are two issues with the question which hint at a negative answer.

The number $2$ does not live in vacuum. Namely, in order for something to be a number, it usually has to be a part of some arithmetic structure. And while $2$ can usually be found in every arithmetic structure (the natural numbers, the integers, the rationals, the reals, the complex, the ordinals, the cardinals, and so on and so forth), in each structure it might have different properties.
Not to mention that "properties" does not include any description of these properties. For example in $\Bbb R$ with first-order logic the number $2$ does not have the property of being "a natural number", because $\Bbb N$ is not definable via a first-order formula over $\Bbb R$. But it is definable with a second-order logic formula, so with second-order logic $2$ does satisfy the property of being a natural number.
Another example is that in $\Bbb N$ we have that $2$ is a prime number, but in the ring $\Bbb R$ it isn't a prime number since it can be divided by any non-zero number to result in another real number.
There is no "special" representation of $2$. Sure, we can argue that the set $\{\varnothing,\{\varnothing\}\}$ is a pretty damn special snowflake of a set, and it is the number $2$. But we'd be wrong. It will be the von Neumann ordinal $2$.
As far as interpreting the natural numbers, or the real numbers, or the complex numbers, or anything really, every set of the right cardinality could do, and every element in that set can be anything in the interpretation. There is nowhere in the interpretation of mathematical structure inside $\sf ZFC$ that we require that the underlying set will have some properties that agree with the intended interpretation.
Given any interpretation of $\Bbb N$, for example, we can take any permutation of that set and come up with an isomorphic but different interpretation. Since given a set $A$, any two elements can be swapped via a permutation, this means that if $A$ is the underlying set of the interpretation of $\Bbb N$, via permutations we can come up with interpretation where $2$ is any element of $A$. And if we want something which is not in $A$ to be $2$, then we can just remove the object designated as $2$, and add the new object instead.
The point is that $\sf ZFC$ is very agnostic when it comes to interpreting mathematical objects as sets. It really doesn't care what are the sets we've used. So evrey set in the mathematical universe has equal shot of being $2$ under some interpretation of whatever mathematical structure you have in mind for the number $2$.

Now, in the comment the OP has asked about a formula which characterizes all the interpretations of the natural numbers. That we can do in a reasonable way. Because we can describe the natural numbers in a fairly robust way. In fact, in several ways:

$\Bbb N$ is the unique model of $\sf PA$ which is well-founded.
$\Bbb N$ is the unique well-ordered set which is infinite, but every proper initial segment is finite.
$\Bbb N$ is the unique linearly-ordered set which has no maximum, but every element has finitely many predecessors.

And so on and so forth. So first we need to decide what does it mean for a set to be the natural numbers. The natural numbers are not just a countable set. They have $\leq$ and they have $+,\cdot$ and $0$ and $1$. Of course we can define the order from $+$ and we can define $0$ and $1$ from the order, and using second-order logic we can also define $+$ and $\cdot$ from the order.
But for the sake of argument we can opt for maximality and take all those symbols as part of our language. So really what we are after is a formula which tells us when a first-order interpretation to the language of arithmetic is isomorphic to the natural numbers.
So you need to write this complicated formula which states what it means for something to be an interpretation for the language of arithmetic, and what does it mean for a sentence in the language of arithmetic to be true in that interpretation, and then you can say that you have an interpretation for the language of arithmetic which satisfies the axioms of $\sf PA$, and the order is well-founded (this is an external property, of course).
If you want to think about the natural numbers in other ways, that's also possible. But as long as you are thinking about them as a structured set, and you're looking for all the interpretations of that structure, this is definitely doable. But it would probably take a few pages to write down this formula, and it is a horrible exercise in formalization of things in the language of set theory.
Comment: Your point no. 1 seems very important. It is probably not representations of an individual natural number that need to have some common property but the representations of the whole SERIES of natural numbers. For example the von Neumann representation of the series of natural numbers and the Zermelo representation of the series of natural numbers need to have some common properties and thus satisfy some formula. But what would such a formula look like?
Comment: But there is no "common formula". *Every* countable set can be used to represent the natural numbers, that is exactly the second point in my answer.
Comment: Well, then I would say that the formula that every representation of natural numbers must satisfy is that the representation is an infinite countable set.
Comment: Let me add something to my answer.


Police report says a driver was at fault for accident, but that person wasn't

Question: Suppose that a police report says that a driver was at fault for a car accident but in fact the driver wasn't. Is the driver screwed if the driver takes it to court, or does the driver still have a hope of proving it wasn't that person's fault?
Comment: You did not even mention the country you're in. Impossible to say. If there is proper rule of law, you can still win in court but will be harder because the experts on the scene put their assessment down.
Comment: As o.m. says, we'd really have to know the jurisdiction.  A current (downvoted) answers seems to address the case of California, but for all we know you're in Zimbabwe. And keep in mind that what you think constitutes "fault" isn't necessarily what the courts and the law think constitutes fault.  If, for example, I'm making a nominally valid turn and someone in the lanes I'm turning through/into is fiddling with their radio, doesn't see me, and doesn't slow down and smashes into me mid-turn, then I'm likely the one at fault.  I was responsible for ensuring I could perform the maneuver safely.
Comment: Generally police should record facts; their conclusions from the facts will usually not be relevant. Exceptions: If you admit your fault, the police report can say "X admitted he was at fault", because the admitting is a fact. And if the police is allowed to hand out on-the-spot fines, that will be done based on their conclusions, and you might be forced to take action yourself to overcome this.
Comment: Going on what @zibadawatimmy said, some countries assign fault differently.  For example, in the U.S. in a rear end collision, the driver at fault is always the person who is at the furthest back of the collision in a pile up.   In Japan, that person is only partially at fault (Japan always assigns fault to all drivers involved, typically with the most of the percentage going to what would typically be the sole responsible party in a crash in the U.S.).
Answer: Most states have a per se bar on the admission of a traffic offense resolution in a case seeking personal injuries from a traffic accident, in order to discourage overlitigation of traffic offenses due to collateral consequences which they could otherwise have.
The police report is also usually hearsay, and so only the live testimony of the officers would be admitted.
Normally, fault in a traffic accident is not something upon which expert testimony is permitted as the decision is vested in the finder of fact (usually a jury in the U.S., but sometimes a judge in a bench trial).
Answer: Police reports are generally considered inadmissible in court when they address things juries are competent to assess on their own. Most police reports regarding car accidents are inadmissible in court because they are inadmissible hearsay when the accident is not personally witnessed by police.
The police report, in your case, is likely inadmissible in court, since most accidents are not witnessed by police.
Comment: @Trish A police report is not expert testimony and is generally inadmissible hearsay when offered for the truth of the matters stated therein. It can't substitute for officer testimony. It could be offered to show that the officer was on the scene contemporaneously, which isn't the truth of the matter asserted therein. The facts and conclusions are all hearsay. The conclusions are also probably not admissible due to lack of relevance. The officer can testify as to what he saw on the scene, however, even if it isn't the accident itself and can use the police report to refresh recollection.
Comment: Nice to see a new contributor, bur how did you guess the applicable jurisdiction? There are people from all over the world, and the detailed rules differ. The police report may become something akin to expert testimony.
Comment: Police reports is general contain more than just hearsay but also list facts and conclusions, making them expert testimony
Comment: @Trish a general duties cop is not an expert. A traffic investigator might be.
Comment: In what case has a police report ever been accepted as expert testimony?


MongoDB limit storage size?

Question: What is MongoDB's storage size limit on 64bit platforms? Can MongoDB store 500-900 Gb of data within one instance (node)? What was the largest amount of data you've stored in MongoDB, and what was your experience?
Comment: we're doing 12 TB with PSA failover and it's insane to backup/restore but it runs.
Answer: The "production deployments" page on MongoDB's site may be of interest to you. Lots of presentations listed with infrastructure information. For example:
http://blog.wordnik.com/12-months-with-mongodb says they're storing 3 TB per node.
Answer: The MongoDB's storage limit on different operating systems are tabulated below as per the MongoDB 3.0  MMAPv1 storage engine limits.
The MMAPv1 storage engine limits each database to no more than 16000 data files. This means that a single MMAPv1 database has a maximum size of 32TB. Setting the storage.mmapv1.smallFiles option reduces this limit to 8TB.
Using the MMAPv1 storage engine, a single mongod instance cannot manage a data set that exceeds maximum virtual memory address space provided by the underlying operating system.
<code>                            Virtual Memory Limitations

Operating System           Journaled                Not Journaled

   Linux                 64 terabytes               128 terabytes

Windows Server 2012 R2
and Windows 8.1          64 terabytes               128 terabytes

Windows (otherwise)       4 terabytes                8 terabytes
</code>
Reference: MongoDB Database Limit.
Note:The WiredTiger storage engine is not subject to this limitation.
Another way to have more than 2GB on a single node is to run multiple mongod processes. So sharding is one option or doing some manual partitioning across processes.
Hope This helps.
Comment: I am curious. What exactly means "each database"? Is a single installation on a server considered a database or an entire cluster with multiple shards? (Probably NOT the latter - right?, otherwise the absolute max of a mongo-cluster would be 32TB and that'd be ridiculous)
Comment: I have the same query as @skofgar after this discussion. I am curious to know Mongodb limitations. If anyone has come across a node computation example - cluster with C nodes and Y Memory and then the storage would be C*0.8*Y something like that, could you please share a link.
Answer: You won't run anywhere near hitting the cap with 1TB on 64 bit systems, however Mongo does store the indexes in memory so a smooth experience depends on your index size and how much memory you have. But if you have a beefy enough system it won't be a problem.
Comment: In our case we're crunching numbers on years of historical data retrieved from certain markets of eBay. In our situation, 1TB is most definitely a concern of ours- Don't be too quick to rule out such large numbers. But for every day use you are correct- 1TB is pretty extreme.
Comment: @Joshua Burns I think you misunderstood the answer. I believe @Donnie H meant that 1 TB of data doesn't approach the maximum capacity of MongoDB, not that 1 TB is a volume of data that will never be reached.

MongoDB limit storage size?


Soap server address in silverlight

Question: In my silverlight light apps im normally connecting to a ASMX or WCF web service.
I was wonder what is the best way of holding the url in the app of where the soap client should be looking at.
This is fine in debug because it just sort of knows, but in release and depending where its using an ip or it swaps production servers i keep getting tripped up.
I would love there to be some sort of client config bit like web config
Answer: You can have client configuration by using Isolated Storage.
You work with Key/Value pairs as in this example from the linked page:
<code>// Create an instance of IsolatedStorageSettings.
private IsolatedStorageSettings userSettings =
    IsolatedStorageSettings.ApplicationSettings;

// Add a key and its value.
userSettings.Add("userImage", "BlueHills.jpg");

// Remove the setting.
userSettings.Remove("userImage");
</code>
So you can have the value as your URL - just choose a suitable key.
Answer: Your service endpoints can go in to a ServiceReferences.ClientConfig file. This is then an XML file and can be changed at any point as needed; ie..at deployment, etc...

Soap server address in silverlight


Transparent pixels in filled area?

Question: I'm trying to fill an area selected by the magic wand, but I keep getting  pixels that are transparent. Below is an area that's supposed to be filled with red, but there are clearly many pixels that are transparent. Does anyone know why this is the case?
Comment: How are you selecting the area? Can't use simply use a brush and paint in the areas that are missing?
Comment: @Scott I'm just using the magic wand to select the area. I wonder why the opacity of the filled area isn't consistent.
Comment: Probably because the magic wand is seeing variations in color/hue/luminosity and the tolerance is set to *not* select variations outside a specific range. The magic wand will typically leave "holes" unless the area being clicked is a solid, flat, color.
Comment: @Scott The transparent areas aren't actually "holes". Those areas are fully selected by the wand. You can zoom in to see the holes, but there are fully selected areas that are filled with a <100% opacity.
Comment: They aren't fully selected.
Comment: @Scott How come? If you look at [this](https://i.imgur.com/LboyaSo.png), the yellow arrow points to a 'hole', but the blue arrow points to a fully selected area that's transparent. Also, the opacity varies.
Answer: I can understand the confusion.
In Photoshop selections below 50% opacity will not show the "marching ants". It is entirely possible to have an area selected in part, but see no "marching ants". Simply because there  are no "marching ants" it doesn't mean there is no selection or that there is a complete selection.
Areas which are below 50% opacity can be part of an overall selection. However they are not completely selected - only a percent of the area is selected.
If you then "fill" the selection, only the percent which is selected is filled. The area won't be filled 100%.

This merely how the Magic Wand tool works. Sometimes you can increase the Tolerance of the Magic Wand tool in the Control Bar to select more areas. But there are times when that won't really help.
Using a selection method which is not based upon the click of color/luminosity is generally better, if that is an option. For well defined areas often the Polygonal Lasso or Pen Tool can work better. Even Quick Mask using a brush may create a better selection.
The Magic Wand tool, in my experience, is really only useful as a starting point which will need to be refined with a brush (Quick Mask/Layer Mask) or when the area being selected is a solid, flat color.
Comment: Oh! I didn't know the magic wand would only partially select an area. Is there a way to make the magic wand select 100% even the colour/luminosity is within the threshold? I'm actually just trying to paint a bounded area red, e.g., a road, what selection tool would you recommend if the Magic Wand behaves so unpredictably?
Comment: Hi @JohnM. if it were me, after the Magic Wand click, I'd switch to Quick Mask mode (Tap the Q key on the keyboard) and then use a brush to refine the selection. Tap Q again to leave Quick Mask Mode. Or.. use the Pen tool to draw a path around the area I want selected and then use the Path Panel to convert the path to a selection.
Comment: Hi @Scott. Thanks. Well, I was hoping for a solution with less manual selection. I thought the Magic Wand could pull it off. I wish there was a way to make the selection binary rather than being faithful to the original image's colour. That's a shame. :(
Comment: You can switch to quick mask and then use Levels or Curves to adjust the selection(mask).
Comment: Actually, I think I've found a better solution. If I set Magic Wand's Sample Size to 5 by 5 Average, the whole selection can be painted with a flat colour. Not sure why though.
Comment: That increases the tolerance essentially. Rather than selecting 1 value, it's selecting a range of values based upon the 3x3 average. basically, it just broadens the "range" of the selection.
Comment: Sorry, correction. It wasn't the 3x3 average that fixed it. It was disabling Anti-alias! :D

Transparent pixels in filled area?


How are the heavier quarks "created"?

Question: I understand that the heavier quarks, charm/strange/top/bottom, are short lived and decay into other particles.
But how are they "created" in the first place? Do other particles combine in a collision to create them somehow?
I'm only assuming they are "created" because they decay so quickly.
Comment: BTW, you can't make quarks by combining other particles, because (as far as we know) quarks are fundamental, that is, they aren't composed of simpler parts.
Comment: What @PM2Ring meant is that the heavier quarks aren't "made of" other particles. The reason why you need to smash other particles to create heavier quarks is only because they decay, and so you don't just find them laying around.
Comment: PM 2Ring, my question was only for heavier quarks. Which, from the answers below, seem to be "created" and decay very quickly.
Answer: In a particle collider (such as the Large Hadron Collider) a beam of charged particles (typically electrons or protons) is accelerated to relativistic speeds and then collided with either a stationary target or another beam of particles travelling in the opposite direction.
Some of the kinetic energy stored in the beams and released in the collision goes into the creation of new particles and antiparticles, which may include the heavier quarks. There are many different ways in which sufficiently energetic particles may react with one another via the strong force and the weak force to produce new particles/antiparticles.
Answer: They are "created" in the same way other quarks are: from vertices with gluons, Z and W bosons, or even photons.
It is the same thing with heavier leptons, like the muon: they are created from Z and W bosons and photons, and via the same particles they decay in lighter leptons, like the electron.

How are the heavier quarks "created"?


iOS - scrollView and setContentSize

Question: Question
I have a scrollview with a couple things in it. To load information to it, I am using a UITapGestureRecognizer. When this is tapped, my content is loaded into my mainScrollView. This image will help illustrate what I am trying to explain.

Here is how I set my setContentSize after my tap gesture runs:
    CGSize s = self.mainScrollView.frame.size;
    s.height = self.bodyTxt.frame.origin.y + self.bodyTxt.frame.size.height;
    [self.mainScrollView setContentSize:s];

I'm setting the height of the mainScrollView based on the height of the bodyTxt, which right now everything is working how it should.
Problem
If I tap on this gesture again to load the same content into my scrollview,  the bodyTxt animate scrolls to the bottom, which makes the user have to scroll back to the top of the scrollview.
If I tap on it a third time, then it is back to normal, the content is back to the top of the scrollview.
Every time you tap, the mainScrollView alternates from the top animating to the bottom...
I'm not sure what is causing this problem, anyone have any ideas?
Answer: if you put content offset to 0 every time you resize, perhaps this help you
[mainScrollView setContentOffset:]
Comment: This solutions doesn't fix the problem.

iOS - scrollView and setContentSize


Is stock in a private corporation taxable?

Question: If I start a private corporation and it gets a large equity injection from an outside investor, is this taxable in any way, or is it not until I get paid a salary or get a disbursement from the corporation that it becomes taxable?
Answer: This stock is the same as any other, but you need to keep clear in your head that you and your company are now different entities.  You (the person) will pay tax on capital gains and losses when you sell any stock that you hold in your own name.  You'll also owe "regular" tax if you draw a salary, etc.  The fact that it may be "your" company does not change these things.
The company will not recognize a gain by selling stock to raise capital since it's nominally exchanging things of equal value, say $100 in cash for $100 in stock.  In order to sell stock, however, you MIGHT need to register with the SEC depending on how you're going about finding your investors, so keep that in mind.
Comment: If it's privately held by one person who owns 100% of the stock, wouldn't even the initial sale to raise capital be considered a capital gain since the owner is effectively selling some of their own shares? Or, can the corporation create additional stock out of thin air and sell that, diluting the original owners percentage, but without capital gains? (Maybe it depends on the corp type?)
Comment: @TTT additional stock. founders get diluted


PIC 18F4620 with LCD

Question: I am doing a project using PIC 18F4620 to display readings on a LCD. but I am not sure how my power, LCD and pic 18f4620 should be connected.
Is there any suggested schematics??
Comment: -1 for not providing any information about your particular LCD.
Comment: It depends on the LCD type, if you can provide the LCD part number and datasheet then we can help you with the connections.
Answer: Note:
like Olin comments I'm presuming you're using a character LCD, because that's what very often used by hobbyists, but also in industry. Two lines of 16 characters is a common format. Many of these LCD modules use a standard 14 pin interface (sometimes plus 2 for the backlight). This answer applies to these modules.
You connect data lines and control lines simply to GPIO (General Purpose I/O) pins of the PIC. The LCD has an 8-bit bus, but can work in 4-bit mode too, which saves you 4 I/Os.

In this example the R/W line is connected to ground, meaning you can only write to the LCD, not read. Most of the time that's not a problem, and it saves you another I/O pin. So the only two control lines you need are RS (Register Select), which indicates whether you're writing to a control or data register, and E (Enable), which latches the data in the LCD.
Comment: You should note that this only applies to the common "character" LCD display units.  There is a wide range of stuff out there called "LCD".
Comment: @Olin - You're right: assumptions... I clarified my answer.
Answer: There are many things that could be called "LCD".  Steven assumed a particular type in his answer.  That might be what you have, but it could just as well not be.  You really need to give us details of your particular LCD.
At the lowest level, you could have a "bare glass" LCD.  In that case, the PIC 18F4620 is not the right chip.  At this level, the LCD lines need to be driven with special modulated AC signals.  Some PICs have hardware for that purpose built in, but not the 18F4620.  Generally Microchip puts a "9" near the end of the part number when the PIC includes a bare glass LCD driver.
All LCDs are ultimately driven with multiplexed AC signals, but some "LCDs" include a controller chip along with the bare LCD "glass".  There are many different chips out there, and many different possible interfaces.  Some use IIC, some SPI or SPI-like, and some still serial but different with separate read and write lines, for example.  It all depends on the controller chip.
Then there is another distinction between a graphics LCD and one with specific segments.  With a graphics LCD, you can ultimately display anything, but displaying text requires you to store a lot of bitmaps for the different characters or to do font generation on the fly.  Usually graphics LCDs come with controller chips, and again those can have wildly different interfaces.  LCDs with specific segments generally have several 7-segment digits, and you address each segment of each digit separately.
Some LCD units are even more complicated.  They are basically graphics LCDs underneath, but have a controller chip with some fonts built in so that you can send ASCII characters and think of the whole thing as a character display.  This is the type Steven was assuming in his answer.  Many of this type do have the same interface, which can be either 4 bit or 8 bit parallel with some control lines.  If this really is what you have, then Steven's answer applies.

PIC 18F4620 with LCD


Lognormal Regression?

Question: I'm trying to model a lognormal response variable.  I want to take the log of the response variable and do a least-squares regression line over my predictive variable.  However, I'm worried about this.  Is this an okay thing to do?  I know that for my original variable, variance grows with the mean, but would taking logs adjust for this appropriately?
Comment: If the standard deviation is proportional to the mean (ie, constant coefficient of variation) then log transform is fine I think. Try a scatter plot with logarithmic y axis
Comment: How do you know your response is lognormal?
Answer: I would suggest using a generalised linear model (GLM) with a log-link function instead of directly log-transforming your variables; in R you can simply use glm with family= gaussian(link='log') to begin with.
I say this because modelling the mean of the log-transformed variable (as you would do by simply taking the logarithms of your dependent variable) is not always the same as modelling the log of the variable's mean. The user @Corone made a very informative post about this issue here. In short, if the logarithm transformation is not perfectly appropriate it will give suboptimal results in comparison with a GLM.
A very good initial point is the paper by Lindsey & Jones on "Choosing among generalized linear models applied to medical data". (It is easily found online for free if you google/bing the title...)
Comment: @JamesKing: I partially agree; one makes the assumption of constant variance when using a Gaussian model. I specifically said "*modelling the mean of the log-transformed variable is not always the same as modelling the log of the variable's mean.*.
Comment: `glm` with `family=gaussian(link=log)` does not seem appropriate for a lognormally distributed response variable; this models with a family of Gaussians with means = exp(linear predictor).
Comment: @JamesKing: isn't that what a lognormal distribution is? What would you recommend instead?
Comment: Using a log link function will result in fitting an unbiased estimator in log space, which when transformed back to real space will result in a biased estimator. This means that all the estimates you get from your model will come out higher than what they were supposed to be.
Answer:
I want to take the log of the response variable and do a least-squares regression line over my predictive variable.

If I expected the relationship to be linear on the log scale, that's where I'd probably start.

Is this an okay thing to do?

It can be; it depends on what else is going on.

I know that for my original variable, variance grows with the mean, but would taking logs adjust for this appropriately?

It might, or it might not. It depends on exactly how the variance is related to the mean. If the standard deviation is a constant multiple of the mean (variance proportional to mean squared), then you should end up with constant variance on the log scale. Otherwise you won't.
Comment: One point not otherwise mentioned is the tractability of multiplicative, log-log models (both the response and predictor are natural log transforms) and the intuition that, in regression, the coefficient of the predictor amounts to an elasticity (e.g., for a % change (typically 1%) in X, what's the corresponding % change in Y?), which may or may not be a desirable economic quantity. That said, my personal preference is not to do much in the way of transforming response variables in regression because it can open up a can of worms wrt the retransformation bias of the predictions.
Comment: Indeed that's an issue when the aim is prediction of the mean (prediction intervals are okay, though). One advantage of modelling with (say) a gamma GLM with log link (a fairly similar model the lognormal regression in the question) is that the predictions are directly of the mean.

Lognormal Regression?