amd graphics card driver for R5 m330

Question: I recently purchased an Hp laptop that came with 2 Gb  dedicated AMD Radeon R5 Series M330 Graphics .Currently i am running ubuntu 15.04 on my laptop.
I checked for the graphics driver in Hp's website as well as in the AMD's website.I even checked the same in software and updates .But i didn't find any.
How can i download the graphics driver ?
Comment: There is no proprietary drivers for any R5 M300 series. Amd support also said that there is no knowledge if they will suport that series for Linux. Part of the response from them: Response and Service Request History:

We don't have any update for you in regards to if the Radeon R5 M300 will be supported in future drivers.  I would recommend that you subscribe to AMD and you will be notified when new driver is released.
Answer: I found some article where it is said that drivers for M2XX works perfectly even for M3XX. Anyways, having the same card tried
sudo apt-get install fglrx-updates

and got it working.
Other methods including download of deb packages from http://amd.com wasn't working for me, tried packages fglrx-core (80MB cca) together with fglrx (50MB cca) and had black screen after reboot. I guess there might be some workaround for this method too.

amd graphics card driver for R5 m330


How do I rename a photo album in Facebook?

Question: After creating a photo album in Facebook, I can't seem to figure out how to rename the album caption.
Answer: Go to album and click on Edit Photos, you can find Edit Info in there.
In 'Edit Photos', click on "Untitled Album' and change it to whatever you wish.
Answer: Open the album then click "Edit Photos", then click "Edit Info". This will allow you to edit the album name, location, and description.
Answer: Just click on "Untitled album". It will get converted into a text box. Delete "Untitled Album" and write your chosen name for the album. Simple.


What do you call this kind of hairstyle? Is there a specific term for it? (Like marcel waves and such?)

Question:
One of my characters has a similar hairstyle to Mary Poppins. I can't find the specific term though. Can anyone help me identify it?
Answer: Well. I've had a quick vada at your pic and I fancy she's had her riah done in a Gibson girl bun, or possibly a double Gibson with a faint suspicion of "Heidi rolls", or is it me?
Comment: And I was considering answering with," This iquestion is better suited for Movies & TV SE.." where I would've readily answered "Bouffant" (unsure of spelling)
Comment: Surely a bouffant would be puffed up on top? - which certainly doesn't describe the hairdo in the picture.
Comment: Yea i didn't want to worry about accuracy, it was the word that someone used when i did an image search, this site shouldnt stray into picture identification IMHO


GNU linker (ld) generates static relocations in shared library

Question: If I compile the example code at the bottom with
arm-elf-gcc init.c -o lib.so -Wl,-shared -nostdlib

I get a shared library with some relocations (readelf lib.so -r):
0000032c  00000d02 R_ARM_ABS32       000004b8   plpv1
00000330  00001302 R_ARM_ABS32       00000000   lpv2
000004b8  00000b02 R_ARM_ABS32       00000000   lpv1

Till now I believed, that the linker resolves all static relocations and generates dynamic relocations (to be handled by the loader), where it is necessary.
Why are there static relocations left in the linker output?
This document says, R_ARM_ABS32 is a static relocation and also:

Static relocations are processed by a static linker; they are normally
  either fully resolved or used to produce dynamic relocations for
  processing by a post-linking step or a dynamic loader. A well formed
  image will have no static relocations after static linking is
  complete, so a post-linker or dynamic loader will normally only haveto
  deal with dynamic relocations.

BTW, this can also be reproduced using i386-elf-gcc, the static relocation used there is R_386_32.
Can anyone tell me, why and tell me, which relocations should really be handled in the loader?
Thanks in advance!
Example code:
extern unsigned char lpv1;
extern unsigned char lpv2;

unsigned char* plpv1 = &lpv1;

void func(void)
{
    lpv2 = *plpv1;
}

Comment: Same question here... Any progress?
Answer:
Can anyone tell me, why

Most likely because you are missing -fPIC flag at compile time.
Comment: Using -fPIC changes the relocations a little bit,
but even then a static relocation (R_ARM_ABS32) is left in the library.
Comment: Any other suggestions?
Answer: There is a follow-up on a mailing-list: https://sourceware.org/bugzilla/show_bug.cgi?id=16163


How do I make ESlint less stringent while working with Prettier in a React project (with Material-UI)?

Question: Update
I added a .eslintc file to the root of my client app and, in it, added this JS Object:
<code>{
    "extends": "react-app",
    "plugins": ["prettier"]
}
</code>
That removes the linting problems from displaying in my IDE but still leaves Prettier in a bad state; that is, when I format, Prettier adjusts my code in a way that produces a ton of errors.
I think I need to next adjust the config rules that are guiding how my Prettier plugin functions.  Any help with that would be appreciated.  My ultimate goal is to get Prettier/ESLint to function as they do originally when shipped with Create React App.  Thanks for the help so far!
End Update
I've been building a project that is using React and Material-UI on the front-end.  I'm using VSCode as my IDE with ESlint and Prettier.  I had originally initiated the front-end of the project with Create React App.
All had been going well until I did something - and I have no idea what - to make my ESLint become super stringent.  It's now presenting problems all over, whereas the same code previously had zero linting problems, and no changes to the code have been made.
I've also been using Prettier and now, because of these linting problems, when I format with Prettier, the code adjusts to address the Linting problems. Which causes actual errors.
I've been searching all over.  I installed ESlint Plugins, been digging around, looking for (and creating .eslintrc.json) files.  Nothing seems to work.  It is making work on this project much more difficult.
What did I do?  How do I fix it?
Thank you.

Comment: Identify the rules you don't want eslint to throw errors; which will be taken care by prettier anyway;  disable those rules in eslint config. Say for instance, `"comma-dangle": "0"` will disable that rule.
Answer: Add or Update your .eslintrc.js file

set indent off
set globals false if it (definition not found)

Hope it helps
<code>module.exports = {
    rules: {
        indent: 'off',
        'new-cap': [0]
    },
    globals: {
        db: false,
        mongoose: false,
        response: false,
        offline: false
    }
};
</code>


Why is this sword more valuable than an objectively better weapon?

Question: Less damage, less armor piercing effect (left) - but why does the better steel sword (right) have less value?
Comment: I don't have proof of this, but it's possible that it could be relative to the weight, too.  You might compare a few items, and see if that holds true.
Answer: The short answer is: rarity.
Witcher weapons and armour are rare and very few, if any, blacksmiths know how to craft them. In universe supply and demand means that the value of Witcher equipment is higher than common equipment such as the other sword you have used for comparison, even if the other equipment is better.
Comment: From memory the item classification refers to the required skill level for a blacksmith to craft the item. So a common item could be crafted by any smith if you, or they, have the diagram. To craft a Master item you need to find a Master level blacksmith.
Comment: Even despite the Witcher sword being listed as a "Common Item" and the Velen a "Master Item"? Looks like the descriptions are out of sync with the lore.
Comment: I guess it's the same as in real life. If an item is hard to find then one will have greater value, and it also depends of with what it's done.
Like if you're going to put diamonds on a sword it's not going to do more damages but will cost more.


Can a coppiced manna gum with three trunks be turned back into a single-trunk tree?

Question: We have a coppiced Manna gum tree which is flourishing. It has three or so trunks. I'd really like to know if it's possible to turn this back into a single trunk tree.
Answer: Yes, it is possible to restore a coppiced tree to a single trunk, thanks to the phenomena known as 'apical dominance' and 'gravitropism'.
Simply remove or at least shorten the competing leaders.
The highest branch tip will wind up being the top of the tree and the line to it, the trunk.
You may, however, need to exercise some persuasion in the form of again pruning the competition later this season and next. But, if you have no interest in manipulating the competing leaders into being branches, just remove them and the process will happen more quickly.
An aside, that I cannot help but mention, is that a common practice in developing bonsai is to 'chop the trunk' (i.e.,coppice it) and 'wire a branch up' to be the new leader. So if you find this project kinda fun, you may want to take up the hobby of bonsai!
Comment: Brilliant Jim. Thanks so much. Here in Australia I've never seen a reversal of coppicing.ill give it a go. Here the Manna gum when in flower is irresistible to Cockatoos and Long Beaked Corellas. It has a kind of nectar and honey scent that is beautiful. These birds snip off the flowers and a few leaves to get to the nectar. So I want my coppiced tree to grow tall for these birds.. Many thanks.
Comment: I didn't know that - that must be quite a sight! There are no birds like them here, but bald eagles occasionally hang out on the tops of the 100 foot tall   Douglas firs across the street. Magnificent, but not the same.
Comment: Bald eagles atop the Firs must be quite a sight too. You always see good stuff like that when you don't have your camera on you:) Yesterday I saw a couple of magpies chase off a Wedge Tail eagle. The magpies always chase off in pairs. One on each side of the eagle's head. If it was just one magpie the eagle could turn its claws sideways and grab it. So two of them distract the eagle.


git push: Push all commits except the last one

Question: Is there a way to push all my local commits to the remote repository except the most recent one? I'd like to keep the last one locally just in case I need to do an amend.
Answer: Try this (assuming you're working with master branch and your remote is called origin):
git push origin HEAD^:master

HEAD^ points to the commit before the last one in the current branch (the last commit can be referred as HEAD) so this command pushes this commit (with all previous commits) to remote origin/master branch.
In case you're interested you can find more information about specifying revisions in this man page.
Update: I doubt that's the case, but anyway, you should be careful with that command if your last commit is merge. With merge commit in the HEAD HEAD^ refers to the first parent of that commit, HEAD^2 - to its second parent, etc.
Comment: If you're on Windows, make use you quote the `^` by doubling it up or you'll wind up pushing everything: `git push origin HEAD^^:master`
Comment: I got `zsh: no matches found: HEAD^:master`. If you use zsh (or have EXTENDED_GLOB enabled), you need to escape the caret: `\^`
Comment: Do I need to mention my local branch and remote if I want to push the current branch to the setup remote? Or could I just `git push HEAD^`?
Answer: A more general approach that works to push up to a certain commit, is to specify the commit hash.
git push <remote> <commit hash>:<branch>

For example, if you have these commits:
111111 <-- first commit
222222
333333
444444
555555
666666 <-- last commit
git push origin 555555:master

..Will push all but your last commit to your remote master branch, and
git push origin 333333:myOtherBranch

..Will push commits up to and including 333333 to your remote branch myOtherBranch
Comment: error: The destination you provided is not a full refname (i.e.,
starting with "refs/"). We tried to guess what you meant by
Answer: Another possibility is to
git reset --soft HEAD^

to uncommit your most recent commit and move the changes to staged. Then you can
git push

and it will only push the remaining commits. This way you can see what will be pushed (via git log) before pushing.
Comment: You'll lose the commit message (of the latest, unpushed commit) though


why does this reaction place the nitro group specifically there?

Question:
the amide up top is activating and the sulfonic acid below is deactivating. I'm just wondering how we know that the nitro group is placed ortho to the amide or meta to the sulfonic acid.
Comment: Bad example, there's no such problem in this case.
Answer: If you draw resonance structures for ortho and meta attacks with respect to amide group,
Resonance structures in ortho attack will exhibit carbocation directly attached to amide group, which is resonance stabilised.
Resonance structure of meta attack will exhibit carbocation directly attached to SO3H group. Which is destabilised. So ortho attack is predominant.
You can check the image I have attached as an answer.


Stored procedures vs. inline SQL

Question: I know stored procedures are more efficient through the execution path (than the inline sql in applications). However, when pressed, I'm not super knowlegeable about why.
I'd like to know the technical reasoning for this (in a way that I can explain it to someone later).
Can anyone help me formulate a good answer?
Answer: I believe this sentiment was true at one point, but not in current versions of SQL Server. The whole problem was that in the old days ad hoc SQL statements could not be properly optimized because SQL Server could only optimize / compile at the batch level. Now we have statement-level optimization, so a properly parameterized query coming from an application can take advantage of the same execution plan as that query embedded in a stored procedure.
I still prefer stored procedures from the DBA side for the following reasons (and several of them can have a huge impact on performance):

If I have multiple apps that re-use the same queries, a stored procedure encapsulates that logic, rather than littering the same ad hoc query multiple times in different codebases. Applications that re-use the same queries can also be subject to plan cache bloat, unless they are copied verbatim. Even differences in case and white space can lead to multiple versions of the same plan being stored (wasteful).
I can inspect and troubleshoot what a query is doing without having access to the application source code or running expensive traces to see exactly what the application is doing.
I can also control (and know in advance) what queries the application can run, what tables it can access and in what context, etc. If the developers are writing queries ad-hoc in their application, they're either going to have to come tug my shirt sleeve every time they need access to a table that I didn't know about or couldn't predict, or if I'm less responsible/enthused and/or security-conscious, I'm just going to promote that user to dbo so they stop bugging me. Typically this is done when the developers outnumber the DBAs or the DBAs are stubborn. That last point is our bad, and we need to be better about providing the queries that you need.
On a related note, a set of stored procedures is a very easy way to inventory exactly what queries may be running on my system. As soon as an application is allowed to bypass procedures and submit its own ad-hoc queries, in order to find them, I have to run a trace that covers an entire business cycle, or parse through all of the application code (again, that I might not have access to) to find anything that looks like a query. Being able to see the list of stored procedures (and grep a single source, sys.sql_modules, for references to specific objects) makes everyone's lives much easier.
I can go to much greater lengths to prevent SQL injection; even if I take input and execute it with dynamic SQL, I can control a lot of what is allowed to happen. I have no control over what a developer is doing when constructing inline SQL statements.
I can optimize the query (or queries) without having access to application source code, the ability to make changes, the knowledge of the application language to do so effectively, the authority (never mind the hassle) to re-compile and re-deploy the app, etc. This is particularly problematic if the app is distributed.
I can force certain set options within the stored procedure to avoid individual queries from being subject to some of the Slow in the application, fast in SSMS? problems. Meaning that for two different applications calling an ad hoc query, one could have SET ANSI_WARNINGS ON, and the other could have SET ANSI_WARNINGS OFF, and they would each have their own copy of the plan. The plan they get depends on the parameters in use, stats in place, etc. the first time the query is called in each case, which could lead to different plans and hence very different performance.
I can control things like data types and how parameters are used, unlike certain ORMs - some earlier versions of things like EF would parameterize a query based on the length of a parameter, so if I had a parameter N'Smith' and another N'Johnson' I would get two different versions of the plan. They've fixed this. They've fixed this but what else is still broken?
I can do things that ORMs and other "helpful" frameworks and libraries are not yet able to support.

That all said, this question is likely to stir up more religious arguments than technical debate. If we see that happening we'll probably shut it down.
Answer: TLDR: There is no appreciable performance difference between the two as long as
your inline sql is parameterized.
These are the reason I've slowly phased out stored procedures:

We run a 'beta' application environment - an environment parallel to production that shares the production database.  Because, db code is at the application level and that db structure changes are rare, we can allow people to confirm new functionality beyond QA and do deployments outside of the production deployment window but still provide production functionality and non-critical fixes.  This would not be possible if half of the application code was in the DB.

We practice devops at the database level (octopus + dacpacs).  However, while business layer and up can basically be purged and replaced and recovery just the reverse, that is not true for the incremental and potentially destructive changes that must go to the databases.  Consequently, we prefer to keep our DB deployments lighter and less frequent.

In order to avoid near exact copies of the same code for optional parameters, we often will use a 'where @var is null or @var=table.field' pattern.  With a stored proc, you're likely to get the same execution plan, despite rather different intents, and thus either experience performance problems or eliminating cached plans with 'recompile' hints.  However, with a simple bit of code that appends a "signature" comment to the end of the sql, we can force different plans based on which variables were null (not to be interpreted as a different plan for all variable combinations - only null vs not null).  Update 8/2020 - This bit no longer seems to be true or is now a lot harder to do as later versions of sql server have become pretty smart about ignoring trivial pieces of code.

I can make dramatic changes to the results with only minor changes on the fly to the sql.  For example, I can have a statement that closes out with two CTEs, "Raw", and "ReportReady".  There is nothing that says both CTEs must be used.  My sql statement can then be:
...
select * from  {(format)}"

This allows me to use the exact same business logic method for both a streamlined api call and a report that needs to be more detailed ensuring that I don't duplicate complicated logic.

when you have a "procs only" rule, you end up with a ton of redundancy in the vast majority of your sql which ends up being CRUD - You bind all the parameters, you list all those parameters in the proc signature, (and now you're in a different file in a different project), you map those simple parameters to their columns.  This creates a pretty disjoint development experience.

There are valid reasons to use procs:

Security - You've got another layer here that the app must go thru.  If the application service account is not allowed to touch tables, but only only have 'execute' permission on procs, you've got some extra protection.  This doesn't make it a given as it does have a cost, but it is a possibility.

Reuse - While I would say that reuse should largely happen at the business layer to make sure you are not bypassing non-db related business rules, we do still have the occational, low-level "used everywhere" type of utility procs and functions.

There are some arguments that don't really support procs or are easily mitigated IMO:

Reuse - I mentioned this above as a "plus", but also wanted to mention it here that reuse should largely happen at the business layer.  A proc to insert a record should not be considered "reusable" when the business layer might also be checking other non-db services.

Cache plan bloat - the only way this is going to be an issue is if you are concatenating values rather than parameterizing.  The fact that you rarely get more than one plan per proc actually often hurts you when you have an 'or' in a query

Statement size - an extra kb of sql statements over proc name is typically going to be negligible relative to the data coming back.  If it's ok for Entities, it's ok for me.

Seeing the exact query - Making queries easy to find in code is as simple as adding the calling location as a comment to the code.  Making code copyable from c# code to ssms is as easy as some creative interpolation and comment usage:
      //Usage /*{SSMSOnly_}*/Pure Sql To run in SSMS/*{_SSMSOnly}*/
      const string SSMSOnly_ = "*//*<SSMSOnly>/*";
      const string _SSMSOnly = "*/</SSMSOnly>";
      //Usage /*{NetOnly_}{InterpolationVariable}{_NetOnly}*/
      const string NetOnly_ = "*/";
      const string _NetOnly = "/*";

Sql Injection - Parameterize your queries.  Done.  This can actually be undone if the proc is instead using dynamic sql.

Bypassing deployment - We practice devops at the database level as well, so this is not an option for us.

"Slow in the application, fast in SSMS" - This is a plan caching problem which affects both sides.  The set options merely cause a new plan to be compiled that appears to fix the problem for THE ONE SET of variables.  This only answers why you see different results - the set options themselves do NOT fix the problem of parameters sniffing.

Inline sql execution plans are not cached - Simply false.  A parameterized statement, just like the proc name is quickly hashed and then a plan is searched for by that hash.  It's 100% the same.

To be clear I'm talking about raw inline sql not generated code from an ORM - we only use Dapper which is a micro ORM at best.

https://weblogs.asp.net/fbouma/38178
https://stackoverflow.com/a/15277/852208
Answer: While I respect the submitter, I humbly disagree with the answer provided and not for "religious reasons".  In other words, I believe there is no facility that Microsoft has provided which decreases the need for the guidance to use stored procedures.
Any guidance provided to a developer which favors the use of raw text SQL queries must be filled with many caveats, such that I think the most prudent advice is to greatly encourage the use of Stored Procedures and, discourage your developer teams from engaging in the practice of embedding SQL statements in code, or submitting raw, plain-old text-based SQL requests, outside of SQL SPROCs (stored procedures).
I think the simple answer to the question of why use a SPROC is as the submitter surmised: SPROCs are parsed, optimized, and compiled. As such, their query/execution plans are cached because you've saved a static representation of a query and you, normally, will be varying it only by parameters, which is not true in the case of copied/pasted SQL statements which likely morph from page-to-page-and component/tier, and are often variablized to the extent that different tables, even database names, can be specified from call-to-call. Allowing for this type of dynamic ad hoc SQL submission, greatly decreases the likelihood of the DB Engine to re-use the query plan for your ad hoc statements, according to some very strict rules.  Here, I am making the distinction between dynamic ad hoc queries (in the spirit of the question raised) versus the use of the efficient System SPROC sp_executesql.
More specifically, there are the following components:

Serial and parallel query plans which don't hold user context and allow for reuse by the DB engine.
Execution context which allows for reuse of a query plan by a new user with different data parameters.
Procedure cache which is what the DB engine queries in order to create the efficiencies we seek.

When a SQL statement is issued from a web page, termed an "ad hoc statement", the engine looks for an existing execution plan to handle the request.  Because this is text submitted from a user, it will be ingested, parsed, compiled, and executed, if it is valid.  At this time it will receive a query cost of zero.  Query cost is used when the DB engine uses its algorithm in order to determine which execution plans to evict from cache.
Ad hoc queries receive an original query cost value of zero, by default.  Upon subsequent execution of the exact same ad hoc query text, by another user process (or the same one), the current query cost is reset to the original compile cost.  Since our ad hoc query compile cost is zero, this does not bode well for the possibility of reuse.  Obviously, zero is the least-valued integer, but why would it be evicted?
When memory pressures arise, and they will if you have a often-used site, the DB engine uses a cleanup algorithm to determine how it can reclaim memory that the Procedure cache is using.  It uses the current query cost to decide which plans to evict.  As you might guess, plans with a cost of zero are the first to be evicted from cache because zero essentially means "no current users of, or references to, this plan".

Note: Ad hoc execution plans - The current cost is increased by each user process, by the plan's original compile cost.  However, no plan's maximum cost can be more than its original compile cost...in the case of ad hoc queries...zero.  So, it will be "increased" by that value...zero - which essentially means it will remain the lowest cost plan.

Therefore, it is quite likely that such a plan will be evicted first when memory pressures arise.
So, if you have a server build-out with lots of memory "beyond your needs", you may not experience this issue as often as a busy server that has only "sufficient" memory to handle its workload.  (Sorry, server memory capacity and utilization are somewhat subjective/relative, though the algorithm is not.)
Now, if I am factually incorrect about one or more points, I'm certainly open to being corrected.
Lastly, the author wrote:
"Now we have statement-level optimization, so a properly parameterized query coming from an application can take advantage of the same execution plan as that query embedded in a stored procedure."
I believe the author is referring to the "optimize for ad hoc workloads" option.
If so, this option allows for a two-step process which avoids immediately sending the full query plan to the Procedure cache.  It only sends a smaller query stub there.  If an exact query call is sent back down to the server while the query stub is still in the Procedure cache, the full query execution plan is saved to the Procedure cache, at that time.  This saves on memory, which during memory pressure incidents, may allow the eviction algorithm to evict your stub less frequently than a larger query plan that was cached.  Again, this depends upon your server memory and utilization.
However, you have to turn this option on, since it's off by default.
Lastly, I want to stress that, often, the very reason developers would embed SQL in pages, components, and other places, is because they wish to be flexible and submit dynamic SQL query to the database engine.  Therefore, in a real-world Use Case, submitting the very same text, call-over-call, is unlikely to occur as are the caching/efficiencies we seek, when submitting ad hoc queries to SQL Server.
For additional information, please see:
https://technet.microsoft.com/en-us/library/ms181055(v=sql.105).aspx
http://sqlmag.com/database-performance-tuning/don-t-fear-dynamic-sql
Best,
Henry
Comment: I have read through several paragraphs of your post, carefully, two or three times, and I still have no idea what thoughts you are attempting to convey. In some cases you appear at the end of sentences to be saying the exact opposite of what the sentence started out attempting to say. You really need to proofread and edit this submission carefully.
Comment: it seems like your aversion to "ad hoc" sql is based on the idea that the sql is somehow changing between executions...this is entirely untrue when parameterization is involved.
Comment: Thank you for the feedback Pieter.  If this is the case, it's possible that I should shorten my sentences to make the point clearer. Can you please provide an example of where I appear to state the opposite of the original thought?  Much appreciated.

Stored procedures vs. inline SQL


Where is truncated-SVD image compression actually used?

Question: What are some instances of real-world sensors, cameras, filetypes, or datasets whose image compression method is (at least mostly-based on) the truncated-SVD?
Comment: I honestly doubt it's used _anywhere_. Truncated-SVD image compression is nothing but an educational curiosity based on the fact that both raster images and linear mappings can be represented as matrices, but any commonalities are coincidence, really.
Answer: A first difficulty with your question is that "usual instances" may not be fully publicized nor documented. A second one is related to the fact that "compression standard" are indeed "decompression procedures". In other words, they offer several options to compress a file, and make sure anybody could decompress, given the knowledge of the options chosen.
Therefore, you might get a compression scheme potentially using SVD, but not using it in practice. One of the reason is that SVD or PCA compression rely on adaptive bases. The latter are often obtained from second-order empirical statistics. Hence, the projection vectors are learned, and ought to be transmitted along with the truncated eigenvalues or singular values. For only one image, the additional cost is often prohibitive, with respect to the thought compression ratio/error balance.  Hence, the discovery of the discrete cosine transform (DCT) and its ability to emulate well SVD for correlated data or Markovian models won the deal.
For a set of images, the basis vectors could be shared, to reduce the storage cost. From the papers I have read, SVD/Karhunen-Loève transforms have be used in satellite picture coding (especially in multi-spectral images), and multi-channel physiological signals (EEG)
Answer: It has been said that the DCT reasonably closely matches the KLT for a representative set of images. KLT is essentially the same as PCA, I believe and SVD is only a different way to compute the same?
An image coder that computes the DCT, sorts the result, then truncate could perhaps be said to be an approximate «truncated SVD»? Usually, you dont sort adaptively but zigzag scan assuming that low frequencies are the most energetic. And you quantize terms, but this effectively leads to a «truncation» of (usually) low energy high frequency terms.


Can we Make Scale Mail Armour out of Oyster Shells?

Question: Would it be possible to make a crude scale mail out of oyster or some other mussel shells. If so how effective would it be? Do I need to invent some kind of super tough oyster for it to work?
Answer: Real shell armor does exist. How practical it was is unknown however.
The breastplate of tula was made by drilling and sewing hundreds of shell fragments to a leather base. Helmets of cowry shells also exist. The big issue is it would not survive many hits, shells are brittle and the bigger the individual pieces of shell the weaker that will make the armor because the more that will end up broken after each hit.
I apologize the museum website may require some scrolling to see the close up  image.
Comment: "*shells are brittle*".  This is critical: something can be "hard" and "brittle" at the same time.
Comment: Yes in fact the two are often related, crystal lattices are often both hard and brittle, for instance diamonds are amazingly hard but you can also smash one into powder with an iron hammer in seconds, whereas a copper coin is rather soft but you can pound on it for hours without it breaking.
Answer: Could you do it? Absolutely yes. Would it be WORTH doing? Well, that's trickier.
Oyster shells are very, VERY tough. Tough enough that the DoD is currently trying to replicate its qualities in modern armor. So toughness isn't an issue at all, and if you could actually MAKE some, it would make very effective protection.
That's where this gets tricky though: How you do you attach the shells to an underlayer or to each other in a way where they won't just constantly be coming off when struck. When you're crafting the scales yourself out of metal or whatnot, you can control the shape to have proper attachment points. Oysters don't NORMALLY have any convenient way to firmly attach them to anything else. If we were trying to do this in our world with our oysters, the way you'd probably have to do it would be by drilling holes in the oyster shells so you could use laces to attach them. This is how traditional scale armor was constructed back in the day.
Of course, the very qualities that make you want to use oyster shells make them VERY difficult to drill, so the time and effort you'd spent making a set of armor like this would be all out of proportion to any reasonable benefit.
I see two possible solutions: You either introduce a tool or technique that's particularly effective at easily putting holes in oyster shells, but impractical as a weapon (some kind of acid might do nicely), OR you find or create a species of oyster that has particularly pronounced protrusions that can easily be used to secure it to armor.
Comment: Drilling holes in shell is a simple task anyone can do (a bow drill with a hard pointy rock as a bit works well) - this is a negligible consideration and would take less time than tanning the leather backing. The problem is the brittleness of the shell. Modern ceramic body armor has the same issue - it is great for taking the energy of a bullet, but the plate itself is destroyed in the process (how the energy is dispersed). If you want something to last, it must be capable of flexing with the impact, otherwise it breaks to dissipate the energy.
Comment: Time consuming is not necessarily an impediment, chainmail takes forever to make but it was still popular. your big issue is it will not last for very long.
Comment: @John Can you elaborate? Why wouldn't it last very long?
Comment: We've made shell beads from oysters from millennia. It's not a big deal. Plus, you can always use vinegar to help?
Answer: A couple layers of shells should provide a good set of armor if you have nothing else, though they will certainly start cracking with every good hit so don't expect it to last long.

For every question, there's an oddly specific research paper that gives the answer: Shell Hardness and Compressive Strength of the
Eastern Oyster, Crassostrea virginica, and the Asian
Oyster, Crassostrea ariakensis.
According to the above paper, the compression strength(ability to not crack) of oyster shells varies based on thickness. About 1000 Newtons are needed to crack a 1mm shell, 2000N to crack a 3mm shell, and 4000N to crack a 5.5mm shell. According to this site, a good swing of a baseball bat hits a baseball with 3400N of force, so if the oyster shells in the armor are 5mm or more it would provide decent protection.
However, this Physics StackExchange answer goes into how much force a hammer hits a nail with: more than 9000N, which is likely closer to what armor would need to withstand in a fight. Thankfully, the original paper shows that compression strength increases non-linearly as shell thickness increases, meaning increasing thickness leads to greater and greater resistance to cracking.
Although it wasn't measured, a 7mm thickness would resist up to 7000N of force, and 10mm should resist at least 10000N if the increase continues at the same rate. Though there's probably diminishing returns, a couple layers of shells should give the strength needed to resist glancing blows, and maybe even a few direct hits before shattering.
Comment: 10mm of shell, overlapping in places, is going to be pretty heavy I would have thought. Might be worth a back-of-envelope calculation for e.g. a breastplate. My guesstimate: using half of https://en.wikipedia.org/wiki/Body_surface_area and guessing at 2g/cm^3 for the solid shell density gives a weight of around 20kg for 10mm thick torso-covering suit . . . a bit on the heavy side, but not impossible.
Answer: Two things:
Firstly, in the absence of metal, it might be a very worthwhile endeavor, comparable to chain mail.
Secondly, not everything had a practical element, generals wore leather muscle cuirass long after better things came along because it was prestigious and looked cool, likewise a labor intensive armor made of beautiful, shiny shells might be used both because it was practical and BECAUSE the labor intensive nature of making and replacing broken shells showcase the status of the warrior or chieftain, and thicker shells on leather could be items of high status, while thinner shells strung over straw padding might be a more affordable, but less effective and impressive armor.
Finally, on a slightly unrelated note: Giant clams baby, you would have the most expensive and prestigious suits, reserved for high priests and kings, be literally carved out of the shells of MASSIVE shells, from killer clams, with the rough outer layer sanded off, leaving a breastplate of unparalelled protection, and BEAUTIFUL mother of pearl finish!
Comment: and unparalleled weight a single giant clam shell weighs over a hundred pounds.
Answer: Not actual shells, but artificial shell analogue materials
Can you make a dress out of silkworm cocoons? Not really. But out of silk? Definitely.
The same is true for oyster shells. Such shells are layered calcium carbonate and biopolymer composites, and they're very, very tough, which is one of the prime requisites of an anti gun armour.
More importantly, if engineered right, they'll crack sacrificially in a way that stops bullets better than steel, weight for weight. It won't survive many shots, but no other armour does either. This is called fracture energy. Its upper limit often correlates with toughness.
This is how military grade sintered alumina armour (which weighs about 10-15 kg) works. I've got personal connection to this. I got to work on sialon in a lab as a ceramics chemistry intern; they were making body armour and the ballistics results were nothing short of incredible.
Artificial shell could be incredible in this regard.
The real questions involve aesthetics. You won't be growing body armour out of actual shells in real life; they'd be boring looking shiny flat plates. But...artificial worlds aren't real life. If you want an anime style shell armour, go for it.
PS If its for swords rather than guns, stick to steel.


Does "lesser" as in "lesser man" refer only to moral strength and goodness or can it encompass physical and mental stamina?

Question: Does "lesser" as in "lesser man" refer only to moral strength and goodness or can it encompass physical and mental stamina?
Answer: NOAD gives the meanings thus:

lesser not so great or important as the other or the rest : he was convicted of a lesser assault charge | they nest mostly in Alaska and to a lesser extent in Siberia.
• lower in terms of rank or quality : the lesser aristocracy | you're looking down your nose at us lesser mortals.
• used in names of animals and plants that are smaller than similar kinds, e.g., lesser spotted woodpecker, lesser celandine.

But that doesn't tell the whole story. The term "lesser" may refer to someone who is not as great as another by any measure one chooses.

I can drink 12 beers in an hour, where a lesser man might manage only six.
Karen was no dummy, but her mother always considered her a lesser light than her sisters.
Sir Robert the Lesser was called that because he was nowhere near as corpulent as Sir Robert the Greater.
Comment: 'lesser man' could also be a measure of, uh, 'manhood'. You know...
Answer: Would be more useful to see it in a full sentence, but what seems clear is that it would refer to the particular subject of conversation (stamina, mental power, bravery, etc)
Saying that, I would use 'less of a man'


Encrypted config kubernetes on Google Cloud

Question: I recently saw this page on the ability to encrypt secrets at rest. I am currently running kubernetes on Google Cloud, but I can't figure out how to set it up with the kube-apiserver. Any help is appreciated.
Answer: From reading the article, there is an important note where you have to properly restrict permissions on the Master nodes for this to work correctly. At this time, the Master node is not accessible by customers as it is a managed service within GKE.
The only suggestion I can offer at this time if you would like to implement this feature is to create a Cluster from scratch within GCE. This way you will have full control of the cluster, including being able to make changes to the Master node.


Jetspeed2 (JSR 286) support for 2 Portlet instances on the same Portal

Question: That's a pure newbie question.. actually not even newbie.. still investigating! I want to know if 2 instances of the same Portlet would have separate scopes? What  is this scope called, maybe Application Scope? Would that hold if they are deployed on the same WAR?
Answer: The JavaDoc of the PortletSession class says:
"All objects stored in the session using the APPLICATION_SCOPE must be available to all the portlets, servlets and JSPs that belongs to the same portlet application and that handles a request identified as being a part of the same session. Objects stored in the session using the PORTLET_SCOPE must be available to the portlet during requests for the same portlet window that the objects where stored from."
There you go. PORTLET_SCOPE is the scope for each instance of a portlet.
P.S: read the JavaDoc of the APIa you want to use before asking these questions.


Friedel craft alkylation halo-carbon bond cleavage

Question:
In this reaction, why is the $\ce{C-F}$ bond broken instead of the $\ce{C-Cl}$
bond, even though $\ce{C-F}$ bond is stronger than the $\ce{C-Cl}$ bond?
Comment: The boron probably associates much better with the fluoride, which activates the attached carbon towards substitution. After all, tetrafluoroborate is a very stable anion.
Comment: Could you provide a reference for this reaction?
Comment: @Zhe Could this be because the $\ce{2p}$ orbitals of fluorine have a stronger overlap with the $\ce{2p}$ orbitals of boron, as compared to those with the $\ce{3p}$ orbitals of chlorine? That said however, I am not entirely sure whether the product ratio of 3-chloropropylbenzene to 3-fluropropylbenzene is 40:60 (a minor difference) OR 15:85 (a major difference)
Answer: In Friedel-Crafts alkylation, the halogen-carbon bond breaking depends on the strength of the bond formation between halogen atom and the Lewis acid used. The more stronger is the forming bond, the easier it is to generate a carbocation for the reaction (in all cases, the carbocation explicitly needn't have to generate, a strong $\delta ^+$ charge on the electrophilic carbon is sufficient enough to have a $\ce{S_E2}$ or $\ce{S_E1}$ type reaction). Here, the Lewis acid used is  $\ce{BCl3}$ where there is a vacant  $\mathrm{2p_z}$ orbital on the $\ce{B}$ atom (assuming the molecule is oriented in a triangle in the  $\mathrm{xy}$-plane), and the Lewis base is the given reagent 1-chloro-3-fluoropropane, which has two basic centres. But donation through $\ce{F}$ will correspond to a stronger  $\mathrm{2p_\pi-2p_\pi}$ overlap with Lewis acid, rather than weaker  $\mathrm{3p_\pi-2p_\pi}$ overlap in the case of donation through  $\ce{Cl}$ atom. Thus, bonding with $\ce{F}$ will correspond to a very huge amount of $\mathrm{-I}$ effect of the adjacent carbon atom, which will weaken the bond between them by pulling the electron pair towards  $\ce{F}$ and easily favour the attack by the $\pi$-electron cloud of benzene ring. Also, the repulsion between $\pi$-electron cloud and the  large sized $\ce{Cl}$ atom is very less during the formation of  the above compound. But, if it would have bonded through  $\ce{Cl}$, there won't be a great electrophilic nature of the adjacent carbon due to less effective bonding in the case of  $\ce{Cl}$ (corresponding to even lesser  $\mathrm{-I}$ effect), so attacking will correspond to a highly energetic transition state, and also, there will be a slight electrostatic repulsion with the $\ce{F}$ atom of the $\pi$-electron cloud.
Due to such aforementioned phenomena and energetically favoured conditions, bonding through cleavage of  $\ce{C-F}$ bond is more preferred over cleavage of $\ce{C-Cl}$ bond.


Data encryption in exact target

Question: How encrypted data of salesforce is transferred to exact target.
Currently we are using third party system to encrypt data in salesforce and we need to automatically integrate salesforce and ET.
Thanks in advance
Answer: The question is very old so you might already have the answer. But here's my understanding.
Marketing Cloud Connect supports Classic encryption done on fields in Sales or Service Cloud and shows data to the users based on View Encrypted Data permission. If you want to use Salesforce's standard encryption features, check the link Marketing Cloud Connect Encryption for more details.
I don't think this will work for custom third party encryption unless Salesforce can make a backend update to support your custom encryption algorithm. It's a long shot, but do check with Salesforce to confirm.

Data encryption in exact target


Asymptotic for general Fibonacci sequence.

Question: Consider the sequence
$$f(n,k) = \sum_{i=1}^{k}f(n-i,k)$$
with the following initial conditions $f(n,k) = 0$ for $n<0$ and $f(0,k)=1.$ I noticed that
$$\lim_{n\to \infty} \frac{f(n+1,k)}{f(n,k)}=\phi(k)$$
and that
$$\lim_{k\to\infty}\phi(k)=2.$$
Based on the first limit I am guessing that
$$f(n,k)\sim c\phi(k)^{n}$$
where $c$ is some constant. But I am not sure how to determine $c$ and prove this asymptotic result. I think that it has something to do with this:
$$f(n,k)=\frac{f(n,k)}{f(n-1,k)}\cdot \frac{f(n-1,k)}{f(n-2,k)}\cdot \frac{f(n-2,k)}{f(n-3,k)}\cdots \frac{f(1,k)}{f(0,k)}$$
but I am not able to write this rigorously. Perhaphs someone can give an argument that is rigorous enough?
Answer: First of all, the closed form of the sequence is
$$f(n, k) = \sum_{i=0}^k c_ip_i^n$$
where $p_i$ are the roots of the equation
$$x^k = \sum_{m=0}^{k - 1}x^m$$
and $c_i$ are constants to satisfy the initial conditions. It is a standard result which is easy to obtain looking at the generating function.
It is more or less obvious that asymptotic behavior is governed by the root with the largest absolute value. So your guess is correct. $f(n, k) \sim \phi(k)^n$ indeed, and $phi(k)$ is the largest root of the equation above.
The RHS of the equation is a geometric progression, therefore $x^k = \dfrac{x^k - 1}{x-1}$ or $x^{k+1} - 2x^k + 1 = 0$. Now try to prove that as $k \rightarrow \infty$ the largest root approaches $2$ (easy to see that some root approaches $2$, a bit harder is to prove that it is indeed largest).
I am absolutely clueless on how to figure out $c$.


What is an odd function?

Question: I'm reading this term (odd function) in my numerical analysis book, but I have never heard of this. What does it mean that an function is odd ?
Comment: Go see [Wikipedia](http://en.wikipedia.org/wiki/Even_and_odd_functions).
Comment: Three possible definitions include: $f(-x)=-f(x)$ (the most likely), for integer $x$, $f(x)$ is odd (unlikely), degree$(f)=2k+1$ (unlikely).
Comment: Answers in here may be worth a look http://math.stackexchange.com/questions/463139/symmetry-functions-and-integration/463159#463159
Answer: It means $\forall x\in \operatorname{D}_f:f(-x)=-f(x)$. There's also something called even function that is defined as $f(x)=f(-x)$.
The terminology is because these functions show some properties that are common with odd and even integers.
EDIT: I think the terminology isn't very bad. I think the terminology is good when you compose functions.
The composition of odd/even functions behave exactly like multiplying odd and even integers. So, suppose $f,h$ are odd functions and $g,k$ are even functions.
$\operatorname{f \circ h}(-x)=\operatorname{f}(\operatorname{h}(-x))=\operatorname{f}(-\operatorname{h}(x))=-\operatorname{f}(\operatorname{h}(x))=-\operatorname{f \circ h}(x)$. That means $\operatorname{f \circ h}$ is odd.
$\operatorname{g \circ k}(-x)=\operatorname{g}(\operatorname{k}(-x))=\operatorname{g}(\operatorname{k}(x))=\operatorname{g \circ k}(x)$. That means $\operatorname{g \circ k}$ is even.
$\operatorname{g \circ f}(-x)=\operatorname{g}(\operatorname{f}(-x))=\operatorname{g}(-\operatorname{f}(x))=\operatorname{g}(\operatorname{f}(x))=\operatorname{g \circ f}(x)$. That means $\operatorname{g \circ f}$ is even.
$\operatorname{h \circ k}(-x)=\operatorname{h}(\operatorname{k}(-x))=\operatorname{h}(\operatorname{k}(x))=\operatorname{h \circ k}(x)$. That means $\operatorname{h \circ k}$ is even.
It's easy to construct as many functions as you want that are neither odd nor even. So, most functions are neither odd nor even. However, the only function that is both odd and even is $\operatorname{f}(x)=0$. Because if $\operatorname{f}$ is both odd and even then we have $\operatorname{f}(-x)=-\operatorname{f}(x)$ because it's odd and we have $\operatorname{f}(-x)=\operatorname{f}(x)$ because it's even. So we must have $\operatorname{f}(x)=-\operatorname{f}(x)$ which gives $2\operatorname{f}(x)=0$, i.e. $\operatorname{f}(x)=0$
Comment: @MJD: I disagree. It's true that they don't behave exactly like integers. But there are some nice properties too. For example if $f$ is odd/even, its derivative is even/odd respectively. The composition of two even functions is even, the composition of two odd functions is odd, and the composition of an even with an odd function is even. This gives us a homomorphism from the set of functions under composition as a monoid to $\mathbb{Z}_2$ under multiplication. It's not as bad as you say, even though it's far from perfect either.
Comment: The name is a really bad one.  It arises because if $f$ is a polynomial with only odd-degree terms, then it is an odd function.  Other than that, odd functions have very few properties in common with odd integers.  For example, the sum of two odd functions is not in general an even function; it is an odd function; and the product of two odd functions is not in general odd.
Comment: `\circ` will make the composition ymbol in $f\circ g$.
Comment: @MJD: Thanks. I didn't remember that code. Is there a shorter code than \operatorname{ } to force LaTeX to write $\operatorname{f}$ instead of $f$ which looks Italic?
Answer: $f$ is odd if $f(-x) = -f(x)$. The graph is symmetrical with respect to a 180 degree rotation about the origin. For example $f(x) = x^3$ is odd.
Answer: An odd function is a function where: $$f(-x)=-f(x)$$
If you graph an odd function, you will find that the graph has rotational symmetry around the point $(0,0)$.
Also worth noting is that odd functions are made up of polynomials where $x$ is raised to an odd power
Answer: A function is said to be odd if changing the sign of the variable changes the sign of the function (keeping the absolute value the same). It is even if changing the sign of the variable does not change the function. We express this mathematically as:
Odd: $f(-x)=-f(x)$
Even: $f(-x)=f(x)$
It is sometimes useful to know that any function can be expressed as the sum of an even function and an odd function $f(x)=\left(\frac{f(x)+f(-x)}{2}\right)+\left(\frac{f(x)-f(-x)}{2}\right)$
The "odd"ness of a function is therefore an antisymmetric property, while evenness is a symmetric property. There are occasions in other contexts where it is useful to split something into symmetric and antisymmetric parts. So although the terminology may seem a little odd, it actually expresses something which is quite deep, and introduces an idea which can be fruitful. For example determinants are antisymmetric functions.
If the symmetric integral of an odd function exists, it is equal to zero, which sometimes saves a lot of work if you spot it - i.e. $\int_{-a}^{a}f(x)dx=0$ if $f(x)$ is an odd function.
It is useful to know that the function $\sin x$ is odd, and $\cos x$ is even. The hyperbolic functions $\sinh x$ and $\cosh x$ are the decomposition of the exponential function $e^x$ into its odd and even parts.

What is an odd function?


Configure router to redirect different hostnames to different machines

Question: Is it possible to tell your router to redirect specific domains to a specific IP? The router is an Airport Extreme, unfortunately. If it can't be done with this specific router, is there another way to achieve this?
Comment: I love this question because when developing a website locally and trying to test it from an iPhone on the LAN, I'd love not to need to browse to the specific IP address of my server (and instead use a hostname). I.e. the solutions here are terrible and would be solved by an answer to your question: http://stackoverflow.com/questions/3132105/how-do-you-access-a-website-running-on-localhost-from-iphone-browser
Answer: I have configured many routers and have never seen a feature like this in off the shelf routers. As far as I know you only get these types of features on high-end enterprise routers like SonicWall and Cisco routers. These range in prices, but the SonicWall I used had this feature and was about a $3,000 router.
This is really an advanced task your trying to accomplish. If your up for it you can buy a router compatible with DD-WRT or OpenWRT and get that type of feature for under $200 buck. you gotta flash it and then go from there.
@Dan offers another option which is software based, which may be the easiest method depending on how large of a network and how many servers you have behind that router. You may be able to configure Apache as a proxy and forward request to other internal Apache servers.
Apache mod_proxy -
http://httpd.apache.org/docs/2.0/mod/mod_proxy.html
Comment: Is this something that [PFSense](http://www.pfsense.org/) might be able to do?  I've used it as a router before, but it's been some years since I last messed with it.
Comment: I never used PFSense before, but skimming thru the docs and wiki, PFSense appears to be much more advanced than your standard router.
Comment: Does anyone know if its is actually possible to do this on a SonicWall, what the feature is called, and how to determine which models support it?
Answer: No, routers don't support redirecting on domain names since they work on layer 3 of the OSI model. That means that they route network traffic based on IP-adresses and IP-adresses don't contain host-names nor domain-names since that's done on layer 5 (session) of the OSI model, see: http://en.wikipedia.org/wiki/OSI_model
If you want to route to domains you probable have to think of using a vlan or subnet. Those settings you likely don't find on cheap routers.
Answer: No, to be frank. Definitely not with an Airport Extreme, and I doubt with any other kind of consumer or prosumer router. This isn't what routers are designed for - that kind of 'routing' needs to be done by software on an Operating System.
To be honest, I'm not even sure if there's ANY router that would do - but I'm always happy to be shown.
Edit: Wait, I assume you're talking about redirecting INCOMING connections? What is it you're trying to achieve exactly?
Comment: Yeah, incomming connections. I want two domains pointed at the same ip but be hosted on 2 different machines.
Comment: @oskob: That's not going to work in general. Incoming packets have an IP address on them, but no hostname. So, if you have a.example.com and b.example.com both resolve to 18.104.22.168, then you can't tell from an incoming packet to 22.214.171.124 what hostname the remote side used. HTTP is a special case; you can set up a reverse proxy. That's not a router task, though. (wrong OSI level)
Answer: As previously mentioned, it's impossible for most routers.
However, there are always other methods, which I felt might be valuable to those that land on this topic:
For those that want to accomplish this for INCOMING requests to a server, it is possible through another, FREE, method:
You could have 1 main server ACT as your router. Let me explain. If you are using Apache, you have the built-in ability to host multiple domains as a "Virtual Host" - If your server has enough resources to handle it, you might be better off with multiple directories on 1 server. You can configure Apache to listen on the same IP for multiple "ServerName" (domains), while pointing to different directories.
If you wanted to have files for each domain on a separate server, you could setup a network share, and point that "ServerName" to that the NFS or SAMBA mount. With either setup, you are dependent on the main server's resources, as that is where the processing will take place.
For those that want to accomplish this for OUTGOING requests, from a client computer, it is possible through another, FREE, method:
On your computer, with admin privileges, edit your /etc/hosts file, basically just insert a new row with your destination IP and the domain name you want to point there:
<code>127.0.0.1 yourdomain.com
</code>
Here's a pretty good how-to for all OS's:
http://support.hostgator.com/articles/general-help/technical/how-do-i-change-my-hosts-file


What is the difference between 'rm' and 'unlink'?

Question: Assuming you know the target is a symbolic link and not a file, is there any difference between using rm and unlink to remove the link?
Comment: This is pretty well covered on ServerFault: http://serverfault.com/questions/38816/what-is-the-difference-between-unlink-and-rm
Comment: @slm♦ The answers correspond to that question, but this question is different, it says: "Assuming you know the target is a symbolic link and not a file".
Answer: Anytime you have these types of questions it's best to conceive of a little test to see what's actually happening. For this you can use strace.
unlink
$ touch file1
$ strace -s 2000 -o unlink.log unlink file1

rm
$ touch file1
$ strace -s 2000 -o rm.log rm file1

When you take a look at the 2 resulting log files you can "see" what each call is actually doing.
Breakdown
With unlink it's invoking the unlink() system call:
....
mmap(NULL, 106070960, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f6d025cc000
close(3)                                = 0
unlink("file1")                         = 0
close(1)                                = 0
close(2)                                = 0
exit_group(0)                           = ?
....

With rm it's a slightly different path:
....
ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
newfstatat(AT_FDCWD, "file1", {st_mode=S_IFREG|0664, st_size=0, ...}, AT_SYMLINK_NOFOLLOW) = 0
geteuid()                               = 1000
newfstatat(AT_FDCWD, "file1", {st_mode=S_IFREG|0664, st_size=0, ...}, AT_SYMLINK_NOFOLLOW) = 0
faccessat(AT_FDCWD, "file1", W_OK)      = 0
unlinkat(AT_FDCWD, "file1", 0)          = 0
lseek(0, 0, SEEK_CUR)                   = -1 ESPIPE (Illegal seek)
close(0)                                = 0
close(1)                                = 0
close(2)                                = 0
exit_group(0)                           = ?
+++ exited with 0 +++
...

The system calls unlink() and unlinkat() are essentially the same except for the differences described in this man page: http://linux.die.net/man/2/unlinkat.
excerpt

The unlinkat() system call operates in exactly the same way as either
  unlink(2) or rmdir(2) (depending on whether or not flags includes the
  AT_REMOVEDIR flag) except for the differences described in this manual
  page.
If the pathname given in pathname is relative, then it is interpreted
  relative to the directory referred to by the file descriptor dirfd
  (rather than relative to the current working directory of the calling
  process, as is done by unlink(2) and rmdir(2) for a relative
  pathname).
If the pathname given in pathname is relative and dirfd is the special
  value AT_FDCWD, then pathname is interpreted relative to the current
  working directory of the calling process (like unlink(2) and
  rmdir(2)).
If the pathname given in pathname is absolute, then dirfd is ignored.
Comment: It makes me happy to read this answer because I just "learned to fish" in a powerful, flexible way when often I get a fish or sometimes I "learn to fish" in a basic way on SO :-)
Comment: Since it's giving `AT_FDCWD`, there's effectively no difference between `unlink` and `unlinkat`.
Answer: POSIX specifies that the unlink utility calls the C library unlink function and nothing else. It takes no option. If you pass a valid path name to something which isn't a directory, and if you have write permissions to the directory where that object lives, then unlink will remove it.
rm is a traditional Unix command which has a bit of other functionality, and isn't quite a superset of unlink (see below).
Firstly, rm performs safety checks. If you try to rm an object to which you don't have write permissions (which are irrelevant to your ability to remove it: the containing directory's permissions are!) rm nevertheless refuses unless -f is specified.   rm normally complains if the file doesn't exist, as does unlink; however with -f, rm does not complain. This is often exploited in Makefiles (clean: @rm -f $(OBJS) ...) so make clean doesn't fail when there is nothing to remove.
Secondly, rm has the -i option for interactively confirming the delete.
Thirdly, rm has -r for recursively removing a directory, which is something that unlink isn't required to do, since the C library function doesn't do that.
The unlink utility isn't exactly a stripped-down rm. It performs a subset of what rm does, but it has semantics which is a combination of rm with -f and rm without -f.
Suppose you want to just remove a regular file regardless of what its own permissions are. Furthermore, suppose you want the command to fail if the file doesn't exist, or any other reason.  Neither rm file nor rm -f file meets the requirements. rm file will refuse if the file isn't writable.  But rm -f file will neglect to complain if the file is missing. unlink file does the job.
unlink was probably introduced because rm is too clever: sometimes you just want the pure Unix unlink semantics: "please make this directory entry go away if directory permissions allow".
Comment: This is the clearest answer here.  It actually gives the *use case* for `unlink` rather than just describing differences.
Comment: Agreed. The **unlink(1)** tool is just a simple wrapper of **unlink(2)**, without additional features.
Answer: With a single file, rm and unlink do the same task, remove the file. As POSIX defined, rm and unlink both call to unlink() system call.
In GNU rm, it calls to unlinkat() system call, which is equivalent to the unlink() or rmdir() function except in the case where path specifies a relative path.
Note
On some systems, unlink can also remove directory. At least in GNU system, unlink can never delete the name of a directory.
Answer: Also with rm you can use glob to delete multiple files. With unlink you can delete one file at a time.
touch f{1..10}
rm f*           # works

touch f{1..10}
unlink f*       # doesn't work (expands to unlink f1 f2 ... f10)
unlink f1       # works


seymour duncan phase

Question: I am about to upgrade the pickups in my Ibanez 1527 7string guitar, so I was looking into this model for the bridge: Seymour Duncan JB Modell 7 Bridge black 4-phase, 7-string. Could someone explain what "4-phase" means? I would like to avoid buying the wrong pickup.
Answer: I think this means 4 conductor which gives you the option of wiring the pickup to a switch so that you can use it as full humbucker (with both coils) or as a single (just using one coil).  You can just hardwire it without a switch in full humbucking mode if that is all you need.
Some pickup manufacturers produce their pickups with both 2 & 4 conductor wiring. 2 conductor will only allow you to have the humbucker option, but simplifies the wiring a little.
Edit:
Looking at the specs for the Ibanez 1527 it has a 5-way switch which allows you to get both single coil and humbucking tones, so yes, you will need four-conductor wiring on any replacement pickups if you want to keep the range of sounds you have currently.  Looking on the Seymour Duncan website a wiring diagram you could use is:
http://www.seymourduncan.com/support/wiring-diagrams/schematics.php?schematic=2hum_1vol_1tone_super5way
It might be worth looking on the Ibanez website as they may publish the exact wiring diagram for your guitar (I had a quick look but could not see it), or you could try e-mailing them.
If in doubt, get a competent guitar tech to install the pickups for you.  Hope this helps.
Comment: Thanks for this explanation. Would there be any disadvantages from using a 4 conductor mode vs 2? My guitar is HH  (ibanez rg 1527) and I am looking forward to the sound of the 2 coils in the humbucker, but would there be an option to switch between 1 and 2 at the distance of a switch? is that what you mean?
Comment: I have updated my answer, but in summary it looks like you DO need 4-conductor wiring on your replacement pickups.
Comment: @CaseyJones: IIRC there is info on the SD website about "splitting a humbucker" aka coil split or coil tap. From the answer, it sounds like your guitar's wiring already deals with this, but it is possible to add a toggle. I added one to an (HSS) Strat. Took about 3 mins.
Answer: I'm looking around at different sites and I'm not seeing four-phase as a description anywhere.
What I do see is that they have signal and ground from both coils. From there, you can do signal from one coil or the other, or both coils in serial or parallel.
I don't know how you play, so I don't know what the right pickup for you would be, but Seymour Duncan is one of the bigger and more trusted names in pickups, and the JB pickup is one of their flagship models, so I would suspect that this pickup would be decent for you.
Comment: Thanks, I had this pick up in the past in one of my 6 string guitars. I know it sounds great and I'm looking forward to it. The 4 phase is written in the pickup description.

seymour duncan phase


Google TV to Dell monitor

Question: I have a Google TV which is connected to a Dell monitor. The image works but there is no sound. Is there a adapter that we could use to get sound?
Answer: In no way am I promoting this product, but is this something that you can use? HDMI to VGA Audio Converter

Google TV to Dell monitor


DNA replication : binding

Question: Regarding an activator, does the C amp cap complex, bind to the coding strand, the template strand, or both?
Comment: Your question makes it sound like the coding strand and the template strand are single-stranded when the cAMP CAP protein is bound. In fact, the recognition site for transcriptional activators and repressors are usually double-stranded, so the answer is both.
Comment: I agree with you but it's technically possible for a protein to make meaningful contacts with only one of the strands, although this is probably not what he meant.
Comment: *she .... you can't edit comments?
Answer: Both. You should note that activation in this case involves recruitment of RNA polymerase to drive transcription, and that this process is irrelevant to DNA replication. B in the figure shows amino acid contacts (from CAP) with specific nucleotides in the DNA duplex.
DNA binding by CAP: structure of the CAP-DNA complex.
(A) Structure of CAP in complex with its consensus DNA site (PDB 1RUN) [14], showing primary- and secondary-kink sites. CAP is in cyan; DNA and cAMP bound to CAP are in red. The crystallization DNA fragment contained a single-phosphate gap between positions 9 and 10 of each DNA half-site (Fig 1b).
(B) Summary of CAP-DNA interactions. Shaded boxes indicate positions at which CAP exhibits strong sequence preferences [11,15,16,17]. The black circle, black rectangles, and black diamonds indicate, respectively, the two fold-symmetry axis, the primary-kink sites; and the secondary-kink sites. The black vertical lines indicate the positions of single-phosphate gaps present in the crystallization DNA fragment. The cyan ovals and cyan circles indicate, respectively, amino acid-base contacts and amino acid-phosphate contacts.
Figure from:
Catherine L. Lawson, et al. 2004. Catabolite activator protein (CAP): DNA binding and transcription activation. Curr. Opin. Struct. Biol. 14:10.

DNA replication : binding


How to blacklist a package?

Question: I am using company-mode for completion purposes. But somehow, some package always draws in auto-complete as well, which collides with company-mode, since both offer a popup with completion candidates. I want to blacklist auto-complete, since I do not need it. How can I do that? I know there is a variable package-pinned-package, but I cannot see how to blacklist a package — maybe by using an invalid archive?
Comment: Note that there is no collision per se.  For `autocomplete-mode` to be a problem, it must be enabled first, same goes for `company-mode`.
Comment: I suggest you to find out what does.  Either it's you (and something in your init file, a possibility that has become a lot more probable since the acceptance of starter kits) or another package (which is a bug).  Both bisection and searching your `~/.emacs.d` for something along the lines of `(auto-complete-mode)` would work.
Comment: Packages generally shouldn't enable auto-complete-mode for you (save some very specific circumstances). If you're 100%sure that you're not enabling it yourself, I suggest you file an issue in that package reporting this.
Comment: For some reason, it gets enabled without me doing any customizations.
Comment: If it is a requirement of another package then it has to be installed, but it should be possible to not have `autocomplete` be active in any buffer where `company-mode` is active. Perhaps you need to manually disable `autocomplete` in the `*mode-hook` of any affected major modes?
Answer: I don't know how to blacklist the installation of a package. But it's easy to prevent it from loading. If you put (provide 'auto-complete) in your init file, then any package that tries to load auto-complete will be told that it's already loaded.
(More precisely, this takes care of libraries that load auto-complete in the normal way, with require. If there's any code that uses load directly (which would be unusual), you need to put this in a separate file called auto-complete.el.)
Of course, if the package requires auto-complete, it's probably because it'll use it. But maybe a package only declares autocomplete sources and has useful functionality otherwise. So you can make the part that you don't want a no-op. Depending on what the package does, you may need other similar definitions.
(provide 'auto-complete)
(defmacro ac-define-source (&rest ignored)
  "A no-op since I blacklist `auto-complete'.")

Answer: What @Gilles wrote is the general answer I would have given also.
But note that using provide does not prevent code from loading the package. It prevents code from loading the package only by require. If code uses load, load-library, load-file etc. then this trick has no effect.
If you really need to prevent code from loading a given library, a better approach is to provide a proxy library that gets loaded in its stead. For example, in a directory that comes earlier in your load-path, add a phony auto-complete.el that does nothing except (provide 'auto-complete).
That way, whenever code tries to load the library using load or load-library your proxy library will be loaded instead of the one you are avoiding.
However, if code uses load-file and provides the absolute address of the file of the library you are trying to avoid, then that file will be loaded. I don't see a good solution for that case (except to remove or replace that file).

How to blacklist a package?


Calculate density of point feature class using field calculator? (not pop)

Question: I'm just wondering what would be the best method to calculate density in the field calculator for a point shapefile (ArcMap). This wouldn't be based on a population value. I would need to derive a value for each point based on the proximity of surrounding points that I can plug into each point feature. Obviously the more points surrounding the subject point the higher the value. How would I do this?
I have the spatial analyst tool
I don't want to create a raster. I want to be able to symbolize each point based on their density value (stretched)
Comment: You can use point distance to create a distance matrix constrained by the search distance. This would be a good starting point. http://desktop.arcgis.com/en/arcmap/10.3/tools/analysis-toolbox/point-distance.htm
Comment: Without creating a raster or stepping out to python, I do not think that this is possible. Since you are just needing a distance function, spatial analyst should not even be necessary. I guess you could do this manually by creating a distance matrix and for every row, count the number of neighbors n[<= d]. If you want true density you would then divide this value by the area in the defined distance (d) radius [pi*d^2]. This would only be a few lines of code in Python or R.
Comment: Do you have an example? I don't need true density
Answer: If I understand you correctly, you could do a multi-step process that will eventually produce the results you desire. It is a roundabout way of reaching you end goal, but it works nonetheless.
I'll list these steps below:

Create buffers around each point set to a distance you desire. Do not dissolve these buffers, as that will mess up the calculation of the density.
Complete a spatial join, joining the points to the buffer shape file. This will create a column in the buffer file which will count the number of points located within each buffer.
Also in the buffer shapefile, use the area that is listed in the attribute table (units of area depend on what projection is being used) to calculate density. To do this, create new field (double) in the attribute table. Then, use the field calculator to divide the count of points by the area of the buffer. This will return the density you are looking for.
To symbolize the points based on the density, you can then join the resulting buffer shapefile with the calculations to the original point file. You will then be able to symbolize the density value of each point however you please.


How close is the EU to achieving a fully unified market?

Question: The original goal of the EU was to fully unify its members' markets to achieve a situation where all trade barriers are eliminated. As of 2018, how close is the EU to achieving that goal, according to official EU statements?
Comment: Do you have a measurement of your own against which to compare "how unified" it is? Or should answers use the ones mentioned in the requested statements?
Comment: @JonathanReez That's a somewhat vague definition. Taking it literally, the fact that Ireland drives on the left would count as a trade barrier to continental car producers.
Comment: There's an even deeper problem: what exactly constitutes "the market"? This is not a trivial issue: France has and is arguing that "culture" is not part of the market, and thus not of the single market, and therefore English-speaking artists do not have equal access to the French media (Even when those are "commercial" media and therefore obviously part of the market)
Comment: @DonFusili fully unified = no difference between trading within one country and trading across borders
Comment: @MSalters absolutely everything that involves the exchange of money between people. Obviously the lack of a common language is a big barrier, French laws are a barrier, driving directions on the British isles is a barrier, etc. The only thing excluded would be stuff that's beyond human control, such as the fact that different regions of Europe have different weather.
Comment: @JonathanReez "beyond human control" is not a clear definition either. Ireland drives on the left due to historical circumstance, and when that decision was made nobody could have foreseen cars or the EU. Hence a better choice was not under human control at the time either. Likewise today I don't think that having Ireland drive on the right is a live option now.
Comment: @PaulJohnson it is well feasible for Ireland to switch their driving side. It's completely under their control. But obviously they couldn't move their island to get a land border with Europe so having a canal is not a trade barrier.
Answer: According to the Official Website of the European Union itself,

hundreds of technical, legal and bureaucratic barriers to free trade and free movement between the EU's member countries have been abolished

However there are many obstacles remaining, such as

fragmented national tax systems impede market integration and undermine efficiency
separate national markets still exist for financial services, energy and transport
e-commerce between EU countries has been slower to take off than at national level, and rules, standards and practices vary considerably
the services sector is lagging behind the goods markets (although it has been possible since 2006 for companies to offer a range of services abroad from their home base)
rules on the recognition of vocational qualifications need to be simplified to make it easier for qualified workers to find a job in another EU country.

The page also talks about the financial services market as being a special case

The financial services market is a special case. The EU is seeking to build a strong, secure financial sector — while avoiding a repeat of the 2009 crisis — by supervising financial institutions, regulating complex financial products and requiring banks to hold more capital. The creation of the banking union transferred the mechanisms for bank supervision and resolution from national to EU level in several member countries. There are also plans to set up an EU-wide capital markets union to:
    - reduce fragmentation in financial markets
    - diversify sources of finance
    - strengthen flows of capital between EU countries
    - improve access to finance for businesses, particularly small and medium-sized companies.

The page itself shows that it was updated on 4/30/2018, so while it does not go into very much detail, it does seem to be the EU's status of the movement to a unified market.
Answer: The EU publishes reports on the energy union. I will use this as a proxy for overall market unification.
What does the energy union aim to do?
First, we have to establish that the energy union project is a good proxy for the market unification.
An objective of the union is:

The energy union means making energy more secure, affordable and sustainable. It will allow a free flow of energy across borders and a secure supply in every EU country, for every European.

Emphasis is mine. From this quote it is clear that we're referring to eliminating trade barriers.
What do the EU reports say?
The Third Report on the State of the Energy Union and its annexes says:

At the same time, work to improve the internal energy market integration and security of
  supply continues. Regional cooperation, which was initially aimed at improving physical
  infrastructure and its efficient use, is expanding its scope, and covers aspects such as
  renewables development and energy efficiency. It could further evolve towards joint
  renewables projects between Member States and respective project promoters or even towards
  joint longer-term renewables deployment strategies on regional scale.

From this quote we see that the EU is investing in cross-border energy infrastructure and renewables. From the same report, we can see that renewables are contributing a higher percentage of energy consumed in Europe:

TL;DR
The EU has attempted to integrate the energy market. The EU claims this is proceeding well. As a proxy measure, the EU's push to use more renewables would support the trend of market integration.


As recumbents are low to the ground and hard to see, how to you use one safely on a normal road?

Question: My wife thinks that she can't use a recumbent on the roads, as a car driver will not be able to see it.  What's the solution?
Comment: If she doesn't feel safe riding a recumbent why are you trying to push it? Let her ride a standard bike if she wants.
Comment: @Kibbee standard bike and trikes are not stable enough
Answer: Getting a high safety flag is common on recumbents (and trailers), at least in the US.

Photo credit
Comment: @TomHawtin-tackline so the flag addresses exactly the problem the OP is talking about - the rider *feels* less visible. Add a flag, she will probably *feel* more visible, regardless of the facts in both situations.
Comment: I want that to work, but I can't imagine it possibly being any use (other to make the 'bent cyclist feel better).
Comment: Today I saw one with 4 flags, 2 on each side.
Answer: Sorry for the late answer.
The solution is to persuade your wife that she will be seen.
Obviously you can make the bike more visible, as the other answers suggest, but this is probably an emotional issue rather than a reasoned one. She feels less visible on the recumbent. The solution to the feeling is not so much reasoned argument as it is to start riding and focus on riding in places that she feels safe. Try to balance that against being exposed to motorists, so look for quiet back streets and places where bike paths cross roads. Avoid car parks because those are insanely dangerous even if they're low-speed.
If she doesn't have a recumbent yet, a velomobile might also help. The combination of feeling somewhat enclosed and actually being surrounded by a huge blob of colour does wonders. Not to mention the (almost always positive) comments the velo gets. Faling that, a tailbox is a useful addition - it provides storage as well as a block of colour.
Answer: I've never had a car not see me, who would have seen a bicycle.  That said, it's crucial to bike safely and to stay where the cars are looking:  in the street, not the gutter or sidewalk.  I also use a flag and reflectors.  I particularly like reflectors on my body and helmet, since we perceive body motion more easily than machine (straight line) motion.
That said, flags don't help the worst visibility problem:  when a car is approaching from a side street and not looking in your lane.  Your front gears may be the only part visible, and they blend in at night.  You need to grab that car's attention, so I have reflective tape all over the sides of my pedals.
Comment: Hmmm - as a tall rider I experience the opposite.  I can see over cars on a regular bike and can't see through them when on a recumbent.  Occasionally I can see "under" a truck, but that's rare.
Answer: Overall, you are probably going to be safer on a recumbent than a conventional upright bike.
Remember, a conventional bike can be hidden by vans and buses. The key thing, in my limited experience, is to stay well out of the gutter. Refuse to be intimidated by cars behind wanting you out of the way. Make sure you are where you can be seen. For instance, if two cars facing each other are turning right (across the road in the UK), just hang back away from the curb.
Comment: Recumbents can be ridden in the gutter, and uprights can be ridden in the lane, and vice-versa. I see nothing in this answer that supports the statement that recumbents are safer than uprights despite the lower visual profile.
Comment: Yes, I second this. I find that if you stay in near the gutter then you are seen as a stationary object (e.g. parked car) and cars are always tempted to 'just nip past' you, regardless of how close they are to you. Whereas if you stay out and force them to cross the dotted line into the oncoming traffic lane to get around you then they become much more conscious of their actions & therefore more cautious.
Comment: While I strongly agree that maintaining a good lane position will make any rider more visible, recumbents are not necessarily safer than normal bikes.  Both have pros and cons for visibility.
Answer: I feel the thought behind this question is wrong.
Some recumbents are lower than upright bikes.
But on my recumbents my head is on the same level as road (racer) bike riders with their hands on the hoods and higher than their head when they are on the drops.
And my bike is a mid level, there are many recumbent bikes which are higher than mine.
My field of vision is very open, I can easily see all in front of me and to my sides, while they can see the ground just before or under their front wheel.
If car drivers can not see me, can they see those road bike riders? (And a valid question in the Netherlands, can they see children on their bikes?)
These days many cars are so high that even on a tall sit up and beg Dutch bike I can not look over the top of them, and nor can the drivers of other cars see over them to see me. Seeing through cars is not easy either. And ever been able to see through the corner of a building?
I have had three days in a row I stopped at a corner (where I have right of way) due to traffic approaching that corner too close to the parked cars and buildings along the road. (Better to stop when you hear a car coming.) Whatever the bike I had been on, they would not have seen me in time to stop for me.
So if someone wants to ride a bike, any bike, teach them to be seen and to be careful when they can not be seen.
But the type of bike, recumbent or sit up, is not making that much of a difference, until you get to the very low ones.
Low racers and low trikes (often the tadpoles) are below the nose of the normal cars and have to take even more care to be seen. Adjusting speed might be part of the solution. I personally do not want to ride those in traffic, but that may change when I have tried it for real. Never having used a bike that low I can not tell how cars react.
Added:
I now ride a velomobile and those are low. It helps that it is a big blob of colour, yellow in my case, and with good reflection all around. But I never feel 'unseen' where I would be seen on a higher bike, except when the green on the verges is higher than me, in which case I come to a stop at any crossing path for other traffic, including bikes.

My velomobile, a Quest, with standard sit-up bikes behind it.
Answer: I'd add that getting reflectors and a flashing tail light, along with some sort of front flasher, will increase visibility.
Comment: Some people claim flashing lights make it harder to judge distance (and they are a pain to look at if you happen to be a cyclist behind or facing them.)
Answer: Get a really high and visible safety flag.
Comment: Flags are only seen from the side and then many people will think 'child' and 'slow'. Besides, the flag may make you feel seen, giving you a false feeling of security while your flag may only be a 1 by 10 cm (1/2 by 4") line on a thinner stick from the angle of the driver. Flags are not the solution.
Answer: A recumbent has a single negative and several positives to balance.
The negative is YES you are lower, and therefore easier to be obscured by other items.  This is similar to how a low-slung sport car might be invisible beyond a larger vehicle on the roadway.
To balance that out:

Once you have been seen, then you're really hard to ignore.  There's an "autopilot" in our brains that takes over semi-autonomous functions like breathing, and after time driving.  A driver in this state will effectively "zone out" and it takes something out-of-the-ordinary to be noticed.  A recumbent is odd-enough to kick this thought up out of the lizard brain and into the higher brain, where the driver takes notice. I ride road bikes too, and there's a distinctively larger gap left when my bent is being passed by cars, vs when my road bike is being passed by cars.  This suggests the drivers are proactively acting more.
Rear vision - it is hard to see behind you while on a bent.  Turning your head isn't enough and you can't turn your shoulders easily.  So most bent riders have at least one mirror of some sort.  This increases your awareness of what's behind you much more than a road bike.   I would not ride a bent without a mirror now.
Speed - going faster means your "Time Exposed to Danger" (or "TED") is lower.  I'm more confident to "take a lane" if that's what I need to do for my own safety.
Field of Vision - being lower means things get in your way a bit more, but also the angle of the seat means you have a comfortable field vision spanning 180 degrees without even trying.  A road bike tends to aim your head down more.
This FOV contributes to general alertness, combined with the speed increase means it's really hard to zone out.  You're almost always paying good attention.

Justifications: I've done about 20,000 km on two recumbents in the last ~4 years, around a quarter on higher-speed narrow rural roads.
SUMMARY: Yes recumbents are different to a regular, taller bike.  Better in some ways, and worse in others.


Why does Ricardian Equivalence not hold when there are different borrowing and lending rates on the market?

Question: If you can propose any explanation (intuitive, graphical or algebraic), I will appreciate it
Comment: Can you give some more details so we can best help you? E.g. how do you understand Ricardian Equivalence and what are your own thoughts on the possible answer?
Comment: Ricardian equivalence fails for a much more simple reason -- people are not machines.
Answer: In Ricardo–de Viti–Barro equivalence, when taxes are too low to support current expenditures, they expect taxes to rise in the future and that the NPV of the future taxes exactly equal the amount by which taxes are lower today. Therefore, they save their reduced taxes in government bonds (reinvesting all proceeds) to ensure they have exactly the right amount of money to meet future tax burdens. In turn, the government, borrower the money with government bonds to meet the tax shortfall. However, if the rate at which the household can save is lower than the interest rate that the government borrows at, this does not work. They have to set aside an amount greater than their tax savings to pay future taxes, and then the household is no longer indifferent between taxes now and taxes later.
Answer: Barro helped define Ricardian equivalence, wherein one of the assumptions was that the capital market is perfect(can lend and borrow at a single rate).
so it can be easily inferred that Ricardian equivalence does not hold true when borrowing and lending rates are different.
and while it is assumed under Ricardian equivalence that consumers are able to save/ spend according to tax regimes, it is debatable, as was mentioned by Ricardo himself, that people may have a myopic approach towards tax regimes.
although it holds credibility in some specific examples, the discounting of one of its basic assumptions can be the reason for it not holding true when borrowing and lending rates are different.
it would be more helpful if you could elaborate on the type of examples/statements you want to support your answer.
Answer: The financial gain isn't fit for purpose in an operational sense; I say debt is constitutional before deflation, yet complementary layoff are still deflation when accounting for whole life as pricing axis.

By a system of finance I do not mean the finances of the Crown, which consist in distributing among the citizens and utilizing those charges that are indispensable for the maintenance of the Crown and the state with the greatest security, the least confusion and the most equitable sharing of the burden, but the finances of the country, which should be carefully distinguished from the former and consist in the manner of establishing the coinage of the realm on such a footing as will best promote security and enterprise in all productive occupations, from which the country as a whole and each individual subject derive their proper increase and strength. [Anders (Antti) Chydenius, A Remedy for the Country, 1766]


Solutions to a quadratic diophantine modular equation

Question: I wonder if solutions are known for this quadratic diophantine modular equation:
x²=y² mod (p1 p2)
where p1,p2 are given primes and x,y are integers and unknowns?
Answer: We assume that the $p_i$ are distinct, and deal with the case the $p_i$ are odd. The argument for the case one of the primes, say $p_1$, is $2$ is essentially the same.
We are told that $p_1p_2$ divides $(x-y)(x+y)$. Perhaps (i) $p_1p_2$ divides $x-y$. That gives the solution $x\equiv y\pmod{p_1p_2}$. Or perhaps (ii) $p_1p_2$ divides $x+y$. That gives the solution $x\equiv -y\pmod{p_1p_2}$.
Or perhaps (iii) $p_1$ divides
$x-y$ and $p_2$ divides $x+y$, or perhaps (iv) $p_1$ divides $x+y$ and $p_2$ divides $x-y$.
For case (iii) we have $x\equiv y\pmod{p_1}$ and $x\equiv -y\pmod{p_2}$. So $y=x+tp_1$ for some $t$, and $x+y=2x+tp_1\equiv 0\pmod{p_2}$.  Let $x$ be arbitrary in the interval $[0.p_1p_2-1]$, and solve the linear congruence  $tp_1\equiv -2x\pmod{p_2}$.


How cut circle paths using shapes in Inkscape?

Question: How can I split all the black circles shapes using the greens ones ?  I want to get this result, but I cannot find the good tool using boolean operations.
Answer: Numerous possibilities!
Visually right appearance can be got by simply adding separate background colored shapes on the circles. Or as well you can group the green shapes and use it as inverse clipping mask:

The green circles in the left are a group which is lifted to the foreground in the layering order. The black circles are another group.
Both groups are selected and Object > Clip > Set inverse clip is applied. It causes no harm that the green circles have half-transparent fill color.
These methods are visually OK, but the full black circles are still there, they are only made invisible on the screen. The methods are useless for engraving machines which expect simple paths and nothing invisible. The existence of invisible parts is no harm if the image is only watched on the screen or it will be printed or converted to a raster image; for ex. to PNG.
Another possibility is to combine the green circles to one path by applying Path > Combine. Then each black circle should be converted to strokeless filled areas By applying to each of them Path > Stroke to path. The resulted  black rings should be united (Path > Union) and the combined green shape should be subtracted from the black union.
The result again looks right, but the black shapes are not curves, they are a complex filled shape. It also is useless if single stroke simple curves are a must.
You get simple single stroke curves (as user Billy Kerr has six hours later written, too) if you combine the black circles to one by applying Path > Combine and then combine the green circles. Use the combined green shape to split the black circles by applying Path > Cut Path. The unwanted pieces must be deleted manually, but that's easy if you have a spare copy of the green circles below.
In this phase people probably think "how to select (for deletion) the unwanted pieces as a single selection by using the spare green shapes as a selection mask". That problem has appeared several times in this site, but generally valid methods have not appeared for "selection by touching by another shape", no matter how useful it would be.
Comment: Thank you fir the detailed answer !
Answer: If you first combine the black circles, then combine the green circles, you could then do a boolean Cut operation which will cut the black paths at the intersections with the green circles.
An extra trick: if you copy the combined green circles before doing the boolean Cut operation, you can then Paste in Place, send to the bottom of the stack to use as a guide, then simply delete the black segments which overlie the green circles. Finally delete the green circles.
An example of the process

Another more manual method is also possible. Simply add nodes, select the segment,  and use the Delete Segment button.
An example
Comment: @Jean Yeah, boolean operations only work on two objects (two paths, or two combined paths).  Groups are not combined paths.
Comment: Thank you fir the detailed answer ! My problem as you pointed out was that the two groups were not combined before the operation.


InDesign: which export settings for printing an A5 booklet

Question: Getting a 48-page booklet professionally printed. The printing company states we should export as PDF (x1 a 2001) with fonts converted to outlines, but is that necessary? Also should it be exported in pages or spreads?
Comment: If the printer says its required, I'd say yes it's necessary if you want them to print it. These are really questions you should be asking your printer.
Answer: Normally you should export this as single pages (not spreads). As for the other export settings, you should use your printing company's requirements.
As a general rule, its not always necessary to convert the fonts to outlines, nor is it necessary to use the 'x1 a 2001' standard. Most printers can handle any kind of high res export, but if they do make specific requirements, you should follow these to make sure they wont have any problems.
I do admit however that converting a 48-page document to outlines is a bit unusual, but they must have their reasons.