usa – Doubt regarding a countries visited question in U.S customs Declaration form (U.S)

While reading about the customs declaration form I saw a question where there is a question, “countries visited on this trip prior to U.S. arrival”.

My doubt is do we have to mention all the countries I visited previously? for example, back in 2020, 2019, and 2018, I visited few European countries(Sweden, Denmark, Germany, Poland, U.K, and France). Do I need to mention them?

Actually, I am flying from India to the U.S.A directly. What do I have to mention in the form? Only India or should I also mention the countries I have mentioned above?

I tried to find answers but didn’t find anything similar to mine. Could someone please guide me with this?

power supply – Why do laptops need a higher voltage than desktops? Also, what form factor do laptops use?

Why do laptops need 19V whilst desktops need 12V? If no parts use 19V in a laptop, then what is/are the voltage(s) for the components that are typically 12V in a desktop? (e.g. fans, disks, DVD drives, floppy drives, GPU, CPU) What is the main voltage of the motherboard if it isn’t 19V? Also, what form factor are laptop internal PSUs (like ATX in a desktop)?

Do I need to declare my Apple Watch that I got as a gift in the US customs form?

I already have a smart watch and I got another one as gift for my friend. Do I need to declare both or just the one which is a gift?

Add an item to sharepoint List using asp.net web form (cshtml)


Your privacy


By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.




8 – How to add a secondary Ajax submit to a regular node form?

I’m trying to add an Ajax submit to a regular node edit form (Drupal 9). I’m using Field Groups so that there’s a series of tabs, and I’ve added a pair of “buttons” (Right now they’re just markup <div>s, but I could change them to real buttons if that’s recommended) that users can use to move forward and back through the tabs with some Javascript.

The ask now is that each time the tab focus changes, the form is submitted via Ajax.
All the examples I’m finding seem to be doing something other than what I’m after. I’ve seen examples using completely custom forms, loading forms, and altering fields, but nothing that just adds the ability to submit a a regular node form with Ajax.

Things I’ve tried:

  • Adding an #ajax subarray of various sorts to the buttons and/or the regular submit element. Nothing Ajaxy at all has happened in any of these experiments
  • Using Javascript to trigger a click event on the submit, without and without an #ajax subarray. All I get is a regular submit with page refresh
  • Bypassing all of that just calling $.post($('#form-id').attr('action'), $('#form-id').serialize()). There’s some semblance of Ajax submit going on as my custom hook_form_alter gets hit, but the node isn’t saved/updated. I think that’s failing because there’s no proper submit/op value associated with it, and I haven’t been able to figure out how to add/set it.

Can someone point me in the right direction?

magento2 – Custom form in checkout process is not validated

I have created a new checkout step between shipping address step and payment step. Inside it, I have added a new form.

That step has the Next button. When I press that button, the form is not validated. How can I do it?

This is the step template:

<li id="billing_info" data-bind="fadeVisible: isVisible">
    <div class="step-title" data-bind="i18n: 'Datos de Facturación'" data-role="title"></div>
    <div id="checkout-step-billing"
         class="step-content checkout-shipping-method"
         data-role="content">

        <form class="form" data-bind="submit: navigateToNextStep" novalidate="novalidate">
            <div id="billing-form" class="billing-info fieldset" data-role="content">
                <!-- ko foreach: getRegion('billing-form-container') -->
                <!-- ko template: getTemplate() --><!-- /ko -->
                <!--/ko-->
            </div>
            <div class="actions-toolbar">
                <div class="primary">
                    <button data-role="opc-continue" type="submit" class="button action continue primary">
                        <span><!-- ko i18n: 'Next'--><!-- /ko --></span>
                    </button>
                </div>
            </div>
        </form>
    </div>
</li>

Note where the new form fields are placed.

This is the JS that controls the step:

define((
    'ko',
    'uiComponent',
    'underscore',
    'Magento_Checkout/js/model/step-navigator'
), function (ko, Component, _, stepNavigator) {
    'use strict';

    /**
     * mystep - is the name of the component's .html template,
     * <Vendor>_<Module>  - is the name of your module directory.
     */
    return Component.extend({
        defaults: {
            template: 'MyVendor_Checkout/billing-step'
        },

        // add here your logic to display step,
        isVisible: ko.observable(true),

        /**
         * @returns {*}
         */
        initialize: function () {
            this._super();

            // register your step
            stepNavigator.registerStep(
                // step code will be used as step content id in the component template
                'billing_info',
                // step alias
                null,
                // step title value
                'Billing Info',
                // observable property with logic when display step or hide step
                this.isVisible,

                _.bind(this.navigate, this),

                /**
                 * sort order value
                 * 'sort order value' < 10: step displays before shipping step;
                 * 10 < 'sort order value' < 20 : step displays between shipping and payment step
                 * 'sort order value' > 20 : step displays after payment step
                 */
                15
            );

            return this;
        },

        /**
         * The navigate() method is responsible for navigation between checkout steps
         * during checkout. You can add custom logic, for example some conditions
         * for switching to your custom step
         * When the user navigates to the custom step via url anchor or back button we_must show step manually here
         */
        navigate: function () {
            this.isVisible(true);
        },

        /**
         * @returns void
         */
        navigateToNextStep: function () {
           stepNavigator.next();
        }
    });
});

And this the JS that controls the form:

define((
    'Magento_Ui/js/form/form'
), function(Component) {
    'use strict';
    return Component.extend({
        initialize: function () {
            this._super();
            // component initialization logic
            return this;
        },

        /**
         * Form submit handler
         *
         * This method can have any name.
         */
        onSubmit: function() {
            // trigger form validation
            this.source.set('params.invalid', false);
            this.source.trigger('billingForm.data.validate');

            // verify that form data is valid
            if (!this.source.get('params.invalid')) {
                // data is retrieved from data provider by value of the customScope property
                var formData = this.source.get('billingForm');
                // do something with form data
                console.dir(formData);
            }
        }
    });
});

Should I add the code of the last JS as part of the first JS? Should I extend Magento_Ui/js/form/form there?

Please, can you give me a hand?

magento2.3 – How to show a form in an additional step in checkout process

I have created a new step to checkout page. This is the template:

<li id="billing_info" data-bind="fadeVisible: isVisible">
    <div class="step-title" data-bind="i18n: 'Billing Info'" data-role="title"></div>
    <div id="checkout-step-billing"
         class="checkout-shipping-method"
         data-role="content">

        <div id="billing-form" class="step-content" data-role="content">
            <!-- ko foreach: getRegion('billing-form-container') -->
            <!-- ko template: getTemplate() --><!-- /ko -->
            <!--/ko-->
        </div>

        <form data-bind="submit: navigateToNextStep" novalidate="novalidate">
            <div class="actions-toolbar">
                <div class="primary">
                    <button data-role="opc-continue" type="submit" class="button action continue primary">
                        <span><!-- ko i18n: 'Next'--><!-- /ko --></span>
                    </button>
                </div>
            </div>
        </form>
    </div>
</li>

As you know, all checkout steps let knockout to retrieve fields dynamically and this is not the exception.

This is the checkout_index_index.xml file:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="checkout.root">
            <arguments>
                <argument name="jsLayout" xsi:type="array">
                    <item name="components" xsi:type="array">
                        <item name="checkout" xsi:type="array">
                            <item name="children" xsi:type="array">
                                <item name="steps" xsi:type="array">
                                    <item name="children" xsi:type="array">
                                        <!-- The new step you add -->
                                        <item name="billingstep" xsi:type="array">
                                            <item name="component" xsi:type="string">Example_Checkout/js/view/billing-information-step</item>
                                            <!--To display step content before shipping step "sortOrder" value should be < 1-->
                                            <!--To display step content between shipping step and payment step  1 < "sortOrder" < 2 -->
                                            <!--To display step content after payment step "sortOrder" > 2 -->
                                            <item name="sortOrder" xsi:type="string">2</item>
                                            <item name="children" xsi:type="array">  
                                                <item name="billing-form-container" xsi:type="array">
                                                    <!-- Add this item to configure your js file  -->
                                                    <item name="component" xsi:type="string">Example_Checkout/js/view/billing-information-form</item>
                                                    <item name="displayArea" xsi:type="string">billing-form-fields</item>
                                                    <item name="children" xsi:type="array">
                                                        <!-- Here we will add the form fields  -->
                                                        <item name="text_field" xsi:type="array">
                                                            <item name="component" xsi:type="string">Magento_Ui/js/form/element/abstract</item>
                                                            <item name="config" xsi:type="array">
                                                                <!-- customScope is used to group elements within a single form (e.g. they can be validated separately) -->
                                                                <item name="customScope" xsi:type="string">customCheckoutForm</item>
                                                                <item name="template" xsi:type="string">ui/form/field</item>
                                                                <item name="elementTmpl" xsi:type="string">ui/form/element/input</item>
                                                            </item>
                                                            <item name="provider" xsi:type="string">checkoutProvider</item>
                                                            <item name="dataScope" xsi:type="string">customCheckoutForm.text_field</item>
                                                            <item name="label" xsi:type="string">Text Field</item>
                                                            <item name="sortOrder" xsi:type="string">1</item>
                                                            <item name="validation" xsi:type="array">
                                                                <item name="required-entry" xsi:type="string">true</item>
                                                            </item>
                                                        </item>
                                                    </item>
                                                </item>
                                            </item>
                                        </item>
                                    </item>
                                </item>
                            </item>
                        </item>
                    </item>
                </argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

The new step is shown, but the form is not placed in it.

Thanks
Jaime

artificial intelligence – Conjunctive Normal Form n queen

Given a chessboard with 4 rows and 4 columns (4×4)

1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16

Assign a Boolean variable to each cell of the board as below (1, 2, 3, etc. are variable names)
If a variable is True, then there is a queen on the corresponding cell and vice versa.
Use CNF clauses to describe constraints to place a queen on cell no. 1

use -1 to denote NOT 1

The table below is my CNF answer. I wonder if I did the right thing?. Can you check it for me?. Thanks

No CNF
1 9 ^ -5 ^ -1 ^ -13 ^ -10 ^ -11 ^ -12 ^ -6 ^ -3 ^ -14
2 2 ^ -1 ^ -3 ^ -4 ^ -6 ^ -10 ^ -14 ^ -5 ^ -7 ^ -12
3 15 ^ -13 ^ -14 ^ -16 ^ -11 ^ -7 ^ -3 ^ -12 ^ -10 ^ -5
4 8 ^ -7 ^ -6 ^ -5 ^ -4 ^ -12 ^ -16 ^ -11 ^ -14 ^ -3

dnd 5e – Does a non-magical disease/poison effect contracted in Wild Shape carry over to the original form?

The absence of evidence is not the evidence of absence.

In this case, at least, the above is true. Since the wording for wild shape does not explicitly say conditions are removed/dispelled, and disease is a condition, that condition is not dispelled upon shifting back.
It can then be surmised that status affects such as poisoned, blinded, etc, are also not removed upon shifting to and from wildshape, it can be easily concluded that those effects still persist in the original druid’s form.

This is not to say a disease is a standard condition like poisoned, blinded, etc. But it is still a condition that persists on the player until the effect wears off, or is cured.

Diseases specify what creatures are affected by them. For example, Cackle Fever:

This disease targets humanoids, although gnomes are strangely immune.

Or Sight Rot:

This painful infection causes bleeding from the eyes and eventually blinds the victim. A beast or humanoid that drinks water tainted by sight rot must… etc.

After this point, the real question becomes does a mundane disease that affects a specific animal affect the druid in their humanoid form?

That goes into some science that is more theory than actual rules. So there’s no easy way to say that a disease will or will not affect the druid in a different form. However, it could be said that the disease remains dormant in an unaffected or immune host, but when the host becomes a viable creature the disease persists. This is up to your DM at this point.

  • If the druid is considered their race in terms of biological susceptibility in wildshape or not, then the disease would always persist.
  • If the druid is not considered their race in terms of biological susceptibility in wildshape, then the disease would not persist, or would be quickly cleansed from an unsupported host.

One last observation from this can be taken from the text of Wild Shape:

You retain the benefit of any features from your class, race, or other source and can use them if the new form is physically capable of doing so.

Of course, biological susceptibility to a disease wouldn’t exactly be considered a “benefit” but you could rule this to mean that if you are a Gnome you will, for the purposes of disease viability, be able to be infected as if you were a Gnome, no matter what beast you were taking the shape of.

linux – Is there a way to transfer SMS mesages from a Samsung Galaxy S5) to an Ubuntu PC, in a form in which I can view the SMS messages on my PC?

I want to transfer the SMS messages on my Samsung Galaxy S5 smartphone to my PC (with Linux Ubuntu 20.04.2 LTS), in a form in which I can open and view the messages on my PC as I do on my smartphone.

I know about the apps which can back up smartphone data, such as Kies and Smart Switch for Samsung phones and ADB and Android File Transfer for Android devices. But as far as I can tell, these only back the SMS data up rather than save them as files which can be opened on PC desktop.