How do you perform service-oriented parent-child transactions?

Question:
Example:
A SalesOrder is composed of a SalesOrderHeader and one or more SalesOrderItems. When editing an existing SalesOrder, the SalesOrderHeader can be modified and SalesOrderItems can be added, modified and deleted. All changes must be saved in a single transaction. Multiple users may edit the SalesOrder at the same time with optimistic concurrency.

I believe that the requirement to have the save done in a single transaction encourages us to communicate both the SaleOrderHeader and the SalesOrderItems in a single service call. The implication of packaging up the child data with its parent is that there will need to be some understanding as to whether the child data is added, modified or deleted.
Change tracking of the child entities can happen either on the server or on the client.
Change tracking on the server
The idea with this strategy is that the client can modify the SalesOrder to its will without tracking which SalesOrderItems are added, modified or deleted. The state of the SalesOrderItems will be determined on the server when the save service is called.
The server should remain stateless between service calls. This means that the server can't retain any information about the state of the SalesOrder between its retrieval and its eventual save. The only option left if for the server to determine the state of its entities by comparing the modified object graph to the database object graph.
With nHibernate, there is a merge function to accomplish this. With Entity framework, the highest voted feature request is to have this added. There's also an open source implementation of this for EF called GraphDiff.
This sounds great in theory because it makes the services very easy to design and use. However, I see two major issues with this strategy. The first is performance. The entire object graph must be sent back on every save. Whether or not a SalesOrderItem was modified, it must be sent back or the server will assume it's been deleted. The second problem is even more critical and it has to do with concurrency. If User 1 adds a SalesOrderItem to a SalesOrder and User 2 makes a change to the same SalesOrder, when User 2 saves the server will assume that the SalesOrderItem added by User 1 should be deleted because it was not included in User 2's object graph. I don't see a way this can be prevented in any implementation of server side change tracking.
Change tracking on the client
The alternative is to have the client track changes to its entities and communicate that state when calling the save service. One benefit is that the client does not need to send its unchanged child entities. This helps with performance. A downside is that all entities will need an additional property named something along the lines of "ObjectState" to track whether it's added, modified or deleted. This makes the entity models on the server quite messy and filled with concerns unrelated to the business domain. This also puts onus on the different consumers of the service to maintain this state. Another problem is that it becomes difficult to deal with deleted entities. Should the SalesOrderHeader maintain a list of deleted SalesOrderItems? or should the SalesOrderItems get assigned a state of deleted which must be filtered out by the client UI?
I know that breeze javascript library has its own implementation of client-side entity tracking but my concern is that its implementation requires both client-side and server-side components. Shouldn't the service layer isolate which technology we use on either side? What if non-javascript clients want to use my services?
Question
I would think this is a common scenario that should be addressed by the majority of service implementations. Have I made any incorrect assumptions or am I doing anything out or the ordinary? What strategy have you implemented? Are there any reasonable alternatives?
Answer: Full disclosure: I work with Breeze, and I think change tracking on the client is the way to go.  Change tracking on the client allows stateless servers, reduces traffic between the client and server, and allows offline use.
In Breeze, the "ObjectState" that you mention is called the EntityAspect, and each entity has one, but it is not part of the domain model.  The server-side entities don't need an EntityAspect, but the server-side service has to know how to handle the entity state information that comes from the client.
Basically, the service needs to create, update, or delete entities based on the information coming from the client.  There are existing server-side backends for Breeze that do all this already (in .NET (EF and NHibernate), Java, PHP, Node, and Ruby), but you can also write your own.  Your server just needs to know how to talk to the client.
Let's say we've updated a SalesOrder and added a new SalesOrderItem.  The Breeze client sends a save bundle that looks something like this:
{
"entities": [
    {
        "Id": 123,
        "Title": "My Updated Title",
        "OrderDate": "2014-08-03T07:00:00.000Z",
        "entityAspect": {
            "entityTypeName": "SalesOrder:#My.DomainModel",
            "entityState": "Modified",
            "originalValuesMap": {
                "Title": "My Original Title"
            },
            "autoGeneratedKey": {
                "propertyName": "Id",
                "autoGeneratedKeyType": "Identity"
            }
        }
    },
    {
        "Id": -1,
        "SalesOrderId": 123,
        "ProductId": 456,
        "Quantity": 11,
        "entityAspect": {
            "entityTypeName": "SalesOrderItem:#My.DomainModel",
            "entityState": "Added",
            "originalValuesMap": {
            },
            "autoGeneratedKey": {
                "propertyName": "Id",
                "autoGeneratedKeyType": "Identity"
            }
        }
    }
]
}

Here, SalesOrder with Id# 123 has been modified (its Title has been changed).  The entityAspect includes the originalValuesMap which shows what the previous Title was.
The server would need to update the existing SalesOrder with the new value.  Whether the server needs to query the existing SalesOrder from the database before applying the changes is implementation-dependent.
A new SalesOrderItem has been added.  A temporary Id, -1, was created for it on the client.  The server needs to create and persist a new SalesOrderItem and generate a real Id for it.
The response from the server should contain the entities that were created and updated, and KeyMapping information that shows what server-generated keys map to the temporary client-side keys, so that the client can replace them.
Change tracking is not a simple problem, but Breeze tries to do the hard parts for you.
Comment: I'm marking this as the answer because I will be using Breeze as my solution. I was hoping to find a solution that felt a little more RESTful but I don't think REST is really meant to deal with multiple entities at once. Breeze seems to solve my exact problem in a way that's pretty slick. Thanks for the detailed response and keep up the good work!
Answer: I'd like to piggy back on Steve's answer.
We should be clear: the onus for implementing the Order-graph (AKA "Order aggregate") transaction in a relational data model falls on the developer. BreezeJS (and Breeze helpers for .NET servers) can facilitate but you have to make it work.
The key to making this work is including the root element of the aggregate - the Order - in all changes to any entity within the aggregate. If you add, delete, or modify an OrderItem, make sure you modify the Order at the same time .
How? By bumping the Order's concurrency property (e.g, the rowVersion) and making sure that Breeze KNOWS this is your concurrency property.

You must implement root entity optimistic concurrency if you want to ensure Order aggregate consistency.

Now you can detect if someone else has made a change to any part of the Order aggregate. That could be a change to the Order or an add/mod/delete of one of its OrderItems.
You do not have to include all OrderItems in the change-set when you save a changed Order aggregate. You only need to include the OrderItems that are added/modified/deleted.
Of course some other user may make a change to the Order aggregate before you save yours. When you try to save yours, the save will fail with an optimistic concurrency error.
Upon detecting an optimistic concurrency error for an Order, make sure the client removes the entire order aggregate from cache - the Order and all of its OrderItems - and then re-fetch the aggregate Don't just re-fetch the root Order entity and start messing with its items. Make sure you remove the entire aggregate from cache and then re-fetch it (the order and its items).
If everyone follows this protocol you'll be in fine shape on the server.
Comment: I assume there are parent-child scenarios where you want to ensure aggregate consistency and others where you don't. For example a Profile can have many PictureAttachments. You may want to allow multiple users to add/modify/delete PictureAttachments at the same time. Another user's changes should not affect your decision/ability to make your own changes. In a scenario like this I assume you would leave the Profile's rowVersion unchanged. The decision to ensure consistency over the object graph needs to be decided case by case. Is this correct?
Comment: Well not precisely. The nature of an aggregate is that it is really one thing *represented relationally* by multiple entities in parent/child relationships.  Not all entities in parent/child relationships are aggregates. For example, Customer/Orders is usually not. It's a domain decision whether a graph is or isn't an aggregate. Even then it can be difficult to decide whether the object graph is or is not an aggregate. All that said, I agree that many object graphs do NOT have consistency requirements of this kind and you should not implement master/slave optimistic concurrency in those cases.
Comment: Thanks for the clarification. I think I understand the concept but am fumbling through the terminology.


How to let users select their location or a specific location on the map

Question: I would like to let users fill in a form (which consists of a set of input boxes for username, password, birthdate, etc) and at the bottom of the page, the last input allows them to select their location on google maps (either automatically or manually). The problem occurs when user scrolls down to the bottom of the page where they see google map in a box. After they pin point their location, if they want to scroll back up in the page (for example to change the username they have already entered), they might have difficulty to do so, because when they put their finger on the screen and swipe down to go up in the page, it's google maps screen that moves, not the page! So they have to be careful not touch the map area to scroll up. How can I deal with this?
Answer: Use some form elements to interact with the map or use a button to confirm that the location selection is done so the interaction focus gets out of the map.
Here's Uber example - they do it well:

Edit
Place a small button/icon on the map that reads 'Go to top', this will take the focus away from map and users won't have a difficulty in scrolling.
Comment: you beat me to it :P
Comment: You mean I should open the map in a new window separate from where the form is filled?
Comment: @Meysam Not needed. Just place a button on top of the map with absolute position.
Comment: I think you are misunderstanding the "form" concept. Let me update my question to clarify.
Comment: @Meysam check the update


What are secret hats?

Question: .. and how do folks get them? I am amazed how motivating the prospect of getting a secret hat is. I wonder whether a similar incentive would work in a class room situation.
Comment: Check out mother meta: [the tag](https://meta.stackexchange.com/questions/tagged/winter-bash-2019) and [the list](https://meta.stackexchange.com/questions/339891/%ef%b8%8f-winter-bash-2019-hat-list-%ef%b8%8f). Not sure how effective that strategy would be in the class room, I would have probably enjoyed it.
Answer: For the up-to-date list of known triggers for secret hats see ❄ Winter Bash 2019 Hat list ❄ on Meta.
I haven't read much about the entire hat hunting thing except for the official announcement.
My understanding as to why there are secret hats is that there is a drop in the number of visits starting mid December till the beginning of January (it's evident from analytics data that mods have access to, but are not allowed to share the numbers), and hats serve the purpose of raising interest as an additional mean of [instant] gratification.
On top of that, secret hats provoke sites exploration and trying out various scenarios (triggers change every year for the majority of the secrets hats), so the site "exploits" users' curiosity in order to help its load balancers to sustain even population of users throughout the end of the year.
And, of course, there is a game aspect in the form the natural habit of "wildcrafting" colorful toys for the avatars, which makes it a nice fit for the pre-holiday and X-mas time of the year.
As for using secret hats in the classroom, I think it depends on the age of the audience, and whether you need to motivate your students.
Teenagers will probably like this idea as they usually have shorter attention span and are needed to be motivated to learn.
So, such gaming variety is good for them and encourages not to be afraid to do research via trial-and-error.
On the contrary, many university students would probably consider this a waste of time given they already narrowed down their field of study and want to pursue a certain career, but it really depends on how you organize it.
The most streamlined version of "secret hats" in education would probably be making purposely occasional mistakes, say, five times per seminar or lecture.
The first student to notice and correct you gets a point.
Just make sure not to forget to correct yourself after a minute or two so that the erroneous information isn't imprinted on the learners if nobody raised a hand to yell at you:)
Points can later be converted into "hats", e.g. some trinkets, a beaker with your signature, privilege to work on an analytical device for extra hours, more freedom in choosing lab project, or even reduced number of tasks on the finals.
Comment: @user55119 Well, if a prof gains enough points for unintentional mistakes, then he/she also gets a hat, usually [a cap with a big yellow letter "M"](https://en.wikipedia.org/wiki/McDonald%27s). In Russia, in addition to [the hat](https://en.wikipedia.org/wiki/Ushanka) there used to be trips to [some interesting places](https://en.wikipedia.org/wiki/Siberia).
Comment: "Purposely make mistakes"? What about the unintentional ones that aren't discovered? ;-)
Answer: The whole idea of Winterbash is to round up the year and have some fun with hat hunting as you already note. Every year, there is a list of hats that are public knowledge to everyone; depending on the hat in question, people who hunt hats will get it as soon as they can. (Most hats are easier to get on a high-activity site like SO than on a relatively low one where even Nice Answer badges are somewhat rare like Chemistry.)
While there are hats whose triggers are purposely at some place in the future (see the hat(s) that can get awarded for participating on a site while it is the 20th somewhere in the world) to make sure that people remain interested in returning and don't just (attempt to) collect them all on day one, this still doesn't mean that everyone will keep a constant interest; some might just come on trigger day, participate briefly, and leave again.
That is where secret hats come in. To a first-timer, non-regular or person who avoids spoilers, these come as a pleasant surprise when you get the first. Of course that sparks competition, especially if you look at the leaderboards and see other people with hats not on the list. The intended outcome is for you to interact with the site trying out different triggers until you get the hat (and think you found out how it works).
Of course, others have done that too and that is where the Winderbash hat list post comes in. So if you want to shortcut your way into getting such a secret hat, others have probably done the work for you – or you can confirm if your guess was correct.

What are secret hats?


Where in the Talmud is there a discussion of which books to canonize and who redacted the books of Navi?

Question: I believe those two discussions were in the same daf. anyone can help?
Comment: Bava Basra 14b-15a is a good place to start
Comment: Why is everyone downvoting this question?
Comment: @רבות do you think this is a good post? How many problems with it can you fit into one comment?
Comment: Not sure what is happening lately here at Mi Yodeya but this hyper-criticism is fatiguing.
Answer: Here is the list as described in Bava Basra. The link is to the Daf Yomi outline of the relevant parts.
Baba Basra 14b Art Scroll version 14 b 3-4

WHO WROTE THE SEFORIM
(a)Question: Who wrote Torah, the Nevi'im and Kesuvim?
(b)Answer: Moshe wrote the Torah, including the Parshah of Bilam, and
  Sefer Iyov;
(c)Yehoshua wrote Sefer Yehoshua and the last eight verses of the
  Torah;
(d)Shmuel wrote Sefer Shmuel, Shoftim and Rus;
(e)David and ten other Chachamim composed Tehilim - Adam, Malki Tzedek
  (Shem), Avraham, Moshe, Heiman, Yedusun, Asaf, and Korach's three
  sons.

Bava Basra 15a

WHO WROTE THE SEFORIM (cont.)
(a)Yirmeyahu wrote Sefer Yirmeyahu, Melachim and Eichah;
(b)Chizkiyahu and his contemporaries wrote Yeshayah, Mishlei, Shir
  ha'Shirim and Koheles;
(c)The men of the Great Assembly wrote Yechezkeil, the 12, Daniel and
  Megilas Esther;
(d)Ezra wrote Sefer Ezra, and the lineage at the beginning of Divrei
  ha'Yamim until himself (Rashi; Tosfos - until the verse "v'Lo Achim
  Benei Yehoshafat");
1.This supports Rav, who said that Ezra did not leave Bavel until he established his own lineage.
2.Question: Who finished Divrei ha'Yamim?
3.Answer: Nechemyah did.
(e)(Beraisa): Yehoshua wrote Sefer Yehoshua and the last eight verses
  of the Torah.
(f)Tana'im argue about whether Moshe or Yehoshua wrote the last eight
  verses.
1.(Beraisa - R. Yehudah or R. Nechemyah): Moshe could not have written "va'Yamas Sham Moshe"!
i.Rather, Moshe wrote until here. Yehoshua wrote the rest.
2.Objection (R. Shimon): Had Moshe omitted even one letter of the Torah, it would not say "Lako'ach Es Sefer ha'Torah ha'Zeh"!
i.Rather, until here, Hash-m dictated the Torah and Moshe wrote;
ii.For these last eight verses, Hash-m dictated and Moshe wrote b'Dema
  (with tears; Sefas Emes - he wrote the letters without spaces between
  words).
3.Similarly, Yirmeyahu dictated his prophecy to Baruch (who wrote it; Rashi - similarly, Baruch did not repeat the verses due to remorse) -
  "mi'Piv Yikra Elai... va'Ani Kosev."


How can I connect my laptop to WiFi?

Question: My Lenovo G480 does not detect my wireless network when I'm running Ubuntu, but it has no problem in Windows 7. When I boot with Ubuntu, it immediately displays a message saying "You are disconnected." and when I try to check for wireless networks, it doesn't display anything.
Comment: sudo service network-manager restart , try this
Answer: While I don't have this particular model laptop, I did a little research and found the following Link to UbuntuForums I have listed the relevant commands below....
Connect to the internet using a wired connection.
Type the following to get to a terminal CRTL T  (hold down the ctrl key and hit t)
copy/paste the commands, one line at a time into the terminal window.
reboot and try a WIFI connection.
<code>sudo apt-get install linux-headers-generic build-essential
wget http://www.orbit-lab.org/kernel/compat-wireless-3-stable/v3.5/compat-wireless-3.5.1-1-snpc.tar.bz2
tar -xf compat-wireless-3.5.1-1-snpc.tar.bz2
cd compat-wireless-3.5.1-1-snpc
./scripts/driver-select alx
make
sudo make install
sudo modprobe alx
</code>

How can I connect my laptop to WiFi?


How to use the Signup module

Question: Can anyone show me how to use the Signup Module? I don't see anything in Structure or Add Content. I'm sure I just missed the link somewhere but I just can't figure out where.
Answer: admin/config/people/signup is where the settings page is located.
admin/content/signup displays "all signup-enabled posts, and open or close signups on them"
Answer: I had the same problem, I only recently figured out that you have to go into the content type that you want to enable it for, and specifically enable it under the Signup tab. In terms of using it, you mentioned add content. Well, the sign up module is not meant to be added. It will automatically display a form to sign up as long as you enable it for the content type.

How to use the Signup module


Create Message Options are Blank in EXM

Question: I have a recently upgraded 8.1 Sitecore instance with EXM 3.3 installed.  When I try to create a new regular Email Campaign I get the following screen. Am I doing something wrong?  Is something not installed correctly or configured correctly?  All I see is Import HTML.
Comment: Any errors in your log files?
Comment: No errors in the main log file.  The only thing in the EXM log file is the following:  1568 11:38:20 INFO  The configured default global opt-out list does not exist. A new list has been created: /sitecore/system/List Manager/All Lists/E-mail Campaign Manager/System/Common Global Opt-out
1568 11:38:20 INFO  The manager root item 'Email Campaign' ({0712383D-F27F-4847-91C9-FC74DF5CA9AF}) is not referencing a valid global opt-out list and has been changed to the configured default.
Comment: Any errors in the browser console?
Comment: No errors in the browser console either.
Answer: In EXM, the reason this list is blank is because the Default item for One-Time Messages has not been associated with any Message Templates.

Background Information
For Each EXM Manager Root, there are three types of Messages that can be sent out.

One Time Messages
Subscription Messages
Triggered Messages

Under a Single EXM Manager Root, it looks like this:

The red arrow is pointing to the Default setting item for the One Time Messages. Open the item up in Content Editor to review settings for this item.
Of particular interest is the Insert Option field on this item.

EXM uses the Insert Options field of this item to store which Message Templates for the specific EXM Manager Root, should display in the Create Screen.
In the above example, only one message shows up.  When I go to the Create Screen, I see one message.

When I add a new Message Template (located in the <code>/sitecore/templates/branches</code> folder:

The resultant Create Message option dialog looks like:

Why Aren't The Default EXM Insert Options Shown?
For some reason, during the upgrade process, the default message create options were erased from this object. Simply add the default ones back in, if you'd like to use them. You can find them in the branch templates:

Gotchas

If dealing with multiple EXM Manager Root's, besure you are adjusting the right manager root, otherwise you'll pull your hair out for 2 hours like I did while writing this answer, just to realize that I had the wrong Manager Root selected in EXM. =) Opps.

Create Message Options are Blank in EXM


Data pre-processing before feeding into a deep learning model

Question: Generally speaking, when training a deep learning model, like MLP,  what kind of data pre-processing operation has to be conducted when the input is a numerical sequence.
Answer:
It depends on the context of your problem.
If it is an sequence of images with not great quality then we need to perform some morphological operation on it e.g.grayscale,binary image etc.
Also if the digits are distorted,then we could translate it up-to certain extent for model to learn easily.
Answer: If you simply transform the data to have zero mean unit variance Gaussian,
be careful to not include your test samples when calculating the actual mean and variance, by doing so you are doing some kind of data snooping thus test error is not reliable, doesn't reflect the true error.
see Why divide the sample variance by N-1?


What does GLTest do and what are the consequences of it failing

Question: Antialiasing has never worked with 3D graphics in Mathematica on my linux machine. The solutions listed in the related topic don't work in my case.
System specs: Mathematica 10.0.2.0, Xubuntu 15.10, Nvidia GeForce GT 730.
I went looking in the /usr/local/bin/mathematica executable script to see if there are some variables that control antialiasing.
I found this particular bit of code:
# Check for GL and GLU version
GLTest="env LD_LIBRARY_PATH=${M_LIBRARY_PATH} SHLIB_PATH=${M_LIBRARY_PATH} LIBPATH=${M_LIBRARY_PATH} ${TopDirectory}/SystemFiles/FrontEnd/Binaries/${SystemID}/gltest"
echo "$GLTest"
GLTestResult=`${GLTest} 1 1 1 2 ${userDisplay}  2> /dev/null | grep "GLTest_OK"`

In my case, the GLTest command translates to
env LD_LIBRARY_PATH=/usr/local/Wolfram/Mathematica/10.0/SystemFiles/Libraries/Linux-x86-64 SHLIB_PATH=/usr/local/Wolfram/Mathematica/10.0/SystemFiles/Libraries/Linux-x86-64 LIBPATH=/usr/local/Wolfram/Mathematica/10.0/SystemFiles/Libraries/Linux-x86-64 /usr/local/Wolfram/Mathematica/10.0/SystemFiles/FrontEnd/Binaries/Linux-x86-64/gltest 1 1 1 2

and the output is GLTest_Fail.
Why does the test fail and should I be bothered by it?
Comment: Trying `gltest --help` yields `gltest minGLMajor minGLMinor minGLUMajor minGLUMinor {-display DISPLAY_NAME}`. Not very informative.
Answer: This bug has been fixed as of Mathematica 10.4.0 (gltest is no longer being used).
Answer: Compile this program:
#include <stdio.h>

int main()
{
    printf("GLTest_OK\n");
    return 0;
}

And replace gltest with the compiled program.
It works for me.
Comment: In a pinch, `echo -e '#!/bin/bash\necho "GLTest_OK"' > gltest; chmod a+x gltest` will also do.


CiviVisualize example graphs and visuals are not showing up

Question: I have a question about CiviVisualize. So, I cloned the CiviVisualize repo from github in my C:\wamp64\www\drupal\custom_ext\CiviCRM Extensions Directory and then reran drupal. CiviVisualize comes up but the demo visuals are no where to be found. I'd love some help]1
Answer: This is likely a problem in how you have incorrectly set up the extension url in civicrm.
To work, this (and many other) extension need to be able to load additional resources, javascript or images, and you need to configure civicrm to tell which url to use. (under /civicrm/admin/setting/url )
what is the right url to put there depends on where you have put the extensions folder, but on the good news, you will need to adjust your setting ones and it will work for every extension


Backup external hard drive to the cloud via Time Capsule

Question: I'd like to move my photo directory to an external hard drive, but still have that hard drive backed up both locally and to the cloud. This wouldn't be a problem if I was using a desktop machine of some sort. However, I have a laptop, and I'd like for the external drive to be able to backup to the cloud without needing my laptop as an intermediary to the cloud. Is it possible to have an external hard drive that's connected to a Time Capsule backup to a cloud backup service (like CrashPlan) using the Time Capsule's internet connection?
Answer: Yes - but the flow of the data isn't linked directly.

The external drive can be opted in to back up to any Time Machine destination as long as there's enough space on the destination drive.
You can configure CrashPlan to back up files from the external drive - directly to the cloud.

Note: These are independent - you could enable 1 and not 2 or 2 and not 1 or both 1 and 2 as you wish. Getting Crash Plan to see files from within the protected Time Machine storage isn't something I would recommend.


Why is 2+2=4 a necessary truth?

Question: A necessary truth is something which is true in all possible worlds. How can we be sure that there is no other universe where 2+2=4 can be untrue.
Comment: The "usual" point of view is that **2+2=4** is a case of [a priori knowledge](http://plato.stanford.edu/entries/apriori/) : "knowledge that is absolutely independent of all experience" (Kant 1787).
Comment: Bertrand Russell took several hundred pages to prove that 1+1=2, I would take issue with the idea that it is a priori knowledge, it is a logical conclusion that can be proven it is just very difficult to do so.
Comment: It depends what you mean by 'possible'.  For many people that means it can be actively imagined, and therefore does not contradict immediate intuition.  If you decide to imagine 2+2 = 5, you can dismiss all your representatives and have one left, so you  cannot live in that world very long before your basic intuition fails.  For others it only means it is conceivable, in which case IMO, we have no real standard for possibility other than the limits on our ability to abuse language.
Comment: Please Do nOt accept any answer as best answer without completely being satisfied.
Comment: @MauroALLEGRANZA is completely incorrect.  mathematical fact is not the same as empirical physical knowledge.  the latter can be different in some other universe (if any might exist) while the former is true based on axioms and theorems.  neither of which are dependent on this physical universe for their factuality.
Answer: The issue is complex and any "significant" answer is hardly reducible to the Yes/No pattern.
In modern mathematics, 2+2=4 is a theorem of arithmetic provable from Peano axioms.
In a nutshell, assuming the definition of 1 as "the successor of 0" and of 2 as "the successor of 1" and ... and of 4 as "the successor of 3" (and thus "the successor of the successor the successor of the successor of 0"), the axioms formulated with the primitive notions of:

0, S (successor), + (sum) and (×) multiplication,

allows us to conclude that:

"the sum of the successor of the successor of 0 with the successor of the successor of 0 is equal to the successor of the successor the successor of the successor of 0".

Having established this fact, we may assert that it is a logical consequence of Peano axioms, or that it follow (necessarily) from them, or that it holds in every model of the axioms.
If we want, we may paraphrase it as follows: it is true in every possible world in which Peano axioms hold.
Now the question is:

are Peano axioms necessary truths ?

i.e. do they hold in every possible world ?
I would say: no.
There are models of Robinson arithmetic [that basically differ from Peano's one for the lack of induction] where the usual associative, commutative, or distributive laws for addition and multiplication do not hold.
Neither the law Sx≠x can be proved with only Robinson's axioms [see this post for details].
Thus, it seems that the "usual" arithmetical axioms are not necessary truth (according to the above naive view : necessary = true in every possible world) and thus neither the "usual" arithmetical facts are.
Comment: I'm not sure SX != x can be proven even with peano.  the inductive definition of NAT does not involve equlity.  all it tells us is that, if n is a NAT, so is Sn.  so we could assign the same value to every expression of the form S..., no?
Comment: @mobileink - of course we can; Assume **x=Sx**, then **0=S0** contradicting the first Peano axioms (FOL version) : **0≠Sx**.
Comment: ok, but that only covers one case.  we still cannot formally prove Sn !=n where n > 0.  well, I can't,  at least ;) Just assign n=9 for every n >  0.
Comment: @mobileink - informally: assume that exists **n** such that **Sn=n** and (by induction) let **k** *the least* such number. It is not **0** (axiom: **0≠Sx**) and thus it has a "predecessor", i.e. **j** such that **Sj=k**. But **Sk=k** and thus **Sj=Sk**. Thus, by axiom: **Sx=Sy → x=y**, we have : **j=k**. But **Sj=k** and thus **Sj=j**, contradicting the fact that **j** is less than the least number ...
Comment: my understanding is that the inductive definition of NAT does not allow us to show that every NAT has a unique predecessor, or any predecessor at all for that matter.  E.g. if we have Sn = Sm we cannot prove n=m.  IOW, you can only build up with induction (every NAT has a unique successor), you cannot "build down" i.e. de-construct (every NAT has a unique predecessor). For that you need co-induction, but I forget the details.
Comment: Why should we pick models of Robinson arithmetic as possible worlds to decide if 2+2=4 is necessary? We might just as well pick Peano or Presburger, where the answer is the opposite. It seems the question has no answer in an absolute sense.
Answer: For mathematical statements the standard interpretation of "necessity" is "logical necessity", and "possible world" is a model of a theory to which the statement belongs. The theory in question here is presumably the Peano arithmetic, so one can derive that 2+2=4 is necessary from the fact that it is a theorem of Peano arithmetic, and the Gödel's completeness meta-theorem, which states that something is a theorem in a consistent first order theory if and only if it is true in all of its models. However, there are plenty more arithmetics to choose from, Presburger, Meyer, primitive recursive, second order, or the modular arithmetic mod 3 for that matter, in which 4 is not even a valid symbol, and 2+2=1.
But your question suggests that you see 2+2=4 as having some empirical content, otherwise the question of certainty is kind of moot. There is something to it, our arithmetic rather transparently tracks the behavior of our familiar everyday objects, like sticks, pebbles, etc., and a universe where objects say merge like drops of water is imaginable. In this case however it is more appropriate to say not that 2+2 is not 4 in arithmetic, but rather that creatures in such a universe have little use for arithmetic like ours. In other words, 2+2=4 is part of the "grammar" of "2", "+", "=", and "4" (not just symbols but concepts behind them), if it does not hold it means that someone is simply using different concepts. Here is Tait:

"The a priori character of numerical reasoning arises simply from our freedom in this sense to use the number concept only as we have characterized it... There is nothing behind this usage, e.g., mental or physical states or some hidden mathematical reality, against which it can be measured for correctness. We can agree now to use the number concept in a certain way... Not only is our agreement concerning the number concept not binding on future generations, but our agreement is spelled out in ordinary English (ultimately) and depends on our common disposition in the use of that language. A sufficient breakdown of those dispositions would render the question of "same number concept" meaningless."

Finally, there is a third version of the question, namely taking the more conventional possible worlds, when different physically possible universes are considered, and asking how we ensure that 2+2=4 holds in all of them. This is unexpectedly subtle, logic and arithmetic are usually not taken as parts of any possible world, but rather as what Forster calls "modal machinery" residing in the "modal aether" beyond them:

"Indeed it could be characterised as that part of our theory of nature that remains when all information internal to possible worlds is ignored altogether, rather in the way in which the geometry of space-time is what remains once we expunge events... Can the machinery be properly described inside all possible worlds, despite appearances? Or does it go on outside them, in a modal aether?... at least some necessary truths are true not in virtue of what happens in possible worlds, but true in virtue of what happens in the aether. In other words, possible world semantics doesn't provide a uniform account of necessary truth."

In other words, 2+2=4 is not necessarily true because it is true in all possible worlds, it is true in all possible worlds because it is set up to be so, by design. I suppose one could set up a system of possible worlds sporting different logics and arithmetics within them, but that is not usually done, and somewhat futile. One would still need some logic and arithmetic in the aether to make the modal machinery work, and many supporters of the alternatives have their own accounts of modality, without the Platonism of possible worlds. So stuffing them into ones would beg the question, see Is there modal logic without possible worlds?
Comment: Forster citation, please?
Comment: @mobileink I had it but forgot to highlight :)
Comment: What about Quine and Putnam (during his quantum logic phase), don't they have anything to say on this?
Comment: @Alex I am not sure about Putnam, but Quine had little use for modal logic (especially of possible worlds variety) to the end. Even in Pursuit of Truth he writes "*In respect of utility there is less to be said for necessity
than for the propositional attitudes... In its everyday use... 'necessarily' is a second-order annotation to the effect that its sentence is deemed true by all concerned*". As for 2+2=4, it is synthetic/empirical to him, but entrenched for pragmatic reasons, similar to high level theoretical claims. Parsons objected that it is too elementary for that to be plausible.

Why is 2+2=4 a necessary truth?


Area under and slope of the motion graphs

Question: I wanted to ask in general what area under the graph means. Also which physical quantity is highlighted by area under distance vs time graph.
I'm confused that area is a 2 dimensional concept and it may indicate distance or displacement, which are 1 dimensional quantities.
Answer: The interpretation of the area under a curve, depending upon the curve, will vary. If it is a Velocity v. Time Graph, the area from a given time to another time, will be the distance traveled between those times. If it is an Acceleration v. Time Graph, the area from one time to another, will be the change in velocity of the object between those two times. For other dimensions, the quantity's significance will vary. In the case of a y v. x graph, if the unit(s)/dimension(s) of y is/are a, and the unit(s)/dimension(s) of x is/are b, then the units/dimensions of the area quantity will be 'a times b'.
For a distance v time graph, the area is indeed two dimensions, but not necessarily with both being a length. The Area under a graph is the geometrical meaning, not the physically significant one. For your situation, the area-quantity would be two dimensions: Length times Time. A quantity of this dimension is known as absement. An absement is a measure of a distance and how long something has been at that distance. Visit here for more info: https://en.wikipedia.org/wiki/Absement .
Answer: There is no relation between the area being two-dimensional in your graph and what it means. For example, consider you make the $x$-axis as an indicator of the temperature, so what is the difference between $x= 5 K$ and $x = 8 K$? of course it's $ \Delta x = 3K $. Now, isn't $x$ a one-dimensional quantity?
So the graph gains its meaning from you not from itself as a draw.
What does the area under graph mean?
well, it means the area under a graph, any graph. (provided some conditions which are satisfied in nearly all physics) but what is the area refers to depends on how you interpret the axes.
let $A$ be the area under the graph of $f(x)$,
$A =\int_{x_{0}}^{x_{1}} f(x) \space dx $
you can always interpret this as a product of $f(x)$ and $dx$ (a small quantity of $x$).
when each of them is a distance so the dimensions of $A$ are L$^2$. However, in the velocity-time relation, i.e. $f(x)$ measures velocity and $x$ measures time (that's how we usually write it $t$ and $ f(t)$ instead of $x $ and$ f(x)$ ), we get the dimensions of $A$ as $[L T^{-1} . T = L$ so it's a distance.
I hope this helps.
Answer: If we consider the velocity-time graph area under the whole line is the distance. For example,

Now look at the second part of the diagram (rectangular, dark blue) $$v=\frac{dx}{dt}\rightarrow\int{vdt}=\int{dx}\rightarrow x=vt$$
But the first part (triangle), we should consider acceleration
$$a=\frac{d^2x}{d^2t}=\frac{dv}{dt}\rightarrow\int{adt}=\int{dv}\rightarrow v=at\rightarrow\frac{dx}{dt}=at\rightarrow x=\frac{1}{2}at^2$$
As you can see, all the meaning is behind the meaning of integral.
Answer:
I'm confused that area is a 2 dimensional concept and it may indicate distance or displacement , which are 1 dimensional quantities.

You are right. Area is a 2 dimensional quantity but what you have missed out is that you didn't use dimensional analysis properly. The dimensions of velocity is $[LT^{-1}]$. So if you multiply velocity with time, you get the dimensions of the resultant quantity as $[L]$ which is the dimensions of displacement/distance.
The whole concept of area comes from integration. As you must be aware, $v=\dfrac{dx}{dt}$. So the displacement is $\int vdt$ which when used with proper limits is area under the curve of displacement vs time.


Lost first backups - time machine

Question: I seem to have lost my first backups, they disappeared from time machine!....
Is there a way to get back to them?
Comment: Question is too short and unclear. More info needed - what version of OS X. What kind of drive were you backing up to. When did you first start backing up with Time Machine. Etc.
Answer: I think your first backups are most probably auto purged by Time Machine.
Time Machine automatically remove oldest backups when your backup disk is full. And Time Machine keeps hourly backups for the past 24 hours, daily backups for the past month, and weekly backups until your backup drive is full.
Therefore there's no guarantee that your first backup(s) will be preserved.
You may try data recovery softwares on the Time Machine drive, but quite likely it won't help as Time Machine make new backup hourly and overwritten the old data.
Comment: Data recovery software definitely won't help if Time Machine deleted those backups in order to immediately overwrite the drive space with new backups.
Comment: @octern Time Machine will delete backup base on 2 conditions: 1 is because the disk is nearly full, it need to free disk space for the next backup. In this case data recovery definitely won't help. 2 is that Time Machine will only keep daily backups for the past month, and weekly backups afterwards, therefore the initial hourly backups between days / weeks will be purged. In this case data recovery might works as long as the data is not overwritten by newer backup yet.
Comment: Good point. I didn't realize it started purging old daily backups right away, rather than just not guaranteeing that it would keep them.
Answer: If you are depending on Time Machine to archive files that you have removed from your hard drive, that's not a backup (there's only one copy of the data- in Time Machine). As Owen mentioned, it's likely that Time Machine automatically purged your early backup(s).
You really need to reevaluate your backup strategy because I don't think you understand what the role of Time Machine is.
Comment: Not necessarily. They could just be looking to revert to an early version of an existing file.
Comment: If the file was important, there would be more than one copy of it.

Lost first backups - time machine


Is this purported video showing the ending real or fake?

Question: I am confused. Could someone please take a look at this video purportedly showing the English and Japanese versions of the Code Geass Ending and tell if it is real or fake?
Answer: This is fake. Unless someone can point me to the dvd/blu-ray version this can be found on. Definitely not original airing.  Further more the art seems a little off to be Lelouch, (chin is a little sharp).  Chances are this is spliced in from another anime.
P.S. - Not biased response, as I personally think he lived due to the Lelouch of the Rebellion movie they are working on as well as the popular code immortality factor.
Comment: It's also worth noting that when I watched the Japanese original dub with subtitles, no such scene appeared.
Answer: That video is very fake.
It' was shown to be fan made years ago.
There's many ways you can see it's a fake:
The zoom on his face was of terrible quality.
The broadcast station's logo disappeared during the zoom.
There was no music during the zoom.
People checked the Japanese ending and the zoom wasn't there.
It was highly suspicious that this extra scene was nowhere to be found except on youtube channels of people who (falsely!) claimed Lelouch was alive.
How did they get it?
Why are they the only ones to have this scene?
Why was it dropped?
Etc.
The epilogue WAS remade, though, but not like this.
They made a new epilogue for the Zero Requiem blu-ray, it dropped the often misunderstood hay cart scene and replaced it with C.C. narrating to the audience, explicitly telling us that Lelouch is truly dead.
Here are here words: "A young man dies. He had the power to change the world, to create a new order. The world feared him, hated him. But, I know he died with a smile on his face. Only those who have realised their dream will truly understand that feeling of utter contentment. So, this is not a tragedy. And whenever I feel sad or cry at night, I sing a song. A song of man's making. Zero Requiem!"
You can watch the new epilogue here: https://streamable.com/d8dji
Notice the differences: not just a zoom, but actual new art of very high quality (and very beautiful), actual music, and C.C.'s voice actress talking to us!


Is there a way to check to which scientific journals a specific library has access?

Question: Is there a way to check which journals are available in a specific library/university? For example, my university library has access to some, but not all, the scientific journals related to Machine Learning in Springer. It would be helpful in case I need to move in order to get access to a specific topic or group of related papers.
Comment: Ask the librarian?
Comment: Might work for university libraries, but in the public ones the answers usually don´t go further than the name of the publisher..
Answer: These come to my mind:

The best way is to ask the librarian to give you a list of journals available in their library.
Check the website of the library/ university you are interested to study in, they may list the journals and publications which they have access to.
Very few journals/ publishers list the libraries/ research institutes where their journals are available in.
Also, you may email the journal and ask their customers service whether they are available in a specific library or not. I have never tried this and I am not sure whether they are going to answer you.
Comment: I would precede this with "0. Check the library catalogue", but 1 is a good followup (most libraries will have this to hand). The catalogue will almost always list every subscribed title, but won't always include all the "extras" from a Big Deal type subscription.
Answer: Since you (marsop) wrote Austria as place of residence in your profile, you may be interested in the EZB database that lists university library electronic journal subscriptions for most institutions in 5 countries (Austria, Czech Republic, Germany, Slovakia, Switzerland) and a few others (including the Library of Congress in Washington, DC). It also supplies information for many non-university libraries that typically have electronic journal subscriptions.
To use it, first click on "Choose Institution" on the left side of the page. Then select your institution (if it is listed). If you then search for journals, you will see a color code next to the journal names indicating whether members of the institution have (electronic) access to the journal's content.
Comment: The EZB is incredibly useful, and if it's only to figure out which friend to mail for having an article downloaded... Maybe you can mention the countries it's covering, so that others can judge whether it might be useful for them?
Comment: This is exactly what I was searching for, thanks.


Pinch hitter for pitcher

Question: In today's Nats/Braves game (5/29/19), the Nat's pitcher came up in the top of the first. Could the Nats have put in a pinch hitter for the pitcher and still used him in the bottom of the inning?
Answer: No

A pinch hitter is a batter used as a substitute for another batter. A pinch hitter only comes into the game when the batter whose turn he is taking is due to bat. At that time, he is "announced into the game"; the batter which he replaced is out of the game for good.

This clearly states that the batter replaced can not come back into the game, although they may pitch for that team
Comment: While this is correct, please ensure that you credit the source you're quoting from. What would be ideal is to reference the rulebook on this one.

Pinch hitter for pitcher


What are the effects of liquidity crisis?

Question: What are the actual effects of the lack of liquidity?
Economists always say, we need to increase liquidity at a time of recession, but why is liquidity is important for us? Could anyone explain it in an example?
Answer: Lack of liquidity depresses the output and can lead to recessions because it forces otherwise healthy firms to go bankrupt and it also undermines the financial infrastructure of an economy.
I think good way of understanding the problem is to explore the difference between illiquidity and insolvency. When firms go bust it is often mainly due to one of the two following reasons:

Firm is insolvent - when firm is insolvent it means that it is economically not viable. The insolvency means that the firm simply does not generate enough revenue and consequently also profit to meet its obligations.
Firm is illiquid  - when firm is illiquid it generates enough profit to meet its obligations but not enough cash. This is because the customers of the firm might not pay for the products on time (which during the crisis often happens - for example in the current corona virus crisis some people might pay their rents late - some countries even consider canceling them/postponing them). But this the hurts the ability of that firm to pay its employees suppliers and creditors in general. Consequently even though firms business might be economically healthy there might not be able to generate enough cash in short term to pay its own creditors.

(Note: I am using the words insolvent and illiquid in broad economic sense - in finance and accounting those words have little bit more narrow definitions)
You want to let insolvent firms to fail and be replaced with more efficient firms - its the part of Schumpeterian creative destruction. However, firms with liquidity problems are fundamentally healthy- especially when the iliquidity is caused by shock and is not chronic. Hence when illiquid firms fail it is more or less pointless loss. Unfortunately, in practice it is hard to distinguish which firm is actually insolvent and which illiquid and hence it is not possible to just have some regulation that would effectively shield illiquid firms from the bankruptcy (such regulations exists but unfortunately they often turn determining whether firm is insolvent or illiquid into legal battle that has less to do with economics). As a result most economists stress preventing liquidity crises in the first place.
Furthermore, in the above I was talking just about firms in general but liquidity is actually extremely important to the financial sector. Banks assets are essentially illiquid because they offer loans, and they cant just ask the people they lent money to repay it back before maturity. However, banks liabilities are liquid because they consist mostly of deposit accounts from which people can withdraw cash any time they want. Now most countries have deposit insurance - a regulation that helps prevent people frantically withdrawing cash due to fear of bank going bust (i.e. bank runs). However, this does not extent to other financial institutions and shadow banks which can experience runs by creditors who worry that they wont get their money back, and since financial sector is all interconnected falling of these institutions can spread to all other financial institutions.
Any problem affecting financial institutions will eventually hurt the real economy because financial intermediaries have first order impact on the economy, because many businesses relay on them for financing - especially startups, but they are important overall (see Levine, 2005 for discussion of that).
So to sum up a liquidity crisis often leads to recession and has negative impacts on economy because it damages the financial infrastructure and forces otherwise healthy businesses to go bankrupt.
Answer: Based on my understanding, liquidity is basically cash mainly for daily uses like transactions. So liquidity crisis means the economy runs out of money for daily uses.
Previously the crisis caused by Covid-19 is actually a liquidity crisis. Firms and investors had pessimistic expectations about the economy, so they started to sell their assets in exchange for money. As a response, the US government issues a lot of USD in order to stabilize the economy.
You can think the money circulated in the economy like blood in our body. If there's no money on the market circulating from people to people, there are no transactions actually, then the economy is almost dead.
By printing more money, so that people have more money in hand and they are more willing to increase their consumption. This boosts economic activities a lot. More importantly, this can enhance people's confidence in the economy as well as the government, which would influence people's expectation. Please remember, EXPECTATION is very important in economics.
Comment: If firms and investors sell their assets, it means they liquidate them, so they have more cash. Why would the response to this from the US gov be to print more money?
Comment: They have more money, but public has less money, so as less money circulated in the economy. Those who sell their assets are expecting that the asset price is going to decline, so they hold money instead to be safe.
Comment: Why would the public have less money in circulation just cause an investor/firm liquidates it's assets? also, they don't keep millions in cash, but they buy safe bonds for example, which would actually decrease the money in circulation. But still, why liquidating assets decrease money in circulation?


Is the after catalyst oxygen sensor used for engine mixture control?

Question: People have often stated that the oxygen sensor installed behind the catalytic converter in a common gasoline engine setup has only one function: to test the health of the catalytic converter. Specifically, that it plays no role in engine mixture control. There is generally no disagreement with the role in catalyst testing. The question: are there any engines where this sensor is used by the engine control computer to modify the fuel mixture or other operating parameters?
Answer: The rear fuel control controversy has been the subject of some interest on professional automotive repair forums in years past, principally i-ATN. Rear fuel control strategies are used extensively; this is a well-established fact within the industry.  For a more accessible reference source; the Bosch Automotive Handbook is a good reference. In the 5th edition, it's on page 525.
Engine management fuel control strategies are among the most closely guarded secrets. Documentation is scarce on the details of how it is done in any given system. That does not mean we are without ways to discover generally how it is done. One piece of evidence we have is the OBDII PID labeled O2BxS2FT. A fuel trim PID for a rear oxygen sensor suggests that the after catalyst sensors are indeed used for fuel control. Experimentation can also reveal how the different OEMS use the sensors. Some systems, Subaru of the late 1990's for example, are unable to maintain mixture control at or near stoiciometric when the pre-catalyst sensor becomes disabled. Others have no problem maintaining fuel control on both banks even when only one rear sensor is operative (1990 Lexus LS400).
Fuel control strategies have changed over the years. In the 1970's and early 1980's system designs tended toward simple direct feedback logic. The mixture sensor sends its signal, the controller adjusts the mixture via changes to the injector on time, combustion happens, and then the sensor reads the new adjusted mixture, and so the feedback cycle continues. This system works but is crude by current standards as it is mediocre when it comes to optimal fuel mileage management and very poor at the fine level of mixture control need by the catalyst for optimal emission control. This is the system design commonly known and quoted among technicians and amateur internet forums. It is where the myth that the rear mixture sensor only tests the catalyst comes from.
Newer designs have changed significantly. This logic type has been labeled "feed forward". It uses Neural Network learning logic and memorized previous engine response parameters to achieve fuel control that gets a clean tailpipe and better power.
   This method uses an air fuel ratio sensors pre-cat and standard O2 sensor post cat. The AFR sensors test for misfire detection, mixture variation among cylinders and exhaust temperature. The rear sensor checks average mixture, catalyst output temp, and for a few seconds when conditions are right monitors catalyst heath. Direct feedback is not used as  it is much to slow to keep the mixture in the range needed.
Fuel control logic varies greatly over the years and between manufacturers. Blanket statements about how it is done are unlikely to be supportable. However, one can discern some of how it is done on any given vehicle by watching graphed mixture sensor data on an extended test drive.
Comment: But such [rare] implementations are all about catalyst health, not performance or efficiency ... no?  I fail to see how any data post-cat could be translated to anything other than LTFT with an objective to preserve OSC in an expensive 3-way catalyst.  Given GDI, however, the rules have changed and I can't claim I can comment cogently.  What was mandatory stochiometric before makes no sense now.
Answer: Two-sensor lambda control is actually quite useful
I'll summarize what the Bosch Automotive Handbook, 8th edition, says:

the upstream lambda sensor is heavily stressed by high temperatures and untreated exhaust gas, which impacts sensor accuracy as voltage readings can shift due to changing exhaust gas compositions.

downstream lambda sensors are not as susceptible to impact on sensor accuracy, but are slower to respond to dynamic changes and mixture changes

Two-sensor lambda control combines the beneficial aspects of both upstream and downstream sensors

Greater accuracy is achieved with two-sensor control.
Here, a slower correction control loop is superimposed on the two-step or continuous-action lambda control described by means of an additional two-step lambda sensor.
The voltage of the two-step sensor downstream of the catalytic converter is compared with a set point value (e.g. 600 mV) for this purpose. On this basis the control evaluates the deviations from the set point value and additionally alters additively the controlled rich or lean shift of the first control loop of a two-step control or the set point value of a continuous-action control.

Practical example from my BMW M5

The "additive" values are the additive corrections based on the downstream sensors, as described in the quote above.
The "multiplicative" values are the traditional fuel trim correction values based on the upstream sensors.
Comment: But is that LTFT use for engine performance, or just double-checking for ultimate catalyst health and longevity?  I think that was heart of the question.  On edit:  Or not.  On reading again, any use of downstream data answers the question.


Price at Specific Time from Bloomberg

Question: I have a file where I easily export real-time prices to excel using the Bloomberg Add-In, using the formula BDP. Is there a way to get these prices of a specific time?
For example, =BDP("EURGBP Curncy", "Bid") gives the real-time Bid price. How can I change it to give the Bid price of today 3pm specifically?
Answer: BDP() is for current data, to get past data at a specific time or range of times you use BDH() (where H refers to Historical Data)
Try for example
=BDH("EURGBP Curncy","Last Price","7/13/2017 3:00:00 PM","7/13/2017 3:00:01 PM","BarTp=T,BarSz=1,Fill=P")

This will search the time interval from 3:00:00 and 3:00:01 and give you the price of the last trade in that interval, in other words the most recent price as 3:00:01. (It will be blank if there are no trades at all in that interval (unlikely), which you would need handle with IF statements etc.).
With BarTp=b or BarTp=a you can get the bid or ask instead of the last trade.
Answer: Wouldn't that be best asked on the Bloomberg help desk. I am sure they would have answered this quickly.
It would like to add that it also depends on your use case. If you just want this for a few days in the not too distant past (or like you, just for one day), the above intraday bar syntax is perfect. That said, you may as well just run GIT<GO> and look up that single value manually.
There is a fairly big problem with using fill=p here. BBG limits intraday tick and bar data in Excel for up to 140 non-weekend days. On the terminal it is 240 (but GIT actually goes back to 2008).
You can try
=BDH("EURGBP Curncy","OPEN","7/13/2018 3:00:00 PM","7/13/2018 3:00:01 PM","BarTp=T,BarSz=1,Fill=P")

vs
=BDH("EURGBP Curncy","OPEN","7/13/2018 3:00:00 PM","7/13/2018 3:00:01 PM","BarTp=T,BarSz=1")

The latter will correctly display #N/A N/A. The former will pull a value BUT that is simply the last one available going back with the 140d rule. Very misleading to say the least.
If you prefer a longer history, BBG has BFIX<GO> (also available online without a BBG subscription). You can use their API if you are a BBG user. The ticker syntax is visible on BFIX, for 3pm London it would be BPEU L150 Curncy though simply using EURGBP L150 Curncy also works. L for London and 150 for 15:00. It's a bit odd that its in 3 digits but I suspect that was chosen because it's only half hourly intervals in any case. There is a zone dropdown that offers some flexibility for regions.
With that syntax, you can simple use standard BDH without bars and pull a long time series:
=BDH("EURGBP L150 Curncy","PX_LAST","-10ay","")

pulls the last 10 actual years until today (whenever you load it) for 3pm London time.

Price at Specific Time from Bloomberg


English words by CEFR level - open source

Question: Are there any open source data that categorizes English words based on CEFR levl and is available to download?
As an example I found https://www.oxfordlearnersdictionaries.com/wordlists/oxford3000-5000 , which categorizes English words based on CEFR level, but it has license.
Answer: You can try the following free open source resources:

https://www.coe.int/en/web/common-european-framework-reference-languages/reference-level-descriptions
For levels from A1 to B2 there are some textbooks for English vocabulary on the Books4Languages website that you can access and receive a Creative Commons license (for example, here is the link for the A1 level https://open.books4languages.com/english-a1-vocabulary/ ).
For levels C1 and C2 there are two papers provided by the University of Macedonia and that you can access and download for free from here: https://www.toe.gr/pluginfile.php?file=%2F2143%2Fmod_resource%2Fcontent%2F1%2FLevel%20C1%20Word%20List.pdf for C1 and https://www.toe.gr/pluginfile.php?file=%2F2144%2Fmod_resource%2Fcontent%2F1%2FLevel%20C2%20Word%20List.pdf for C2.
Answer: This link appears to have a few lists of words based on level. It's not sortable like the EVR, but the content is still there.
I'd recommend putting the words into something like Anki. Anki has open source flashcard sets, so anyone can use the flashcards that other people upload to it, and they allow you to flip through flashcards giving each a rate of confidence that will determine how often the word shows up again. It looks like they don't have a dataset for English CEFR vocabulary by level, but I have seen some lower level CEFR vocab sets on quizlet
It also looks like although the vocabulary lists are licensed, you can use a text analysis tool from the same website for free to test your writing skills after you've gotten more of the vocabulary down.
Comment: This data is not open source


What is the difference between a literature survey and a conceptual paper?

Question: What is the difference between a literature survey and a conceptual paper?
Comment: Welcome to Academia SE. Can you please add some background information to your question, e.g., where you stumbled upon these terms in reference to a paper? Also, what have you found so far?
Answer: Here are my definitions:
A literature review is a study that searches for scholarly studies on a specified topic, synthesizes and reports the results. The explicit purpose of a literature review is to present other scholars' work.
A conceptual paper is a study that does not analyze any data. It is contrasted with an empirical study, one that analyzes data, whether quantitative (numerical, e.g. statistics) or qualitative (non-numerical, e.g. interviews).
Now, to answer a question you didn't ask but maybe you imply: Is a literature review a conceptual paper? I personally say most certainly NO, a literature review is not conceptual; it is empirical. Literature reviews analyze other people's research as their data source--the unit of analysis is one scholarly study. To me, that is definitely empirical research (even though it is often called a "secondary" study, as distinguished from a so-called "primary" study that treats a subject directly).
In the case of meta-analysis (a literature review where quantitative data from the constituent studies is analyzed statistically) most people would agree that a meta-analysis is not conceptual. There is, however, some controversy or confusion with literature reviews that "only discuss" other people's research. Some people might call such a literature review a conceptual paper mainly because they don't clearly see any analysis of numbers. I disagree with that view, but I do realize that some people take that perspective.
Answer: A literature survey covers scholarly articles on a specific field, topic or subtopics within the field complete applications, advent of new techniques and breakthroughs in that area. A good survey paper ought to compare the works studies and also provide useful insights to open research problems on that area.
A conceptual paper focuses on a specific idea that one wishes to put forward that might seem novel or open new views to a specific research problem.
Answer: In the continuity with the answers I have to tell you literature survey can be even conceptual paper as well as empirical one. Meanwhile, in conceptual paper we just go through models and theories surrounding our topic without analyzing any data. So conceptual paper can be a subset of a literature review.


How to add post type in masonry posts elementory widget

Question: When I try to create a website using Wordpress 5.2.2. I found a widget called Masonry Posts in Elementor Panel. But when I added the widget and checked there is no option to choose the post type. We can only change the category. The category also belongs to Default taxonomy, not custom post types taxonomy. So I can't add my posts from the custom post type(Demos).
After googling I found this one. https://developers.elementor.com/custom-query-filter/. But the query doesn't work.
<code>add_action( 'elementor/query/my_custom_filter', function( $query ) {
    // Here we set the query to fetch posts with
    // post type of 'demo'
    $query->set( 'post_type', [ 'demo' ] );
} );
</code>
Anybody, please explain how to add custom post type using this widget or, how to create a widget like this or suggest any widget we can manage everything like this. I have checked different widgets but most of them have featured image while listing. My post type doesn't have any featured image. So I want to disable featured image. Also, I need to add custom fields from posts to the widget.
Answer: I got a plugin Elementor Addon Elements having the features which I mentioned in the question.
Any other answers for this issue are acceptable.


Why not use a table instead of a materialized view?

Question: I'm new to Oracle databases. If I have understood correctly, materialized view is a view which result set is saved as a physical table in the database and this view/table is refreshed bases on some parameter. If view is saved as a  physical table, why not store the data into a table in the first place? So what is the benefit of using materialized view instead of a table?
Answer: One of the biggest benefit of using a materialized view is that Oracle takes care of keeping the data in sync.  If you have a separate aggregate table, you are responsible for keeping the data synchronized.  That generally requires a reasonable amount of code and a decent amount of testing and most organizations manage to make mistakes that leave holes that cause the aggregate table to get out of sync.  This is particularly true when you try to implement incremental refreshes of the aggregate table.
Another major benefit is that, depending on the settings, Oracle can use query rewrite to use materialized views when users issue queries against base tables.  So, for example, if you have a bunch of existing reports against a detail table that produce daily, monthly, and yearly aggregate results, you can create a materialized view on the base table that aggregates the data at a daily level and the optimizer can utilize that materialized view for all your existing queries.  This makes it much easier to optimize reporting workloads in a data warehouse without trying to go and rewrite dozens of reports to use your new aggregate table or to mess with DBMS_ADVANCED_REWRITE to force your own rewrites of the queries.
Comment: I would assume this answer was copied into that blog post, yeah.
Comment: is this the source? https://www.thegeekdiary.com/table-vs-materialized-view/
Answer: Materialized Views are automatically updated as their base tables are updated.
Comment: Note that `ON DEMAND` is the default refresh behavior. The materialized view must be created with `ON COMMIT`. and maintaining the materialized view isn't free. It's probably cheaper than a trigger, though.
Answer: One good case for using MVs is that some times you want to aggregate data and get this summary information from large tables frequently and quickly. Without materialized views, you have to either deonormalize some of your tables and maintain the aggregates via code or repeatedly  scan large sets of rows. Either way is not always acceptable specially with dashboard and similar online applications. If you keep the results in a separate tables, you complicate your application code and as @Justin Cave says, you will be in charge of making sure that the manually aggregated data is in synch. with the original table's data.
Answer: Not an Oracle person, but another use case would be third party solutions. They generally do not support you making changes to their designs but a MV would be "invisible" to their code but provide access to custom reporting/data extracts.
It's not free in that it will cost have storage costs and potentially impactful insert/update time costs but that may be offset by the time spent retrieving the materialized data versus a "straight view" or creating actual tables and maintaining the surrounding ETL.
Finally, doing so may void your support contract with the vendor, consult-your-lawyer-blah-blah-blah
Answer: Instead of going directly to Materialized views let me explain Views.
Basically views are exist logically unlike tables. If we want to hide certain columns to users we can not do using tables. Creating a view we can achieve the security.
Use-case: if a view is internally related with 10 tables along with group by and functions have millions of rows, it takes much time to execute.
So here comes Materialized views helps us to get data faster.
Materialized views are physically exist in database. Whenever the base table is updated the Materialized view gets updated.

Materialized views are updated periodically based upon the query definition, table can not do this.
Answer: A materialized view can be set up to refresh automatically on a periodic basis. A table may need additional code to truncate/reload data.
example: Materialized view having data from multiple tables can be setup to refresh automatically during non-peak hours. A physical table would need additional code to truncate/reload data.
Security can be better controlled in a materialized view rather than a table.


Do the Jews believe that prophet Jesus is their prophet?

Question: Shalom friends do the Jews believe that prophet Jesus is their prophet do the Jews follow his teachings also what do the Jews think of prophet Jesus. Thank you Shalom.
Comment: I'm with @ezra how is this related to a Messiah related question?
Comment: Please see related answer which also relates to Jesus...https://judaism.stackexchange.com/a/84918/7303
Comment: This is literally, word for word, [this question](https://judaism.stackexchange.com/q/84913/9682), with Jesus put in where Muhammad is there.
Comment: @DonielF - Not a dupe, because that question discusses whether or not he is Messiah, not whether or not we consider him a prophet. The answer is the same either way, though. :)
Comment: @ezra Maybe [this one](https://judaism.stackexchange.com/q/33467/9682)?
Comment: @DonielF - _That_ answers the question.
Answer: Judaism does not consider Jesus to be a prophet. One major reason is that the era of prophecy ended well before Jesus was born

The era of prophecy officially came to an end some 23 centuries ago. The last generation of prophets were those who began to prophecy before the First Holy Temple was destroyed in 423 BCE, though a number of that generation survived the 70-year Babylonian exile and lived to see the building of the Second Temple. Most famously, Ezekiel prophesied in Babylonia, and three prophets, Chaggai, Zachariah and Malachi, were members of the "Great Assembly" that led the people in the first years of the return from Babylon. Mordechai and Esther were also members of the long-lived generation that mourned the destruction of the First Temple and witnessed the building of the second. With the demise of that generation, "prophecy departed from Israel."

In terms of your next questions, Jews mostly don't think of Jesus as he has no part in our daily way of living, so whatever his teachings might have been their are not relevant to Jews. The academic questions of whether he existed, whether he was a rabbi in any sense (or even Jewish) or if he was a political figure to anyone don't work their way into most people's life, day to day.
Comment: This is cute, but makes for a poor answer. All we have is Chabad.org claiming that the era of prophecy officially came to an end 23 centuries ago, whatever that even means. And citing no sources. Even if this were obviously rue (which it very much is not), it would not be a very strong answer. If this is the reason (I realise you only wrote 'one major reason) why Jews don't accept Christianity, Judaism is on pretty shaky ground (Luckily it isnt).
Comment: @mevaqesh is there a post on this site where you clarify your claim about prophecy not having ended 23 centuries ago?
Comment: At the minimum, Rambam writes that the messiah will be a prophet, so the loss isn't permanent anyway, and hence there is nothing (in this attending argument) to preclude Jesus from being a prophet. Note that in Rambams discussion of mohammed being a prophet or not, he makes no naturally claim that he can't be a prophet since "prophecy ended".
Comment: All we have is Chabad, but they are referencing the talmud https://judaism.stackexchange.com/a/17729/1362 -- also, I didn;t say anything about reasons Jews do or do not accept Christianity. That wasn't what the question asked. Prophecy ended as per the gemara and will return in the case of the Messiah, and his era, but since the messiah hasn't come, Jesus is not part of that era. QED, not a prophet.
Comment: 423BCE?  I thought it was 586BC, during Nebuchadnezzar's reign.  I know some Jewish sources dispute the earlier date, but even the Dead Sea Scrolls folks knew 586 was correct, because the Damascus Document refers to "390 years after Nebuchadnezzer, etc" and then another 20 years before their Teacher arose, estimated at mid 2nd century BCE by most of the DSS scholars. That makes 410 years, so 423 would make the Teacher live around the turn of the Era, which is unlikely, since many of the sectarian scrolls have been dated earlier.
Comment: https://en.wikipedia.org/wiki/Missing_years_(Jewish_calendar)
Comment: @rosends- Thanks!  Come to think of it, I think there's a question or two on here somewhere on that subject.  But how can some of us still consider Seder Olam authoritative if it's obviously inaccurate as far as those years are concerned?
Answer: With all due respect to a seeker of knowledge it is written in Numbers 23,19:
לֹ֣א אִ֥ישׁ אֵל֙ וִֽיכַזֵּ֔ב וּבֶן־אָדָ֖ם וְיִתְנֶחָ֑ם הַה֤וּא אָמַר֙ וְלֹ֣א יַעֲשֶׂ֔ה וְדִבֶּ֖ר וְלֹ֥א יְקִימֶֽנָּה׃
God is NOT MAN to be capricious, Or mortal to change His mind. Would He speak and not act, Promise and not fulfill?
This proves 2 points which you might have otherwise not known from your version of the Old testament:

Jesus cannot be a godly entity rather he is an impostor by claiming so.
G-d will never replace the Jews from being the chosen nation As He doesn't change His mind, and our very existence today proves so


Aside from mind maps, what other graphical diagrams and graphical elements can you use to document and plan out your novel?

Question: Aside from mind maps, what other graphical diagrams and graphical elements can you use to document and plan out your novel? I am specifically referring to anything that has a graphical element, so any plain text or text documents with some images are excluded. I am wondering if there's anything else. I can think of timelines too, but aside from those two, I can't think of any.
Comment: **Freytag's pyramid** is the GOAT!
Comment: How do you consider a mindmap to be graphical?
Answer: Freytag's Pyramid
Reference: https://writers.com/freytags-pyramid
Freytag's Pyramid is a famous visual story planning device, and has been used for centuries to describe the most common story structure in writing:

Exposition (the premise),
Rising Action (building up the tension),
Climax (the big event where all the tension comes to a head),
Falling Action (recovering from the climax),
Resolution (everything works out and loose ends are tied up).

Visual Story Timeline
Reference: https://diymfa.com/writing/mapping-out-your-story
You can also lay out the events of your story in chronological order on a visual timeline, which helps you plan out when things take place. For example, here is a visual timeline of the Hunger Games:
Answer: Similar to a timeline, but more detailed, is the Gantt chart. It is essentially a timeline with multiple lines, converging and diverging, displaying the interaction of various interconnected pieces of a larger project. As used in project management, it allows identification of the "critical path" of events that must happen in sequence and how long each one will take, so that enough time can be budgeted for the project as a whole. Events not forming part of the critical path can happen concurrently, but these events must still be scheduled to start and end on time so their intersections with the critical path occur on time.
For a novelist, Gantt charts allow the writer to plan out the complex interconnected timelines of character backstories and actions, avoiding anachronisms when explaining the overall sequence of events. More than just a timeline, Gantt charts allow not just chronological but spatial organization of events based on the spheres of influence of each character, allowing the omniscient writer to keep their characters (and the reader) non-omniscient.
Other graphical tools beyond general mind maps include "entity-relational diagrams". The original coined use of that term is in data modelling, but I'm using it more generally. Think of a family tree, but more general, modelling not just marriage and  parentage, but all kinds of interpersonal relationships, like boss-employee, teacher-student, dating/affairs, as well as relationships between people and nonhuman things that are important to the story, like tying people to places. Similar to a mind map, you draw circles/bubbles for each "entity" you're tracking in the model. Smaller bubbles linked to the large one can be used for useful pieces of information, or you can write those inside bigger bubbles of each entity. Then, you draw lines between entities and write concise terms of the relationship, with an arrow pointing in the way the relationship line should be traversed for the stated relationship to be valid (if the descriptor is hierarchical).
Answer: Activity diagrams with swimlanes
I use activity diagrams with swimlanes. I create one node per scene and use one swimlane per POV. I use red lines (pun intended) to connect the scenes in story order.
Many software engineering drawing apps have support for this. My favorite, yEd has functions to automatically structure the elements hierarchically.
Family trees
Family trees might come in handy if you're creating an epic saga about a family or two. Otherwise, likely not. (yEd has layout functions for family trees as well, but you could also use genealogy programs like Gramps to get the whole family data in... if your family's history is really important.)
Conflict diagrams
I also use conflict diagrams, invented by M Harold Page in his "Storyteller Tools." These are great to get to a higher level of your novel's conflicts and alliances. (I create them with yEd, I think he uses Scapple.)
Connections and relationships
Using yEd and putting in characters and connecting them with lines of different colors or patterns and then running the organic layout function usually produces a nice diagram over connections between people and sometimes organizations.
I've used it to visualize a resistance group organization both mentioning people and structuring the general organization of a cell in that group. (Check the above-referenced yEd manual page. You'll get an idea of how to do this with groups.)
Timelines
Of course, no novel could ever be written without the timeline diagram. This is akin to a Gantt chart, and I use Aeon Timeline to create them.
Index cards
Many authors use index cards on a corkboard or wall. It could definitely be called a "diagram" and the cards themselves graphical elements. Especially if you purchase different colored cards.
Many writing programs also have index card handling (e.g. Scrivener, Final Draft, and Storyist). Some even have swimlane handling in the index card view.


Is this picture of a digital camera being oversaturated by bright light source i.e. the Sun?

Question: Is this picture of a digital camera being oversaturated by bright light source i.e. the Sun?
http://farm4.staticflickr.com/3110/3147227521_396e16bcfc.jpg
Comment: I'm voting to close this question as off-topic because it concerns the optical and electronic qualities of cameras, rather than any astronomy.
Comment: Can someone migrate this to SE:Photography?
Comment: Might be over-saturation, or trying to photograph an eclipse.
Comment: It's an everyday problem with digital cameras, called (unimaginatively) "black spot". You can easily find thousands of articles about it.  This QA would seem to be on the wrong site.
Comment: This photo has been used before http://astronomy.stackexchange.com/questions/12256/brown-dwarf-transcending-past-the-sun-with-the-naked-eye
Answer: It's an artifact from the digital sensor and/or the image processing in some cameras.
There have been a number of digital cameras with this issue. E.g. here is a Sony camera where the sun turned black with a specific setting for the picture profile. (In the example video, it's the S-log picture profile at 0:49.)
Sony called it a bug, and released a fix for it.
This artifact only affects a relatively small number of cameras, and it makes sense to think of it as a bug in the camera image processing: Yes, the sensor is oversaturated, but oversaturation is better represented as all white rather than all black.
If you have an affected camera, it's not just the sun that turns black, it's all oversaturated highlights, like this example with car headlights.
Answer: That does seems like the most probable explanation. Pointing a camera directly towards the Sun is not exactly healthy for it
You may want to try to take some other pictures and study them to see it some permanent damage is present. (That is, if this is your camera anyway.)
At a close up look the artefact can look somewhat like some common painting or spray tool in common editing software, but it is hard to tell if it is fake. I could not find any meta-data like "created with GIMP". It says though that the image is almost 8 years old.
It could be an optical artefact, as it appears like the image is taken through a window. (Please give some more information on this if you have it.) Any astronomical phenomenon seems highly unlikely.


What type of weapon makes the most sense for use on a spaceship

Question: Supposing your spaceship was long and narrow, what type of weapon would be most practical on a spaceship made of the materials we make spaceships out of today with scaled hull thickness to equal the relative size of a large aircraft carrier (so if the thickness of a space shuttle hull is 1 unit at its current size, the hull thickness would scale with its increasing size proportionally to x units)? At first, given the long corridors that would occur in a long and narrow spaceship, I assumed that some sort of gun or ranged weapon would be most effective. However, reconsidering it I think there may be a danger of breaching the hull with kinetic weaponry and creating a lot of heat with laser based weaponry (given that heat dispersion is a major concern for spacecraft as well). Are range based weapons best, or is something like a knife just more practical as a means of avoiding damaging critical ship components or putting holes in the hull by mistake. Defending from mutineers and enemy boarding action is the primary goal.
Comment: Does the spaceship have some form of artificial gravity?
Comment: @Willk yeah, but "Defending from mutineers and enemy boarding action is the primary goal."
Comment: @Willk when creating this question I did not see any such question in the "related" section. However I am asking about defense against boarding, in which preservation of internal components and defense AGAINST such boarding weapons is the focus.
Comment: @RichardCosgrove There is no antigravity on the ship, excepting crew quarters, mess hall, gym, and other such facilities associated with crew living which is generated by spinning. When a crew member needs to stick in place, they use magnetic boots.
Comment: What weapon work depends on what the target's properties and abilities are.  E.g. human vs. human, human vs. borg and so on.
Answer: No matter if there is gravity or not:
Foam
(Taken from here)

Try expanding foam: you can very quickly fill the area around someone.
  Within a confined space station, even an inflatable object made of
  tear-resistant material becomes a useful area denial weapon.

Bullets
A machine gun that fires rubber bullets at high speeds would be enough to stop organisms from physically boarding the ship, unless their armor is as strong as the ship's hull. If it isn't, just increase the mass or speed of the bullets.
Nets and Rope: Or, if there are few organisms approaching your ship, like maybe one or two, Nets and Rope would work. Keep it like the old times :P
Light
Blinding light (which wouldn't damage the ship) could also be useful. Considering that the outer hull of the ship should be resistant to the sun's rays, you could mount a high intensity light ray gun on the outside, aimed to blast anything coming near. Worse case, it hits your own ship, but then again, your ship is resistant to the sun's rays.
Magnets
You have magnets? Okay then. Create an entry way into your ship that combatants must travel through. Possibly a tunnel or something of the sort. Cap the ends of the tunnel with very magnetic magnets. They come barging in? Release the magnets and squish 'em.
How to prevent a Mutiny:
You said that all personnel wear magnetic boots? Well, make the floor an electromagnet, and if your crew mutiny's, just turn on the electromagnet and poof, they're all stuck to the ground.
Does this help? Any questions?
Comment: One question, how would recoil work on a high velocity rubber bullet gun, similar in size to a handgun but with enough velocity to incapacitate potential combatants wearing standard Kevlar.
Comment: Employ snipers instead, who have approximately 100% accuracy, and instead of increasing the velocity, increase the temperature of the bullet so that it melts through the Kevlar. I am not a physicist. Don't ask me if this is practical or not :P
Comment: Or, if you feel that that solution isn't good, I have another one I'll add to the bottom of my list. It's called magnets :P
Answer: My suggestions assume the boarding party are human.
I'd recommend looking at weapons and defences used on ships to prevent hijacking by pirates.
These include the long-range acoustic device (LRAD), which is a sonic gun, laser (to blind and dazzle), electric fencing, projectile launchers using compressed air, "rubber ball grenades" and special foams.
Tasers would also be useful as personal sidearms, as might "beanbag guns" (similar to shotguns, except they fire beanbags at high speed).
As there's no real gravity in your ship, melee weapons would be nearly useless, as you wouldn't be able to get any real force behind an attack.
Likewise, the recoil from gunpowder-based weapons (pistols, rifles, shotguns) and automatics would make them useless in microgravity. And the rounds could likely puncture the ship's hull, although special ammunition (like glaser safety rounds) could reduce the risk of that.
Equipment that could deny entry or movement would also be useful - like a "razor wire bomb", netting or piano wire.
Another way would be to use powerful strobe lighting to induce seizures.
I'd avoid using "poison gas" or smoke of any kind. Unless the gas is designed to become inert quickly, the crew would just have poisoned their own air supply.
Answer:
If there's gravity:

Chemical weapons like poison gases would work. Energy guns that relied on low-level nervous system disrupting shocks might work as well. Perhaps some sort of kinetic-energy blast. You could also use chambers that empty of all air, creating vacuums, as a trap. Any modern-age projectile weapons might work, but I think that short-range weapons (blunt or sharp, possibly electrified or poisoned) would be most reliable for a gravity situation.

If there isn't gravity:

Things like knives would be less reliable, but since things wouldn't get pulled down, assuming there were long corridors, primitive ranged weapons would be effective (guns, bows, some kinds of edge propelled by mechanical or chemical force.) You could, of course, walk by using some sort of magnetic system. If you had magnets, though, you could use the same concept behind induction burners and then fry enemy gadgets. You wouldn't want to use an electro-magnetic pulse (EMP) because it would also disable the ships electronics (unless you used a target-specific ion gun.)


ajax update block on click to link

Question: I am using jQuery Ajax Load module in my site to load some contents from url to show on specific div which has a required class. With this module I am able to fetch the Page content from URL through ajax & displays on specific block. I need to replace the blocks when click on the link. for-example I have a block A displayed on content area, also I have block B & C which are hidden for now. when I click on link B the block A should be replaced with block B & so on using AJAX.
Please help me?
Thanks
Answer: What have you already tried?
Having a look at the module JS, there is a function jquery_ajax_load_load(el, target, url). Have you tried calling it?
EDIT
To load block content you could either use another module specifically for it (search "drupal block ajax load") (ajax blocks) or you could create your own module that just returns block content when navigating to a url. This should be quite easy by implementing hook_menu and returning the value returned by block_load()
Comment: Its calling by itself when i activate the module, it will display the loading icon & contents fetching from URL, but my question is how i display block, as there is no URL available for blocks in drupal 7?
Comment: I will update my answer

ajax update block on click to link


Two perspectives in a non-fiction book

Question: My daughter and I thought it was a good idea to write a book about our experiences throughout her casting for a movie that she did. Her view on the journey and My view as her mother. Not sure how to structure it so that it's clear to the reader. So far we've been writing it entirely as her with her just stating things like my mother thought blah blah blah but I feel it would be better if it was first person from each perspective. Sort of the way the showtime drama 'The Affair' is done. Any suggestions or examples?
Comment: I'm not clear on what your view as her mother brings to the story. You've described this as non-fiction. What kind of story are you trying to tell? Is it some kind of instructional guide?
Answer: Intriguing. You could write it as almost like a screenplay with the speaker listed flush left--but then also do paragraphs of prose, probably from your daughter's perspective, outside of the dialogue. No immediate examples come to mind so I'm probably way out on a limb with this one.
Answer: I'd say that splitting it by chapter would be the most logical approach. However I think that only works if you are telling a story in your own right. So the reader reads a chapter from her on one aspect, then gets another chapter on your views on that event.
You would need to be quite careful how you choreographed them, you wouldn't want to bore the reader by repeating everything. You'd need to divy out the crucial story points and decide which one's furthered each character's story the best. It would certainly be a challenging thing to write, but I imagine quite fulfilling.
If you are simply providing a commentary on her story, then maybe footnotes, or occasionally interspersed pages might be better (with a big 'mother's thoughts' at the top!)
The first step is probably to sit down and decide what you want to write, what you both want to contribute to it, and what you want the end product to be. Once you've got that, create a story plan between you, with a concrete idea of who is saying what.
Other than that, it sounds an interesting idea, I wish you luck!
Comment: Yes. I think one key is to clearly identify what is from mother and what is from daughter, so the reader doesn't have to figure it out. Whether it's alternating chapters or some smaller unit, just have them clearly labeled. A heading on a page would seem far less redundant than to constantly be saying, "Now from the mother's point of view ..." or other embedded text. I'd think this would be most interesting if there were very different perspectives. Like daughter talks about some event as fun and exciting while mother talks about it as dangerous, etc. Or daughter relates a conversation ...
Comment: ... and mother relates the same conversation, but with a slightly different memory of the exact words, so the reader can see how they are very similar, could well be two different people's impressions of the same speech, but come across with totally different meanings. My point being, if the story comes down to just daughter mentioning some incidents and mother mentioning other incidents and there's no apparent difference in perspective, there's no point separating it out. Just combine both sets of memories into one narrative.
Answer: One approach is to write separate chapters (maybe alternating, but maybe in this case more from her?) with the writer identified at the beginning of each.  A similar approach was taken in the Jumper novels by Stephen Gould; each chapter is "titled" with the name of the point-of-view character for that chapter.  I once read a novel, I think by Spider Robinson but I might be mistaken, where two characters alternated chapters in first person; that would be similar to what you're describing.
In both of these cases the change in point of view didn't impede the story; that's really important.  What you talk about in one of your chapters should follow naturally from whatever she talked about in the one right before it.  Don't jump around; that'll confuse your readers.  (Consider how confusing it is to read a comment thread where people posted out of order.  You don't want to cause that kind of reaction in your readers.)
Remember, as the two of you plan this, that not all chapters need to be of equal length and you don't need equal numbers.  If it seems more natural for her to have more of the text, do that.  If it ends up being closer to 50-50, consider alternating.

Two perspectives in a non-fiction book