Is it possible to change css class properities through javascript?  Suppose I have class foo with width properity, by using javascript I want too update the widthof that foo class.  Before => .foo {width: 100px;} After => .foo {width: 150px;}
It's easy to set inline CSS values with javascript. If I want to change the width and I have html like this:  &lt;div style="width: 10px"&gt;&lt;/div&gt;   All I need to do is:  document.getElementById('id').style.width = value;   It will change the inline stylesheet values. Normally this isn't a problem, because the inline style overrides the stylesheet. Example:  &lt;style&gt;    #tId {       width: 50%;    } &lt;/style&gt;  &lt;div id="tId"&gt;&lt;/div&gt;   Using this Javascript:  document.getElementById('tId').style.width = "30%";   I get the following:  &lt;style&gt;    #tId {       width: 50%;    } &lt;/style&gt;  &lt;div id="tId" style="width: 30%";&gt;&lt;/div&gt;   This is a problem, because not only do I not want to change inline values, If I look for the width before I set it, when I have:  &lt;div id="tId"&gt;&lt;/div&gt;   The value returned is Null, so if I have Javascript that needs to know the width of something to do some logic (I increase the width by 1%, not to a specific value), getting back Null when I expect the string "50%" doesn't really work.  So my question: I have values in a CSS style that are not located inline, how can I get these values? How can I modify the style instead of the inline values, given an id?
How do I grep for all non-ASCII characters? Will airlines compensate me if my entertainment system is not working? In long haul flights, if I get a seat and after take off I found out that entertainment system is not working, I asked a flight attendant to change my seat but she apologized because there are no empty seats to move to.   Is it common to ask for a compensation for such an inconvenience? do major airlines compensate you in such cases? "The package lists or status file could not be parsed or opened" Everytime I sudo apt-get update it always not complete and will say in the end  E: Read error - read (5: Input/output error) E: The package lists or status file could not be parsed or opened.   Same goes, when I try to install something and do sudo apt-get install &lt;some app&gt;  What should I do ? I admit, that my drive has bad sectors, could that be the reason? Is there anything else I can do? Large braces for specifying values of variables by condition How do I produce a conditional expression with large brackets? For example: X = 0 if a=1, 1 otherwise, with a large left bracket and specifying each condition in a line? Question mark or bold citation key instead of citation number I've browsed the forums and found a number of posts that have addressed this issue, but none of the solutions seem to work for me. I have the following script that I just copied from the bibtex home page to get familiar with it. Instead of the citation number I get a question mark. I compile using Latex+Bibtex+Latex+Latex+PDFLatex+ViewPDF just as has been previously suggested and the problem persists.   \documentclass[11pt]{article} \usepackage{cite}  \begin{document}  \title{My Article} \author{Nobody Jr.} \date{Today} \maketitle  Blablabla said Nobody ~\cite{Nobody06}.  \bibliography{mybib} \bibliographystyle{plain} \end{document}   My bibliography (Bib.bbl)  @misc{ Nobody06, author = "Nobody Jr", title = "My Article", year = "2006" }    Looking at previous posts one thing that is concerning is that my .bbl looks empty as shown below. Further, I don't have a .blg  \begin{thebibliography}{}  \end{thebibliography} if $f^{(n)}(x_0),g^{(n)}(x_0)$ exist and $\lim_{x\to x_0} \dfrac{f(x)-g(x)}{(x-x_0)^n}=0$ then $f^{(r)}(x_0)=g^{(r)}(x_0 )$ for all $0\leq r\leq n.$ Show:   if $f^{(n)}(x_0),g^{(n)}(x_0)$ exist and   $$\lim_{x\to x_0} \dfrac{f(x)-g(x)}{(x-x_0)^n}=0$$   then $f^{(r)}(x_0)=g^{(r)}(x_0 )$ for all $0\leq r\leq n.$   My attempt:  let n = 1,  since $f'(x_0),g'(x_0)$ exists then The taylor polynomial exists: $$T_{f,1}(x)=f(x_0)+f'(x_0)(x-x_0), \lim_{x\to x_0} \dfrac{f(x)-T_{f,1}(x)}{(x-x_0)}=0$$  $$T_{g,1}(x)=g(x_0)+g'(x_0)(x-x_0), \lim_{x\to x_0} \dfrac{g(x)-T_{g,1}(x)}{(x-x_0)}=0$$  Then, \begin{align} \lim_{x\to x_0} \dfrac{f(x)-g(x)}{(x-x_0)^n} &amp; =\lim_{x\to x_0} \dfrac{f(x)-g(x)+T_{f,1}(x)-T_{f,1}(x)+T_{g,1}(x)-T_{g,1}(x)}{(x-x_0)^n}\\ &amp;=\lim_{x\to x_0} \dfrac{f(x)-g(x)+T_{f,1}(x)-T_{f,1}(x)+T_{g,1}(x)-T_{g,1}(x)}{(x-x_0)^n}\\ &amp;=\lim_{x\to x_0} \dfrac{f(x)-T_{f,1}(x)}{x-x_0}-\lim_{x\to x_0} \dfrac{g(x)-T_{g,1}(x)}{x-x_0}+\lim_{x\to x_0} \dfrac{T_{f,1}(x)-T_{g,1}(x)}{x-x_0}\\ &amp;=\lim_{x\to x_0}\dfrac{T_{f,1}(x)-T_{g,1}(x)}{x-x_0}\\ &amp;=0 \end{align}  Then, \begin{align} \lim_{x\to x_0}\dfrac{T_{f,1}(x)-T_{g,1}(x)}{x-x_0} &amp;=\lim_{x\to x_0}\dfrac{f(x_0)+f'(x_0)(x-x_0)-g(x_0)-g'(x_0)(x-x_0)}{x-x_0}\\ &amp;=\left(f(x_0)-g(x_0)\right)\lim_{x\to x_0}\dfrac{1}{x-x_0}+f'(x_0)-g'(x_0) \\&amp;=0 \end{align} I am confused because  $\lim_{x\to x_0}\dfrac{1}{x-x_0}$ does not exist. Possible Duplicate:          Please, look at the picture?    Which calculator shows true result and how to prove achieved result? Let us go   is a correct construction in the English language and definitely not:     Let we go   However, the question is: since us is an object-case pronoun, what is the subject of this sentence? Does creating an object using reflection rather than calling the class constructor result in any significant performance differences? Big Greeks and commutation How to format/partition SD card? How can I format or partition SD card in Kubuntu?  Is there an application with GUI for this? Troubleshooting "Windows cannot be installed to this disk. The selected disk has an MBR partition table" Just looking for the difference between   2&gt;&amp;- 2&gt;/dev/null |&amp; &amp;&gt;/dev/null &gt;/dev/null 2&gt;&amp;1   and their portability with non-Bourne shells like tcsh, mksh, etc. Should north, south, east and west be capitalised? Should cardinal points be capitalised? Please give a reason why they should or should not. Baking lots of bread - keeping a yeast starter Like many people sheltering-at-home, I'm baking . My yeast supply is running low, and I'm not sure I'll be able to get more on demand. I'd like a simple way to make sure I have yeast on hand for my next batch. Could you all recommend a method for storing a starter culture?  Specifically:   How should I store it (how much? where? I have a fridge ~4C and a wine cooler ~13C)  How often should I feed it? With what? Should I divide the culture when feeding?  How much should I use when baking? Can I treat it like dry active yeast, or does it need more/less time?   For some other context, I'm a novice at making bread (I've made it a few times, and others in my family make it more often). I see lots of advice on sourdough starters, but am interested in something that's a replacement for dry active yeast (unless sourdough starters are actually easier to maintain). I found a  that was similar, but it focused on long-term storage of yeast and the answers did not describe how to use the starter.  Your advice is appreciated. Solving $\cos x=x$ I would like to know how can we solve the equation $\cos x = x$, without graphing. I know that  there would only be one solution, that is obvious, that too in between $0$  and $\frac{\pi}{2}$. Is there any real expression in finite terms [perhaps we call that closed form, I am not sure] that could give $x$ or $\cos x$. Although I have not studied Taylor series, I know that it only gives an infinite series, which is not what I want. I suspect that it could not be done, but can anyone explain me why?  Just for completeness, Wolfram Alpha, gives the approximate answer $x = 0.7390851332151606416553120876738734040134$, but fails to give a exact solution. For the following block of code:  For I = 0 To listOfStrings.Count - 1     If myString.Contains(lstOfStrings.Item(I)) Then         Return True     End If Next Return False   The output is:  Case 1:  myString: C:\Files\myfile.doc listOfString: C:\Files\, C:\Files2\ Result: True   Case 2:  myString: C:\Files3\myfile.doc listOfString: C:\Files\, C:\Files2\ Result: False   The list (listOfStrings) may contain several items (minimum 20) and it has to be checked against a thousands of strings (like myString).  Is there a better (more efficient) way to write this code? In addition to whatever files I may choose to exclude, what files does the system exclude by rule or classification?    It might make sense not to backup Trash or Caches, but I'm looking for a way to tell what files are skipped "behind the scenes." Knowing if the system maintains an exclusion list or exclusion pattern would be very helpful in managing larger groups of macs. How can I see the source of built-in JavaScript functions? note: this question has been updated to reflect that we are currently using MySQL, having done so, I would like to see a how much easier it would be if we switched to a CTE-supporting database.  I have a self-referencing table with a primary key, id and a foreign key parent_id.  +------------+--------------+------+-----+---------+----------------+ | Field      | Type         | Null | Key | Default | Extra          | +------------+--------------+------+-----+---------+----------------+ | id         | int(11)      | NO   | PRI | NULL    | auto_increment |  | parent_id  | int(11)      | YES  |     | NULL    |                |  | name       | varchar(255) | YES  |     | NULL    |                |  | notes      | text         | YES  |     | NULL    |                |  +------------+--------------+------+-----+---------+----------------+   Given a name, how can I query the top-level parent?  Given a name, how can I query all of the id's associated with a record of name = 'foo'?  context: I am not a dba, but am planning to ask a dba to implement this type of hierarchical structure and would like to test some queries. The motivation for doing so is described by .    Here is an example of the relationships among ids in the table:    -- ----------------------------------------------------- -- Create a new database called 'testdb' -- ----------------------------------------------------- SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';  CREATE SCHEMA IF NOT EXISTS `testdb` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci ; USE `testdb` ;  -- ----------------------------------------------------- -- Table `testdb`.`observations` -- ----------------------------------------------------- CREATE  TABLE IF NOT EXISTS `testdb`.`observations` (   `id` INT NOT NULL ,   `parent_id` INT NULL ,   `name` VARCHAR(45) NULL ,   PRIMARY KEY (`id`) ) ENGINE = InnoDB;  SET SQL_MODE=@OLD_SQL_MODE; SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;  -- ----------------------------------------------------- -- Add Example Data Set -- -----------------------------------------------------   INSERT INTO observations VALUES (1,3), (2,5), (3,NULL), (4,10),     (5,NULL), (6,1), (7,5), (8,10), (9,10), (10,3);