I am trying to add styles via Javascript. For some reason unknown to me, I am getting an error that says my query selector is not a valid selector, even though my ids look correct. Can someone please help me to understand what is going wrong with my code?   var currentRow; var rowCol; for(let i = 0; i &lt; 3; i++) {     var x = i.toString();     currentRow = document.querySelector("#0");     for(let j = 0; j &lt; 3; j++)     {         y = j.toString();         rowCol = currentRow.querySelector("#" + x + y);         if(i == 1)         {             rowCol.style.border = "5px 'solid black'";             rowCol.style.border = "5px 'solid black'";         }          if(j == 0 || j == 1)         {           rowCol.style.border = "5px 'solid black'";         }     }  } &lt;!DOCTYPE html&gt; &lt;html lang="en"&gt; &lt;head&gt;     &lt;link rel="stylesheet" href="./tictactoe.css"&gt; &lt;/head&gt; &lt;body&gt;    &lt;script src="tictactoe.js"&gt;&lt;/script&gt;     &lt;div class= "header"&gt;     &lt;/div&gt;      &lt;div class= "main"&gt;         &lt;div id = '0'&gt;             &lt;div id = "00"&gt;x&lt;/div&gt;             &lt;div id = "01"&gt;x&lt;/div&gt;             &lt;div id = "02"&gt;x&lt;/div&gt;         &lt;/div&gt;         &lt;div id = "1"&gt;             &lt;div id = "10"&gt;x&lt;/div&gt;             &lt;div id = "11"&gt;x&lt;/div&gt;             &lt;div id = "12"&gt;x&lt;/div&gt;         &lt;/div&gt;         &lt;div class = "2"&gt;             &lt;div id = "20"&gt;x&lt;/div&gt;             &lt;div id = "21"&gt;x&lt;/div&gt;             &lt;div id = "22"&gt;x&lt;/div&gt;         &lt;/div&gt;     &lt;/div&gt;  &lt;/body&gt; &lt;/html&gt;
When creating the id attributes for HTML elements, what rules are there for the value?
How does Java's serialization work and when it should be used instead of some other persistence technique? I've been lately trying to learn more and generally test Java's serialization for both work and personal projects and I must say that the more I know about it, the less I like it. This may be caused by misinformation though so that's why I'm asking these two things from you all:  1: On byte level, how does serialization know how to match serialized values with some class?  One of my problems right here is that I made a small test with ArrayList containing values "one", "two", "three". After serialization the byte array took 78 bytes which seems awfully lot for such low amount of information(19+3+3+4 bytes). Granted there's bound to be some overhead but this leads to my second question:  2: Can serialization be considered a good method for persisting objects at all? Now obviously if I'd use some homemade XML format the persistence data would be something like this  &lt;object&gt;     &lt;class="java.util.ArrayList"&gt;     &lt;!-- Object array inside Arraylist is called elementData --&gt;     &lt;field name="elementData"&gt;         &lt;value&gt;One&lt;/value&gt;         &lt;value&gt;Two&lt;/value&gt;         &lt;value&gt;Three&lt;/value&gt;     &lt;/field&gt; &lt;/object&gt;   which, like XML in general, is a bit bloated and takes 138 bytes(without whitespaces, that is). The same in JSON could be   {     "java.util.ArrayList": {         "elementData": [             "one",             "two",             "three"         ]     } }   which is 75 bytes so already slightly  smaller than Java's serialization. With these text-based formats it's of course obvious that there has to be a way to represent your basic data as text, numbers or any combination of both.  So to recap, how does serialization work on byte/bit level, when it should be used and when it shouldn't be used and what are real benefits of serialization besides that it comes standard in Java? Repost it with a minimal working example for the amsmath must be loaded earlier than mathspec problem It's not part of the artwork and doesn't seem to be hurting anything, but I get this on a lot of client logos and I'm wondering how to get rid of it.   I think it's part of the artboard, but can't find anything to select/change/remove it. How about newlines within comments? I am aware that comments have only a simple field, with no formatting possible and that is fine (if formatting is needed, your comment should actually be an answer!)  But I find some comments hard to read because they are mainly one giant line (of up to 600 characters!). Any newlines entered during the redaction of the message is stripped from the published comment.    Would it be possible to preserve those newlines? (but may be deleting empty lines, to prevent abuses like a comment taking 600 lines because a prankster could find amusing to post a 600 newlines comment!)    Let's recap:   what we need (and can actually preview while typing a comment, making it more readable, both for the writer -- and the reader, should newlines being kept): declined for newlines (why? no reason given at this time.) what we don't need but is "nice to have" (even though we cannot preview those): granted for bold and italic text. what we really don't need (and cannot not preview): granted for... __code sample__!? Code sample? Seriously? In a comment?   In short: What was an incentive to post a new answer (because of the lack of formatting) is now further diminished. But the comments remain published as one long-hard-to-read-gigantic line. Here is a question from my number theory class.  Prove  $$(p-k)!(k-1)!\equiv (-1)^k \text{ mod p} $$ Help please! What animal is a “weefil”? What animal is depicted in this image labelled “weefil”? Can “due to” and “because of ” be used interchangeably? Is it fine to use due to in place of because of ? How about the other way around? Are any of these sentences ungrammatical?   He was lost because of the storm. He was lost due to the storm. He lost his way due to the storm. He  lost his way because of the storm. prove that : $\cos x \cdot \cos(x-60^{\circ}) \cdot \cos(x+60^{\circ})= \frac14 \cos3x$ I should prove this trigonometric identity. I think I should get to this point : $\cos(3x) = 4\cos^3 x - 3\cos x $ But I don't have any idea how to do it (I tried solving $\cos(x+60^{\circ})\cos(x-60^{\circ})$ but I got nothing) How does update work with programs installed from .deb file I'm having some difficulties exactly understanding how the the whole update thing work in Ubuntu and good practice for installing software.  I understand I have a  /etc/apt/sources.list file where all my repositories are listed, and that these repositories are queried when I use apt-get update - to later be used with e.g. apt-get upgrade.  This makes perfect sense and I recently installed spotify by adding deb http://repository.spotify.com stable non-free to this "sources" list.    But then I got confused...  When I went to download Google Chrome I merely had to download and grab a .deb file, and Chrome installed with no problem... but I don't see any new entry in /etc/apt/sources.list...  So how does apt-get update know where to query concerning Chrome updates?  Has it somehow been added to one of the already listed repositories in the sources file?  I would like all my installed software to be encompassed by the update function. Unknown Syntax Error in Code So, I am following a , and it is using Python code to create an audio visualizer in Blender. Now, I've always been a coding geek, but I don't actually know Python. I've taken a few shots at it but overall, I don't know Python, however, I can read and understand the code because I know basic programming concepts. Now, I'm following this tutorial as closely as I can (the tutorial does not provide code to copy and paste) and I am getting a syntax error. As far as I can tell, there is no syntax error. The line of code (specified by the error message) appears perfect. This line of code is supposed to set the 3D cursor to the active object's origin. Here's the catch: if I run that exact same line of code in the console, it executes just fine. So here's the error message I get:  File "C:\Me\Blender\Blender Projects\audio visualisation.blend\AudioVisualizer", line 17 bpy.context.scene.cursor_location = bpy.context.active_object.location    ^ SyntaxError: invalid syntax location: &lt;unknown location&gt;:-1   It tells me to look in the console for error message, but the console doesn't output anything.    Thanks!  EDIT: Alright. I've tried all the examples and all the procedures that have been suggested by you guys, but it keeps feeding me errors. According to the console, one of the problems it is spitting out is in C:\Program Files\Blender Foundation\Blender\2.74\scripts\modules\bpy\ops.py. This makes me think there is a bug in the API that is causing one of the many errors. EDIT: Here are the error messages I get for my code. Original Code:  Error:   File "C:\Gannon\Blender\Blender Projects\audio visualisation.blend\Audi o Visualizer", line 35     bpy.ops.graph.sound_bake(filepath="C:\Gannon\Blender\Sounds\Music\Batty McFa dden.mp3", low=i*step high=i*step+step                           ^ SyntaxError: invalid syntax    gandalf3's Code and zeffii's Code are essentially the same with alternative formatting which changes the line numbers where the error occurs.  Error: Unsupported audio format  Traceback (most recent call last):   File "C:\Gannon\Blender\Blender Projects\audio visualisation.blend\Audio Visua lizer", line 42, in &lt;module&gt;   File "C:\Gannon\Blender\Blender Projects\audio visualisation.blend\Audio Visua lizer", line 35, in spiral   File "C:\Program Files\Blender Foundation\Blender\2.74\scripts\modules\bpy\ops .py", line 189, in __call__     ret = op_call(self.idname_py(), None, kw) RuntimeError: Error: Unsupported audio format I need to add a new field in the @book or @InProceedings entries: this field is "tome", for I have for instance the following title:  Francesco Bertolini, Società di trasmissione orale: mito e folclore, in Lo spazio letterario della Grecia antica, a cura di G. Cambiano, L. Canfora e D. Lanza, vol. I, tomo I, Salerno, Roma 1992, pp. 47--75.   So the following code is not enough:  @InProceedings{ bertolini:1992,   author                   = "Francesco Bertolini",   title                    = "Società di trasmissione orale: mito e folclore",   booktitle                = "Lo spazio letterario della Grecia antica",   editor                   = "G. Cambiano and L. Canfora and D. Lanza",   publisher                = "Salerno",   location                 = "Roma",   year                     = "1992",   volume                   = "1,   pages                    = "47--75", }   Using othes codes, I was able only to produce the "tome" field, but with a general trouble about the other fields:  \DeclareSourcemap{   \maps[datatype=bibtex]{     \map{       \step[fieldsource=tome,fieldtarget=usera]     }   } } \DeclareFieldFormat{usera}{tomo\space{#1}}   \DeclareBibliographyDriver{book}{%   \usebibmacro{author/editor}%   \setunit{\labelnamepunct}\newblock   \usebibmacro{title}%   \newunit\newblock   \usebibmacro{journal+issuetitle}%   \setunit{\bibpagespunct}%   \printfield{pages}%   \newunit\newblock   \printfield{usera}%   \usebibmacro{finentry}} \renewcommand*{\finentrypunct}{}   (useful for articles, but not for my case). By real, I'm not able to understand  which bibmascros I have to invocate...  I tried to write a biblatex-tome.dbx:  \ProvidesFile{biblatex-tome.dbx}   \DeclareDatamodelFields[type=field,datatype=literal,skipout=false]{tome}   \DeclareDatamodelEntryfields{tome}   Inside the main .tex file I put just this code:  \DeclareFieldFormat{tome}{\mkbibacro{tome}\addcolon\space #1} \newcommand*{\patchmoretome}[1]{   \xpatchbibdriver{#1}%     {\printfield{tome}}     {\printfield{tome}%           \newunit\newblock      \printfield{tome}}%     {\typeout{patching #1 to include more tome succeded}}%     {\typeout{patching #1 to include more tome failed}}% } % patch all drivers \patchmoretome{article} \patchmoretome{book} \patchmoretome{collection} \patchmoretome{inbook} \patchmoretome{incollection} \patchmoretome{inproceedings} \patchmoretome{manual} \patchmoretome{periodical} \patchmoretome{proceedings} \patchmoretome{report} \patchmoretome{thesis}   but it doesn't print the field in bibliographic entry. So I'm very confused about a (re)writing of driver We should be able to find questions or answers that we have deleted I deleted one of my questions and would like to undelete it. This requires finding the question.  I think you shouldn't be prevented from seeing your own posts that you have deleted. It should be easier than me remembering the link or checking the browser history to easily look these up.   I would currently need 10K to see my deleted items and even then if I can find their URL. Is an HTTPS query string secure? I am creating a secure web based API that uses HTTPS; however, if I allow the users to configure it (include sending password) using a query string will this also be secure or should I force it to be done via a POST? What is the remainder of $\,3^{3^{3^{\:\!\phantom{}^{.^{.^.}}}}}\!\!\!$ divided by $46$?  The level of powers is $2020$.  First there is no parenthesis so it means 3 power of 3 which is also power 3 and so on 2020 times  Second I think that we can use Fermat's Little Theorem but I don't know how, and maybe there is a better way. Looking to achieve frame effect with shadows at corners $x^p-c$ has no root in a field $F$ if and only if $x^p-c$ is irreducible? How to make a Rigid Body fall off a conveyor belt? I've created conveyor belt and and two objects with rigid body physics. But the first object won't fall and second object falls backwards.  How can I fix it? It is true that $P(X&gt;t+s|X&gt;t)=P(X&gt;s)$ for certain values $t$ and $s$.  However, how can I show that this still holds if:   $T$ is a continuous random variable. That is $P(X&gt;T+s|X&gt;T)=P(X&gt;s)$ Both $T$ and $S$ are continuous RVs: $P(X&gt;T+S|X&gt;T)=P(X&gt;S)$   All the random variables are independent. Marketing Cloud Mobile Push SDK - Switching app user I'm currently building a clienteling app that integrated the Mobile Push SDK on both iOS and Android and encountered some issue on switching the account.  I found that when I login to user A, and set contact key to A, the Inbox Messages will be send to this device. However, I logout user A and switch to a user B, I should set the contact key to B. But seems the inbox messages are associated with the Device instead of Contact, I can still see the inbox messages that were sent to contact A previously.  My question is, how should we deal with this situation, to prevent from seeing the previous inbox messages if the contact key has been changed? How can I configure the Ubuntu Dock to show windows only from the current workspace? I would like my Dock to show only the windows of the current workspace. Especially in the little preview window. I find it very confusing to jump around workspaces when trying to find the right window.