Getting back on the bike after bad fall, how do I get over my fear?

Question: On Nov of last year I had a bad stupid crash that broke 2 of my front teeth and left one loose. I was descending from a very rocky steep hill and my wheel got locked, threw me off my bike straight to a rock. My bf said it was bc I wasn't going fast enough to keep momentum. Anyways, make long story short I am terrified. I've been road biking with clipless pedals to build confidence but I just can't seem to have it when it comes to mtn biking,any advice on how to get rid of this fear and nervous feeling?
Comment: Critical question:  Were you mountain biking because you enjoyed it or because your BF wanted you to?
Comment: If you are mountain biking with clipless pedals as well you might want to give flat pedals a shot. One less problem/mechanism/technique to worry about when riding.
Comment: The duplicate question is recommended reading - it has good answers.
Answer: Up front, I must say I'm not a mountain biker.
But I have had some big road crashes, and done a fair bit of off-piste downhill skiing. I understand the fear you describe. Let's analyze what you've told us. Understanding the cause and learning is the key to going beyond. Like when I broke a leg ski racing - I got over-confident and over-rotated into the tightest steepest gate, caught the outside edge, and with a sound like a gun-shot my tibia exploded. The point is - I learned the cause, and learned to ski better.
You say "a stupid bad crash ... my wheel got locked". Translation: "I was riding beyond my skill (and maybe equipment) level and got found out".
How to get back? Firstly, learn from it. What skills did you need right then that you could not call up right when you needed them? I already said I'm not a MTBer, but I have a few suggestions

Concentration - did you loose concentration at just the wrong time? One skill to learn is "switch on". Approaching a tight bend - switch on! Approaching a steep descent - switch on! You get the idea - switch to full alertness and concentration.
Steep downhill - revise all you've learned about the basics of downhill, and practice starting back with really gentle, safe descents. Relearn those skills, doing it again and again. Gradually working up to steeper and steeper hills, with a variety of trails and surfaces.
Reframe - you say you're terrified. Think of it as respect. You've learned a whole new respect for steep hills, and rocks.
Be positive - you only broke a few teeth. It could have been worse. Perhaps you'll wear a full helmet next time you go someplace like that.
Your road skills have nothing to with the crash. It's great that you're riding at all, but you crashed doing downhill; they are the skills you need to revise.

Don't expect or force yourself to ride beyond your skills and new found level of respect. And don't let anyone pressure you either. The key is confidence. Not over confidence. Without confidence, like me skiing a steep slope, you are certain to crash. But with well-founded confidence in our skills we can do much better.
Answer: If you truly want to start mountain biking again, start small and with easy rides that could help you regain confidence and enjoy the ride without too much stress or worry. A good choice would be a flattish trail with a good surface that doesn't require much technical skill. As you start feeling more confident again, increase the difficulty. And as the previous answer, introspection and addressing skills that you need to develop is critical.
If you find that you don't enjoy it at all anymore, don't push yourself.


Why is there a vii˚6 of III but no vii˚ of III in the minor mode?

Question: When tonicizing the mediant chord in the minor mode, you often use VII which acts as a secondary dominant of III and is very useful in tonicizing III if you are in the minor mode. Another option is to use vii˚6 of III which is the ii˚6 chord built on ^4. This would be vii˚6 of III. I can't really seem to find anything about the vii˚ of III. Is this a common chord to tonicize III or would you normally use a vii˚7 chord for this? I haven't learned vii˚7 chords yet but from what I understand, these are a direct replacement for V65 and would be built on the leading tone of the chord you are trying to tonicize.
Comment: Are you asking about how it would be labeled in Roman numerals, or are you saying you have not seen the chord in real scores?
Comment: 1) This has the feel of something you read in a book, in which case it would be helpful to have the specific quotation. 2) It also begs the question: is viio -> i common in minor? I don't recall root-position vii (diminished) chords being used much at cadences.
Comment: Actually, my understand is root position `viio` is not usually found in major, but fairly normal in minor. And my sense is I see that born out in real scores.
Comment: an example of root position viio in minor, that comes to mind immediately isn't the best: Bach, 2 part invention in Dm. not the best because it isn't "chords" or Alberti bass figuration.
Comment: @MichaelCurtis I don't find any root position diminished triads at cadences. There are some root position diminished sevenths, but they aren't at cadences, rather they lead to i6 chords. Where do you find the triads?
Comment: OK, but why restrict to cadences only? That isn't the question.
Answer: I have not tried a survey of scores on this particular point, so this is a bit of guessing. You might not see analysis of, for example Am: viio/III III, because it might get labeled as a modulation C: viio I. Regardless of the inversion, I'm saying it might simply be analyzed in the relative major.


Can a document with a confidentially clause be submitted to a court even if it wasn't subpoenaed?

Question: If two parties make a contract that contains a confidentiality clause, if one party breaches it can the other still enforce the contract in court?
For example a dispute arises between Party A and Party B. A settlement is reached where Party A agrees to Pay party B some amount of money. The settlement is written and signed. The contract also contains the term "the terms of the agreement are confidential and cannot be disclosed except as required by law." Can party B still start legal action and submit the contract to the court without being in breach of the confidentiality? Can/must/should the full contract be submitted, or only the pertinent parts like the actual terms that were breached? Assume there is no clauses about arbitration or choice of venue.
Answer: Yes, if it's relevant
A private contract does not, in any way, constrain the government. So, if the terms of the contract (or any other document) are relevant, they can be introduced into evidence.


How to mark a lacquered surface

Question: A cabinet door is stained dark and has a clear coat on it. How can I mark it? I want to mark locations for pre-drilling and I find magic markers or various usual writing tools not that good at marking the surface.
Comment: Why not simply scribe your locations with a sharp tool?
Comment: @Huesmann  That is an option if you are sure. If you find yourself making mistakes and changing your mind then all the scratch marks become confusing.  With me trying to drill hinges for fresh cabinet doors as a newbie the masking tape was good. Just don't forget to remove the tape!
Answer: Get some painter's tape or masking tape and apply it to the cabinet. Then make your marks on the tape for your predrilling.
Comment: A white grease pencil might also work, but will tend to get caught in any scratches and isn't a very precise indicator.
Answer: Milwaukee INKZALL. Or any oil-based marker. Buy a few. Once you try them, you'll find uses everywhere.

How to mark a lacquered surface


Get Views object from entity template

Question: I have a Views, that renders nodes as "Rendered entity" with custom display mode - "cover". In template (or preprocess function) for this specific theming case, I need to get the Views object, that calls this render process, especially its arguments. How can I do this?
Comment: Have you tried using the devel module to print out the variables available to your template to see if the view is in there?
Comment: yes, but there no information about views
Answer: The "Rendered entity" row type comes from the Entity API module.
When using the node view row type the views module adds the view object to the node in views_plugin_row_node_view::render(), however the entity module doesn't do anything similar for its row type, so there is no easy way to get the view object when themeing the entity.
If your view is using a page display you can use views_get_page_view() but this doesn't work with other display types, like block views for example.
Note that there is a feature request for the entity module to add the view object to the entity but it is still in development and the module maintainer wants to use a different approach.
So you could use that patch and then when a newer patch comes along you will likely need to make some minor tweaks to your custom themeing code, or you could make a new version of that patch as per the maintainers comments and then use that and possibly avoid having to change your custom code in future.
If you are comfortable updating the patch I would recommend that approach, otherwise I would recommend using the current patch and updating your custom code in future.

Get Views object from entity template


How do I remove teak oil from a granite kitchen counter top?

Question: I mistakenly rubbed teak oil on my granite counter top. How do I remove it without damaging it? Thanks!
Answer: Definitely acetone. You can buy acetone at any hardware store. Get an ace bandage and soak the acetone in a bowl in the sink. Do not ring it out, and place it over the stain spreading it out to completely cover the stain. Pull saran wrap over the gauze with plenty extra to secure the gauze so the acetone will not evaporate. Leave it on for a couple days. Easy and it works. You can use anything that absorbs from gauze to a old cotton shirt. Acetone will evaporate fast so that is why you cover it with the saran.
Answer: Acetone seems to be what many people recommend.


Film where the government was corrupt with aliens, people sent to kill aliens are given rigged visors not showing the right targets

Question: I remember a film where the government was corrupt with aliens, people were sent out to kill these said aliens with visors which would show an alien if there was a green heart present, however these visors were rigged and were the opposite.
Comment: Welcome to Science Fiction & Fantasy! This question would be improved by going through the checklists here; [How to ask a good story-ID question?](https://scifi.meta.stackexchange.com/questions/9335/how-to-ask-a-good-story-id-question)
Comment: see also https://scifi.stackexchange.com/questions/202076/science-fiction-book-series-about-aliens-that-look-exactly-like-humans-protagon (about the novel on which the film was based)
Answer: The 5th Wave (2016)?
From IMDb:

When Earth is attacked by aliens, there is a sequence of waves of destruction to annihilate the population. The aliens drain the energy and create diseases and natural disasters. The teenager Cassie Sullivan moves with her family to the countryside, but when her mother Lisa dies, her father Oliver decides to go to a refugee camp with Cassie and her young brother Sam. Out of the blue, the army comes to the camp to transfer the survivors to a military base. They transfer the children first but Cassie misses the bus where Sam is. She learns that the in the 5th wave, the aliens have assumed the human form and she witnesses the military executing the civilians in the camp including her father. She flees and now she begins her quest to find Sam. Meanwhile the teenagers and children are trained by the military to fight the enemy. But how to know who is human and who is alien?

At some point, the kids under military training are given visors that supposedly show the "aliens", with a green thingy in their brain (which looks like an insect, not a heart). It's revealed that

 the visors are rigged so that the humans show up as aliens, meaning the kids are the new "wave" of human extermination.

Scene is pictured below:
Comment: A similar concept has been used in `BlackMirror` episode [`Man Against Fire`](https://en.wikipedia.org/wiki/Men_Against_Fire).


Gas to propane conversion in old stove

Question: How do I go about converting this antique gas stove to run on propane? Is it possible?
Comment: You should be reeeeally careful about doing this; get the air/fuel mix wrong and you might end up making a handy dandy carbon monoxide generator.
Answer: Depending on how the gas valve or the burners are designed it may be possible to convert to propane fuel. Most conversions are as simple as changing the burner orifices. The orifice is the component that has a miniscule opening that emits the gas just before it ignites. The size of the orifice opening is dependent on the gas being used and how many Btu's are required. Natural gas will have a different sized orifice than propane. One Should not be used with the other.  Look around the gas lines for a small spud like this orifice spud. Some spuds come with no openings and can be drilled to a custom opening.

Gas to propane conversion in old stove


How do I align properly for border prints?

Question: I know it will never be perfect but is there a standard method for aligning a print head so when I want to print with a border it's as squared up as possible? I use an Epson R2880. For example if I turn off expansion and add some margins I get a nice white border but its slightly uneven. I could do it by guessing and tweaking margins but I'm not sure it will translate to larger prints. Basically I want to know if there is an easier way than eyeballing it?
Comment: So are you only adding the border by increasing margins? Do you have a border in the image as well? Normally I print borderless, but if I print a 4x6 with a border for example, I would add a 1/4" border into Lightroom before sending it to the printer.
Comment: Yea that's what im doing but the print alignment is slightly off. I assume partly due to that fact the paper does not go in exactly the same each time but the skew seems wide, maybe 5mm. Its enough that it bothers me and I'm wondering if anyone else has the same problem or its just how it goes. Eyeball it and get it close.
Answer: From what you've said, the margins are never consistent, which implies that the paper handling isn't working quite right -- whether that's due to a guide not being pushed flush against the paper, or a fault with the device is impossible to say with certainty without physical access to the printer.
Had it been a systematic error, then you can always measure (if it's always off by half a millimetre or so), and take this into account when setting the margins.


If you could zero out your momentum, could you travel faster than the speed of light

Question: I figure I'm going to get ridiculed for this question, and maybe deservedly so. The sensor images and eyewitness accounts from the Naval Aviators released last year of unexplained aerial phenomena support a claim that the craft maneuvered in a way that 'defied physics.' After observing the imagery it appears that 'defied physics' means that the craft can make changes in trajectory that are impossible unless they found a way to 'zero' out their momentum, and make instant changes in direction and velocity. For the sake of argument, if they could do this, could they travel faster than light?
Comment: Which step in any of the usual arguments against FTL travel do you think might become invalid under these circumstances?
Comment: This is completely non sequitur. The statement is about acceleration when changing direction and you're somehow equating high acceleration over short times to faster than light speeds.
Comment: None that I can think of.
Comment: Yes, well technically I did predict the reaction to the question accurately.
Answer: The standard physics answers are that there is no way to cancel out your momentum and no reasonable way to travel faster than light.
I would expect either that the observers are mistaken in what they saw, or there is an mundane explanation. But without better information, it is hard to say. I wouldn't take explanations such as aliens, particularly aliens with physics that contradicts known laws, seriously without some evidence that they exist. Seeing something that we cannot explain is just evidence that we don't understand what is going on. It is a far stretch to say that something impossible must be going on.
I won't ridicule you for your question - you are obviously trying to find out a sensible explanation. Nor down vote. But sorry, I don't have answers along the lines of what you have been hearing. There are good reasons to be skeptical. People have looked for ways to travel faster than light.
For example, Alcubierre drives are a theoretical way to do it. But they are really just mathematical games. They are a solution to Einstein's field equations that exhibit faster than light travel. To build one would require matter with negative mass. There is no reason to suppose such matter exists and good reasons to suppose it doesn't. Loosely, if you give me antigravity, I will give you faster than light travel.
Comment: And if you grant that momentum can be cancelled, it is a reasonable logical leap to FTL. No momentum means acceleration with no force. It would imply no energy change with speed change. Given this, it is a reasonable leap that you can make acceleration as big as you like and arrive at any speed you like. Yes, this violates various laws, but if you are not familiar with such laws, you might ask what is wrong with such reasoning.
Comment: In context of the nontechnical nature of the original statements, "cancel out momentum" may just as well mean having an engine with extremely high impulse. Not to give too much credence to nonsense, but even on the fringe this seems more like a claim that our understanding of the limits of *engineering* doesn't allow for the observed behavior rather than limits of science.
Comment: @Brick - I see your point. But I think that people who take this seriously may have heard a statement like "such a turn should be impossible because of momentum". They then say "well then something must cancel momentum." I expect they think that an advanced alien civilization must be able to make momentum go away, something like what you might see in movies. We do get a surprising number of questions that ask for explanations of special effects seen in movies. Seeing is believing. People are honestly trying to understand it.


Magento 2 How to stop particular group cron?

Question: I runned cron command, now all cron group are running. But I wanted to stop my custom group cron. Please tell me how to stop it?
Answer: You can try the below command:
bin/magento cron:remove --group ['group name']

Answer: Follow below step it's working for me
You can by running cron remove command:
php bin/magento cron:remove ----group index

It will only remove cron tasks from crontab but not the exact cron codes/files.
If you wish to run the cron jobs again, you just need to run cron run command twice:
php bin/magento cron:run
The first time run is to discover cron tasks to run and the second time — to run the tasks themselves.
The second cron run must occur on or after the scheduled_at time for every task.


I can't see my ink levels for my canon pixma ip2702 printer

Question: I have a canon pixma ip2702 inkjet printer, and cups doesn't show my ink levels, inkblot is
no longer available on the interwebs and mtink doesn't seem to support my printer, I've
checked my printer's website and none of the drivers support Linux so what do I do now?
Comment: That's the reason I bought HP this time around.  Canon make great products; shame about the terrible Linux support.  I had a Canon IP3300 previously - the driver worked well enough that it was OK, and I lifted the lid and looked at the blinkenlights to check ink levels. Now that it's dead I bought my SO a HP 1025nw laser printer and I'm impressed with the driver support and HPLIP utility.  (just a pain to get it installed and working wirelessly for my Ubuntu machine)
Answer: There is a command line tool ink  reading ink levels from a variety of printers including Canon printers using libinklevel5.

List of supported printers.

Unfortunately the graphical tool inkblot  to display ink levels is deprecated and available for 10.04 only.
Answer: After doing some serious digging I have found the solution to this for Canon Printers.  Mine is an MP495 but these two command are worth documenting.

cngpig -P
cngpigmonmp495 **This one gives me my ink levels***  It is installed in the /usr/bin directory.
Answer: some Canon printers can't show ink levels because they only have two cartridges.


Check if a user is logged into my WordPress site which is on a different server

Question: If I have a file example.php which loads WordPress and checks if a user is logged in to my WordPress site:
// Load WP
require_once(dirname(__FILE__) . '/wp-load.php' );

// Check if user is logged in and output a test message
if (is_user_logged_in()) {
    echo 'User is logged in';

} else {
    echo 'User is not logged in';
}

How can I run this file from another website which is on a different server to my WordPress site? As I want to check if the current user viewing website A is logged in to my WordPress website on website B.
It's possible to do it with an ajax request with jsonp, but is there a non JS solution to this?
It won't work with cURL because I don't think it's possible to check if the user is logged in using cURL.
PHP docs states that include() and require() can have external URLs if allow_url_include is set to 1 in php.ini, but I've read there are security concerns to this.
Any help appreciated.
Answer: I think the best way for you is to share and check wordpress login cookie.
Check wordpress_logged_in_[hash] from your remote server


Return parameters/results from a job(triggered by pipeline) back to the same pipeline

Question: Jenkins pipeline: I have a pipeline p1 that triggers a job j1 and then job j2. I want some parameters that are set by j1 and passed to j2 in pipeline p1. How do I implement this functionality using Jenkins pipeline plugin? Thanks in advance
Comment: How do you trigger them? Could you share some code?
Answer: It can be done using "env". If you manage to make j1 add its information into the build's env.
If j1 was a pipeline you could to env.MYKEY=MYVALUE.
For a freestyle-job it should work using the EnvInject plugin (didn't try).
In p1 then you will get a map with that information if you out of the build result.
So, if you do in p1 something line this:
// somewhere in your pipeline, i.e. p1:
def j1BuildResult = build job: 'J1'
def j1EnvVariables = j1BuildResult.getBuildVariables();

then j1EnvVariables will be a map containing the variables you set in j1.
PS: how to pass that info to as parameters p2 is e.g. covered here.
Comment: "If you manage to make j1 add its information into the build's env". Using declarative pipeline, I struggled with `environment {}` section but it doesn't work. What works is to include `script {env.MYKEY=MYVALUE}` within `steps`
Comment: It generates an exception for me: org.kohsuke.stapler.NoStaplerConstructorException: There's no @DataBoundConstructor on any constructor of class java.lang.String
Any idea to fix
Comment: I tried with ` EnvInject plugin` and it does not work.
Comment: Works perfectly in a pipeline. Set `env.foo=bar` in a `node{}` block, and then `echo env.foo` works anywhere afterwards in the pipeline. Thanks!
Comment: @A.Richard You're right. It works for me too. Thanks! By the way, I found an open JIRA for it's not work in `environment{}`: https://issues.jenkins-ci.org/browse/JENKINS-59990
Comment: does this work if the build being called is UNSTABLE or failure? doesn't seem like the 2nd line is excuted in those cases
Answer: I had a similar issue. I had to do it by having the jobs J1, J2 create properties files then acquire those files using "Copy Artifact" in the main pipeline P1. Then convert the properties into Java properties (which may require some script approval in Jenkins). It would be nice if the Jenkins Pipeline could return parameters directly in code (perhaps there is away to do this, but I don't know it). The return from a build step is a RunWrapper, it does not seem to have a way to return a custom result that I can see (unless we used some existing property like build description).
So I had something like this:
// Pipeline code in P1

// Build J1 and get result.
def j1BuildResult = build job: 'J1', parameters: [string(name: 'J1_PROP', value: 'FOO')], propagate: true, wait: true

// Get results of J1
step([$class              : 'CopyArtifact', filter: 'j1-result.properties',
      fingerprintArtifacts: true,
      flatten             : true,
      projectName         : 'J1',
      selector            : [$class     : 'SpecificBuildSelector', buildNumber: buildResult.getNumber().toString()]])

// Load J1 properties (you may need to turn off sandbox or approve this in Jenkins)
Properties j1Props = new Properties()
j1Props.load(new StringReader(readFile('j1-result.properties')))

// Build J2
def j2BuildResult = build job: 'J2', parameters: [string(name: 'J2_PROP', value: j1Props.someProperty)], propagate: true, wait: true

// Get results of J2
step([$class              : 'CopyArtifact', filter: 'j2-result.properties',
      fingerprintArtifacts: true,
      flatten             : true,
      projectName         : 'J2',
      selector            : [$class     : 'SpecificBuildSelector', buildNumber: buildResult.getNumber().toString()]])

// Load J2 properties (you may need to turn off sandbox or approve this in Jenkins)
Properties j2Props = new Properties()
j1Props.load(new StringReader(readFile('j2-result.properties')))

Comment: I did very similar but using JSON. The built-in readJSON/writeJSON steps don't require any approvals.
Answer: You can get the result of the build pipeline by
def myjob=build job: 'testy', propagate: true, wait: true, parameters: [string(name: 'ENV', value: 'jamshaid'), string(name: 'Repo', value: 'khalid')]
echo "${myjob.getResult()}"

Comment: For those like me using this solution, remember to wrap it in `script { }` if you are using a declarative pipeline
Answer: You can get build parameters together with environment variables using
def buildProperties = runWrapper.rawBuild.getEnvironment()

It is a groovy map. Target parameters can be received with
String someProperty = buildProperties.someProperty

Restrictions: need to allow method hudson.model.Run getEnvironment in "In-process Script Approval" and call this code inside node closure (because of rawBuild).
I've also tried runWrapper.rawBuild.getAction(ParametersAction.class) but it requires to many imports into Jenkinsfile.
Note: runWrapper.getBuildVariables() returns nothing for me.
Answer: My first answer is not exactly an answer to your question, however I was trying to do something similar, but all I needed was a 'yes/no' answer to a question.
My second answer MIGHT help you, or others, as it would work...
First answer: Run a sub job that 'fail's for a 'no' answer, and 'succeed's for a 'yes' answer.
Just be sure to set 'propagate: false' in your job run.  Here's a cut and paste:
            def getos = build job: 'internal_is_host_running_linux',
                parameters: [[$class: 'StringParameterValue',
                  name:'HOST',value: HOST]],propagate: false,wait:true
            def linuxTest = getos.getResult()
            if (linuxTest != "SUCCESS") {
                     // NOT success, meaning NOT booted Linux

I'm sure there's 100 better ways to do this, but this works.
Second answer that might work would be to get the console output of the sub job and search it for the data you want.
Here's how to get the console output from the subjob, at least this worked for me:
            def job = build job: 'internal_run_remote_command',
               wait: true, propagate: false,
               parameters: [[$class: 'StringParameterValue',
                      name: 'HOST', value: HOST],
                 [$class: 'StringParameterValue',
                      name: 'stageos', value: stageos]]
            // put the standard output from the subjob into our output:
            def checklog2 = job.rawBuild.log
            // obviously, if you don't want the output in your console, do not println
            println checklog2

Obviously instead of 'println checklog2' you can search it for whatever stuff you want. This is an exercise left for the reader ;-)
(Again, there are probably 100 better ways to do this, but this worked for me)
My environment: using pipelines exclusively.  Master host must be running the pipeline script, but every once in a while needs to run something on another host, but remain on the master host, so sub jobs seem to be the way to go for me so far.
Answer: The only thing that worked for me in a master pipeline (where I would trigger multiple builds and fetch their variables to trigger other test jobs from the master pipeline) was to use the post step of the pipeline as follows:
End of child job (after the stages section):
 post
 {
    success
    {
        script
        {
            env.BUILD_VARIABLE = "FOO"
        }
    }
 }

And in the parent job I used:
script
{
    buildResults = build job : "Build_Pipeline",
                   parameters : [
                        string( name: "BUILD_BRANCH", value: "master" )
                   ],
                   wait: true

    // Print the env variable set in the child job
    println(buildResults.getBuildVariables()["BUILD_VARIABLE "])
}

Answer: This can help:
https://javadoc.jenkins.io/plugin/workflow-support/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapper.html
From the documentation:
getBuildVariables
public Map<String,String> getBuildVariables()

throws AbortException
Get environment variables defined in the build. This does not report build parameters for parameterised builds, only the build environment. If a child job is a Pipeline job (WorkflowRun), any variables set during script execution are captured and reported.
Throws:
AbortException
Comment: Worked for me with *Jenkins 2.426.2*, and the syntax: `def result = build job: 'folder/jobName', wait: true, propagate: false; def resultBuildVariables = result.getBuildVariables(); echo "resultBuildVariables = ${resultBuildVariables}";`
Answer: After searching a lot, came across this plugin : https://plugins.jenkins.io/environment-script/
This allows you to set the environment variables using the output of scripts.
I use it like this :
Usage of the plugin
The script should ultimately do
echo VAR_NAME_1=VAR_VALUE1 echo VAR_NAME_2=VAR_VALUE2
Remember to redirect any other stdout to /dev/null
You can access the variables back in the pipeline how the top answer describes
Comment: As it's currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer).


Can wiping a disk writing zeros on an encrypted device be a weak point?

Question: Can cryptsetup suggestion of wiping a disk before encryption with zeros written to an encryted device as described in question 2.19 as the recommended method on the CryptsetupFAQ (the part that starts with "For device set-up, do the following:" (which ends writing the encrypted random looking represantation of zeros) be a weak point as an attacker, knowing that the device is encrypted with LUKS, could suppose that the end of the disk is just zeros. With this information could he more easily find the key used on the initial wipping and, with this info, isolate the part of the disk that actually has relevant encrypted information?
Comment: @Rsevero The fundamental issue you bring up is that what you believe to be zero is not zero on the media.  If you have an encrypted volume, it has a master key that will be used to encrypt the stream onto the media.  Therefore, `cat /dev/zero > /dev/mapper/to_be_wiped` is actually not placing a bitstream of zero onto the media. Depending on the block mode, and other settings, you could get enough information for tell where the volume started, stopped, and possibly the key.  I think that the documentation is also fragmented.
Comment: It doesn't suggest to wipe as 0. `The conventional recommendation if you want to not just do a zero-wipe is to use something like`
Comment: I still don't see the encryption of zero. It takes input from /dev/urandom
Comment: At the first paragraph of 2.19, they say "the conventional recommendation" is to use /dev/urandom but on the third paragraph they say "For device set-up, do the following:" `cat /dev/zero > /dev/mapper/to_be_wiped`
Comment: @bdegnan There is no block mode where that would give away the key.
Comment: @forest  The problem of quickly pulling a small amount of data is the bane of my existence, and scorn.  (https://crypto.stackexchange.com/questions/42600/ecb-vs-cbc-ive-seen-the-pictures-but-whats-the-actual-strength-difference)  Hardware encryption is ECB as you want random access, and surprisingly software volumes in "performance mode" seem to use it as well.   The greatest argument against it by this board is always "I could get your key".    This means that the behavior of this board, combined with your statement, creates a bit of a paradox.
Comment: @bdegnan But LUKS is software encryption. And even if you do use ECB, it won't give away the key.
Answer: The output of an encrypted stream of zeros is absolutely indistinguishable from random data.
What you do is not write zeros to the block device for the drive, but for the encrypted mapping. That is, instead of writing zeros to /dev/sdx, you write to /dev/mapper/sdx_crypt. This results in the contents on the actual drive being completely randomized. Even though an attacker may know that zeros were encrypted, they would be no closer to finding the key than before. If they were, it would mean the underlying cipher is vulnerable to a known plaintext attack, and none of the supported LUKS ciphers (AES, Twofish, Serpent, etc.) are. In fact, any symmetric cipher that was badly vulnerable to a known plaintext attack would be considered fatally broken, and would be either revised or discarded.
To prove a point, you can see that many high-quality cryptographic random number generators work by encrypting a counter with a block cipher. An attacker knows exactly what was encrypted by the block cipher. They know that the nth block of output is an encryption of integer n itself, yet it doesn't make it possible for them to predict any of the output or retrieve the key. Ciphers are stronger than you think.
Comment: I was wondering about a "known plaintext attack (it's great to know the proper name of things ;) . Thanks for the clear answer.


Was Alexis Polux Chapter Master for longer than Dante?

Question: Polux is said (on Lexicanum and 40k wiki admittedly) to have served for eight centuries as Chapter Master of the Crimson Fists. Although Dante is probably older at 1300+ years, I don't know who has served in the post longer.
How long has Dante been Chapter Master?
Answer: TL;DR:

Polux (800 years) < Dante (1100 years)

I assume you are referring to Dante of the Blood Angels. If that is the case this answer is according to Lexicanum on their respective profile pages.
Polux - Polux died eight centuries after the foundation of the Crimson Fists, during a battle for an unnamed system, codified as HR8518. (Taken from the second to last paragraph just before the miniature picture, No source is present)
Dante -  Commander Dante is one of the most experienced and able Space Marine commanders. In no small part, this is due to the longevity of the Blood Angels, which he has ruled for 1,100 years. (Taken from the first paragraph, Sourced from Blood Angels 3rd Codex)
Though there is also a quote on his page that says "For eleven hundred years, I have fought..." This would tell me he has been a battle-brother for that time and less time as the Chapter Master. Dante was made the Chapter Master after the Kallius Insurrection but that I can only find happened in M40. However, Dante is still alive and kicking, and we are officially over 100 years into M42 now without word he has fallen. I give him the benefit of the doubt...
Comment: I suppose what isn't taken into account is how long Polux was 'Chapter Master' of his company in the IF itself. I know it's not quite the same comparison but might bump Polux up a bit more.
Comment: With the Imperial Fists Polux was just a captain; true that the legion sizes were typically significantly larger than the chapters and it is likely that the company sizes were in turn larger as well, but a captain is still just a captain.


Restored DB to Dev and test environments, now user can not login

Question: I took a backup of our production database and restored it to both the test and development environments last night, but this morning a single user is not able to login to the test/dev DBs. I can go into SSMS and connect to SQL Server with the user but when I try to connect to the specific databases I am given a 4064 login failed error. The credentials should be correct as I can turn around and login to production and run queries with no issues. I have compared both permissions sets and did not see any difference between prod and dev/test. They both have "connect" permission to the database schema and they are both part of the "db_reader" and "db_executor" groups. What might I be over looking in the test/dev system that is preventing this user from connected to the Database?
Answer: Have you tried running EXEC sp_change_users_login @action='Report'; to see if they are orphaned for that database?
If there is a result, you can run with the Auto_Fix option to remap the user.
Comment: remember that `sp_change_users_login` is deprecated . Instead `alter user user_name with login_name` is a recommended way.
Answer: What is going on is there are two places userIDs live.  One inside the user database and the other in master.  When you restore to test from production, the link between the userID in the user database and the userID in master is broken.  The link is called a Security ID (SID).  Run the below script in the database that was restored and it will automatically fix all broken SIDs in that one database.
declare @counter int
declare @lastuser int
declare @sysuser varchar(100)
declare @execvariable varchar(200)

set @counter=3

select top 1 @lastuser=uid from sysusers where uid <16000 order by uid desc

while @counter <= @lastuser
begin
select  @sysuser=name from sys.sysusers where uid=@counter
            if  exists(select name from master.sys.syslogins where name=@sysuser)
            begin
            exec sp_change_users_login 'auto_fix', @sysuser
            end
            else begin
            print 'The user '+@sysuser+' does not exist in the master.syslogins table'
            end
set @counter=@counter+1
end


Why do the 5 lions form Voltron in deep space?

Question: In every season of Voltron, 5 lions together form Voltron. My question is: why do they always go to deep space to form Voltron? Can't they form Voltron on the planet's surface?
Answer: The possible reason may be: to have a momentary escape from the enemy and to avoid being attacked during the formation process as the lions become vulnerable during that time and it takes a lot of time to form into Voltron.
Answer: Because the lions when they combine there uniqueness together , the space gravity enhances the coneection power , and because its freezing in  space it adds solidness of strength of the voltronic ultra robotic fierceness, if they formed together on the planets surface it will fall apart because the law of gravity would be in effect , and in space they float and the laws of gravity is ineffective in space.


Monte Carlo update based on sub-lattices

Question: I would like to simulate a 2D classical spin system, whose interactions are only nearest neighbor, using Monte Carlo.  I would like to use Metropolis for updating.  I have seen that when updating one can choose a lattice site at random, or update sequentially.  I was wondering if it is possible to update part of the lattice simultaneously by considering only a sub-lattice.  For instance, let the lattice be $L \times L$ with $L$ even. Indexing from zero, call every site whose sum of their $x$ and $y$ coordinates is odd part of sub-lattice $A$, and every other site sub-lattice $B$.  Is it acceptable to compute probabilities of spin acceptances for all of $A$ simultaneously and then implement those spin changes simultaneously?  Then subsequently for $B$?
Answer: There is a large amount of literature on the kind of moves and updates you can do in MCMC methods for spin systems. I would start by reading some of the recent papers of Helmut Katzgraber and the references he has.
Comment: I'll be sure to check them out, but could you provide an answer in your answer, like "yes because..." or "no because..."  If you don't know, maybe this should just be a comment, not an answer...
Comment: Well, the answer is complicated. You can come up with many ways to define moves in MCMC schemes. Almost all of them are valid in some way or other in that they make the scheme converge if you allow sufficiently many iterations. The question simply is whether they make the scheme converge *faster* than the trivial single-spin-flip move. And that is often a matter of experimentation, rather than theory, so it doesn't have a clear yes/no answer.


limit of floor function

Question: I can solve the question limit of function like
$$
\lim\limits_{x\to\infty}\frac{\lfloor x-3\rfloor}{x-1}
$$
but I cant solve the question like
$$
\lim\limits_{x\to n^\pm}\frac{\lfloor x-1\rfloor}{x-1}\\
\lim\limits_{x\to n^\pm}\frac{\lfloor x\rfloor}{x-1}
$$
Please help me.
Answer: I am assuming that these are the questions your are asking and that $n$ is an integer.
As $x$ approaches $n$ from below, $\lfloor x-1\rfloor=n-2$; therefore,
$$
\lim_{\large x\to n^-}\frac{\lfloor x-1\rfloor}{x-1}=\frac{n-2}{n-1}
$$
As $x$ approaches $n$ from above, $\lfloor x-1\rfloor=n-1$; therefore,
$$
\lim_{\large x\to n^+}\frac{\lfloor x-1\rfloor}{x-1}=\frac{n-1}{n-1}
$$
With these as examples, try the others.

limit of floor function


If a function is defined by $f(x)=\arcsin(\sin(\frac{x+\sin x}{2}))~\forall x\in[0,\pi]$ then

Question:
I tried differentiating the function given but the problem is that it changes with intervals.
Answer: Taking the usual codomain of $\;\arcsin\;$ , we have that $\;\arcsin:[-1,1]\to\left[-\frac\pi2,\,\frac\pi2\right]\;$ . Now
$$x\in[0,\pi]\implies0\le\frac{x+\sin x}2\le\frac{\pi+\sin\pi}2=\frac\pi2\implies0\le\sin\left(\frac{x+\sin x}2\right)\le1$$
and thus
$$f(x):=\arcsin\sin\left(\frac{x+\sin x}2\right)=\frac{x+\sin x}2$$
Try now to take it from here.
Comment: Yup, you were right, I got the answer. I instead stick-ed to my initial approach, one thing that I did different this time was differentiating the function without defining a specific interval for x. Then, getting increase and decrease in the function, which had multiple solutions (trigonometric solutions) which easily gave out all the three answers _that too without the use of the mess given in the question_. Thanks a lot.
Comment: But what do we do in the intervals$ [\pi,2\pi]~and~[2\pi,4\pi]$ as in the interval $ [\pi,2\pi],~ f(x)=\frac{ x+sinx}{2} $ only till $x+sinx=2$ after which it would become $ f(x)=\pi-\frac{ x+sinx}{2} $ for some x.
Comment: @GauravAgarwal I can't understand that. The function is *explicitly* defined for $\;x\in[0,\pi]\;$ . What business have $\;x\in[\pi,2\pi],\,[2\pi,4\pi]\;$ I can't say...but perhaps they mean you "extend" the definition of $\;f\;$ to those intervals...That looks like a mistake to me. Perhaps the definition interval was $\;[0,4\pi]\;$ and you have to figure out what to do in separate intervals...
Comment: fiitjee? I recognise the font
Answer: Observe that for $x \in [0, \pi]$ we have that
$$f(x)=\frac{x+ \sin x}{2}.$$


Suggestions Needed For One-Time-Password Generator/Verification Software

Question: I have a project that requires the use of OTP to verify users registering to the system. They'd like to be able to collect a registrant's phone number, generate an OTP which would be sent to the phone in some manner, and have the registrant enter the OTP during registration for verification. I wonder if there is any standalone OTP package out there (commercial or open-source) that can be used to accomplish the generation and verification easily with CRUD?
The software should work preferably on Linux, in a web server, or at least be easily able to make requests against it for both generation and verification.
Some background:
The users wont interact with the system at all. I am envisioning other systems interacting with the software, which are what the users would have access to. For example a web registration system needing to verify registrants phone numbers could interact with the OTP software to produce an OTP string, and when the user sends back the OTP string to the registration system, the registration system can check with the OTP software to verify the string. The registration system should be able to send REST calls to the OTP software for all this.
Thanks for the assistance!
Answer: Twilio has a service that may be able to help called Authy


How do I supply metadata when digitizing a print, slide, and negative library?

Question: A digital camera conveniently gives a file name, has an embedded data/time stamp, has the make model of camera and (usually) lens, aperture, shuterspeed. may have copyright, GPS,
How do I add metadata to an analog collection.
Comment: As i read the question "*How do I add metadata to an analog collection*" , i understand it to mean **How do I add metadata to digital files created from *scans* of my  analog collection**. What kind of files is your scanner creating?
Answer: You have entered the twilight zone.  Reality takes a back seat.
When you shoot digitally you get a bunch of information for free:

A timestamp.  You know to within a second (assuming your camera is set to the right time) when the picture was taken.
The order that pictures were taken.
Possibly GPS location.
YOU took them (usually) so you know of the events covered.

When faced with digitizing someone else's collection, it's more difficult.  A lot of this article is about recovering some of this data from the collection.
Another part are tips to maintain a back reference to the collection.  Digital scanning has improved over the years, and will doubtless continue to improve.  In many cases you want to be able to go back to the analog image.  But to do that you have to know where to look.
I'm assuming that you are making a digital collection of images from your physical images -- prints, slides, negs.
I'm also assuming that you are doing the conversion with a digital camera. While a scanner can be used, the techniques for getting frame data are unknown to me.  A digital camera can create the archive far faster than you can do the indexing.  Scanners are much more problematic.  Doing the multiple station setup to get frame data and image data with similar time stamps is far more difficult.
The following methodology assumes that you have a good digital camera 20 megapixels or more, along with a macro lens capable of focusing to 1:1.
First of all, you need to 'frame' your images.  The following data will help establish context for your collection:
Time Stamp on slide Kodak, and at least some other processors would stamp the slide with month and year that the film was processed.  Sometimes this was an ink stamp (usual on plastic mounts) or embossed into the cardboard on cardboard mounts.
Sidenote:  The ink stamps are often alcohol soluble.
Ideas for recovering this information: If you use a digital camera for copying, set up 2 stations.

Station 1 does the actual slide copy, with a macro lens focused on the slide.  (BTW: Since slides are usually buckled, you may want to use stacked focusing for this.)
Station 2 has enough back light to see the image, but is wide enough to see the entire slide. This station has an additional light from the side at a low glancing angle to bring out the date stamp.
In addition slides have a frame number.  This is in the same order as the film roll, but may not be the same as the actual number on the film.  This can bite you when the better slides have been remounted in glass slide holders.
Verify that the cameras for both stations are using the same time to the second.  This way, you can sort by time and the station 2 image is adjacent to the station 1 image.
If you get a good flow going, you can put both cameras on "take a shot every 20 seconds" and phase them 10 seconds apart. This may not be compatible with focus stacking unless you can do a focus stack burst every 20 seconds.  Check into software for tethered shooting.

Other information from the mount
Sometimes people have written notes on the slide. Be prepared to photograph both sides.  Also: a common trick for people who put together slide shows was to band the slides in order, then run a diagonal line with a felt marker down the block.  This enabled quick restoration if a tray was fumbled. You can careful put a tick on the face of the slid corresponding to the middle of the edge mark.  Sometimes the felt marker will bleed onto the edge enough to show up without a manual tick.
Frame numbers from negatives
The same trick works with negs:  One shot or the frame, one shot backed off a bit to get the neg number.  You may be able to do the second operation a strip at a time.
Don't discard the envelopes
If your collection arrives as a bunch of shoeboxes, examine the containers carefully.  They will often have a date processed.  This is best done by circling the date with felt marker, and if faint or small, copying it. Use a fine point permanent marker. Now take a picture on your station 2 setup.
Check the envelope for notes. More meta pictures.
Don't discard the receipts
A receipt will often tell you how many rolls were processed.  This can help put the pieces together.
Construct a timeline for each box.
For prints and negs this will usually be a full date.  For slides, only a month and year.  Note that processing time is just that.  Sometimes people would collect 3-4 rolls of film over the space of a year, then process them all at once.  Or the last roll of the beach holiday wasn't used up, and shows up in January with the other Christmas pics.
So this is a tentative timeline.  Each box gets a box number.  At this point you won't know what order the boxes are.  Each container (slide box, neg bundle, print bundle.  gets a Box number and a date order.  Where you have duplicate dates, arbitrarily add a 1 letter suffix.  If the negs are with the prints, then their number is the same as the prints envelope with -neg as the suffix.  this means you can have

Box 6 1984-Jul-15a
Box 6 1984-Jul-15a-neg
Box 6 1984-Aug
Box 6 1984
Box 6 Unknown-a

Slides are often separated from their envelopes, so the only info you have is mmm-yy
Prints
You need a copy camera set up.  Dual lights 45 degrees off axis.  Ideal is a vacuum easel, but failing that, a slab of 1/4" polished plate glass (do NOT use float glass.)  1/4" thick gives you enough weight to hold the picture flat, and also for any dust specks on the top of the glass to be out of focus.
Note:  You can try putting a weight on an envelope of photos for a few days, and the images may then lie flat enough.  E.g.  For my Tamron 90 mm used on a D7100 the depth of field at f/5.6 filling a frame with a 3x5 print is about 2 cm.  I'm not going to worry about keeping the picture absolutely flat.
Ideal lights are LED lamps with a colour rendering index (CRI) of 90+  At this point I think you want daylight bulbs with a colour temperature of 5000-5500K.  Buy all your bulbs at once, as there can be batch variations.  You do not want one side of the stand to be relatively pink compared to the other.  2 or 4 lamps shining at an angle of about 45 degrees.  Aim the brightest spot of the beam at the far edge.
If you can't get daylight bulbs, get tungsten temperature bulbs, but set the camera to that temp. Auto white balance didn't work for me. Correcting it in post did odd things to the contrast and saturation.
Prints often have a roll number and a date on the back.  This roll number will be the same (usually) as the roll number on the end of the negative.  This may give you a date for the negatives.
In this case station 2, is another camera with a wider field of view of the set up.  Make a 'roll note' with the info from the envelope, and the common printed info on the back of the print.  It is taped to your table near the pictures so you get both images.  This camera only has to be good enough to be able to match the image to the roll info.
If you have negs with the prints,
whatever info you can get off the prints transfer to the glassine sleeves the negs are in.  If the negs are unsleeved, write a note that goes with the negs.  When you process that set of negs, the first shot is whatever you have gleaned from the container info.
Computer processing
Each roll becomes an album or folder.
Add the meta data you salvaged from the packaging to the folder notes, and to the meta information for all the pictures in the folder.
If you know dates, use a date based folder name.  If a folder seems to be all of an event, add the event string to the folder name.  But the original Box #-date info from the timeline is also stored.
You will probably do negs in a separate run  This is where the -neg comes in.  If you can, process the negs into a positive image, and decide which you want to keep.  Could be both.  The neg station 2 shots will allow to to put the prints in order.  Exiftool allows you to modify the dates in an image.  If you do negs as a seperate run days or months later, you may want to subtract an appropriate interval to get them to the same time.  Keeping a journal of your project with a list of what you did, when you started, when you finished may make this easier.
I thought of working tethered.  I have an older macbook with an SD slot.  The win would be not touching the camera, so less shake.  Alas, the USB connection on that computer or the software makes for about a 15 second pause between taking the picture and showing it.  This is about 5 seconds longer than it takes manually. Your mileage may vary if you have a faster computer.
The order is significant info.  Several times when reconstructing events from a bundle of pix the order was helped me do so.  If the fountain is frame 21, and frame 18 is the eiffel tower, then the fountain is the one in Paris.
Now, extract faces.  Initially you won't have a clue, so every person initially is P:ZZ-NUMBER.  (ZZ puts them all in the end of the list.)
Take your laptop with your pix when you see your parents.  Now you can ID people.  Once you know that P:ZZ-12243 is Uncle Jim, you can do globally change P:ZZ-12243 as "Jim Swenson -- according to Martha Swenson"  (TEST that you can make global changes to metadata.  You do NOT want to have to search each occurence separately.) You will get conflicts.  You need to figure your own answer to this.  My take would be to give that individual multiple labels.  Eventually you may find that Martha's facial memory is terrible.  (I'm nearly faceblind, I've discovered.)
Recap

Make a timeline.
Extract all container information you can.
Start with a picture of your timeline.
Start each roll with the roll's meta information. You can either photograph the container, or write it on a sheet of paper and photograph that.
Scan the roll.
Import the images into your library.
Cull the blanks.
Look at what you need to reshoot.
Merge information into your archive.

Edit:
Storing the information:
Facial recognition requires support from your photo management program.  This is usually created as some variation of a box with corners given in percent width and percent height.  Note that certain editing operations:  crops, rotations, flips, and perspective correction will wreck this and require that the image be reprocessed.  Your program MUST have a way to extract this information in a known format.
If your facial recognition software isn't up to the task, creating a family facebook page and getting people to ID what they can may help.  I've no idea how to get this info off of FB.
Keywords:  Almost all data formats now support keywords. Worst case you create a database (Do NOT do this with a spreadsheet for any large collection.)  The database contains the file name you gave it on your computer.
You can store any weird data (not usually stored with digital cameras) as keywords using sequences.  E.g. FACE:21/42;15/70-"Mike Swenson according to Gloria Swenson" Frame:16 FMT:Neg Arch:Box=1984a-Jul-18a.  Keyword field can have up to 64,000 bytes I think.  You can also repurpose fields, although this can bite you.
Once you have it in a database, and have a program to pull the data out for a given image, you use exiftool in a script to pull the info from the database and write it to the image, or you can do your homework, and write it as sidecar files.  (I don't know the format.  I'd have to do homework.
TEST THIS.  While ExifTool claims to be able to write metadata into most raw image formats, Phil doesn't have every camera.  Duplicate a folder of images and then check for corruption.
Once you have all the station2 data extracted you can delete these images.
Comment: Yes, but how do you store all this info _into_ the image file?
Comment: @osullic Added to answer.
Comment: Do we know if the OP's digital files (*what kind of files are they*) created by their scanner have metadata sidecar files and that they are editable?
Comment: My understanding was that OP was faced with an analog collection that he wanted to digitize.  Ultimately it doesn't matter what kind of file it produces, as long as Exiftool (in my anwer) or other software can write metadata to the file, or create an xml sidecar file.
Comment: @SherwoodBotsford "*as long as Exiftool (in my answer) or other software can write metadata to the file, or create an xml sidecar file.*"  Well that's the crux of the issue and what  i  am asking about. Do we know if the OP's  scan files can be added to?  It is a great answer but i interested in more info so when and if i scan my negs i will have the ability to add metadata.
Comment: There are very few that cannot be added to.  And exiftool can write sidecar files.
Comment: You are the OP and provided the answer so should you not include the info on what files you have created to your answer?  Who is Phil?
Comment: Phil Harvey is the author of exiftool.  All the files I've done are private collections that I don't own publication rights to,  At present files are brought in as Nikon NEF files.
Answer: You can edit exif metadata with an editor, command line, or in photo software like Adobe Lightroom. You can adjust date, camera and lens info, and even add GPS coordinates.


is f a polynomial provided that it is "partially" smooth?

Question: Let $f$ be a $C^\infty$ function on $(c,d)$ ,and
let $O=\cup_{n\in \mathbb{Z}^+} (a_n,b_n)$ where $(a_n,b_n)$  are disjoint open interval in $(c,d)$ and $O$ is dense in $(c,d)$.
Suppose for each $n\in \mathbb{Z}^+$ ,$f$ coincides with a polynomial on $(a_n,b_n)$.
Is it necessary that $f$ coincide with a polynomial on $(c,d)$?
Comment: I suspect one can build a $C^\infty(\mathbb{R})$ function supported on the unit interval, which is polynomial on each component of the complement of the Cantor set.
Comment: Note this question with a similar flavor:  http://mathoverflow.net/questions/34059/if-f-is-infinitely-differentiable-then-f-coincides-with-a-polynomial
Answer: No. Say that a function $f(x)$ is locally a polynomial at $x_0$ if there is some neighborhood of $x_0$ upon which $f(x)$ coincides with a polynomial. In

W. Donoghue, Jr., Functions which are polynomials on a dense set.
  J. London Math. Soc. 39 (1964), 533–536,

the author constructs an example of a $C^\infty$ function that is not a polynomial but is nonetheless locally a polynomial on a dense set. Since the set of points at which a function is locally a polynomial is open, hence a countable union of disjoint intervals, the answer to your question follows.
Answer: The existence of such functions being established by now, there remains a curiosity
for the concrete situations that may generate them. Here is one, which is also
interesting as an example of a $C^\infty$, non-analytic solution, of a simple  first order linear delay differential equation.
Let's consider the  problem
$$f'(x)=\lambda f(3x),\qquad x < \frac{1}{2}  $$
where we seek for a function $f\in C^1(\mathbb{R})$ with support in
$I:=[0,1]$, and with the condition $f(x)=f(1-x)$.
I will show that it has a simple eigenvalue $\lambda= \frac{9}{2}$,
corresponding to an
eigenfunction with $f(\frac{1}{2})=1$ (see the details below). Then, it is
very easy
to check that $f$ is locally polynomial on the complement of the Cantor
set; and it
is, of course, $C^\infty$.
Indeed, since $f (3x)=0$ for $  x > \frac{1}{3}$, from the equation we
have that
$f'(x)$ vanishes identically on the interval $(\frac{1}{3},\frac{2}{3})$,
so that
$f$ is the constant $1$ therein. By induction, it is easy to see that $f$ is
polynomial of degree $k-1$ on each component of the complement of the
closed set
$F_k$ in $I$, inductively defined by $F_0:=I$ and $F_{k+1}:= \frac{1}{3}F_k
\cup\left(\frac{1}{3}F_k + \frac{2}{3}\right)$. Note that  $\{F_k\} _
{k\in\mathbb{N}}$ is the well-known nested sequence of closed sets whose
intersection is the Cantor set.
$$*$$
Construction. Consider the linear   operator $T$ on
$L^\infty(0,1)$ (thought as subspace of $L^\infty(\mathbb{R})$ via extension by zero),
defined by
$$Tu(x)= \cases{  \int_0^{3x}u(t)\, dt\qquad \qquad 0 < x < \frac{1}{3}\\\ 0
\qquad \qquad \qquad \qquad \frac{1}{3} < x < \frac{2}{3}\\\
\int_0^{3(1-x)}u(t)\, dt  \qquad\frac{2}{3}< x < 1.} $$
Since $T$ and $T ^ 2$ are integral operators with non-negative kernels,
their norms are attained on the constant function $1$ on $[0,1]$. We have, by simple
computations $T1(x)=3\min(x,1-x)\chi _ { F _ 1 }(x) $,
$\|T\| = \|T1\| _ \infty=1$ and $\|T^2\|=\|T(T1)\|_\infty=\frac{1}{3}$.
Therefore $\rho(T)\le\frac{1}{\sqrt 3} < \frac{2}{3}$ and $I-\frac{3}{2}T$ is
invertible. The function
$$f:= \left(I-\frac{3}{2}T\right) ^ {-1}\chi _
{[\frac{1}{3},\frac{2}{3}]} = \sum _ {k=0} ^ \infty  \left( \frac{3}{2}\right) ^ k T
^ k \chi _
 { [\frac{1}{3}, \frac{2}{3}] } $$
verifies
$$f(x)=\frac{3}{2} \int_0^{3x}f(t)\; dt\qquad \mathrm{for\; all}\quad 0 < x <
\frac{1}{3}\, ,$$
$$f(x)=1\qquad \mathrm{for\, all}\quad \frac{1}{3} < x < \frac{2}{3}\, ,$$
and $$f(x)=f(1-x)\qquad \mathrm{for\, all}\quad x\in\mathbb{R} \, .$$
The only points in $\mathbb{R}$ where the continuity of $f$ is not immediate and has
to be checked, are  $\frac{1}{3}$ and  $\frac{2}{3}$. We have
$$\int_ 0 ^ 1 f(x)dx=\int _ 0 ^ \frac{1}{3} f(x)dx+\int _ \frac{1}{3} ^ \frac{2}{3}
f(x)dx+\int _ \frac{2}{3} ^ 1 f(x)dx= 2\int _ 0 ^ \frac{1}{3} f(x)dx+ \frac{1}{3}\,
,$$
and
$$ 2  \int  _ 0  ^ \frac{1}{3}    f(x)dx
=  3\int _ 0 ^ \frac{1}{3}  \int _ 0 ^ {3x} f(t) dt dx= \int _ 0 ^ 1 \int _ 0 ^ x
f(t) dt dx=$$
$$= \int _ 0 ^ 1 (1-t) f(t) dt = \int _ 0 ^ 1 tf(1-t)dt=   \int _ 0 ^ 1 tf(t)dt = $$
$$ =\frac{1}{2}\left(\int _ 0 ^ 1 (1-t)f(t)+ tf(t)dt\right) =\frac{1}{2} \int _ 0 ^
1  f(t)dt\, . $$
So
$$  \int _ 0 ^ 1f(t)dt = \frac{2}{3}\, ,$$
which implies the continuity of $f$ at $  \frac{1}{3}$ (and by symmetry at $
\frac{2}{3}$ ), since
$$f(\frac{1}{3}-)=\frac{3}{2}\int_ 0 ^ 1 f(x)dx =1= f(\frac{1}{3}+) \, .   $$
As a consequence, $f$ actually satisfies
$$f(x)=\frac{3}{2} \int_0^{3x}f(t)\, dt  $$
for all $  x < \frac{2}{3}\, ,$
and we conclude that $f$ is in $ C ^ 1(\mathbb{R})$,   and has the stated properties.

Here is  a Pudding Function $f$, and its integral function, $F(x):=\int_0^x f(t)dt$. Note how the latter coincides with the first third of the former, up to rescaling. Simple considerations based on odd and even symmetry show that $F(1)=\frac{2}{3}$.
Edit 2021 I learned from this answer by Gerald Edgar that  a function quite similar (but not easily related) to this is known since 1966 as the Fabius function. It verifies $F'(x)=2F(2x)$ instead of $f'(x)=\frac{9}{2}f(3x)$.
Comment: The Fabius function is not locally polynomial, although it has a similar equation and a similar graph .
Answer: I believe the answer is "no".  The key lemma is:
Lemma.  Let $f: [c,d] \to {\bf R}$ be smooth, let $I$ be a compact subinterval of $(c,d)$, $q$ be an interior point of $I$, let $n \geq 1$, and let $\varepsilon > 0$.  Then there exists a smooth perturbation $g: [c,d] \to {\bf R}$ of $f$ which agrees with $f$ outside of $I$, is a polynomial on a neighbourhood of $q$ of degree at least $n$, but is not a polynomial on all of $I$, and differs from $f$ by at most $\varepsilon$ in $C^n[c,d]$ norm.
If we apply this lemma iteratively for $n=1,2,\ldots$ with $\varepsilon = \varepsilon_n := 2^{-n}$ and $n=0,1,2,\ldots$, starting with $f_0 = 0$, and setting $q = q_n$ to be the first rational (in some enumeration of the rationals) on which $f_n$ is not locally polynomial,
one obtains a sequence $f_1, f_2, f_3,\ldots$ of smooth functions on $[c,d]$ which form a Cauchy sequence in $C^k$ for each $k$, and thus converge in the smooth topology to a limit $f$ which is equal to a polynomial on degree at least $n$ on an interval $I_n$, with the $I_n$ disjoint and covering all the rationals, thus dense in $[c,d]$, giving the claim.
To prove the lemma, recall from the Weierstrass approximation theorem that the polynomials are dense in $C^0[c,d]$; integrating this fact repeatedly we see that they are dense in $C^n[c,d]$ as well.  So we can approximate $f$ to arbitrary accuracy by a polynomial $h$ in the $C^n$ norm; by a small perturbation one can ensure that $h$ has degree at least $n$.  Now using a smooth partition of unity, one can create a merged function $g$ that equals $h$ near $q$ and equals $f$, which can be made arbitrarily close in $C^n$.  By modifying $g$ a little bit in $I$ away from $q$ one can ensure that $q$ is not polynomial on all of $I$.
The problem here is superficially similar to that in the previous question If $f$ is infinitely differentiable then $f$ coincides with a polynomial , but the latter has qualitative control at every single point (allowing the powerful Baire category theorem to come into play), whereas here one only has qualitative control on a dense set, which is a far weaker statement, and one which allows for a great deal of flexibility.
Comment: In fact,i create this question while think about the question  http://mathoverflow.net/questions/34059/if-f-is-infinitely-differentiable-then-f-coincides-with-a-polynomial.
I proved the function $f$ locally a polynomial and wondered if I can use that property to solve that problem.
Comment: Can you clarify your construction? What interval I do you use the lemma for?
Comment: At each stage, f_n is polynomial on some union of disjoint intervals.  One picks a q = q_n outside of these intervals, then one can take I to be an interval around q which does not intersect any of the existing intervals.  This way, f_{n+1} is polynomial on all the intervals that f_n was, plus an additional new interval containing q.
Answer: The following is wrong, but the comments are really nice :)

Suppose That on $(a_1, b_1)$, $f$ is a polynomial of degree $N$. This means that in its Taylor series at any point $x \in (a_1, b_1)$, every coefficiant past the $(N+1)$st vanishes.
This must also be true for the border points, $x = a_1$ and $x=b_1$. However, because the intervals are dense in $O$, $a_1$ or $b_1$ lies in the closure of some other interval. The rest is something like an induction: It follows that on every set $(a_n, b_n)$, the coefficients past the $(N+1)$st vanish.
This shows that $f$ is a polynomial, by the fundamental theorem of calculous.
Comment: It seems to me that there is a problem with the part where you say that $a_1$ and $b_1$ lie in the closure of some other interval.
For example, say $b_1 = 0$, and

$$ O \cap (0,1) = \bigcup_{k=1}^\infty \left(\frac1{k+1},\frac1{k}\right). $$
Comment: Exactly: the OP's partition of $(c,d)$ allows things as ugly as Aaron's partition, or even
 $$(0,1)=\bigcup_{k=1}^\infty \bigcup_{j=1}^\infty \left(\frac{1}{k+1}+\frac{1}{k(k+1)}\frac{1}{j+1},\frac{1}{k+1}+\frac{1}{k(k+1)}\frac{1}{j}\right)$$
though I'm not sure the process can be continued indefinitely. It's an interesting question, then: how far can this idea be pushed? How many points can there be that do not have a "next neighbour to the right"? Can every interval $(a_n,b_n)$ be made to not have a next neighbour?
Comment: Follow up: [This answer](http://mathoverflow.net/questions/94086/partitions-of-an-interval/94088#94088) shows you can.


Display cloning with standard(Windows) display drivers

Question: Is it possible to clone display on an external monitor in Windows XP only using drivers shipped with Windows? I know, it is possible with drivers shipped by NVIDIA, ATI/AMD or Intel, I know.
But all my efforts led only to enlarging virtual screen to two monitors or to setting the main monitor, but not cloning
Answer: From past experience, if you are able to get it to extend your screen to a second monitor (enlarging it), you can easily change the settings to achieve a mirror or cloning effect.
To accomplish this, either hit Win + P and hold it to see a settings menu where you can change the current setup, or go to the Control Panel and change it there.
Answer: skip drivers, if you just want to clone, make this a hardware question. vga splitters are whoa cheap (link text), and s-video/etc. splitters are also available.


What is the django command to delete all tables?

Question: Are there django commands that

A. Delete all tables
B. delete all data in all tables
C. Create all tables as defined in the model?

I cannot find these right now!
And by commands i mean those little things that are like
runserver

etc
Comment: Check this out -
http://stackoverflow.com/questions/3414247/django-drop-all-tables-from-database
Comment: @guettli ha ha! I think the OP did not consider any meaningful ordering, he just wanted to know them all.
Comment: Strange order: In step A you delete all tables. In step B you want to delete all data in all tables. But there is not single table since all tables where deleted in step A. I don't get it :-)
Answer: A. Delete all tables
manage.py sqlclear will print the sql statement to drop all tables
B. delete all data in all tables
manage.py flush returns the database to the state it was in immediately after syncdb was executed
C. Create all tables as defined in the model?
manage.py syncdb Creates the database tables for all apps in INSTALLED_APPS whose tables have not already been created.
See this page for a reference of all commands: https://docs.djangoproject.com/en/dev/ref/django-admin/
But you should definitely look into using south as someone already mentioned. It's the best way to manage your database.
N.B: syncdb is deprecated in favour of migrate, since Django 1.7.
Comment: The problem with this is that `manage.py sqlclear` by itself won't work. You'll have to pass it each app name individually, and if you use `syncdb`, it won't reflect any changes in existing models (which is why south is recommended).
Comment: `syncdb` is deprecated in favour of `migrate`, since Django 1.7.
Comment: eh, for my own notes "reset" will clear the entire db (drop tables etc)
Comment: Link to south docs currently 404'd (http://south.aeracode.org/docs/about.html)
Answer: If you have the client libraries installed for your database, you can run this:
python manage.py sqlflush | python manage.py dbshell
This doesn't drop the tables, but truncates them.
There isn't a command that does the it all in one go, but this "one liner" will drop all the tables and then re-create them. It would only work if you were running on a system that provides these utilities at the shell.
echo 'from django.conf import settings; print settings.INSTALLED_APPS; quit();' | python manage.py shell --plain 2>&1 | tail -n1 | sed -r "s|^.*\((.*)\).*$|\1|; s|[',]| |g; s|django\.contrib\.||g" | xargs python manage.py sqlclear | python manage.py dbshell && python manage.py syncdb
Answer: Neither manage.py sqlclear nor manage.py reset is capable of dropping all tables at once, both require an appname parameter.
You should take a look at Django Extensions, it gives you access to manage.py reset_db as well as many other useful management commands.
Answer: I recommend using django-south. It allows you to sync your models to your database not just when you add a field, but also when you delete a field/model. I really find it to be an essential component of building a Django site. Once installed, you could run a command like:
./manage.py migrate app zero
You can learn more here: http://south.aeracode.org/docs/about.html
Comment: Link to south docs currently 404'd (http://south.aeracode.org/docs/about.html)
Answer: And a simpler oneliner to drop all the tables for django 1.5+:
python2 manage.py sqlflush | sed 's/TRUNCATE/DROP TABLE/g'| python2 manage.py dbshell

Answer: I was able todrop my tables. Run
python manage.py sqlclear appname

Take note of the commands given. Then run
python manage.py dbshell

Add the commands given in the first step. line by line. When you are done, type '.exit' (for SQlite3). Resync your DB and you should be good to go. To be sure, check the tables with:
python manage.py shell
>>> from yourapp import yourclasses
>>> yourviews.objects.all()

it should return a [].  I hope this helps.
Answer: A implies B, right?
For A, see How to drop all tables from the database with manage.py CLI in Django?
For C,
python manage.py syncdb

Ofcourse for smart data migration I go with what @bento mentioned: django-south


How can I spread an object only on horizontal parts of surface using geometry nodes

Question: I have some stylized hills created with geometry nodes (by attribute sample texture) now I need to scatter some spheres only on horizontal parts of the hills. How can I do that?
Comment: I would check the normals.
Answer: You can use the Density input of the Point Distribute node to test against the local normal. If the normal's Z component is 1, the face is horizontal, facing straight up. If it's lower than 1, there is a slope. The closer it is to 0, the closer it is to vertical. It can also be negative but in the case of regular hills this should not happen.
In the end we have 2 inputs :

Factor : At which angle the objects will start spawning
Density

Possible improvements :

Change the Factor input to be a maximal angle instead, using some simple trigonometry :

Use a gradient falloff instead of 0 or 1 values when the criterion is met. Using the Attribute Map Range we can setup gradients.
Comment: @Chris Oh, right, didn't notice it, it sure looks weird :p
Comment: your attribute separate node really made me nervous..... Great solution!
Comment: what? WWII ? where? don't understand. No, i meant the cut text in your first pic - result - result y - result - i thought you had a custom node on my first view but the node width was just too small, so it cut x and z, but not y ;) looks weird ;)
Comment: Really...i the first second i thought: OMG, Gorgious is a genius. He made custom nodes for geometry nodes.... :)
Answer: @Gorgious has said it all.. but this is a very slight variation, (made at the same time)

Adjust Minimum of Map Range, for threshold steepness, (or other fields, for distribution according to steepness)
Adjust B float of Multiply for density.
Comment: niiiiiiiiiiiiiiiice!!!!
Comment: @Chris Gorgious has covered it much better, though, IMO. His should be the accepted answer. We could knock out the multiplier, too, and use the one in the distribute node.
Comment: Looks like the user doesn't often accept answer


How to butter-roast coffee in frying pan?

Question: I've starting roasting green coffee beans in a frying-pan at home and in a tin foil tray, when having an outside bbq.
What would be a good way to make a Vietnamese style butter-roast? Should I just fry the beans in butter, until they are brown?
Comment: I have tried to roast the beans according to @soegaard 's explanation with coconut oil (smoke point approx. 180°C/350F). As I did not want to burn the oil, I only roasted mildly. The result is drinkable, but not exciting. There was no coconut taste.
Answer: Just frying them in butter won't work. The temperature needed to roast the bean is much higher than the milk solids can handle. If I were you, I'd begin by clarifying the butter to get rid of the milk solids, then use the clarified butter with the same method you are using now.
References:

Temperature scales for various roasts at the bottom
One way to make clarified butter
Comment: I think, I will try it with Ghee then. I'll report back, how it went!
Comment: @Sebastian How did it go?
Answer: I have been roasting coffee for a few years and have never heard of this. It wasn't so easy to find on Google. From An Overview of Vietnamese Coffee:

Thirdly, beans are generally roasted in what is referred to as "butter oil", which may or may not be actual clarified butter oil. Occasionally vegetable oils are used, and historically, traditional "home-grown" coffee roasting style involves creating almost a caramel-like coating effect with the use of a small amount of sugar, oil, and generally a touch of vanilla or cocoa. This coating blackens in the roast and the beans wind up with almost a thin, hard shell. Why is this done? Robusta beans are uniquely slow to ripen on the bush, and often pickers pick unripe beans along with ripe beans. The traditional coating gives all the beans a similar color. The presence of a few unripe beans does not hurt the overall taste effect of the blend. However, modern growers pick only ripe beans despite the extra labor, and do not feature this coating in their roasting, opting simple for a little oil to keep the beans easy to turn in the slow roasting process.

I also googled pan roasting techniques. Apparently you should be able to achieve a roasting time of 15-20 minutes. So you are spending several minutes at 200C. With such a small amount of butter and sugar, I wonder when you add the extra ingredients to the pan so as to not burn the coating.
If just using the oil to help the beans turn, then I imagine adding the oil from the start will work.
I might have to try this myself.
Comment: I added the oil to obtain the distinct flavour of buttery coffee. I did, unfortunately, not get better results so far. Have you tried and had success?
Answer: I've added about one tablespoon of butter on the beans while turning them constantly in the frying pan at about a crack and a half.... When finished it leaves a high gloss on a medium roast. The flavor is wonderful and it seems to make for an even smoother more rich flavor.
Comment: I'm Not a native speaker, so i did not get your instructions quite. Did you add the butter at the beginning of the roast or "at a crack and a half"? Or is it a messure of heat for the process?
Answer: You can roast in a pan in the oven,
stirring every few minutes, or in the same upon
the top of the range. Stir often, and roast
quickly to a bright brown, not a dull black.
While still hot, beat up the white of an egg
with a tablespoonful of melted butter, and stir
up well with it. This will tend to preserve the
flavor.


What order should I read the Stormlight Archive in?

Question: I have already read Way of Kings and Words of Radiance and I was wondering what I should read next. I heard there are six smaller books that I need to read before reading Oathbringer and have no idea what order to read them in.
Answer: There is only one book in between Words of Radiance and Oathbringer, Edgedancer. While not strictly necessary, it is recommended as it sets up some characters for Oathbringer a little better than otherwise. I'd probably also recommend Warbreaker since it crosses over quite heavily with Words of Radiance and Oathbringer.
As for these "six smaller books" I'm not really sure what you are a talking about. The Cosmere is an interconnected universe, so you could read any of them or none of them. It could be possible you are talking about the Arcanum Unbounded anthology which Edgedancer is also published in, but none of the other short stories relate to The Stormlight Archive in any meaningful way.
So in short, my recommended reading order for the best experience is:

SA 1: The Way of Kings (order interchangeable with Warbreaker)
WB 1: Warbreaker (order interchangeable with The Way of Kings)
SA 2: Words of Radiance
SA 2.5: Edgedancer
SA 3: Oathbringer
Answer: Other than the main novels (Way of Kings, Words of Radiance and Oathbringer) the only other piece of fiction that's been published that's set on Roshar is Edgedancer, which is a novella that was part of Sanderson's Arcanum Unbounded collection.
The "six smaller books" may be referring to other works set in Sanderson's Cosmere. Minor spoilers ahead...
Many of Brandon's book series are set in a shared universe called the Cosmere. To date, these series are Mistborn, Warbreaker, Elantris, White Sand and Stormlight Archive.
It's not necessary to read any of the others in order to understand the events of the Stormlight books. However, there are characters from one series that appear in another. It's mostly minor characters, with a few notable exceptions. For example, Wit plays a significant role in most of the Cosmere stories. And I suspect that as each series continues, the cross-overs will become more prominent.
As for a reading order, I'd agree with amflare's recommendation if you're looking to stay mostly in the Stormlight world. However, if you're looking to branch out into the wider Cosmere, I'd recommend checking out the chart provided in this answer. It's a little out of date (Oathbringer is listed as forthcoming, for example). However, the starting points are still valid.


Replacing Motobecane 500 HT derailleur hanger

Question: Can I just replace my rear derailer hanger in order to fix my derailer, is that an option?  It looks like it broke and it definitely is detachable.
Comment: In fact, a photo of the state of the matters would likely to help with providing additional diagnostics on whether it is just a derailleur hanger should be replaced, or the derailleur itself is cooked.
Comment: I recently dealt with a supplier who guaranteed fit, if you sent them pictures of the rear end and a few other details.  Unfortunately, I don't have the supplier's info at hand (and of course we're officially not supposed to provide it anyway), but such service is out there, and (in this case) quite reasonable.
Answer: Yes, but you will need to buy a replacement part that is specifically designated for your bicycle vendor, model and even model year combination as there is close to none compatibility between derailleurs.
You can search the net for the words "[bicycle name] + derailleur". Some companies in some countires offer wide catalogs of compatible parts. Some of these folks can even cut a new part with a CNC machine for you. In this case, contact them and provide the information they will request. Most likely they will need photoes and measurements of the derailleur and/or dropout where it sits.
Note that replacements derailleurs are relatively cheap, and even making a custom part is much cheaper than buying a new bike. And while you are at it, why not order an extra part, just for the future?
Answer: How did you break your rear derailleur hanger? If your bike fell on the rear derailleur most likey the derailleur itself will have some damage too.
You could try replacing the hanger first and then have a look if you can adjust the rear derailleur correctly afterwards. If it won't shift correctly you will also need a new one and adjust it.
In case you need a new one you should buy one thats suitable for the same amount of gears.


Getting the kick drum to really come out in the mix?

Question: When I get done with a mix, no matter how much I work on the bass drum it barely comes out.  I'm mainly working with metal bands, so I was wondering if anyone could give me pointers/ suggestions/ answers on how to make the kick stand out in the mix.
Comment: Are you using multiple mics for the bass drum?  Or are you using pre-recorded (i.e. sampled) drums?
Answer: Well, there area lot of things that can affect this.  #1 is what you're listening to your mixes on.  I wouldn't say it matters, so long as the "what" is not just one thing.
On ALL testing speakers, you want to use something as a reference.  Some professional recording that you think does a good job of accomplishing what you want, and then your tracks.
On the technical side there are two parts to this question. The first is how much 'woof' of the kick you want to stand out and the second is how much of the 'click' you want to stand out.
Example of a lot of 'click' - SLipknot "the blister exists"
Example of a lot of 'woof' - Dimmu Borgir "Progenies of the Great Apocolypse"
Poor quality but I think you can see the difference of what I'm talking about.  Personally I like a mix of the two ala Meshuggah's track "bleed"
Apologies for all the links w/o anything useful BUT!  I don't know too much about where you're coming from so I'm covering bases.  Maybe you could post a sort clip so we can hear what you've got and you tell us where you want to go?
Things to try:
-if recording live kit, try to add a sampled kick to the mix and see how that sits in the mix  Pick one that sounds DIFFERENT than what you've already got so when you mix them together it sounds like 1 NEW kik. (also works when using two sampled kick sounds).
-I will almost always put a lo-cut filter on my kick tracks (all tracks...) between 30hz and 60hz.  Depends on how it sits in the mix and what I need.  Using this on all your tracks keeps the low end cleaner and gives you a lot more headroom on your master out.
-I'm always surprised how much the bass guitar can add to the effect of a good kick sound
-check the EQ's and make sure the frequencies of your kick aren't being too heavily copied in your guitars.  Logic's Match EQ is great for this as you can analyze your kick and then throw the matched EQ on an offending track and take those frequencies out.  Can have terrible results also. =)
Others probably know a lot more than me. I hope something helps =)
Comment: http://www.youtube.com/watch?v=r5tB8CCDDSw Here is August Burns Red's Cutting The Ties. Look at 40 - about 51. that's is the sorta bass i'm looking for!(: thank you!!
Comment: http://www.youtube.com/watch?NR=1&v=_RQzomsa1IY Actually this song Forgive And Forget by Miss May I really is what im talking about!(:
Comment: @leftaroundabout gave some good advice.  That's definitely a real clicky kick sound and you're gonna want it sitting pretty high in the mix.  I don't know about it being the only sound you're pegging at unity (I try stay away from that area altogether) but maybe I'll give it a try myself on my next metal mix.

How far away are you currently?  Are you happy with everything in the mix EXCEPT the kik? Is it just the level or is the sound itself unsatisfying?
Answer: Obviously, you need to find the correct frequencies – what gives definition to the kick is actually something like 6000 Hz rather than the bass frequencies. But the most important thing is, trivially, that the kick is simply loud enough. It is the only instrument you should allow to reach 0 dB. Don't try to get your mix loud by giving too much power to the guitars (overall loudness will be achieved in mastering, and there you need the kick to really stand out so that it can actually push the mastering effects). Compression on the drums themselves – if used at all – should not remove too much of the transients, rather drive something into saturation if necessary.
Answer: Dont be afraid using compressors on channels or busses triggered by the kick.. Maybe half db compression just when the bass drum kick helps.


Backend Only Attribute

Question: So I've setup a 'discontinued' attribute in Magento 2. I plan to use this to set a badge on the product to let customers know if a product is discontinued. I was able to create the attribute and load some products with this attribute to 'Yes'. The problem is that this attribute is now a selectable option on the product page. I was pretty sure it was possible to create an attribute for back end use only but have been all through the admin pages and done some research an haven't been able to locate an option for this. Any ideas?
Answer: Don't know how it works on 2, but on my 1.7 there is a attributes page, where you can set visibility, scope and others. On mine, is under catalog dropdown menu.
Hope it helps!
Answer: So after some more digging I was able to figure out the issue. I had already set all of the visibility options to not visible on front end, but my import process was setting the discontinued attribute on the parent configurable product variations which was causing it to show up on them only. After I tweaked the import process to not include the attribute for config products the attribute can be used without the dropdown visible. Hope this helps anyone who has a similar issue.
Comment: ahh I'm glad you found the problem. Posted the answer without realising you found the problem!
Comment: @BareFeet can never have too much help ;) Thanks for your answer!
Answer: If you got to Admin > Stores > Attributes > Product
Then navigate to the Storefront Properties section and select the attribute relating "discontinued", you will be able to set the visibility.

Backend Only Attribute


How to query a transaction via the rpc interface

Question: How to find a transaction by operation hash
Comment: Disagree with @Ezy, this is not a duplicate. The mentioned question concerns building an indexer, but this question concerns querying data from rpc. Yes, one can find answer to this question in the introducion to the mentioned question. But the questions actually aren't the same.
Comment: The strict answer to the question is « not it is not possible ». While correct it would a waste not to provide the better context which is offered by the other question. Just trying to be pragmatic here and add value to the reader who would end up here.
Comment: @Ezy Sometimes getting a short answer to a short question is much more preferable and saves a lot of time. Your question is quite abstract and aimed to discussing the problem, while this question is concrete and allows to quickly obtain the necessary information, especially via search engines. If you think you have a better context, just post the answer reffered to that context. This is how stack exchange works, I think =)
Comment: @Groxan well your answer is here isn't it ? I just closed the question. Did not delete ur answer
Answer: There is no way to get an operation by hash via rpc api. Use block explorers instead.


should a save clear the undo/redo stacks?

Question: When the user saves changes in an application, should the undo/redo stacks be cleared?  Would it be abnormal to be able to undo to a state before a save?
Comment: I'd say no. Most applications I use (I am thinking Eclipse, text editors, etc) allow to undo even after saving and I find myself using that feature frequently, especially if I am debugging code in eclipse. I guess it might depend on your application.
Answer: That would be a bad idea, especially for people (like me) who often instinctively save. Also, there is no logical reason why undo/redo information should be deleted when saving (and any data gained from the user is precious).
It is common practice, however, not to include undo/redo information in the saved file.
Answer: I would say the answer to both of these questions is no.
(For instance, what if you change something, save it, and then discover it leads to unwanted behaviour?  It makes sense to be able to uncommit that save by undoing your changes to the previous state, allowing you to save them.)
Answer: Personally I don't like when the undo stack is cleared after a save. When programming I hit Ctrl-S very often (everybody knows the importance of saving:-)) and at the same time I want to be able to undo some of the recent changes.
In my opinion it is an unpleasant surprise not to be able to undo after a save. And by applying a rule of the least surpirse (to the user) you should keep the undo history.
Answer: I can't think of an app where save clears the undo/redo stack.  I don't see a good reason to do that; it gains nothing for you, but the user loses something.


Have I had known about the lack of security

Question: Is it correct to say "have I had known"?
Thank you all.
Comment: One can say "Had I known, I would have done something", or "If I had known, I would have done something." But what you have in quotes is not correct English.
Answer: The correct form is, "Had I known (about the lack of security), ...". It requires the same tense as the if clause "If I had known  (about the lack of security), ..."
This type of conditional structure is known as the third conditional or conditional III. It is used to refer to a hypothetical situation that could have occurred in the past.
Comment: Just to add to this, I can't think of a case where "have I had X'd" is grammatically correct.  Similarly "Had I have X'd" is never used.
Comment: Also, you might occasionally hear *if I had've known* (*if I had have known*) in American English, but it's non-standard, and should generally be avoided. https://en.wiktionary.org/wiki/had've
Answer: Your sentence is incorrect, it should be stated as

Had I had known (about it, I would not have done that).
  Had I known, (I would not have done that).
  If I had known (what would happen, I would not have done that).

to show regret for something which might have been avoided.
Answer: No, your sentence is not correct. The pattern in question here is:

had I done something, something else would or would not have happened.

This pattern is cast in stone and cannot be changed or manipulated in any way. We use it to talk about situations that are not real and only exist in our imagination. Oftentimes, this structure is employed when we want to talk about things we wish we had done in the past, but unfortunately the ship has sailed and there is nothing we can do about it now.
Example #1 (wish):

Had I had a million dollars, I would have bought the best car in the world!

Example #2 (regret):

Had I studied harder, I would have passed the exam!

Example #3 (regret):

Had I known that earlier, I would not have made this stupid mistake!


What's the purpose of a convex saw blade?

Question: I am new to this stuff, and it is my first time seeing teeth on the backside of a curved saw blade.
Answer: This permits (if you are adequately determined) starting a cut in the middle of a board, rather than starting from the edge as usual.
Most commonly seen actually used when starting a hole in the floor, for instance. Once you cut the full height of the blade you'd switch to cutting with the normal cutting edge, which will be much faster and less effort.
Of course using a powered hand-held circular saw is also faster and less effort, so fewer people are familiar with this "feature" on handsaws these days.
Comment: I think Solar Mike has it more right--it's not so much about where the cut is started, but prevention of damage to underlying surfaces outside the intended cut area.
Answer: That curved part of the top of the blade is designed so you can cut skirting board when it is fixed to the wall.
So you don't have to remove the whole length.
Also for cutting that waist high trim that protected walls from chairs in older houses - again when it was fitted.
Comment: This is right. There are times when you need to cut one board over another surface. That's virtually impossible with a straight blade.
Comment: 'Waist high trim' The term is dado rail, and it actually had nothing originally to do with protecting the wall from chairs (the traditional height for it is far too short for this purpose).
Comment: @AustinHemmelgarn often I avoid many of the "technical" English terms as some don't know them…


MS Natural Ergonomic Keyboard 4000 - Stop Key Clicking

Question: My new MS Natural Ergonomic Keyboard 4000 clicks when the spacebar is pressed.  All other keys are silent - as is my preference.  How do I stop the spacebar from clicking?
Answer: You have to discover how is that space's bar mechanism. Most likely, it uses a long metal bar to function. You can use lubricant on that bar - a little - if that is the case. If the click comes from friction, it will go away. You have to take off the keycap carefully to not brake. Please look at its manual for tips about how to do this.
Comment: This answer worked for me. In my case the problem was not a clicking sound, but intermittently key presses of one key were not resulting in the output from that key on the screen. After carefully removing the keycap, I was able to see what was causing the problem.