Should I learn C before learning Javascript?

Question: Would it be better to learn C before learning any type of WEB and desktop programming?
I don't know how to program, I want to learn Javascript and my friends suggested to me that I should learn C first.
Comment: This question might be more relevant on http://programmers.stackexchange.com.
Answer: No.
JavaScript may be one of the klunkiest languages ever, but it has one huge advantage over C: You can play with it. (I spent 10+ years coding in C. I had some fun, but I'd never call what I did "playing".)
My suggestion: Open up your favorite Web page, save it to disk, open up the JavaScript (or download it, if need be), and play. You'll learn a lot that way.
EDIT: Downvoters: Yes, there is a lot to like about JavaScript. But there's also a lot not to like.
Comment: some extra tips: 1: don't start with your favorite web page, better one with just a couple effects or data checks.  2: w3schools.org  3:douglas crockford
Comment: @Javier: I second your Douglas Crockford call. JavaScript isn't necessarily "one of the klunkiest languages ever" - you just have to use The Good Parts (see Crockford book)
Comment: Actually, we need someone else to enthrone beside Mr. Crockford; some (not all) of his programming skills are quite mediocre.
Comment: FWIW, Crockford warns that The Good Parts book is not for beginners or the faint-of-heart...
Comment: Upvote - You're a good man, Dan
Answer: If your intent is to learn Javascript, start with Javascript now.
The C language brings you a lot of general knowledge, but for Web programming it's better to start with HTML and Javascript. You need to answer yourself this question: 'how much time I can spend before be able to make money with programming?'
Answer: I actually think that JavaScript is one of the best languages to start programming with. Later, when you you really get it and you want to go deeper, C is something great to know. It gives you a much deeper understanding of how computers really work.
JavaScript really lets you get started fast, see immediate results, and ramp up to more complex concepts very fluidly.
The rest of my answer assumes you know practically nothing about programming - web or otherwise. Maybe you know a little html basics.
Open up a text editor. You can even just start with notepad or something. And put in the following:

Save the file as hello.html and open it in a browser. Poof! You've written a program. Doesn't get easier than that. No need to get into the command line or download or build anything. I remember when I first started being frustrated trying to get PHP running on my machine and wishing it was as simple as getting started with JavaScript.
The next step is just to read and explore. Documentation is freely available all over for learning more. I highly recommend anything from Douglas Crockford and JavaScript:The Definitive Guide.
A pretty good basic project would be a calculator program, but there's lots of fun things you can do. When you've gotten your feet wet, and you feel a little more confident, explore some other languages. Ruby is a pretty good step from JavaScript. By that point you'll probably know where to go yourself. You may never take the road to learning C. Even if you learn it, you will likely never really have to use it.
Comment: I'd argue that the program `puts "hello world"` is simpler :-p.
Answer: Don't pick a language to start learning.
Pick a project that solves a simple problem, then choose an appropriate language to solve that problem.
If you want to start a simple web application, then learning Javascript instead of C is a fine approach.
If you want to learn to write a desktop app, then Javascript is absolutely the wrong way to go about this.
BTW, if you're learning web applications, then you'll need to learn HTML, & some kind of web application backend language (which won't be C!). Javascript will be the least of your issues in this case too.
Answer: I think it depends on your motives - are you aiming to become a professional programmer? If so, there could be some value in learning C first.
Most entry-level programming subjects at University are taught in terms of C; it can give you a deeper insight into how software works. Also, K&R is a valuable programming manual in its own right.
If your aim is to create a simple set of DHTML pages, then by all means, jump straight into JavaScript. However, I think C can offer you a lot, if you're serious about programming.
Answer: No absolutely not. Learn an easy to learn language such as Python or Ruby that come with an interactive interpreter/shell that you can play around in. You wont have to save any files or refresh any browser, just execute right there on the command line. Best way to learn in my opinion.
Comment: Javascript has numerous REPLs of its own (firebug, rhino, spidermonkey all have consoles, along with chrome, safari, the address bar of ANY WEB BROWSER etc) so this on its own is no reason to try and learn ruby to learn javascript. Doesn't make any sense.
Comment: I'd also suggest starting with Python. "How To Think Like A Computer Scientist" is a great free book that will teach you how to become a programmer using the Python language: http://www.greenteapress.com/thinkpython/thinkCSpy/thinkCSpy.pdf
Answer: C is a difficult language, especially for a beginner, as it is much "closer to the machine" than many other languages, and has little bearing on the web-development framework/model
now, if you do learn C, everything else will seem easy ;-)
i would start with python or C# or something with more guardrails
good luck!
Answer: Definitely not.
C is a great language that can be used for a lot of things, but it operates at too-low a level for many of the needs of web and desktop software. When you are writing code, you want to focus on what makes your application unique among other applications in its domain. You don't want to deal with a lot of details that are not directly relevant. There are great (and bad) languages for writing web and desktop applications that will let you accomplish what you need faster. They may not be as elegant, but they'll get you where you want first.
C is important to understand how things work under the surface, but it shouldn't be a first priority.
Answer: Since you don't know how to program, I agree with recommendations here that you start with Python or Ruby, etc. First learn some basic concepts or programming and see if you like it. If you don't like it much, then learn only what you feel you need. If you love to write programs, then continue playing with Python/Ruby but at the very least make yourself familiar with C. Be comfortable enough in C to write moderate programs and definitely good enough to read someone else's C code. There is a lot of C code out there, and more being written all the time.
Answer: No.
Although C contains the raw power and flexibility which surpasses most modern languages, learning C would not give you much of an edge when transitioning to other languages.
I worked with C#, ASP.net and javascript before I started programming in C++.
Starting with a language like C# or java might be better for a beginner since it saves you the pain of having to worry about most of the core functioanality of your programs (s.a. memory management, data structures etc.)
But it would certainly be a great advantage if you could learn C and C++ (even assembly) as you move along.
Answer: Not at all.
If you already do HTML, and want to take it to the next level with JavaScript, then just do it.  read w3schools, Douglas Crockford essays, lot of sample code.  That, should be enough to get you rolling.
On the side, but without any hurry, do experiments with PHP, Python and maybe Java or C.  maybe you won't use any of them, but it would really make you a better programmer.
If, OTOH, you want to be a real developer, you do have to know C; but you don't have to start there.  i'd say start with one or two 'easy' languages (JavaScript, Lua, Python), then C/C++ heavily, then go for other ways, according to your chosen path.  the best three paths from there would be (subjectively, in my own opinion, etc):

scripting: Python, Lua, Scheme

web: 'deep' JavaScript, Java, PHP, Python
hardcore programming: more C++, LISP, Haskell
Answer: if you have any intent to create something useful, that is, something more than a hobby, yes learn C first, or even better spend some time learning how modern computer architectures actually work before spending any time telling them what to do.
it can be argued that javascript has little to nothing to do with C but C will force you to learn how things really work and therefore provide invaluable insight into performance, data storage and teach you what actually happens when you call some random library call that may be taking many orders of magnitude more time to execute than it needed to.
Answer: Learning C++(the new version of C) first would be best, at least it was for me because it gave me a general understanding of computers, and once I learned C++, all the other languages like Java, PHP, and even javascript was easily learned.
If you have no interest on how computers work, and just want to get to the fun designing part, start with HTML/CSS then javascript.
hope that helped!


Need advice on backing up my entire parity directory

Question: I'm developing a blockchain explorer and I want to backup my parity directory on Ubuntu. I've been pointed to directions on the Parity wiki for backing up but it only provides backup instructions for backing up my keys. I wish to backup my entire ".local/share/io.parity.ethereum" directory.
I'm thinking of just using rsync to backup that directory (after stopping parity with the command: "sudo systemctl stop io.parity.ethereum"). Has anyone done this to know if this should work well for copying over the entire parity directory? Any input would be greatly appreciated! Thanks in advance.
Answer: You are correct.
rsync -avzh $HOME/.local/share/io.parity.ethereum/ /path/to/my/backup/parity

If you want to export the keys only, they are located in:
$HOME/.local/share/io.parity.ethereum/keys

And if you want the blockchain or state only, you can directly export it via:
parity export blocks /path/to/chain
parity export state /path/to/state

Hope that clarifies everything.
Comment: Hey thanks so much for taking the time to answer that and offer the additional comments, that is very helpful! I really do appreciate it!


Is there a word for someone who inadvertently makes your point for you?

Question: For example: If a person tells another person, "You're racist" and the other person responds, "No, I'm not racist. But I just don't like to see Black and White people dating because it's not right", then the other person responds back, "Thanks for making my point."
Comment: "Is there a word for X" is a bit vague. Do you want a noun or an adjective? (or maybe even a verb)
Comment: Not sure if there's really a good word for this. I think you'd be better of just using a sentence as a dialogue response or as a description. Along the lines of, "You just proved my point!", or "That's an argument against your stance", etc. You might have a blank spot in your text/hypothetical conversation that only accepts words, but sometimes its better to just reimagine the entire text/conversation to allow a different approach. That said, there could very well be a perfect word out there for your purposes.
Answer: How about self-defeating? From Lexico:

self-defeating: (of an action) preventing rather than achieving a desired result; futile.

The person in your example is making a self-defeating argument, thereby inadvertently making your point for you.
Answer: Perhaps you are looking for this:
take the words out of someone's mouth

Say what someone else was about to say.

"You can only mumble 'You took the words out of my mouth… 'quietly while the boss praises them."
[Lexico]
Answer: One phrase which could describe such a person is
give (oneself) away

To reveal or make known—usually unintentionally—something about
oneself, such as one's actions, intentions, ideas, guilt, etc.

Margaret had been embezzling money from the corporate account for
years, but she finally gave herself away when she claimed her
two-month trip to Paris as a business expense. (freedictionary).

Aside: This may be beside the point, but I would also describe such a person as guilty. If you are not guilty, you have nothing to give away.


My air compressor electric motor is rated at 3hp/230v single phase It has a capacitor (black can)

Question: My air compressor motor is a 3hp/230v single phase. The plug is a 3-prong marked 250v. I've checked the L1 lead (black) at the motor proper and show continuity (ohmmeter) to the L2 lead (white). I wired the receptacle using a 20 amp breaker; running the white and black leads of 12/2 wire from the breaker to the L1 and L2 connections on the outlet with the ground (copper) going to the ground lug on the outlet. The motor does nothing wired this way. Move the white lead at the breaker to the ground bar in the panel and the motor will run but can't handle any load whatsoever which I understand is the norm for a 230v motor being run on 120v. What am I doing wrong?
Answer: You most likely have the black and white phase conductors on the same busbar in the panel.
I'm going to assume that this is a residential installation with 120V / 240V single-phase power.
Take a close look at your breaker panel.  You will see the two main bus bars running the length of the panel where the breakers mount.  You need to ensure that one side of the breaker connects to one bus bar and the other side of the breaker to the other bus bar.
Most breaker panels are manufactured so that so that adjacent breakers are always on opposite phases.  However, some older panels were built so that two adjacent breaker slots are on one phase, with the next pair of breaker slots on the other phase.  This pattern repeats over the entire length of the breaker panel.
This was done to accommodate large breakers (60 Amps or more).
Simply move your double breaker up or down one slot and you should be good to go.


What is an example of an uncountable collection of disjoint closed sets?

Question: In $R^2$. I was thinking of two disjoint sets, $A = \{(x,y)| y \ge 1, x > 0\}$ and $B = \{(x,0); x \ge 0 \}$. So I'm not really sure how to construct an uncountable collection of sets such as these.
Comment: Your $A$ isn't closed . . .
Answer: In a T1 space (of which a metric space like $\mathbb{R}^2$ is an example) every point set is closed, so it's enough to consider $\mathbb{R}^2$ as the disjoint union of its uncountably many points
$$ \mathbb{R}^2 = \bigcup_{x \in \mathbb{R}^2}\, \{x\}. $$
Comment: This is clearly the correct answer.
Answer: For example, in $\mathbb R$, let $\mathbb I$ be the irrationals. Each singleton $\{i\}\in \mathbb I$ is, of course, closed, and disjoint with every other irrational. So $\{\{i\}, i\in\mathbb I\}$ is an uncountable collection of disjoint closed sets.
Comment: . . . or just look at the reals. :P
Answer: How about lines?
Each line "$x=c$" (for $c$ some constant) is closed, and if $c\not=d$ then the lines $x=c$ and $x=d$ don't intersect.
Answer: Here's one $$A:= \left\{(x,f(x)),f: \mathbb R \to \mathbb R,\:\: \:
 f:= \left\{ \begin {array}{ccc}
=1 &if& x\in \mathbb Q\\
=0 &  & o.w. \end{array} \right.\right\}$$
Note that each element is a singleton in $\mathbb R^2$. And are obviously disjoint. As the set of singltons in $\mathbb R$ is uncountable this implies that $A$ as a collection of uncountable disjoint sets.


Would it be inefficient to call LWJGL from C++?

Question: I like LWJGL, but Java? Not so much. I recently found out a way to call Java methods from C++. But would this be inefficient? I mean, calling a C/C++ DLL from Java, just to be called back again into C++? I don't know the native method names in LWJGL. I find it better then GLFW, SDL, and all those libraries. But other than my preferences, how slow would it be?
Comment: Isn't LWJGL just a Java "port" of the OpenGL API? In that case, why not use the standard C OpenGL API? I have never used LWJGL myself, so I might be completely wrong.
Comment: Are there no C++ libraries that do the same LWJGL does?
Comment: It's a multiplatform port of the native API for Windows, Mac, and Linux that handles the whole window with OpenGL.
Comment: @user1870398 There are FreeGLUT and SDL.
Answer: Yes it would be inefficient. However it's up to you to decide if it is too inefficient. It depends on how often you would be calling LWJGL.
See https://stackoverflow.com/questions/7699020/what-makes-jni-calls-slow and http://220.127.116.11/docs/books/performance/1st_edition/html/JPNativeCode.fm.html. Chapter 9.2 Examining JNI Costs from the second link provides a benchmark result where Native->Java calls were almost 10 times slower than Java->Native calls.
Answer: You don't have to use LWJGL. LWJGL is specific for Java.
You could just use bare OpenGL or libraries such as FreeGLUT and SDL.
Answer: Inefficient compared to what?
Considering that LWJGL3 is mostly a collection of JNI and JNA bindings to C and C++ libraries it would be inefficient indeed, as you would create an overhead of having to have a JVM running and piping each method call to java and back to C++ again (mostly at runtime even), at almost no usability win whatsoever as LWJGL3 mostly mimicks the method calls and structures of the wrapped libraries. Instead of calling LWJGL3 from C++ you should instead directly use the libraries that LWJGL3 depends upon.
In that case, and indeed your case, that would be GLFW which is used by LWJGL3 to do all the windowing, input, OpenGL stuff and other heavy lifting. If you've been using any other of the bindings offered by LWJGL such as the STB libs you can find a full list of them and links to respective repositories on the LWJGL3 GitHub repo README.


Run a Parallel PHP Application with Wordpress

Question: I have a PHP based application that runs on the Google Maps API.  Most of it is written in straight PHP and Javascript, but I want to use some sort of CMS or tool to upload images, because there will be large numbers of images and categories to go with those images. So I want to use the "Media" portion of Wordpress to add/edit/delete images and then use some sort of Wordpress tag to add them to the page.  Any insights as to the best way to do this?
Comment: You can't just use "the "Media" portion of Wordpress" anymore than you can just use the "transmission portion" of a car without dismantling the car and building a new structure around it. That is a pretty broad request.
Answer: You can use the WP REST API plugin to add/manipulate/present media of a WordPress install from within your app. The page creation part I am not sure of, perhaps it'll need to be done manually - or you can create pages via the <code>/pages/</code> endpoint.
I'll let someone correct me if I'm wrong, but the API endpoints (which are available at the link as a plugin) either made it into core already, or are really close to it.


Magento Reinstallation

Question: My friend has been using Magento.  Now somehow some files from the hosting was deleted by him by mistake. Now if I go for a re installation, and use the existing data base will my old data be erased? I have seen that several files folders are missing.. What can be the possible solution?
Answer: If you are using just default Magento with out any of the extensions, then it is not necessary to worry about the data.
If your Magento contains any of the custom developed extensions, then you will be loosing that functionality. But if are sure you can re-install those extensions which you had lost by accidentally; then your functionality will be back. But be aware on installing those extensions because as you are new I hope that you are not aware of the location of the files that are going to be placed with extension.
In magento folders, it will just save the images to the media folder and all the remaining data will be saved to database. Till you dont touch the database, then there are no worries about the data.
Answer: In this scenario where you have a live installation I would look at what you have or can get before you start.
If you have full backups from within Magento  = system | media | database. Then you are in a strong position to totally re-install Magento.
I would also go to phpmyadmin and backup the database directly from there too.
FTP your Media folder as pictures etc will link to the database.
Save all the data on your hard drive. Not on the server.

So let us presume you have database backups from phpmyadmin and Magento system | media | database.

Option 1
Well even though you have backups I wouldn't go for a re-install - I would leave this to the last resort.
I would have a Magento clone. And test the data you have saved to see if it will work on a re-installation. Having done a few rebuilds from data it's not straightforward to go within Magento and click to revert to backups. In reality, the system backup doesn't and has never worked for me. reinstalling the Database is better done within phpmyadmin. And the Media folder is better done with FTP.
OK let's assume you now have a clone installation of Magento and have managed to load and successfully run the installation.
I would then be looking at one screen your Magento installation and the ftp to your friends' installation. to see what files are missing. Then simply transfer the files across.

Option 2
Again have a clone and look at the CORE files to skip through to see whats missing. Generally the CORE files don't change so they can be moved across.
If you have no installations of any plugins or themes then this makes your job easier because its a basic clone of installation files.

Option 3
Expand the Magento files and do a best guess whats missing by looking at whats on the server and whats on the files. Just manually see if there's missing files. I would have thought that the missing files are low down in the begging of the tree rather than tucked away.
Hope this has been of some help drop me a line if you get stuck.
Jonathan
email@example.com
Answer: we have faced same scenario with our client, then we did below steps to outcome with this problem. It takes around 2 days and no risk factor.

Copy your existing server files in your system
Placed default magento with same version
Installed file comparison tools (winmerge,meld, etc.)
Disabled custom extensions for local and community codePools.
Compare core files from tools and copy from default version to your existing setup those are missing.
After copying your missing files, run the installation on your existing setup
Enable to your local and community pools extensions.
Enjoy with your existing setup..

Magento Reinstallation


unsure how to remove objet from stage & it's arrays after collision detected

Question: The scenario: in Main, instances of class Bullet are spawned and added to the stage, and to the array bltarray, instances of class Enemy are spawned, added to the stage, and added to nmearray. This works fine.
The problem comes in seemingly sporadically, i.e. it works, then suddenly doesn't work soon after, when it doesn't work I get spammed with output errors and the score display is constantly rising, note it's the same instance of bullet and enemy.
Bullet instance98 hit Enemy instance45
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/removeChild()
at Main/everyframe()
Bullet instance98 hit Enemy instance45
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/removeChild()
at Main/everyframe()

What I don't understand is,
The code I'm using is below (also in main)
for (var j=0;j<bltarray.length;j++){
    if (bltarray[j].hitTestObject(nmearray[i])){
        trace("Bullet "+bltarray[j].name+" hit Enemy "+nmearray[i].name);
            score += 1;
            scorevalue.text = score.toString();
            // Remove dead objects from stage
            stage.removeChild(nmearray[i]);
            stage.removeChild(bltarray[j]);
            // Remove reference to objects from array
            nmearray.splice(i,1);
            bltarray.splice(j,1);
            trace('nmearray length:'+nmearray.length)
    }
}

The bullet and enemy classes both have their own REMOVED_FROM_STAGE event listeners to remove other event listeners.
While I'm at it, this error occasinoally pops up too.
TypeError: Error #2007: Parameter hitTestObject must be non-null.
at flash.display::DisplayObject/_hitTest()
at flash.display::DisplayObject/hitTestObject()
at Main/everyframe()

Answer: Looks like you might encountering a common problem when splicing during a for loop. Basically, when you splice an element from an array the next element immediately gets pushed up to that location, causing your for loop to not actually check every element.
Try switching your for loop to a reverse for loop and see what happens:
for (var j=bltarray.length-1;j >= 0;j--){
//do stuff
}

Edit: fixed the for loop to be length-1
Comment: TypeError: Error #1010: A term is undefined and has no properties.
 at Main/everyframe()

I'll put this into an if statement to ignore it when it's 0 and see if that helps...
Comment: @Paine Sorry, silly mistake - should be var j=bltarray.length-1


Will US CBP deny me entry because I broke a US lease in 2001?

Question: I was in America in 2001 but broke my lease on the apartment I was staying when I was leaving. I have been invited to a wedding; will I be allowed in? I am taking my wife and kids but am scared I will not be allowed back in because of this or even get arrested. I am from the UK.
Comment: @OP: it would be awesome if you could restructure your question a bit so that there are more commas and dots in particular after a sentence ends a dot is really helpful for many readers to read your post correctly as different writers tend to structure their posts in different ways so that without the dots they do not have the guidance to read your question correctly and quickly so please take the time to update your question accordingly many thanks
Comment: I would be very surprised if the CBP knows you've broken your lease.  In any event, if there is a judgment against you it will authorize a bailiff or the like to seize some assets in satisfaction of the judgment.  You would not be subject to arrest.  Since you presumably have no assets in the US, since they would have been seized already if you did, so you should be fine.
Comment: By "breaking my lease" do you mean that you didn't fulfill a contract you signed? Are you aware if the other parties of the contract attempted to take any action against you? In what state of the US was this?
Comment: @CMaster in some US states, at least, if not most or all, residential leases are not controlled by general contract law.
Answer: So you moved out early 14 years ago and are concerned that you are on the watch list? Highly unlikely.
Unless you made a complete mess of the place requiring a complete rebuild, your previous landlord did little more than not return your deposit and put a "for rent" sign in the window. This stuff happens every week, and it is simply not worth the building owner's time to make a case over it. Rental property is civil, not criminal, so the police aren't getting involved either. After 14 years any statute of limitations will have run out too.
If you moved abruptly for serious criminal reasons (drug manufacture, dead bodies in the storage room etc.) you might be in trouble, but in that case someone would have filed for an international warrant a long time ago.
Comment: One exception to this is if you where renting in Arkansas where some aspects of lease law are treated as criminal and not civil law, though it seems this primarily concerns evictions (failure to vacate).


Onboard temp sensor for household thermostat - accurate enough?

Question: Many microcontrollers, such as the TI MSP 430 have an on board temperature sensor. If one is designing a typical smart thermostat for heating/air conditioning is this sufficiently accurate or would there be any practical advantage to using an alternative sensor?
Answer: They are often wildly inaccurate.
Reason:

They are often not a temperature sensor at all, but actually a reverse biased diode.
They are affected by the heat generated by the core of the microcontroller while it's operating.

Proper temperature sensors (e.g., the LM35) are so cheap there is no reason not to use them.
Comment: @majenko, they are often pretty accurate, but they are measuring the temperature of the controller, not the environment!
Comment: If one is using a $1 to $2 microcontroller adding a LM35 might increase the cost by a significant percentage. Leaving cost aside, wouldn't a LM35 draw current continuously and thus substantially increase the power budget?
Comment: @JonnyBoats: Have a look in the datasheet: the quiescent current of a lm35 is in the range of 100µA + the current your ADC draws from it.
Answer: IMO using the on board sensor simply won't cut it. Majenko already talked about accuracy and self heating. I have an issue with the slow time constant of your solution: If for example a window is opened, the room temperature will fall within several minutes (let's assume it's cold outside). Every layer of material around your sensor will delay the reaction of the control system and thus worsen the system performance. You absolutely want to make sure, that the temperature sensor gets any change in room temperature ASAP. This means: Ventilation holes/slots in the housing of the control unit, I've seen even little fans in automotive applications to ensure a steady airflow around the sensor.
If reaction time is not an issue, you could try and account for the self heating of the chip in software, but this will only reduce the error for stable temperatures.
Answer: The obvious answer is to LOOK IN THE DATASHEET for your particular micro.  Well, is it accurate enough?  What are you expecting us to tell you that is not in the datasheet?
The few built-in temperature sensors I've looked at were pretty bad, certainly not good enough for a house thermostat.  In one case, is was supposed to be a forward biased diode driven by a current source.  That makes some sense, but it turned out the current source was little more than a resistor to Vdd, so the temperature sensor output was actually a stronger function of Vdd than of temperature.  We ended up using a external temperature sensor.  Fortunately they are small and cheap.
Comment: Olin: I probably didn't phrase my question very well, what I am asking is "what is good enough for a thermostat?" Also I wonder if there is a tradeoff between accuracy of temperature measurement and energy costs/savings?


How do receivers know what to output to radio speaker or TV screen?

Question: I understand that receivers are often used with mixers which take the sum and difference of two signals to make an output signal.  How does a radio signal of say 102.5 MHz know to tell the speakers to output a person singing, a guitar with distortion, and a drums all at the same time in the range of 20-20,000 Hz?  In the same vein, whenever a TV receives a signal for a channel of 150 MHz, how does it know what pixels to light up on the screen?  This may be an obvious question and I'm just not making a connection, but any further explanation would be appreciated.
Comment: Radios do not go about "outputting a signal of 102.5 MHz"  An (FM) receiver may have an _input_ signal of nominal bandwidth 200 kHz centered at 102.5 MHz, and it then extracts from this the audio signal of nominal bandwidth 20 kHz to send to the speakers. It does not _tell_ the loudspeaker to produce the sounds of a person singing plus a guitar twanging and a drum banging. You are anthropomorphizing the issue here.
Comment: First you must consider the nature of that sound coming from the speaker "all at the same time"; Once you understand that what you hear is power distributed across a *range of frequencies* (e.g., about 50 to 20,000Hz), it should become clearer that what a mixer does is shift these *ranges* around.
Comment: @DilipSarwate Thanks, I was getting some of my terms mixed up.  I edited the question.
Answer: First you have to decide how represent your signal. Sound is easy: a microphone gives you a voltage proportionate to sound pressure. If we send this signal (with amplification) to a speaker, you get a reproduction of the sound. But how do we represent this signal as a radio signal?
The answer is modulation. Perhaps the easiest modulation to understand conceptually is upper single-sideband modulation (SSB). Say your audio signal consists of frequencies from 20 Hz to 20,000 Hz. To modulate these as a radio signal, you just shift all the frequencies up. So, maybe you decide to shift them all up by 100 MHz. Now your audio signal is represented by radio waves instead of sound waves, at the frequencies 100,000,020 Hz to 100,020,000 Hz.
The receiver does the opposite. If the dial is set to 100 MHz, then it will receive the radio waves as a voltage from an antenna. It will shift all these frequencies down by 100 MHz, and then the output voltage is your audio signal.
SSB is easy conceptually, but it's not the easiest to implement electrically. Easier to implement would be amplitude modulation (AM). Frequency modulation (FM) is used for FM radio.
The signal being transmitted, the audio signal in our example so far, is called the baseband signal. If you want to send video, your job becomes more complex, because you have to somehow represent video as a time-varying signal. In the recently-past era of analog TV, this was done by breaking each frame into a raster, and having the signal represent the intensity at each point along the raster scan. Then you add to that some information to allow the receiver to synchronize its raster scan to the transmitters, and maybe more information to allow for color, and maybe yet more information to have sound at the same time. There are several standards that define the process in detail, which may vary by region.
Having accomplished the task of representing your video as a baseband signal, you can then select a modulation to translate it up to radio frequency. The receiver reverses the process.
These days, most things are becoming digital. Here, the baseband signal isn't an analog signal, but rather a stream of bits. One can then use any number of digital modulation methods to send these bits as an RF signal.


How can I let players "scrape away" one texture to reveal another?

Question: In this game I'm making, I want my players to be able to remove rust from an object based on collisions from another object such as a wire brush.  Since it's a VR game, performance is key.
I've been having a hard time getting on the right track; I think I'm not asking the right questions.  The closest I've gotten was a video about making a scratch-off lotto ticket.  Someone in the comments to that video says:

Good Idea. But, this isn't practical for any real world apps. It instantiates too many gameobjects. There are better more efficient ways of achieving this effect using shaders or render texture.

They don't really expand on that further, but I did do a little more searching to see how I might do this using shaders.  I found this video about using replacement shaders, but I'm still not sure if that's the right track.  I don't know If something like that is the smartest way to do it.
I'm basically a complete noob when it comes to shaders and textures so this is new territory for me.  I apologize if this is a duplicate question, I've tried searching but haven't found anything quite like what I'm looking for.  Please let me know if there's anything I can explain further, and any help that gets me pointed in the right direction would be greatly appreciated.
Answer: If you're okay with mesh colliders, take a look at this. The example describes a (primitive) version of what you want.
The next step would probably be to write a shader that takes three textures: a "rusty" version, a "clean" texture and a "splatmap" that stores where to apply which texture. Instead of the main texture, the script should paint into this splatmap.
All the shader needs to do is "fade" between the two textures. I'm at work right now and can't give you all the boilerplate from memory, but the relevant line should look something like this:
out.rgba = _rusty.rgba * _splat.r + _clean.rgba * (1.0 - _splat.r)

I'm using the splatmap's red channel here, any other will do as well. The splatmap can have a different resolution than your other textures so play around with that and pick whatever looks best on your object.
EDIT: Here's the final code that did the trick (made by OP).  DotClick.cs should be applied to the camera and ClearableShader should be applied to the object in question.
ClearableShader.shader:
Shader "Custom/ClearableShader"
{
    Properties
    {
        _Color ("Color", Color) = (1,1,1,1)
        _CleanTex("Clean Texture", 2D) = "white" {}
        _RustTex("Rust Texture", 2D) = "white"
        _SplatTex ("Splat Map", 2D) = "white"
    }
    SubShader
    {
        Tags { "RenderType"="Opaque" }
        LOD 200

        CGPROGRAM
        // Physically based Standard lighting model, and enable shadows on all light types
        #pragma surface surf Standard fullforwardshadows

        // Use shader model 3.0 target, to get nicer looking lighting
        #pragma target 3.0

        sampler2D _CleanTex;
        sampler2D _RustTex;
        sampler2D _SplatTex;

        struct Input
        {
            float2 uv_CleanTex;
        };

        half _Glossiness;
        half _Metallic;
        fixed4 _Color;

        // Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader.
        // See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing.
        // #pragma instancing_options assumeuniformscaling
        UNITY_INSTANCING_BUFFER_START(Props)
            // put more per-instance properties here
        UNITY_INSTANCING_BUFFER_END(Props)

        void surf (Input IN, inout SurfaceOutputStandard o)
        {
            fixed4 rustTex = tex2D(_CleanTex, IN.uv_CleanTex);
            fixed4 cleanTex = tex2D(_RustTex, IN.uv_CleanTex);
            fixed4 splatTex = tex2D(_SplatTex, IN.uv_CleanTex);

            o.Albedo = (rustTex.rgba * splatTex.r) + (cleanTex.rgba * (1.0 - splatTex.r));
        }
        ENDCG
    }
    FallBack "Diffuse"
}

DotClick.cs
// Write black pixels onto the GameObject that is located
// by the script. The script is attached to the camera.
// Determine where the collider hits and modify the texture at that point.
//
// Note that the MeshCollider on the GameObject must have Convex turned off. This allows
// concave GameObjects to be included in collision in this example.
//
// Also to allow the texture to be updated by mouse button clicks it must have the Read/Write
// Enabled option set to true in its Advanced import settings.

using UnityEngine;
using System.Collections;

public class DotClick : MonoBehaviour
{
    public Camera cam;

    void Start()
    {
        cam = GetComponent<Camera>();
    }

    void Update()
    {
        if (!Input.GetMouseButton(0))
            return;

        RaycastHit hit;
        if (!Physics.Raycast(cam.ScreenPointToRay(Input.mousePosition), out hit))
            return;

        Renderer rend = hit.transform.GetComponent<Renderer>();
        MeshCollider meshCollider = hit.collider as MeshCollider;

        if (meshCollider == null|| rend == null || rend.sharedMaterial == null || rend.material.GetTexture("_SplatTex") == null)
            return;

        Texture2D tex = rend.material.GetTexture("_SplatTex") as Texture2D;
        Vector2 pixelUV = hit.textureCoord;
        pixelUV.x *= tex.width;
        pixelUV.y *= tex.height;

        Circle(tex, (int)pixelUV.x, (int)pixelUV.y, 10, Color.red);
        // tex.SetPixel((int)pixelUV.x, (int)pixelUV.y, Color.red);
        tex.Apply();
    }

    // Taken from https://answers.unity.com/questions/590469/drawing-a-solid-circle-onto-texture.html
    public void Circle(Texture2D tex, int cx, int cy, int radius, Color color)
    {
        int x, y, px, nx, py, ny, d;

        for (x = 0; x <= radius; x++)
        {
            d = (int)Mathf.Ceil(Mathf.Sqrt(radius * radius - x * x));

            for (y = 0; y <= d; y++)
            {
                px = cx + x;
                nx = cx - x;
                py = cy + y;
                ny = cy - y;

                tex.SetPixel(px, py, color);
                tex.SetPixel(nx, py, color);

                tex.SetPixel(px, ny, color);
                tex.SetPixel(nx, ny, color);
            }
        }
    }
}

Comment: I got it all working :) I edited your answer with my final scripts and marked it as solved.  Let me know if you have any improvements you'd make, but it looks like it's working great to me. Thanks for your help!
Comment: Hmm. This *might* be a bit too terse, but I hope it'll point you in the right direction. Feel free to ask followup questions and I'll expand the answer when I'm home.
Comment: Awesome, thanks for your reply.  I'll take a crack at it and let you know what questions come up :)
Comment: First stupid question, what do you mean by "okay with mesh colliders"?  Do you mean as opposed to things like box colliders or rolling my own collision detection system?
Comment: Mesh colliders, especially complex ones, can be noticeably slower than simple box, capsule or compound colliders. They're often more accurate, but if you use a large number of them, performance may suffer.
Comment: Gotcha, that's what I thought.  I think I should be fine with mesh colliders because I envision the player mainly interacting with a small number of high detail items.  One sword, one tool; good hitboxes will be paramount, so mesh colliders are (probably) the way to go.


Why is blocking never placed "sideways"?

Question: If you are blocking for structural strength (not fire protection or nailing surface), wouldn't it be better to put the 2x4s sideways, oriented the way they would be in a built-up header?
Comment: The blocking between studs you see running horizontal and flat is typically fire blocking, required when you get above 8' ceilings in most locations. When installed vertically, it's usually for a nailing surface (cabinets, railings, drywall joints). Structural is occasionally a shear wall with a diagonal brace, or the blocking between joists.
Comment: Can you be more specific about the type of blocking you are referring to. Is this between joists or studs? What structural support is it providing?
Comment: Well, it's sort of a general question, but I was picturing the blocking between studs. And I guess the answer to what structural support is being provided is probably the answer to my original question--I pictured it providing support against lateral forces, like a shear wall does, but perhaps that's just not what it is for.
Answer: Horizontal blocking IS used with 2x lumber on edge for non-structural reasons: grab bar blocking, plumbing fixtures (notably freestanding wall sinks) and kitchen cabinets.
Its usually shifted to the front of the wall, just behind the drywall.  For sinks, 2x6 is usually used, allowing a range of mounting heights, ditto for grab bars in baths and showers.
One time for a steel stud wall in a basement, I used an entire sheet of 3/4 plywood over the studs and under the drywall.  It let me freely mount upper and lower cabinets for a bar area.
In the case of a 2x6 "wet wall" (used for plumbing, especially drains), the blocking can be "let in" in a continuous piece for additional strength, spanning several stud bays.
Comment: While this is technically true, I don't think this is the type of "blocking" the OP is referring to. The OP is taking about blocking that's installed to strengthen a wall/floor, and to prevent deformation of the framing members.  While it's true blocking can be used to make mounting things to the wall/ceiling easier, that type of blocking is not intended as structural blocking.  As @dwoz points out. *structural* blocking has to span the entire depth of the framing member, to prevent twisting.
Comment: Your first sentence should read "*Horizontal blocking IS used with 2x lumber on edge for **non**structural reasons*"
Answer: it doesn't matter, because the stresses on between-stud blocking is 100% horizontal compression.  The vertical orientation of the deep face absolutely doesn't matter...though having it horizontal, spanning the full width of the studs would help to prevent torsion/twisting forces, and thus would be ever-so-slightly preferred.
Comment: I am talking way out of my depth here--apologies--but: in the case of a cripple wall in an earthquake, for example, the way I imagine it, the "taller" the horizontal bracing, the more resistance there is to the wall folding up under lateral forces like a collapsed cardboard box. Right? I guess framing traditionally has been more focused on static loads?
Answer: Gravity.
Everything pulls down. So props that hold things up resist gravity. Vertical members hold things up.
Headers are spans that sit on things (jack studs) that hold things up. The header isn't the support, the studs (hopefully tied eventually to foundation elements) are.
So, vertical members, including vertical blocking, are the real support. But if you need to support over a gap where you can't put a vertical member, the horizontal header conveys the weight to the sides, where vertical support takes over.


Is thermal conductivity constant in Fourier's law?

Question: In Fourier's law we take thermal conductivity as constant in a particular direction, but if there is different temperature at two ends then intuitively there will be a temperature gradient, which means different temperature at different point throughout the solid. Also thermal conductivity is dependent on temperature, means it is different  at different point, so why do we determine temperature gradient using Fourier's law where thermal conductivity is constant?
Answer: If the thermal conductivity varies significantly between the two end temperatures, Fouriers law still applies locally at each point within the solid.  To get the heat flow however, we need to integrate the temperature gradient with respect to position: $$q=-k(T)\frac{dT}{dx}$$so$$qL=\int_{T_C}^{T_H}{k(T)dT}$$where $T_H$ is the temeperature at x = 0 and $T_C$ is the temperature at x = L.


Syncing iCloud bookmarks with Opera GX?

Question: I work on a MacBook on the go, an iPhone when on the train and a Mac Mini Server for other stuff - it is actually stuffed in my parent's place. But... I also game on a Windows maschine. Now, since I am very tied to the Apple eco-system, I obviously use iCloud for managing most of my stuff. HandOff and singing into my MacBook with my Apple Watch are super convenient and great! Especially sharing tabs and bookmarks across Safari. But unfortunately, I don't seem to get this on Windows - at least not with Opera GX.
See, I don't really like Google Chrome and I use Firefox for other stuff...ahem. So Opera GX is my main browser; it has the great resource limiter which is super great, a lot of customization and somehow it even has Razer Chroma...? But what it does not have is support from iCloud. And that sucks.
So Opera GX allows you to install Google Chrome extensions - and since there is an iCloud extension, I installed it in the hope that I would be able to sync my bookmarks this way. But no, the "iCloud for Windows" does not recognize this attempt at all, unfortunately. But since Opera GX is essentially abstracting itself to run Chrome extensions and - to my knowledge, mind you - runs the Chromium web-engine, I should be able to trick iCloud into believing that my Opera GX was actually Chrome, right?
I haven't succeeded in this, unfortunately. But since Chromium enforces a specific application infrastructure - all the way from command line arguments to internal page routing for settings and alike - I would think that once iCloud thought that my Opera GX was actually Google Chrome, it should sync my bookmarks just fine. Really, I only want my bookmarks - tabs do not matter that much to me, but it would be nice to have! But I don't think Apple would even allow this feature for non-Safari browsers anyway.
So how can I make iCloud for Windows think that Opera GX is Chrome, so it syncs my bookmarks? Thanks!
Answer: If you create the NativeMessagingHosts registry entry it syncs fine without Chrome being detected.
<code>Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Google\Chrome\NativeMessagingHosts\com.apple.bookmarks]
@="C:\\Program Files (x86)\\Common Files\\Apple\\Internet Services\\AppleChromeDAV_host_manifest.json"
</code>
In the UWP version of iCloud both Firefox and Chrome keys are already exposed by the AppX though you can't see them in the registry. So any browser should just work if you install the iCloud extension.

Syncing iCloud bookmarks with Opera GX?


apt-get install package without version number

Question: When you do apt-get install a package, there are many items listed. For example, sudo apt-get install emacs and press tab,  you receive emacs, emacs23, emacs24...... What does the one without version number represent? The latest stable version?
Answer: The numbers after emacs are the version numbers of emacs.
If you do not want to be bothered with the version number and want to install the latest version, just go for emacs, it is a meta package that always depends on the latest version of emacs found on the main repository.
The older versions are found on the universe repository (and/or perhaps on some other repositories too).
In a nutshell, you can do:
sudo apt-get install emacs

to install the latest version.

Also see:  What is the difference between a meta-package and a package?
Comment: @MichaelHoffmann check my edits
Comment: More details on what a "meta package" is, or the differences between the repositories you mentioned will get this a +1 from me. I feel like the question is more about package installation in general than about emacs specifically.


How to kick Jawbone ICON off iPhone to use with Mac

Question: I've got a Jawbone ICON, which is paired to my PS3, my Macbook Air, and my iPhone 4. Most of the time I'm using it with my Macbook with A2DP. The problem is that when I turn it on, my iPhone automatically connects to it, and hogs the A2DP profile, so then my Mac can't connect to the thing at all. I sort of like this behavior, so my best solution would be if there was some way to "kick" the ICONs connection to my iPhone from my Mac. It's really difficult because I use it alot with my Mac and my iPhone, so I can't delete one of the profiles, and I need to use A2DP on both devices. What are your suggestions on ways to fix this?
Answer: 'Forgetting' is overkill for what you want.
It would be easier to just turn the iPhone off before you turn the Jawbone on. Or turn Bluetooth off.
I have to do this sometimes because I have two phones that the Jawbone is paired with. When I turn it on, it will try to re-connect with the last one used.
Also, if it is connected to the iPhone, you can drop the connection from within the Bluetooth settings.
Comment: Thanks for the answer. What I actually found out is something like this. It turns out that unless my iPhone is currently receiving a call (in which case pairing is almost instant), my Jawbone has a significant delay of about 3-5 seconds before it pairs with my phone. In that time, I can be waiting to hit the "Use as Audio Device (Stereo)" button on my Mac. Then to switch it over I'll just power toggle it again.
Comment: My pleasure. I have the previous gen Jawbone, and I use it with a BB and an iPhone. I have call forwarding from my office phone to my BB but usually use the iPhone for outgoing calls (don't ask why). So the Jawbone was always connecting to the phone I didn't want it to. Disabling Bluetooth was the easiest solution because it's quick.
Answer: I don't think you can do this from the Mac. You can definitely have the iPhone forget the headset and pair it again later, though. Setting --> General --> Bluetooth --> tap blue ">" next to Jawbone —> "Forget this connection."


Why do featuring artists not appear in the artists section?

Question: On Spotify, I have seen that the majority of the time when there is a featuring artist, they are put in the song name but not as an artist. Why is this?
Comment: As far as i'm aware, Spotify only put what the record company tells them. Split credits do not need to be reflected in the artist name, only to the angencies responsible for paying the royalties. [I'm sure this has cropped up before, but I can't find it right now]
Answer: Are you on mobile? I noticed that from the song itself I can only access the main artist's page, but if I go and find the same exact song from their discography, the other artists are now available when I click on 'show artists'. Hope this was the same issue as yours.
Answer: I think it's just a matter of making the categorisation more clear and easy. When it's a single song feature on an album, it would be technically be creating two artist entries in whatever database is housing it for the sake of say, one song.
If it's a collaboration that spans a whole album, often the artist title will reflect that. (e.g. Edgar Meyer & Chris Thile)
That said, it's common for movie, television or video game soundtracks with multiple composers to feature in the artist heading and the soundtrack to just be attributed to Various Artists. YMMV, but say, a pop or rap song featuring another artist is best listed as (feat. Joe Bloggs).


Close Vote Regeneration

Question: When I vote to close a question, there's a message saying that I have X votes left. I assume those regenerate after some time? What are the rules on that? Is it different for different sites across the Stack Exchange network?
Comment: Possible duplicate of [What are the limits on how I can cast, change, and retract votes?](https://meta.stackexchange.com/questions/5212/what-are-the-limits-on-how-i-can-cast-change-and-retract-votes)
Comment: @RobertColumbia Just FYI, editing the automatic comment will prevent it from being automatically deleted once the question is closed. While I don't always agree with the new form of comment, I avoid editing it for this reason unless I'm making a more substantive edit to explain how exactly it's a duplicate.
Answer: Closed votes around the day are determined, and vary depending on the site.

Cast close and reopen votes - Meta Stack Exchange

You may cast up to 24 close votes per day.

Cast close and reopen votes - Stack Overflow

You may cast up to 50 close votes per day.
Comment: Relevant for "per day": https://meta.stackexchange.com/questions/27199/what-is-an-se-day-when-does-each-day-start
Comment: Do they vary per site or based on previous activity? I know that for flags the cap rises the more helpful flags you've cast (from 20 to 100 from memory).
Comment: @Mast No, you can't do anything to raise your close vote quota.

Close Vote Regeneration


Retrieve price data from PancakeSwap [BSC]

Question:
Does PancakeSwap use the same constant product formula as Uniswap (x * y = k)? Because then I should be able to calculate a token pair exchange rate by just dividing the amount of token1 reserves by the amount of token2 reserves.

Is there an API that could deliver me the wanted token pair exchange rates?

Is there any other function in their contract to fetch price data from?
Comment: @Mikko Ohtamaa the Binance Smart Chain runs on the EVM like Ethereum...
Comment: I would agree with OP. Almost all questions relating to Ethereum apply to BSC, It makes no sense to have a separate stackexchange for BSC.
Comment: I am voting to close this question because this question is not about Ethereum blockchain, but it is about Binance Smart Chain and belongs to a different forum.
Answer: Pancake Swap uses the same formula as Uniswap, but they have a 0.2% fee instead of 0.3% fee, which affects the calculation.
Comment: Please consider that they have recently migrated to V2 and therefore also created a new router and factory contract! -> New router contract: 0x10ED43C718714eb63d5aA57B78B54704E256024E
-> New Factory contract: 0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73
Comment: https://bscscan.com/address/0x05ff2b0db69458a0750badebc4f9e13add608c7f
Comment: I can easily find Uniswap router address online, but I am not able to find PancakeSwap router address online, I want to use the router to swap a token from my ERC20 contract.


Difference between database backup and data-tier application export

Question: I don't know if this is a bad question, but I don't understand what the difference is between normal DB backups and data-tier applications in SQL Server. I know backups can't be imported from SQL Server to an older version of SQL Server, but data-tier applications do work for this, and I've been using this to move some of our databases between servers. What are the differences from a backup perspective?
Answer: A backup is a full copy of all the database pages, or a dump of the database if you like, starting at page 0 and written sequentially to the backup device.
The Data-Tier application is a set of scripts that will create the database objects along with insert statements that will insert the data into the table objects afterwards.
From a backup perspective the Data-Tier application is a snapshot of the database in a certain state, you can install the application in that state but you can not restore additional data but have to copy the data from another source. The backup is a consistent state of the database and you can make log or differential backups that you can use to restore the database to a point in time.
Comment: There's one important caveat: _"For an export to be transactionally consistent, you must ensure either that no write activity is occurring during the export, or that you are exporting from a transactionally consistent copy of your Azure SQL database."_ ([azure docs](https://learn.microsoft.com/en-us/azure/sql-database/sql-database-export)).

This means that if you export Data-Tier application from a a live db, you can get an inconsistent set of data (at least for Azure Sql, not sure about regular Sql Server).
Comment: Perfect, exactly what I was looking for. Thank you!
Comment: Can this be explained by saying that back-ups are like a book of data-tiers (snapshots)? I'm not still sure to understand what a back-up really is.


What is World 0 in Super Meat Boy and how do I unlock it?

Question: I've beaten all seven worlds and most of the dark stages and yet there's still a locked question mark before the first world. What is this world? How do I unlock it?
Answer: If you've collected twenty bandages, you've already unlocked it. You may have gotten a message after you collected your twentieth bandage that said something like, "You have unlocked Teh Internets", "You have unlocked English", or (most recently) "You have unlocked something locked."
The locked question mark is a new zone called "Super Meat World." It's intended to be a never-ending stream of new levels for the game. An update to the game in mid-January will unlock it, along with an extremely capable level editor, and an online level sharing website. Users will be able to create new levels and upload them to be rated and played by others.
From the developer's blog:

Super Meat World will act as a Hub for full chapters hand picked by Team
Meat.
All chapters uploaded to Xbla after this update will be featured here.
Select chapters will also be uploaded to Xblas "internets" chapter
as well.
Many selected chapters will be character specific and created by
designers like Matt Thorson (jumper /
give up robot), Gaijin Games (bit.trip
series), Michael "Kayin" O'Reilly (I
wanna be the guy) and many more.

But! by far the coolest aspect of
Super Meat World is your ability to
"Enter the Unknown". Enter the unknown is a Pc specific
feature that grabs random user made
levels from the level portal and
arranges them in order of difficulty.

When Players enter the unknown they will choose what difficulty they want to play.
The unknown will only feature levels ranked 3+ on over all fun factor.
Every time you play will be a totally new set of levels, endless content.

Here's a link to the source, with more info
Comment: Is this answer outdated?  I had Super Meat World before collecting *any* bandages.
Comment: @BlueRaja - Danny Pflughoeft If you're able to access Super Meat World without any bandages, then both the answer _and_ the question are outdated.


How can we find out the type of bonding present in a compound or a molecule?

Question: For example, if the bonding in diamond, ice, MgO or CO2 is to determine, how can I find it out? How to determine van der Waals forces?
Comment: By learning chemistry, you'll start to recognize that some compounds are rather covalent, and others are more on the ionic side. As for van der Waals forces, they are always present.
Answer: The basic types of chemical bonds are learned already at school: atomic bond (single bond, double bond, triple bond), ionic bonding, atomic bond with partial ionic character, metallic bonding. The first three mentioned types depend on the difference of electronegativity difference. Single bond, double bond and triple bond depend on the outer electrons (valence electrons) of the atoms involved in the chemical bond.
Look up these keywords in Wikipedia.
At high school, you learn the octet rule and that there are also double bonds and triple bonds with partial ionic character.
At studying chemistry at the college, you learn the chemical bonds in the main chemical compounds. You learn that for some chemical bonds, more complex models are required that depend on the orbital structure. You also learn that the chemical bonds are only models for describing some facets of the chemical compounds and that for some chemical bonds there is no adequate model.
See Wikipedia: Chemical bond.
Van der Waals forces are only one kind of intermolecular forces. There are models for calculating them. In principle, intermolecular forces as a whole can today be measured by atomic force microscopy.


Chain rule for function of several variables

Question: Say we have a function $$f:X\times Y \to \mathbb{R}$$ where $Y\subseteq \mathbb{R}^n$. I want to calculate $\frac{\partial}{\partial t}f(x,y_0+tu_i)$ for a fixed $y_0 \in Y$ and $u_i\in \mathbb{R}^n$ is the i'th standard basis vector for a fixed $i$ and $t\in \mathbb{R}$. Now, just using the chain rule I think we get
$$\frac{\partial}{\partial t}f(x,y_0+tu_i)=\frac{\partial f}{\partial y}(x,y_0+tu_i)u_i$$
But we haven't assumed that $f$ is differentiable. We only assume the existence of the partial derivative of $f$ w.r.t the $i$'th coordinate of $y$, so is the above even well-defined?
Answer: The important point is not to use the chain rule (since you don't know $f$ is differentiable), but just the definitions. If you're calculating this partial derivative with respect to $t$, you have fixed $x=x_0$ as well. Note that if we set $t=s+t_0$, we have
$$\frac d{dt}\Big|_{t=t_0} f(x_0,y_0+tu_i) = \frac d{ds}\Big|_{s=0} f(x_0,(y_0+t_0u_i)+su_i) = \frac{\partial f}{\partial y_i}(x_0,y_0+t_0u_i).$$
(The final equality is just the definition of the partial derivative.)
If you don't know that $f(x_0,\cdot)$ is a differentiable function (of $y$), then what you've written doesn't actually make sense.
Comment: I think I understand, but just to be sure: By definition, the partial derivative is
$$\lim_{h\to 0} \frac{f(x_0,y_0+(t_0+h)u_i)-f(x_0,y_0+t_0u_i)}{h}$$
$$=\lim_{h\to 0} \frac{f(x_0,y_0+t_0u_i+hu_i)-f(x_0,y_0+t_0u_i)}{h}$$
$$=\frac{\partial f}{\partial y_i}(x_0,y_0+t_0u_i)$$
Because the second expression is the definition of the partial derivative w.r.t $y_i$?
Comment: Yes, that's correct.


Can Some not all mountains actually be Giant petrified Tree Stumps?

Question: Is it possible That The process that had occurred with the flood have actually petrified ginormous tree stumps during the flood??
Comment: Which flood are you talking about? Furthermore, have you considered how high a tree must have been if it's stump is about 3 km high?
Comment: A huge number of mountains are volcanic.
Comment: Noahs flood. The world flood, which is copied and translated into many other accounts bcuz it was their own way to explain what had occured. Such as Gilgamesh, Ragnarok, i am sure many others. But many others also speak of A Giant tree, A world tree. This thing was Huge and in Lebanon none the less. Now then. During pre flood, Heathens cut this tree down. Now when the flood occured, the stump as well as others giant trees i am sure, were covered by sediments and the heat from the under water volcanoes made it hot. So.. Is it possible that the Mountain range in Lebanon is actually a tree stump?
Answer:
...the process that had occurred with the flood...

I'm assuming that you are talking about the biblical flood. There is no evidence that the flood had ever occurred.

Can...mountains actually be Giant petrified Tree Stumps?

No. Petrified trees are made of silica with a very distinct texture as observed in the microscope. All mountains are made of other things. For example, granite, limestone, basalt, and various types of rock. Some mountains are made of sandstone quartzite, which are compositionally similar to what petrified wood is made off. However, sandstone is just hardened sand, and quartzite is sandstone that has become even more hardened due to the high temperatures and pressures deep in the Earth. They looking nothing like petrified wood.
Comment: To be fair there actually are two candidates for the origin of the biblical flood story, neither of them were global but they _were_ big enough to kill all life any surviving witness ever knew.
Comment: Not to mention we can actually track the formation is mountains, You can actually see that they are either  uplifted horizontal layers or volcanic.
Comment: I heard as correct at France, from geologist that had studied the zone at Turkey, [this hypothesys](https://en.wikipedia.org/wiki/Black_Sea_deluge_hypothesis). After an earthquake on Bosforo strait, Black Sea basin suddenly become flooded, being the geological event "narrated" in many religious histories.
Answer: I think I know what you are talking about. There are geological formations called volcanic plugs, which bear a strong resemblance to gigantic tree stumps and might easily fool people who knew nothing about geology into thinking that's what they were. Many millions of years ago the magma inside a volcanic cone cooled and solidified, and the volcano became extinct. During the course of millions of years of weathering, the softer, outer parts of the volcano were eroded away, leaving just the harder core still standing. Edinburgh Castle is sited on top of one of these volcanic plugs, but the presence of the castle disguises its tree-stump-like appearance. This particular volcanic plug is about 350 million years old.  I don't think there are any which are three kilometres high, this one certainly isn't. Devil's Tower in Wyoming USA is a good example of the kind of plug I mean, but I have seen better ones (see Wickepedia). Anyone with a knowledge of botany would know that a tree of such dimensions would be a physical impossibility.
Comment: PS  Ancient volcanic plugs are the only geological formations which look like gigantic tree stumps.
Comment: If anyone has witnessed this plug event plz let me know. Volcanoes are messy. When the flood Had indeed occured, all sediments were mixed and as they fell into place they began forming mountains. Heres a fun fact, The weight of the sediment decides when it falls into place. They stacked upon eachother forming mountains. NowThere's accounts of a World tree spoken of by different peoples such as vikings for one. Ezekiel 31 gives account of this Assyrian Cedar tree which is now lebanon. Now its a stump. There were many floods, but There was One World flood. Could Yggdrasil been this tree?
Comment: I thought I made it plain that the only geological formations resembling gigantic tree stumps were ancient volcanic plugs. Lots of people have witnessed them, as there are dozens around the world. I have seen a photograph of one which looked exactly like a tree stump except it was thousands of times as large, but I forget where it was. . They have nothing to do with floods or sediments, or trees, but there is a connection with mountains because volcanoes are usually found among mountains. Don't look for geological information in the Bible, because you won't find any.
Comment: I see what ur saying but not all are plugs. I do have to ask, how would a plug come out from the ground if its a plug? Notice the difference beteen a plug and a plant. Ones still messy.


Manipulating infinite summation

Question: I want to solve for the $$\sum_{b=0}^{\infty} \binom{a+b}{b}e^{0.3b}(0.3)^{a+b} $$
Can anyone give me idea how to start this? I'm thinking of manipulating it to look like the binomial series $$\sum_{j=0}^{n} \binom{n}{j}a^{j}b^{n-j} $$ but I have no idea regarding the changing of their upper limits. Any help would be greatly appreciated ☺
Answer: You can write:
$$\sum_{b=0}^{\infty}\binom{a+b}{b}\exp(0.3 b)0.3^{a+b} = (0.3)^a\sum_{b=0}^{\infty}\binom{a+b}{b}x^b $$
where $x = 0.3\exp(0.3)$
We can then compute this summation by noting that:
$$\binom{a+b}{b} = \frac{1}{a!}(b+a)(b+a-1)\cdots(b+1)$$
Then to compute the desired summation we can take the geometric series
$$\sum_{b=0}^{\infty}x^{a+b}= \frac{x^a}{1-x}$$
and differentiate both sides $a$ times.
Answer: We can apply the binomial series expansion
\begin{align*}
\sum_{b=0}^\infty\binom{\alpha}{b}x^b=(1+x)^\alpha\qquad\qquad |x|<1, \alpha\in\mathbb{C}\tag{1}
\end{align*}

We obtain
  \begin{align*}
\color{blue}{\sum_{b=0}^\infty\binom{a+b}{b}e^{0.3b}(0.3)^{a+b}}
&=0.3^a\sum_{b=0}^\infty\binom{-a-1}{b}\left(-0.3e^{0.3}\right)^b\tag{2}\\
&\color{blue}{=\frac{0.3^a}{\left(1-0.3e^{0.3}\right)^{a+1}}}\tag{3}
\end{align*}
Comment:

In (2) we use the binomial identity $\binom{-p}{q}=\binom{p+q-1}{q}(-1)^q$.
In (3) we apply the binomial series expansion according to (1) noting that $|-0.3e^{0.3}|<1$.

Manipulating infinite summation


IPhone 4 iOS 7.1.2

Question: I can't update my apps. I click on the update button and it asks for my Apple ID the just changes back to update. Iv tapped it several times and just goes back to update button. Iv force reset my phone a few times doesn't work either. I don't know what to do because my apps won't let me open them until there updated. Please help?
Comment: normally apps will not prevent you from using them if they are not updated, they will remind you. So what app is not working?, as forthe AppleID, does it work in iTunes?
Answer: First, make sure you're connected to WiFi to update the apps.
Second, are the other apps updating without any issues? If so, try uninstalling the troublesome app(s) and reinstalling them.
If none of those options work, try logging out of your iCloud account (under Settings App > iCloud, or under Settings App > App Store) then signing back in; it could be an issue with authenticating your credentials with Apple's servers.
A thought: are you using the same Apple ID (with which you bought the apps) to update the apps?
Hope this helps!

IPhone 4 iOS 7.1.2


Hyperbox, partitioned into hyperboxes with $k$ integer side lengths each, must have at least $k$ integer side lengths?

Question: In Intuitive/direct proof that a rectangle partitioned into rectangles each with at least one integer side must itself have an integer side I asked a question about intuitively proving that a rectangle with axis parallel sides partitioned into subrectangles must have an integer side length if all the subrectangles have an integer side length.  But now I'm wondering if there is a generalization for hyperboxes in ${\mathbb R}^d$. I know that if a hyperbox $R$ is partitioned into hyperboxes $R_1,\ldots,R_n$ such that each $R_i$ has at least one integer side length, then $R$ has at least one integer side length. There at least two possible proofs, which go the same way as the proofs for rectangles given in the other post. However, it's also true that if each $R_i$ has $d$ integer sides (i.e. all sides are integers), then $R$ must also have $d$ integer sides. This is trivial to prove. So now I'm wondering, what if each $R_i$ has $k$ integer sides, where $1 < k < d$? Can we prove that $R$ has $k$ integer sides? The proof in terms of complex integrals for $k=1$ seems suggestive. The proof notes that $\int_R \prod_j e^{2 \pi i x_j} dx_j = 0$ if and only if $R$ has an integer side. So if all $R_i$ have an integer side, then the integral is $0$ over each $R_i$ hence also $0$ over $R$. Intuitively, for $k > 1$ the integral is not just $0$ but also $0$ "of order $k$", so if all $R_i$ have $k$ integer sides then it seems like $R$ should too, because the sum of "zeros of order $k$" should give zero of order at least $k$, and "zero of order $k$" for the integral should correspond to having $k$ integer sides. Can someone make this rigorous e.g. maybe with infinitessimals, or give another proof, or a counter-example where the conjecture for $d > k > 1$ is false?
Answer: An idea for a proof by induction: (I'm not very good at visualizing $(d-1)$-dimensional cross-sections of $d$-dimensional hyperrectangles so there may be simple errors.)
Assume that for all $1 \leq l \leq d-1$, each $d-1$-dimensional hyperbox partitioned into hyperboxes with at least $l$ integer side lengths has at least $l$ integer side lengths. Consider a $d$-dimensional hyperbox $R$ that is partitioned into hyperboxes with at least $k$ integer side lengths. If $R$ has at most $k-1$ integer side lengths, we may take an intersection of $R$ and a $(d-1)$-dimensional hyperplane $T$ such that the resulting $(d-1)$-dimensional hyperbox $R'$ has at most $k-2$ integer side lengths. On the other hand, the partitioning $d$-hyperboxes $R_i$ that intersect $T$ become $d-1$-hyperboxes $R'_i$ that form a partition of $R'$ and have at least $k-1$ integer side lengths, which is a contradiction. Thus $R$ has at least $k$ integer side lengths.
The boundary cases (e.g. $k=1$ for each $d$) need to be solved separately.
Answer: I believe I have proved if that $R$ has at least $k$ integer sides then
$$\lim_{\delta \to 0^+} \frac{\int_{(1+\delta)R} \prod_j e^{2 \pi i x_j} dx_j}{\delta^k} = L$$
where $L$ is some finite constant, and if $R$ has $k-1$ or fewer integer sides then $L = \infty$. Thus, if $R$ is partitioned into hyperboxes $R_1,\ldots,R_n$ with $k$ integer sides each, then the limit is finite over each $R_i$, and thus the limit is also finite over $R$, so $R$ has at least $k$ integer sides.


See which context is used on a page when looking at the page

Question: When you are watching a page, is there a quick way for seeing all of the contexts that are being applied? Ideally I would like to be able to see which context is responsible per the blocks.
Answer: You can use the active context api to get this done.,
<code>$contexts = context_active_contexts();
print_r (array_keys($contexts));
</code>
Place the above code in your form_alter or in any hook_node_view. This will list the active context in the page.
Answer: Apart from using the Devel module as suggested in the previous answer, there is also the Devel Catcher module (which has Devel as a module dependency).
Here is an excerpt from its project page (why you may want to consider this module):

... aggregates or "catches" all development debug info into one easy to access place.
Similar in style to Firebug or Chrome's Inspector. Devel Catcher intercepts common debug info into a tabbed interface as opposed to having to assign debug blocks to a region or dumping the output at the end of your HTML document.
Currently Devel Catcher can catch the query log from the Devel module, node access rules from the Devel Node Access module and the context inspector block from the Context UI module.

Another way to look at this: it enhances your "debugging" experience (hm, hm ...).
Answer: If you have the Devel module enabled it provides a block called "Context Inspector" which you need only place in a region on your page in order to see the current contexts output via Krumho.


How do I place a View belonging to a Plugin in regular View (CakePHP Howto)

Question: I would like to get some input regarding the feasibility of the following scenario/design pattern:
I would like to insert a View from a Category Plugin (/category/categories/tree) into one of my application Views (/posts/edit/3) as if it is an CakePHP element.
The inserted View has a high level of functionality (sorting, adding, deleting, etc...) and therefore simply calling echo $this->element(); does not seem appropriate to me. That 'feels' more like a practice appropriate in situations where 'snippet'/lower level functionality is needed.
My question: is this possible in CakePHP, if so: how to do this? (just a rough outline of the way to go would suffice)
My first idea is to call an element from the plugin and use $this->requestAction(); from the element.
But as I said earlier is my association with elements one of little functionality/snippet. Using a controller method and its View 'feels' more appropriate. But I don't know how to 'call' a View within a View.
Main reason why I would want this:
full Controller functionality.

activate helpers based on Plugin requirements (this should be of no concern to the posts-controller)
beforeFilter and beforeRender of Plugin might be of use. For example: $this->set('modelName', $this->modelClass);
Answer: You could look at using view blocks. AFAIK, they are generally designed to help solve more complex view construction, like the problem you are considering here.
Or call a plugin element directly.
Comment: Thanks! I didn't know a bout blocks yet. Still the suggestions you make does not include full Controller goodies (beforeFilter, helpers etc...) and those are key to me, but maybe not outlined sufficiently. I'll rephrase my question a bit.


Is it the same meaning "what is wrong" vs "what is it wrong"?

Question: Is it the same meaning "what is wrong" vs "what is it wrong"?
if it isn't the same, please give me some example sentences.
Answer: The phrase, "what is it wrong" is grammatically incorrect. I'm presuming you are referring to the phrase "what is wrong with it".
If so, then I see no major difference in their meaning except for the fact that the latter phrase is referring to a certain subject ("it"). In a sense, it is more specific than merely saying "what is wrong", which gives off a rather general question and/or feeling.
Answer: They do not have the same meaning.  "What is it wrong?" is simply ungrammatical, and incorrect English.  "What is it wrong?" has no meaning.
You could correct this sentence to say "What is it that is wrong?" which would have a similar meaning to "What is wrong?"  The difference would be that adding more words makes the statement much more formal, stiff, and perhaps a feeling of pretension depending on the context.


Toenail partially kicked off and lifted up... what now? How do you clean lifted up toenail?

Question: About an hour ago, I was working out barefoot (yeah, I know... really, really bad idea), accidentally kicked the bench's base, and ended up with a big toenail that was still attached, but separated from the toe at roughly a 45 degree angle.
After getting over the shock, horror, and somehow managing to neither pass out nor vomit (both of which felt like appealing options at the time), I made it to the bathroom. Eventually, I squirted some Neosporin onto the nail bed, gently pushed it down so that it's "only" separated at about a 5-10 degree angle (any more, and it started to hurt), and put a loose band-aid over it to kind of hold it down. 10 minutes later, I ended up wrapping the whole foot loosely in gauze, mainly to protect the carpet from blood that was seeping out around the edges when I walked.
So, now, here I am at the computer, about an hour later (I did other searching first), asking, "WTF do I do now"? So far, it hasn't really started to hurt, but I'm also just sitting here and putting no stress on it whatsoever. Earlier, when I was limping up and down the stairs, it was aching a bit. Obviously, I can't spend the next N months sitting motionless at my computer desk, and sooner or later I'm going to have to deal with getting that foot into a shoe (I doubt whether anyone will complain if I limp into Walgreens or CVS with a gauze-wrapped shoeless foot, but at the very least I'm going to have to have some kind of footwear when I go to work on Monday).
I've identified the following specific immediate issues that need to be dealt with:

How hard should I try to keep the toenail flat against the nail bed, as opposed to allowing it to creep up and away from it? The problem I see is that the more firmly I hold it down, the more stress it's going to put on the area it grows from as I walk and the skin to which the nail is taped squishes, stretches, and generally moves around. On the other hand, it seems like once I'm finally back to wearing a normal shoe on that foot again, taping it firmly in place is probably a lesser evil than allowing it to constantly get pushed around by the shoe itself.
I'm definitely open to suggestions for specific products to purchase this afternoon and things to do that will make the next few days and weeks more tolerable. Right now, I'm still kind of in shock & afraid to do much besides sit motionless... at least, until I have some concrete plan for what to do next.

By the way, unless it's a matter of life, limb, or death, going to the hospital isn't an option. I have health insurance, but I really don't want to get hit with $1,000+ in copays and deductibles just so they can tape it down and tell me there's nothing else they can do.
Comment: Damaged toenails fall into the category of "gruesome and horrifying (but generally non-life-threatening) injuries likely to occur with sports & fitness activities".
Comment: Care to explain why you feel this is a Fitness or Exercise related issue? Unless you're planning to undertake some sports actvity this question is off-topic. See this [meta discussion for more information](http://meta.fitness.stackexchange.com/questions/137/reviewing-the-site-scope)
Comment: I don't think this is off topic.
Answer: I have damaged my toenails many times from playing soccer. The good new is, it will stop hurting as much very soon. Ice and advil will help with that. The bad news is, you are going to lose the toenail. I think the key is have this happen in a slow, controlled manner, as the nail naturally falls off, rather than to have it ripped off from its precarious position. My suggestions are as follows:
Cut it down as far as you can every day. This will depend a lot on how much it hurts.
Tape or bandage it firmly so it can't get caught on things.
Wear a loose sock and a sandal on that foot.
My guess is that you will be walking normally in a day or two. It may take a couple weeks to fully lose the nail, and a couple months for it to grow back. They first regrow might be mis-shapen or otherwise odd, but it's nothing to worry about.
Comment: Update: I got sandals on Sunday, and I've been walking around (and sleeping) for the past day with my foot in a box (sandal taped to the box bottom, hole cut in top) to protect the nail from accidental contact. Don't laugh... the box already has dents to prove I would have been screaming in agony at least once or twice by now without it. As long as I don't touch it, it doesn't really hurt (it stung for about a half hour after using peroxide on it last night, though).


Virtual memory - paging - establishing location

Question: A certain computer provides its users with a virtual memory space of 2^24 words. Computer has 2^18 words of physical memory. The virtual memory is implemented by paging, and the page size is 256 words. A user program generates the virtual address 24A72E (HEX). Explain how the system established the corresponding physical location...
Answer: Logical Page (i.e. the page table entry) = 24a72Ex / 256
That provides a index to a page table entry. That page table entry identifies the physical memory page.
The word offset into the page is is 24a72Ex MOD 256


Why is there never enough room on satellites to hold all the equipment needed?

Question: Why can a satellite run infrared and other forms of data collecting equipment and stream live results back for the public, but not take photos or video? I am guessing there is never enough room to attach photo or video gathering data equipment on those satellites. As for satellites that do take photos and video, is this because the cameras are all pointed at the Moon and other planets? I do appreciate the detailed photos of Mars and other galaxies, but every once in a while can we rotate that equipment to point back at Earth and snap a big selfie of ourselves?
Comment: It's more about wieght than space.  Adding the weight of even a small camera increases the fuel needs significantly.  So no one is going to waste money on something with little scientific value, and which can already be done by other craft.
Comment: When did you last pack a telescope on your drive to the office, just in case you wanted to look at the Moon in the evening?
Comment: Satellite imagery of the earth is so common that most of us carry around devices that can show different types of it to us within a few moments, for mapping purposes (e.g. Google Maps) and weather information (just about any weather app will show recent satellite imagery of cloud cover), not to mention more specialized applications like wildfire detection, agricultural information, and more.
Comment: You mean like the famous image by Voyager 1? https://de.wikipedia.org/wiki/Pale_Blue_Dot#/media/Datei:PIA23645-Earth-PaleBlueDot-6Bkm-Voyager1-orig19900214-upd20200212.jpg
Comment: You could say the same thing about airplanes could you not? Or cars.
Comment: @GregMiller: Don't underestimate the value of cameras for PR reasons (and maybe troubleshooting). It's not only about scientific value.
Comment: Given the sheer quantity of easily available satellite imagery of Earth, I'm really confounded by this question. What is it you're looking for that you haven't seen?  Are you aware that weather and observation satellites are taking photos of the earth on a daily basis, in both close-up and wide-angle?  There's no shortage of orbital photography happening.
Answer:
Why is there never enough room on satellites to hold all the equipment needed?

Welcome to Space Exploration SE!
Because of the time involved from planning until completion of goals at the end of the satellite's design life is long, often a decade or more, and the cost of the entire project, those who put major spacecraft into Earth orbit or into deep space for exploration think in terms of missions rather than satellites.
Spacecraft definitely can -- by design -- hold all the equipment needed for the mission.
Missions have objectives, and anything that increases the risk of failure (more hardware, gizmos, etc.) is looked at as potential sources of unexpected trouble. Engineers and spacecraft designers are getting better at adding things while minimizing incremental risk, but they don't do it by simply screwing on more objects and plugging them into the data pipelline. They have to carefully integrate anything new into the power, data, mechanical and thermal management systems without adding substantial risks of failure to the main mission.
For cameras, instead of adding more of them, what's (more often than you realize) done is that when there is time and low risk to the mission, the spacecraft is turned around and pointed at Earth and the regular cameras are used to take "blue dot" photos of Earth. There are actually plenty of these, but it's hard to find an absolutely complete list.
You may find these helpful or at least interesting

How many spacecraft have taken a "Pale Blue Dot" type photo of the Earth from beyond cis-lunar space?
Do Starlink satellites have cameras?
Does SpaceX use any of Falcon-9's camera data for engineering or status information, or are they "just for PR"?
Biggest periscope camera that could fit inside a Starlink satellite; how thick are they?
If all Starlink satellites had phone tier cameras & simple scopes, could images processed by their super-resolution imaging network be competitive?
How will Perseverance's selfie skills compare to Curiosity's? Will it have any additional selfie-related capabilities?
How did the JWST take a selfie?
How common is it for spacecraft to have "selfie" capability?
Comment: Indeed, satellites do what they're designed to do. If that requires cameras, they include cameras. If it doesn't require cameras, they don't include cameras. It's not about not having room... it's a matter of not doing things that aren't useful.
Comment: @SimonGeard yes I agree, though I think it's more about not doing things where the added utility *doesn't outweigh* the added risk, cost and delay.
Comment: You could extend the answer by adding examples for "unnecessary" cameras on spacecraft. The parachute camera for Perseverance and JunoCam come into my mind.
Comment: @asdfex I just don't have the background to do that properly; you are welcome to make an edit here or add an answer.
Answer: Perhaps there is an assumption that new photos of Earth taken from space would be inspiring, enlightening, and meaningful in some way. That was certainly true of the first photos that were taken, but pictures of Earth from space have been around for decades, so the novelty has somewhat worn off. And as indicated in other answers, photos of Earth continue to be taken, so there wouldn't really be much if any additional inspiration from taking even more of the same type of picture.
There was a brief period of time several decades ago when photos of Earth from space were a big deal. Before the space age people could mostly just guess what the Earth looked like from space. So when the first pictures started to come in there was a lot of interest, even in the early grainy photos like this one from Lunar Orbiter 1 in 1966:

And especially the 1968 Apollo 8 Earthrise photo:

and the 1972 Apollo 17 Blue Marble photo:

Note that the modern Deep Space Climate Observatory photo shown in this answer is not really that much different than the Blue Marble photo taken over fifty years ago.
Also assuming that you might be referring to deep space probes, the view of Earth actually diminishes as the distance increases, to the point that Earth appears as merely a "pale blue dot":

The above photo was taken by the Voyager 1 spacecraft in 1990, and it was certainly inspiring and created a lot of interest at the time, especially because of the attention given to the photo by astronomer Carl Sagan.
However there isn't much new to be seen in newer similar photos taken since then, for example this one taken by Cassini from Saturn in July 2013 didn't seem to have the same public impact as the Pale Blue Dot photo:

Or this photo of the Earth and Moon from Mercury by the Messenger spacecraft in 2010:

The Galileo spacecraft got a fairly decent photo of Earth in 1992, but not from Jupiter, its ultimate destination, but during its second flyby of Earth:

As mentioned in other answers and comments there are multiple reasons for space probe designers to not spend additional resources to take photos that don't support the mission. There just wouldn't be much if any benefit, and probably not too many people would likely be interested in looking at them anyway if they aren't much different than pictures that already exist.
Comment: For what it's worth, the Cassini pale blue dot photo is one of my favorite space photos ever taken, even if it had a smaller public impact.
Comment: @DarthPseudonym - it's only too bad that the Moon wasn't in the right position when the ring photo was taken. In [another photo](https://www.jpl.nasa.gov/images/pia14949-one-special-day-in-the-life-of-planet-earth) taken the same day the spacecraft position had apparently changed enough to get the Moon into view, but unfortunately the rings were no longer in the camera field of view by that time. In the ring photo the Moon is technically visible, but only as a barely visible smudge on the right side of the Earth.
Answer: You seem to have overlooked DSCOVR, which pretty much just stares at our planet.
https://epic.gsfc.nasa.gov/
Answer: We have a large number of sources taking photos of our planet. This includes:

low-altitude Earth observation satellites (Landsat, SPOT, Maxar). These take high-resolution photos of a small area at a time. Over time, they photograph the entire planet (although most will skip emtpy ocean, I suspect).
Landsat imagery is available for free, others are commercial.
Geostationary weather satellites, which take photos of the entire hemisphere every 10 minutes (GOES, Himawari, Meteosat). These images are available freely through meteo agencies (NOAA).
every manned mission since Gemini carries cameras. Astronauts on the ISS have taken hundreds of thousands of photos of Earth, which are all over Flickr.
Comment: There's also low-altitude weather satellites, which photograph (almost) the entire planet twice a day.
Comment: There are multiple constellations of LEO morning birds (satellites that cross the equator before noon local time) and LEO afternoon birds (satellites that cross the equator after noon local time). And then there are spy satellites.
Answer: In fact, there is always enough room on a satellite for everything it needs, because if it couldn't fit something necessary, it wouldn't be able to go into space. (At least,  not without failing very soon after launch, if not before, and achieving very little if its mission.)
If a camera that can take photos of Earth were necessary, it would be kn the satellite already. If taking photos of Earth were something it should be doing, or could be doing, without interfering with its actual purpose, then it would be.
What you're asking is the satellite equivalent of "why doesn't my spoon have a sharp edge for cutting steak?" and has the same answer: because that would make it a knife. It would also make it more dangerous and difficult to use as a spoon.  We use a knife for cutting instead and leave the spoon for scooping.
Comment: There is not always enough room on a satellite for everything it needs.  The MTG and Metop-SG programmes were therefore split in multiple satellites, because a single satellite couldn't fulfill the complete mission.  Also, we have sporks!
Comment: Each satellite had everything it needed. Whether that was necessary for the mission as a whole, is a separate discussion. And sporks are neither a good spoon nor a good fork. @gerrit
Answer: I always thought they'd first told Sagan no because they didn't want to spend the fuel to turn it around.
They didn't want to point it at the sun.
And someone had to ad-hoc some code into it, without bricking it from doing what it's still doing, while everyone was getting fired. If you want selfies, then that had better be on the docket from day one.
https://en.wikipedia.org/wiki/Pale_Blue_Dot

Sagan proposed the idea of the space probe taking one last picture of Earth. He acknowledged that such a picture would not have had much scientific value, as the Earth would appear too small for Voyager's cameras to make out any detail, but it would be meaningful as a perspective on humanity's place in the universe.

Although many in NASA's Voyager program were supportive of the idea, there were concerns that taking a picture of Earth so close to the Sun risked damaging the spacecraft's imaging system irreparably.

It was not until 1989 that Sagan's idea was put in motion, but then instrument calibrations delayed the operation further, and the personnel who devised and transmitted the radio commands to Voyager 1 were also being laid off or transferred to other projects. Finally, NASA Administrator Richard Truly interceded to ensure that the photograph was taken. A proposal to continue to photograph Earth as it orbited the Sun was rejected.


Objects on top of colored objects change color - ILLUSTRATOR

Question: I am working with vector graphics designing mugs, but whenever I place an object on top of the mug, the object is changing color. I am noticing it is also happening to all my objects. The top object looks like it is under another object that would have its opacity down. I can't figure out why it is doing this to me. The waves are above the mug body, but still keep messing with the colors. The only thing I can think of is that all my colors are from the Pantone + Coated Color Book. I've worked like this for a while, and this is a new issue I am having.
Answer: I'm fairly confident that this has to be due to either a blend mode or opacity setting somewhere. Without direct file examination, it's impossible to state where.
An easy way to find something with an Appearance setting it to merely look at the Layers Panel. If the little circle on the right side is filled in then that object or layer has an Appearance setting --- which may be a blend mode or opacity alteration.

If a layer itself has Appearance setting then every object on that layer will also show the filled circle (sometimes referred to as a "meatball").


derivative of differentiable function on all real values of x is defined on all real numbers?

Question: if a function is differentiable for all real values of x, can i assume the derivative defined on all real values of x? I think the answer is yes but i couldn't think of based explanation. if it is so, why?
thank you for your help.
Comment: What does differentiable mean anyway?
Comment: Yes, as long as by "differentiable" you mean "has a finite derivative". If you're allowing for the existence of infinite (signed) derivatives, then of course this won't be the case, unless you're considering functions that take values to the extended real number line.
Answer: If $x_0$ is a point in the domain of a function f, then f is said to be differentiable at $x_0$ if the derivative f ′($x_0$) exists.
Answer: You are right. The definition of an everywhere differentiable function is a function which has derivative at all points.