loop throgh all the data to search particular string
Find a value anywhere in a database
How do I add myself into the sudoers group? Possible Duplicate:          I've added myself back into the admin's group I think, by following   But I still can't do commands like:  sudo aptitude update   I get the message  oshirowanen is not in the sudoers file.  This incident will be reported.   How do I add myself into the sudoers group now that I am in the admin group? Scheduling a Batch job at a particular time I have a Apex batch class which I would like to schedule at a particular date time. The date time is stored in a variable and changes dynamically. ex Datatime scduleDateTime = datetime.now() ; I want to schedule the apex batch file to run at this datetime variable value.  How can I do that using system.scheduleBatch()  I started with this but could'nt see how I can specify a datetime variable in here:  datetime d = datetime.now(); sampleapexbatch b = new sampleapexbatch(d); System.scheduleBatch(b,'Sample Job',XXXXXXXX)   Any help is appreciated! Get total duration of video files in a directory I have a list of .ts files:   out1.ts ... out749.ts   out8159.ts  out8818.ts   How can I get the total duration (running time) of all these files? How to make a jquery click event fire only on first click Taken from :  Show that it cannot be the case that $U=X+Y$ where $U$ is uniformly distributed on [0,1] and $X$ and $Y$ are independent and identically distributed. You should not assume that X and Y are continuous variables.  A simple proof by contradiction suffices for the case where $X$, $Y$ are assumed discrete by arguing that it always possible to find a $u$ and $u'$ such that $P(U\leq u+u') \geq P(U\leq u)$ while $P(X+Y \leq u) = P(X+Y \leq u+u')$.  However this proof does not extend to $X,Y$ being absolutely continuous or singular continuous. Hints/Comments/Critique? When I create a new Date object, it is initialized to the current time but in the local timezone. How can I get the current date and time in GMT? What do you call a person who is never content with anything that is given to him? I am looking for an adjective for a person who, no matter what you give him/her (materially or otherwise), is never content and always expects more. Simple bijection $\mathbb N_0 \times \mathbb N_0 \to \mathbb N_0$ I'm looking for a 'simple' bijection $$ \pi \colon \mathbb N_0 \times \mathbb N_0 \to \mathbb N_0, $$  where 'simple' in this context means that it should be as easy as possible to define and it should be self-evident that said function is in fact a bijection. It's a quest for convenience - not minimal complexity in any rigorous sense.  Here are a couple of examples I came up with - none of which satisfy both requirements:   Let $\pi(m,n) = c(2^m3^{n+1})$, where $c \colon \{2^m3^{n+1} \mid m,n \in \mathbb N_0 \}\to \mathbb N_0$ is the order isomorphism (or in fact Mostowski collapse) of its domain under the natural ordering, Let $\pi(m,n) = \langle n,m \rangle$ - Gödel's pairing function, Let $\pi(m,n) = m \oplus n$ - the number resulting from '' $m,n$ (where we imagine both $m$ and $n$ as in infinite decks of cards whose $i$th element is labeled with its respective $i$th digit). ... Spacing before and after section titles How to add existing user to an existing group? I want to add the Apache user (www-data) to the audio group. I've read the man page for useradd, but I'm not having any luck. I'm running xubuntu 11.10. Here's what I'm doing:  $ sudo useradd -G audio www-data useradd: user 'www-data' already exists   If I leave out the -G option, bash, prints the help info for useradd:  $ sudo useradd  audio www-data Usage: useradd [options] LOGIN Options: -b, --base-dir BASE_DIR       base directory for the home directory...   It's not clear to me from the man page what options I should use to make this work. Why do I need 50 reputation to comment? What can I do instead? What is a loss function in decision theory? My notes define a loss function as the 'cost' incurred when the true value of $\theta$ is estimated by $\hat\theta$. What kind of cost is it talking about? monetary cost? or is it something related to errors? How to format a disk/sdcard as FAT32 in windows 10 Getting random row through SQLAlchemy I read (or do I say "have read"?) many rules for when to use the present perfect. I found them complex and hard to understand (or do I say "have found"?). I am finding it hard to apply these rules in real sentences.  Is there a simple and clear way to explain the difference between past simple and present perfect? If there is a simple explanation, please tell it! If there is no simple explanation, please tell why it is so complicated. Maybe if I knew why there is no simple explanation, that would help me understand what work I need to do in order to learn the difference. "Heard me [infinitive]" vs. "heard me [present participle]"             At that time, you wouldn't have heard me talk about it.   At that time, you wouldn't have heard me talking about it.         At that time, you wouldn't have heard me condemn it.   At that time, you wouldn't have heard me condemning it.         Which one of the above sentences are incorrect and why? How to rename a group of files with what looks like a Windows file path in their names I got a bunch of files with the filename messed up. All the file names have the same beginning which appear to be windows file directories. The problem is there are 700+ files and I really don't want go through and manually rename all of them. These are examples of the file names (Note: None of these have file directories):  G:some\really\long\file\path\then\the\name1.jpg G:some\really\long\file\path\then\the\name2.png G:some\really\long\file\path\then\the\filename.txt G:some\really\long\file\path\then\the\file_name.mov ...   The important take away is that each file has G:some\really\long\file\path\then\the\ before the file name that I would like.   So I would want the above files to look like:  name1.jpg name2.png filename.txt file_name.mov   I've tried the rename command and was not successful. I am still new with Linux and really am not sure on how to go about it or really what to google. Any help would be appreciated. Modern electronics industry has developed very efficient LEDs with nice and fancy colors (“true green” , “cyan”, and “blue”) based in InGaN technology, or similar. Some of these LEDs are specified as having forward voltages of 3.2 to 4.2 V. Here are examples of such LEDs, , or surface-mount .  But the usual MCUs are powered from 3.3 V supply, and the GPIO output is usually at 3.1-3.2 V, which seems to be barely enough to drive these LEDs . How can I use these LEDs as indicators of some signal statuses, or power rail status? Do I need a series resistor R1 here?    If yes, how do I choose its value?  DISCLAIMER: This "question-answer" comes as elaboration of the original question , to address the particular use case of LEDs as logic state indicators. Does anyone know what this probability question is asking? Tor browser not opening