I've come across this expression ((void)(obj), (size_t)0)  What purpose does this expression (that looks like half a function signature) serve here?   :   #define ers_alloc(obj,type) ((void)(obj), (type *)aMalloc(sizeof(type))) #define ers_free(obj,entry) ((void)(obj), aFree(entry)) #define ers_entry_size(obj) ((void)(obj), (size_t)0) #define ers_destroy(obj) ((void)(obj), (void)0) #define ers_chunk_size(obj,size) ((void)(obj), (void)(size), (size_t)0)
What does the , operator do in C?
I am currently reading about the interactions between light and matter, but I keep coming across conflicting explanations.  My initial understanding (using classical electrodynamics) was that light (EM) waves do not actually travel through glass. Instead, they are absorbed by the atoms and/or electrons within the glass, which then emit new EM waves. The new EM waves emitted by the energised particles make up the forward-radiation, which is the light observed from the opposite side of the glass. So it appears as if light is travelling through the glass, but it's actually being absorbed and then re-emitted with (mostly) the same properties.  The article  by Chad Orzel, based on a related SE question, confirms the above:      To understand the propagation of a wave through a medium, you can   think of each component of the medium– atoms, in the case of a glass   block– as being set into motion by the incoming wave, and then acting   as a point source of its own waves.   But an answer to a different but related question,  conflicts with the above:     the electrons in glass are tightly bound to atoms so they are not free   to move like the electrons in a metal and therefore they do not absorb   the photons.   I know the above is referring to the quantum electrodynamics understanding, but I think it still conflicts as it claims that EM waves are not absorbed by the electrons in glass because they are too tightly bound to their atoms.  Also, the  provides a small explanation of the mechanics behind refraction within glass, which kind of conflicts with both of the above:     In the case of dielectrics such as glass, the electric field of the   light acts on the electrons in the material, and the moving electrons   generate fields and become new radiators. The refracted light in the   glass is the combination of the forward radiation of the electrons and   the incident light. The reflected light is the combination of the   backward radiation of all of the electrons.   From my understanding, the above claims that some of the light is absorbed and re-emitted by the electrons (which conflicts with the linked answer), and that the rest of the incident light travels through the glass (makes up the rest of the refracted light) (which I think conflicts with the linked article, claiming the light is absorbed (although the article doesn't technically state whether all of the light is absorbed and re-emitted, so maybe that's where I'm going wrong(?))  I'm sure this is my misunderstanding, so I would be very grateful if you could clear it up for me:  When a light wave is incident on a sheet of glass, do the particles that make up the glass absorb the waves and re-emit them in the forward direction? Or do the light waves manage to travel through the glass, without being absorbed and then exit the glass? Why can't I change directories using "cd" in a script? I'm trying to write a small script to change the current directory to my project directory:  #!/bin/bash cd /home/tree/projects/java   I saved this file as proj, added execute permission with chmod, and copied it to /usr/bin. When I call it by: proj, it does nothing. What am I doing wrong? If n is such that every element $(\mathbb{Z}/n\mathbb{Z})^{\times}$ is a root of $x^2-1$. Prove that $n$ divides 24. I want to know how EXACTLY the WPA password gets encrypted  I have been searching through and I was able to catch:   The actual password is converted to some hash Salting is applied to the hash The operation is not reversible The hash comes with the 4-way handshake   So what kind of hash is it converted? like, SHA1? MD5? and how the salting process is done? like, is the SSID appended to the password before the hashing operation?  Or maybe I have some misunderstanding here? Iterating over array of objects javascript - odd behaviour? We just got a new laptop (ASUS) though we did have a mac.  We are trying to log onto Mojang to download Minecraft and it keeps saying, "The username and password are not recognized."   We have done all the usual procedures; we have reset the password, we are using the email, not the username to sign in, and it looks like the minecraft login servers are working etc. etc.  We quit Minecraft on the old computer and shut off that computer thinking that was the issue.   Still, we can't get onto Mojang.  We are accessing mincraft through firefox and trying to download it to the new computer but we can't get into the account to do that!  What in the world could be the issue? TSQL Script Execution Through Power shell, Special Characters Rendering Problem We have a simple T-SQL script file (.sql), which we execute through Powershell. Everything works fine, except the script portion, where we are using some special characters as string (example: 'ô' ).   The same script works fine, if I just execute it through SQL Server Management Studio, but through Powershell it's not rendering these special characters properly.  Here how we access the script file to execute on all databases on instance  Add-PSSnapin SqlServerCmdletSnapin100 Add-PSSnapin SqlServerProviderSnapin100 invoke-Sqlcmd -InputFile "C:\DailyPatch\run.sql" | Out-File -filePath "C:\DailyPatch\dbname.txt"  $text=Get-Content C:\DailyPatch\dbname.txt $a = $text.length $a=$a-3  $logFile = 'C:\DailyPatch\dblog.txt'  for ($i=3 ; $i -le $a ;$i++) {        write-host $text[$i]     $error.clear()      Invoke-sqlcmd -inputfile "C:\DailyPatch\Script4AllDBs.sql"-database $text[$i]-OutputSqlErrors $true|Out-File -filePath "C:\DailyPatch\dbname.txt"      foreach ($rr in $error) {         $text[$i] &gt;&gt; $logFile         $rr &gt;&gt; $logFile     } }   How to set collation in Powershell to avoid such kind of issues?  ps. Unicode thing is already handled on script side  Added: Special characters are being changed to � (Replacement Character) Modify all bash commands through a program before executing them I am trying to create a program which require such feature. The flow will be like:   User enter a bash command User hit the enter My script will get command, current directory,.. as variables. Program can optionally modify the command. Modified command will get executed normally.   Is there any way to do this?  Note: I need this for my personal use, I am not going to distribute this program. How to prevent search engines from indexing a single page of my website? Escape Key in the Chat How could Luke hide from Vader during the duel on Death Star II? In Return of the Jedi, Vader throws his lightsaber at Luke causing the catwalk come crashing down. Luke uses this in his advantage and hides from him under the throne room platform. Unable to locate his son, Vader tried to lure Luke out of hiding.  But how could Luke conceal himself from Vader in the first place? Did he use a Force power of some kind to blur Vader's sensors? I mean, the underneath of the platform was pretty much an open space with very little possibilities for hiding. The only places I see in the movie are the openings on the both sides of the floor (pointed by the yellow arrows):    The background of a close-up to Luke doesn't give much of a clue (although there is a round shape which could be the bottom of a window frame):    But as Luke reveals himself, he appears to be beneath of the staircase to the dais, right in the middle of it:    There's no way he could have hidden there all the time, because just a couple of seconds before, Vader walked towards and stared at the very same spot:    My first ideas were that Luke used the Force to make himself invisible, or to teleport him to the position. But after taking a look at one of the cross sections of the Emperor's throne room, I assume Luke could have slid almost straight under the floor of the lower level (yellow arrow) and then later  back to the staircase (although we don't see it in the movie, and I'm not sure if Luke knew the ability):    Does someone know better? How can I set the processor affinity of a process on Linux? How can I set the processor affinity of a process on Linux? Parallel.ForEach Slower than ForEach How can I prevent iTunes from auto starting when I plug in an iOS device? It was either a short story or a novel. I read it about 20 years ago, and some vague memory of it stuck.  It's set in a future where everyone's allotted role is decided by a series of tests once they reach a certain age. They are then classified into a group which decides what jobs they will do.  Our hero rather controversially gets a perfect score in the tests. Nobody had done that in a long time. and at first he worries about what this might mean. He is sent to work for the mysterious scientists who maintain the computer that runs society. Most people don't know they exist. He is disappointed to learn he has to be their tea boy, and learn a tea making ceremony perfectly.  In the process he learns how to fool the machine, and eventually to circumvent the controls society has placed on him. He makes several visits to an area outside the control of the machine - where people are living in poverty and lawlessness.  Can't remember the author, or the name, just that basic idea, and the fact that early in the book is a very grand "tea ceremony" where he must make the tea perfectly. This problem is from a practice exam I was working on.     What is the cardinality of the quotient $\mathbb{Z}[x]/(x^2-3,2x+4)$ ?   Thoughts. If I find a ring that is easier to handle then this then I can go from there. So I think this is isomorphic to $\mathbb{Z}_2[x]/(x^2-3,x+2)$. And then I am stuck.  Am I correct so far? What should I be looking to do from here?  Thanks for your time and your answers. How do you give a C# auto-property an initial value?  I either use the constructor, or revert to the old syntax.    Using the Constructor:  class Person  {     public Person()     {         Name = "Initial Name";     }     public string Name { get; set; } }   Using normal property syntax  (with an initial value)  private string name = "Initial Name"; public string Name  {     get      {         return name;     }     set     {         name = value;     } }   Is there a better way? Compare dates in query from IMPORTRANGE and cell for a few days I'm stuck at comparing two dates.  In a big table with dates as columns and products as rows, we want to display the amount of sales per day per product.  What the following query does:   Import our sales via IMPORTRANGE query the specific sales for a given day and product ID return 0 if there is an error (e.g. not found) count the result   This is a working query with the date 2018-03-26 hard coded:  =COUNTA(IFERROR(query(IMPORTRANGE("1OHR0nr_w3oFNNxtMxRwv65xncCBRpK-vV3vvqmHGFPo"; "Sales March!A:K"); "select Col6 where Col6 = '"&amp;$A95&amp;"' and todate(Col11) = date '2018-03-26'"; 0)))  It shows how many sales a specific product has on the specified date.  Now I want the date from a cell in the sheet:  =COUNTA(IFERROR(query(IMPORTRANGE("1OHR0nr_w3oFNNxtMxRwv65xncCBRpK-vV3vvqmHGFPo"; "Sales March!A:K"); "select Col6 where Col6 = '"&amp;$A95&amp;"' and todate(Col11) = date '"&amp;$AR3&amp;"'"; 0)))  But this doesn't work. I tried A LOT of things for the past 3 days but I have no idea if I did that wrong (I'm a beginner) so I'm turning to you. What might be wrong with the date comparison in this section?  "select Col6 where Col6 = '"&amp;$A95&amp;"' and todate(Col11) = date '"&amp;$AR3&amp;"'"  You can see it  in Column AR Row 95 but I can't give edit rights. Possible to click on an object in the viewport and the object list hierarchy automatically goes to that object also? How to get RGB values from UIColor? I'm creating a color object using the following code.  curView.backgroundColor = [[UIColor alloc] initWithHue:229 saturation:40 brightness:75 alpha:1];   How can I retrieve RGB values from the created color object?