Remove a Global Quick Action from Salesforce 1 App Home Page

Question: I am viewing my home page in sf1 app. There I can see a global action Called New Contact. What I want to understand is is there any way to remove it from Home page? I want to add a custom quick action instead
Answer: You can change the Global Publisher Layout To remove "New Contact" action from the Home Page by following these steps:

Enter Publisher Layout in the quick find box.
Select Publisher Layout under Global Actions.
Edit the Global Layout
In the Salesforce Mobile and Lightning Experience Actions section, if you see a link to override the predefined actions, click the link to override.
Remove "New Contact" action by dragging it to the top.
Save your changes.

For more information: Refer to Create Global Quick Actions in Salesforce Mobile App Customizations
It will aslo help you in creating and adding custom quick actions in mobile app. You will get idea about how to create and remove actions from mobile app and from where to do this.


I am my site collection administrator; how can I restrict my privilidges on a folder?

Question: How do I remove myself as the SharePoint site collection administrator from having access/visibility to a folder?
Answer: You can't, this is the point of being a site collection administrator. The SCA is all seeing and is there in part to have an additional layer of privilege over those with just Full Control. If the Full Control removes all permissions from an object, the SCA can recover it.
The SCA can also see "orphaned files", those being files that have no checked in version.
Answer: As Site Collection Admin, you cannot restrict your self anything within that site collection.
But in a scenario, you dont want to access the folder. You can create new site collection and make one of the person( who need access on that folder) as Site Collection admin.


Pentaho vs SAP BusinessObjects

Question: Is there anyone out there that used these two technologies and could give me some comparison in the form of advantages and disadvantages of both? I'm currently working with BO and I have heard that open source Pentaho does pretty good job as well.
Thanks in advance!
Comment: No answer... so please try Pentaho and let us know ;-)
Comment: I wish but I'm not working with BO anymore. :-)
Answer: Pentaho is a full-fledged BI suite, meaning it can handle everything from reports, OLAP, dashboards, etc.
I've only briefly dealt with the reporting side of BO, but I haven't looked to any other systems since starting to work with Pentaho three years ago.  It's a very powerful system (and FOSS).  There's also a very vibrant and active community.  Being FOSS, Pentaho also encourages the community to contribute back.  Some recent examples of this are Saiku (previously called Pentaho Analysis Tool; 1.0 is around the corner, already usable as a plugin into the BI server) and the Community Dashboard Framework (which is now a core component of the suite).
The best suggestion I can make is to download the test server from Sourceforge and start playing with the toolset.  It's free, so there's no trial expiration to worry about.
Pentaho also provides support packages for both individual components and the full suite. The last time I checked the prices, it was like $2.5k for a component and $10k for up to 10 developers on a single server.
Answer: With Business objects you created Universes which are a subject oriented semantic layer on a data base. You do that with BO Designer. These universes are then used with the reporting tool by just grabbing the objects in the semantic layer. The thing is that as the Universe contents a subject oriented semantic, any user knowing the subject can easily create a report by dragging and dropping the elements of the Universe within the report. No need to know sql. Users, reports and Universes are then managed in a repository where you can defined endless combinations of security between all of it. The reporting and the security management can be done via a web app.
Additionally, you have BODS which is the ETL tool that enables the creation and feeding of the reporting databases/data warehouses/data marts/EIS/ODS/.......
There are other tools which a didn't use. I've just used BODS (ETL), BO DESIGNER (Universes), DESKTOP INTELLIGENCE (reports) and the Central Management Console (CMC) for security.
Cheers

Pentaho vs SAP BusinessObjects


Can I install Ubuntu 16.04 LTS with less than 25GB hard disk space?

Question: I have a limited amount of free disk space left on my machine, (around 9 - 10 GB), and I would like to try out the latest Ubuntu 16.04 LTS on my computer, so my question is that, Is it possible to install Ubuntu 16.04 LTS with less than 25 GB of disk space (which is stated on the official documentation, as the recommended disk space for installation)?
Comment: @AhmedJerbi: Don't you mean [D.3. Disk Space Needed](https://help.ubuntu.com/16.04/installation-guide/s390x/apds03.html)? Also, I don't see any hint that OP want's to install Ubuntu Server, so the default assumption should be Desktop (which needs quite a bit more space).
Comment: Where did you read about 25GB ?
Here is what I've found is the docs https://help.ubuntu.com/16.04/installation-guide/s390x/ch03s04.html
Answer: 25GB is the recommended available space, however the minimums are stated in section 3.4 of the installation guides. Visit https://help.ubuntu.com/16.04/installation-guide/ and select your machine architecture first. AMD64 with the desktop has a min of 10GB HDD.
Answer: The recommended minimum hard drive space is 2 GB for server and 10 GB for destop installation. However, the installation guide states:

A minimal server installation of xenial requires 400MB of disk space. The standard Ubuntu desktop installation requires 2GB.

So, technically, you should be able to install it on a far smaller drive (unless the installer refuses to do so, I didn't try it), but of course you may easily run into out of disk space problems which easily play havoc on linuxes. So keep an eye on that!
Answer: You state in your question that you have about 9-10GB of disk space.
If you plan on running the Ubuntu Desktop, you must have at least 10GB of disk space.  25GB is recommended, but 10GB is the minimum.
Unless you can meet that 10GB minimum (and no, 9GB is not 10GB), you should not be using Ubuntu on that small a space, and should probably be cleaning off other stuff from your computer to make more space for your system.  (Very few systems can operate with just 9GB or 10GB free, if the disk is large - the rule of thumb is once the drive dips under 10% of available free space, it's going to slow down considerably).
Source: https://help.ubuntu.com/16.04/installation-guide/, and knowledge gathered through trainings and experience
Answer: The minimum requirement is 5GB, not 25. You'll be fine with 10GB, although you might have to delete old kernels every now and then.


Query regarding Central Wallets and Sub Wallets

Question: Is it possible to develop a wallet system with a central wallet and sub wallet system for Bitcoin and other cryptocurrencies. Is there any wallet system available with such features. Any guidance or pointers would be much appreciated.
Answer: Hardware wallets generally use a master seed from which they generate wallets for each cryptocurrency. One particular specification for this use case is BIP44 (which builds upon BIP32 and BIP43).


Method to dynamically load java class files

Question: What would be a good way to dynamically load java class files so that a program compiled into a jar can read all the class files in a directory and use them, and how can one write the files so that they have the necessary package name in relation to the jar?
Answer: I believe it's a ClassLoader you're after.
I suggest you start by looking at the example below which loads class files that are not on the class path.
// Create a File object on the root of the directory containing the class file
File file = new File("c:\\myclasses\\");

try {
    // Convert File to a URL
    URL url = file.toURI().toURL();          // file:/c:/myclasses/
    URL[] urls = new URL[]{url};

    // Create a new class loader with the directory
    ClassLoader cl = new URLClassLoader(urls);

    // Load in the class; MyClass.class should be located in
    // the directory file:/c:/myclasses/com/mycompany
    Class cls = cl.loadClass("com.mycompany.MyClass");
} catch (MalformedURLException e) {
} catch (ClassNotFoundException e) {
}

Comment: Yes, I believe ClassLoader is what I'm looking for.  However, can you think of a way to effectively use the loaded class?  I could make it implement an interface...but how could I reference that interface?  Hmm... perhaps if I were to add the compiled jar as an external jar...  in that case, what should I call the package of the loaded class? If I have: /thing/myjar.jar and thing/loadedclasses/class.class, what would the declared package be for that class?
Comment: Yes, you would have to agree on some interface or abstract class which the to-be-loaded classes implements / extends. (Or completely rely on reflection for the loaded classes.)
Comment: You could use whatever package you want for your dynamic class. (It should not be named `class`, though.) Implementing a known interface is a good idea, otherwise you either have to use Reflection or other generated classes to access its methods.
Comment: Just a caveat, but you should `.close()` your `URLClassLoader` after you are done with it to prevent memory leaks.
Comment: Minor Fix >> use `URL url = file.toURI().toURL()` instead. `file.toURL` has been depreciated.
Comment: Assume I do not know that the class is called `com.mycompany.MyClass`. Can I still load it?
Answer: Class myclass = ClassLoader.getSystemClassLoader().loadClass("package.MyClass");

or
Class myclass  = Class.forName("package.MyClass");

or loading the class from different folder which is not in the classpath:
File f = new File("C:/dir");
URL[] cp = {f.toURI().toURL()};
URLClassLoader urlcl = new URLClassLoader(cp);
Class myclass  = urlcl.loadClass("package.MyClass");

For further usage of the loaded Class you can use Reflection if the loaded Class is not in your classpath and you can not import and cast it. For example if you want to call a static method with the name "main":
Method m = myclass.getMethod("main", String[].class);
String[] args = new String[0];
m.invoke(null, args);  // invoke the method

Comment: Where does 'MyClass' class come from???
Comment: @Apostolos "MyClass" is the name of the class you want to load. its an example.
Comment: But how can you initialize 'obj' defined as a class that you have not imported yet,  but which you want to import dynamically? This is the question here. Have you tried this code? It issues a **"cannot find symbol"** error pointing at 'MyClass' (whatever name you use for it).
Comment: @Apostolos It would probably require to work with an interface class. i found some example sourcecode here: https://javaranch.com/journal/200607/Plugins.html.

see also this answear: https://stackoverflow.com/questions/6219829/method-to-dynamically-load-java-class-files/10067805?noredirect=1#comment7244588_6219855

some example would be nice how to use reflection to use the methods from the loaded class to fully answear the problem.
Answer: If you add a directory to your class path, you can add classes after the application starts and those classes can be loaded as soon as they have been written to the directory.
Comment: I noticed a problem that when classes are re-compiled into this directory once more, while application continues running, a first copy of a class continues to be in use. Java 15.


Time Complexity Pooling Layers

Question: What is the big oh complexity of Keras' GlobalMaxPooling1D() layer? More generally, how would you find the complexity of pooling layers?
Answer: It's a maximum of an unsorted array.
You can't know the maximum of an (unsorted) array without looking at all the elements of the array, and you can compute the maximum of the array after looking at each element exactly one time.
So the time complexity is linear in the number of activations being pooled.

Time Complexity Pooling Layers


Broad and opinion-based question closed without an answer despite many similar questions getting answers

Question: I asked [a obviously broad, opinion-based, etc., question.  Now, my only concern is, it has been closed before being answered!  There are a lot of questions on SO that are "obviously broad, opinion-based" (like, this, this, this, etc.).  They have been answered before being closed.  Why is it so?  I do not mind the question being closed, but I seek an answer first, the reason being I won't get an answer from the experts anywhere else!
Comment: "I do not mind the question being closed, but I seek an answer first" - the point of closing a question is to *prevent* answers being added (from the point in time where the question is closed), because it's deemed to be not in a fit state to receive answers. Sure, if someone has added an answer before the question is closed, that answer remains - but that's a different matter.
Comment: Again, the point of closing is to *stop* answers being added, because the question shouldn't be there at all. (Duplicates are a slight variation on this; having dupes can be a good thing, whereas I'd hope most other closed questions would be deleted over time, never having been answered.) It sounds like you think it's fine for SO to be a dumping ground for all questions - answer them *then* close them, which means there's no incentive not to ask the bad question in the first place. I disagree strongly: if you want answers, ask appropriate questions.
Comment: "I do not mind the question being closed, but I seek an answer first" - That's a problem. You don't care about the community of this site, knowing that it would waste most people's time if you post it. However, you still expect the community being nice with you and provide useful answers to your innapropriate question. Why can't it work that way? Because of justice.
Comment: "the only reason being I won't get an answer anywhere else!" - if a question isn't appropriate anywhere else, that *doesn't* make it appropriate to have it on Stack Overflow. SO shouldn't be a dumping ground for inappropriate questions.
Comment: On a different note, try following @JonSkeet advices and enjoy StackOverflow for what it's meant to be. Community here is good to be part of, just try it and you might enjoy it. Be nice with people who take their time to help others and they will provide you awesome answers.
Comment: @JonSkeet, I meant answer _from experts._  Sorry for the confusion.
Comment: I don't see how "from experts" makes any difference to my comments. Desiring an answer from experts doesn't automatically make a question on-topic on SO.
Comment: @JonSkeet, I don't think I _ever_ said my question was on-topic.  My only concern is - it was closed _before_ it was answered, unlike what has been done with other questions.
Comment: Yes, sometimes a later-closed question will be answered first, but that's the exception, *not* the rule or the intended sequence of events.
Comment: @JonSkeet, nevermind.  :)  I expected this, TBH.  Was just trying to be lucky and come into that _exception_.  All the best and have a good one.
Answer: A veteran member of Stack Overflow once described getting away with one of these questions as akin to winning the lottery.
Yes, you can find examples of lottery winners. You might even win yourself. But if you spend all your money on playing the lotto and don't win, that's no big surprise, and you really should know better than to try.
Comment: You might point out that Stack Overflow offers 100% refunds to askers who are unsatisfied with the answers they receive.
Comment: Yep, this is the answer that I was looking for.  :)  I lost the lottery this time.
Answer:
Now, my only concern is, it has been closed before being answered!

Off-topic questions are supposed to be closed before answering. It doesn't always happen, but it is the ideal.

There are a lot many questions on SO that are "obviously broad, opinion-based" (like, this, this, this, etc.).

Yeah, back in 2010 and before, rules were rather different, and such questions could be on-topic (although one was closed as a duplicate). 7+ year old questions aren't a good indicators of current rules.

I do not mind the question being closed, but I seek an answer first, the only reason being I won't get an answer anywhere else!

You shouldn't expect off-topic questions to be answered, there's no guarantee even on-topic questions will be answered.
Answer: Two fatal mistakes here:

Stack Overflow is not the best platform to ask broad, subjective, and opinionated questions.  Asking how to sharpen your skillset, while indeed an important discussion, doesn't belong here.
You can try your hand at chat, but your mileage may vary.

You are looking at old and antiquated questions as examples, and these are not indicative of what we allow today.  We don't allow any of those questions today.
Answer:
I do not mind the question being closed, but I seek an answer first

... is similar to saying:

I do not mind you putting out this dangerous fire I carelessly started on your property without your permission, but I want to finish cooking this steak before you put it out.

That is to say: you're mostly missing the point.
Stack Overflow is a big place, there may be fires elsewhere we haven't gotten to yet, and maybe some dry leaves that's been left in the sun for a while will light on fire at some point (i.e. old on topic questions can become off topic as rules change).

There are most definitely other places where experts hang out that have different rules than Stack Overflow.


Always show quoted text in Gmail

Question: Is it possible to disable Gmail's default behaviour of hiding what it thinks is quoted text and always have the whole body of every message visible?
Comment: All the 'solutions' I've seen involve you having to take gmail out of "conversation view". Either permanently in Mail Settings, or for the current thread by altering the subject when you reply so that a 'new' conversation is created and the quoted text is shown. However, neither of these are what I'd call a solution since you lose functionality ie. the conversation!
Answer: As far as I can tell, this feature is not available.
Proving the absence of something can be a challenge, but in this case I'm relying on a sampling of discussions of this subject in the Gmail Product Forums where no solution is proposed, and Google Support is totally quiet.  Not posting all links here, but some include:

http://groups.google.com/a/googleproductforums.com/forum/#!topic/gmail/X8f5WCBppuA
http://groups.google.com/a/googleproductforums.com/forum/#!topic/gmail/1lj3GqJoxxw
http://groups.google.com/a/googleproductforums.com/forum/#!category-topic/gmail/composing-and-sending-messages/kddl4Tz9MCQ
Comment: Hey Benj, could you add some sources to your conclusion of why you think the feature is not available?
Comment: @phwd See revised answer.  Does this help?

Always show quoted text in Gmail


Alto sax and tenor sax

Question: My friend and I have two different saxes, Tenor and alto,  B flat, and E flat.  We would like to harmonize in church to the song, Just as I am. What do we have to do in order for us to play together even though we have two different saxes keyed in two different keys. Must we rewrite the song for one sax in order to harmonize with the other? I'm confused. I have the song written in E flat.
Comment: Welcome to Music Stack Exchange.  The site welcomes questions about theory, performance, and related subjects, which yours clearly is.  Feel free to comment to my answer below if you need additional info.  Other people will probably chime in with other helpful answers as well.  Again, welcome.
Answer: Well, it's probably you and he and the piano, or a guitar - and they're in concert pitch (C).
Let's suppose the piano music for the song is on "white" keys like C.  The tenor is going to play it in the key of D, and the alto is going to play in the key of A.
So you go up a major second, and he goes down a minor third from the piano.
If you're smart you probably just figured out that a major second and a minor third = a perfect fourth.
Sooo.. you guys could forget the piano, and ANY key you play in as a tenor, the alto plays in a perfect fourth down.
So if you play in F, he plays in C
If you play in G, he plays in D
etc. etc.
Comment: if this answer has helped, please click accept for the benefit of searching.  Thanks.
Answer: If the song is written in Eb concert pitch, then the Tenor part will be written in F (one flat) and the Alto part will be written in C (no sharps or flats).  Work out the harmony in whatever key you like (probably Eb since that is what you have the song in), then transpose the parts into the keys I've stated.

Alto sax and tenor sax


Interface builder storyboard compiler error when editing the xml file

Question: I manually add  element in the storyboard file of my iPhone/iPad developement.
In fact, I copy views in storyboard for iPad and I compute the proportional sizes for iPhone (1024x768 to 480x320).
It works correctly but there is an error when adding a  containing several imageviews on it:
<code>*CompileStoryboard iboniaIphoneLGT/LGT_iphone.storyboard
    cd /Users/imac/Desktop/WORKSPACE
    setenv IBSC_MINIMUM_COMPATIBILITY_VERSION 5.1
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    setenv XCODE_DEVELOPER_USR_PATH /Applications/Xcode.app/Contents/Developer/usr/bin/..
/Applications/Xcode.app/Contents/Developer/usr/bin/ibtool
    --errors
    --warnings
    --notices
    --output-format human-readable-text
    --compile
            /Users/imac/Desktop/WORKSPACE/build/Debug-iphonesimulator/LGT.app/LGT_iphone.storyboardc
            /Users/imac/Desktop/WORKSPACE/iboniaIphoneLGT/LGT_iphone.storyboard
    --sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk

Command /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool
failed with exit code 255*
</code>
The message is not explicit, what is the possible cause of this message???
Reex
Comment: I'm struggling with the same problem.  Did you ever find a solution?
Comment: the image source used by the image views I used don't yet exist in the  section of the storyboard xml file!
Comment: Oh, ok.  My problem was a little different, but ultimately solved!
Comment: I had UIGestureRecognizers that were "attached" to a view that I had removed. Fortunately I knew what page I was working on and just looked for "!" by anything.
Answer: I was getting this error and eventually found that when I selected one of the images used in the xib in the project navigator, it did not have the project checked in the File Inspector under "Target Membership".  Once I checked that, I didn't get the error anymore.
So I would suggest checking all the images and other resources used in the xib and make sure they have their target membership correct.
Answer: In my case this was caused by adding one equal-width constraint. It does not make sense. I am pretty wary of Xcode by now.
Answer: For me the solution was just to remove some warnings I had. The warnings I changed was just changing var:s to let:s on properties that was not changed on 4 places


Clustered Index on fact table with many sites

Question: I'm trying to work out what field(s) to use for the clustered index of my fact tables (which all have  a similiar structure). I'll use FactSales as an example
CREATE TABLE dbo.FactSales
(
DateOfSaleKey int NOT NULL, -- PK,
--ProfitCentreKey int NOT NULL, -- (maybe add this?)
RevenueCentreKey int NOT NULL, -- PK
TransactionHeaderNumber int NOT NULL, -- PK
TransactionDetailNumber int NOT NULL, -- PK
TableNumber int NOT NULL,
TransactionOrCheckNumber int NOT NULL,
TerminalKey int NOT NULL,
CashierKey int NOT NULL,
TimeSlotKey int NOT NULL,
TransactionTypeKey int NOT NULL,
TransactionDetailTypeKey int NOT NULL,
MediaKey int NOT NULL,
SaleItemKey int NOT NULL,
SaleTypeKey int NOT NULL,
SalesQuantity int NOT NULL,
SalesGross smallmoney NOT NULL,
SalesNet decimal (16, 8) NOT NULL,
VAT decimal (16, 8) NOT NULL,
...
)

Loading:
The fact tables are loaded by ProfitCentre (ProfitCentreKey), which is a single restaurant,  and by day (DateOfSaleKey). We don't have ProfitCentreKey in the table, because we have the more granular RevenueCentreKey, which is a section within a restaurant.
So, each load looks like this:
DELETE s
FROM FactSales s
INNER JOIN DimOrganisation o ON s.RevenueCentreKey = o.RevenueCentreKey
WHERE s.DateOfSaleKey = 20160105 AND o.ProfitCentreKey = 385

INSERT INTO FactSales (DateOfSaleKey, RevenueCentreKey, ...)
SELECT DateOfSaleKey, RevenueCentreKey, ... FROM #SalesForProfitCentreAndDateOfSale

What I'm considering...
(1) Clustered Index: DateOfSaleKey.
This might make the INSERT easier, but I'm not sure about the DELETE.
(2) Clustered Index: DateOfSaleKey, ProfitCentreKey.
I would have to add ProfitCentreKey to the table. It  might make the DELETE easier, but would it fragment the table as ProfitCentreKey would not load sequentially
And the DELETE would be simplier:
DELETE FROM FactSales WHERE DateOfSaleKey = 20160105 AND ProfitCentreKey = 385

Any advice would really help. Thanks
Answer: Hi If only concern is delete.
you should use Partitioned table.
 Create partitioned function on ProfitCentreKey  .
 Then switch the portion.


Creating a Log Detector: Running Shell Scripts from PHP not working. Processes keep running OR broken pipe

Question: My aim is to create a log file reader using PHP and Shell scripting.
I plan to run the script at intervals in order to detect the last time a particular entry shows up in the logfile.
The way it should work is by calling the PHP script which in turn calls a shell command
tac logfile.log | grep "what i am looking for" | head -n 1

or
tac logfile.log | head -n 1

What this script will do is:
in the case of the first script: scan the log file from the bottom up until it finds what it is looking for and shows me the first line, which is actually the last occurrence of the line in the file.
in the case of the second script: scan only the last line and output it. I am NOT trying to tail the file.
So my intention is to scan the file from the end to the last occurence but I need php to do this because PHP can parse the lines it reads from the shell output and parse them easily.
The issue i am trying to resolve is that once I run the script from PHP using the functions shell_exec, exec, backtick operator, system etc. They all keep the PHP script running or output the result and keeps the first part of the shell running (tac logfile.log).
I dont understand why it works perfectly from CLI but runs indefinitely by trying to tac the whole log file when I run the same script from PHP. Ive noticed that tac and cat give this problem. Sometimes it shows the error "Broken pipe".
What should I be doing? How can I fix this?
Answer: You could use pure PHP. Open the the file with fopen, an example how to read a file backwards can be found at Read a file backwards line by line using fseek
than just break the loop after you found your string you search for.


Canonical isomorphism on a vector bundle and symplectic forms

Question: Let $\pi:E\to X$ be a (smooth) vector bundle, and let $q\in X$. First of all, I have to find a canonical isomorphism $T_{(q,0)}E\cong T_qX\times E_q$. I proceed as follows.
Since $\pi$ is a submersion, we have an exact sequence (to ease the notation I drop the subscript on $d\pi$, it is taken at $(q,0)$)
\begin{equation}
0\longrightarrow\ker(d\pi)\overset{\iota}{\longrightarrow}T_{(q,0)}E\overset{d\pi}{\longrightarrow}T_qX\longrightarrow 0
\end{equation}
which is split since the zero section $s:X\to E,q\mapsto(q,0)$ yields a map $ds_q$ such that $id_{T_qX}=d\pi\circ ds_q$. Hence the map $\tilde\iota:T_{(q,0)}E\longrightarrow,v\mapsto v-ds_q(d\pi(v))$ gives us a map
\begin{equation}
\psi:T_{(q,0)}E\longrightarrow T_qX\times\ker(d\pi),v\mapsto(d\pi(v),v-ds_q(d\pi(v)))
\end{equation}
defines an isomorphism.
However, I am not sure how to construct an isomorphism from $\ker(d\pi)$ to $E_q$. Intuitevely it is clear to me that there is an isomorphism, since the vectors tangent to $\pi^{-1}(q)$ are "vertical" and hence projected down to 0, but I don't know how to construct it.
I need it because next I need to show that under this isomorphism the canonical symplectic form (defined as $\omega^{can}=-d\lambda^{can}$, with $\lambda^{can}_{(q,p)}=p\circ d\pi_{(q,p)}$ for any $(q,p)\in T^\ast X$) agrees with the canonical symplectic form $\omega_{T_qX}$ on $T_qX\times (T^\ast_qX)^\ast$, which is given by $\omega_{T_qX}((a,\phi),(b,\psi))=\psi(a)-\phi(b)$.
This is so far not working for me, and I feel like I'm simply not quite unraveling the definitions correctly and really getting confused at the technicalities. Any help or clarification is much appreciated.
EDIT If you consider the point $(q,0)\in T^\ast X$, why is $\lambda^{can}$ and thus $-d\lambda^{can}$ not trivial at this point? Since you act after everything with the zero map.
Answer: The isomorphism $ker(d\pi)\to E_q$ is easier to construct in the other direction. Given an element $v\in E_q$, consider $t\mapsto t\cdot v$ for $t\in\mathbb R$. This defines a smooth curve $\mathbb R\to E$, which actually has values in the fiber $E_q$. Taking the derivative at $t=0$ of this curve, one thus obtains a tangent vector in $T_{(q,0)}E$, which by construction lies in $\ker(\pi)$. Now you easily see that this defines a linear injection $E_q\to \ker(\pi)$, which must be an isomorphism since both spaces have the same dimension. (This also works outside the zero section.)
Concerning your Edit: It is true that $\lambda^{can}$ vanishes along the zero section, but this says nothing about its exterior derivative. Compare with the standard coordinate expression $\lambda^{can}=\sum p_idq_i$ vs. $d\lambda^{can}=\sum dp_i\wedge dq_i$ in points where all $p_i$ are zero.


what actually is PCDATA and CDATA?

Question: it seems that a loose definition of PCDATA and CDATA is that

PCDATA is character data, but is to be parsed.
CDATA is character data, and is not to be parsed.

but then someone told me that CDATA is actually parsed or PCDATA is actually not parsed...  so it is a bit of a confusion.  Does anyone know the real deal is?
Update: I actually added the PCDATA definition on Wikipedia... so don't take that answer too seriously as that's only my rough understanding of it.
Comment: The confusion may be caused by the fact that CDATA can get parsed, but by a different parser. For instance, the content of a `script` element, which is CDATA in HTML, does get parsed by the Javascript interpreter.
Answer: From WIKI:
PCDATA

Simply speaking, PCDATA stands for Parsed Character Data. That means the characters are to be parsed by the XML, XHTML, or HTML parser. (< will be changed to <,
 will be taken to mean a paragraph tag, etc). Compare that with CDATA, where the characters are not to be parsed by the XML, XHTML, or HTML parser.

CDATA

The term CDATA, meaning character data, is used for distinct, but related purposes in the markup languages SGML and XML. The term indicates that a certain portion of the document is general character data, rather than non-character data or character data with a more specific, limited structure.
Answer: Both PCDATA and CDATA are parsed. They are both character data.
They both must include only valid characters. For example if your document encoding is UTF-8, the content of CDATA sections must still be valid UTF-8 characters. So random binary data will probably prevent the document from being well-formed. Also CDATA sections are still parsed, if only to find the end section tag. But other markup-like characters, like <, > and & are ignored and passed as-is by the parser.
OTOH in PCDATA literal < and & (and ' or " in attribute values) must be escaped, or they will be interpreted as markup. Entities will also be expanded.
So yes, CDATA sections are indeed parsed. I am not sure why you were told that PCDATA is not parsed though.
Answer: PCDATA - Parsed Character Data
CDATA - (Unparsed) Character Data
http://www.w3schools.com/XML/xml_cdata.asp
Answer:
PCDATA is text that will be parsed by a parser. Tags inside the text
will be treated as markup and entities will be expanded.
CDATA is text that will not be parsed by a parser. Tags inside the text will
not be treated as markup and entities will not be expanded.

By default, everything is PCDATA. In the following example, ignoring the root, <bar> will be parsed, and it'll have no content, but one child.
<?xml version="1.0"?>
<foo>
<bar><test>content!</test></bar>
</foo>

When we want to specify that an element will only contain text, and no child elements, we use the keyword PCDATA, because this keyword specifies that the element must contain parsable character data – that is , any text except the characters less-than (<) , greater-than (>) , ampersand (&), quote(') and double quote (").
In the next example, bar is CDATA, and isn't parsed, and has the content "<test>content!</test>".
<?xml version="1.0"?>
<foo>
<bar><![CDATA[<test>content!</test>]]></bar>
</foo>

There are several content models in SGML. The #PCDATA content model says that an element may contain plain text. The "parsed" part of it means that markup (including PIs, comments and SGML directives) in it is parsed instead of displayed as raw text. It also means that entity references are replaced.
Another type of content model allowing plain text contents is CDATA. In XML, the element content model may not implicitly be set to CDATA, but in SGML, it means that markup and entity references are ignored in the contents of the element. In attributes of CDATA type however, entity references are replaced.
In XML #PCDATA is the only plain text content model. You use it if you at all want to allow text contents in the element. The CDATA content model may be used explicitly through the CDATA block markup in #PCDATA, but element contents may not be defined as CDATA per default.
In a DTD, the type of an attribute that contains text must be CDATA. The CDATA keyword in an attribute declaration has a different meaning than the CDATA section in an XML document. In CDATA section all characters are legal (including <,>,&,' and " characters) except the "]]>" end tag.
#PCDATA is not appropriate for the type of an attribute. It is used for the type of "leaf" text.
#PCDATA is prepended by a hash (also known as a "hashtag" or octothorp) simply for historical reasons.
Answer: Your first definition is correct.
PCDATA is parsed which means that entities are expanded and that text is treated as markup. CDATA is not parsed by an XML parser.
Answer: If only  elements were set to CDATA by default in the XHTML DTDs, it would save a lot of ugly manual overrides... Why would script blocks contain other elements? If there are such elements, they are handled by the JS interpreter in DOM manipulation actions -- in which case they should still be completely ignored by the XML parser before document insertion and rendering. I suppose it may have been designed to force the use of external script resource files, which is a ultimately a good thing.

what actually is PCDATA and CDATA?


How do you unlock the Chicago Typewriter in Resident Evil 4?

Question: What needs to be accomplished or how do you unlock the Chicago Typewriter, the tommy gun in Resident Evil 4 for Xbox One? I just finished the main story with Leon and started the "Separate Ways" extra story line with Eda.
Answer: In the GameCube version, it is available for 1,000,000₧ after beating the Assignment Ada minigame. In all other versions, beating Separate Ways will unlock this gun for the main game for the same price, while beating Assignment Ada will unlock it for Separate Ways, where it costs 300,000₧.
Source http://residentevil.wikia.com/wiki/Chicago_Typewriter
Comment: No worries. It may well be the most fun gun in any game as well. enjoy!
Comment: I know right! Do you know how to get the Laser Gun by chance? Called the P somethin somethin
Comment: You have to complete the game on professional mode. which will be easy once you have the Chicago Typewriter
Comment: true true I love this game


How does vampirism work, if it existed in real life?

Question: In specifics, how fast, how painful, and in what order would the human body be infected, specifically from being bitten on the neck. I have found some information, but there are still pieces missing. please take care in answering with facts.(well, not facts, vampires supposedly don't exist.)
Comment: Some books, such as Bram Stoker's Dracula, put the vampiric conversion at weeks to months.  Other stories, movies, and role playing games put the conversion at overnight to a few minutes or even nearly instantly. Without further constraint, it works at the speed of plot.
Comment: Given that vampirism isn't real, and fictional descriptions of it vary enormously, what were you really expecting here?
Comment: Possible duplicate of [Realistic Vampire Virus](https://worldbuilding.stackexchange.com/questions/109093/realistic-vampire-virus)
Comment: as @Ghedipunk stated, speed would be as the plot requires. how painful? what are you looking for, do the internal organs and bones need to be redistributed, or do teeth just elongate? order of infection, depends on your idea for transmission. does a victim need to be bitten o the neck, or on the little toe during a full moon in July? without specific details, this cannot be answered as is.
Comment: Following the edits, I'd say this is now a proper duplicate of the question @SRM-ReinstateMonica linked.
Answer: Depends on the setting. Culturally vampires will find their roots in religious beliefs and so in the oldest stories such as Dracula it's ultimately falls to God vs Satan and that impacts on how Dracula is portrayed and behaves. In more contemporary works vampirism is often described as an actual disease of sorts, like in Elder Scrolls or Blade I where a vampire describes it to Blade as a sort of cancer.
Answer: It depends on what types of vampire you speak of are the vampires alive like in the show Supernatural or or they the classic undead vampires.
Acording to Supernatural even after bit and infected you do not FULLY turn into a vampire until you drink your first blood
Acording to the Skyrim wiki and I quote
"If the disease has not been cured (via a Cure Disease potion or praying at a shrine) within three days, the infection mutates into full vampirism, causing a series of maladaptive and beneficial traits to emerge in the subject. Drinking blood can stay the infection and lessen the deficits of the disease."
In most the show Supernatural it's almost instantly.
According to MOST Popular stuff the subject is infected, gets sick and dies with in a day of infection upon there death they reanimate as a vampire.
In Dungeons and dragons upon being bit you are turned into a vampire spawn, and the vampire who turned you must turn you into a true vampire. Hope that helps.


Former employer asking for SSN and DOB

Question: A former employer is asking my wife for her SSN and DOB in email to report to Workplace. Is that is true?
Can we provide my SSN and DOB directly to Workplace instead of going through the former employer?
Comment: What is workplace?
Comment: Your question makes no sense. 1) What is "workplace?" 2) you say **your** former employer is asking for your **wife's** SSN but you're asking about providing **your** SSN (not your wife's, which you say they're asking for).
Comment: [edit: nevermind.  I was thinking of Work*day*.] Workplace is a payroll/time tracking/general HR app.
Answer: Former employer?
They should have that information already. Why would you give it out again? Why do they "need" it? Until you get a good reason, just ignore their request, it's not your problem.
Comment: Sounds fishy to me. Any former employer that doesn't have your SSN but still has to file reports on you is breaking records retention laws or is (more likely) full of crap.
Comment: And do not ever send that sort of sensitive info in email!
Comment: Just be sure you have that last paystub handy showing all deductions withheld.

Former employer asking for SSN and DOB


How can i connect 4 stepper motors and 3 sensors to an Anduino?

Question: I have an Arduino AT MEGA 2560 circuit. I want to buy 1 Nema-17 bipolar stepper motors, 3 M49SP-2K stepper motors, 3 KY-032 sensors to do my project but i dont know how to connect them to my Arduino.
Is there any Arduino shield for my purpose? Can I use Ramps 1.4 Arduino shield?
Answer: Take a look at the Ramps V1.6, it is what I use. It plugs onto the AT Mega board.
https://reprap.org/wiki/RAMPS_1.6
The 1.6 has a few improvements. I like the solder in power connectors rather than the plug in ones. More reliable.
Because I already had the AT Mega board I decided to try the ramps. There are better boards now, with 32 bit processors. But as a starting point the Ramps combo is the simplest to get going and it does the job.
Other boards may work out a little better, but the firmware is a bigger issue. Still in development.


Swap Face Normals But Leave Texture in Sketchup

Question: At some point, half my model in Sketchup apparently got the normals botched and I didn't notice before painting in all the materials. Now, if I fix the normals (i.e. reverse the face), the texture flips right along with it and I now need to untexture the wrong sides and retexture the right sides. Is there a way to swap the normals/faces but leave my material on the side it was before flipping?
Answer: No. SketchUp does support dual-faced materials, so you could declare the relevant material double-sided.


The Elevator Pitch?

Question: What should the Elevator Pitch be? Should we have an official one? Might be good to have one for community ads and the like.
Comment: A free, community-driven Q&A site for people who use Blender to create 3D graphics, animations, or games.
Comment: Just brainstorming here: "Blender.SE is a Blender community(?) for experts, beginners and hobbyists, who are all ready to answer and ask questions you might(/will? to be a bit more aggressive) have about Blender."
Comment: A searchable community driven database of ranked questions and answers.
Comment: Do note that some of the Blender for games thing applies solely to BGE, rather than to game development using models created in Blender; there's a certain degree at which we stop caring; we don't necessarily care about how to apply animations in Unreal, but we do care about how to get a high-quality .obj export for later use in a program that we don't need to worry about here.
Answer: Blender.SE helps you to understand Blender3d in depth, not only face value. It is an original site with a special texture and color. When posting make the object clear so you don't drive the community off the edge. If you don't make your point the site will eventually be rendered useless and be driven off the SE grid.
Remember there is always another perspective to shed more light on the matter. We hope to see you on the scene and have you blend in to the mesh of enthusiastic users. We hope the site will be animated and useful.
Try us out!
Comment: puns intended...
Comment: haha. I love this. :)

The Elevator Pitch?


Confused by resolution/dpi with Retina screen

Question: I'm very confused by my Retina screen on the latest Macbook Pro. I edit my photos in photoshop, where they look how I want it. I edit them in 150 dpi, mostly in the size 1772 x 1173 pixels. It fit's perfectly in my screen, and they are very sharp. But when I save the photos they change, and get bigger and blurry when I see them in the original size. I'm struggling with building a website now, because when I upload the pictures there they are also so big. So what would be a good resolution to edit my pictures in photoshop so that they are the same everywhere? I'll add two screenshots with the difference.

edit: I did some research, and actually I found out that it hast something to do with photoshop: http://designm.ag/photoshop-2/pixel-design-issue-photoshop-retina/. But still that doesn't solve my problem.

If I resize a picture in photoshop, it looks perfectly sharp when it's 100%. But when I save the photo it will double the size because of the retina screen, and then it's very bad. I just want large photos which look sharp and good when they are the original size, and I can't figure out how to do that.
Answer: Have you tried with 72 DPI?
Usually when I prepare graphics for web I don't use more than 72 DPI and for now its worked ok.
Only if I need to prepare something for printing I go for higher DPI, eg. 300 DPI.


Define a continuous log in a simply connected domain not equal to the whole of $\mathbb C$

Question: So I know that in the complex plane given any straight line $L$, say from the origin to infinity, one can define a continuous log on $\mathbb C\setminus L$. It seems to me that if we have a simply connected domain $U\subset\mathbb C$ such that $0\not\in U$, then we can define a continuous log on $U$. Because by simply-connect-ness we can find a curve staring from 0 that goes to infinity, which is not in $U$, so we have a "slit" like before, hence we should be able to define a continuous log. However I find it very hard to write down a rigorous proof. So I want to know, is this true? If it is, how can I write down a proof? Thanks!
Comment: Minor note: There need not be a _curve_ connecting $0$ and $\infty$ in $(\mathbb{C}\cup \{\infty\})\setminus U$. That set is connected, but not necessarily path-connected. Consider the topologist's sine curve for a simple example.
Comment: Thanks! So it turns out my lecturer used path-connect-ness as opposed to connectness in the defintion of a domain! Didn't know this difference in definition until I decided to look it up on the internet when I saw your comment.
Comment: An open subset of the plane is connected if and only if it is path-connected. So it doesn't matter whether we define a domain as a connected or a path-connected open set, both definitions are equivalent. It's the complement, $F = (\mathbb{C}\cup \{\infty\}) \setminus U$ which can be connected but not path-connected. Unless $U = \varnothing$, $F$ is not an open subset of the sphere, and it's only for open subsets that connectedness and path-connectedness are equivalent. The _complement_ (in the sphere) of a simply connected domain is connected, but not necessarily path-connected.
Comment: I see, thank you very much!
Answer: Let $U$ be a simply connected open domain that does not contain $0$. Then the map
$$z\mapsto \frac1z$$
is holomorphic on $U$ and for any two differentiable paths $\gamma_1,\gamma_2$ in $U$ whose end-points agree you have:
$$\int_{\gamma_1}\frac1z\, dz=\int_{\gamma_2}\frac1z\,dz$$
This follows from $U$ being simply connected, ie every loop in $U$ is contractible. Pick a starting point $p$ and for any point $w\in U$ let $\gamma(w)$ be a differentiable path from $p$ to $w$, it follows that:
$$\mathrm{Ln}(w):=\int_{\gamma(w)}\frac1z\,dz$$
is well defined. It is also a holomorphic function, where the existence of derivative can be shown by taking $\gamma(w+h)$ to be $\gamma(w)$ followed by a straight line from $w$ to $h$ and using the usual argument to find that the limit $\lim_{h\to0}\frac{\mathrm{Ln}(w+h)-\mathrm{Ln}(w)}h=\frac1w$.
That relation shows that this function does act as a logarithm in the sense that:
$$\frac{d}{dw}(\mathrm{Ln}(e^{w})-w)=\frac{e^w}{e^w}-1=0$$
and $\mathrm{Ln}(e^w)$ differes from $w$ only by a constant. (This assumes that $e^w$ lies in $U$.) One also has:
$$\frac d{dw}\frac{e^{\mathrm{Ln}(w)}}w=\frac{e^{\mathrm{Ln}(w)}}{w^2}-\frac{e^{\mathrm{Ln}(w)}}{w^2}=0$$
So $e^{\mathrm{Ln}(w)}$ must be a constant times $w$ (this requires $w$ to lie in $U$). You can combine this conclusion with the one before to find a relation between the additive and the multiplicative constant for such $w$ so that $e^w$ lies un $U$:
$$Me^w\overset!=\exp({\mathrm{Ln}(e^w)})\overset!=e^{w+A}$$
If you have chosen the additive constant to be $0$ or a factor of $2\pi i$ then the multpilicative constant must be a $1$.
Comment: With the Ln you defined (with constant adjusted), how can one show that $e^{\text{Ln}(w)}=w$ for all $w\in U$?
Comment: Sure, I have added that part too, there is a caveat in the first part though, for it to make sense you need $w$ and $e^w$ to both lie in $U$. Then in some open set around $w$ you find that $\mathrm{Ln}(e^w)$ differs from $w$ by a constant.
Comment: Oops, I made some misjudgements. To see the relation you _don't_ need both $w$ and $e^w$ to lie in $U$, my bad. I have corrected the answer.
Comment: Thank you very much! btw it seems like the argument would be easier if at the start we define $\text{Ln}(w):=q+\int_{\gamma(w)}1/z\;dz$ where $q$ is a fix complex number such that $e^q=p$. That way we don't have to attempt to fix the constant of Ln in every path-component of $V=\{z\in\mathbb C: e^z\in U\}$.
Comment: $V$ is connected (if $V=V_1\cup V_2$ is the disjoint union of two open sets it follows $U=\exp(V_1)\cup\exp(V_2)$ is the disjoint union of two open sets since holomorphic maps are open maps).
Comment: But exp is not injective though, so $\exp(V_1)$ and $\exp(V_2)$ need not be disjoint. For example consider when $U=\{x+iy\in\mathbb C: 0<x,y<1\}$ is the open square, then $U$ is a simply connected domain. However the pre image $\exp^{-1}(U)=V$ is not connected.
Comment: Ah, duhh...$\, $ $\,$


How realistic would for Canada to become richer and wealthier than the United States because of climate change and global warming?

Question: I believe that global warming could make Canada one of the most fertile land areas for agriculture and one of the countries with the most stable climates. So would be realistic that climate change make Canada richer than the United Sates in GDP and standarts of living?
Comment: *"Global warming could make Canada one of the most fertile land areas for agriculture":* you mean, global warming and a few billion tonnes of soil. You forget that Canada was thoroughly glaciated in the not too distant past, and the glaciers scoured the soil clean down to the bedrock. (And anyway, farming accounts for only about 1% of the gross domestic product of the USA, and employs about 2.5% of the workforce. Even if the entire farming sector moved to, I don't know, Brazil, the economy of the USA would be almost unaffected.) (And if you think about it, Siberia would be great competitor!)
Comment: Aren't there loads of Big Ice Blocks in Canada? I can only imagine the Ice Blocks melting will be worse for Canada than America since the ice blocks are in Canada and not America. That is something for you to look up.
Comment: Population size disparity makes this unlikely. All things being equal, the more people you have, the wealthier you'll be.
Answer: Not Really
You specified "GDP", not per capita GDP. So I'll answer GDP.
Canada has 12% of the population of the USA.

Canada: 38 million
USA: 329 million

For Canada GDP to exceed the USA GDP, per capita income of Canadians must be 8.3 times greater than the per capita income of Americans.

Per Capita GDP of Canadians is currently 70% of Americans. That would need to change to 830%
Canada \$46,500 per person (needs to be \$497,000 to match total USA GDP since the USA has a much larger population)
USA \$59,900 per person

Data point: Agriculture in the USA is only about 5% of GDP (source). In other words, shifting ALL agricultural economic activity from the USA to Canada will shift the needle by about 10%. That's about two orders of magnitude too small to achieve the change you are looking for.
Alternately, if you really meant per capita GDP, you can see that such a shift will merely bring the USA and Canada a bit closer to parity.
Comment: Your 10% difference is extrapolating the present situation for only 1 sector, agriculture. You consider a US economy that won't be affected by the climate disaster in any other way. But 1) food will become scarce and much more profitable for production and 2) many economic activity in the south will be lost, because of land loss (flooding), drought and heat waves, forest fires, storms... and... 3) environmental regulations and energy transition: agriculture will be less vulnerable for heavy CO2 restrictions and expensive energy.
Comment: While I think the question is a bit unripe, our opinions about the question seem irrelevant. The OP asked what they asked, and the question they asked was easily answerable with real numbers. Perhaps the OP had a very good reason for asking exactly what they asked in the way that they asked it. "*Your American agriculture could perish*" is included in that 5%, and a source for that number is included. You are welcome to offer better numbers (with source) that meaningfully change the answer of "Not Really".
Comment: @Goodies, the question seemed to focus on only one sector, so that's what the answer focuses on.  1) Huge amounts of North American farmland are used for animal feed and biofuel/ethanol production, both fairly easy to reseed for human food production. 2) Direct effects accounted for in that 10% (-5% USA, +5% Canada), indirect effects are guesswork, rather addressed in "*two orders of magnitude too small*". 3) Poorly-regulated agriculture generates *enormous* amounts of methane. Fundamentally, it's a poorly-asked question (due to GDP vs Per Capita GDP) with an obvious answer.
Comment: To leave out population is a silly premise anyway. Why copy it? And I think you underestimate the issue. The reason Canada will be afflicted less: being up north. Your American agriculture could perish.. Temperature and fire issues. And you're right about (3) that problem is underestimated but it will be overcome by regulations. Methods of agricultural production will have to change, less methane (and nitrogen) will have to be emitted. A manufacturer producing plastic toys, metal alloys, weaponry or cars has issues of a different order. Many American companies are involved in these activities.
Answer: Yes, as long as we choose the right definition of richer, wealthier and standards of living.  Also "realistic" by the standards of world building gives us quite a bit of latitude.
Meaning of richer, wealthier and standards of living
You mention GDP, and that is a measure of the whole country such that a country with a higher population of the same people will have a higher GDP.  More meaningful would per capita GDP, but this is still flawed.  Wealth/income is a highly skewed distribution, in that many people have relatively little money and a few people have loads.  Per capita GDP is effectively a mean, and means are very bad ways at describing the position of a skewed distribution.  More useful would be a measure such as median purchasing power parity, as in how much stuff can half the population afford.  Canada is a much more equal country than the United States (income gini from CIA, Canada = 0.321, USA = 0.470), and is already close to the USA in median income (Canada = \$18,652, USA = $19,306).  Considering the politics of the two countries it is realistic to imagine that this will change in Canada's favour over time.
Importance of agriculture to the economy
We do not really know the effect of global warming on the economy, but it is quite possible that food production will be hit by changing weather patterns and environmental degradation.  Food is the classic example of a good that has inelastic demand, such that if we all get poorer, and can afford less stuff, we will stop buying new phones and streaming services while maintaining our calorie intake.  Agriculture makes up 1.6% of Canada's economy, and only 0.9% of America's.  If this becomes more important, and other enterprises become less so or even abandoned completely then this alone will push Canada's wealth higher relative to the US.
Change in land productivity over time
You mention in your question that as the world warms, more of Canada's land may become agriculturally productive.  This is true, and may be increased by advances in technology.  Much of Canada's tundra and taiga is quite low productivity, having little soil. We may find solutions to this, such as soil manufacture or large scale hydroponic infrastructure.  Canada also have very long days during the growing season, which could turn out to be an important feature in determining near future agricultural productivity.
Renewable energy
We hope we will be able to meet the world's energy needs with renewable energy sources, so we do not need to rely on finite reserves of fossil fuels and uranium.  We do not know exactly what the mix of renewable resources we will end up using, but Canada is very well positioned to exploit multiple sources.  The large areas of sparsely populated land could host many wind turbines, and the enormous coastline is suitable for wave and particularly tidal power.  If this becomes a more important input into the worlds economy this could increase Canada's wealth relative to the United States.
All these factors are pushing in the same direction, to help Canada's wealth relative to the US.  Together they make it eminanty possible that the median Canadian is significantly better off than the median American in the future.
Answer: I believe climate change due to global warming will benefit Canada financially in the long term. Not due to agricultural reasons but due to melting of the ARCTIC ice. This melting of ice would affect both shipping routes and easier access to oil/gas reserves. As well as the development of renewable energy farms taking advantage of warmer temperature engineering requirements.
Shipping routes:

The Northeast Passage (above Russia),
The Northwest Passage (above Canada),
The Arctic Bridge (from Canada to North Europe via the bottom of Greenland)
And even possibly the Transpolar Route (straight through the pole, Bering Straits to Atlantic Ocean)

Quicker, safer shipping through the Arctic rather than relying on Panama Channel, Suez Channel, Cape Horn (South America) and Cape of Good Hope(South Africa).
Canada could potentially develop numerous ports, other facilities, and associated Import Tarrifs to take advantage of the increased shipping traffic.
Oil/gas exploration:
Self explanatory...until it runs out.
Renewable wind energy:
The newly exposed land previous covered by ice, if not now covered in frigid shallow water, will not necessarily be suited for agricultural purposes (see other answers). However, this land could be utilised to develop extensive wind farms and even solar farms. You also have reduced danger pay to those building and maintaining the various farms.
The Arctic will remain windy! Wind farms would be able to provide wind energy throughout the year. A major impact of warmer temperatures would reduce the engineering and maintenance costs of the turbines as the extreme cold temperatures and effect of ice/snow on the blades and hub heights don't have to be taken into engineering account.
Solar farms would be limited to providing energy during the lighter summer months (but for more hours in those summer days). Potentially all summer energy demands could be obtained from renewables. potentially
Larger amounts of renewable energy used during the summer months could offset Canada's spending/reliance on oil/gas energy. This would allow Canada to negotiate NEW trade treatys that don't rely on oil/gas as a bargaining chip. Allowing them to make better financial deals than their southern neighbours in the USA could make.
Answer: No.
At least like in current days approach and economies. We can see that industry and what makes the industry possible aka technologies, research and development is what brings money, if we strike out banking aka making money out of money.
You can look at already existing countries which do export food - grains and meat - those aren't the countries we look at when high standards of living are mentioned. I mean those whos' export is predomiantly those goods.
Technology wise isn't that hard to make some food production in Sahara, what is hard it to make it cheap. I mean, we do have technologies and they are used to grow agrocultures, which is base for food production, in environment which isn't natural or best for those agrocultures. We do it today on considerably large scale, even if it is just percents(or less) of grown stuff total.
Technology on the other hand and capacities derieved from it - it requires many people working, making, thinking, making some abstractor fundamental researsh work etc. Technology is cooperative effort of many people, and to enjoy the level we are used to it requires 100's of million people working together.
It is a reason why a small country can't fly on its own, it can do it only as part of bigger technological circle having their own specialties they are good at if they are allowed to be part of that technologies exchange, products of those technologies exchange.
When one has to pay 5000-10000kg of grains for superflat super slim iPhone 69 -not that many can have good life. Agrarian country can't choose the conditions of a deal, Argentina history can be an example how those land evolve or can evolve. In technology rich system it matters when one is smart - it required to operate technologies, make them and develop them. In agrarian setting it matters much less.
So if they do not become 59th state, the fact some need them to be a food producers and does not need them in any other way it may make their situation worse, and such development may happen willingly in matter of a decade. As part of a bigger system they can do well, not all of them but those who are in that food producing business, for fundamental reason of that technological development has no limits there is always has something to do, there is more stuff to do than there are resources for that, so resource shortages in different ways and forms is the norm(it can take different forms, including attractive ones(like examples of ppl making good money), and it changes over time as well, as result of many factors) Food production is more stable thing, small prooducers have their problems for a reason, but big ones do well enough, and their future is brigth/predictable enough, until people stop eating.
All in all take look at existing countries, what you imagine already exists, so did it exist in the past, but days when a country could be rich just by cows and grains long past.


How can I have a username shorter than 4 characters?

Question: I am trying to register a member with a two character username. Is this a possibility? I'd imagine I would need to hack the core, but is this a good idea? Where would I even get started with it?
Answer: Indeed, not long ago this would require a core hack.
Not sure exactly when this was fixed, but anyway these days you can add the following to your config.php file:
<code>$config['un_min_len'] = 2; // allow a username w/only two characters
</code>
Answer: You can override minimum username length with a config variable. You can also change the minimum password length too, but I suggest not:
<code>$config['un_min_len'] = '2';
$config['pw_min_len'] = '5';
</code>


Defer insert data into a database

Question: I need to insert some records into a database at a time when it normally it's not being used, what are some approaches I can take? I have considered using the SQL Server Agent to run some stored procedures, or I could schedule a program to do the insertions too, ideally if the process takes more than 1 hour It should be able to stop and continue where it left off next time. Any suggestions on how can I do this cleanly, the technology to be used is .Net Core with Dapper, and the DB Server is MSSQLS 2016.
Comment: Welcome to "Software Engineering". This is a site for conceptual programming questions, so the best answer you can get here is "yes, the concept of using a scheduler is ok for your task". When it comes to specific technologies, better ask elsewhere, for example, your favorite searach engine would be a good start. You can try on Stackoverflow instead, but make sure you read their [help center](https://stackoverflow.com/help) first. In the current form, I would expect your question to be closed there as well as it going to be closed and deleted here.
Comment: @DocBrown I'm no asking for implementation details, I just wanted way to do this, I mentioned the technologies because that's what I'm using but if there is a different. I was looking for an answer similar to Ewan's actually. I mentioned the technologies so that the contraints could be known.
Comment: If you want suggestions for a better concept, I recommend you better don't ask "which approach can I take? Currently, my approach is ". Better edit your question and make clear the technologies work only as examples, and the focus is elsewhere.
Answer: I would strongly advise you to avoid using scheduling tasks for low useage periods as a solution to long running jobs.
The problem with the approach is that these periods are not guarenteed to exist. Either you simply run out of hours in the day to schedule the tasks or your useage patterns change shrinking or ellimintaing the low periods.
Instead, implement a throttle so that the task can run at any time, but the speed of the task can be reduced so that it doesnt hog all the resources.
With a bit of clever programming you can monitor the speed of your database/api responses and dynamically throttle the application back as they slow down.

Defer insert data into a database


Can I filter jobs on Careers by continent?

Question: I am looking for a way to filter for jobs that are based in Europe. When I try putting "Europe" in the "Where" field, I still get US- or Australia-based jobs. Is there a way to make a filter like this? I don't care about the country; I want to find any job across the entire European continent.
Comment: I'd like to do just the country personally. I don't intend to move to the US, but I live close to the boarder so I get results from both NYC and Toronto all the time.
Comment: This might be seen as being too broad, [as per this q asking to be able to specify 'willing to relocate anywhere'](http://meta.stackexchange.com/questions/84042/for-careers-relocation-how-to-specify-anywhere)
Answer: It's a limitation of our geocoding system that large areas (continents, hemispheres) don't work well. It's shortcoming on our part. We'll work on it.


What is the difference between Columnar and Grid Transposition?

Question: Can someone explain with examples. Furthermore, is a key required to crack the ciphers?
Answer: Both the columnar and and the grid transposition ciphers are certain types of transposition ciphers. Both ciphers normally require a key for enciphering / deciphering. However, you can say that these ciphers, in their simple form can be easily cracked by brute-force.
Columnar Transposition
In a columnar transposition cipher you write the message out in rows of a fixed length. Then you read out column by column, where the columns are chosen in a scrambled order. Normally the key defines the width of the rows and moreover the "scramble" part in column permutation. Take the ciphertext "Thisisaciphertextthatneedstobecracked" and the key "ZEBRAS" for example. "ZEBRAS" defines the permutation in regard to the alphabetical order of the letters, which is "6 3 2 4 1 5" here.
<code>1 2 3 4 5 6                              6 3 2 4 1 5
T h i s i s                              T h i s i s
a c i p h e                              a c i p h e
r t e x t t  --> using key "ZEBRAS" -->  r t e x t t
h a t n e e                              h a t n e e
d s t o b e                              d s t o b e
c r a c k e                              c r a c k e
d X X X X X                              d X X X X X
</code>
You get your ciphertext by reading your columns with your new indices, i.e. "ihtebkx iiettax hctasrx spxnocx seteeex Tarhdcd".
Grid Transposition
The grid transposition cipher is similar to the columnar transposition cipher. The difference here is that you introduce row indices in addition to column indices. You first create a grid that can fit all of the letters of your ciphertext and again, fill the extra spaces with X. Take the ciphertext "hiwhatsup" and the key "BAZYFG" for example. Again the key defines the columnar permutation, but also the row permutation. "BAZ" is for the columns and would map to "2 1 3" and "YFG" is for the rows and would map to "3 1 2".
<code>  1 2 3                                   2 1 3
1 b e s                                 3 e d s
2 t c o     --> using key "BAZYFG" -->  1 e b s
3 d e s                                 2 c t o
</code>


Temperature of pure oxygen combustion

Question: What is the temperature of pure oxygen being combusted? I was wondering about it.
Comment: If you're curious what the "hottest" fuel is, it's dicyanoacetylene (C4N2).  The center of the flame at room temperature is roughly 9010 degrees Fahrenheit.
Comment: Oxygen is not a fuel; it is an oxidant, as others have noted. However, ozone is a fuel, and ozone flames exist.
Comment: There are flames burning in Chlorine, Fluorine etc. Big amounts of the chlorine from salt electrolysis is burned with hydrogen when demand for lye is bigger than for chlorine. Diborane and F2 is said to be one of the most energetic flames.
Answer: Other answers have emphasized the fact that oxygen is not a fuel, but an oxidizing agent. I'll try to underline another point: there is no uniquely defined "combustion temperature" for a chemical compound. This is unlike phase transitions like melting and ebullition, which happen at fixed temperature for a given pressure.
The temperature of a combustion process depends on many parameters, including the heat of combustion, the ratio of air to fuel, the heat capacity of both and the initial temperature. The adiabatic flame temperature is one of such combustion temperatures under certain conditions. The autoignition temperature and flash point, on the other hand, are characteristics of a given chemical compound; they are not, however, combustion temperatures.
Comment: I was going to mention this, but I wasn't too sure of it--lots of flames are said to burn at "xyz degrees", so I neglected to. Any idea what those temperatures are?
Answer: Oxygen is not a fuel by itself, it's only the oxidant. Combustion involves a fuel (acetylene, for example) and an oxidizer (here, O2). So if you have no fuel, but all oxidizer, then what's left to burn?
Combustion is just a name we give to certain reactions. The point to get here is that the burning and its associated temperature is dependent on the reactants' chemical nature and stoichiometry. When a flame has a higher temperature than another, it means that both reactions give products that have different enthalpies of formation.
The greater the difference between the enthalpy of the products and reactants, the greater the flame temperature.
Answer: Pure oxygen does not burn. Oxygen is a supporter of combustion, not a combustible material(fuel) itself.
Combustion reactions are as follows:
$$\text{combustible stuff} \ce{+ O2 -> } \text{various oxides} + \text{heat}$$
Note that nitrous oxide ($\ce{N2O}$) is also a supporter of combustion, which means that you can use it to carry out a combustion reaction without oxygen--but this is only because $\ce{N2O}$ generates oxygen itself.
Since combustion is a reaction with oxygen, what's left for oxygen to oxidise? Itself? Not likely. You need a fuel to release heat for a combustion reaction.

Temperature of pure oxygen combustion


Coding an accounting database from scratch?

Question: My new medical practice is picking up fast and my homemade Libreoffice Calc spreadsheet is quickly becoming cumbersome to track patient visits, accounts receivable, overhead reconciliation, etc.  Most practices use some sort of practice management software to handle accounting as well as scheduling, paying bills, submitting insurance claims, etc. but my budget can't afford to pay for overpriced software.  Besides, I like to do things my own way, as well as support open source software.  (I've already determined that I don't need this function to come from my electronic charts)
Google searching didn't yield any templates and all of the accounting programs found were built for traditional businesses with purchasing, warehousing, human resource management, etc. that aren't adaptable for my needs and are unusable.  You wouldn't think that I would be the first physician to attempt something like this, but the only thing that I could find is a design plan here: http://www.databaseanswers.org/data_models/
So now, I'm considering importing my spreadsheet into Libreoffice Base and slowly developing a custom accounting program for myself.  However, I have no experience with databases and I don't want to spend a large amount of time on this if the amount or complexity of coding is beyond what I am willing to sacrifice from my study time.  After browsing through textbooks at the local B&N, the first 1/3 of most books on MySQL, Filemaker Pro, and Access seem applicable for what is needed (complex mathematical modeling and data analysis is overkill), but I'm still hesitant about heading into this endeavor if the work load is larger than I care to handle.
So, is it doable for someone with remote programming experience (qbasic, visual basic) and basic spreadsheet knowledge to code a simple custom accounting database?  If so, is LibreOffice Base sufficient? What program or textbook would you recommend?
Thank you!
Comment: Don't even try to write your own accounting software. There's a lot more to it than balancing a checkbook, even if you *don't* handle payroll.  Some wheels are worth reinventing. This one isn't. Buy COTS accounting software, and spend your time healing people.
Comment: To add onto what @Catcall is saying, pick an off the shelf accounting software specifically for the type of practice you are running, down to having it hosted online so that all you pay is a monthly/annual subscription fee and spend your time healing people and growing your practice
Comment: You're right that I'd rather spend time helping people than staring at a spreadsheet.  The price of off-the-shelf software is an impediment: general accounting apps aren't structured right, and the price of medical accounting or practice management apps is laughably ridiculous.  A cloud service is not preferable--I need it to be local.  This is a low-budget endeavor.  Also, I don't intend to re-invent accounting, just have a way to track visits, checks, reconciliation, multiple payers per patient, and basic statistics that I'm already doing in Calc.  Building a front-end would make it easier.
Comment: Don't bother with databaseanswers.org.  The models there are trivial.  It may be vaguely intersting to look at these models to see what sort of things might be of interest to a certain problem domain, but the models themselves are so simplistic that they would never come close to being practical for their stated purpose.
Answer: I have used almost all accounting software, currently use and modify Sql-Ledger - and so turning my database client's workflow system into a full, double-entry accounting system was so easy it was almost a relief; client had been using my system to bill their own (news-copy) clients because their internal itemisation of services spoke their own language whereas no accounting package would. Their accounts section then had to go and reproduce it all again externally for book keeping.
Finally the client's accountant and I sat down and exchanged notes. I modified the application within a week. It has never broken, produced a bug, or failed. It does all their accounts and no none else's. It tracks assets, cash flow, everything except payroll - which they didn't need.
Every business of any size knows, you just can't get anything off the shelf that works.
My advice is don't listen to the doom-and-gloom advice of anybody who doesn't understand both database schema and accounting. This combination seems to be just unusual enough to have software vendors rubbing their hands with glee, issuing warnings of dire consequences to would-be developers, spending most of their time organising vendor-lockin components to their software, or arrangements with large accounting franchises. And, like successful snake-oil vendors, they laugh all the way to the bank.
Answer: You are going to need to do some heavy reading.
Solid data modeling books by old warhorses that actually talk about accounting:
Martin Fowler, Analysis Patterns
http://www.amazon.com/Analysis-Patterns-Reusable-Object-Models/dp/0201895420
Hay, Enterprise Model Patterns
http://www.amazon.com/Enterprise-Model-Patterns-Describing-Version/dp/1935504053
But it'd probably be easier to use an open source ERP like OpenERP
Answer: I would recommend going one of two directions.
The first, if you want to get into building accounting software, but are really in the business of making money as a doctor, is to get involved in an open source project, like LedgerSMB.  The advantage is that if you really want to do this as a way to help support your business, you can learn as much as you want to (or as little as you want to also) and there are experts you can learn from in a hands-on way.  Also keep in mind that Ohloh puts LedgerSMB as approx 40k lines of SQL code (excluding blanks and comments), plus 49k lines of Perl, plus a similar number of lines in a bunch of other languages combined.  Accounting software is not trivial.  The second advantage here is that it gives you live participation with a community of people who are doing this and so you get a chance to make the software do exactly what you want.  You can then spend your copious free time integrating an EMR with it (or hire someone to do so) ;-).
The second option you have is to buy a commercial software and just integrate what you are doing there business-process-wise.  The advantage here is you can buy some practice management software that will handle appointment tracking, billing, and the like or you can spend less and go with something like Quickbooks.  This gives you some choice but also a lot of tradeoffs and very little flexibility once tradeoffs are committed to.
TL; DR:  If you want to get into the field, join with people who are doing it.  If you just want software, you can buy it.
Answer: Accounting is very complex and is mission critical for any business.  The most central piece of an accounting system is the general ledger.  Building your own G/L is pretty hard to justify.  You should buy a well-supported desktop G/L, like QuickBooks.  There are some good, cost-effective choices available.
The other functions in your business, even ones that are related to accounting (outside of G/L) can be specialized.  Focus on custom-building these areas, if you find that a general purpose package really doesn't handle your needs.
I have built customized subledgers for areas like cost accounting and profitability reporting for businesses with highly specialized needs, but they still used off-the-shelf G/L software.  You won't necessarily end up with a perfectly suited, fully integrated custom system, but you don't have time to build such a system and still operate your practice.
Answer:
So, is it doable for someone with remote programming experience (qbasic, visual basic) and basic spreadsheet knowledge to code a simple custom accounting database? If so, is LibreOffice Base sufficient? What program or textbook would you recommend?

I have a different opinion. As long you are willing to put in the time and effort, you can build a simple accounting application. I'm not talking about developing a high-end application that has all the necessary features like you can find in an ERP software. Yes, visual basic is one programming language which I have personally adopted as the front-end GUI in building a simple accounting system. I'm not sure if LibreOffice base is good enough, but what you need is to have some good grasp on database designing, in order to build a robust and scalable database system. Next, you need to understand the concept of double-entry system, which is your system check and balance. I do not have a specific program to recommend, but you may download a free ebook from accountingdes.com that will provide you the necessary understanding of the basic accounting database designing concept and the double-entry rules which makes all your reports and entries makes sense.


Django: Generic views based 'as_view()' method

Question: I was working on an application wherein I created a generic ListView. Now, while defining that view in my urls.py, I read from the documentation that I need to use the as_view() method as follows:
from django.conf.urls import patterns, include, url
from .views import BlogIndex

urlpatterns = patterns(
    '',
    url(r'^$', BlogIndex.as_view(), name="index"),
)

Now, I didn't really understood what the documentation had to say about this method. Can someone shed some light into this concept?
Comment: Your question is not clear. `as_view()` is what you have to call to link a class-based view into your URL. What are you asking about?
Comment: @DanielRoseman I guess you just answered my question. Thanks.
Answer: In class-based views, you have to call as_view() function so as to return a callable view that takes a request and returns a response. It's the main entry-point in request-response cycle in case of generic views.
as_view is the function(class method) which will connect my MyView class with it's url.
From django docs:

classmethod as_view(**initkwargs)
Returns a callable view that takes a request and returns a response:

You just can't use class-based views like you could in normal function-based views.
BlogIndex(request) # can't do this in case of CBVs

The above code is not valid if you want the CBVs to function properly. For that, you need to provide a view which is callable and then pass request to it. For example:
response = MyView.as_view()(request)  # valid way

By calling the as_view() function on my view class MyView will give me a view which I will call with request parameter to initiate the request-response cycle.
In your case:
my_callable_view = BlogIndex.as_view() # returns a callable view
<function blog.views.BlogIndex>

Now, call this function and pass the request.
 response = my_callable_view(request) # generate proper response

Answer: view function have different format than before because :

This view will actually be implemented as a class
We will be inheriting from an existing generic view function that already does most of what we want this view function to do, rather
  than writing our own from scratch.
Class method  as_view()- this does all the work of creating an instance of the class, and making sure that the right handler methods
  are called for incoming HTTP requests.

ref : https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Generic_views
Answer: Maybe I can try to write the as_view with pseudo-code:
class ViewClass():
      #other stuff
      def as_view(self):
           return self.render(*args)

It return the render function inside the CBV.
So it actually is the same as path('some_path',views.some_view_function,name='some_name')
Of course, there there is actually much more things going on than only render function, for example to verify and save the content inside post queryDict, actually you need def post(): to handle the post, in function you just if request.method == 'POST' they are actually mutual.
To be specific, as_view() just generate a overall function, including  if request.method =='POST': #some code Maybe the actual code doesn't work like that, but you could understand it this way if you are not prepared to contribute to django source code yourself.


Workaround for connecting two 2017 iMacs and using one as a second display

Question: I am using my iMac 2017 5k as my main machine and want to use my 21 inch 2017 iMac as a second screen. I have learnt from the previous question that I asked that the target display mode is not going to work. What are some workarounds to use the real estate on the second 21 inch 2017 iMac while on the main machine?
Answer: There's a product called AirDisplay from Avatron Software that allows you to extend your display to another Mac.

Extend your main Mac screen to a nearby iOS or Android device or to
  another Mac or PC. Increase your productivity with an extra screen or
  mirror your main display to up to 4 screens.


How to post anonymous questions to SO?

Question: Can I just fill Name, Email, Home Page at the end of /questions/ask page?
Comment: @Bobby: to ask 1) a potentially embarrassing questions without having to sign it to your name 2) to ask a controversial question 3) to better anonymize a problem if your company has a policy against asking on public websites for help, and I'm sure there are a lot more cases where doing this is necessary.
Comment: Why would you want to do that?
Comment: @Kop: 1. Questions are seldom embarrassing on SO. The only embarrassing part is if you proof to be learn-resistant in the course of answering/support. 2. "Controversial questions", ahm, that already sounds off-topic and like it doesn't belong on SO. Anyway, if you have a controversial on-topic question, feel free to ask it. 3. Ahhhhh...good point...I'll grant you that. ;)
Comment: Although not really a duplicate, it is the updated policy on this, so indeed voting to close. @gnat
Answer: This isn't possible any more.
"You must be logged in to ask a question on Stack Overflow"
You'll need to create an account. The larger sites on Stack Exchange do not allow guests to post questions. There's more background on this decision and a list of the sites in this answer:
Why are guests not allowed to post question but allowed to post answers?
Comment: The reason for this is people losing the cookie tying them to their questions, and all rights to do anything (e.g. edit) to them. So they end up 'answering' to comment, suggesting edits to their own stuff, sometimes voting on their own stuff and in some cases end up with _hundreds_ of unregistered accounts. The work this put primarily on moderators was just too much.
Comment: I would clarify this is only the case on Stack Overflow, currently. (As far as I am aware, at least. A couple other of the larger sites might not as well.) Other sites do still allow anonymous questions.
Comment: Thanks for the link, @404. I added it to my answer.
Answer: Yes, that is how you would do it (after logging out, of course).
Comment: Remember to save the link to the question so you can find it again.
Answer: You can click on your name on the top of the site to get to your profile. There, click edit and change the name to whatever you want. You can only do this once every 30 days!. The name you set here will automatically be displayed on all your questions and answers, including those posted before.
If you want to post questions/answers under a different name for whatever reason, you have to create another account.
Comment: I don't see how this answers the question as stated. It should possibly be a comment, or removed altogether.
Comment: @tac This answer is over five years old, a lot has changed since, and back then I considered this this the only way to be "anonymous": Using a fake name in the user profile.
Comment: @DavidLively over a year later, i still don't think an answer deserves upvotes because it was correct when it was posted but is now out of date. (although this does seem a futile thing to argue over especially since i can't change my vote)
Comment: @cat sure, but it didn't deserve a downvote at the time, so I upvoted. A few months ago, I got a downvote on gamedev.se on a five year old, accepted, *correct* answer with +12 votes. It's annoying, and discourages participation which, in turn, damages the community. So, +1 from me.

How to post anonymous questions to SO?


Android app sound unknown

Question: From which App is this notification sound in Android, after playing an audio message?
Sound unknown app
Answer: It looks to be from your or someone's mail service as a notification. I'm not positive as I can't hear the audio very clearly but it's listed as Mail.com notification in the properties afte:r
#1downloading and playing the audio
#2 reading file propties
Hope your that helps.

Android app sound unknown


Entity Framework One To Many Relation

Question: Hi I'm new with Entity Framework, this is what i need, have two classes, let's say "Customer" and "Orders":
Class CustomerBE

{
    Public int CustomerID { get;set;}
    ...Other properties

}

Class OrderBE

{
    Public int OrderID{ get; set; }
    Public int CustomerID{ get;set;}
    Public CustomerBE Customer {get;set}
}

How to mapping the order to customer ?, i have read some others posts and some others examples, what they are doing is to create a icollection of orders in customerBE, something like:
Class CustomerBE
{
    Public int CustomerID{get;set;}
    Public Virtual ICollection Orders<orderBE>{get;set;}
}

And then they map the customer to have many orders, using the orders collection in the customer class, but, for me that is incorrect, the consumer of the class, will be able to use the orders property on the customer class to access all the orders from the customer, and i don't what to let them do that:

ICollection<OrderBE> customerOrders = customer.Orders //I don't what this

In what scenario i would like to get all the customer orders?, usually we wan't the customer orders by a given criteria (date, status, etc.), so instead of use that property, for me, i think it's better to use the orders repository to access the customer orders by a given criteria, something like:

ICollection customerOrders = ordersRepository.GetCustomerOrdersByDate(customer.ID, Today.Date) //This is what i want, not orders = customer.oders

so any body knows how to do the mappings between order and customer using code first approach without have an orders collection in the customer class ?
Answer: Use the Fluent API in your DbContext class:
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
    modelBuilder.Entity<OrderBE>().HasRequired(x => x.Customer);
}

Comment: Thank you will try it, this will load the customer information for my orders right ?

Entity Framework One To Many Relation


Why does the Grignard reagent of CH3I can only be prepared using diethyl ether as solvent but there is no reaction when using THF?

Question: Does anyone know why Grignard reagent of CH3I can only be prepared using diethyl ether as a solvent and yields no reaction when developed in THF? Theoretically, I is the most reactive halogen for Grignard reactions, so using THF or diethyl ether should make no difference.
Comment: Can you provide a reference for this? I have never heard of this problem.
Comment: It was something my lab teacher said. He tried several times doing the reaction in THF but it didn´t work.
Answer: MeMgI is usually prepared in ether, but it can also be prepared in THF. However, magnesium iodide is sparingly soluble in THF, so RMgI reagent in THF should not be very concentrated, so that no MgI2 precipitate forms.
Comment: It seems like $\ce{MgI2}$ should be equally sparingly soluble in diethyl ether. Do you have a reference for your solubility claim?
Comment: @BenNorris It is repeatedly pointed in Gringnard-related literature that MgI2 is soluble in DEE, but not THF (and similarly for MgCl2 ). I was unable to find trustworthy values on quick googling, though.


Module compiled with Swift 4.0 cannot be imported in Swift 3.1 for framework binary

Question: I compiled a framework binary with xcode 9 (swift version 3.2). And I also want to make it work with xcode 8.3.3 with swift 3.2 syntax. But I kept getting Module compiled with Swift 4.0 cannot be imported in Swift 3.1 error message when I attempted to run a project with the framework that was compiled with xcode 9. Which option should I add in order to make this work? I know this is possible because pod Intercom works under both xcode 8.3.3 and 9. I'll appreciate any advice
Comment: I guess not because my framework will not support 3.1, 3.2 though. In xcode 8.3.3 project, I can't find a project option for swift 3.2
Answer: You cannot use a module compiled using a newer version of Swift in a project that is using an older version of Swift for obvious reasons. The framework compiled using the newer Swift version might be using the newer Swift syntax and/or APIs that only became available in the newer Swift version and hence you wouldn't be able to call any functions from the framework that use newer syntax or APIs. This issue is due to the fact that Swift is not yet ABI stable. See the ABI Stability Manifesto for more information on the topic.
Swift 3.2 was only introduced as part of Xcode9 to make Swift3->4 conversion easier. Xcode8.3.3 only supports Swift 3.1, while Xcode9 only supports Swift 3.2 and above, so you cannot compile your framework to be usable in both major Xcode versions.
If you want to support both Xcode8 and Xcode9 in a binary release of your framework, you would need to provide different versions compiled using different Swift compiler versions. As for dynamic frameworks using Cocoapods/Carthage, you can use conditional compilation blocks like #if swift(>=3.2) to write code that's compatible with multiple versions of the Swift compiler. For more information, see The Swift Programming Language (Swift 4) - Version compatibility.
Comment: Ok I get that but https://github.com/intercom/intercom-ios intercom somehow overcame this issue. Install intercom through `cocoapods` on Xcode 8 and 9 works both and their framework is binary form.


android - How to build complex views that stretch?

Question: I'm at the planning stages of my first proper android app. Part of the brief is to have a very "good looking" interface (aka, plenty of graphics). As I'm a web developer, and I'm used to the CSS way of doing things, I'm struggling to understand how I will cater for all the different resolutions when building my layouts. To cut it short, my question is this: how do I build complex, image heavy views that can be seen in apps such as SoundHound (example view here, for those not familiar with this app: http://getandroidstuff.com/wp-content/uploads/2010/09/SoundHound-Android2.jpg)? Is there a way I can tile images in a similar way to the way I'd tile in CSS?
Answer: It is important that you know how all Layouts Views work before you start designing your main layout. Android OS by very design supports stretching of views and GroupViews. You need to use dp (density independent pixel) units.
In the example you provided, there are some nice nine patch PNGs. Check C:\android-sdk-windows\tools\draw9patch.bat if on PC. These pngs stretch properly as backgrounds for any resolution.
Linear layout have weight which allows you determine how much space will each child occupy, similar to the old column width for tables in %. Just like in old hml, to make a rich layout you use nested GroupViews (e.g. LinearLayout, RelativeLayout etc) and populate them with children views like ImageView, TextView and son on.
It is possible also to have text styled with , tags and have

see an example: Html.ImageGetter
Opposite to a nested layout would be to use the RelativeLayout and determine the position of each child view by its top and left margin anywhere on the screen in relation to the top-left corner of their parent RelativeLayout.
Answer: Android has some conventions, that help you out when it comes to different screen sizes, screen densities, screen ratios ...
For example there is a directory called "drawable" where you can put the image resources for your application. However, if you want to ship your application for devices with different resolutions, you can create additional folders named "drawable-ldpi", "drawable-mdpi", "drawable-hdpi". The ldpi folder contains image resources for low density screens, mdpi is meant for medium density and hdpi meant for high density. The folder names are part of the Android conventions. When loading an image resource at runtime e.g. on a high density device, the system is looking for the image resource in the drawable-hdpi folder. It there is no image with that name, the system will look in the drawable folder.
This concept also applies to the xml layouts you define in your "layout" folder. Maybe you say that the layout homeScreen.xml needs to look different when the user switches from portrait to landscape mode. Then you can create a folder "layout-land". You create another homeScreen.xml in there and change its apperance to your needs. At runtime the system detects the current mode. If in landscape, it will first check if there ist a folder "layout-land" and if it contains the layout file with the correct name. If not, or when the user switches back in portrait mode and there is no folder "layout-port", the system looks for the layout file in the "layout" folder.
This is only a small part of it, but I hope, you got a first glance and everything was understandable. Further information can be found in the official refrence