Viewing output when the "The plugin generated x characters of unexpected output during activation" error is triggered

Question: I'm working on a plugin and having some difficulties getting a new table created. I get the "The plugin generated x characters of unexpected output during activation" error. Is there a way of viewing the actual error? I believe that a redirect is involved in this process, hence the reason I don't see the actual error output. I have all error reporting and logging on, but still I get nothing.
Comment: I figured out a way to see the error--I executed `exit()` on line 1569 of wp-admin/includes/upgrade.php. It is called at the end of the dbDelta function, which allowed me to see the output that was generated and quickly fix the problem. I'm still interested in learning other methods for this that would not require a core hack.
Answer: Interestingly the ability to display errors and output from a plugin on activation seems to be build in to WordPress. If you take a look at wp-admin/plugins.php there's a case in the $action switch statement that says error_scrape -- hinted at in Lars' answer.
Looks like this:
<?php
// wp-admin/plugins.php
case 'error_scrape':
    if ( ! current_user_can('activate_plugins') )
        wp_die(__('You do not have sufficient permissions to activate plugins for this site.'));

    check_admin_referer('plugin-activation-error_' . $plugin);

    $valid = validate_plugin($plugin);
    if ( is_wp_error($valid) )
        wp_die($valid);

    if ( ! WP_DEBUG ) {
        error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );
    }

    @ini_set('display_errors', true); //Ensure that Fatal errors are displayed.
    // Go back to "sandbox" scope so we get the same errors as before
    function plugin_sandbox_scrape( $plugin ) {
        include( WP_PLUGIN_DIR . '/' . $plugin );
    }
    plugin_sandbox_scrape( $plugin );
    do_action('activate_' . $plugin);
    exit;
    break;

As you can see, it mimics the plugin activation senario, but it doesn't actually activate the plugin. It includes the plugin file, calls the activate hook, then exits. It does all this without output buffering so you can see what's happening.
SO, if that's already there, we just need to expose it. A bit of digging in wp-admin/plugins.php shows we need a nonce to verify. So we can copy that and study how the plugins list table builds its activation links. Then simply add an error scrape link on the inactive plugins. Click it, and see your errors.
Just hook into plugin_action_links and add the link:
<?php
add_filter('plugin_action_links', 'wpse24278_add_scrape', 10, 2);
/**
 * Add an "Error Scrape" action to inactive plugins.
 *
 * @uses    is_plugin_active
 * @return  array
 */
function wpse24278_add_scrape($actions, $plugin)
{
    global $status, $page, $s;

    // leave active plugins alone
    if (is_plugin_active($plugin)) {
        return $actions;
    }

    // build the url, identical to the activate URL, see the
    // plugings list table for more information.
    $url = add_query_arg(array(
        'action'            => 'error_scrape',
        'plugin'            => $plugin,
        'plugin_status'     => $status,
        'paged'             => $page,
        's'                 => $s,
    ), admin_url('plugins.php'));

    // add our action.
    $actions['error_scrape'] = sprintf(
        '%s',
        wp_nonce_url($url, 'plugin-activation-error_' . $plugin), // see `wp-admin/plugins.php` for the nonce name
        esc_attr__('Check for Errors', 'wpse'),
        esc_html__('Error Scrape', 'wpse')
    );

    return $actions;
}

Here is the above wrapped up in a plugin.
Comment: I wish there was a way to +1 this a hundred times. You just made my day.
Answer: Interesting question, so I had a look on Google and some guy named Jason had a solution:
br_trigger_error('Some error message', E_USER_ERROR);

function br_trigger_error($message, $errno) {
  if(isset($_GET['action'])
      && $_GET['action'] == 'error_scrape') {
    echo '' . $message . '';
    exit;
} else {
    trigger_error($message, $errno);
}
}

From http://www.squarepenguin.com/wordpress/?p=6 that has more details as well.
Answer: I just found a way, all props to itzco and hungrycoder. I've added the hook parameters.
add_action( 'activated_plugin', 'save_error_wpse_24278', 10, 2 );

function save_error_wpse_24278( $plugin, $network_wide )
{
    file_put_contents(
        WP_CONTENT_DIR. '/error_activation.html',
        $plugin . ob_get_contents()
    );
    //update_option( 'plugin_error',  ob_get_contents() );
}

Comment: Would be better with [`wp_upload_dir`](http://codex.wordpress.org/Function_Reference/wp_upload_dir) instead of a hardcoded path to wp-content.
Comment: @chrisguitarguy, I guess `WP_CONTENT_DIR` does the same job, and I think it makes more sense in there than inside `/uploads/`...
Comment: My WP_CONTENT_DIR is not writable, just my uploads folder. If that's anything.


What do you call this distorted text effect and how can I reproduce it?

Question:
I came acorss this picture online, but i'm not sure how to achieve it, its not overlay right? I think.
Comment: I'd call that a text illustration. What have you tried to achieve this specific effect? Where have you failed?
Answer: That is just a straightforward use of the Letraset Shatter font (or a clone of it). Shatter is based on Helvetica (obliqued, rotated left, then sliced and displaced if you want to create the effect manually - something that's immeasurably easier with a computer than it was with rub-down lettering and an X-Acto knife); there are similar fonts available (at various prices and quality levels) for quite a few of the better-known display fonts, and in different shatter patterns.
Answer: The easiest way to slice the text up which I think is what you are having trouble with is fairly simple:

Create your text.
Expand your text (Appearance and Expand fill)
Select all letters and create compound path, and then make a copy.
Create multiple rectangles that cover the width of the text, sitting side by side (do not group). Lay them over the text.
Open up your pathfinder window (window>pathfinder), and select divide (first icon on second row).
Ungroup and delete the extra bits of rectangle, you should be left with a sliced up text image.

Its really two text images on top of each other so you'll need to take the copy of the unsliced image lay it below the sliced image and erase the bits that you dont want to show.


Can I set up a domain and configure pre-verified DKIM

Question: I have a verified domain using a DKIM. The DKIM was created by the email relay, added to my DNS, and verified by the relay.  Once I got the EXM set up properly and was able to add a domain, Sitecore associated it with a different DKIM that is not verified. How to I setup my domain in Sitecore with the already verified DKIM?
Comment: Please provide Verison of EXM.
Answer: In EXM, using Sitecore's Email Cloud Delivery service (EXM 3.4+), you have to use the DKIM Keys that are provided to you by Sitecore. This is how Sitecore recognizes that your domain is reputable.
You can find the DKIM keys in that screen by double clicking on the domain or by using the eyeball button.
From there, you should be presented a similar window to the image below where the new DKIM keys are supplied.  You will want to have someone in charge of your DNS server records to update the DKIM for the domain in question and add these keys as a TXT Record. Also note, when making DNS changes, it can take as long as 72 hours for changes to take effect.

Once you have updated your domain keys, and Sitecore's Email Delivery Cloud Service recognizes the keys on the domain, you should see the DKIM box flip from a Yellow Triangle with an Exclamation Mark to a Green Check Mark.
Please note, this image is from EXM 3.3, but should be similar in looks.
Comment: Hi Peter! Thank You!  The initial verification actually came from the Sitecore Email Cloud Service (SparkPost). The Sitecore EXM/EDS was not fully set up when we verified the domain with SparkPost.  I will look into removing our current DKIM and starting the process again with our EXM/EDS up and running.
Answer: I have a somewhat related issue with EXM 3.3. A few notes in case they help.
Support have stated that the DKIM information displayed in the domain verification screen is incorrect. From SC support:
Please note that your DKIM values should be like this:
v=DKIM1; k=rsa; t=y; p=SOMEVERYLONGKEYVALUE
I believe "v=DKIM1;" was missing from the instructions on that screen
Also, the SPF record must be an exact match - you can't include additional domains in that SPF record the validation method doesn't understand the specification/syntax, it just looks for an exact match.


Stellar sent from Ledger Live (Nano s) without my authorization. Prior to this on six occasions small amounts were received

Question: I have been hacked as most of my Stellar Lumens were withdrawn from ledger Live (secured by Nano S) without my authority. Prior to the Stellar coins being withdrawn the Ledger Live Stellar account shows six tiny transactions received. This activity looks like phishing.  However can't see how Lumens could be withdrawn without Nano S being present. Can anyone help?
Answer: I am sorry to hear that you have been the victim of hacking.  My guess is that those tiny payments you received are spam, and that if you look at the memo field for them, you will see text that is promoting something, or a URL someone is trying to get you to click.
However, unless they get you to click a URL and sign a transaction that transfers funds out of your Ledger Nano account, those spam payments are harmless.  Annoying, but harmless.
It sounds like your issue is with the Ledger nano — it should be impossible for someone to authorize a payment without accessing that device to sign it — and so the best thing to do at this point is to contact Ledger support and see if they can help:
https://support.ledger.com/hc/en-us
Comment: Unfortunately, it appears you have been the victim of a scam.  There is no staking on Stellar.  If you look closely at the email address that contacted you, you will likely find that it is not from `@stellar.org`.  Likewise, the URL of the site you visited will likely resemble `https://www.stellar.org/`, but it will be _slightly_ different.  For more info, please see: https://www.stellar.org/blog/stellar-security-guide-protect-scammers


How can I see files in public_html on my Godaddy hosting?

Question: I bought a hosting without domain name from Godaddy. I added some files in public_html directory using FTP and godaddy online file manager. I have an ip address to reach that hosting, lets name it 184.108.40.206. I should be able to see my files when i open 220.127.116.11/filename.php. When i try it, a "file not found" error appears, although "Preview Website" function which is in the cpanel shows correct files. How can i set it?
Answer: You are right regarding the preview part, it works because godaddy executes the files and pushes it to your client from its IP which allows incoming connection (Since IP is known, no issues of DNS).
The reason why it does not work with the IP you allotted is because of DNS.  For your browser to know what the host (IP in your case) points to, it looks up at DNS of your ISP, or Google DNS (220.127.116.11).  It does not find any entry matching your IP, hence you are not forwarded.
Solution
You would need to buy a domain.  Then set up your hosting IP to that domain.  Then when you enter the domain name - your client will lookup DNS, will resolve the IP, then it will go to your hosting page and render your site.


Atmel SWD. Enabling normal GPIO function on the SWO pin

Question: I'm trying to make a project using the ATSAM4LS2A microcontroller (Cortex M4), and i'm using the AtmelICE debugger. The thing is the pinout for the SWD mode also has, beside the SWCLK and SWDIO pins, also the SWO pin (which should be optional). The problem is that the SWO pin is the same as the SCLK pin that i'm using for the SPI (trying to talk to a CC1101 transceiver).
Even if i don't connect the SWO pin, when i'm debugging and trying to read a byte from SPI i always get 0, even though i'm pretty sure it should be different.
So, my first question is, how would i be able to test that the SCLK pin in working in SCLK mode and not SWO mode?
Second question: How can i disable the SWO pin in case it isn't disabled automatically when it is not connected? (if possible).
Thanks.
Comment: There should be some kind of "function select" register, defining the function of this pin. Look at the datasheet/prog manual.
Comment: When you say _while I'm debugging_, do you mean you have an active toolchain connection over SWD concurrently? It is possible that the toolchain has done some default configuration to 'help' you. I can tell you for sure, SWO doesn't know if you connected to monitor it, the protocol is all one-way.
Answer: I kinda forgot i posted this question here, but in the meantime I found the answer on some other site that I can't find right now.
You can disable the SWO functionality simply through this code:
<code>#include <core_cm4.h>
void disableSWO(void)
{
    CoreDebug_Type *core = CoreDebug_BASE;
    core->DEMCR = (0<<CoreDebug_DEMCR_TRCENA_Pos);
}
</code>
Just call disableSWO() and SWO pin is disabled. I could debug while still keeping the SPI working.


Cormen's "Algorithms" pre-requisites

Question: What to recommend as a pre-requisite reading before Cormen's "Algorithms" to make this book easier to get through for 10-12th graders? Any courseware available for kids, books, courses, etc.?
Comment: Are you referring to **CLRS**?
Comment: What kind of background do the kids have before you get them?  If they're coming from absolutely zero, then that is a very different question than if they've taken some sort of **cs1** equivalent.
Comment: Yes. Basically, I need preliminary curricula or something like that to give it out as an additional reading before the course.
Comment: Already found the answer from Cormen himself: https://www.quora.com/What-textbook-did-the-CLRS-authors-use-before-CLRS But it's sill interesting who's using which courseware in their local environments. Because Cormen works with Ivy league students, their background is a way different than of regular students.
Comment: Zero background, we don't suppose any background like LOGO or Pascal-based programming foundations before.
Answer: Basically some experience with Discrete Mathematics and Probability , elementary Calculus is also recommend. And students are expected to be familiar with mathematical proofs, proofs by induction and good knowledge of a programming language.
An Excerpt From CLRS

What are the prerequisites for reading this book?

You should have some programming experience. In particular, you should understand recursive procedures and simple data structures such as arrays and linked lists.

You should have some facility with mathematical proofs, and especially proofs by mathematical induction. A few portions of the book rely on some knowledge of elementary calculus.

From a OpenCourseWare course thought by Prof. Charles Leiserson (The L in CLRS) based on CLRS in Fall of 2008

This course teaches techniques for the design and analysis of efficient algorithms, emphasizing methods useful in practice. Topics covered include: sorting; search trees, heaps, and hashing; divide-and-conquer; dynamic programming; amortized analysis; graph algorithms; shortest paths; network flow; computational geometry; number-theoretic algorithms; polynomial and matrix calculations; caching; and parallel computing.

Prerequisites: A strong understanding of programming and a solid background in discrete mathematics, including probability, are necessary prerequisites to this course.

These are the prerequisite courses recommended for Introduction to Algorithms

6.001 Structure and Interpretation of Computer Programs

This course introduces students to the principles of computation. Upon completion of 6.001, students should be able to explain and apply the basic methods from programming languages to analyze computational systems, and to generate computational solutions to abstract problems.

6.042J / 18.062J Mathematics for Computer Science

This course covers elementary discrete mathematics for computer science and engineering. It emphasizes mathematical definitions and proofs as well as applicable methods. Topics include formal logic notation, proof methods; induction, well-ordering; sets, relations; elementary graph theory; integer congruences; asymptotic notation and growth of functions; permutations and combinations, counting principles; discrete probability. Further selected topics may also be covered, such as recursive definition and structural induction; state machines and invariants; recurrences; generating functions.

Professor Cormen's answer on this subject

We assume that the reader has some programming experience, including recursion, and knows how to read and write rigorous mathematical proofs. The discrete mathematics facts needed to analyze the algorithms in the book appear in the appendices.

More of Professor Cormen's answers

First, it's possible that you do not have the mathematical sophistication to follow all the mathematics in the book. You should have had a discrete mathematics course or, at the very least, know how to read and write proofs. The mathematical foundations appear in the four appendix chapters.
Comment: Having taken 6.001 and Algorithms (from Leiserson), I disagree with the recommendation of 6.001. Substitute your local programming course.

Cormen's "Algorithms" pre-requisites


What does Krishna say in Bhagavad Gita about his relationships to the Tri-murtis?

Question: Does he say that Vishnu & him are the same?  Interestingly, the word "narayana" never occurs in the Gita.  Does he say that the other Gods are all parts of him?
Comment: Krishna was in Union with Supreme Brahman at time of Gita recitation. When Arjuna asks Gita again , Krishna says he can't repeat again since he was in Yoga with Brahman at that time. [Anugita](http://www.sacred-texts.com/hin/m14/m14016.htm) of Mahabharata."O Dhananjaya, to repeat, in detail, all that I said on that occasion. That religion (about which I discoursed to thee then) is more than sufficient for understanding Brahma. I cannot discourse on it again in detail. I discoursed to thee on Supreme Brahma, having concentrated myself in Yoga."
Comment: No, he says he is VIshnu among Adityas & so Shankar among Rudras. But interestingly in VIshwaroop Darshan all were witnessed by Arjuna except Vishnu & Shiva. Although Arjuna call him Vishnu. See this also. https://hinduism.stackexchange.com/questions/22239/what-actually-is-vishvaroop-darshan/23664#23664
Comment: @TheDestroyer a person in yoga doesn't lose his individuality, what do you mean that all of Shankara's works were written by brahman because he was in yoga with brahman throughout his lifetime?
Comment: @AnubhavJha I don't know whether He was in yoga or not but I'm sure that He can repeat BG any number of times. There must be some tactical reason for saying that He cannot repeat. Krishna's actions are hard to understand
Comment: @AnubhavJha Who call Isam Shiva often says Sri Rudram is dedicated to Narsimha as well.  :)
Comment: @Rohith. I do not say Sri rudram is for narsimhan, I'm quite content with all the mention of bhagvan Vishnu in Vedas.
Comment: @AnubhavJha FYI, I neither believe Lord Vishnu is Jiva subject to death & birth nor I believe he isn't capable to grant Moksha. I believe Lord Vishnu  is equally capable to grant Moksha.
Comment: @Rohith. Arjuna also saw Shiva. It is said as Isham. It is misinterpretation to some who don't want to accept that Shiva was seen. According to some commentators, he saw Shiva also. Now, you will not listen to it and close your ears.
Comment: @TheDestroyer also the verse you gave doesn't say anything about "yoga with brahman" he says on Brahma as in topic was brahman, yoga means concentrating oneself, Lord Krishna was a avatar he needed concentration too.
Comment: @TheDestroyer so ishvar isn't all intellignt as per shankara? Ishvar forgets? He is overcome by ignorance at times? Btw wht uve sited is a translation of max muller, a western indologist.
Comment: @AnubhavJha Who said Lord Krishna needs concentration?
Comment: @KrishnaShweta so you believe he was in yoga?
Answer: Trinity is partially present but outside of Vishwaroop Darshan - Shankar as Rudra & Vishnu as Aditya - Vamana form. In Vishroop darshan only Lord Brahma is present according to non Vaishnava translation.
Shankar form -

रुद्राणां शङ्करश्चास्मि वित्तेशो यक्षरक्षसाम् |
  वसूनां पावकश्चास्मि मेरु: शिखरिणामहम् || BG 11.23||
Amongst the Rudras know me to be Shankar; amongst the demons I am Kuber. I am Agni amongst the Vasus and Meru amongst the mountains.

Aditya form -

आदित्यानामहं विष्णुर्ज्योतिषां रविरंशुमान् | मरीचिर्मरुतामस्मि
  नक्षत्राणामहं शशी || 21||
Amongst the twelve sons of Aditi I am Vishnu; amongst luminous objects I am the sun. Know me to be Marichi amongst the Maruts, and the moon amongst the stars in the night sky.

Now, in Vishwaroop form which was of KAl, Only Lord Brahman is witnessed.

पश्यामि देवांस्तव देव देहे
  सर्वांस्तथा भूतविशेषसङ्घान् |
  ब्रह्माणमीशं कमलासनस्थ-
  मृषींश्च सर्वानुरगांश्च दिव्यान् || 15||
  O God, I see assembled all the gods and various beings in your body, Lord Brahman, seated on a lotus seat, and all the dazzling Rsish and heavenly serpents.

But Vaishnava scholars somehow put the name Lord Shiva in Vishwaroop Dharshan But it is not present in secular or unbiased work. Like see the commentary of Adi ShankarAchArya on the verse with translation, you won't find Shiva anywhere. -

I see all the Gods, 0 God, in thy body,
  as also hosts of various classes of beings : Brahma,.
  the Lord, seated on the lotus-seat, and all Rishis
  and heavenly serpents.
Commentary: Various classes of beings : both animate and inanimate,
  and of various forms. Brahma - the Four-faced, the Lord of
  creatures. He is seated in the centre of the Earth-Lotus,
  on the Meru which forms the cup or seed-vessel as it were of
  the Earth-Lotus. Rishis: such as Vasishtha. Serpents: such as Vasuki.
Comment: Also Lord Vishnu is beyond kal, he is beyond time.
Comment: @Sarvabhouma Secular & unbiased is the mind without Jiva status of Shiva.  "As I said already in the comments, some close their eyes which say Shiva is also seen in Krishna" -- As you said as if you are an authority to me? Your or any Vaishnava explanation on Shiva is not valuable to me.
Comment: That is what I said some close their eyes. BTW, Kala is a form of Vishnu which is explained in [Vishnu Purana](https://hinduism.stackexchange.com/a/20775/5212). Some close their eyes for this also.
Comment: Wat is secular and unbiased here? As I said already in the comments, some close their eyes which say Shiva is also seen in Krishna. Who is kai? Do you mean Kala? Use proper transliteration.
Comment: **Vishvaroop was of Lord Vishnu**, he is brahman. Kal is a vibhuti of Vishnu aksaranam a-karo 'smi dvandvah samasikasya ca aham evaksayah **kalo** dhataham visvato-mukhah SYNONYMS aksaranam—of letters; akarah—the first; asmi—I am; dvandvah—dual; samasikasya—compounds; ca—and; aham—I am; eva—certainly; aksayah—eternal; **kalah—time**; dhata—creator; aham—I am; visvato-mukhah—Brahma. "TRANSLATION Of letters I am the letter A, and among compounds I am the dual word. **I am also inexhaustable time,** and of creators I am Brahma, whose manifold faces turn everywhere."
Answer: Yes, Krishna did say in the Bhagavad Gita that He is Vishnu. The Bhagavad Gita 10.21 states:

Of the Adityas I am Vishnu, of lights I am the radiant sun, of the Maruts I am Marici, and among the stars I am the moon. (Bhagavad Gita 10.21)

In the eleventh chapter of the Bhagavad Gita where Lord Krishna showed His Vishwaroopam form to Arjuna, the latter addresses Him twice as Vishnu Himself:

O all-pervading Vishnu, seeing You with Your many radiant colors touching the sky, Your gaping mouths, and Your great glowing eyes, my mind is perturbed by fear. I can no longer maintain my steadiness or equilibrium of mind. (Bhagavad Gita 11.24)
O Vishnu, I see You devouring all people from all sides with Your flaming mouths. Covering all the universe with Your effulgence, You are manifest with terrible, scorching rays.(Bhagavad Gita 11.30)

This clearly shows Krishna is Sriman Narayana Himself.
Krishna in Bhagavad Gita 10.23 says He is Shiva Himself:

Amongst the Rudras I am Shankara, of the Yakshas and Rakshasas I am the Lord of wealth (Kubera), of the Vasus I am Agni, and of mountains I am Meru. (Bhagavad Gita 10.23)

In the Bhagavad Gita 10.33, Krishna says:

Of letters I am the letter A, and among compound words I am the dual compound. I am also inexhaustible time, and of creators I am Brahma. (Bhagavad Gita 10.33)

This indicates clearly that the Trimurti are non-different from each other.
Also, Arjuna mentions both Brahma and Shiva while describing Krishna's Vishwaroopam form in the eleventh chapter:

Arjuna said: O Shree Krishna, I behold within your body all the gods and hosts of different beings. I see Brahma seated on the lotus flower; I see Shiva, all the sages, and the celestial serpents. (Bhagavad Gita 11.15)
Comment: @SuryaKantaBoseChowdhury chapter 11 verse 15.
Comment: @SuryaKantaBoseChowdhury It would be always better to quote exact Sanskrit verses, since each name of God has different interpretation in different philosophies.
Comment: Brahma is mentioned a second time in vibhutis too- https://www.holy-bhagavad-gita.org/chapter/10/verse/33
Comment: Actually Brahma is mentioned in geeta.
Comment: It is SHankar not SHiva
Comment: @AnubhavJha Which verse?
Comment: @TheDestroyer Um, okay, I'll add it.


Is my orchard property, particularly the house, able to become a restaurant?

Question: The house resides in the middle of an orchard. I'd like to retrofit my "empty nest" home into a restaurant similar to this one, but I believe there may be zoning laws that could prevent me from doing this. My question is, can this be done and what kind of resources should I be reading to get a better understanding as to how to pursue this professionally?
Comment: Where are you located? If you're in the US, the local zoning board would be the first people to talk to.
Answer: Opening a business in a location that was once a residence will involve many aspects of laws and ordinances that are very localized in nature, including zoning for the land parcel, health regulations for the food-oriented business, and building fire and safety regulations for the structure.
Since those laws will be very localized, the best that anyone can say is that you should start with asking at your local city hall - if the property is located within a city or township - as well as your county government offices.
Both will be able to give you a checklist for all of the local laws that will apply to your situation and how to go about applying for zoning variances, if needed, getting structure and fire inspections, and licenses and permits for all work needed to convert the house, as well as health inspections once the restaurant is in operation.
There also may be a local chamber of commerce that can help you navigate the process to open such a business, help with dealing with banks, contractors, marketing the new business, etc.


Which car is faster? F1 2021 or F1 2022

Question: We saw that Mercedes has porpoising problems on their 2022 car, but in 2021, the vehicle dominates the circuit like Redbulls. Let us consider that Lewis Hamilton uses a 2021 car to compete in 2022, but Verstappen and Leclerc use 2022, which is faster and will become more dominant in the circuit. Does the 2021 Mercedes car that has no porpoising issue is quicker or the 2022 Redbulls and Ferrari cars because it has a better newly upgraded one?
Comment: Just to be clear, the question "who would win this race" is not answerable - just opinion.  The question "is the 2022 car faster/slower than the 2021 car on balance" is answerable (at least, to some extent).  And if you wanted to know the answer to a *hypothetical* related to porpoising specifically, you probably would need to ask more concretely what impact porpoising is having - just asking whether the hypothetical non-porpoising 2022 car would be faster than 2021 is probably not answerable.
Answer: 2022 and 2021 are different, so they won't always have a set "one is faster", but for the most part, 2022 will be slower.  The cars are significantly heavier - 50kg, out of 750kg - and have some other changes that will make them a bit slower.  These changes in particular seem to affect their cornering in a negative speed way; tracks with less tight cornering will not see this difference as much, and in some circumstances the changes could cause a faster speed - but given the significant weight difference, probably not too much.
This video comparing 2022 to 2021 pole qualifiers for Bahrain explains this in detail.  Verstappen qualified over 1.5s faster in 2021 than Leclerc's pole winning qualifier in 2022.
However, it's possible this will change as drivers adjust.  The differences in the aerodynamics (Ground force focused instead of aerodynamic downforce) leads to the car being faster on a straightaway, but the various changes have required slower minimum speeds on tight turns.  Undoubtedly the professionals will figure out how to balance that.  It's possible that the drivers may end up a similar speed to 2021 by the end, depending on the racetrack layout and the day's conditions.  For example, note the quote from Pirelli:

Speaking on the final day of last year's test, Pirelli's head of F1 Mario Isola said he believes lap times could be quicker "in all the circuits where you have high-speed corners – I can imagine Silverstone, Suzuka, probably Spa".

The porpoising issue is unclear whether it will affect speed or not.  If they do have to raise the cars slightly to avoid it (that being the fix - setting the ride height high enough they never lose the downforce), it may slow the cars down a bit, but that's unclear for now, or if they'll find another solution.
Also to possibly correct a misconception - the fact that 2022 is newly upgraded doesn't mean it's faster.  F1 cars could be much faster, if they wanted to let them be.  They're designed to work at, roughly, a certain speed range in order to make for interesting racing.  One of the major reasons for the changes in 2022 (which have been in development since 2019!) was to make races more interesting, to make it easier for a trailing racer to catch up (as prior, a trailing car would lose some of its downforce when close behind another car - but ground effect doesn't have this problem).  See this video from F1 explaining the changes and why they made them.  There's no official word, but gossip suggested they had hoped the cars be a few seconds faster - and according to Motorsport Week:

F1 expected these new cars to be around 2.5s/lap slower than their predecessors with the downforce slashed.

But they go on to say it may not be slower.
Ultimately, your answer is that most likely the 2022 car is slightly slower than 2021, maybe a few seconds per lap, pending drivers adjusting to the new car and also pending results of the porpoising investigations.

Which car is faster? F1 2021 or F1 2022


Wordpress manually installed on a remote server

Question: I followed all these steps but I can access my web site only as an administrator. The pages that I create inside the wordpress web app are not being shown from a browser or I can't find their exact link or something... Why is that so? (I have never installed a wordpress on a remote server before).
Answer: Do this.

upload fresh wordpress on your remote server or install it from the cpanel.
then create a database.
then export all the table and data from the local database and import it in to the remote database (if the tables is exist in remote database then drop it.)
then go to the tabel wp_options and find the 'siteurl' and change the url to your remote url and then find 'home' and change the url to your remote url
then you have to change database name, username, password, and host in wp-congif.php file.
now upload all you themes and plugin in the fresh wordpress on remote server.

now run the live site.
if wordpress ask you to update the site then do it. it will not affect to your data.
thats it.
Comment: I have the remote database with the values for siteurl and home being the same, that is the folder blog but when I insert the siteurl to the browser it appears nothing.
Comment: ohh ya sorry then you have to change database name, username, password, and host in wp-congif.php file.
Comment: sorry, but i've done these changes to wp-config, too. but the problem remains...
Comment: can u give me your site url??


Remap caps lock in macOS Ventura

Question: There used to be an easy way to remap caps lock to escape in older versions, and in fact that setting remained for the keyboards I had used prior to upgrading to Ventura. Now I need to enable this setting on a new keyboard. Where has it moved to?
Answer: It's under System Settings -> Keyboard -> Keyboard Shortcuts... -> Modifier Keys
Comment: Thanks very much!
Answer: I was in a similar situation but needed to remap it to shift. Let me paraphrase my answer for "Switch the keys caps lock and shift" (SuperUser).

Unfortunately, left Shift isn't listed as per the
conventional way, the other keys are. See it at System
Preferences->Keyboard, then select the "Modifier Keys" button.

Karabiner-Elements is excellent and I'm using it for a few months
after it fixed my issue. Follow the basic instructions listed for
installing it on their repo page. As of Aug 2023, it supports macOS 11
Big Sur and above.
Remapping is as simple as heading over to "Simple Modifications"->"For
all devices"->"Add item". Both Caps Lock and left
Shift as listed under "Modifier keys" in the dropdown menu.
Comment: linking [Key remapping without Karabiner](https://apple.stackexchange.com/q/154188/)

Remap caps lock in macOS Ventura


How do you set sea level elevation to white in terrain analysis?

Question: I have ASTER files I am working with to create a shaded relief background for some other vector shapefiles. In experimenting with different color-elevation options, I am unable to have the Terrain Analysis tool make the surrounding ocean white in color. I have tried manually adding a white color for elevation values 0.0 to 0.0, but no dice. Going to the Table of Contents->Properties and selecting a different color scheme just replaces the Terrain Analysis colors and I have to re-do Terrain Analysis (although that is likely because I don't know how to 'undo' the color change when the 'undo' option is not available). Does anyone have a solution?
Answer: OK, after some experimentation I have a solution, although it may not be the most efficient one. Go to Table of Contents->Transparency->Custom transparency options. Select a Transparency band from the dropdown menu, and click the plus button to the right of the menu and select a transparency value. Or click the button option to the right of the window, "Add values from display." I then click the ocean sea and set transparency to 100%.
EDIT: However, this process reveals many "pits" in flat areas and fills them white. So my original question stands--any solutions???


Electric heating rod

Question: I usually heat my bathing water with electric heating rod, I always thought that the base of rod is an insulator so that it can develop high heat. But when I tried touching water while rod was dipped in it, I got current, damn! Why that happened?
I am talking about this type of rod :
Answer: This device looks like a inherently bad idea safety-wise, for the reason you found.  I don't know what exactly is inside the handle, but you have to assume all it is doing is connecting wall power to a resistive heating element.
I imagine the outside of the heating element is intended to be insulated from everything else.  (By the way, this has nothing at all do to with its ability to make heat.  In fact, the heating element can't be made from a insulator else its resistance would be high and no heat would be generated.)  Even if that insulation is intact and working, there could be some capacitive pickup from the input power to what appears to be a metal jacket of the heating element.  This is what you may have felt.
However, if water got into the handle part, then all bets are off.  It is probably sealed, at least enough to look sealed or pass some sort of test when new.  I would be very careful to never let the handle part get wet anyways.  Stuff happens.  Does the power plug have two prongs or three?  If three, maybe the metal jacket around the heating element is grounded.  That would help in most cases, but can also make things worse in other cases.
Clearly something is already not right with this device if you felt a shock.  I would ditch it, find a proper way to heat water, and move on.  If think Murphy's law and the laws of physics don't apply to you, then at least only use this device on a circuit with a ground fault interruptor or with a separate isolation transformer.
Comment: Whoever downvoted this, what exactly do you think is incorrect, misleading, badly written, etc? Silent downvotes do this site a disservice.
Comment: I downvoted this. all of my questions are downvoted in the same way i.e silently . i think mine and your comments are not-constructive. there's nothing incorrect in your answer.
Comment: Retribution downvotes are really not a good idea, especially since you can't know who downvoted your post unless they tell you. I just looked, and your post got two upvotes and two downvotes, but none of them (either way) were mine. Personally, I reserve my upvotes and downvotes to only apply to the content of the particular question or answer that I'm voting on.
Comment: Please don't misunderstand me. i downvoted your answer because i found it not useful. there's nothing like retribution.
Answer: The reason why you got electric shock is because the way you kept it in the bucket is improper or device is faulty. You might have noticed that there is an aluminum hook along with the plate extending which marks min and max water level marking.  It should be in contact with water.  This plate and hook is connected to earth.  It ensure water in the bucket is earthed.  I opened it to see.  I can't attach a picture.  Try yourself opening.  It only ensure you are safe only when earthing of your home is good.  It should have been designed such a way that it will work only when earthing is proper.  Almost all these type of water heater has same arrangement inside.  And so its not a safe device.  As Olin mentioned earlier it cant be made out of insulator just because it doesn't heat up as required.
Answer:
"I always thought that the base of rod is an insulator so that it can develop high heat. But..."
Let me correct you here:Base isn't an insulator moreover if it is then heat generated($V^2/R$) will be very low. The device you shown has heating elements covered with aluminium at the base.

Usually house hold AC Current flows from phase terminal to the neutral terminal through the Load and connecting wires connected between Phase and neutral terminal.  A ground wire is always connected with such kind of electric equipments. If you felt current then it means ground wire connection is missing from the equipment or is faulty.
Water is acting like a resister connected in parallel with the rod. When you touched the water some current flown from phase terminal through water and your body towards the Earth.
Remaining part of total current  gone to the neutral terminal. Since an average human body and bathing water are not of very high resistances so some observable current flown through your body which is fatal for your body.
A similar situation is shown here:
(source: mikeholt.com)
Body of drill machine and the person acts as a parallel resistance to phase terminal.
Comment: I doubt that the coil-looking part of the heating element has anything to do with magnetics. That is simply a way of making a long heating element fit into a small space. At most there are 5 turns, which isn't going to create much of a magnetic field. Its effect over the relatively large volume of water inside the coil is going to be insignificant compared to the obvious heating by conduction from the heating element.  In any case, running a 50 or 60 Hz magnetic field thru ordinary water isn't going to do much.
Comment: The heating element appears to have a aluminum jacket.  This is almost certainly insulated from the resistor inside, but there will be some capacitance from the jacket to the resistor, which is connected to line power.  Since this line power is AC, a little current can flow thru the capacitor, perhaps enough to feel.  However, more likely, water got into the handle and made a resistive connection between the jacket and the hot wide of the AC line.

Electric heating rod


video artifacts

Question: My wife is using her Panasonic lumix to shoot video. She gets great shots of wildlife. The issue is that shots of flying birds, ducks or eagles or whatever is happening, appear to have 4 wings. Most shots are well lit. ISO is set to 100. Is there a setting to fix this problem?
Comment: Welcome to Video Production. Adding some example images to your question would help people to answer it. Sounds a bit like the "rod" phenomenon, which had credulous people convinced there were rod shaped insects that were invisible to the naked eye but not to video cameras: https://en.wikipedia.org/wiki/Rod_%28optics%29
Answer: It sounds like you're seeing motion blur. For stills you would increase the shutter speed. For video, you need to decrease the shutter angle. Essentially, the shutter angle determines how long the shutter is open for each frame of video. So for video at 30fps, it can never be slower than 1/30th of a second. But it can be faster!
For example at 30fps, if you set the shutter angle to 360°, you'll get 1/30th of a second for each frame of video. If you set it to 180°, you'll get 1/60th of a second, and so on.

video artifacts


Can you identify this type of thistle? Should I go ahead and just shoot myself now, or are these the annual/biennial type and there's a hope?

Question: From all the descriptions I've read online, this looks like Canada Thistle, with the exception of the hairy stems. I live in Maryland just outside DC.  My foundation beds are full of these.
Comment: I never heard of a japanese doing harakiri because of a thistle in his garden - so I don't think you should shoot yourself either.
Answer: Doesn't matter which type they are, if you didn't see them last year, now's the time to deal with them, or even if you did see them last year, in fact. Whether they're annual, biennial or perennial is irrelevant because you shouldn't ignore them; annual and biennial ones will set copious seed and pop up everywhere next year and there'll be even more of them. And absolutely not a reason to shoot yourself - maybe a reason to groan a lot, and yes, it's tiresome, but they're just plants you don't want, not a nuclear event! The way to tell which they are is to wait till the flowers arrive, but that's absolutely not a good idea. Just get them out, now, wearing thick gloves, using a garden fork, and get out as much root as you can. If they keep coming back, you may need to resort to a herbicide, but only as a last resort. Info here on how to deal with thistles (especially the Canadian type) http://homeguides.sfgate.com/way-rid-thistles-garden-100512.html
Comment: And totally agree with what you said about not waiting til they flower. Everything I've read online says you can identify them by the flower... there is no chance in hell I'm going to let these things flower!
Comment: Thanks. I read that if it's the Canada type, you shouldn't pull them because each time you split the root it can result in 2 more growths. I did see them last year when we moved into the house, not realizing at the time what they were or how big of a problem they were. I have been trying to stay on top of them this year, but it seems like they are literally growing faster than I can stay on top of.  At least they're the annual/biennial type I would benefit from staying on top of them, but if perennial the root system might have won. I am not going to shoot myself, just being dramatic.
Comment: I know you were joking about killing yourself! Just trying to get you to see that its not that bad... but a right pain in the proverbial, admittedly. if you look at the link provided, it specifically tells you what to do if its Canadian thistle - 'pulling', no, digging out, yes...


Tamil poetess Avai said that Lord Shiva is the Supreme god of all?

Question: In a poetic song Avaiyar said that lord Bharama was born from Lord Vishnu's navel where Lord Vishnu born from ocean and where ocean adapted into saga Gurumoni's vessel and he born from kalasam and the length of kalasha is same as Adisesa's one head and he adapts in Lord Parvathi's small ring and she is always under Lord Shiva. So Lord Shiva is the supreme of all gods !
Upto my knowledge Avai never praise Lord Vishnu who is considered to be same as Lord Shiva. Why? Is Lord Shiva and Vishnu are same ? If so why Avai never say any thing about Lord vishnu ?
Comment: What is your question? Shaivaites consider Shiva as supreme and Vaishnavites consider Vishnu as supreme. He is Brahman by common name. I'm closing your question as unclear.
Comment: The continuation is Lord Shiva is always in his devotee's heart so the devotee is Supreme.
Comment: Besides what is your question?
Comment: @Surya The OP only wanted to share information and not ask question. New users don't know that "Ask a question" can/should only be used to ask question. For them, it is the way to share their knowledge.
Answer: Many siva devotees claim that lord siva is supreme. this is simply out of their attachment to lord siva. there is no truth to it. the scriptural evidence is

in siva purana, parvati asks lord siva - which is the best worship?

lord siva answers - out of all worships, worshipping vishnu is the supreme.

lord siva himself will be chanting the "taraka mantra" which is "sri rama rama rama"
Lord vishnu creates brahma from His navel, lord brahma creates lord siva from his eyebrows when he was angry. because lord siva was born from anger of brahma, he is called rudra. so, siva is a created being but no one created vishnu. He is the original creator. creator and created can not be equal


Help me learn to be a Salesforce Developer

Question: I am a fresher and planning to make my career in Salesforce. I really need help from experts.
What is the requirements and what should i know to become a salesforce developer?I am currently working as Java developer
Answer: I also came into Salesforce from Java. I recommend Salesforce trailhead.
https://developer.salesforce.com/trailhead/en
This is easy way to start with Salesforce, after completing developer and administrator trailhead, you will have solid basic knowledge of Salesforce platform.
For more advanced knowledge I recommend Force.com Workbook.
https://developer.salesforce.com/page/Force.com_workbook
This teaches you how to build applications on Force.com platform
Answer: I would strongly recommend https://developer.salesforce.com/trailhead/en along with http://www.sfdc99.com/ , which is a really helpful website to introduce someone into salesforce.
I would Also recommend Advanced apex Programming as a great book to learn best practices along with this :
https://developer.salesforce.com/page/Apex_Code_Best_Practices


Exclude collectives from search

Question: I can filter posts with collectives, like collective:"Google Cloud", but is there a way to exclude them from search, like I do with tags(-[tag])?
Comment: @nbk apples and oranges, the site search is the best tool if you want to do a filtered search (like finding things that still need answering), google is better if you seek an answer to a question you have yourself.
Comment: i must often switch to google to find things i want to use, with so many programmers there must be a better search
Comment: @Gimby the site earcch fidns absolutely nothing of omportance, i test this alsmost daily, the only think i ca fid when i go to my user page and enter specific search words that i know i have used
Comment: Thanks for pointing this out! I've updated the status of the question which will add the item to our backlog. Together with the dev team, we'll see how and when we could be doing this. We'll make sure to update this post whenever we have more clarity :).
Answer: The ability to exclude questions related to a specific Collective has been added to the search feature.  This is done using the syntax collective:-"Name" and results in a search that excludes all tags associated with the Collective.
For example, you can use collective:-"Google Cloud", which will give you search results as if you excluded every tag associated with the Google Cloud Collective:
Note: the in-product search tips/search help hasn't yet been updated to include this syntax.
Comment: Hold on, that sounds...broken.  As in, I think it does exactly what is advertised, which is blot out questions based on a collective, but that's a *whole lot* of exclusions.  If the collective includes too much then this could be an issue for folks looking for questions that are only tangentially related to a collective.
Comment: One use case is to search for questions that are not in the collective (due to not being tagged with a collective tag) but perhaps should be. Or to look for recently added tags that might be considered for inclusion.

Exclude collectives from search


Can RBF be used to change the value of a transaction?

Question: I understand that we can use RBF Protocol to replace a transaction with higher fees to get the transaction confirmed faster.
However, is it possible to use RBF to change the value of the transaction, or to set it to zero (in case of cancellation)?
Answer:
However, is it possible to use RBF to change the value of the transaction or zero value (in case of cancellation)?

Yes, there is no restriction on transactions only changing the fee. In fact, that's not possible in general, as increasing the fee implies at least one of:

Adding an additional input
Reducing or removing an output

The former may not be possible (e.g. if a wallet already has all its inputs in flight), and the latter typically involves reducing the amount sent as change back to the sender. Since the protocol has (intentionally) no way of knowing which output is change, the latter is inherently in conflict with a hypothetical "only fee changes allowed in RBF" policy.
So, RBF can be used for any transaction replacement whatsoever. Typical usage is just fee bumping (where non-change outputs remain the same), but the protocol has no way of enforcing this, and thus RBF recipients need to be aware that unconfirmed transactions may be replaced with another that doesn't pay the same people at all. In fact, this is true in general, as unconfirmed funds in Bitcoin are generally not secure - RBF or not.
Answer: Bitcoin Optech defines RBF as:

Replace-By-Fee (RBF) is a node policy that allows an unconfirmed
transaction in a mempool to be replaced with a different transaction
that spends at least one of the same inputs and which pays a higher
transaction fee.

It is generally assumed that the destination (address) and the funds being sent are the same for both the original transaction and the replacement transaction. The problem with changing the destination and/or the funds being sent is that there is no guarantee that this replacement transaction will make it into the blockchain first before the original transaction. You can try to get the replacement transaction into the blockchain first and the quicker you broadcast it and the higher the fee the better. But if the original transaction is being propagated across the network there is no way to stop it from getting into the blockchain if it is paying a sufficient fee rate. Hence RBF focuses on merely bumping the fee. With this use case if the original transaction gets into the blockchain before the replacement this is actually beneficial to the sender as they end up paying less fee than the fee in the replacement transaction.
If you think you might want to change the destination or the funds sent at a later time it is better to delay broadcasting the transaction until you are sure what you want to send.


How is the dialogue different from the original when beating a Koopa Kid while wearing a Frog Suit?

Question: According to this website, in the section labeled "I'll trade you for that wand..." you get different dialogue from the king if you beat a Koopa Kid while wearing a Frog, Hammer, or Tanooki suit. What is this dialogue, and how it it different from the original text?
Note: I haven't played Super Mario Bros. 3 before,
and so I don't know what the king's dialogue normally is.
Answer: The original text, if you beat the Koopa Kid with no suit on, says:

"Oh splendid, splendid! I am back to my old self again. Thank you so much. Here is a letter from the princess."

From this video.

Frog Suit:

If Mario or Luigi defeats a Koopaling while in Frog form, the restored king will say, "Oh me, oh my! You've been transformed! Shall I change you back with this wand?"

Also, here is a video of the special dialogue occurring with the frog suit.

Tanooki Suit:

In Super Mario Bros. 3, if Mario or Luigi defeats a Koopaling while wearing a Tanooki Suit, the restored king will say, "Thank you, kind raccoon. Please tell me your name."

Also, here is a video of the special dialogue occurring with the Tanooki suit.

Hammer suit:

"Hey you! How about lending me your clothes? No dice!? What a drag!" —Kings, Super Mario Bros. 3

Also, here is a video of the special dialogue occurring when Mario is wearing a hammer suit.
Comment: Good find, but this seems to only partially answer the question. The OP also asked how it differs from the original text
Comment: @Wondercricket Haha, missed that because of the title. I added the other dialogue for the other two suits.


What happens if an invalid opcode is executed on a 287/387 math coprocessor?

Question: https://groups.google.com/g/comp.os.msdos.programmer/c/Lds3MJAgSl0/m/y8zfPt-bMskJ I assume that the  287/387 math coprocessors do not have the same illegal opcode exception that the 286/386 processors had, right?
Comment: This was asked before, actually: . No answers yet though. Neither are any here.
Answer: TL;DR: There are no undefined operations, just reserved ones.

What happens if an invalid opcode is executed on a 287/387 math coprocessor?

There are none, only executable ones :))
The issue contains a bit more fine print and reading thereof than the question assumes, as multiple design goals and components are at work:
It's in the Parts
The FPU is an I/O device about providing IEEE 754 math, while the CPU is managing seamless integration of that device into a x86 system, making it look like a part of the CPU's ISA.
Viewed From the CPU's Siege Tower
For the 286/386 there are no invalid FPU opcodes. Any ESC-instruction (0D8h..0DFh) is a valid one. When the presence of an ESC-Instruction is detected it will be forwarded to the FPU via Port 0F8h followed by all operands via port 0FCh (see here for more details).
The behaviour of not interpreting any FPU opcode (past parameter addressing) is essential to allow future extensions. Thus each and every ESC is considered a valid operation that will be executed.
View From the FPU's Stronghold
A 287/387 FPU does not know any invalid opcodes either. Where 286/386 documentation label all undefined opcodes 'invalid' and executes an INT 06h, 287/387 documentation defines codes with no official function assigned them as 'reserved'. A classic hint about not expecting any behaviour.
All of them will execute, may it be a NOP, some duplicate or additional function. What is is is not publicly available ...
This sound a bit like the infamous 'illegal' 6502 opcodes, but it's rather a case akin to the unpublished 8085 additions. This becomes obvious when noting that the Intel own FORTRAN compiler produces faulty results when run with a Cyrix co-processor as this DoA report describes (Section 220.127.116.11. Cyrix Coprocessor on p.17).
According to that report the Intel FORTRAN compiler issued some of the reserved instruction encodings instead of their documented version. This shows that their functionality must have been documented to the compiler creators and guaranteed by implementation. Cyrix in contrast implemented them as straight NOP, the most clean way to handle them (*1).
Further Points

https://groups.google.com/g/comp.os.msdos.programmer/c/Lds3MJAgSl0/m/y8zfPt-bMskJ

This sounds more of a very 287XL specific issue.

I assume that the 287/387 math coprocessors do not have the same illegal opcode exception that the 286/386 processors had, right?

They don't have any exceptions at all - or better, they do not do any Interrupt like the CPUs do. A FPU may return one of several exceptions as part of an ESC/WAIT instruction (*2), which will result in an INT 10h Processor Extension Error, but 'illegal opcode' is none of them (*3). Also, turning an FPU exception into an INT is again the job of the CPU.

*1 - At that point one may speculate if this was simply due the compiler department using some very low level preliminary documentation from a point before it wasn't decided upon which encodings were to be published (*4), while for getting to correct this when the final decisions were made, or some kind of purposeful anti-competitive measure by inserting this usage, or at least  forgetting to make corrections before release. Being the positive chap I am, I of course go for the first :))
*2 - The FPU signals all non masked exceptions by activating the /ERROR pin.
*3 - All FPU exceptions are not related to (hardware) implementation but strictly related to logical FPU operation, as defined by the IEEE 754 standard.
*4 - This is normal. In-house compiler developers usually start with extrem early and only half way done documentation, as they are expected to deliver code even before the first silicone is done.
Comment: Some processor instruction sets, especially historically, were documented with "don't-care" bits in some of the instructions; in the 1970s and 1980s it wasn't clear that the ability to have later CPUs extend an instruction set would be useful, so there wasn't any reason not to mark as "don't care" bits that the hardware would ignore.
Comment: Indeed, unmasked FPU exceptions will cause /ERROR to be asserted on the FPU. This will only cause an INT10 to be triggered on the CPU if the FPU interface is realized as recommended by Intel (connecting /ERROR of the FPU to /ERROR of the CPU). It's worth at least a foot note that the most mainstream 286/287 system deviated at this point: The IBM AT routes FPU /ERROR via the PIC as IRQ13 to the CPU (because INT10 is used as video BIOS entry point on PC compatible systems).
Comment: @MichaelKarcher you mean beside that FPU exceptions are not part of the question :)) INT 16 is what the CPU does when detecting ERROR (Either when a WAIT is issued or another FPU instruction). THE PC rerouting this is due the way it was handled at the original PC. Another one of those dreaded compatibility quirks noone asked for and noone ever would have missed (and modern systems no longer need either)
Comment: The problem is not the 287XL here. The problem is IIT's FPUs.
Comment: @YuhongBao you may want to elaborate this to have it make sense - so far noone mentioned IIT in this context.
Comment: (*1) – It could of course also be that someone in the compiler department just tried it out and saw that what that opcode executed was more useful than what the documented ones did. And didn't care that it was not documented.
Comment: @PaŭloEbermann Not uncommon with external developers that start to work _after_ a chip is made, but manufacturer compilers are made _before_ there is any chip one could try out. They are already needed for simulation and first silicon testing. After all, it's way more suitable to throw some existing FORTRAN programs at a new chip. Real world code, not just some artificial assembly tests.
Answer: TL, DR; There is a difference between "valid" and "supported" opcodes. CPU knows which opcodes are valid and if a valid opcode is found, it is executed, and if it happens to be an ESCAPE opcode for FPU, it is sent to FPU for execution. What the FPU does with the opcode is another thing, it may or may not support all valid opcodes. It cannot tell the CPU if it supports the opcode or not. The FPU either does something with the opcode or not. If it is an unsuported opcode the FPU may do anything, like nothing, someting, or get stuck or destroy itself.
I think you are mixing two different contexts.
The instruction opcodes are fetched, decoded and executed by the CPU, and only the ESCAPE extension opcodes are sent to the FPU for execution.
So the CPU knows from the code stream that there are just instruction opcodes with certain addressing properties, such as if the opcode is valid and which CPU register or which memory address the CPU must use as data source or data target for an instruction.
And the formats of the all the instructions are known by the CPU and the FPU instructions don't differ from the CPU opcode formats. So if the opcode or the format of the opcode is invalid and cannot be executed, then decoding it will fail and invalid opcode exception is raised.
So it should not be possible to encounter an instruction that is not illegal, but the next thing is, the CPU does not know if the specific instruction is supported by the FPU or not. For example, you might not even have a FPU, so there is an option to trap all FPU instructions and run them in software on the CPU.
Of course third parties may make incompatible FPUs that do not implement all instructions. In these cases the CPU will work as usual and it tries to send the instruction and parameters to the FPU, and the FPU has no mechanism to signal that it did not understand or implement the instruction.
In the scenario you link to, the user has a 386 CPU with software that is intended to use with 387 FPU, but has installed a 287XL FPU, which is a 387SX with 287 pinout. As 387 was only later available and you only had 287XL for the early 386s, new programs may simply assume you have a 387, not a 387XL.
The 386 CPU knows what are valid 387 opcodes so you can execute any valid 387 opcodes. The FPU just does not implement all 387 opcodes because it is an 287XL with 16-bit interface.
It is up to the programmer, to run tests on the FPU to be able to determine if it is even present and which FPU it is to know which opcodes it is known to implement. In this case it could be detected as 287XL from the opcodes it supports, and from then on, only run instructions it implements.
This is not much different from detecting which CPU you have. Try to run an opcode and see if it executed properly or failed. The problem always is, when new CPUs/FPUs come to the market, even if it implements one instruction from a newer set, it does not mean it implements all instructions from a newer set, so an old test program may incorrectly and accidentally use that one insteuction and classify the chip incorretly as newer model and try running all features of newer model.
Comment: This may give the question some context, but does not answer it.
Comment: @user3840170 I've edited my answer. The CPU will detect "invalid" opcodes and won't send any commands to FPU that were "invalid" so you can't execute "invalid" instructions with the FPU. Now, the FPU does not need to implement all non-invalid commands, so if you manage to send an non-invalid opcode to FPU which it does not implement or support, there is no guarantee what happens. It might do something, nothing, halt the system, etc. Just like on any other system where you try to execute opcodes that are not specified.


making a few sites in wordpress

Question: I have just started to build in Wordpress, and my question is
how can I build a few website in WP?
After I  purchase domains, do I need to install the program every time I want to create a new site?
Comment: A quick google search for "wordpress multisite" leads to here: http://codex.wordpress.org/Create_A_Network probably all you need.
Answer: You can use WP Network to manage multiple websites through a single WP installation. But, It is not always recommended unless your scenario closely fits with its concept. If each of your website is exclusive to each other (each site require different set of plugins and theme) and you have just started to use WordPress, You should better go for individual installation of WordPress.

A multisite network is a collection of sites that all share the same
  WordPress installation. They can also share plugins and themes. The
  individual sites in the network are virtual sites in the sense that
  they do not have their own directories on your server, although they
  do have separate directories for media uploads within the shared
  installation, and they do have separate tables in the database.

Reference
Few points before you consider selecting WordPress Network.

Not every plugin is compatible with WP Network
If there is some problem occur with WP Network, all of your Network websites will be down
Currently, WP Network is configured for subdomains and subfolders only. You will need to configure your server to make it domain level.
Answer: Yes, you need to install WordPress each time, unless your specific needs are met by multisite. Luckily, it only takes 5 minutes or less :)
You can speed up the installation process by

Using the command line to download the latest version of WordPress directly to your server
Placing your own wp-config file in the root directory prior to doing the install, with the values already added

making a few sites in wordpress


Definition of the phrase חפצך אסור חפצי שמים מותר

Question: Can someone please explain to me what "חפצך אסור חפצי שמים מותר" means. Tractate shabbat 150a?
Answer: If the Torah had said ממצוא חפץ, it would mean that any דיבור חול would be asur. But now that the torah says ממצוא חפצך, we learn that your 'things', that is, which are not mitzvot are asur, but חפצי שמים, which is anything that is a mitzva, is mutar.
By the way, the gemara in the first part of the page gave a bunch of examples: calculations for money for the poor, or even for an individual poor person, and so on.
Comment: Making calculations is a problem, the whole reason why doing business on shabbat is assur  is because u might come down to write a חשבון. So wouldn't calculations still be a problem as not to come close to doing an issur d'eoraisa of writing
Answer: Isaiah 58:13 reads:

אִם-תָּשִׁיב מִשַּׁבָּת רַגְלֶךָ, עֲשׂוֹת חֲפָצֶךָ בְּיוֹם קָדְשִׁי
[I, God, will be happy] if you pause your feet on the Sabbath, and don't deal with your [business] matters on my holy day.

This is why it's not in the spirit of the day to talk business on Shabbos. However the Gemara says the prohibition is on "chafatzecha" -- YOUR
business matters. You are, however, allowed to discuss business matters pertaining to God; e.g. all sorts of logistical matters concerning mitzva activities such as finding a trade school for your son, a husband for your daughter, or communal medical needs.
(This is echoed in the Friday-night song mah yedidus, the verse chafatzecha bo assurim)


What is known about Asaph son of Berechiah?

Question: Is Asaph ben Berechiah the person mentioned in 1 Chronicles 16?
What else do we know about him?
Answer:
Asaph ben Berechiah (11th-10th cent BCE) Israelite musician. He was one of the Levites appointed by David to supervise music in the Sanctuary. Psalms 50 and 73-83 are attributed to him. The sons of Asaph were singers in the Temple during the reign of the kings of Judah (10th-6th cent, BCE) and at the time of Ezra and Nehemiah.

(source)
Answer: To your first question, yes, the Asaf mentioned in 1 Chronicles 16 is Asaf ben Berachiah.
To your second question:
Asaf was a prophet (see also here) and the head of the meshorerim from the Levite branch of Gershon during the time of King David. When comparing the number of generations of ancestors of the three heads of the meshorerim (Asaf, Heiman and Yedutun/Eitan) - based on the assumption that each name represents one generation - it seems that Asaf was the oldest of the three. Asaf's descendants continued serving both in the First Temple and in the Second. Asaf composed several chapters of Psalms: 50, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82 and 83.


Leaking shower tap

Question: Recently, I had to replace a seized Moen shower cartridge. In removing the old one, the brass piece the cartridge sits in was scored by a drill. It now leaks cold water when I turn on the faucet.
What can I do to this brass piece to smooth it out to stop the leaking?
Answer: Nightmare. DO NOT attempt to "fill it" as in some other answers, that will just make it worse.
The issue here is that you cannot polish, because it will not be flat in that case. It is absolutely essential that it be flat. You need to indicate exactly where the scratch is. Here is the assembly I think you are talking about:

Is this the correct assembly? If so, where is the scratch?
In general, what you have to do is make a mating part, basically a tube, that fits perfectly flat against seat to be ground. The tube end has to sanded absolutely flat using a pane of glass, for example. Then using either a loose abrasive or a ring of sandpaper about 600 grit you turn the tube against the seat and gradually grind out the scratch. Its time consuming.
You may want to consider replacing the whole part. Depends how much you value your time.
Comment: Agreed that replacement is almost certainly the best option.
Answer: If your soldering skills are good, you could try filling the gap with solder and shaping it to match the contour of the wall. Or maybe JB weld or some other hardening epoxy. Barring that, you're probably going to have to replace the manifold.
Answer: I wonder if some Bondic could help here.
I've never used the stuff, but I've heard the only real downside is that UV exposure can degrade it over time, which isn't a problem inside a plumbing fixture.
See http://notaglue.com/ and I'd be interested in anyone else's experiences with this stuff in this sort of application.
Comment: Are you at all affiliated with this product?
Comment: Nope. I've been wanting to give it a shot for a while now, but haven't found a use for it in my house.

Leaking shower tap


What is the best way to display multiple columns?

Question: I have been asked to come up with a solution for displaying 50+ columns that were  previously viewed in excel  and now need to be brought to the desktop application UI. Mobile version is out of scope.
Comment: Can you expand on this? What are the problems? What's wrong with just replicating like-for-like on the application? We need more information here about what the actual problem is that you need help with.
Comment: Is the issue trying to display ALL 50+ columns on the screen? Or do you want to know the best method for letting the user know there are additional columns off the screen?
Comment: Hi all...thanks for the quick reply and here is some more info. Because this data was previously viewed in excel, the user has a minimum expectation  to have a decent span of large columns of data at low zoom. So essentially my question is around displaying as much as possible at a time...I know there are several options around displaying columns as a group, etc. Any further ideas?
Answer: Consider the following:

Identify the columns that would likely to show first
Add big arrow at the right page (center of the page not at the bottom corner) '>', when user clicks - show remained columns
Freeze 1st or few left columns to get connect information with other columns when user click '>'
Add link / button at the bottom of the cell text if you find too much content not to be shown at first. By clicking the link / button can expand to reveal the remaining content of the cell.
Include truncated text if its understandable to reduce space
Keep in mind that, clicking big '>' should not be replaced the page, it should just replace the table content
Make sure, user will never lose the connectivity / continuity between the columns


How can I make an ERC721 NFT such that the token owner can edit an attribute in the metadata? Where can they edit the metadata?

Question: I've read that ERC721 tokens can be created such that the token owner can edit the on-chain metadata. I've been following tutorials for the brownie-nft mix and making NFTs on OpenSea, but I have yet to discover how the NFT owner can actually change the on-chain (or even off-chain) metadata. How can the token owner do this? Can the token owner do this in a marketplace such as OpenSea, or would they need to know solidity?
Comment: What do you call exactly the "token metadata" ?
Answer: To my knowledge, none of the marketplaces have this functionality of the owner being able to edit the metadata. But with that being said, there is nothing stopping you from including this functionality in your token contract.
But it also depends on what you mean with metadata. Usually, with metadata, we are referring to the name and symbol of the NFT. That's probably not what you are referring to. If someone should be able to edit that, it's probably the contract creator.
You probably mean other metadata tied to individual NFTs, like other properties or images. The most common way to include these is through a URI in the smart contract, which points to some JSON file somewhere which contain properties, images etc.
But there is nothing stopping you from having some of these properties in your smart contract, and letting the token owner edit them. Or you can let the token owner edit the token URI.
Then in order to make this usable for a normal NFT buyer, maybe you would have to build your own user interface to interact with these functions and change the properties. Because this is not standard functionality included in the ERC721 standard, so exchanges and marketplaces would not have this implemented.
Comment: Thanks Filip! Your response is very helpful and answered my questions, confirming my suspicions that what I wanted to do wasn't possible through the marketplaces currently. Patrick's answer was a bit more detailed so I gave it to him. I want to upvote your response but don't have the 15 reputation yet :-/
Comment: good call @Filip
Answer: It depends on how you code the NFT. But basically you'd have a function that updates the on-chain metadata and/or updates the tokenURI to reflect the changes, and you'd make it in such a way that only the token owner can call the function.
Yes, they would need to know solidity.
If you added a function to the NFT contract like:
function changeAttributes(uint256 newStat, uint256 tokenId, string memory newTokenURI) public {
    require(
            _isApprovedOrOwner(_msgSender(), tokenId),
            "ERC721: caller is not owner nor approved"
        );
    tokenIdToStat[tokenId] = newStats;
    _setTokenURI(tokenId, newTokenURI);
}

This could be a function that could change the stats and metadata of an NFT.

The require statement has a function called _isApprovedOrOwner which can be defined that only the owner of the NFT can change the stats.
The tokenIdToStat[tokenId] = newStat; is a mapping of on-chain attributes that make a tokenId to the "stats" or "attributes" that it has.
The _setTokenURI(tokenId, newTokenURI); line then updates the metadata tokenURI. This last part you'd have to update some tokenURI to reflect the new on-chain metadata.

On-Chain vs Off-Chain metadata
In order to have your NFTs interact with each other on-chain, you need to have on-chain metadata. As of right now, NFT marketplaces don't have a standard for reading on-chain metadata, so they all refer to the off-chain metadata found in the tokenURI.
If the NFT has only on-chain metadata, then the function like the one above would be sufficient for them to change metadata. If they have off-chain metadata, they would then additionally need to update the tokenURI with the new metadata. Ideally, you have on-chain metadata too, so that the attributes of the token are immortalized on-chain and not susceptible to centralized manipulation.
Comment: Thanks, Patrick! This is exactly what I needed. Particularly the confirmation that the user would need to know Solidity and that a function would be need to be included in the contract for it. Also, thanks for all the YouTube tutorials!
Answer: I'm also facing this same issue. I want to be able to update an NFT's metadata for a game. For example, an NFT for an RPG game where the metadata is keeping track of stats like health, strength, speed, level, etc. I see two potential solutions to this issue:

Metadata in a cloud database allowing you to easily and cheaply update an NFT's state
Metadata in IPFS, every update would mean you need to update the state of the smart contract to point to the new resource. This would have to be initiated by the NFT owner.
Comment: I was able to get Patrick's solution above to work on Rinkeby. Although I'm not concerned with changing the offchain metadata but it is only a matter of changing the tokenURI. If you haven't yet, work through Patrick's tutorial: https://www.youtube.com/watch?v=p36tXHX1JD8 then add Patrick's code above. You'll then need to make another file (call it change_metadata.py if writing in python) to call the function like: transaction = simple_collectible.changeAttributes(new_given_name, token_id, {"from": dev})


Multiplying two large matrices in VBA

Question: I need your help to multiply two matrices A and B in VBA.
where  A(1000000*3) and B(3*3)
mmult function doesn't work for multiplying large matrices. Any idea how this can be done.
Thank a lot in advance,
Comment: the matrix is just stored in a range?
Comment: sorry, what do you mean by range?
Comment: A has 1000000 rows and 3 columns; B has 3 rows and 3 columns.
Comment: Yes, but how did you store the Matrix A and B in Excel?
Comment: What about using Matlab or Scilab ?
Comment: @Marco Getrost, thanks for helping me. It's a big code but part of it which is related to this issue is as follow
Answer: My guess is that mmult is using 16-bit integers for its indices, which isn't enough to accommodate 1,000,000 rows. You can write your own function to take two variants containing arrays and returns a variant containing the product. It is enough to use Long rather than Integer for the index variables:
Function MatrixProduct(A As Variant, B As Variant) As Variant
    'Assumes that A,B are 1-based variant arrays

    Dim m As Long, n As Long, p As Long, i As Long, j As Long, k As Long
    Dim C As Variant

    If TypeName(A) = "Range" Then A = A.Value
    If TypeName(B) = "Range" Then B = B.Value

    m = UBound(A, 1)
    p = UBound(A, 2)
    If UBound(B, 1) <> p Then
        MatrixProduct = "Not Defined!"
        Exit Function
    End If
    n = UBound(B, 2)

    ReDim C(1 To m, 1 To n)
    For i = 1 To m
        For j = 1 To n
            For k = 1 To p
                C(i, j) = C(i, j) + A(i, k) * B(k, j)
            Next k
        Next j
    Next i
    MatrixProduct = C
End Function

To test this I wrote a function to create random matrices:
Function RandMatrix(m As Long, n As Long) As Variant
    Dim A As Variant
    Dim i As Long, j As Long
    ReDim A(1 To m, 1 To n)

    Randomize
    For i = 1 To m
        For j = 1 To n
            A(i, j) = Rnd()
        Next j
    Next i
    RandMatrix = A
End Function

And then I ran this:
Sub test()
    Dim start As Double
    Dim cases As Long
    Dim A As Variant, B As Variant, C As Variant

    cases = 1000000
    A = RandMatrix(cases, 3)
    B = RandMatrix(3, 3)
    start = Timer
    C = MatrixProduct(A, B)
    MsgBox (Timer - start) & " seconds to compute the product"

End Sub

On my machine it takes about 1.7 seconds.
Answer: @Marco Getrost
cases=1000000
c=3
 T is a 3*3 matrix
r = Application.MMult(randn(cases, c), T)

Function randn(rows As Variant, cols As Variant) As Variant
  Dim mymat() As Variant
  ReDim mymat(1 To rows, 1 To cols)
  Dim i, j As Variant
  For i = 1 To rows
    For j = 1 To cols
    mymat(i, j) = Application.NormInv(Rnd(), 0, 1)
    Next j
  Next i
  randn = mymat
End Function

Comment: This should be moved to be part of your question rather than an answer.

Multiplying two large matrices in VBA


Are Citrix Netscalers vulnerable to shellshock bash command?

Question: My enterprise environment is "protected" with reverse proxies, how safe am I?
Answer: Netscalers appear to be vulnerable!
Netscaler is running GNU bash, version 2.05b.0(1) , which is stated as vulnerable in http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-6271
Here is what I get:
root@ns# env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
vulnerable
this is a test
root@ns#
Response from Citrix on the ticket I raised:
" I would like to inform you that our security team is looking into this issue and this is under investigation, we are expecting an Update soon on this. "
while we wait for official fix release from Citrix you might have to use your IPS (in my case palo alto) signatures to deny such attacks for remote websites and keep watch/restrict management access on Netscaler .
Answer: Also note that there are two ways to mitigate this:
If you have the Web App Firewall feature on your NetScaler (Platinum Edition or Enterprise with the WAF license) we have a WAF Signature that can be downloaded from the website:
https://www.citrix.com/downloads/netscaler-adc/components/application-signature-protection-for-shellshock-vulnerability (Requires login.)
For those without the WAF feature, we have developed a Responder policy that can be enabled in all versions.  The CLI cmds to enable this are:

enable ns feature responder
add audit messageaction ShellShock_Log CRITICAL "\"The request was sent from \" +CLIENT.IP.SRC + \" Bash Code Injection Vulnerability\"" -bypassSafetyCheck YES
add responder policy ShellShock_policy "HTTP.REQ.FULL_HEADER.REGEX_MATCH(re/\(\)\s*{/) || HTTP.Req.BODY(1000).REGEX_MATCH(re/\(\s*\)/) || HTTP.REQ.URL.QUERY.REGEX_MATCH(re/\(\)\s*{/) || HTTP.REQ.BODY(1000).REGEX_MATCH(re#%28%29[+]*%7B#)" DROP -logAction ShellShock_Log
bind responder global ShellShock_policy 10 END -type REQ_DEFAULT
save config
Answer: Here's the official statement...
http://support.citrix.com/article/CTX200217
Citrix NetScaler ADC and NetScaler Gateway
We are not currently aware of any direct risk from this issue to the main traffic path for NetScaler vServer endpoints. Some risk may exist for management interfaces so, in line with existing best practice, we recommend that access to any NetScaler management interfaces are constrained to trusted users and networks only.
This guidance will be updated as our analysis continues.


Why do I keep getting free GTA V money from Rockstar? Is it safe to use?

Question: Every time I play GTA V on my Xbox One, Rockstar gives me $500,000. I don't play too often, and I only play about once every two weeks. This kept happening and I ended up getting a total of $4 million. I did not take advantage of this because I thought that was cheating. Anyways, I recently got onto GTA V Online and Rockstar messaged me saying not to cheat or hack and if I do, my account will get banned. I have had this account for about a year and a half now and I don't know what to do.
Answer: Sometimes Rockstar offer rebates on shark card purchases or for items a player has purchased that once cost money but are now free. I believe they've done it before to apologise for server downtime, and then sometimes they just give money away for free.
Feel free to spend they money you've received. I received $500,000 recently myself just because they felt like it.
Comment: But do you think I would get banned>
Comment: No, not for spending the money they've given. Rockstar are able to trace money back to its source so they will know if you've gained it legitmately or not.


How do you unlock skulls in Halo Anniversary?

Question: I have a feeling that it's tied to stuff in online mode.  Is this the only way to unlock skulls?
Comment: Do you need to know how you can find them or how you can enable the bonuses you get by finding them?
Answer: Skulls are generally unlocked by finding them in the single player levels, but they're hidden very well, and in some cases require you to take specific actions in order to be able to get to them.  In some cases it means jumping on top of a vehicle to get to a hidden location, and other times it means going the wrong way and exploring areas the game seems to try to keep you out of.
This site has a full list of all the skull locations in Halo Anniversary.  Most of them are pretty sneaky, so don't feel bad about using a guide. :)


Image downsampling with Haar DWT?

Question: How can the resolution of an image in matlab be reduced by using 2D haar wavelet by downsampling-decimation? Is there any predefined code or tool within wavemenu? thanks in advance
Comment: Hello and welcome to DSP.Stackexchange! It looks like you have a question on how to use a very specific piece of software called wavemenu. Chances anyone around here has heard it before or would be familiar with it are not that high. If your question is about that software specifically, it's probably best to contact its authors. If you can make it more general, your question might be a good fit for [StackOverflow](https://stackoverflow.com/) if it's about how to implement things or even here (but then you'd need to provide more details about what you want to do like an example or so).
Answer: yes ok thanks for the reply. Specifically, what I intend to do is an algorithm of digital image processing for use in retinal implants. Clarifying a bit my problem I know that there is a mathematical operation applicable to digital images that is called Wavelet Transform and that is in some way to compress the image can also lower its resolution through downsampling. My question is how can I from Matlab (with wavemenu GUI for example) compress an image using the Wavelet Haar transform and lower its resolution for example 640x480 to 32x32. In the following article is explained in a general way in the last step of table 1
https://www.researchgate.net/publication/323193463_Comparative_analysis_of_image_processing_algorithms_for_visual_prosthesis
Comment: You'd better update your question than answering it with details
Answer: The process the authors use with the Haar wavelet seems to be simply computing the low-pass/low-pass approximation of the image. Each $2\times 2$ block of pixels is simply replaced by their average. It boils down to low-pass filtering with a $2\times 2$ moving average kernel, and downsampling by 2 on rows and columns. One cannot go to $640 \times 480$ to $32\times 32$ without cropping some borders, as you can see on the man's left shoulder. Matlab functions for that purpose are dwt2 and wavedec2.
Comment: thanks very useful for me. I tested your suggestion in MATLAB and works fine!
Comment: Good to know that it worked. You can even upvote :)

Image downsampling with Haar DWT?


11.10 to 12.04: update manager can't find 12.04

Question: I've got 11.10 and have fully updated it but the option to upgrade to 12.04 just isn't coming up. I even tried to update via terminal. Do I have to change something? (I'm fairly new to Ubuntu/Linux)
Answer: To upgrade, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the commands below.
<code>sudo apt-get update && apt-get upgrade

sudo apt-get install update-manager-core

sudo do-release-upgrade
</code>


How to unit test hiccup template generating function?

Question: How do I unit test a function that takes a list of maps and returns an HTML table with the same data in Clojure/Hiccup?
Answer: For such "small" pieces of functionality, I would just perform regression testing on examples. Write a few samples representing some cases you want to deal with, manually build the results, and compare the output.
samples could be:

empty list
list with 1 entry / 1 col
list with 4 entries
invalid data (nested map, heterogeneous keys)

This test is brittle, but the scope of the function is so small that it is hard to come up with a good definition for the service provided.
A slightly better way is to parse the html and perform specific assertions on the structure returned by the function (nbr of rows, innerText of a td etc).


How would all the adults vanish?

Question: How would it be plausible for in a world without magic that all the people older than 15 disappear for a length of time of 6 years. I have never been a science freak or a mathematician so I'm not sure what would happen to make everyone disappear. What I want to happen that in the middle of a day all the adults disappeared only leaving their clothes behind. But I don't want the parents to age and also when they return after the 6 years they're NOT naked. And I also don't want aliens or a crazy daisies or maybe a horrible disease.
Answer: science-based? Forget it! What you ask for requires pure magic.

We have no reliable way to tell 15-year-olds from 14-year-olds or 16-year-olds.
There is no way as we understand it to "put people on ice" for six years without change. Science fiction talks about cryogenic suspension, but we are not up to reviving corpsicles yet.
Accelerating them to close to lightspeed would theoretically do the job as far as aging is concerned, but the required energy is totally off the scale.
They are supposed to leave their clothes behind and then come back fully clothed? Where would the spare set of clothing come from?

This sounds like high-end space opera technology, perhaps Star Trek or Iain Banks' Culture setting. Powerful computers, replicator technologies, matter transmission. Even so they'd need some preparation time to pull it off, and for a present-day world they'd be aliens.
Comment: Peter F. Hamilton's Ozzie could steal them away.
Comment: @Ash, at least for the first couple of series he'd lack both the computing power and the wormhole hardware to pull this off quickly. The Rajel, maybe.
Comment: Yeah unless the A.I. dude(s) got in on it, thanks for reminding me to read the other books in that universe I've only read _Pandora's Star_ and _Judas Unchained_.
Answer: Nanomachines in the water supply that get passed to the offspring, and get triggered when they detect the presence of air in the lungs (i.e. the infant being born), and then begin a countdown to sending a signal to teleporters that send them... wherever it is they go.
Answer: There are only two viable answers I can see to this question, both require ubiquitous surveillance for targeting purposes they are The Fey who are notorious for this sort of stunt and ASBs it would be far from the weirdest thing they've ever been accused of.

How would all the adults vanish?


Who is God of Oldness? What are the details about him?

Question: Jara is called the god of oldness. Who is he? Where does he live? Any story about him?
Anyone who has defeated him?
Answer: Jara, in fact, is a goddess- a female. Information about her is hard to come by, so I'll present it anectdotally, in bullets.

She is  the Goddess of Old Age, and The Daughter of Death.
From her name comes j=Jaramarana, an Indo-Buddhist name for the belief that the moment one is born, their life is a march towards death. (That living and dying are one and the same.)
She is found only in the Bhagavad Gita (List of References)

There's one examination, which you can find here, which came to the conclusion that

Jara, the effect of old age, does not harass a devotee. This is because a devotee follows the instructions and the determination of Narada Muni

Unfortunately, that's rather difficult to parse through, but what I take it to mean is that one shouldn't fear old age, nor death, for the enlightened (devotees), understand that, per Narada Muni's declarations, it is no punishment.

I found one other reference to Jara, in the book Sacred Places of The Goddess. It is included in an entry for the goddess Nirriti, who represents death and decay:

Nirriti (Indian): One of the earliest Hindu deities, she may have been associated with the pre-Aryan Jara who has been described as youthful and monstress, a discrepancy which may be related to the reconciliation between pre-Aryan and Vedic traditions. Nirrti later becomes associated with Kali, Yami, and Earth itself.
Comment: I think this Jara was who brought Jarasandha to life after his birth.
Comment: Dhumavati is a Mahavidya which I believe also signifies old age.


Daedalus synch problem

Question: Not always, but very often the Daedalus wallet seems to synchronize completely again. Shouldn't the downloaded blockchain be permanently on the computer and then only the missing rest be synchronized?
Comment: I'm not sure what your specific use case is, and maybe you just want Daedalus, but I would recommend not using it. While being a full node, it doesn't serve much purpose for network integrity.
Answer: yes it should be as you said. But, if not closed in the proper way, Daedalus will scan its db for corrupted chunks.
Always let Daedalus run when starting up or closing down.

Daedalus synch problem


Why is a bigger hammer more effective at hitting out bearings?

Question: I was removing bearings from a motorcycle wheel. The bearings are fitted with a compression fit. I was trying to remove them with a regular hammer (~500g head)but the bearings wouldn't move. Using a lump hammer (3 kg head) was much more effective. In theory this should be Force = mass * acceleration. I was hitting the bearing as hard as I could with regular hammer and it wasn't moving, but just tapping with the lump hammer was more effective. So I feel there are other effects happening here. What could those be?
Answer: Assuming you apply the same work to both (Force * distance) then they will both gain equal kinetic energy. $$m_bV_b^2=m_sV_s^2$$
taking $ m_b = 6 m_s$ so $\sqrt{6}V_b = V_s$ now let's calculate the ratio of momentum.
$$ \frac{m_bV_b}{m_sV_s} = \frac{6}{\sqrt{6}} \approx 2.45$$
What this means is that assuming they both have the same impact time, the larger hammer would produce 2.45 the average force of the smaller hammer.
Answer: The larger hammer has more inertia (resistance to acceleration) so transfers its momentum to whatever you hit. The lighter (less massive) hammer decelerates quickly when it meets the object you're hitting.
Answer: It's about impulse. When you use a hammer with a head 6 times greater, the produced impulse exceeds 6 times for when you use a hammer with a lighter head. Forces of bodies interaction are very large and act for a short time. When the bodies contact each other, the force rises steeply and falls to zero again when they separate. the time of contact is very small $\Delta t=t_f-t_i$, say, around $0.001\space s$. The impulse $\boldsymbol J$ is the total change in momentum during the time interval $t_f-t_i$:
$$\boldsymbol J=\int\limits_{t_i}^{t_f}\boldsymbol F dt \space .$$
The time-average force over the mentioned time interval is defined by:
$$\boldsymbol F_{av}=\frac{1}{\Delta t}\int\limits_{t_i}^{t_f}\boldsymbol F dt=\frac{\boldsymbol J}{\Delta t} \space .$$
$\boldsymbol F_{av}$ is the constant force which gives the same impulse during $\Delta t=t_f-t_i$. In you problem, if we assume that $\Delta t$ is the same for both cases, and if the mass of the bearings and their velocity after contact are respectively $m_b$ and $v_l$ for when you use the lighter hammer, and $m_b$ and $v_h$ for when you use the heavier hammer, we can deduce:
$$\frac{\boldsymbol {(F_{av})}_h}{\boldsymbol {(F_{av})}_l}= \frac{\boldsymbol J_h/\Delta t}{\boldsymbol J_l/\Delta t}\approx\frac{m_bv_h}{m_bv_l}=\frac{v_h}{v_l} \space.$$
Therefore, if you want to calculate how much greater the average force is for when you use a heavier hammer, you need to measure the ratio of the velocities of the bearings for the very moments as they leave the hammer in the two cases.
Moreover, remember that a compression fit has static friction, and you need to produce sufficient force that overcomes the force of static friction. As long as the hammer's force does not reach the static friction force, the bearings do not move. As the exerted force becomes greater than the static friction force, say, by using a massive hammer, the coefficient of the static friction suddenly reduces to that of kinetic friction $(\mu_k)$, and the bearing accelerates. Considering the effect of friction may make the impulse calculations complicated. For instance, $\boldsymbol {F_{av}}$ is better to be replaced by $\boldsymbol {F_{av}}-\mu_kpA$, where $p$ is the static (compression) pressure and $A$ is the area of the bearing.
Comment: I imagine its an elastic collision, both hammers are made of the same material(drop forged steel), so is the time of contact equal?
Comment: @R. Doolan The times of contacts are *nearly* equal, it may depend on many things.
Answer: It can seem counter-intuitive, especially since a fast blow with the light hammer can have more KE than a slower blow with the heavier hammer yet still have less effect.
The reason is that less KE is transferred when a lighter hammer is used. In an elastic collision between two bodies, both momentum and KE must be conserved. When one body is very much lighter than the other, the two conditions can only be satisfied if the lighter body retains most of the KE through recoiling at virtually the same speed at which it approached the collision. If the difference in mass between the two colliding bodies is reduced, more KE is transferred from the lighter to the heavier, the transfer being a maximum when the masses of the bodies are equal. You can see this in a Newton's cradle, where the incoming sphere stops dead and the outgoing one carries off all the KE.
So, when you use a heavier hammer, it recoils less and more of its KE is transferred to the bearing/wheel. The frictional forces between the bearing and the wheel are insufficient to distribute the additional KE, so the bearing accelerates faster than the wheel and pops out.