When we are creating one person account it is allocating one accountid and one Contactid. When i am trying to assign that person account with task i need whoId. How can i get that contact Id(Related to Person account) which is generated at the time of person account creation.
Is it possible to get the ID of a Contact which is part of a Person Account?  I have a custom object which has a custom field referencing the Person Account, though it seems to be referencing the Contact directly. I have created a button which I am using to pass the ID into a Visualforce Page.  With the Insert Field drop-down on the create/edit button page I can put in {!Account.Id} or {!Contact.Id} but neither of these work. The Account ID is placed in the URL but is not the correct ID and the Contact ID is blank, which I assume is because the button is on a Person Account page and not a Contact Page.
How to fix "W: Duplicate sources.list entry"? How do you performance test JavaScript code? CPU Cycles, Memory Usage, Execution Time, etc.?  Added: Is there a quantitative way of testing performance in JavaScript besides just perception of how fast the code runs? I'm a begginer in blender, so please forgive me if the question looks silly to you!  Almost all the objects in my scene disappeared (except 2) as if I deleted them by mistake. The thing is all the objects are still listed in the right side graph. The all have the eye button activated, but yet nothing is visible anymore! As I don't have a backup file, I simply can't find any tricks to fix this...  Thank you for you help! MapServer (MS4W) test page from shapefile shows only blank white square? I am trying to create a test page with mapserver and shapefile. At the moment I just want to get the map shown on my test page. I have gotten the EXTENT coordinates by opening shapefiles with QGIS - I am sure those are correct. I have followed this  as an example.  I am accessing my test page via this link:  http://localhost:1025/cgi-bin/mapserv.exe?map=C:\MS4W\ms4w\Apache\htdocs\mapfile.map   Problem I have - map is not loaded - I only see a blank white square.  When I look at contents of ms4w\Apache\htdocs\output , I see that images are actually getting generated but all of them are white (empty), for example:  lat_pmts_region13941906093724.png lat_pmts_region13941910095144.png lat_pmts_region13941913405500.png ...   Shapefiles are located at this location: C:\MS4W\ms4w\Apache\htdocs\shapefiles.  An example of what is logged to error file:  [Fri Apr 11 11:19:32 2014].883000 CGI Request 1 on process 7888 msWCSDispatch20(): wrong service (none) msWCSParseRequest(): request is KVP. msWCSDispatch(): SERVICE and REQUEST not included msDrawMap(): rendering using outputformat named png (AGG/PNG). msDrawMap(): WMS/WFS set-up and query, 0.000s msDrawMap(): Layer 0 (lat_pmts_region), 0.001s msDrawMap(): Drawing Label Cache, 0.000s msDrawMap() total time: 0.002s msSaveImage(C:/MS4W/ms4w/Apache/htdocs/output/lat_pmts_region13972043727888.png) total time: 0.138s [Fri Apr 11 11:19:33 2014].24000 mapserv request processing time (loadmap not incl.): 0.141s [Fri Apr 11 11:19:33 2014].24000 msFreeMap(): freeing map at 0246EFD8.   ms4w\Apache\htdocs\template.html:  &lt;html&gt; &lt;head&gt;&lt;title&gt;Mapserver Template HTML Document&lt;/title&gt;&lt;/head&gt; &lt;body bgcolor=#AAAAAA&gt; &lt;h2&gt;Template&lt;/h2&gt; &lt;img src="[img]" border=1&gt; &lt;/body&gt; &lt;/html&gt;   It looks like this:   C:\MS4W\ms4w\Apache\htdocs\mapfile.map:  MAP     CONFIG "MS_ERRORFILE" "C:/MS4W/ms4w/tmp/ms_error.txt"     DEBUG 5     NAME lat_pmts_region     STATUS ON     SIZE 800 600      EXTENT 286878.53 142087.25 799084.10 481123.75     #   lat_pmts_region      UNITS METERS     SHAPEPATH "shapefiles"     IMAGECOLOR 155 155 155      WEB     TEMPLATE "template.html"     IMAGEPATH "C:/MS4W/ms4w/Apache/htdocs/output/"     IMAGEURL "/output/"     END      LAYER     NAME "lat_pmts_region"     DATA lat_pmts_region     STATUS DEFAULT     TYPE POLYGON     END END   I will gladly provide more information if it's asked. Fixed buffers and interior buffers are not working for a polygon that contains a hole Command to run an application with Administrator privileges, but NOT AS administrator (prompt with UAC) When I dock my Windows 7 laptop, I want it to prefer the wired ethernet connection over WiFi.  This is a pretty straightforward thing to do on my Mac - I just reorder my network preferences, and it "does the right thing." I just can't figure out how to achieve the same thing on my Win7 laptop.  So, when I'm docked, it connects to WiFi, and then fails to connect to servers on the local wired network. How do I fix this? I have an org with hundreds of apex classes, all of which have api versions ranging between 30-37. Is there an easy way to bring them all to the latest api version at once without resorting to manual updates? Can I enter the UK with a Schengen visa? Coloring a black and white PDF graphic I have a graphic in PDF format (originally converted from an SVG) that is monochromatic (black on white). Is it possible using TikZ or PSTricks but not (Illustrator or Inkscape) to include this image in a different color?  Example:    While it lasts (there seems to be no long term way to host a pdf), you can .  Edit: Simple was perhaps a bit of a misnomer - the pdfs are cropped and monochromatic, but to intricate to redraw on my own. The above example is a character from a font (which I can recolor), but it gives a good example of what shapes I am talking about. Further customize color of hyperref links I have tried to find a way to customize how internal links are colored, but I don't yet have the expertise in finding and redefining commands. In the LaTeX example below, I describe how I would like to change the colors of various links. Any ideas or examples are much appreciated.  \documentclass{article}  \usepackage[backref=true]{biblatex} \begin{filecontents}{refs.bib} @book{cit1, title = {The backreferences should be yellow}, author = {Last, First} } \end{filecontents} \bibliography{refs.bib}  \usepackage{color} \usepackage[usenames,dvipsnames,svgnames,table]{xcolor} \usepackage[colorlinks=true,             linkcolor=red,             urlcolor=blue,             citecolor=gray]{hyperref}  \begin{document}  \title{Title} \maketitle \tableofcontents \listoffigures  \section{Table of content's links should be green} \label{s1} All text, captions, and section headers after the list of figures should be black. The citation links should be gray.\autocite{cit1} \subsection{Table of content's subsections links should be orange} Internal links like this section link \ref{s1}  or this figure link \ref{f1} should be blue.  \begin{figure}[h] \caption{List of figures links red} \label{f1} \end{figure}  \printbibliography  \end{document} I found this interesting problem in :     Given a point $P$ in space, and given a piece of malleable material of constant density, how should you shape and place the material in order to create the largest possible gravitational field at $P$?   Any ideas? Keyboard macro to change default audio device Windows 7, Logitech G110 keyboard  2 audio devices (headphones and speakers)  I am hoping to find a quick way to macro a key to switch to headphones, and a key to switch to speakers.  Anyone have a good program or anything of that nature?  EDIT:  Using AHK to try and get this task working as hoped is sadly not doing the trick.  I have included a screenshot of my audio set, as well as a screenshot of my script as it sits now.    I have also tried to uncheck "show disabled devices" and modified the script to be Down 1, and Up 1 respectively.  It will work for one device, but it refuses to switch to the secondary. The square roots of different primes are linearly independent over the field of rationals I need to find a way of proving that the square roots of a finite set    of different primes are linearly independent over the field of    rationals.    I've tried to solve the problem using elementary algebra  and also using the theory of field extensions, without success. To  prove linear independence of two primes is easy but then my problems  arise. I would be very thankful for an answer to this question. Why is log-of-sum-of-exponentials $f(x)=\log\left(\sum_{i=1}^n e^ {x_i}\right)$ a convex function for $x \in\mathbb R^n$? How to prove $f(x)=\log\left(\displaystyle\sum_{i=1}^n e^{x_i}\right)$ is a convex function?  EDIT1: for above function $f(x)$, following inequalities hold:  $$\max\{x_1,x_2,\ldots,x_n\}\leqslant f(x)\leqslant\max\{x_1,x_2,\ldots,x_n\}+\log n$$  and I have tried proving its convexity via definition of a convex function with above inequalities, but that didn't work.  EDIT2: I have posted my answers below. Getting secondary citations right I have some questions regarding secondary citations (in an computer-science research paper that should be published in a journal). I know that they should be avoided when possible, but it is not always that easy. More specifically, my situation is this:  Article A says:     The average value of ... in ... is ... [B]. [C]’s study says that in ... the value is ...   This statement is exactly what i need for my paper. If I read [B] and [C], I see that [A] cited them correctly and if I would have found these two other articles myself, I would have written the same.  Now how to cite this in a correct way?      [B] and [C] say (cited in [A]) ...   and do a “bad” secondary quote;    [B] and [C] say ...   and neglect the investigation done by [A] and peform citation plagiarism;    [A] says ...   and neglect that the data was the achievement of [B] and [C].    [A] says based on the findings of [B] and [C] ...   and do a secondary quote again. Are the off-world colonies really a "golden land of opportunity"? In Blade Runner, there seems to be quite a  for emigration to the off-world colonies, e.g.,      "A new life awaits you in the off-world colonies, a chance to begin   again in a golden land of opportunity and adventure."   Is there any evidence that people emigrating are actually better off than staying on Earth?  The job descriptions of the replicants Deckard is tasked with "retiring" don't seem consistent with the colonies being wonderful places. If the colonies offered a good life, would they have to do so much advertising? Currently look after 3 websites. I changed one of them to be HTTPS as it's ecommerce, however have seen a huge drop in organic traffic since this was implemented. Went from around 800 impressions to 400.   Any ideas as to why?   Very concerning as I expected it to improve if anything!  I set up 301 redirects to carry through to old pages to http://www.example.com/product1 would go to https://www.example.com/product1  I also set up a separate webmaster account for the HTTPs version as our integration wasn't working well with Google Merchant Centre, and data is flowing correctly but unsure why/if this would cause conflict.  Very confused! I'm looking for an algorithm that sorts strings similar to the way files (and folders) are sorted in Windows Explorer. It seems that numeric values in strings are taken into account when sorted which results in something like  name 1, name 2, name 10   instead of  name 1, name 10, name 2   which you get with a regular string comparison.  I was about to start writing this myself but wanted to check if anyone had done this before and was willing to share some code or insights. The way I would approach this would be to add leading zeros to the numeric values in the name before comparing them. This would result in something like  name 00001, name 00010, name 00002   which when sorted with a regular string sort would give me the correct result.  Any ideas? From time to time I see an enum like the following:  [Flags] public enum Options  {     None    = 0,     Option1 = 1,     Option2 = 2,     Option3 = 4,     Option4 = 8 }   I don't understand what exactly the [Flags] attribute does.  Anyone have a good explanation or example they could post?