How to create a page with the selected template after activating the plugin

I’m writing my first plugin and I have problem. I don’t know how to write function, which create page with selected specific template after activate plugin.

function add_my_custom_page() {
    // Create post object
    $my_post = array(
        'post_title'    => wp_strip_all_tags( 'Example form' ),
        'post_status'   => 'publish',
        'post_author'   => 1,
        'post_type'     => 'page',

    // Insert the post into the database
    wp_insert_post( $my_post );

register_activation_hook(__FILE__, 'add_my_custom_page');

add_filter( 'page_template', 'wpa3396_page_template' );
function wpa3396_page_template( $page_template )
    if ( is_page( 'my-custom-page-slug' ) ) {
        $page_template = dirname( __FILE__ ) . '/form/haccp-form.php';
    return $page_template;

Activating the WolframKernel for Python

I would like to activate the WolframKernel to use Mathematica in Python. Although it worked the first time, later the error

Failed to communicate with kernel: C:Program FilesWolfram ResearchMathematica12.1WolframKernel.exe.

appeared. When I open the WolframKernel in this folder, it asks for activation. Maybe this is the reason for the error.
Unfortunately, I don’t know, what to enter in the dialog

Mathematica 12.1.1 Kernel for Microsoft Windows (64-bit)
Copyright 1988-2020 Wolfram Research, Inc.

Mathematica 12.1.1 Kernel cannot find a valid password.

For automatic Web Activation enter your activation key
(enter return to skip Web Activation): 

I tried the activation keys that I got in the Wolfram User Account, but they don’t work.

Best regards

Galaxy S7 Edge developer options not activating correctly

Version 8.0.0. The Developer Options menu is available under settings, but when I tap it, it says “Turn on Developer Options First”. OK, I go to About Phone -> Software Information, and try to tap the Build number 7 times. It tells me “Developer mode has already been turned on.” on the first tap. Restarting doesn’t change anything.

dnd 3.5e – Does activating a scroll require the verbal and somatic components of the spell to be fulfilled?

The answer is no, unless the scroll is special. If a spell requires verbal or somatic components, the same applies to the cast of a scroll (unless the scroll is created with a silent spell metamagic).

The 3.5 DMG solves this question right at the beginning of the section on magic objects DMG (213), but neglects the repetition of the information in the following scrolling section (237).


Scrolls are treated as a magic item of the type "magic completion": "magic"
Completion: This is the activation method for scrolls. A scroll is one
Spell that is mostly over. The preparation for the caster is done
Therefore, no preparation time as with normal is required beforehand
Magic. All that's left to do is the short, simple,
End parts of the spell (the last gestures, words and so on)
). To use an item safely to complete a spell, a character must be of
high enough in the right class to already cast the spell. If he
cannot already cast the spell, there is a possibility that it will make a mistake
(For possible consequences, see Scroll mishaps, page 238). Activate
A spell completion item is a standard action and provokes attacks from
Opportunity just like casting a spell.

php – "The plugin generated 2694 characters of unexpected output …" the SQL command CREATE TABLE does not work when activating the plugin

When trying to create a table in wpdb, when activating the plugin I'm working on, the error message "The plugin generated 2694 characters of unexpected output …" is displayed.

I went through the code and googled a lot to find out what I did wrong, to no avail.
Can anyone take a look at it and see if there is something obvious that I don't see? Very appreciated.

Note: The plugin is still activated and creates the menu properly, but the table in the database is not created.

prefix . 'tmadm_students';

    $charset_collate = $wpdb->get_charset_collate();

    $sql = "CREATE TABLE $table_name (
        studentnumber text NOT NULL,
        dojang text NOT NULL,
        firstname tinytext NOT NULL,
        lastname tinytext NOT NULL,
        title text NOT NULL,
        gender text NOT NULL,
        bbtitle text,
        titleid text,
        instructorcertexpire datetime DEFAULT '0000-00-00 00:00:00',
        wwcnumber text,
        wwcexpire date DEFAULT '0000-00-00',
        firstaidnumber text,
        firstaidrto text,
        firstaidexpire date DEFAULT '0000-00-00',
        cprexpire date DEFAULT '0000-00-00',
        streetaddress NOT NULL,
        suburbaddress NOT NULL,
        postcodeaddress NOT NULL,
        phhome text,
        phwork text,
        phmobile text,
        email text NOT NULL,
        dateofbirth date NOT NULL,
        height text NOT NULL,
        weight text NOT NULL,
        lastupdated date NOT NULL,
        beltsize text NOT NULL,
        uniformsize text NOT NULL,
        occupation text NOT NULL,
        nationality text,
        emergencycontact text NOT NULL,
        relationship text NOT NULL,
        phhomeemergency text NOT NULL,
        phworkemergency text NOT NULL,
        phmobileemergency text NOT NULL,
        reference text,
        referenceinternet text,
        applicationdate date DEFAULT '0000-00-00' NOT NULL,
        currentrank text NOT NULL,
        rankid text NOT NULL,
        ranktitle text NOT NULL,
        consentpart1 text NOT NULL,
        consentpart2 text NOT NULL,
        consentpart3 text NOT NULL,
        consentpart4 text NOT NULL,
        consentpart5 text NOT NULL,
        consentpart6 text NOT NULL,
        consentpart7 text NOT NULL,
        consentpart8 text NOT NULL,
        consentpart9 text NOT NULL,
        consentpart10 text NOT NULL,
        consentpart11 text NOT NULL,
        consentpart12 text NOT NULL,
        completeconsent text NOT NULL,
        Consentby text NOT NULL,
        active text NOT NULL,
        agreedfee text,
        autobilled text,
        billfrequency text,
        newfee text,
        PRIMARY KEY  (id)
    ) $charset_collate;";

    require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
    dbDelta( $sql );

    add_option( 'tmadm_db_version', $tmadm_db_version );

// Insert initial data into Students Table
function tmadm_install_data() {
    global $wpdb;

    $table_name = $wpdb->prefix . 'tmadm_students';

            'studentnumber' => '00XX1',
    //rest of this data removed as it contains personal data
register_activation_hook(__FILE__, 'tmadm_install');
register_activation_hook(__FILE__, 'tmadm_install_data');

// Plugin Settings Menu
add_action( 'admin_menu', 'tmadm_admin_menu' );

function tmadm_admin_menu() {
    add_menu_page( 'TMA Dojang Manager', 'Dojang Manager', 'manage_options', 'tmadm_settings', 'tmadm_settings_page', '', 50  );
    add_submenu_page( 'tmadm_settings', 'General Settings', 'General Settings', 'manage_options', 'tmadm_settings', 'tmadm_settings_page' );
    add_submenu_page( 'tmadm_settings', 'Dojang Settings', 'Dojang Management', 'manage_options', 'tmadm_settings', 'tmadm_settings_page' );
    add_submenu_page( 'tmadm_settings', 'Instructor Settings', 'Instructor Management', 'manage_options', 'tmadm_settings', 'tmadm_settings_page' );
    add_submenu_page( 'tmadm_settings', 'Student Settings', 'Student Management', 'manage_options', 'tmadm_settings', 'tmadm_settings_page' );

function tmadm_settings_page(){
    include 'admin/tmadm-admin-page.php';


Film – Does activating Digital ICE on my Epson Perfection V600 limit the scan resolution?

I use an Epson Perfection V600 photo scanner to scan color negatives. The scanner supports Digital ICE, which uses infrared light to search for dust and automatically correct images to remove dust artifacts. The maximum optical resolution is 6400 DPI.

I have found that the scanner motor moves extremely slowly and sensitively in 6400 DPI mode when I have not activated Digital ICE, so its stepper motors can detect a negative at this size. However, I also found that activating Digital ICE moves much faster when scanning with visible light than when it scans at a lower resolution. (The noise of the engine changes the pitch significantly depending on the speed.)

After a few tests, I found that when the Digital ICE was activated, the maximum speed at which the scanner head moves with visible light during the scan is the same as at 3200 DPI, even when the scanner is in 4800 or 6400 DPI mode . It only moves slower than this speed when Digital ICE is switched off. (If this option is disabled, 4800 DPI and 6400 DPI sound clearly unique.)

Are the images scanned at 4800 or 6400 DPI settings when Digital ICE is interpolated from 3200 DPI scans? Or can the scanner scan at 6400 DPI at higher speed without interpolation?

I would like an answer that objectively compares pixels on different scans with low-grain color films. (I only use the high DPI settings when scanning low-grain films such as Ektachrome, Ektar, etc., and I don't care about stocks like Gold, Superia, etc.)

magento2 – How to handle the magento 2 var directory on multiple web heads without activating "Allow symlinks"

We have multiple web heads on which our Magento instance is running and have previously used NFS to share directories like pub / media var / log var / report etc. We have an NFS mount on a shared server at a single NFS mount point on each web header with pub and var. For each deployment, we link the newly provided var / log and var / report directories to the shared var / log and var / report directory, but this works perfectly:

I noticed that there are files like * .pid files and .lock files in the application's var directory, which leads me to believe that we should share the entire var directory via NFS, not just var / log and var / report. Sure, this is easy to do to change my nfs mount and symlinks, but once I do var / view_preprocessed, it won't work unless the Magento "Allow Symlinks" setting is enabled. If I activate this setting, everything works as intended and the var directory is released without problems. However, the "Allow symlinks" setting is not a production-recommended setting for security reasons.

In short, my question is whether these .pid files should be shared with multiple web heads. If so, how can you best do this so that all web heads can be synchronized without compromising security by activating "Allow symlinks".

SQL Server – Why is activating db_chaining bad for security reasons?

I have two databases, Database1 and Database2, and two applications that access both databases through an account called AppUser. There are hundreds of views in database1 that access tables in database2.

Previously, AppUser was granted access to these tables in Database2 in the current model.

I want to use DB_CHAINING ON in Database1 and Database2 and only allow access to Database2 tables via SQL objects in Database1. After all, AppUser does not need access to tables in Database2.

Currently, the SQL objects in the two databases can only be created by database administrators and developers. There are no other human business users who can create schemas / SQL objects in database 1 and database 2.

I keep reading that activating DB_CHAINING is a security risk.

Here, for example, they make the claim:

Let it say directly: This method opens a security hole that
allows a local power user to increase their permission to sysadmin,
although the way to do it is a little more complicated and cumbersome
as if the database is set to TRUSTWORTHY.

Can you please give an example of security risks I am exposed to if I use DB_CHAINING ON for the two databases? This is safer for me because AppUser has no direct access to tables in Database2.

One security risk I've found is that other users can accidentally create views that can access dbo's own tables. In my case, this is not a problem because no other human business users are allowed to create SQL objects in the two databases.

There is another post here that suggested using option (4) to sign the SQL objects. While it is the safest option, it is also one of the most complicated solutions that Microsoft’s geniuses have developed. I've already used it in a different context, but frankly I think it's over the top.