I am using an inline visual force page in standard layout where I have few links. Now clicking on it opens in a new tab, but my client wants to open it in the same tab itself.  I tried using window.open(url);  But this open in the same tab  I tried window.open(url,'_self');  This open the page inside the inline visual force page itself. but I want to open it in same tab? How to achieve this?`
I have a vf page that is a custom button. That's it.  this VF page is on a STD Page Layout. When the user clicks on the VF page, the parent window needs to be redirected to the new URL.  The way this is working, is that the new page is opening in the vf section of the page layout.   &lt;apex:page standardController="Opportunity"  standardStylesheets="true" extensions="OpportunityController" &gt; &lt;base target="_parent" /&gt; &lt;body style="background:#f3f3ec" &gt; &lt;apex:form &gt; &lt;center&gt;  &lt;apex:commandButton action="{!redirect}"  value="Change Record Type" rendered="{!render}"/&gt; &lt;/center&gt;   &lt;/apex:form&gt;    &lt;/body&gt; &lt;/apex:page&gt;
How to replace plain URLs with links? I am using the function below to match URLs inside a given text and replace them for HTML links. The regular expression is working great, but currently I am only replacing the first match.  How I can replace all the URL? I guess I should be using the exec command, but I did not really figure how to do it.  function replaceURLWithHTMLLinks(text) {     var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&amp;@#\/%?=~_|!:,.;]*[-A-Z0-9+&amp;@#\/%=~_|])/i;     return text.replace(exp,"&lt;a href='$1'&gt;$1&lt;/a&gt;");  } How do I choose grid and block dimensions for CUDA kernels? What is the meaning of p values and t values in statistical tests? After taking a statistics course and then trying to help fellow students, I noticed one subject that inspires much head-desk banging is interpreting the results of statistical hypothesis tests.  It seems that students easily learn how to perform the calculations required by a given test but get hung up on interpreting the results.  Many computerized tools report test results in terms of "p values" or "t values".  How would you explain the following points to college students taking their first course in statistics:   What does a "p-value" mean in relation to the hypothesis being tested?  Are there cases when one should be looking for a high p-value or a low p-value? What is the relationship between a p-value and a t-value? What does 100Ohm @ 100MHz exactly mean in ferrite beads? I am trying to understand the parameters of ferrite beads and having trouble in understanding the impedance vs frequency parameter.   What does 100Ohm at 100MHz exactly mean? Does it mean that the bead will provide impedance of 100Ohm for frequencies in the 100MHz region (depending on its graph)?  I do understand that bead is highly resistive at higher frequencies.  Any help will be appreciable. Speak Slower or Speak Slowlier? AFAIK the correct grammar for "speak slow" is "speak slowly" (slowly being an adverb). Please correct me if I am mistaken.  But in daily life I have not heard anyone saying "Speak slowlier".  I think I heard folks saying "Speak slower" but I also think it is incorrect.  Which is the best or correct form to convey the message?  Could that be the longish "Speak more slowly?" surjective immersion $\mathbb{R}^2 \to \mathbb{R}^2$ which is not a diffeomorphism Does there exist a surjective immersion $\mathbb{R}^2 \to \mathbb{R}^2$ which is not a diffeomorphism?  I tried to modify $\exp: \mathbb{C} \to \mathbb{C}$ to be surjective, but I find it hard to preserve the property of being immersion.  I also noticed that if we replace $\mathbb{R}^2$ with $S^2$ or any other compact simply connected manifold, no such immersion exists, because then it would be a covering map (as a local diffeomorphism from compact space, thus proper), but since the manifold is simply connected, it must be a diffeomorphism. What is a "closed" or "duplicate" question? Problem with tcolorbox package Local anchor for group master (move/translate/offset of group master moves group instances)? Let's say I start with the default Blender (2.64) file, except I set the cube to be 1 for all dimensions. At that point, the cube is at xyz location (0,0,0).  Then, let's say I select the cube with right mouse button, and go to Object / Group / Create New Group, and confirm the name "Group" in the "Create New Menu" bar with [Enter]. The selection outline turns green, meaning it's a group "master" (as far as I can see).  Now, let's say I press Shift-A; and choose "Group Instance" > "Group", and set the new instance to Z=2.3; with all selected, the view looks something like this:    Now, let's say I deselect all with A, then select the group master with right-click; and let's say I move it to Y=-2; then the result is:    ... that is, it is noticeable that the group instance/clone also moved in respect to its center (note the group instance axes, which remain in the set position)! Which means, I guess, that groups are defined in respect to the global coordinate center (0,0,0) as anchor.   My question is: is it possible to define a group, but in respect to the, say, bounding box center of the group as anchor - such that when I move/translate the group master, the group instances would remain anchored at their set position (basically, at the center of the group instance axes)? Also, is this documented anywhere in Blender documentation (I had problems finding this info)? Is “ ’s ” ever correct for pluralization? A relatively modern dictionary (I don’t know which one, because we’ve cut out the pages and used them as wallpaper in our bathroom, but I know it’s less than 20 years old) indicates that R’s is one correct pluralization of R, as is Rs, but whichever dictionary this is, it’s kind of a no-name brand, so I’m not sure I trust it.  I’ve always wondered what the best way was to pluralize single letters or numerals, like 2’s or 2s.  What’s correct? Ubuntu 14.04 System Logging I've set up an Ubuntu 14.04 Server (from an Ubuntu 12.04 Server) but today I wanted to look in the auth.log but this file is not used. It seems that ´syslog´ was deleted.  How does Ubuntu 14.04 log? I need this for a server.  Thank you. I need some help with the exercise I was assigned in math class. We were given a 3x3 square made of unit squares, and we wanted to paint all the squares. We had 3 sets of paint, red, blue, and green. Each paint was distinct from each other, but two unit squares with the same color were the same. Additionally, there's only enough paint of each color to color 3 unit squares, and all the paint has to be used. The goal of the exercise was to find the total amount of distinct possible ways such that no two unit squares that share an edge (that is to say they are next to each other vertically or horizontally, having same color across a diagonal is fine). I've started by trying to take a look at each possible arrangement of the bottom 3 unit squares, but I can't seem to find a pattern between it. Is there a better way than continuing by brute force? Any ideas on how I should proceed from here? How can I run scripts automatically when Ubuntu starts up so I don't have to run them manually after startup? How does "Reputation" work? How to configure Remote Desktop on my office Ubuntu machine and how to connect to it from my Windows laptop at home? Type safety: Unchecked cast In my spring application context file, I have something like:  &lt;util:map id="someMap" map-class="java.util.HashMap" key-type="java.lang.String" value-type="java.lang.String"&gt;     &lt;entry key="some_key" value="some value" /&gt;     &lt;entry key="some_key_2" value="some value" /&gt;    &lt;/util:map&gt;   In java class, the implementation looks like:  private Map&lt;String, String&gt; someMap = new HashMap&lt;String, String&gt;(); someMap = (HashMap&lt;String, String&gt;)getApplicationContext().getBean("someMap");   In Eclipse, I see a warning that says:  Type safety: Unchecked cast from Object to HashMap  What did I do wrong? How do I resolve the issue? Changing top, bottom, left & right margins on the fly I’m trying to find a way of being able to modify all of the margins of a page whenever I want to and as many times as I want to on a single page in order to be able to put text very easily where I want on a page.   I have thought of using the geometry package and using   \newgeometry{left=6.75cm, right=1cm, top=1cm, bottom=1cm}  %…  \restoregeometry   but unfortunately this only works for whole pages, so I can only change the margins once per page (and then they are valid for the whole page without having the possibility of changing them again).   I found the following script on the internet which enables users to change margins on the fly, just as I want to. The code below works fine and enables me to change the left and right margins of my page as many times as I want to, but unfortunately, it doesn’t give me the option of changing the top and bottom margins.  % placed before \begin{document}  \newenvironment{changemargin}[2]{% \begin{list}{}{% \setlength{\leftmargin}{#1}% \setlength{\rightmargin}{#2}% }% \item[]} {\end{list}}  % And then inside the document, whenever I want to use % the command to change the margins on the current page  \begin{changemargin}{1.9875cm}{-3.7625cm} % this means the left margin increases by 1.9875cm compared % to the default left margin (4.7625cm) (so left margin=6.75cm here) % and the right margin decreases by 3.7625cm (so right margin=1cm)  % ... (text or pictures in new environment)  \end{changemargin}   For this reason, I tried to adapt the code above and came up with the code below:  % placed before \begin{document} \newenvironment{changemargin}[3]{% \begin{list}{}{% \setlength{\leftmargin}{#1}% \setlength{\rightmargin}{#2}% \setlength{\topmargin}{#3}% }% \item[]} {\end{list}}  % And then to use the command: \begin{changemargin}{1.9875cm}{-3.7625cm}{1cm} % ... \end{changemargin}   It compiles and still changes the left and right margins but the top margin remains unchanged. (I haven’t yet tried to change the bottom margin).  Can anyone help me get this code to work completely, and enable me to modify the left, right, top and bottom margins of a page? Thanks. Show that $\dim H^0(\mathbb{P}^n, \mathcal{O}_{\mathbb{P}^n}(m)) = {n + m \choose n}$ if $m \geq 0$, and $0$ if $m &lt; 0$. This statement came up in an algebraic geometry text with no explanation provided, and I'm trying to understand why it's true.   Thoughts so far:   Since $H^0(\mathbb{P}^n, \mathcal{O}_{\mathbb{P}^n}(m))$ is the vector space of regular sections of $\mathcal{O}_{\mathbb{P}^n}(m)$ over $\mathbb{P}^n$, we can try to find a basis. Since the regular sections are the degree $m$ polynomials in $x_0, \dots, x_n$, it seems like the collection of degree $m$ monomials in $x_0, \dots, x_n$ should work. But I don't see how there are ${n + m \choose n}$ of these. Is it just a basic counting argument that I'm struggling with?  On a side note, I think I understand what global sections of $\mathcal{O}_{\mathbb{P}^n}(m)$ look like, but how can we describe the regular sections over a distinguished open set $D(f)$? Is it something like degree $m$ polynomials with denominator $f$? Is is possible to convert a .vdi file into a .iso that can be burned to a cd or dvd and make it like an installer. Or Is it possible to convert virtual machines to physical environments? MacTEX-2014, TeXShop 3.36.1 on Mac OS 10.9.5 -- when using hyperref I do not see the colored border that should appear around the hyperlinks in the pdf.  for example, when compiled with pdflatex, the code below should produce a pdf with a green border around the link on the right of "abc", but it does not. Any idea how to check where the problem is?  \documentclass{article} \usepackage{hyperref} \hypersetup{colorlinks=false,pdfborder=0 0 1,citebordercolor={0 1 0}} \begin{document}  abc \cite{123}  \begin{thebibliography}{99} \bibitem{123} efg \end{thebibliography} \end{document}    this is the list of files from the generated .log     File List   article.cls    2007/10/19 v1.4h Standard LaTeX document class   size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)   hyperref.sty    2012/11/06 v6.83m Hypertext links for LaTeX   hobsub-hyperref.sty    2012/05/28 v1.13 Bundle oberdiek, subset hyperref (HO)   hobsub-generic.sty    2012/05/28 v1.13 Bundle oberdiek, subset generic (HO)     hobsub.sty    2012/05/28 v1.13 Construct package bundles (HO)   infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)    ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)   ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)     ifvtex.sty    2010/03/01 v1.5 Detect VTeX and its facilities (HO)    intcalc.sty    2007/09/27 v1.1 Expandable calculations with integers (HO)      ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)   etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)   kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)   kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO)   pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)   pdfescape.sty    2011/11/25 v1.13 Implements pdfTeX's escape features (HO)   bigintcalc.sty    2012/04/08 v1.3 Expandable calculations on big integers (HO)     bitset.sty    2011/01/30 v1.1 Handle bit-vector datatype (HO)   uniquecounter.sty    2011/01/30 v1.2 Provide unlimited unique counter (HO)   letltxmacro.sty    2010/09/02 v1.4 Let assignment for LaTeX macros (HO)    hopatch.sty    2012/05/28 v1.2 Wrapper for package hooks (HO)   xcolor-patch.sty    2011/01/30 xcolor patch   atveryend.sty    2011/06/30 v1.8 Hooks at the very end of document (HO)   atbegshi.sty    2011/10/05 v1.16 At begin shipout hook (HO)   refcount.sty    2011/10/16 v3.4 Data extraction from label references (HO)    hycolor.sty    2011/01/30 v1.7 Color options for hyperref/bookmark (HO)     keyval.sty    2014/05/08 v1.15 key=value parser (DPC)    ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional    auxhook.sty    2011/03/04 v1.3 Hooks for auxiliary files (HO)   kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)     pd1enc.def    2012/11/06 v6.83m Hyperref: PDFDocEncoding definition (HO)   hyperref.cfg    2002/06/06 v1.2 hyperref configuration of TeXLive        url.sty    2013/09/16  ver 3.4  Verb mode for urls, etc.    hpdftex.def    2012/11/06 v6.83m Hyperref driver for pdfTeX   rerunfilecheck.sty    2011/04/15 v1.7 Rerun checks for auxiliary files (HO)    nameref.sty    2012/10/27 v2.43 Cross-referencing by name of section   gettitlestring.sty    2010/12/03 v1.4 Cleanup title references (HO)