How to freeze the editing of textfield?
Enable copy and paste on UITextField without making it editable
How to logout an user from the connected app? NOTE: I am not interested in calling /secur/logout.jsp since it ends all the active salesforce sessions.  I am developing a web application that is registered on salesforce as a connected app, so I am using salesforce credentials to authorize the user.  Application is developed in REST API and the communication with salesforce is happening in restful manner.   Auth url:   Authorization:  Method 1: If there is no salesforce session active, The user is taken to salesforce login page, where he enters his salesforce details to be authorized and after which he is taken to home page of my web application.  Method 2: If there is already a salesforce session active in another tab, the user is directly authorized and is taken to home page of my web application.  Now I am trying to implement logout button for my application, such that the following scenarios are covered,  Scene 1: The user is authorized using method1, and the user press the logout. Upon trying to logback the user is prompted for credentials.  Scene 2:  The user is authorized using method2, and the user should use logout to logout of the web application (not from active sessions). Upon login, the user should be again able to login using method2.  Can someone help me on how to implement the logout button such that it covers scenario 1 &amp; 2.  Thanks in advance. Relative log file matching with linux? How to append multiple lines of text to a file? A new version of Ubuntu has been released. I still can't find it on ubuntu.com. Where can it be downloaded from, or is it the only way to install it using update-manager to upgrade an existing installation? Disabled submit button on form vs allow submit then show errors? Clothing store access in Pokémon X & Y Once the player obtains access to Lumiose City for the first time, they'll be able to visit Boutique Couture from the city's Vernal Avenue (South fork, connecting from South Boulevard). Upon entering the store without performing any other actions, the player will be turned away and informed they "aren't stylish enough" and that they should visit more places in Lumiose City before visiting again.  This description is dubious, and doesn't inform the player of what they need to accomplish to gain access. Specifically:  Even beating the game (completing the Pokémon League) fails to allow access, as does modifying the player's look, visiting most shops in all areas of Lumiose City, and performing all hair stylist, PR studio, and associated actions. Completing a set of triple battles in Restaurant Le Wow did set the event flag that allowed access in my copy of Y, but it is not clear if this is the only requirement for access.  So other players may benefit, and so I know how to repeat this process if I obtain a copy of X or the future release of Z, what exact requirements yield access to this store for the first time? I am trying to design a circuit and was wondering how to design it that the 12V 800mAH NimH battery I am using will not overcharge. I have researched trickle charging and as far as I understand, a zener diode that regulates the voltage down to about 13.3-13.7V should do. I chose a 14V Zener, taking into account the .6-.7V drop.   I have heard that trickle charging is not the best for the battery, but am not sure how much more work designing a smart charger would take.  I was also thinking of using another diode to prevent flow back to the panels from the battery.         &ndash; Schematic created using  The three voltage sources on the left represent the solar cells, with the NiMH battery on the right.  I was wondering if I needed any additional components if I were to use three 5.5V solar cells in parallel outputting 40mA (16.5V total at 40mA, regulated to 13.3V by the zener) in order to prevent overcharging.  A similar question to mine was asked at  However, this dealt more with a larger lead-acid battery and used a voltage regulator with a schottky diode.   This link discusses almost my exact same question, but I was confused to the answer given which said that up to 1.45V per cell could be charged, taking my max charge voltage up to 14.5V.   Considering I am only outputting 40mA to an  800mAH battery, it seems that I may not need any more battery protection, but would love any input. Unable to edit my response to a locked question The image is broken in my  to the "favorite programmer cartoon" question. I'd be happy to fix this, but I can't (not enough rep? not a moderator?).  Here's the image in the Internet Archive: How would you go about finding out how much memory is being used by an object? I know it is possible to find out how much is used by a block of code, but not by an instantiated object (anytime during its life), which is what I want. How to prevent iTerm2 from creating overlaps and broken lines after pasting multiline chunks of text? If I paste multiline chunks of text into iTerm2, I always a get mess of output. It seems limited to only some programs running interactively (such as Bash, IRB - Python / VIM work flawlessly). Using Apple's native Terminal, I can paste whatever I want wherever I want - it works. For example, this sample text ():  echo Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. echo Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. echo Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. echo Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. echo Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ut gravida lorem. Ut turpis felis, pulvinar a semper sed, adipiscing id dolor. echo Pellentesque auctor nisi id magna consequat sagittis. Curabitur dapibus enim sit amet elit pharetra tincidunt feugiat nisl imperdiet. echo Ut convallis libero in urna ultrices accumsan. Donec sed odio eros. Donec viverra mi quis quam pulvinar at malesuada arcu rhoncus. [snip]   pasted into IRB produces this in iTerm2:    while it produces this in native Terminal:    I am running the latest versions of OSX and iTerm2. What's going wrong here? How do you prove the second law of thermodynamics from statistical mechanics? How do you prove the  from statistical mechanics? To prove entropy will only increase with time? How to prove? Please guide. I have an object already created in blender, a tree, or a human, or a pipe.. and I need this to be drilled with multiple holes.   The holes are painted in an image, that is, it is an image that has a repeating an images pattern (they can be circles, squares, or any form).  Here are some examples for drilling-pattern: Install on, install in, install to When I say "programs to install on a new PC" it sounds alright to me, but I'm not sure if it's the correct usage. Which one of the following should I use?   Programs to install on a new PC Programs to install in a new PC Programs to install to a new PC What was missing in Dirac's argument to come up with the modern interpretation of the positron? I'm working through Rotman (1994). It's the 2nd chapter where my curiosity lead me to a question that is not from the book. Here's the problem that inspired the question:      2.8. Imbed $S_n$ as a subgroup of $A_{n+2}$, but show, for $n\ge2$, that $S_n$ cannot be imbedded in $A_{n+1}.$    Since the alternate subgroup has the property of even parity, I thought that a little investigation of parity for the second and third symmetric groups was in order. So I constructed a table for each of them, grouped by even and odd number of disjoint products.   I'll forego writing the actual table and simply provide the answers. In symmetric groups with an even idegree, two even permutations come together under composition to produce an even permutation. Two odds also make an even. Two different parities produce odd elements.   When the symmetric group has an odd degree, e.g. $S_3$, two odds make an odd, two evens make an odd, and two different parities make an even element. Exactly the opposite results from the symmetric groups with even index.   Two questions: is this enough to prove the $A_{n+1}$ case? And can this be generalized modulo 2 e.g. $A_{2n+1}$? solution :-  $21= 3 \times 7$  there is only one Sylow $3$ and Sylow $7$ subgroup  so, Sylow $3$ and Sylow $7$ subgroup are normal in group $G$  so $G$ is cyclic group of order $21$.  Am I right ?  somebody told me that group of order $21$ is not cyclic.  he gave me this .  If group of order 21 is not cyclic, then can we understand it by Sylow method ? input to pic with 12V and resistors I have 12V, Use these 12V to power a device (that has a 12V output signal) and to power a 7805. After the 7805 there is a pic microcontroller where I would have to connect the output from my device. I was thinking of having 2 resistors in a 3/1 ratio in order to have about 4V at the pin of the pic. Can this be done, given that the ground is common, or will it give some sort of problem with the lm7805? 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 need to be able to compare some month names I have in an array.  It would be nice if there were some direct way like:  Month.toInt("January") &gt; Month.toInt("May")   My Google searching seems to suggest the only way is to write your own method, but this seems like a common enough problem that I would think it would have been already implemented in .Net, anyone done this before? I understand that faster-than-light communication is impossible when making single measurements, because the outcome of each measurement is random. However, shouldn't measurement on one side collapse the wave function on the other side, such that interference effects would disappear? Making measurements on "bunches" of entangled particles would thus allow FTL communication, by making observed interference effects appear or disappear. How does such an experiment not:  1) Clearly imply that faster-than-light communication is possible?  or  2) (if #1 is rejected) Imply that measurement of one half of an entangled pair does not cause the collapse of the other half's wave function.  Why doesn't this thought experiment clearly show that if we maintain that FTL communication is ruled out, we must also rule out "universal collapse" in the Copenhagen interpretation?  EDIT: Here is an example of an explicit experiment (though I think experts could come up with something better):  You can entangle a photon with an electron such that the angle of the photon is correlated with the electron's position at each slit of a double slit experiment. If the photon is detected (it's outgoing angle measured), then which-path information is known, and there is no interference. If the photon is not detected, the interference remains.   The experiment is designed such that the photon and electron go in roughly opposite directions, apart from the tiny deflection which gives which-path information. You set up a series of photon detectors 100 ly away on one side, and your double slit experiment 100 ly away in the opposite direction. Now you produce the entangled pairs in bunches, say of 100 entangled pairs, each coming every millisecond, with a muon coming between each bunch to serve as a separator.   Then the idea is that someone at the photon detector side can send information to someone watching the double-slit experiment, by selectively detecting all of the photons in some bunches, but not in others. If all of the photons are detected for one bunch, then the corresponding electron bunch 200 ly away should show no interference effects. If all of the photons are not detected for one bunch, then the corresponding electron bunch 200 ly away would show the usual double-slit interference effects (say on a phosphorus screen). (Note that this does not require combining information from the photon-detector-side with the electron-double-slit side in order to get the interference effects. The interference effects would visibly show up as the electron blips populate the phosphorus screen, as is usual in a double-slit experiment when which-path information is not measured.)  In such a way the person at the photon detectors can send '1's and '0's depending on whether they measure the photons in a given bunch. Suppose they send 'SOS' in Morse code. This requires 9 bunches, and so this will take 900 milliseconds, which is less than 200 years. The point is that such an experiment would only work if you assume that the measurement of the photon really does collapse the wave function nonlocally.