mac – How to remap “right option” key to “control + option + command + shift” in Karabiner?

You can edit the karabiner json file:
~/.config/karabiner/karabiner.json

Look for this part in your profile:

"complex_modifications": {
    "rules": [ ]
}

Then add a new rule:

                "rules": [
                    {
                        "manipulators": [
                            {
                                "description": "Change right option to command+control+option+shift.",
                                "from": {
                                    "key_code": "right_option",
                                    "modifiers": {
                                        "optional": [
                                            "any"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "key_code": "left_command",
                                        "modifiers": [
                                            "left_control",
                                            "left_option",
                                            "left_shift"
                                        ]
                                    }
                                ],
                                "type": "basic"
                            }
                        ]
                    }
                ]
            }

Restart the karabiner, it should work now.

php – Settings Page – Option won’t save in database

I created an option in the options table and I am trying to save data from a custom settings page but I isn’t saving.

Below is my code adding the the fields and sections as well as their respective callback functions.

    function wcs_settings() {

    if( !get_option( 'wcs_settings' ) ) {
        add_option( 'wcs_settings' );
    }


    add_settings_section(
        'front_page_settings_section',
        'Front Page Settings',
        'front_page_callback',
        'wcs_settings_page',
    );

    add_settings_field(
        'front-page-slogan',
        'Front Page Slogan',
        'front_page_slogan_callback',
        'wcs_settings_page',
        'front_page_settings_section',
    );

    register_setting(
        'wcs_settings_page',
        'front-page-slogan',
    );

}
add_action( 'admin_init', 'wcs_settings' );

// Callback functions

function front_page_callback() {
    echo '<p>Front Page Setting for the theme.</p>';
}


function front_page_slogan_callback() {

    $options = get_option( 'wcs_settings' );

    $slogan = '';
    if( isset( $options('front-page-slogan') ) ) {
        $slogan = esc_html( $options('front-page-slogan') );
    }

    echo '<input type="text" id="front_page_slogan_id" name="wcs_settings(front-page-slogan)" value="' . $slogan . '" />';

}

This is the form I am outputting onto the custom settings page:

<div class="wrap">

<h1><?php esc_html_e( get_admin_page_title() ); ?></h1>

<form method="post" action="options.php">
    <!-- Display necessary hidden fields for settings -->
    <?php settings_fields( 'wcs_settings_page' ) // Slug of page             ?>
    <!-- Display the settings sections for the page -->
    <?php do_settings_sections( 'wcs_settings_page' ); // Slug of Page       ?>
    <!-- Default Submit Button-->
    <?php submit_button(); ?>
</form>

How can I create a "Best Answer" option for a forum?

I need an approach to create a best answer option for question author to accept a comment as best answer in Drupal 8 Forum.

Do you have any advice?

hosting – What would be the best option to host a personal website?

I would like to find the best solution to rent a server to host a personal website running Django. It’d be better if it runs on Linux and other than that, the only thing as I said is that it will be a Django website. Traffic should be low as it will only host showcase projects, as in other CV-looking websites you may have encountered.

I know nothing about server/hosting services, but I know how to host on a home server though.

I looked in AWS but man… Too many offers, pricing is really shady. I can be down with it but for now I don’t really understand.

Some of you must have dealt with this situation, I’d like to have your opinion. What would be my best option ?

Extension option Missing in SPFX

i am trying creating extension but not enter image description heregetting extension option only getting webpart

collision detection – Best option to narrow a known set of triangles?

I am building collision detection and response in a custom engine. This routine happens between the moving player, and static entities on the map.

In the first phase, the broad phase I am moving the player and looking for any new AABB to AABB collisions between the player and static entities.

In the second phase, the narrow phase. I then do a swept-spehere to triangle detection. I move the players collision sphere through the triangles in the colliding AABB.This phase can be expensive because the colliding AABB may have complicated geometry with many triangles.

I ways to narrow down the set of triangles being detected. Some solutions I have in mind are:

  • Get the “overlap box” the space where both AABB’s overlap in the broad phase.

    Then do a pass on all the triangles in the colliding AABB and return just the ones in the overlap box.
    My understanding here is I’ll have to use a SAT algorithm to detect if the AABB and triangles collide or not and I’ll still have to iterate over all the triangles in the colliding AABB. I’m not sure if this is any more performant.

  • Sort the triangles by distance to the AABB collision

    If I sort the triangles by their distance to the AABB collision I will be able to exit from the narrow phase before the entire set of triangles has been processed.
    I’m not sure what the performance implications of resorting the triangles each frame would be. I’m thinking not great…

  • Use a spatial partitioning data structure OctTree or quadTree to narrow down the triangles.

    It may be extensive work to build one of these structures together for my engine and populate it with all the entities triangles. I’m not sure if they will give me any improved granularity. Will they be more precise than the AABB overlap?

I wanted to ask for help first before I start building one these solutions and reviewing the performance. Any other ideas are greatly appreciated.

grep cannot find a known string in a MS-Word file even with the -a option

I have MS-Word file including the string “Abekat”
The entire content of the file (test.docx) is in fact just: “This file includes the word Abekat”.
Standing in the same directory as my target file (test.docx) and performing the terminal command
grep -ia Abekat *
I simply get no response.
I don’t understand why this is the case.
Hope someone can explain that to me.
(I am running macOS (10:15.4)
Best
Eigil

Need Cheap Cloud Hosting Option with SSL


Quote Originally Posted by net
View Post
Welcome to WHT!

Make sure to provide your specific requirements so members can suggest.

SSL is free with Lets Encrypt. Do you need any control panel?

Hey thanks for reply,

actually i want to host many websites lest’s say 50-60 websites on cloud but it should be on different IP’s

I have tried DO,Vultr but for each instance i can host one website with 1 IP

So it is costing me around $250-$300 per month.

I want to easy and cheap solution where i can host each website for at least $2-3 per month per IP.

I got one solution provider but he still ask for $3.5

I have checked few things on internet i am not pro in this hosting field so i need guidance from you guys.

Thanks

how can i write a function to display a datalist option value within an empty paragraph?

I would like to write a function activateCodeButton() that displays the selected option value within the empty paragraph with the id=”wm-selected-value.
THe HTML looks like this.

        <input id="wm-list" list="wm-greek-teams" name="wm-greek-teams" oninput="activateCodeButton()">
        <datalist id="wm-greek-teams">
            <option value="ΑΕΚ">
            <option value="ΑΡΗΣ">
            <option value="ΟΛΥΜΠΙΑΚΟΣ">
            <option value="ΟΦΗ">
            <option value="ΠΑΝΑΘΗΝΑΙΚΟΣ">
        </datalist>
    </div>

    <p id="wm-selected-value"></p>```

Thank you in advance

Magento2: Dropdown option in contact page

We add custom option in contact page:

<div class="field ordernumber">
                            <div class="control">
                                <input placeholder="<?php echo __('Order Number') ?>" name="ordernumber" id="ordernumber"
                                       title="<?php /* @escapeNotVerified */
                                       echo __('Order Number') ?>" value="" class="input-text" type="text"/>
                            </div>
                        </div>
                                                        <div class="field rodzajzgloszenia">
                <div class="control">
                    <input placeholder="<?php echo __('Rodzaj zgloszenia') ?>" name="rodzajzgloszenia" id="rodzajzgloszenia"
                           title="<?php /* @escapeNotVerified */
                           echo __('Rodzaj zgloszenia') ?>" value="" class="input-text" type="text"/>
                </div>
            </div>

email Template:

<tr>
           <td><strong>{{trans "Order Number"}}</strong></td>
        <td>{{var data.ordernumber}}</td>
    </tr>
<tr>
           <td><strong>{{trans "Rodzaj zgloszenia"}}</strong></td>
        <td>{{var data.rodzajzgloszenia}}</td>
    </tr>

But how to create in field: Rodzaj zgłoszenia dropdown with select option and forward in email selected option?