We need to get the profile of an user from his user id details. Please let us know.
What is the right way to get the current users profile in an apex class?  When I tried to print the following in visualforce page,  i am able to get the profile name  &lt;apex:outputText value="{!$Profile.Name}"/&gt;    But when i tried to print in the Apex class using System.debug(Profile.Name), I couldn't.
How can I move an installed game from one Steam library folder to another? I use (and have it much bigger) drive D: to store all my user data and games, but I have installed the Steam client on drive C:. When I was installing a first game (Warhammer 40000), I've chosen to place my library folder on drive D: and the game went there.  But now as I've got installed the second game (Portal), I can see that it was put on drive C: despite to the choice I've done previously. When I open Steam - Settings - Downloads + Cloud - Steam library folders, I can see both installation places in the list. Can I merge them into one?  I would even agree to use the default drive C: library (as I've replaced it with a symlink already). When I press to remove one library it says it can only remove empty ones. Seems that I just proved $2=4$. Two "if"s in a row Using AMPScript, I want to pass from a URL Attribute lookup variables and use these variables in my LookupOrderRows function.   The challenge is that not all lookup variables have to be passed by the URL e.g I might lookup just 'office' or I could also lookup both 'office' and 'score.   I've tried several approaches of Concat the string etc - but can't see to make the lookup work.  Has anyone had any success performing similar?   IF not empty( Requestparameter("office") ) then  Set @field1_name = "OFFICE" Set @field1_value = Requestparameter("office")  EndIf  IF not empty( Requestparameter("specialism") ) then  Set @field2_name = "SPECIALISM" Set @field2_value = Requestparameter("specialism")  EndIf  IF not empty( Requestparameter("score") ) then  Set @field3_name = "SCORE" Set @field3_value = Requestparameter("score")  EndIf   set @rows = LookupOrderedRows(@LeadsDE,0,"[Engagement Activity Date] desc",@Field1_Name,@Field1_Value,@Field2_Name,@Field2_Value,@Field3_Name,@Field3_Value)   My current solution is a lot If then statements and combinations i.e. :  /* OFFICE ONLY*/ IF NOT EMPTY(@input_office) AND EMPTY(@input_organisation) AND EMPTY(@input_specialism)  AND EMPTY(@input_score) then     set @rows = LookupOrderedRows(@LeadsDE,0,"[Engagement Activity Date] desc","OFFICE",@input_office) ENDIF  /* OFFICE + ORG*/ IF NOT EMPTY(@input_office) AND NOT EMPTY(@input_organisation) AND EMPTY(@input_specialism)  AND EMPTY(@input_score) then     set @rows = LookupOrderedRows(@LeadsDE,0,"[Engagement Activity Date] desc","OFFICE",@input_office,"ORGANISATION_NAME",@input_organisation) ENDIF /* OFFICE + ORG + SPECIALISM */ IF NOT EMPTY(@input_office) AND NOT EMPTY(@input_organisation) AND NOT EMPTY(@input_specialism)  AND EMPTY(@input_score) then     set @rows = LookupOrderedRows(@LeadsDE,0,"[Engagement Activity Date] desc","OFFICE",@input_office,"ORGANISATION_NAME",@input_organisation,"SPECIALISM",@input_specialism) ENDIF /* OFFICE + ORG + SCORE */ IF NOT EMPTY(@input_office) AND NOT EMPTY(@input_organisation) AND EMPTY(@input_specialism)  AND NOT EMPTY(@input_score) then     set @rows = LookupOrderedRows(@LeadsDE,0,"[Engagement Activity Date] desc","OFFICE",@input_office,"ORGANISATION_NAME",@input_organisation,"Engagement Score",@input_score) ENDIF /* OFFICE + ORG + SPECIALISM + SCORE  */ IF NOT EMPTY(@input_office) AND NOT EMPTY(@input_organisation) AND NOT EMPTY(@input_specialism)  AND EMPTY(@input_score) then     set @rows = LookupOrderedRows(@LeadsDE,0,"[Engagement Activity Date] desc","OFFICE",@input_office,"ORGANISATION_NAME",@input_organisation,"SPECIALISM",@input_specialism,"Engagement Score",@input_score) ENDIF  IF NOT EMPTY(@input_office) AND EMPTY(@input_organisation) AND NOT EMPTY(@input_specialism)  AND EMPTY(@input_score) then     set @rows = LookupOrderedRows(@LeadsDE,0,"[Engagement Activity Date] desc","OFFICE",@input_office,"SPECIALISM",@input_specialism) ENDIF  IF NOT EMPTY(@input_office) AND EMPTY(@input_organisation) AND NOT EMPTY(@input_specialism)  AND NOT EMPTY(@input_score) then     set @rows = LookupOrderedRows(@LeadsDE,0,"[Engagement Activity Date] desc","OFFICE",@input_office,"SPECIALISM",@input_specialism,"Engagement Score",@input_score) ENDIF  IF NOT EMPTY(@input_office) AND EMPTY(@input_organisation) AND EMPTY(@input_specialism)  AND NOT EMPTY(@input_score) then     set @rows = LookupOrderedRows(@LeadsDE,0,"[Engagement Activity Date] desc","OFFICE",@input_office,"Engagement Score",@input_score) ENDIF Limit of a sequence defined by recursive relation : $ a_n = \sqrt{a_{n-1}a_{n-2}}$ Why is there no chat in the footer on Stack Overflow like on other sites? How can I search for files in all sub-directories using the shell and then copy those files? How can I find just the *.mp3 files with a recursive command like ls -R *.mp3 in a directory that contains several sub-directories and at the end copy these files in a directory that I choose.  Thanks for your support. shred multiple hard drives Does mass distribution/center of mass affect free fall? An everyday is example would be cars. If you were to drop a car, not taking air resistance into account, would a front-heavy car tumble forward as it fell? And a car with a perfect 50/50 front/rear weight distribution fall straight? Does mass distribution/center of mass affect free fall? Or would they both fall straight down without tumbling? Can you explain why please? Are there uncountably many surjections from $\mathbb N$ to $\mathbb N$? Statement: There are uncountably many surjections from $\mathbb N$ to $\mathbb N$.  Is the following proof valid:  The real numbers are uncountable.   There exists a bijection between the set of real numbers and the set of all functions from $\mathbb N$ to $\{0,1\}$.   Given a function, $f$, from $\mathbb N$ to $\{0,1\}$, construct a surjection from $\mathbb N$ to $\mathbb N$, denoted $g$, as follows:  We map the $n$th composite number to $n$, and the nth prime, to $f(n)$.   Clearly this is a surjection since the composite numbers are countable. Clearly different functions $f$ lead to different surjections $g$. Since there are uncountably many $f$s, there are uncountably many surjections $g$. Given a Lie group, how are you meant to find its Lie algebra?  The Lie algebra of a Lie group is the set of all the left invariant vector fields, but how would you determine them?  My group is the set of all affine maps $x \rightarrow A.x+v$ from $R^n$ to $R^n$ under function composition. I've got two arrays of the same size.  I'd like to merge the two so the values of one are the key indexes of the new array, and the values of the new array are the values of the other.  Right now I'm just looping through the arrays and creating the new array manually, but I have a feeling there is a much more elegant way to go about this.  I don't see any array functions for this purpose, but maybe I missed something?  Is there a simple way to this along these lines?  $mapped_array = mapkeys($array_with_keys, $array_with_values); How can I run ssh-add automatically, without a password prompt? I want to communicate between several computers on my network (static Ethernet), through SSH. In order to do that I need to run ssh-add every time I log in on a specific machine, how can I do it so that it's set up once and it doesn't ask me for the passphrase every time I log in or reboot my machine?  I know that there is a way that you should add some lines to the bash_profile file, but I still need to type the password every time I reboot/log in to a specific machine.  if [ -z "$SSH_AUTH_SOCK" ] ; then     eval `ssh-agent -s`     ssh-add fi Rotate photo in moderncv I'm doing my CV with the template ModernCV Classic. I want to rotate my picture but the command used is \photo I don't know how to do that.  \documentclass[11pt,a4paper,sans]{moderncv}  \moderncvstyle{classic} \moderncvcolor{blue} \nopagenumbers{}  \usepackage[utf8]{inputenc}  \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage[francais]{babel}  \usepackage[scale=0.75]{geometry}  \name{John}{Doe} \title{...} \address{adress}{Town}{Country}  \extrainfo{age, nationality} \phone[mobile]{54466145745} \email{john.doe@mail.com} \photo[80pt][0.4pt]{Photo.jpg} \quote{Objectifs: ...} Displaying equations, how to combine strings and values without evaluating everything. When speaking with my mother a couple of days ago, I read to her a message I was sending to my cousin on her behalf ending with: "... the birthday of your youngest." [implying her child]  She immediately leapt on this and said that as my cousin only had two children, the use of the superlative was not permitted and the comparative must be used instead: "... the birthday of your younger child."  She was adamant that this was a solid grammatical rule that she was taught throughout her education.  As a younger Briton, I have relatively little formal grammatical education to older people who were better taught in this regard, so I usually defer to her on grammatical rule knowledge.  Is she right?  Are superlatives not permitted when the domain of the object is only two?  To me it seems bizarre.  The minimum or maximum of any set does not only exist when there are different minima and maxima, or indeed something which is neither. What is the correct way of installing BOINC software? When should static_cast, dynamic_cast, const_cast and reinterpret_cast be used? What are the proper uses of:   static_cast dynamic_cast const_cast reinterpret_cast C-style cast (type)value Function-style cast type(value)   How does one decide which to use in which specific cases? I am looking at  (dual low-voltage power amplifier). On the fourth page, there is a sample circuit; right at the V+ input there is a symbol that looks like a capacitor. However, it looks like it is shaded in. What is that? Showing a tensor is not a simple tensor Let $(e_1,e_2)$ be the standard basis of $\mathbb{R}^2$. Why can the element $e_1\otimes e_2 + e_2\otimes e_1$ in $ \mathbb{R}^2\otimes_{\mathbb{R}} \mathbb{R}^2 $ not be written as a simple tensor $v\otimes w$ for $v,w\in \mathbb{R}^2$?  If we suppose $e_1\otimes e_2 + e_2\otimes e_1=v\otimes w$, then can we conclude that $e_1=\lambda e_2$ for some $\lambda \in \mathbb{R}$? This would give a contradiction since $e_1$ and $e_2$ are linearly independent. However, I am not sure if the argument is valid.